aliplayer-hls-min.js 701 KB

12345678910111213141516171819202122232425262728
  1. !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Hls=e():t.Hls=e()}(this,function(){return function(t){function e(i){if(r[i])return r[i].exports;var n=r[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,e),n.l=!0,n.exports}var r={};return e.m=t,e.c=r,e.d=function(t,r,i){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/dist/",e(e.s=110)}([function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e,r){(function(i){!function(r,i){t.exports=e=i()}(0,function(){var t=t||function(t,e){var n;if("undefined"!=typeof window&&window.crypto&&(n=window.crypto),!n&&"undefined"!=typeof window&&window.msCrypto&&(n=window.msCrypto),!n&&void 0!==i&&i.crypto&&(n=i.crypto),!n)try{n=r(117)}catch(t){}var a=function(){if(n){if("function"==typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function t(){}return function(e){var r;return t.prototype=e,r=new t,t.prototype=null,r}}(),s={},f=s.lib={},c=f.Base=function(){return{extend:function(t){var e=o(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),h=f.WordArray=c.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=void 0!=e?e:4*t.length},toString:function(t){return(t||d).stringify(this)},concat:function(t){var e=this.words,r=t.words,i=this.sigBytes,n=t.sigBytes;if(this.clamp(),i%4)for(var a=0;a<n;a++){var o=r[a>>>2]>>>24-a%4*8&255;e[i+a>>>2]|=o<<24-(i+a)%4*8}else for(var a=0;a<n;a+=4)e[i+a>>>2]=r[a>>>2];return this.sigBytes+=n,this},clamp:function(){var e=this.words,r=this.sigBytes;e[r>>>2]&=4294967295<<32-r%4*8,e.length=t.ceil(r/4)},clone:function(){var t=c.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],r=0;r<t;r+=4)e.push(a());return new h.init(e,t)}}),u=s.enc={},d=u.Hex={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;n<r;n++){var a=e[n>>>2]>>>24-n%4*8&255;i.push((a>>>4).toString(16)),i.push((15&a).toString(16))}return i.join("")},parse:function(t){for(var e=t.length,r=[],i=0;i<e;i+=2)r[i>>>3]|=parseInt(t.substr(i,2),16)<<24-i%8*4;return new h.init(r,e/2)}},l=u.Latin1={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;n<r;n++){var a=e[n>>>2]>>>24-n%4*8&255;i.push(String.fromCharCode(a))}return i.join("")},parse:function(t){for(var e=t.length,r=[],i=0;i<e;i++)r[i>>>2]|=(255&t.charCodeAt(i))<<24-i%4*8;return new h.init(r,e)}},p=u.Utf8={stringify:function(t){try{return decodeURIComponent(escape(l.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return l.parse(unescape(encodeURIComponent(t)))}},b=f.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new h.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=p.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var r,i=this._data,n=i.words,a=i.sigBytes,o=this.blockSize,s=4*o,f=a/s;f=e?t.ceil(f):t.max((0|f)-this._minBufferSize,0);var c=f*o,u=t.min(4*c,a);if(c){for(var d=0;d<c;d+=o)this._doProcessBlock(n,d);r=n.splice(0,c),i.sigBytes-=u}return new h.init(r,u)},clone:function(){var t=c.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),g=(f.Hasher=b.extend({cfg:c.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){b.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(e,r){return new t.init(r).finalize(e)}},_createHmacHelper:function(t){return function(e,r){return new g.HMAC.init(t,r).finalize(e)}}}),s.algo={});return s}(Math);return t})}).call(e,r(13))},function(t,e,r){"use strict";function i(){}function n(t,e){return e="["+t+"] > "+e}function a(t){var e=self.console[t];return e?function(){for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];i[0]&&(i[0]=n(t,i[0])),e.apply(self.console,i)}:i}function o(t){for(var e=arguments.length,r=Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];r.forEach(function(e){c[e]=t[e]?t[e].bind(t):a(e)})}r.d(e,"a",function(){return h}),r.d(e,"b",function(){return u});var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f={trace:i,debug:i,log:i,warn:i,info:i,error:i},c=f,h=function(t){if(!0===t||"object"===(void 0===t?"undefined":s(t))){o(t,"debug","log","info","warn","error");try{c.log()}catch(t){c=f}}else c=f},u=c},function(t,e,r){function i(t,e){for(var r in t)e[r]=t[r]}function n(t,e,r){return o(t,e,r)}var a=r(4),o=a.Buffer;o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?t.exports=a:(i(a,e),e.Buffer=n),i(o,n),n.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return o(t,e,r)},n.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var i=o(t);return void 0!==e?"string"==typeof r?i.fill(e,r):i.fill(e):i.fill(0),i},n.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return o(t)},n.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return a.SlowBuffer(t)}},function(t,e,r){"use strict";(function(t){function i(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function n(t,e){if(i()<e)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e),t.__proto__=a.prototype):(null===t&&(t=new a(e)),t.length=e),t}function a(t,e,r){if(!(a.TYPED_ARRAY_SUPPORT||this instanceof a))return new a(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return c(this,t)}return o(this,t,e,r)}function o(t,e,r,i){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?d(t,e,r,i):"string"==typeof e?h(t,e,r):l(t,e)}function s(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function f(t,e,r,i){return s(e),e<=0?n(t,e):void 0!==r?"string"==typeof i?n(t,e).fill(r,i):n(t,e).fill(r):n(t,e)}function c(t,e){if(s(e),t=n(t,e<0?0:0|p(e)),!a.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function h(t,e,r){if("string"==typeof r&&""!==r||(r="utf8"),!a.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var i=0|g(e,r);t=n(t,i);var o=t.write(e,r);return o!==i&&(t=t.slice(0,o)),t}function u(t,e){var r=e.length<0?0:0|p(e.length);t=n(t,r);for(var i=0;i<r;i+=1)t[i]=255&e[i];return t}function d(t,e,r,i){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(i||0))throw new RangeError("'length' is out of bounds");return e=void 0===r&&void 0===i?new Uint8Array(e):void 0===i?new Uint8Array(e,r):new Uint8Array(e,r,i),a.TYPED_ARRAY_SUPPORT?(t=e,t.__proto__=a.prototype):t=u(t,e),t}function l(t,e){if(a.isBuffer(e)){var r=0|p(e.length);return t=n(t,r),0===t.length?t:(e.copy(t,0,0,r),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||X(e.length)?n(t,0):u(t,e);if("Buffer"===e.type&&Q(e.data))return u(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function p(t){if(t>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|t}function b(t){return+t!=t&&(t=0),a.alloc(+t)}function g(t,e){if(a.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return H(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return W(t).length;default:if(i)return H(t).length;e=(""+e).toLowerCase(),i=!0}}function v(t,e,r){var i=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,e>>>=0,r<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return L(this,e,r);case"utf8":case"utf-8":return D(this,e,r);case"ascii":return M(this,e,r);case"latin1":case"binary":return x(this,e,r);case"base64":return k(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,r);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function y(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}function m(t,e,r,i,n){if(0===t.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=n?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(n)return-1;r=t.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof e&&(e=a.from(e,i)),a.isBuffer(e))return 0===e.length?-1:_(t,e,r,i,n);if("number"==typeof e)return e&=255,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):_(t,[e],r,i,n);throw new TypeError("val must be string, number or Buffer")}function _(t,e,r,i,n){function a(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}var o=1,s=t.length,f=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(t.length<2||e.length<2)return-1;o=2,s/=2,f/=2,r/=2}var c;if(n){var h=-1;for(c=r;c<s;c++)if(a(t,c)===a(e,-1===h?0:c-h)){if(-1===h&&(h=c),c-h+1===f)return h*o}else-1!==h&&(c-=c-h),h=-1}else for(r+f>s&&(r=s-f),c=r;c>=0;c--){for(var u=!0,d=0;d<f;d++)if(a(t,c+d)!==a(e,d)){u=!1;break}if(u)return c}return-1}function w(t,e,r,i){r=Number(r)||0;var n=t.length-r;i?(i=Number(i))>n&&(i=n):i=n;var a=e.length;if(a%2!=0)throw new TypeError("Invalid hex string");i>a/2&&(i=a/2);for(var o=0;o<i;++o){var s=parseInt(e.substr(2*o,2),16);if(isNaN(s))return o;t[r+o]=s}return o}function S(t,e,r,i){return Y(H(e,t.length-r),t,r,i)}function E(t,e,r,i){return Y(q(e),t,r,i)}function A(t,e,r,i){return E(t,e,r,i)}function T(t,e,r,i){return Y(W(e),t,r,i)}function R(t,e,r,i){return Y(V(e,t.length-r),t,r,i)}function k(t,e,r){return 0===e&&r===t.length?Z.fromByteArray(t):Z.fromByteArray(t.slice(e,r))}function D(t,e,r){r=Math.min(t.length,r);for(var i=[],n=e;n<r;){var a=t[n],o=null,s=a>239?4:a>223?3:a>191?2:1;if(n+s<=r){var f,c,h,u;switch(s){case 1:a<128&&(o=a);break;case 2:f=t[n+1],128==(192&f)&&(u=(31&a)<<6|63&f)>127&&(o=u);break;case 3:f=t[n+1],c=t[n+2],128==(192&f)&&128==(192&c)&&(u=(15&a)<<12|(63&f)<<6|63&c)>2047&&(u<55296||u>57343)&&(o=u);break;case 4:f=t[n+1],c=t[n+2],h=t[n+3],128==(192&f)&&128==(192&c)&&128==(192&h)&&(u=(15&a)<<18|(63&f)<<12|(63&c)<<6|63&h)>65535&&u<1114112&&(o=u)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,i.push(o>>>10&1023|55296),o=56320|1023&o),i.push(o),n+=s}return I(i)}function I(t){var e=t.length;if(e<=$)return String.fromCharCode.apply(String,t);for(var r="",i=0;i<e;)r+=String.fromCharCode.apply(String,t.slice(i,i+=$));return r}function M(t,e,r){var i="";r=Math.min(t.length,r);for(var n=e;n<r;++n)i+=String.fromCharCode(127&t[n]);return i}function x(t,e,r){var i="";r=Math.min(t.length,r);for(var n=e;n<r;++n)i+=String.fromCharCode(t[n]);return i}function L(t,e,r){var i=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>i)&&(r=i);for(var n="",a=e;a<r;++a)n+=z(t[a]);return n}function O(t,e,r){for(var i=t.slice(e,r),n="",a=0;a<i.length;a+=2)n+=String.fromCharCode(i[a]+256*i[a+1]);return n}function C(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function P(t,e,r,i,n,o){if(!a.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>n||e<o)throw new RangeError('"value" argument is out of bounds');if(r+i>t.length)throw new RangeError("Index out of range")}function B(t,e,r,i){e<0&&(e=65535+e+1);for(var n=0,a=Math.min(t.length-r,2);n<a;++n)t[r+n]=(e&255<<8*(i?n:1-n))>>>8*(i?n:1-n)}function N(t,e,r,i){e<0&&(e=4294967295+e+1);for(var n=0,a=Math.min(t.length-r,4);n<a;++n)t[r+n]=e>>>8*(i?n:3-n)&255}function F(t,e,r,i,n,a){if(r+i>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(t,e,r,i,n){return n||F(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),J.write(t,e,r,i,23,4),r+4}function j(t,e,r,i,n){return n||F(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),J.write(t,e,r,i,52,8),r+8}function G(t){if(t=K(t).replace(tt,""),t.length<2)return"";for(;t.length%4!=0;)t+="=";return t}function K(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function z(t){return t<16?"0"+t.toString(16):t.toString(16)}function H(t,e){e=e||1/0;for(var r,i=t.length,n=null,a=[],o=0;o<i;++o){if((r=t.charCodeAt(o))>55295&&r<57344){if(!n){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(o+1===i){(e-=3)>-1&&a.push(239,191,189);continue}n=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&(e-=3)>-1&&a.push(239,191,189);if(n=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function q(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}function V(t,e){for(var r,i,n,a=[],o=0;o<t.length&&!((e-=2)<0);++o)r=t.charCodeAt(o),i=r>>8,n=r%256,a.push(n),a.push(i);return a}function W(t){return Z.toByteArray(G(t))}function Y(t,e,r,i){for(var n=0;n<i&&!(n+r>=e.length||n>=t.length);++n)e[n+r]=t[n];return n}function X(t){return t!==t}/*!
  2. * The buffer module from node.js, for the browser.
  3. *
  4. * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
  5. * @license MIT
  6. */
  7. var Z=r(118),J=r(119),Q=r(63);e.Buffer=a,e.SlowBuffer=b,e.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=i(),a.poolSize=8192,a._augment=function(t){return t.__proto__=a.prototype,t},a.from=function(t,e,r){return o(null,t,e,r)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(t,e,r){return f(null,t,e,r)},a.allocUnsafe=function(t){return c(null,t)},a.allocUnsafeSlow=function(t){return c(null,t)},a.isBuffer=function(t){return!(null==t||!t._isBuffer)},a.compare=function(t,e){if(!a.isBuffer(t)||!a.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,i=e.length,n=0,o=Math.min(r,i);n<o;++n)if(t[n]!==e[n]){r=t[n],i=e[n];break}return r<i?-1:i<r?1:0},a.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}},a.concat=function(t,e){if(!Q(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return a.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var i=a.allocUnsafe(e),n=0;for(r=0;r<t.length;++r){var o=t[r];if(!a.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(i,n),n+=o.length}return i},a.byteLength=g,a.prototype._isBuffer=!0,a.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)y(this,e,e+1);return this},a.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)y(this,e,e+3),y(this,e+1,e+2);return this},a.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)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},a.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?D(this,0,t):v.apply(this,arguments)},a.prototype.equals=function(t){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===a.compare(this,t)},a.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},a.prototype.compare=function(t,e,r,i,n){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),e<0||r>t.length||i<0||n>this.length)throw new RangeError("out of range index");if(i>=n&&e>=r)return 0;if(i>=n)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,i>>>=0,n>>>=0,this===t)return 0;for(var o=n-i,s=r-e,f=Math.min(o,s),c=this.slice(i,n),h=t.slice(e,r),u=0;u<f;++u)if(c[u]!==h[u]){o=c[u],s=h[u];break}return o<s?-1:s<o?1:0},a.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},a.prototype.indexOf=function(t,e,r){return m(this,t,e,r,!0)},a.prototype.lastIndexOf=function(t,e,r){return m(this,t,e,r,!1)},a.prototype.write=function(t,e,r,i){if(void 0===e)i="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)i=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===i&&(i="utf8")):(i=r,r=void 0)}var n=this.length-e;if((void 0===r||r>n)&&(r=n),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var a=!1;;)switch(i){case"hex":return w(this,t,e,r);case"utf8":case"utf-8":return S(this,t,e,r);case"ascii":return E(this,t,e,r);case"latin1":case"binary":return A(this,t,e,r);case"base64":return T(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,e,r);default:if(a)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),a=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var $=4096;a.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);var i;if(a.TYPED_ARRAY_SUPPORT)i=this.subarray(t,e),i.__proto__=a.prototype;else{var n=e-t;i=new a(n,void 0);for(var o=0;o<n;++o)i[o]=this[o+t]}return i},a.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||C(t,e,this.length);for(var i=this[t],n=1,a=0;++a<e&&(n*=256);)i+=this[t+a]*n;return i},a.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||C(t,e,this.length);for(var i=this[t+--e],n=1;e>0&&(n*=256);)i+=this[t+--e]*n;return i},a.prototype.readUInt8=function(t,e){return e||C(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,e){return e||C(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,e){return e||C(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,e){return e||C(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUInt32BE=function(t,e){return e||C(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||C(t,e,this.length);for(var i=this[t],n=1,a=0;++a<e&&(n*=256);)i+=this[t+a]*n;return n*=128,i>=n&&(i-=Math.pow(2,8*e)),i},a.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||C(t,e,this.length);for(var i=e,n=1,a=this[t+--i];i>0&&(n*=256);)a+=this[t+--i]*n;return n*=128,a>=n&&(a-=Math.pow(2,8*e)),a},a.prototype.readInt8=function(t,e){return e||C(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,e){e||C(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(t,e){e||C(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(t,e){return e||C(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return e||C(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,e){return e||C(t,4,this.length),J.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return e||C(t,4,this.length),J.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return e||C(t,8,this.length),J.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return e||C(t,8,this.length),J.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,e,r,i){if(t=+t,e|=0,r|=0,!i){P(this,t,e,r,Math.pow(2,8*r)-1,0)}var n=1,a=0;for(this[e]=255&t;++a<r&&(n*=256);)this[e+a]=t/n&255;return e+r},a.prototype.writeUIntBE=function(t,e,r,i){if(t=+t,e|=0,r|=0,!i){P(this,t,e,r,Math.pow(2,8*r)-1,0)}var n=r-1,a=1;for(this[e+n]=255&t;--n>=0&&(a*=256);)this[e+n]=t/a&255;return e+r},a.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||P(this,t,e,1,255,0),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},a.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||P(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):B(this,t,e,!0),e+2},a.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||P(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):B(this,t,e,!1),e+2},a.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||P(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):N(this,t,e,!0),e+4},a.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||P(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):N(this,t,e,!1),e+4},a.prototype.writeIntLE=function(t,e,r,i){if(t=+t,e|=0,!i){var n=Math.pow(2,8*r-1);P(this,t,e,r,n-1,-n)}var a=0,o=1,s=0;for(this[e]=255&t;++a<r&&(o*=256);)t<0&&0===s&&0!==this[e+a-1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+r},a.prototype.writeIntBE=function(t,e,r,i){if(t=+t,e|=0,!i){var n=Math.pow(2,8*r-1);P(this,t,e,r,n-1,-n)}var a=r-1,o=1,s=0;for(this[e+a]=255&t;--a>=0&&(o*=256);)t<0&&0===s&&0!==this[e+a+1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+r},a.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||P(this,t,e,1,127,-128),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||P(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):B(this,t,e,!0),e+2},a.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||P(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):B(this,t,e,!1),e+2},a.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||P(this,t,e,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):N(this,t,e,!0),e+4},a.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||P(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):N(this,t,e,!1),e+4},a.prototype.writeFloatLE=function(t,e,r){return U(this,t,e,!0,r)},a.prototype.writeFloatBE=function(t,e,r){return U(this,t,e,!1,r)},a.prototype.writeDoubleLE=function(t,e,r){return j(this,t,e,!0,r)},a.prototype.writeDoubleBE=function(t,e,r){return j(this,t,e,!1,r)},a.prototype.copy=function(t,e,r,i){if(r||(r=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<r&&(i=r),i===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-r&&(i=t.length-e+r);var n,o=i-r;if(this===t&&r<e&&e<i)for(n=o-1;n>=0;--n)t[n+e]=this[n+r];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(n=0;n<o;++n)t[n+e]=this[n+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},a.prototype.fill=function(t,e,r,i){if("string"==typeof t){if("string"==typeof e?(i=e,e=0,r=this.length):"string"==typeof r&&(i=r,r=this.length),1===t.length){var n=t.charCodeAt(0);n<256&&(t=n)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!a.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0);var o;if("number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var s=a.isBuffer(t)?t:H(new a(t,i).toString()),f=s.length;for(o=0;o<r-e;++o)this[o+e]=s[o%f]}return this};var tt=/[^+\/0-9A-Za-z-_]/g}).call(e,r(13))},function(t,e,r){"use strict";var i={MEDIA_ATTACHING:"hlsMediaAttaching",MEDIA_ATTACHED:"hlsMediaAttached",MEDIA_DETACHING:"hlsMediaDetaching",MEDIA_DETACHED:"hlsMediaDetached",BUFFER_RESET:"hlsBufferReset",BUFFER_CODECS:"hlsBufferCodecs",BUFFER_CREATED:"hlsBufferCreated",BUFFER_APPENDING:"hlsBufferAppending",BUFFER_APPENDED:"hlsBufferAppended",BUFFER_EOS:"hlsBufferEos",BUFFER_FLUSHING:"hlsBufferFlushing",BUFFER_FLUSHED:"hlsBufferFlushed",MANIFEST_LOADING:"hlsManifestLoading",MANIFEST_LOADED:"hlsManifestLoaded",MANIFEST_PARSED:"hlsManifestParsed",LEVEL_SWITCHING:"hlsLevelSwitching",LEVEL_SWITCHED:"hlsLevelSwitched",LEVEL_LOADING:"hlsLevelLoading",LEVEL_LOADED:"hlsLevelLoaded",LEVEL_UPDATED:"hlsLevelUpdated",LEVEL_PTS_UPDATED:"hlsLevelPtsUpdated",AUDIO_TRACKS_UPDATED:"hlsAudioTracksUpdated",AUDIO_TRACK_SWITCHING:"hlsAudioTrackSwitching",AUDIO_TRACK_SWITCHED:"hlsAudioTrackSwitched",AUDIO_TRACK_LOADING:"hlsAudioTrackLoading",AUDIO_TRACK_LOADED:"hlsAudioTrackLoaded",SUBTITLE_TRACKS_UPDATED:"hlsSubtitleTracksUpdated",SUBTITLE_TRACK_SWITCH:"hlsSubtitleTrackSwitch",SUBTITLE_TRACK_LOADING:"hlsSubtitleTrackLoading",SUBTITLE_TRACK_LOADED:"hlsSubtitleTrackLoaded",SUBTITLE_FRAG_PROCESSED:"hlsSubtitleFragProcessed",INIT_PTS_FOUND:"hlsInitPtsFound",FRAG_LOADING:"hlsFragLoading",FRAG_LOAD_PROGRESS:"hlsFragLoadProgress",FRAG_LOAD_EMERGENCY_ABORTED:"hlsFragLoadEmergencyAborted",FRAG_LOADED:"hlsFragLoaded",FRAG_DECRYPTED:"hlsFragDecrypted",FRAG_PARSING_INIT_SEGMENT:"hlsFragParsingInitSegment",FRAG_PARSING_USERDATA:"hlsFragParsingUserdata",FRAG_PARSING_METADATA:"hlsFragParsingMetadata",FRAG_PARSING_DATA:"hlsFragParsingData",FRAG_PARSED:"hlsFragParsed",FRAG_BUFFERED:"hlsFragBuffered",FRAG_CHANGED:"hlsFragChanged",FPS_DROP:"hlsFpsDrop",FPS_DROP_LEVEL_CAPPING:"hlsFpsDropLevelCapping",ERROR:"hlsError",DESTROYING:"hlsDestroying",KEY_LOADING:"hlsKeyLoading",KEY_LOADED:"hlsKeyLoaded",STREAM_STATE_TRANSITION:"hlsStreamStateTransition",DEFAULT_BANDWIDTH:"hlsDefaultBandWidth"};e.a=i},function(t,e,r){(function(t){!function(t,e){"use strict";function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function a(t,e,r){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}function o(t,e,r){for(var i=0,n=Math.min(t.length,r),a=e;a<n;a++){var o=t.charCodeAt(a)-48;i<<=4,i|=o>=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return i}function s(t,e,r,i){for(var n=0,a=Math.min(t.length,r),o=e;o<a;o++){var s=t.charCodeAt(o)-48;n*=i,n+=s>=49?s-49+10:s>=17?s-17+10:s}return n}function f(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var i=r/26|0,n=r%26;e[r]=(t.words[i]&1<<n)>>>n}return e}function c(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],a=0|e.words[0],o=n*a,s=67108863&o,f=o/67108864|0;r.words[0]=s;for(var c=1;c<i;c++){for(var h=f>>>26,u=67108863&f,d=Math.min(c,e.length-1),l=Math.max(0,c-t.length+1);l<=d;l++){var p=c-l|0;n=0|t.words[p],a=0|e.words[l],o=n*a+u,h+=o/67108864|0,u=67108863&o}r.words[c]=0|u,f=0|h}return 0!==f?r.words[c]=0|f:r.length--,r.strip()}function h(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,a=0;a<r.length-1;a++){var o=n;n=0;for(var s=67108863&i,f=Math.min(a,e.length-1),c=Math.max(0,a-t.length+1);c<=f;c++){var h=a-c,u=0|t.words[h],d=0|e.words[c],l=u*d,p=67108863&l;o=o+(l/67108864|0)|0,p=p+s|0,s=67108863&p,o=o+(p>>>26)|0,n+=o>>>26,o&=67108863}r.words[a]=s,i=o,o=n}return 0!==i?r.words[a]=i:r.length--,r.strip()}function u(t,e,r){return(new d).mulp(t,e,r)}function d(t,e){this.x=t,this.y=e}function l(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function p(){l.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){l.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function g(){l.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function v(){l.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function y(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function m(t){y.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}"object"==typeof t?t.exports=a:e.BN=a,a.BN=a,a.wordSize=26;var _;try{_=r(160).Buffer}catch(t){}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36),t=t.toString().replace(/\s+/g,"");var n=0;"-"===t[0]&&n++,16===e?this._parseHex(t,n):this._parseBase(t,e,n),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var a,o,s=0;if("be"===r)for(n=t.length-1,a=0;n>=0;n-=3)o=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===r)for(n=0,a=0;n<t.length;n+=3)o=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,n,a=0;for(r=t.length-6,i=0;r>=e;r-=6)n=o(t,r,r+6),this.words[i]|=n<<a&67108863,this.words[i+1]|=n>>>26-a&4194303,(a+=24)>=26&&(a-=26,i++);r+6!==e&&(n=o(t,e,r+6),this.words[i]|=n<<a&67108863,this.words[i+1]|=n>>>26-a&4194303),this.strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var a=t.length-r,o=a%i,f=Math.min(a,a-o)+r,c=0,h=r;h<f;h+=i)c=s(t,h,h+i,e),this.imuln(n),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==o){var u=1;for(c=s(t,h,t.length,e),h=0;h<o;h++)u*=e;this.imuln(u),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}},a.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},a.prototype.clone=function(){var t=new a(null);return this.copy(t),t},a.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var w=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],S=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],E=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];a.prototype.toString=function(t,e){t=t||10,e=0|e||1;var r;if(16===t||"hex"===t){r="";for(var n=0,a=0,o=0;o<this.length;o++){var s=this.words[o],f=(16777215&(s<<n|a)).toString(16);a=s>>>24-n&16777215,r=0!==a||o!==this.length-1?w[6-f.length]+f+r:f+r,n+=2,n>=26&&(n-=26,o--)}for(0!==a&&(r=a.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var c=S[t],h=E[t];r="";var u=this.clone();for(u.negative=0;!u.isZero();){var d=u.modn(h).toString(t);u=u.idivn(h),r=u.isZero()?d+r:w[c-d.length]+d+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return i(void 0!==_),this.toArrayLike(_,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),a=r||Math.max(1,n);i(n<=a,"byte array longer than desired length"),i(a>0,"Requested array length <= 0"),this.strip();var o,s,f="le"===e,c=new t(a),h=this.clone();if(f){for(s=0;!h.isZero();s++)o=h.andln(255),h.iushrn(8),c[s]=o;for(;s<a;s++)c[s]=0}else{for(s=0;s<a-n;s++)c[s]=0;for(s=0;!h.isZero();s++)o=h.andln(255),h.iushrn(8),c[a-s-1]=o}return c},Math.clz32?a.prototype._countBits=function(t){return 32-Math.clz32(t)}:a.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},a.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},a.prototype.ior=function(t){return i(0==(this.negative|t.negative)),this.iuor(t)},a.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},a.prototype.iand=function(t){return i(0==(this.negative|t.negative)),this.iuand(t)},a.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;i<r.length;i++)this.words[i]=e.words[i]^r.words[i];if(this!==e)for(;i<e.length;i++)this.words[i]=e.words[i];return this.length=e.length,this.strip()},a.prototype.ixor=function(t){return i(0==(this.negative|t.negative)),this.iuxor(t)},a.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},a.prototype.iadd=function(t){var e;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();var r,i;this.length>t.length?(r=this,i=t):(r=t,i=this);for(var n=0,a=0;a<i.length;a++)e=(0|r.words[a])+(0|i.words[a])+n,this.words[a]=67108863&e,n=e>>>26;for(;0!==n&&a<r.length;a++)e=(0|r.words[a])+n,this.words[a]=67108863&e,n=e>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;var i,n;r>0?(i=this,n=t):(i=t,n=this);for(var a=0,o=0;o<n.length;o++)e=(0|i.words[o])-(0|n.words[o])+a,a=e>>26,this.words[o]=67108863&e;for(;0!==a&&o<i.length;o++)e=(0|i.words[o])+a,a=e>>26,this.words[o]=67108863&e;if(0===a&&o<i.length&&i!==this)for(;o<i.length;o++)this.words[o]=i.words[o];return this.length=Math.max(this.length,o),i!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(t){return this.clone().isub(t)};var A=function(t,e,r){var i,n,a,o=t.words,s=e.words,f=r.words,c=0,h=0|o[0],u=8191&h,d=h>>>13,l=0|o[1],p=8191&l,b=l>>>13,g=0|o[2],v=8191&g,y=g>>>13,m=0|o[3],_=8191&m,w=m>>>13,S=0|o[4],E=8191&S,A=S>>>13,T=0|o[5],R=8191&T,k=T>>>13,D=0|o[6],I=8191&D,M=D>>>13,x=0|o[7],L=8191&x,O=x>>>13,C=0|o[8],P=8191&C,B=C>>>13,N=0|o[9],F=8191&N,U=N>>>13,j=0|s[0],G=8191&j,K=j>>>13,z=0|s[1],H=8191&z,q=z>>>13,V=0|s[2],W=8191&V,Y=V>>>13,X=0|s[3],Z=8191&X,J=X>>>13,Q=0|s[4],$=8191&Q,tt=Q>>>13,et=0|s[5],rt=8191&et,it=et>>>13,nt=0|s[6],at=8191&nt,ot=nt>>>13,st=0|s[7],ft=8191&st,ct=st>>>13,ht=0|s[8],ut=8191&ht,dt=ht>>>13,lt=0|s[9],pt=8191&lt,bt=lt>>>13;r.negative=t.negative^e.negative,r.length=19,i=Math.imul(u,G),n=Math.imul(u,K),n=n+Math.imul(d,G)|0,a=Math.imul(d,K);var gt=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,G),n=Math.imul(p,K),n=n+Math.imul(b,G)|0,a=Math.imul(b,K),i=i+Math.imul(u,H)|0,n=n+Math.imul(u,q)|0,n=n+Math.imul(d,H)|0,a=a+Math.imul(d,q)|0;var vt=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(v,G),n=Math.imul(v,K),n=n+Math.imul(y,G)|0,a=Math.imul(y,K),i=i+Math.imul(p,H)|0,n=n+Math.imul(p,q)|0,n=n+Math.imul(b,H)|0,a=a+Math.imul(b,q)|0,i=i+Math.imul(u,W)|0,n=n+Math.imul(u,Y)|0,n=n+Math.imul(d,W)|0,a=a+Math.imul(d,Y)|0;var yt=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(_,G),n=Math.imul(_,K),n=n+Math.imul(w,G)|0,a=Math.imul(w,K),i=i+Math.imul(v,H)|0,n=n+Math.imul(v,q)|0,n=n+Math.imul(y,H)|0,a=a+Math.imul(y,q)|0,i=i+Math.imul(p,W)|0,n=n+Math.imul(p,Y)|0,n=n+Math.imul(b,W)|0,a=a+Math.imul(b,Y)|0,i=i+Math.imul(u,Z)|0,n=n+Math.imul(u,J)|0,n=n+Math.imul(d,Z)|0,a=a+Math.imul(d,J)|0;var mt=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(mt>>>26)|0,mt&=67108863,i=Math.imul(E,G),n=Math.imul(E,K),n=n+Math.imul(A,G)|0,a=Math.imul(A,K),i=i+Math.imul(_,H)|0,n=n+Math.imul(_,q)|0,n=n+Math.imul(w,H)|0,a=a+Math.imul(w,q)|0,i=i+Math.imul(v,W)|0,n=n+Math.imul(v,Y)|0,n=n+Math.imul(y,W)|0,a=a+Math.imul(y,Y)|0,i=i+Math.imul(p,Z)|0,n=n+Math.imul(p,J)|0,n=n+Math.imul(b,Z)|0,a=a+Math.imul(b,J)|0,i=i+Math.imul(u,$)|0,n=n+Math.imul(u,tt)|0,n=n+Math.imul(d,$)|0,a=a+Math.imul(d,tt)|0;var _t=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(R,G),n=Math.imul(R,K),n=n+Math.imul(k,G)|0,a=Math.imul(k,K),i=i+Math.imul(E,H)|0,n=n+Math.imul(E,q)|0,n=n+Math.imul(A,H)|0,a=a+Math.imul(A,q)|0,i=i+Math.imul(_,W)|0,n=n+Math.imul(_,Y)|0,n=n+Math.imul(w,W)|0,a=a+Math.imul(w,Y)|0,i=i+Math.imul(v,Z)|0,n=n+Math.imul(v,J)|0,n=n+Math.imul(y,Z)|0,a=a+Math.imul(y,J)|0,i=i+Math.imul(p,$)|0,n=n+Math.imul(p,tt)|0,n=n+Math.imul(b,$)|0,a=a+Math.imul(b,tt)|0,i=i+Math.imul(u,rt)|0,n=n+Math.imul(u,it)|0,n=n+Math.imul(d,rt)|0,a=a+Math.imul(d,it)|0;var wt=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(I,G),n=Math.imul(I,K),n=n+Math.imul(M,G)|0,a=Math.imul(M,K),i=i+Math.imul(R,H)|0,n=n+Math.imul(R,q)|0,n=n+Math.imul(k,H)|0,a=a+Math.imul(k,q)|0,i=i+Math.imul(E,W)|0,n=n+Math.imul(E,Y)|0,n=n+Math.imul(A,W)|0,a=a+Math.imul(A,Y)|0,i=i+Math.imul(_,Z)|0,n=n+Math.imul(_,J)|0,n=n+Math.imul(w,Z)|0,a=a+Math.imul(w,J)|0,i=i+Math.imul(v,$)|0,n=n+Math.imul(v,tt)|0,n=n+Math.imul(y,$)|0,a=a+Math.imul(y,tt)|0,i=i+Math.imul(p,rt)|0,n=n+Math.imul(p,it)|0,n=n+Math.imul(b,rt)|0,a=a+Math.imul(b,it)|0,i=i+Math.imul(u,at)|0,n=n+Math.imul(u,ot)|0,n=n+Math.imul(d,at)|0,a=a+Math.imul(d,ot)|0;var St=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(L,G),n=Math.imul(L,K),n=n+Math.imul(O,G)|0,a=Math.imul(O,K),i=i+Math.imul(I,H)|0,n=n+Math.imul(I,q)|0,n=n+Math.imul(M,H)|0,a=a+Math.imul(M,q)|0,i=i+Math.imul(R,W)|0,n=n+Math.imul(R,Y)|0,n=n+Math.imul(k,W)|0,a=a+Math.imul(k,Y)|0,i=i+Math.imul(E,Z)|0,n=n+Math.imul(E,J)|0,n=n+Math.imul(A,Z)|0,a=a+Math.imul(A,J)|0,i=i+Math.imul(_,$)|0,n=n+Math.imul(_,tt)|0,n=n+Math.imul(w,$)|0,a=a+Math.imul(w,tt)|0,i=i+Math.imul(v,rt)|0,n=n+Math.imul(v,it)|0,n=n+Math.imul(y,rt)|0,a=a+Math.imul(y,it)|0,i=i+Math.imul(p,at)|0,n=n+Math.imul(p,ot)|0,n=n+Math.imul(b,at)|0,a=a+Math.imul(b,ot)|0,i=i+Math.imul(u,ft)|0,n=n+Math.imul(u,ct)|0,n=n+Math.imul(d,ft)|0,a=a+Math.imul(d,ct)|0;var Et=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(P,G),n=Math.imul(P,K),n=n+Math.imul(B,G)|0,a=Math.imul(B,K),i=i+Math.imul(L,H)|0,n=n+Math.imul(L,q)|0,n=n+Math.imul(O,H)|0,a=a+Math.imul(O,q)|0,i=i+Math.imul(I,W)|0,n=n+Math.imul(I,Y)|0,n=n+Math.imul(M,W)|0,a=a+Math.imul(M,Y)|0,i=i+Math.imul(R,Z)|0,n=n+Math.imul(R,J)|0,n=n+Math.imul(k,Z)|0,a=a+Math.imul(k,J)|0,i=i+Math.imul(E,$)|0,n=n+Math.imul(E,tt)|0,n=n+Math.imul(A,$)|0,a=a+Math.imul(A,tt)|0,i=i+Math.imul(_,rt)|0,n=n+Math.imul(_,it)|0,n=n+Math.imul(w,rt)|0,a=a+Math.imul(w,it)|0,i=i+Math.imul(v,at)|0,n=n+Math.imul(v,ot)|0,n=n+Math.imul(y,at)|0,a=a+Math.imul(y,ot)|0,i=i+Math.imul(p,ft)|0,n=n+Math.imul(p,ct)|0,n=n+Math.imul(b,ft)|0,a=a+Math.imul(b,ct)|0,i=i+Math.imul(u,ut)|0,n=n+Math.imul(u,dt)|0,n=n+Math.imul(d,ut)|0,a=a+Math.imul(d,dt)|0;var At=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(F,G),n=Math.imul(F,K),n=n+Math.imul(U,G)|0,a=Math.imul(U,K),i=i+Math.imul(P,H)|0,n=n+Math.imul(P,q)|0,n=n+Math.imul(B,H)|0,a=a+Math.imul(B,q)|0,i=i+Math.imul(L,W)|0,n=n+Math.imul(L,Y)|0,n=n+Math.imul(O,W)|0,a=a+Math.imul(O,Y)|0,i=i+Math.imul(I,Z)|0,n=n+Math.imul(I,J)|0,n=n+Math.imul(M,Z)|0,a=a+Math.imul(M,J)|0,i=i+Math.imul(R,$)|0,n=n+Math.imul(R,tt)|0,n=n+Math.imul(k,$)|0,a=a+Math.imul(k,tt)|0,i=i+Math.imul(E,rt)|0,n=n+Math.imul(E,it)|0,n=n+Math.imul(A,rt)|0,a=a+Math.imul(A,it)|0,i=i+Math.imul(_,at)|0,n=n+Math.imul(_,ot)|0,n=n+Math.imul(w,at)|0,a=a+Math.imul(w,ot)|0,i=i+Math.imul(v,ft)|0,n=n+Math.imul(v,ct)|0,n=n+Math.imul(y,ft)|0,a=a+Math.imul(y,ct)|0,i=i+Math.imul(p,ut)|0,n=n+Math.imul(p,dt)|0,n=n+Math.imul(b,ut)|0,a=a+Math.imul(b,dt)|0,i=i+Math.imul(u,pt)|0,n=n+Math.imul(u,bt)|0,n=n+Math.imul(d,pt)|0,a=a+Math.imul(d,bt)|0;var Tt=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(F,H),n=Math.imul(F,q),n=n+Math.imul(U,H)|0,a=Math.imul(U,q),i=i+Math.imul(P,W)|0,n=n+Math.imul(P,Y)|0,n=n+Math.imul(B,W)|0,a=a+Math.imul(B,Y)|0,i=i+Math.imul(L,Z)|0,n=n+Math.imul(L,J)|0,n=n+Math.imul(O,Z)|0,a=a+Math.imul(O,J)|0,i=i+Math.imul(I,$)|0,n=n+Math.imul(I,tt)|0,n=n+Math.imul(M,$)|0,a=a+Math.imul(M,tt)|0,i=i+Math.imul(R,rt)|0,n=n+Math.imul(R,it)|0,n=n+Math.imul(k,rt)|0,a=a+Math.imul(k,it)|0,i=i+Math.imul(E,at)|0,n=n+Math.imul(E,ot)|0,n=n+Math.imul(A,at)|0,a=a+Math.imul(A,ot)|0,i=i+Math.imul(_,ft)|0,n=n+Math.imul(_,ct)|0,n=n+Math.imul(w,ft)|0,a=a+Math.imul(w,ct)|0,i=i+Math.imul(v,ut)|0,n=n+Math.imul(v,dt)|0,n=n+Math.imul(y,ut)|0,a=a+Math.imul(y,dt)|0,i=i+Math.imul(p,pt)|0,n=n+Math.imul(p,bt)|0,n=n+Math.imul(b,pt)|0,a=a+Math.imul(b,bt)|0;var Rt=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,i=Math.imul(F,W),n=Math.imul(F,Y),n=n+Math.imul(U,W)|0,a=Math.imul(U,Y),i=i+Math.imul(P,Z)|0,n=n+Math.imul(P,J)|0,n=n+Math.imul(B,Z)|0,a=a+Math.imul(B,J)|0,i=i+Math.imul(L,$)|0,n=n+Math.imul(L,tt)|0,n=n+Math.imul(O,$)|0,a=a+Math.imul(O,tt)|0,i=i+Math.imul(I,rt)|0,n=n+Math.imul(I,it)|0,n=n+Math.imul(M,rt)|0,a=a+Math.imul(M,it)|0,i=i+Math.imul(R,at)|0,n=n+Math.imul(R,ot)|0,n=n+Math.imul(k,at)|0,a=a+Math.imul(k,ot)|0,i=i+Math.imul(E,ft)|0,n=n+Math.imul(E,ct)|0,n=n+Math.imul(A,ft)|0,a=a+Math.imul(A,ct)|0,i=i+Math.imul(_,ut)|0,n=n+Math.imul(_,dt)|0,n=n+Math.imul(w,ut)|0,a=a+Math.imul(w,dt)|0,i=i+Math.imul(v,pt)|0,n=n+Math.imul(v,bt)|0,n=n+Math.imul(y,pt)|0,a=a+Math.imul(y,bt)|0;var kt=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(F,Z),n=Math.imul(F,J),n=n+Math.imul(U,Z)|0,a=Math.imul(U,J),i=i+Math.imul(P,$)|0,n=n+Math.imul(P,tt)|0,n=n+Math.imul(B,$)|0,a=a+Math.imul(B,tt)|0,i=i+Math.imul(L,rt)|0,n=n+Math.imul(L,it)|0,n=n+Math.imul(O,rt)|0,a=a+Math.imul(O,it)|0,i=i+Math.imul(I,at)|0,n=n+Math.imul(I,ot)|0,n=n+Math.imul(M,at)|0,a=a+Math.imul(M,ot)|0,i=i+Math.imul(R,ft)|0,n=n+Math.imul(R,ct)|0,n=n+Math.imul(k,ft)|0,a=a+Math.imul(k,ct)|0,i=i+Math.imul(E,ut)|0,n=n+Math.imul(E,dt)|0,n=n+Math.imul(A,ut)|0,a=a+Math.imul(A,dt)|0,i=i+Math.imul(_,pt)|0,n=n+Math.imul(_,bt)|0,n=n+Math.imul(w,pt)|0,a=a+Math.imul(w,bt)|0;var Dt=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,i=Math.imul(F,$),n=Math.imul(F,tt),n=n+Math.imul(U,$)|0,a=Math.imul(U,tt),i=i+Math.imul(P,rt)|0,n=n+Math.imul(P,it)|0,n=n+Math.imul(B,rt)|0,a=a+Math.imul(B,it)|0,i=i+Math.imul(L,at)|0,n=n+Math.imul(L,ot)|0,n=n+Math.imul(O,at)|0,a=a+Math.imul(O,ot)|0,i=i+Math.imul(I,ft)|0,n=n+Math.imul(I,ct)|0,n=n+Math.imul(M,ft)|0,a=a+Math.imul(M,ct)|0,i=i+Math.imul(R,ut)|0,n=n+Math.imul(R,dt)|0,n=n+Math.imul(k,ut)|0,a=a+Math.imul(k,dt)|0,i=i+Math.imul(E,pt)|0,n=n+Math.imul(E,bt)|0,n=n+Math.imul(A,pt)|0,a=a+Math.imul(A,bt)|0;var It=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(F,rt),n=Math.imul(F,it),n=n+Math.imul(U,rt)|0,a=Math.imul(U,it),i=i+Math.imul(P,at)|0,n=n+Math.imul(P,ot)|0,n=n+Math.imul(B,at)|0,a=a+Math.imul(B,ot)|0,i=i+Math.imul(L,ft)|0,n=n+Math.imul(L,ct)|0,n=n+Math.imul(O,ft)|0,a=a+Math.imul(O,ct)|0,i=i+Math.imul(I,ut)|0,n=n+Math.imul(I,dt)|0,n=n+Math.imul(M,ut)|0,a=a+Math.imul(M,dt)|0,i=i+Math.imul(R,pt)|0,n=n+Math.imul(R,bt)|0,n=n+Math.imul(k,pt)|0,a=a+Math.imul(k,bt)|0;var Mt=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(F,at),n=Math.imul(F,ot),n=n+Math.imul(U,at)|0,a=Math.imul(U,ot),i=i+Math.imul(P,ft)|0,n=n+Math.imul(P,ct)|0,n=n+Math.imul(B,ft)|0,a=a+Math.imul(B,ct)|0,i=i+Math.imul(L,ut)|0,n=n+Math.imul(L,dt)|0,n=n+Math.imul(O,ut)|0,a=a+Math.imul(O,dt)|0,i=i+Math.imul(I,pt)|0,n=n+Math.imul(I,bt)|0,n=n+Math.imul(M,pt)|0,a=a+Math.imul(M,bt)|0;var xt=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,i=Math.imul(F,ft),n=Math.imul(F,ct),n=n+Math.imul(U,ft)|0,a=Math.imul(U,ct),i=i+Math.imul(P,ut)|0,n=n+Math.imul(P,dt)|0,n=n+Math.imul(B,ut)|0,a=a+Math.imul(B,dt)|0,i=i+Math.imul(L,pt)|0,n=n+Math.imul(L,bt)|0,n=n+Math.imul(O,pt)|0,a=a+Math.imul(O,bt)|0;var Lt=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,i=Math.imul(F,ut),n=Math.imul(F,dt),n=n+Math.imul(U,ut)|0,a=Math.imul(U,dt),i=i+Math.imul(P,pt)|0,n=n+Math.imul(P,bt)|0,n=n+Math.imul(B,pt)|0,a=a+Math.imul(B,bt)|0;var Ot=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,i=Math.imul(F,pt),n=Math.imul(F,bt),n=n+Math.imul(U,pt)|0,a=Math.imul(U,bt);var Ct=(c+i|0)+((8191&n)<<13)|0;return c=(a+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,f[0]=gt,f[1]=vt,f[2]=yt,f[3]=mt,f[4]=_t,f[5]=wt,f[6]=St,f[7]=Et,f[8]=At,f[9]=Tt,f[10]=Rt,f[11]=kt,f[12]=Dt,f[13]=It,f[14]=Mt,f[15]=xt,f[16]=Lt,f[17]=Ot,f[18]=Ct,0!==c&&(f[19]=c,r.length++),r};Math.imul||(A=c),a.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?A(this,t,e):r<63?c(this,t,e):r<1024?h(this,t,e):u(this,t,e)},d.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,i=0;i<t;i++)e[i]=this.revBin(i,r,t);return e},d.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var i=0,n=0;n<e;n++)i|=(1&t)<<e-n-1,t>>=1;return i},d.prototype.permute=function(t,e,r,i,n,a){for(var o=0;o<a;o++)i[o]=e[t[o]],n[o]=r[t[o]]},d.prototype.transform=function(t,e,r,i,n,a){this.permute(a,t,e,r,i,n);for(var o=1;o<n;o<<=1)for(var s=o<<1,f=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),h=0;h<n;h+=s)for(var u=f,d=c,l=0;l<o;l++){var p=r[h+l],b=i[h+l],g=r[h+l+o],v=i[h+l+o],y=u*g-d*v;v=u*v+d*g,g=y,r[h+l]=p+g,i[h+l]=b+v,r[h+l+o]=p-g,i[h+l+o]=b-v,l!==s&&(y=f*u-c*d,d=f*d+c*u,u=y)}},d.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),i=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+i},d.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=t[i];t[i]=t[r-i-1],t[r-i-1]=n,n=e[i],e[i]=-e[r-i-1],e[r-i-1]=-n}},d.prototype.normalize13b=function(t,e){for(var r=0,i=0;i<e/2;i++){var n=8192*Math.round(t[2*i+1]/e)+Math.round(t[2*i]/e)+r;t[i]=67108863&n,r=n<67108864?0:n/67108864|0}return t},d.prototype.convert13b=function(t,e,r,n){for(var a=0,o=0;o<e;o++)a+=0|t[o],r[2*o]=8191&a,a>>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*e;o<n;++o)r[o]=0;i(0===a),i(0==(-8192&a))},d.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},d.prototype.mulp=function(t,e,r){var i=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(i),a=this.stub(i),o=new Array(i),s=new Array(i),f=new Array(i),c=new Array(i),h=new Array(i),u=new Array(i),d=r.words;d.length=i,this.convert13b(t.words,t.length,o,i),this.convert13b(e.words,e.length,c,i),this.transform(o,a,s,f,i,n),this.transform(c,a,h,u,i,n);for(var l=0;l<i;l++){var p=s[l]*h[l]-f[l]*u[l];f[l]=s[l]*u[l]+f[l]*h[l],s[l]=p}return this.conjugate(s,f,i),this.transform(s,f,d,a,i,n),this.conjugate(d,a,i),this.normalize13b(d,i),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},a.prototype.mul=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},a.prototype.mulf=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),u(this,t,e)},a.prototype.imul=function(t){return this.clone().mulTo(t,this)},a.prototype.imuln=function(t){i("number"==typeof t),i(t<67108864);for(var e=0,r=0;r<this.length;r++){var n=(0|this.words[r])*t,a=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=a>>>26,this.words[r]=67108863&a}return 0!==e&&(this.words[r]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=f(t);if(0===e.length)return new a(1);for(var r=this,i=0;i<e.length&&0===e[i];i++,r=r.sqr());if(++i<e.length)for(var n=r.sqr();i<e.length;i++,n=n.sqr())0!==e[i]&&(r=r.mul(n));return r},a.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(e=0;e<this.length;e++){var s=this.words[e]&a,f=(0|this.words[e])-s<<r;this.words[e]=f|o,o=s>>>26-r}o&&(this.words[e]=o,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this.strip()},a.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},a.prototype.iushrn=function(t,e,r){i("number"==typeof t&&t>=0);var n;n=e?(e-e%26)/26:0;var a=t%26,o=Math.min((t-a)/26,this.length),s=67108863^67108863>>>a<<a,f=r;if(n-=o,n=Math.max(0,n),f){for(var c=0;c<o;c++)f.words[c]=this.words[c];f.length=o}if(0===o);else if(this.length>o)for(this.length-=o,c=0;c<this.length;c++)this.words[c]=this.words[c+o];else this.words[0]=0,this.length=1;var h=0;for(c=this.length-1;c>=0&&(0!==h||c>=n);c--){var u=0|this.words[c];this.words[c]=h<<26-a|u>>>a,h=u&s}return f&&0!==h&&(f.words[f.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r)&&!!(this.words[r]&n)},a.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},a.prototype.maskn=function(t){return this.clone().imaskn(t)},a.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},a.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},a.prototype.addn=function(t){return this.clone().iaddn(t)},a.prototype.subn=function(t){return this.clone().isubn(t)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(t,e,r){var n,a=t.length+r;this._expand(a);var o,s=0;for(n=0;n<t.length;n++){o=(0|this.words[n+r])+s;var f=(0|t.words[n])*e;o-=67108863&f,s=(o>>26)-(f/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)o=(0|this.words[n+r])+s,s=o>>26,this.words[n+r]=67108863&o;if(0===s)return this.strip();for(i(-1===s),s=0,n=0;n<this.length;n++)o=-(0|this.words[n])+s,s=o>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var r=this.length-t.length,i=this.clone(),n=t,o=0|n.words[n.length-1];0!==(r=26-this._countBits(o))&&(n=n.ushln(r),i.iushln(r),o=0|n.words[n.length-1]);var s,f=i.length-n.length;if("mod"!==e){s=new a(null),s.length=f+1,s.words=new Array(s.length);for(var c=0;c<s.length;c++)s.words[c]=0}var h=i.clone()._ishlnsubmul(n,1,f);0===h.negative&&(i=h,s&&(s.words[f]=1));for(var u=f-1;u>=0;u--){var d=67108864*(0|i.words[n.length+u])+(0|i.words[n.length+u-1]);for(d=Math.min(d/o|0,67108863),i._ishlnsubmul(n,d,u);0!==i.negative;)d--,i.negative=0,i._ishlnsubmul(n,1,u),i.isZero()||(i.negative^=1);s&&(s.words[u]=d)}return s&&s.strip(),i.strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:s||null,mod:i}},a.prototype.divmod=function(t,e,r){if(i(!t.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var n,o,s;return 0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(n=s.div.neg()),"div"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(t)),{div:n,mod:o}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(n=s.div.neg()),{div:n,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(t)),{div:s.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e)},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),a=r.cmp(i);return a<0||1===n&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},a.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new a(1),o=new a(0),s=new a(0),f=new a(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var h=r.clone(),u=e.clone();!e.isZero();){for(var d=0,l=1;0==(e.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(h),o.isub(u)),n.iushrn(1),o.iushrn(1);for(var p=0,b=1;0==(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||f.isOdd())&&(s.iadd(h),f.isub(u)),s.iushrn(1),f.iushrn(1);e.cmp(r)>=0?(e.isub(r),n.isub(s),o.isub(f)):(r.isub(e),s.isub(n),f.isub(o))}return{a:s,b:f,gcd:r.iushln(c)}},a.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new a(1),o=new a(0),s=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var f=0,c=1;0==(e.words[0]&c)&&f<26;++f,c<<=1);if(f>0)for(e.iushrn(f);f-- >0;)n.isOdd()&&n.iadd(s),n.iushrn(1);for(var h=0,u=1;0==(r.words[0]&u)&&h<26;++h,u<<=1);if(h>0)for(r.iushrn(h);h-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);e.cmp(r)>=0?(e.isub(r),n.isub(o)):(r.isub(e),o.isub(n))}var d;return d=0===e.cmpn(1)?n:o,d.cmpn(0)<0&&d.iadd(t),d},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var a=e;e=r,r=a}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var a=n,o=r;0!==a&&o<this.length;o++){var s=0|this.words[o];s+=a,a=s>>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e=t<0;if(0!==this.negative&&!e)return-1;if(0===this.negative&&e)return 1;this.strip();var r;if(this.length>1)r=1;else{e&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];r=n===t?0:n<t?-1:1}return 0!==this.negative?0|-r:r},a.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},a.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){i<n?e=-1:i>n&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new y(t)},a.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var T={k256:null,p224:null,p192:null,p25519:null};l.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},l.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),e=r.bitLength()}while(e>this.n);var i=e<this.n?-1:r.ucmp(this.p);return 0===i?(r.words[0]=0,r.length=1):i>0?r.isub(this.p):r.strip(),r},l.prototype.split=function(t,e){t.iushrn(this.n,0,e)},l.prototype.imulK=function(t){return t.imul(this.k)},n(p,l),p.prototype.split=function(t,e){for(var r=Math.min(t.length,9),i=0;i<r;i++)e.words[i]=t.words[i];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var n=t.words[9];for(e.words[e.length++]=4194303&n,i=10;i<t.length;i++){var a=0|t.words[i];t.words[i-10]=(4194303&a)<<4|n>>>22,n=a}n>>>=22,t.words[i-10]=n,0===n&&t.length>10?t.length-=10:t.length-=9},p.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var i=0|t.words[r];e+=977*i,t.words[r]=67108863&e,e=64*i+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},n(b,l),n(g,l),n(v,l),v.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var i=19*(0|t.words[r])+e,n=67108863&i;i>>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(T[t])return T[t];var e;if("k256"===t)e=new p;else if("p224"===t)e=new b;else if("p192"===t)e=new g;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new v}return T[t]=e,e},y.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},y.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},y.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},y.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},y.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},y.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},y.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},y.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},y.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},y.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},y.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},y.prototype.isqr=function(t){return this.imul(t,t.clone())},y.prototype.sqr=function(t){return this.mul(t,t)},y.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var n=this.m.subn(1),o=0;!n.isZero()&&0===n.andln(1);)o++,n.iushrn(1);i(!n.isZero());var s=new a(1).toRed(this),f=s.redNeg(),c=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new a(2*h*h).toRed(this);0!==this.pow(h,c).cmp(f);)h.redIAdd(f);for(var u=this.pow(h,n),d=this.pow(t,n.addn(1).iushrn(1)),l=this.pow(t,n),p=o;0!==l.cmp(s);){for(var b=l,g=0;0!==b.cmp(s);g++)b=b.redSqr();i(g<p);var v=this.pow(u,new a(1).iushln(p-g-1));d=d.redMul(v),u=v.redSqr(),l=l.redMul(u),p=g}return d},y.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},y.prototype.pow=function(t,e){if(e.isZero())return new a(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new a(1).toRed(this),r[1]=t;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],t);var n=r[0],o=0,s=0,f=e.bitLength()%26;for(0===f&&(f=26),i=e.length-1;i>=0;i--){for(var c=e.words[i],h=f-1;h>=0;h--){var u=c>>h&1;n!==r[0]&&(n=this.sqr(n)),0!==u||0!==o?(o<<=1,o|=u,(4===++s||0===i&&0===h)&&(n=this.mul(n,r[o]),s=0,o=0)):s=0}f=26}return n},y.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},y.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new m(t)},n(m,y),m.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},m.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},m.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},m.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},m.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)}).call(e,r(159)(t))},function(t,e,r){"use strict";r.d(e,"b",function(){return i}),r.d(e,"a",function(){return n});var i={NETWORK_ERROR:"networkError",MEDIA_ERROR:"mediaError",KEY_SYSTEM_ERROR:"keySystemError",MUX_ERROR:"muxError",OTHER_ERROR:"otherError"},n={KEY_SYSTEM_NO_KEYS:"keySystemNoKeys",KEY_SYSTEM_NO_ACCESS:"keySystemNoAccess",KEY_SYSTEM_NO_SESSION:"keySystemNoSession",KEY_SYSTEM_LICENSE_REQUEST_FAILED:"keySystemLicenseRequestFailed",MANIFEST_LOAD_ERROR:"manifestLoadError",MANIFEST_LOAD_TIMEOUT:"manifestLoadTimeOut",MANIFEST_PARSING_ERROR:"manifestParsingError",MANIFEST_INCOMPATIBLE_CODECS_ERROR:"manifestIncompatibleCodecsError",LEVEL_LOAD_ERROR:"levelLoadError",LEVEL_LOAD_TIMEOUT:"levelLoadTimeOut",LEVEL_SWITCH_ERROR:"levelSwitchError",AUDIO_TRACK_LOAD_ERROR:"audioTrackLoadError",AUDIO_TRACK_LOAD_TIMEOUT:"audioTrackLoadTimeOut",FRAG_LOAD_ERROR:"fragLoadError",FRAG_LOAD_TIMEOUT:"fragLoadTimeOut",FRAG_DECRYPT_ERROR:"fragDecryptError",FRAG_PARSING_ERROR:"fragParsingError",REMUX_ALLOC_ERROR:"remuxAllocError",KEY_LOAD_ERROR:"keyLoadError",KEY_LOAD_TIMEOUT:"keyLoadTimeOut",BUFFER_ADD_CODEC_ERROR:"bufferAddCodecError",BUFFER_APPEND_ERROR:"bufferAppendError",BUFFER_APPENDING_ERROR:"bufferAppendingError",BUFFER_STALLED_ERROR:"bufferStalledError",BUFFER_FULL_ERROR:"bufferFullError",BUFFER_SEEK_OVER_HOLE:"bufferSeekOverHole",BUFFER_NUDGE_ON_STALL:"bufferNudgeOnStall",INTERNAL_EXCEPTION:"internalException"}},function(t,e,r){!function(i,n,a){t.exports=e=n(r(1),r(18))}(0,function(t){t.lib.Cipher||function(e){var r=t,i=r.lib,n=i.Base,a=i.WordArray,o=i.BufferedBlockAlgorithm,s=r.enc,f=(s.Utf8,s.Base64),c=r.algo,h=c.EvpKDF,u=i.Cipher=o.extend({cfg:n.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,r){this.cfg=this.cfg.extend(r),this._xformMode=t,this._key=e,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){return t&&this._append(t),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function t(t){return"string"==typeof t?E:_}return function(e){return{encrypt:function(r,i,n){return t(i).encrypt(e,r,i,n)},decrypt:function(r,i,n){return t(i).decrypt(e,r,i,n)}}}}()}),d=(i.StreamCipher=u.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),r.mode={}),l=i.BlockCipherMode=n.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}}),p=d.CBC=function(){function t(t,r,i){var n,a=this._iv;a?(n=a,this._iv=e):n=this._prevBlock;for(var o=0;o<i;o++)t[r+o]^=n[o]}var r=l.extend();return r.Encryptor=r.extend({processBlock:function(e,r){var i=this._cipher,n=i.blockSize;t.call(this,e,r,n),i.encryptBlock(e,r),this._prevBlock=e.slice(r,r+n)}}),r.Decryptor=r.extend({processBlock:function(e,r){var i=this._cipher,n=i.blockSize,a=e.slice(r,r+n);i.decryptBlock(e,r),t.call(this,e,r,n),this._prevBlock=a}}),r}(),b=r.pad={},g=b.Pkcs7={pad:function(t,e){for(var r=4*e,i=r-t.sigBytes%r,n=i<<24|i<<16|i<<8|i,o=[],s=0;s<i;s+=4)o.push(n);var f=a.create(o,i);t.concat(f)},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},v=(i.BlockCipher=u.extend({cfg:u.cfg.extend({mode:p,padding:g}),reset:function(){var t;u.reset.call(this);var e=this.cfg,r=e.iv,i=e.mode;this._xformMode==this._ENC_XFORM_MODE?t=i.createEncryptor:(t=i.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==t?this._mode.init(this,r&&r.words):(this._mode=t.call(i,this,r&&r.words),this._mode.__creator=t)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t,e=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(e.pad(this._data,this.blockSize),t=this._process(!0)):(t=this._process(!0),e.unpad(t)),t},blockSize:4}),i.CipherParams=n.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}})),y=r.format={},m=y.OpenSSL={stringify:function(t){var e,r=t.ciphertext,i=t.salt;return e=i?a.create([1398893684,1701076831]).concat(i).concat(r):r,e.toString(f)},parse:function(t){var e,r=f.parse(t),i=r.words;return 1398893684==i[0]&&1701076831==i[1]&&(e=a.create(i.slice(2,4)),i.splice(0,4),r.sigBytes-=16),v.create({ciphertext:r,salt:e})}},_=i.SerializableCipher=n.extend({cfg:n.extend({format:m}),encrypt:function(t,e,r,i){i=this.cfg.extend(i);var n=t.createEncryptor(r,i),a=n.finalize(e),o=n.cfg;return v.create({ciphertext:a,key:r,iv:o.iv,algorithm:t,mode:o.mode,padding:o.padding,blockSize:t.blockSize,formatter:i.format})},decrypt:function(t,e,r,i){return i=this.cfg.extend(i),e=this._parse(e,i.format),t.createDecryptor(r,i).finalize(e.ciphertext)},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),w=r.kdf={},S=w.OpenSSL={execute:function(t,e,r,i){i||(i=a.random(8));var n=h.create({keySize:e+r}).compute(t,i),o=a.create(n.words.slice(e),4*r);return n.sigBytes=4*e,v.create({key:n,iv:o,salt:i})}},E=i.PasswordBasedCipher=_.extend({cfg:_.cfg.extend({kdf:S}),encrypt:function(t,e,r,i){i=this.cfg.extend(i);var n=i.kdf.execute(r,t.keySize,t.ivSize);i.iv=n.iv;var a=_.encrypt.call(this,t,e,n.key,i);return a.mixIn(n),a},decrypt:function(t,e,r,i){i=this.cfg.extend(i),e=this._parse(e,i.format);var n=i.kdf.execute(r,t.keySize,t.ivSize,e.salt);return i.iv=n.iv,_.decrypt.call(this,t,e,n.key,i)}})}()})},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=r(2),a=r(7),o=r(5),s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f=new Set(["hlsEventGeneric","hlsHandlerDestroying","hlsHandlerDestroyed"]),c=function(){function t(e){i(this,t),this.hls=e,this.onEvent=this.onEvent.bind(this);for(var r=arguments.length,n=Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];this.handledEvents=n,this.useGenericHandler=!0,this.registerListeners()}return t.prototype.destroy=function(){this.onHandlerDestroying(),this.unregisterListeners(),this.onHandlerDestroyed()},t.prototype.onHandlerDestroying=function(){},t.prototype.onHandlerDestroyed=function(){},t.prototype.isEventHandler=function(){return"object"===s(this.handledEvents)&&this.handledEvents.length&&"function"==typeof this.onEvent},t.prototype.registerListeners=function(){this.isEventHandler()&&this.handledEvents.forEach(function(t){if(f.has(t))throw new Error("Forbidden event-name: "+t);this.hls.on(t,this.onEvent)},this)},t.prototype.unregisterListeners=function(){this.isEventHandler()&&this.handledEvents.forEach(function(t){this.hls.off(t,this.onEvent)},this)},t.prototype.onEvent=function(t,e){this.onEventGeneric(t,e)},t.prototype.onEventGeneric=function(t,e){var r=function(t,e){var r="on"+t.replace("hls","");if("function"!=typeof this[r])throw new Error("Event "+t+" has no generic handler in this "+this.constructor.name+" class (tried "+r+")");return this[r].bind(this,e)};try{r.call(this,t,e).call()}catch(e){n.b.error("An internal error happened while handling event "+t+'. Error message: "'+e.message+'". Here is a stacktrace:',e),this.hls.trigger(o.a.ERROR,{type:a.b.OTHER_ERROR,details:a.a.INTERNAL_EXCEPTION,fatal:!1,event:t,err:e})}},t}();e.a=c},function(t,e,r){"use strict";var i=e;i.version=r(166).version,i.utils=r(167),i.rand=r(83),i.curve=r(34),i.curves=r(172),i.ec=r(180),i.eddsa=r(184)},function(t,e){function r(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=r,r.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)}},function(t,e,r){"use strict";function i(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"==typeof t)if(e){if("hex"===e)for(t=t.replace(/[^a-z0-9]+/gi,""),t.length%2!=0&&(t="0"+t),i=0;i<t.length;i+=2)r.push(parseInt(t[i]+t[i+1],16))}else for(var i=0;i<t.length;i++){var n=t.charCodeAt(i),a=n>>8,o=255&n;a?r.push(a,o):r.push(o)}else for(i=0;i<t.length;i++)r[i]=0|t[i];return r}function n(t){for(var e="",r=0;r<t.length;r++)e+=s(t[r].toString(16));return e}function a(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function o(t,e){for(var r="",i=0;i<t.length;i++){var n=t[i];"little"===e&&(n=a(n)),r+=f(n.toString(16))}return r}function s(t){return 1===t.length?"0"+t:t}function f(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}function c(t,e,r,i){var n=r-e;D(n%4==0);for(var a=new Array(n/4),o=0,s=e;o<a.length;o++,s+=4){var f;f="big"===i?t[s]<<24|t[s+1]<<16|t[s+2]<<8|t[s+3]:t[s+3]<<24|t[s+2]<<16|t[s+1]<<8|t[s],a[o]=f>>>0}return a}function h(t,e){for(var r=new Array(4*t.length),i=0,n=0;i<t.length;i++,n+=4){var a=t[i];"big"===e?(r[n]=a>>>24,r[n+1]=a>>>16&255,r[n+2]=a>>>8&255,r[n+3]=255&a):(r[n+3]=a>>>24,r[n+2]=a>>>16&255,r[n+1]=a>>>8&255,r[n]=255&a)}return r}function u(t,e){return t>>>e|t<<32-e}function d(t,e){return t<<e|t>>>32-e}function l(t,e){return t+e>>>0}function p(t,e,r){return t+e+r>>>0}function b(t,e,r,i){return t+e+r+i>>>0}function g(t,e,r,i,n){return t+e+r+i+n>>>0}function v(t,e,r,i){var n=t[e],a=t[e+1],o=i+a>>>0,s=(o<i?1:0)+r+n;t[e]=s>>>0,t[e+1]=o}function y(t,e,r,i){return(e+i>>>0<e?1:0)+t+r>>>0}function m(t,e,r,i){return e+i>>>0}function _(t,e,r,i,n,a,o,s){var f=0,c=e;return c=c+i>>>0,f+=c<e?1:0,c=c+a>>>0,f+=c<a?1:0,c=c+s>>>0,f+=c<s?1:0,t+r+n+o+f>>>0}function w(t,e,r,i,n,a,o,s){return e+i+a+s>>>0}function S(t,e,r,i,n,a,o,s,f,c){var h=0,u=e;return u=u+i>>>0,h+=u<e?1:0,u=u+a>>>0,h+=u<a?1:0,u=u+s>>>0,h+=u<s?1:0,u=u+c>>>0,h+=u<c?1:0,t+r+n+o+f+h>>>0}function E(t,e,r,i,n,a,o,s,f,c){return e+i+a+s+c>>>0}function A(t,e,r){return(e<<32-r|t>>>r)>>>0}function T(t,e,r){return(t<<32-r|e>>>r)>>>0}function R(t,e,r){return t>>>r}function k(t,e,r){return(t<<32-r|e>>>r)>>>0}var D=r(11),I=r(0);e.inherits=I,e.toArray=i,e.toHex=n,e.htonl=a,e.toHex32=o,e.zero2=s,e.zero8=f,e.join32=c,e.split32=h,e.rotr32=u,e.rotl32=d,e.sum32=l,e.sum32_3=p,e.sum32_4=b,e.sum32_5=g,e.sum64=v,e.sum64_hi=y,e.sum64_lo=m,e.sum64_4_hi=_,e.sum64_4_lo=w,e.sum64_5_hi=S,e.sum64_5_lo=E,e.rotr64_hi=A,e.rotr64_lo=T,e.shr64_hi=R,e.shr64_lo=k},function(t,e){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e){function r(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function n(t){if(h===setTimeout)return setTimeout(t,0);if((h===r||!h)&&setTimeout)return h=setTimeout,setTimeout(t,0);try{return h(t,0)}catch(e){try{return h.call(null,t,0)}catch(e){return h.call(this,t,0)}}}function a(t){if(u===clearTimeout)return clearTimeout(t);if((u===i||!u)&&clearTimeout)return u=clearTimeout,clearTimeout(t);try{return u(t)}catch(e){try{return u.call(null,t)}catch(e){return u.call(this,t)}}}function o(){b&&l&&(b=!1,l.length?p=l.concat(p):g=-1,p.length&&s())}function s(){if(!b){var t=n(o);b=!0;for(var e=p.length;e;){for(l=p,p=[];++g<e;)l&&l[g].run();g=-1,e=p.length}l=null,b=!1,a(t)}}function f(t,e){this.fun=t,this.array=e}function c(){}var h,u,d=t.exports={};!function(){try{h="function"==typeof setTimeout?setTimeout:r}catch(t){h=r}try{u="function"==typeof clearTimeout?clearTimeout:i}catch(t){u=i}}();var l,p=[],b=!1,g=-1;d.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];p.push(new f(t,e)),1!==p.length||b||n(s)},f.prototype.run=function(){this.fun.apply(null,this.array)},d.title="browser",d.browser=!0,d.env={},d.argv=[],d.version="",d.versions={},d.on=c,d.addListener=c,d.once=c,d.off=c,d.removeListener=c,d.removeAllListeners=c,d.emit=c,d.prependListener=c,d.prependOnceListener=c,d.listeners=function(t){return[]},d.binding=function(t){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(t){throw new Error("process.chdir is not supported")},d.umask=function(){return 0}},function(t,e,r){function i(t){a.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}var n=r(3).Buffer,a=r(30).Transform,o=r(46).StringDecoder;r(0)(i,a),i.prototype.update=function(t,e,r){"string"==typeof t&&(t=n.from(t,e));var i=this._update(t);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},i.prototype.setAutoPadding=function(){},i.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},i.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},i.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},i.prototype._transform=function(t,e,r){var i;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){i=t}finally{r(i)}},i.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(t){e=t}t(e)},i.prototype._finalOrDigest=function(t){var e=this.__final()||n.alloc(0);return t&&(e=this._toString(e,t,!0)),e},i.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new o(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var i=this._decoder.write(t);return r&&(i+=this._decoder.end()),i},t.exports=i},function(t,e,r){"use strict";function i(t){if(!(this instanceof i))return new i(t);c.call(this,t),h.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",n)}function n(){this.allowHalfOpen||this._writableState.ended||o(a,this)}function a(t){t.end()}var o=r(31),s=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=i;var f=r(24);f.inherits=r(0);var c=r(64),h=r(45);f.inherits(i,c);for(var u=s(h.prototype),d=0;d<u.length;d++){var l=u[d];i.prototype[l]||(i.prototype[l]=h.prototype[l])}Object.defineProperty(i.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),i.prototype._destroy=function(t,e){this.push(null),this.end(),o(e,t)}},function(t,e,r){!function(i,n){t.exports=e=n(r(1))}(0,function(t){return function(){function e(t,e,r){for(var i=[],a=0,o=0;o<e;o++)if(o%4){var s=r[t.charCodeAt(o-1)]<<o%4*2,f=r[t.charCodeAt(o)]>>>6-o%4*2,c=s|f;i[a>>>2]|=c<<24-a%4*8,a++}return n.create(i,a)}var r=t,i=r.lib,n=i.WordArray,a=r.enc;a.Base64={stringify:function(t){var e=t.words,r=t.sigBytes,i=this._map;t.clamp();for(var n=[],a=0;a<r;a+=3)for(var o=e[a>>>2]>>>24-a%4*8&255,s=e[a+1>>>2]>>>24-(a+1)%4*8&255,f=e[a+2>>>2]>>>24-(a+2)%4*8&255,c=o<<16|s<<8|f,h=0;h<4&&a+.75*h<r;h++)n.push(i.charAt(c>>>6*(3-h)&63));var u=i.charAt(64);if(u)for(;n.length%4;)n.push(u);return n.join("")},parse:function(t){var r=t.length,i=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var a=0;a<i.length;a++)n[i.charCodeAt(a)]=a}var o=i.charAt(64);if(o){var s=t.indexOf(o);-1!==s&&(r=s)}return e(t,r,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),t.enc.Base64})},function(t,e,r){!function(i,n,a){t.exports=e=n(r(1),r(36),r(37))}(0,function(t){return function(){var e=t,r=e.lib,i=r.Base,n=r.WordArray,a=e.algo,o=a.MD5,s=a.EvpKDF=i.extend({cfg:i.extend({keySize:4,hasher:o,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var r,i=this.cfg,a=i.hasher.create(),o=n.create(),s=o.words,f=i.keySize,c=i.iterations;s.length<f;){r&&a.update(r),r=a.update(t).finalize(e),a.reset();for(var h=1;h<c;h++)r=a.finalize(r),a.reset();o.concat(r)}return o.sigBytes=4*f,o}});e.EvpKDF=function(t,e,r){return s.create(r).compute(t,e)}}(),t.EvpKDF})},function(t,e,r){"use strict";(function(e,i){function n(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}function a(t,r){if(t>65536)throw new Error("requested too many random bytes");var n=new e.Uint8Array(t);t>0&&s.getRandomValues(n);var a=o.from(n.buffer);return"function"==typeof r?i.nextTick(function(){r(null,a)}):a}var o=r(3).Buffer,s=e.crypto||e.msCrypto;s&&s.getRandomValues?t.exports=a:t.exports=n}).call(e,r(13),r(14))},function(t,e){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(t){return"function"==typeof t}function n(t){return"number"==typeof t}function a(t){return"object"==typeof t&&null!==t}function o(t){return void 0===t}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(t){if(!n(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},r.prototype.emit=function(t){var e,r,n,s,f,c;if(this._events||(this._events={}),"error"===t&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if((e=arguments[1])instanceof Error)throw e;var h=new Error('Uncaught, unspecified "error" event. ('+e+")");throw h.context=e,h}if(r=this._events[t],o(r))return!1;if(i(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),r.apply(this,s)}else if(a(r))for(s=Array.prototype.slice.call(arguments,1),c=r.slice(),n=c.length,f=0;f<n;f++)c[f].apply(this,s);return!0},r.prototype.addListener=function(t,e){var n;if(!i(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,i(e.listener)?e.listener:e),this._events[t]?a(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,a(this._events[t])&&!this._events[t].warned&&(n=o(this._maxListeners)?r.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[t].length>n&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){function r(){this.removeListener(t,r),n||(n=!0,e.apply(this,arguments))}if(!i(e))throw TypeError("listener must be a function");var n=!1;return r.listener=e,this.on(t,r),this},r.prototype.removeListener=function(t,e){var r,n,o,s;if(!i(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=this._events[t],o=r.length,n=-1,r===e||i(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(a(r)){for(s=o;s-- >0;)if(r[s]===e||r[s].listener&&r[s].listener===e){n=s;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],i(r))this.removeListener(t,r);else if(r)for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){return this._events&&this._events[t]?i(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(i(e))return 1;if(e)return e.length}return 0},r.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,r){function i(t,e){this._block=n.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}var n=r(3).Buffer;i.prototype.update=function(t,e){"string"==typeof t&&(e=e||"utf8",t=n.from(t,e));for(var r=this._block,i=this._blockSize,a=t.length,o=this._len,s=0;s<a;){for(var f=o%i,c=Math.min(a-s,i-f),h=0;h<c;h++)r[f+h]=t[s+h];o+=c,s+=c,o%i==0&&this._update(r)}return this._len+=a,this},i.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var i=4294967295&r,n=(r-i)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(i,this._blockSize-4)}this._update(this._block);var a=this._hash();return t?a.toString(t):a},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},function(t,e,r){!function(i,n){t.exports=e=n(r(1))}(0,function(t){return function(e){function r(t,e,r,i,n,a,o){var s=t+(e&r|~e&i)+n+o;return(s<<a|s>>>32-a)+e}function i(t,e,r,i,n,a,o){var s=t+(e&i|r&~i)+n+o;return(s<<a|s>>>32-a)+e}function n(t,e,r,i,n,a,o){var s=t+(e^r^i)+n+o;return(s<<a|s>>>32-a)+e}function a(t,e,r,i,n,a,o){var s=t+(r^(e|~i))+n+o;return(s<<a|s>>>32-a)+e}var o=t,s=o.lib,f=s.WordArray,c=s.Hasher,h=o.algo,u=[];!function(){for(var t=0;t<64;t++)u[t]=4294967296*e.abs(e.sin(t+1))|0}();var d=h.MD5=c.extend({_doReset:function(){this._hash=new f.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var o=0;o<16;o++){var s=e+o,f=t[s];t[s]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8)}var c=this._hash.words,h=t[e+0],d=t[e+1],l=t[e+2],p=t[e+3],b=t[e+4],g=t[e+5],v=t[e+6],y=t[e+7],m=t[e+8],_=t[e+9],w=t[e+10],S=t[e+11],E=t[e+12],A=t[e+13],T=t[e+14],R=t[e+15],k=c[0],D=c[1],I=c[2],M=c[3];k=r(k,D,I,M,h,7,u[0]),M=r(M,k,D,I,d,12,u[1]),I=r(I,M,k,D,l,17,u[2]),D=r(D,I,M,k,p,22,u[3]),k=r(k,D,I,M,b,7,u[4]),M=r(M,k,D,I,g,12,u[5]),I=r(I,M,k,D,v,17,u[6]),D=r(D,I,M,k,y,22,u[7]),k=r(k,D,I,M,m,7,u[8]),M=r(M,k,D,I,_,12,u[9]),I=r(I,M,k,D,w,17,u[10]),D=r(D,I,M,k,S,22,u[11]),k=r(k,D,I,M,E,7,u[12]),M=r(M,k,D,I,A,12,u[13]),I=r(I,M,k,D,T,17,u[14]),D=r(D,I,M,k,R,22,u[15]),k=i(k,D,I,M,d,5,u[16]),M=i(M,k,D,I,v,9,u[17]),I=i(I,M,k,D,S,14,u[18]),D=i(D,I,M,k,h,20,u[19]),k=i(k,D,I,M,g,5,u[20]),M=i(M,k,D,I,w,9,u[21]),I=i(I,M,k,D,R,14,u[22]),D=i(D,I,M,k,b,20,u[23]),k=i(k,D,I,M,_,5,u[24]),M=i(M,k,D,I,T,9,u[25]),I=i(I,M,k,D,p,14,u[26]),D=i(D,I,M,k,m,20,u[27]),k=i(k,D,I,M,A,5,u[28]),M=i(M,k,D,I,l,9,u[29]),I=i(I,M,k,D,y,14,u[30]),D=i(D,I,M,k,E,20,u[31]),k=n(k,D,I,M,g,4,u[32]),M=n(M,k,D,I,m,11,u[33]),I=n(I,M,k,D,S,16,u[34]),D=n(D,I,M,k,T,23,u[35]),k=n(k,D,I,M,d,4,u[36]),M=n(M,k,D,I,b,11,u[37]),I=n(I,M,k,D,y,16,u[38]),D=n(D,I,M,k,w,23,u[39]),k=n(k,D,I,M,A,4,u[40]),M=n(M,k,D,I,h,11,u[41]),I=n(I,M,k,D,p,16,u[42]),D=n(D,I,M,k,v,23,u[43]),k=n(k,D,I,M,_,4,u[44]),M=n(M,k,D,I,E,11,u[45]),I=n(I,M,k,D,R,16,u[46]),D=n(D,I,M,k,l,23,u[47]),k=a(k,D,I,M,h,6,u[48]),M=a(M,k,D,I,y,10,u[49]),I=a(I,M,k,D,T,15,u[50]),D=a(D,I,M,k,g,21,u[51]),k=a(k,D,I,M,E,6,u[52]),M=a(M,k,D,I,p,10,u[53]),I=a(I,M,k,D,w,15,u[54]),D=a(D,I,M,k,d,21,u[55]),k=a(k,D,I,M,m,6,u[56]),M=a(M,k,D,I,R,10,u[57]),I=a(I,M,k,D,v,15,u[58]),D=a(D,I,M,k,A,21,u[59]),k=a(k,D,I,M,b,6,u[60]),M=a(M,k,D,I,S,10,u[61]),I=a(I,M,k,D,l,15,u[62]),D=a(D,I,M,k,_,21,u[63]),c[0]=c[0]+k|0,c[1]=c[1]+D|0,c[2]=c[2]+I|0,c[3]=c[3]+M|0},_doFinalize:function(){var t=this._data,r=t.words,i=8*this._nDataBytes,n=8*t.sigBytes;r[n>>>5]|=128<<24-n%32;var a=e.floor(i/4294967296),o=i;r[15+(n+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),r[14+(n+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t.sigBytes=4*(r.length+1),this._process();for(var s=this._hash,f=s.words,c=0;c<4;c++){var h=f[c];f[c]=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8)}return s},clone:function(){var t=c.clone.call(this);return t._hash=this._hash.clone(),t}});o.MD5=c._createHelper(d),o.HmacMD5=c._createHmacHelper(d)}(Math),t.MD5})},function(t,e,r){"use strict";(function(e){function i(t){c.call(this,"digest"),this._hash=t,this.buffers=[]}function n(t){c.call(this,"digest"),this._hash=t}var a=r(0),o=r(42),s=r(43),f=r(47),c=r(15);a(i,c),i.prototype._update=function(t){this.buffers.push(t)},i.prototype._final=function(){var t=e.concat(this.buffers),r=this._hash(t);return this.buffers=null,r},a(n,c),n.prototype._update=function(t){this._hash.update(t)},n.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return t=t.toLowerCase(),"md5"===t?new i(o):new n("rmd160"===t||"ripemd160"===t?new s:f(t))}}).call(e,r(4).Buffer)},function(t,e,r){(function(t){function r(t){return Array.isArray?Array.isArray(t):"[object Array]"===g(t)}function i(t){return"boolean"==typeof t}function n(t){return null===t}function a(t){return null==t}function o(t){return"number"==typeof t}function s(t){return"string"==typeof t}function f(t){return"symbol"==typeof t}function c(t){return void 0===t}function h(t){return"[object RegExp]"===g(t)}function u(t){return"object"==typeof t&&null!==t}function d(t){return"[object Date]"===g(t)}function l(t){return"[object Error]"===g(t)||t instanceof Error}function p(t){return"function"==typeof t}function b(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t}function g(t){return Object.prototype.toString.call(t)}e.isArray=r,e.isBoolean=i,e.isNull=n,e.isNullOrUndefined=a,e.isNumber=o,e.isString=s,e.isSymbol=f,e.isUndefined=c,e.isRegExp=h,e.isObject=u,e.isDate=d,e.isError=l,e.isFunction=p,e.isPrimitive=b,e.isBuffer=t.isBuffer}).call(e,r(4).Buffer)},function(t,e,r){(function(e){t.exports=function(t,r){for(var i=Math.min(t.length,r.length),n=new e(i),a=0;a<i;++a)n[a]=t[a]^r[a];return n}}).call(e,r(4).Buffer)},function(t,e,r){"use strict";function i(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}var n=r(12),a=r(11);e.BlockHash=i,i.prototype.update=function(t,e){if(t=n.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){t=this.pending;var r=t.length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=n.join32(t,0,t.length-r,this.endian);for(var i=0;i<t.length;i+=this._delta32)this._update(t,i,i+this._delta32)}return this},i.prototype.digest=function(t){return this.update(this._pad()),a(null===this.pending),this._digest(t)},i.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,r=e-(t+this.padLength)%e,i=new Array(r+this.padLength);i[0]=128;for(var n=1;n<r;n++)i[n]=0;if(t<<=3,"big"===this.endian){for(var a=8;a<this.padLength;a++)i[n++]=0;i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=t>>>24&255,i[n++]=t>>>16&255,i[n++]=t>>>8&255,i[n++]=255&t}else for(i[n++]=255&t,i[n++]=t>>>8&255,i[n++]=t>>>16&255,i[n++]=t>>>24&255,i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=0,a=8;a<this.padLength;a++)i[n++]=0;return i}},function(t,e,r){var i=e;i.bignum=r(6),i.define=r(188).define,i.base=r(28),i.constants=r(89),i.decoders=r(194),i.encoders=r(196)},function(t,e,r){var i=e;i.Reporter=r(191).Reporter,i.DecoderBuffer=r(88).DecoderBuffer,i.EncoderBuffer=r(88).EncoderBuffer,i.Node=r(192)},function(t,e,r){!function(e){var r=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/\;?#]*)?(.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,i=/^([^\/;?#]*)(.*)$/,n=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,o={buildAbsoluteURL:function(t,e,r){if(r=r||{},t=t.trim(),!(e=e.trim())){if(!r.alwaysNormalize)return t;var n=this.parseURL(t);if(!s)throw new Error("Error trying to parse base URL.");return n.path=o.normalizePath(n.path),o.buildURLFromParts(n)}var a=this.parseURL(e);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return r.alwaysNormalize?(a.path=o.normalizePath(a.path),o.buildURLFromParts(a)):e;var s=this.parseURL(t);if(!s)throw new Error("Error trying to parse base URL.");if(!s.netLoc&&s.path&&"/"!==s.path[0]){var f=i.exec(s.path);s.netLoc=f[1],s.path=f[2]}s.netLoc&&!s.path&&(s.path="/");var c={scheme:s.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(c.netLoc=s.netLoc,"/"!==a.path[0]))if(a.path){var h=s.path,u=h.substring(0,h.lastIndexOf("/")+1)+a.path;c.path=o.normalizePath(u)}else c.path=s.path,a.params||(c.params=s.params,a.query||(c.query=s.query));return null===c.path&&(c.path=r.alwaysNormalize?o.normalizePath(a.path):a.path),o.buildURLFromParts(c)},parseURL:function(t){var e=r.exec(t);return e?{scheme:e[1]||"",netLoc:e[2]||"",path:e[3]||"",params:e[4]||"",query:e[5]||"",fragment:e[6]||""}:null},normalizePath:function(t){for(t=t.split("").reverse().join("").replace(n,"");t.length!==(t=t.replace(a,"")).length;);return t.split("").reverse().join("")},buildURLFromParts:function(t){return t.scheme+t.netLoc+t.path+t.params+t.query+t.fragment}};t.exports=o}()},function(t,e,r){function i(){n.call(this)}t.exports=i;var n=r(20).EventEmitter;r(0)(i,n),i.Readable=r(44),i.Writable=r(128),i.Duplex=r(129),i.Transform=r(130),i.PassThrough=r(131),i.Stream=i,i.prototype.pipe=function(t,e){function r(e){t.writable&&!1===t.write(e)&&c.pause&&c.pause()}function i(){c.readable&&c.resume&&c.resume()}function a(){h||(h=!0,t.end())}function o(){h||(h=!0,"function"==typeof t.destroy&&t.destroy())}function s(t){if(f(),0===n.listenerCount(this,"error"))throw t}function f(){c.removeListener("data",r),t.removeListener("drain",i),c.removeListener("end",a),c.removeListener("close",o),c.removeListener("error",s),t.removeListener("error",s),c.removeListener("end",f),c.removeListener("close",f),t.removeListener("close",f)}var c=this;c.on("data",r),t.on("drain",i),t._isStdio||e&&!1===e.end||(c.on("end",a),c.on("close",o));var h=!1;return c.on("error",s),t.on("error",s),c.on("end",f),c.on("close",f),t.on("close",f),t.emit("pipe",c),t}},function(t,e,r){"use strict";(function(e){function r(t,r,i,n){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var a,o,s=arguments.length;switch(s){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,r)});case 3:return e.nextTick(function(){t.call(null,r,i)});case 4:return e.nextTick(function(){t.call(null,r,i,n)});default:for(a=new Array(s-1),o=0;o<a.length;)a[o++]=arguments[o];return e.nextTick(function(){t.apply(null,a)})}}!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports=r:t.exports=e.nextTick}).call(e,r(14))},function(t,e,r){function i(t,e,r,i){if(n.isBuffer(t)||(t=n.from(t,"binary")),e&&(n.isBuffer(e)||(e=n.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var o=r/8,s=n.alloc(o),f=n.alloc(i||0),c=n.alloc(0);o>0||i>0;){var h=new a;h.update(c),h.update(t),e&&h.update(e),c=h.digest();var u=0;if(o>0){var d=s.length-o;u=Math.min(o,c.length),c.copy(s,d,0,u),o-=u}if(u<c.length&&i>0){var l=f.length-i,p=Math.min(i,c.length-u);c.copy(f,l,u,u+p),i-=p}}return c.fill(0),{key:s,iv:f}}var n=r(3).Buffer,a=r(140);t.exports=i},function(t,e,r){function i(t){s.isBuffer(t)||(t=s.from(t));for(var e=t.length/4|0,r=new Array(e),i=0;i<e;i++)r[i]=t.readUInt32BE(4*i);return r}function n(t){for(;0<t.length;t++)t[0]=0}function a(t,e,r,i,n){for(var a,o,s,f,c=r[0],h=r[1],u=r[2],d=r[3],l=t[0]^e[0],p=t[1]^e[1],b=t[2]^e[2],g=t[3]^e[3],v=4,y=1;y<n;y++)a=c[l>>>24]^h[p>>>16&255]^u[b>>>8&255]^d[255&g]^e[v++],o=c[p>>>24]^h[b>>>16&255]^u[g>>>8&255]^d[255&l]^e[v++],s=c[b>>>24]^h[g>>>16&255]^u[l>>>8&255]^d[255&p]^e[v++],f=c[g>>>24]^h[l>>>16&255]^u[p>>>8&255]^d[255&b]^e[v++],l=a,p=o,b=s,g=f;return a=(i[l>>>24]<<24|i[p>>>16&255]<<16|i[b>>>8&255]<<8|i[255&g])^e[v++],o=(i[p>>>24]<<24|i[b>>>16&255]<<16|i[g>>>8&255]<<8|i[255&l])^e[v++],s=(i[b>>>24]<<24|i[g>>>16&255]<<16|i[l>>>8&255]<<8|i[255&p])^e[v++],f=(i[g>>>24]<<24|i[l>>>16&255]<<16|i[p>>>8&255]<<8|i[255&b])^e[v++],a>>>=0,o>>>=0,s>>>=0,f>>>=0,[a,o,s,f]}function o(t){this._key=i(t),this._reset()}var s=r(3).Buffer,f=[0,1,2,4,8,16,32,64,128,27,54],c=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var r=[],i=[],n=[[],[],[],[]],a=[[],[],[],[]],o=0,s=0,f=0;f<256;++f){var c=s^s<<1^s<<2^s<<3^s<<4;c=c>>>8^255&c^99,r[o]=c,i[c]=o;var h=t[o],u=t[h],d=t[u],l=257*t[c]^16843008*c;n[0][o]=l<<24|l>>>8,n[1][o]=l<<16|l>>>16,n[2][o]=l<<8|l>>>24,n[3][o]=l,l=16843009*d^65537*u^257*h^16843008*o,a[0][c]=l<<24|l>>>8,a[1][c]=l<<16|l>>>16,a[2][c]=l<<8|l>>>24,a[3][c]=l,0===o?o=s=1:(o=h^t[t[t[d^h]]],s^=t[t[s]])}return{SBOX:r,INV_SBOX:i,SUB_MIX:n,INV_SUB_MIX:a}}();o.blockSize=16,o.keySize=32,o.prototype.blockSize=o.blockSize,o.prototype.keySize=o.keySize,o.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,i=4*(r+1),n=[],a=0;a<e;a++)n[a]=t[a];for(a=e;a<i;a++){var o=n[a-1];a%e==0?(o=o<<8|o>>>24,o=c.SBOX[o>>>24]<<24|c.SBOX[o>>>16&255]<<16|c.SBOX[o>>>8&255]<<8|c.SBOX[255&o],o^=f[a/e|0]<<24):e>6&&a%e==4&&(o=c.SBOX[o>>>24]<<24|c.SBOX[o>>>16&255]<<16|c.SBOX[o>>>8&255]<<8|c.SBOX[255&o]),n[a]=n[a-e]^o}for(var s=[],h=0;h<i;h++){var u=i-h,d=n[u-(h%4?0:4)];s[h]=h<4||u<=4?d:c.INV_SUB_MIX[0][c.SBOX[d>>>24]]^c.INV_SUB_MIX[1][c.SBOX[d>>>16&255]]^c.INV_SUB_MIX[2][c.SBOX[d>>>8&255]]^c.INV_SUB_MIX[3][c.SBOX[255&d]]}this._nRounds=r,this._keySchedule=n,this._invKeySchedule=s},o.prototype.encryptBlockRaw=function(t){return t=i(t),a(t,this._keySchedule,c.SUB_MIX,c.SBOX,this._nRounds)},o.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=s.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r},o.prototype.decryptBlock=function(t){t=i(t);var e=t[1];t[1]=t[3],t[3]=e;var r=a(t,this._invKeySchedule,c.INV_SUB_MIX,c.INV_SBOX,this._nRounds),n=s.allocUnsafe(16);return n.writeUInt32BE(r[0],0),n.writeUInt32BE(r[3],4),n.writeUInt32BE(r[2],8),n.writeUInt32BE(r[1],12),n},o.prototype.scrub=function(){n(this._keySchedule),n(this._invKeySchedule),n(this._key)},t.exports.AES=o},function(t,e,r){"use strict";var i=e;i.base=r(168),i.short=r(169),i.mont=r(170),i.edwards=r(171)},function(t,e,r){(function(e){function i(t){var r;"object"!=typeof t||e.isBuffer(t)||(r=t.passphrase,t=t.key),"string"==typeof t&&(t=new e(t));var i,o,f=s(t,r),c=f.tag,h=f.data;switch(c){case"CERTIFICATE":o=a.certificate.decode(h,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(o||(o=a.PublicKey.decode(h,"der")),i=o.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return a.RSAPublicKey.decode(o.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return o.subjectPrivateKey=o.subjectPublicKey,{type:"ec",data:o};case"1.2.840.10040.4.1":return o.algorithm.params.pub_key=a.DSAparam.decode(o.subjectPublicKey.data,"der"),{type:"dsa",data:o.algorithm.params};default:throw new Error("unknown key id "+i)}throw new Error("unknown key type "+c);case"ENCRYPTED PRIVATE KEY":h=a.EncryptedPrivateKey.decode(h,"der"),h=n(h,r);case"PRIVATE KEY":switch(o=a.PrivateKey.decode(h,"der"),i=o.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return a.RSAPrivateKey.decode(o.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:o.algorithm.curve,privateKey:a.ECPrivateKey.decode(o.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return o.algorithm.params.priv_key=a.DSAparam.decode(o.subjectPrivateKey,"der"),{type:"dsa",params:o.algorithm.params};default:throw new Error("unknown key id "+i)}throw new Error("unknown key type "+c);case"RSA PUBLIC KEY":return a.RSAPublicKey.decode(h,"der");case"RSA PRIVATE KEY":return a.RSAPrivateKey.decode(h,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:a.DSAPrivateKey.decode(h,"der")};case"EC PRIVATE KEY":return h=a.ECPrivateKey.decode(h,"der"),{curve:h.parameters.value,privateKey:h.privateKey};default:throw new Error("unknown key type "+c)}}function n(t,r){var i=t.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),a=o[t.algorithm.decrypt.cipher.algo.join(".")],s=t.algorithm.decrypt.cipher.iv,h=t.subjectPrivateKey,u=parseInt(a.split("-")[1],10)/8,d=c.pbkdf2Sync(r,i,n,u),l=f.createDecipheriv(a,d,s),p=[];return p.push(l.update(h)),p.push(l.final()),e.concat(p)}var a=r(187),o=r(199),s=r(200),f=r(48),c=r(72);t.exports=i,i.signature=a.signature}).call(e,r(4).Buffer)},function(t,e,r){!function(i,n){t.exports=e=n(r(1))}(0,function(t){return function(){var e=t,r=e.lib,i=r.WordArray,n=r.Hasher,a=e.algo,o=[],s=a.SHA1=n.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var r=this._hash.words,i=r[0],n=r[1],a=r[2],s=r[3],f=r[4],c=0;c<80;c++){if(c<16)o[c]=0|t[e+c];else{var h=o[c-3]^o[c-8]^o[c-14]^o[c-16];o[c]=h<<1|h>>>31}var u=(i<<5|i>>>27)+f+o[c];u+=c<20?1518500249+(n&a|~n&s):c<40?1859775393+(n^a^s):c<60?(n&a|n&s|a&s)-1894007588:(n^a^s)-899497514,f=s,s=a,a=n<<30|n>>>2,n=i,i=u}r[0]=r[0]+i|0,r[1]=r[1]+n|0,r[2]=r[2]+a|0,r[3]=r[3]+s|0,r[4]=r[4]+f|0},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return e[i>>>5]|=128<<24-i%32,e[14+(i+64>>>9<<4)]=Math.floor(r/4294967296),e[15+(i+64>>>9<<4)]=r,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA1=n._createHelper(s),e.HmacSHA1=n._createHmacHelper(s)}(),t.SHA1})},function(t,e,r){!function(i,n){t.exports=e=n(r(1))}(0,function(t){!function(){var e=t,r=e.lib,i=r.Base,n=e.enc,a=n.Utf8,o=e.algo;o.HMAC=i.extend({init:function(t,e){t=this._hasher=new t.init,"string"==typeof e&&(e=a.parse(e));var r=t.blockSize,i=4*r;e.sigBytes>i&&(e=t.finalize(e)),e.clamp();for(var n=this._oKey=e.clone(),o=this._iKey=e.clone(),s=n.words,f=o.words,c=0;c<r;c++)s[c]^=1549556828,f[c]^=909522486;n.sigBytes=o.sigBytes=i,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var e=this._hasher,r=e.finalize(t);return e.reset(),e.finalize(this._oKey.clone().concat(r))}})}()})},function(t,e,r){!function(i,n){t.exports=e=n(r(1))}(0,function(t){return function(e){var r=t,i=r.lib,n=i.Base,a=i.WordArray,o=r.x64={};o.Word=n.extend({init:function(t,e){this.high=t,this.low=e}}),o.WordArray=n.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=void 0!=e?e:8*t.length},toX32:function(){for(var t=this.words,e=t.length,r=[],i=0;i<e;i++){var n=t[i];r.push(n.high),r.push(n.low)}return a.create(r,this.sigBytes)},clone:function(){for(var t=n.clone.call(this),e=t.words=this.words.slice(0),r=e.length,i=0;i<r;i++)e[i]=e[i].clone();return t}})}(),t})},function(t,e,r){"use strict";var i={search:function(t,e){for(var r=0,i=t.length-1,n=null,a=null;r<=i;){n=(r+i)/2|0,a=t[n];var o=e(a);if(o>0)r=n+1;else{if(!(o<0))return a;i=n-1}}return null}};e.a=i},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.d(e,"b",function(){return a});var n=function(){function t(){i(this,t)}return t.isHeader=function(t,e){return e+10<=t.length&&73===t[e]&&68===t[e+1]&&51===t[e+2]&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128},t.isFooter=function(t,e){return e+10<=t.length&&51===t[e]&&68===t[e+1]&&73===t[e+2]&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128},t.getID3Data=function(e,r){for(var i=r,n=0;t.isHeader(e,r);){n+=10;n+=t._readSize(e,r+6),t.isFooter(e,r+10)&&(n+=10),r+=n}if(n>0)return e.subarray(i,i+n)},t._readSize=function(t,e){var r=0;return r=(127&t[e])<<21,r|=(127&t[e+1])<<14,r|=(127&t[e+2])<<7,r|=127&t[e+3]},t.getTimeStamp=function(e){for(var r=t.getID3Frames(e),i=0;i<r.length;i++){var n=r[i];if(t.isTimeStampFrame(n))return t._readTimeStamp(n)}},t.isTimeStampFrame=function(t){return t&&"PRIV"===t.key&&"com.apple.streaming.transportStreamTimestamp"===t.info},t._getFrameData=function(e){var r=String.fromCharCode(e[0],e[1],e[2],e[3]),i=t._readSize(e,4);return{type:r,size:i,data:e.subarray(10,10+i)}},t.getID3Frames=function(e){for(var r=0,i=[];t.isHeader(e,r);){var n=t._readSize(e,r+6);r+=10;for(var a=r+n;r+8<a;){var o=t._getFrameData(e.subarray(r)),s=t._decodeFrame(o);s&&i.push(s),r+=o.size+10}t.isFooter(e,r)&&(r+=10)}return i},t._decodeFrame=function(e){return"PRIV"===e.type?t._decodePrivFrame(e):"T"===e.type[0]?t._decodeTextFrame(e):"W"===e.type[0]?t._decodeURLFrame(e):void 0},t._readTimeStamp=function(t){if(8===t.data.byteLength){var e=new Uint8Array(t.data),r=1&e[3],i=(e[4]<<23)+(e[5]<<15)+(e[6]<<7)+e[7];return i/=45,r&&(i+=47721858.84),Math.round(i)}},t._decodePrivFrame=function(e){if(!(e.size<2)){var r=t._utf8ArrayToStr(e.data,!0),i=new Uint8Array(e.data.subarray(r.length+1));return{key:e.type,info:r,data:i.buffer}}},t._decodeTextFrame=function(e){if(!(e.size<2)){if("TXXX"===e.type){var r=1,i=t._utf8ArrayToStr(e.data.subarray(r));r+=i.length+1;var n=t._utf8ArrayToStr(e.data.subarray(r));return{key:e.type,info:i,data:n}}var a=t._utf8ArrayToStr(e.data.subarray(1));return{key:e.type,data:a}}},t._decodeURLFrame=function(e){if("WXXX"===e.type){if(e.size<2)return;var r=1,i=t._utf8ArrayToStr(e.data.subarray(r));r+=i.length+1;var n=t._utf8ArrayToStr(e.data.subarray(r));return{key:e.type,info:i,data:n}}var a=t._utf8ArrayToStr(e.data);return{key:e.type,data:a}},t._utf8ArrayToStr=function(t){for(var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=t.length,i=void 0,n=void 0,a=void 0,o="",s=0;s<r;){if(0===(i=t[s++])&&e)return o;if(0!==i&&3!==i)switch(i>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:o+=String.fromCharCode(i);break;case 12:case 13:n=t[s++],o+=String.fromCharCode((31&i)<<6|63&n);break;case 14:n=t[s++],a=t[s++],o+=String.fromCharCode((15&i)<<12|(63&n)<<6|(63&a)<<0)}}return o},t}(),a=n._utf8ArrayToStr;e.a=n},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=r(29),a=r.n(n),o=r(61),s=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),f=function(){function t(){var e;i(this,t),this._url=null,this._byteRange=null,this._decryptdata=null,this.tagList=[],this._elementaryStreams=(e={},e[t.ElementaryStreamTypes.AUDIO]=!1,e[t.ElementaryStreamTypes.VIDEO]=!1,e)}return t.prototype.addElementaryStream=function(t){this._elementaryStreams[t]=!0},t.prototype.hasElementaryStream=function(t){return!0===this._elementaryStreams[t]},t.prototype.createInitializationVector=function(t){for(var e=new Uint8Array(16),r=12;r<16;r++)e[r]=t>>8*(15-r)&255;return e},t.prototype.fragmentDecryptdataFromLevelkey=function(t,e){var r=t;return t&&t.method&&t.uri&&!t.iv&&(r=new o.a,r.method=t.method,r.baseuri=t.baseuri,r.reluri=t.reluri,r.iv=this.createInitializationVector(e)),r},s(t,[{key:"url",get:function(){return!this._url&&this.relurl&&(this._url=a.a.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url},set:function(t){this._url=t}},{key:"programDateTime",get:function(){return!this._programDateTime&&this.rawProgramDateTime&&(this._programDateTime=new Date(Date.parse(this.rawProgramDateTime))),this._programDateTime}},{key:"byteRange",get:function(){if(!this._byteRange&&!this.rawByteRange)return[];if(this._byteRange)return this._byteRange;var t=[];if(this.rawByteRange){var e=this.rawByteRange.split("@",2);if(1===e.length){var r=this.lastByteRangeEndOffset;t[0]=r||0}else t[0]=parseInt(e[1]);t[1]=parseInt(e[0])+t[0],this._byteRange=t}return t}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"decryptdata",get:function(){return this._decryptdata||(this._decryptdata=this.fragmentDecryptdataFromLevelkey(this.levelkey,this.sn)),this._decryptdata}},{key:"encrypted",get:function(){return!(!this.decryptdata||null===this.decryptdata.uri||null!==this.decryptdata.key)}}],[{key:"ElementaryStreamTypes",get:function(){return{AUDIO:"audio",VIDEO:"video"}}}]),t}();e.a=f},function(t,e,r){"use strict";function i(t,e){t[e>>5]|=128<<e%32,t[14+(e+64>>>9<<4)]=e;for(var r=1732584193,i=-271733879,n=-1732584194,h=271733878,u=0;u<t.length;u+=16){var d=r,l=i,p=n,b=h;r=a(r,i,n,h,t[u+0],7,-680876936),h=a(h,r,i,n,t[u+1],12,-389564586),n=a(n,h,r,i,t[u+2],17,606105819),i=a(i,n,h,r,t[u+3],22,-1044525330),r=a(r,i,n,h,t[u+4],7,-176418897),h=a(h,r,i,n,t[u+5],12,1200080426),n=a(n,h,r,i,t[u+6],17,-1473231341),i=a(i,n,h,r,t[u+7],22,-45705983),r=a(r,i,n,h,t[u+8],7,1770035416),h=a(h,r,i,n,t[u+9],12,-1958414417),n=a(n,h,r,i,t[u+10],17,-42063),i=a(i,n,h,r,t[u+11],22,-1990404162),r=a(r,i,n,h,t[u+12],7,1804603682),h=a(h,r,i,n,t[u+13],12,-40341101),n=a(n,h,r,i,t[u+14],17,-1502002290),i=a(i,n,h,r,t[u+15],22,1236535329),r=o(r,i,n,h,t[u+1],5,-165796510),h=o(h,r,i,n,t[u+6],9,-1069501632),n=o(n,h,r,i,t[u+11],14,643717713),i=o(i,n,h,r,t[u+0],20,-373897302),r=o(r,i,n,h,t[u+5],5,-701558691),h=o(h,r,i,n,t[u+10],9,38016083),n=o(n,h,r,i,t[u+15],14,-660478335),i=o(i,n,h,r,t[u+4],20,-405537848),r=o(r,i,n,h,t[u+9],5,568446438),h=o(h,r,i,n,t[u+14],9,-1019803690),n=o(n,h,r,i,t[u+3],14,-187363961),i=o(i,n,h,r,t[u+8],20,1163531501),r=o(r,i,n,h,t[u+13],5,-1444681467),h=o(h,r,i,n,t[u+2],9,-51403784),n=o(n,h,r,i,t[u+7],14,1735328473),i=o(i,n,h,r,t[u+12],20,-1926607734),r=s(r,i,n,h,t[u+5],4,-378558),h=s(h,r,i,n,t[u+8],11,-2022574463),n=s(n,h,r,i,t[u+11],16,1839030562),i=s(i,n,h,r,t[u+14],23,-35309556),r=s(r,i,n,h,t[u+1],4,-1530992060),h=s(h,r,i,n,t[u+4],11,1272893353),n=s(n,h,r,i,t[u+7],16,-155497632),i=s(i,n,h,r,t[u+10],23,-1094730640),r=s(r,i,n,h,t[u+13],4,681279174),h=s(h,r,i,n,t[u+0],11,-358537222),n=s(n,h,r,i,t[u+3],16,-722521979),i=s(i,n,h,r,t[u+6],23,76029189),r=s(r,i,n,h,t[u+9],4,-640364487),h=s(h,r,i,n,t[u+12],11,-421815835),n=s(n,h,r,i,t[u+15],16,530742520),i=s(i,n,h,r,t[u+2],23,-995338651),r=f(r,i,n,h,t[u+0],6,-198630844),h=f(h,r,i,n,t[u+7],10,1126891415),n=f(n,h,r,i,t[u+14],15,-1416354905),i=f(i,n,h,r,t[u+5],21,-57434055),r=f(r,i,n,h,t[u+12],6,1700485571),h=f(h,r,i,n,t[u+3],10,-1894986606),n=f(n,h,r,i,t[u+10],15,-1051523),i=f(i,n,h,r,t[u+1],21,-2054922799),r=f(r,i,n,h,t[u+8],6,1873313359),h=f(h,r,i,n,t[u+15],10,-30611744),n=f(n,h,r,i,t[u+6],15,-1560198380),i=f(i,n,h,r,t[u+13],21,1309151649),r=f(r,i,n,h,t[u+4],6,-145523070),h=f(h,r,i,n,t[u+11],10,-1120210379),n=f(n,h,r,i,t[u+2],15,718787259),i=f(i,n,h,r,t[u+9],21,-343485551),r=c(r,d),i=c(i,l),n=c(n,p),h=c(h,b)}return[r,i,n,h]}function n(t,e,r,i,n,a){return c(h(c(c(e,t),c(i,a)),n),r)}function a(t,e,r,i,a,o,s){return n(e&r|~e&i,t,e,a,o,s)}function o(t,e,r,i,a,o,s){return n(e&i|r&~i,t,e,a,o,s)}function s(t,e,r,i,a,o,s){return n(e^r^i,t,e,a,o,s)}function f(t,e,r,i,a,o,s){return n(r^(e|~i),t,e,a,o,s)}function c(t,e){var r=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(r>>16)<<16|65535&r}function h(t,e){return t<<e|t>>>32-e}var u=r(120);t.exports=function(t){return u(t,i)}},function(t,e,r){"use strict";(function(e){function i(){u.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function n(t,e){return t<<e|t>>>32-e}function a(t,e,r,i,a,o,s,f){return n(t+(e^r^i)+o+s|0,f)+a|0}function o(t,e,r,i,a,o,s,f){return n(t+(e&r|~e&i)+o+s|0,f)+a|0}function s(t,e,r,i,a,o,s,f){return n(t+((e|~r)^i)+o+s|0,f)+a|0}function f(t,e,r,i,a,o,s,f){return n(t+(e&i|r&~i)+o+s|0,f)+a|0}function c(t,e,r,i,a,o,s,f){return n(t+(e^(r|~i))+o+s|0,f)+a|0}var h=r(0),u=r(121);h(i,u),i.prototype._update=function(){for(var t=new Array(16),e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,i=this._b,h=this._c,u=this._d,d=this._e;r=a(r,i,h,u,d,t[0],0,11),h=n(h,10),d=a(d,r,i,h,u,t[1],0,14),i=n(i,10),u=a(u,d,r,i,h,t[2],0,15),r=n(r,10),h=a(h,u,d,r,i,t[3],0,12),d=n(d,10),i=a(i,h,u,d,r,t[4],0,5),u=n(u,10),r=a(r,i,h,u,d,t[5],0,8),h=n(h,10),d=a(d,r,i,h,u,t[6],0,7),i=n(i,10),u=a(u,d,r,i,h,t[7],0,9),r=n(r,10),h=a(h,u,d,r,i,t[8],0,11),d=n(d,10),i=a(i,h,u,d,r,t[9],0,13),u=n(u,10),r=a(r,i,h,u,d,t[10],0,14),h=n(h,10),d=a(d,r,i,h,u,t[11],0,15),i=n(i,10),u=a(u,d,r,i,h,t[12],0,6),r=n(r,10),h=a(h,u,d,r,i,t[13],0,7),d=n(d,10),i=a(i,h,u,d,r,t[14],0,9),u=n(u,10),r=a(r,i,h,u,d,t[15],0,8),h=n(h,10),d=o(d,r,i,h,u,t[7],1518500249,7),i=n(i,10),u=o(u,d,r,i,h,t[4],1518500249,6),r=n(r,10),h=o(h,u,d,r,i,t[13],1518500249,8),d=n(d,10),i=o(i,h,u,d,r,t[1],1518500249,13),u=n(u,10),r=o(r,i,h,u,d,t[10],1518500249,11),h=n(h,10),d=o(d,r,i,h,u,t[6],1518500249,9),i=n(i,10),u=o(u,d,r,i,h,t[15],1518500249,7),r=n(r,10),h=o(h,u,d,r,i,t[3],1518500249,15),d=n(d,10),i=o(i,h,u,d,r,t[12],1518500249,7),u=n(u,10),r=o(r,i,h,u,d,t[0],1518500249,12),h=n(h,10),d=o(d,r,i,h,u,t[9],1518500249,15),i=n(i,10),u=o(u,d,r,i,h,t[5],1518500249,9),r=n(r,10),h=o(h,u,d,r,i,t[2],1518500249,11),d=n(d,10),i=o(i,h,u,d,r,t[14],1518500249,7),u=n(u,10),r=o(r,i,h,u,d,t[11],1518500249,13),h=n(h,10),d=o(d,r,i,h,u,t[8],1518500249,12),i=n(i,10),u=s(u,d,r,i,h,t[3],1859775393,11),r=n(r,10),h=s(h,u,d,r,i,t[10],1859775393,13),d=n(d,10),i=s(i,h,u,d,r,t[14],1859775393,6),u=n(u,10),r=s(r,i,h,u,d,t[4],1859775393,7),h=n(h,10),d=s(d,r,i,h,u,t[9],1859775393,14),i=n(i,10),u=s(u,d,r,i,h,t[15],1859775393,9),r=n(r,10),h=s(h,u,d,r,i,t[8],1859775393,13),d=n(d,10),i=s(i,h,u,d,r,t[1],1859775393,15),u=n(u,10),r=s(r,i,h,u,d,t[2],1859775393,14),h=n(h,10),d=s(d,r,i,h,u,t[7],1859775393,8),i=n(i,10),u=s(u,d,r,i,h,t[0],1859775393,13),r=n(r,10),h=s(h,u,d,r,i,t[6],1859775393,6),d=n(d,10),i=s(i,h,u,d,r,t[13],1859775393,5),u=n(u,10),r=s(r,i,h,u,d,t[11],1859775393,12),h=n(h,10),d=s(d,r,i,h,u,t[5],1859775393,7),i=n(i,10),u=s(u,d,r,i,h,t[12],1859775393,5),r=n(r,10),h=f(h,u,d,r,i,t[1],2400959708,11),d=n(d,10),i=f(i,h,u,d,r,t[9],2400959708,12),u=n(u,10),r=f(r,i,h,u,d,t[11],2400959708,14),h=n(h,10),d=f(d,r,i,h,u,t[10],2400959708,15),i=n(i,10),u=f(u,d,r,i,h,t[0],2400959708,14),r=n(r,10),h=f(h,u,d,r,i,t[8],2400959708,15),d=n(d,10),i=f(i,h,u,d,r,t[12],2400959708,9),u=n(u,10),r=f(r,i,h,u,d,t[4],2400959708,8),h=n(h,10),d=f(d,r,i,h,u,t[13],2400959708,9),i=n(i,10),u=f(u,d,r,i,h,t[3],2400959708,14),r=n(r,10),h=f(h,u,d,r,i,t[7],2400959708,5),d=n(d,10),i=f(i,h,u,d,r,t[15],2400959708,6),u=n(u,10),r=f(r,i,h,u,d,t[14],2400959708,8),h=n(h,10),d=f(d,r,i,h,u,t[5],2400959708,6),i=n(i,10),u=f(u,d,r,i,h,t[6],2400959708,5),r=n(r,10),h=f(h,u,d,r,i,t[2],2400959708,12),d=n(d,10),i=c(i,h,u,d,r,t[4],2840853838,9),u=n(u,10),r=c(r,i,h,u,d,t[0],2840853838,15),h=n(h,10),d=c(d,r,i,h,u,t[5],2840853838,5),i=n(i,10),u=c(u,d,r,i,h,t[9],2840853838,11),r=n(r,10),h=c(h,u,d,r,i,t[7],2840853838,6),d=n(d,10),i=c(i,h,u,d,r,t[12],2840853838,8),u=n(u,10),r=c(r,i,h,u,d,t[2],2840853838,13),h=n(h,10),d=c(d,r,i,h,u,t[10],2840853838,12),i=n(i,10),u=c(u,d,r,i,h,t[14],2840853838,5),r=n(r,10),h=c(h,u,d,r,i,t[1],2840853838,12),d=n(d,10),i=c(i,h,u,d,r,t[3],2840853838,13),u=n(u,10),r=c(r,i,h,u,d,t[8],2840853838,14),h=n(h,10),d=c(d,r,i,h,u,t[11],2840853838,11),i=n(i,10),u=c(u,d,r,i,h,t[6],2840853838,8),r=n(r,10),h=c(h,u,d,r,i,t[15],2840853838,5),d=n(d,10),i=c(i,h,u,d,r,t[13],2840853838,6),u=n(u,10);var l=this._a,p=this._b,b=this._c,g=this._d,v=this._e;l=c(l,p,b,g,v,t[5],1352829926,8),b=n(b,10),v=c(v,l,p,b,g,t[14],1352829926,9),p=n(p,10),g=c(g,v,l,p,b,t[7],1352829926,9),l=n(l,10),b=c(b,g,v,l,p,t[0],1352829926,11),v=n(v,10),p=c(p,b,g,v,l,t[9],1352829926,13),g=n(g,10),l=c(l,p,b,g,v,t[2],1352829926,15),b=n(b,10),v=c(v,l,p,b,g,t[11],1352829926,15),p=n(p,10),g=c(g,v,l,p,b,t[4],1352829926,5),l=n(l,10),b=c(b,g,v,l,p,t[13],1352829926,7),v=n(v,10),p=c(p,b,g,v,l,t[6],1352829926,7),g=n(g,10),l=c(l,p,b,g,v,t[15],1352829926,8),b=n(b,10),v=c(v,l,p,b,g,t[8],1352829926,11),p=n(p,10),g=c(g,v,l,p,b,t[1],1352829926,14),l=n(l,10),b=c(b,g,v,l,p,t[10],1352829926,14),v=n(v,10),p=c(p,b,g,v,l,t[3],1352829926,12),g=n(g,10),l=c(l,p,b,g,v,t[12],1352829926,6),b=n(b,10),v=f(v,l,p,b,g,t[6],1548603684,9),p=n(p,10),g=f(g,v,l,p,b,t[11],1548603684,13),l=n(l,10),b=f(b,g,v,l,p,t[3],1548603684,15),v=n(v,10),p=f(p,b,g,v,l,t[7],1548603684,7),g=n(g,10),l=f(l,p,b,g,v,t[0],1548603684,12),b=n(b,10),v=f(v,l,p,b,g,t[13],1548603684,8),p=n(p,10),g=f(g,v,l,p,b,t[5],1548603684,9),l=n(l,10),b=f(b,g,v,l,p,t[10],1548603684,11),v=n(v,10),p=f(p,b,g,v,l,t[14],1548603684,7),g=n(g,10),l=f(l,p,b,g,v,t[15],1548603684,7),b=n(b,10),v=f(v,l,p,b,g,t[8],1548603684,12),p=n(p,10),g=f(g,v,l,p,b,t[12],1548603684,7),l=n(l,10),b=f(b,g,v,l,p,t[4],1548603684,6),v=n(v,10),p=f(p,b,g,v,l,t[9],1548603684,15),g=n(g,10),l=f(l,p,b,g,v,t[1],1548603684,13),b=n(b,10),v=f(v,l,p,b,g,t[2],1548603684,11),p=n(p,10),g=s(g,v,l,p,b,t[15],1836072691,9),l=n(l,10),b=s(b,g,v,l,p,t[5],1836072691,7),v=n(v,10),p=s(p,b,g,v,l,t[1],1836072691,15),g=n(g,10),l=s(l,p,b,g,v,t[3],1836072691,11),b=n(b,10),v=s(v,l,p,b,g,t[7],1836072691,8),p=n(p,10),g=s(g,v,l,p,b,t[14],1836072691,6),l=n(l,10),b=s(b,g,v,l,p,t[6],1836072691,6),v=n(v,10),p=s(p,b,g,v,l,t[9],1836072691,14),g=n(g,10),l=s(l,p,b,g,v,t[11],1836072691,12),b=n(b,10),v=s(v,l,p,b,g,t[8],1836072691,13),p=n(p,10),g=s(g,v,l,p,b,t[12],1836072691,5),l=n(l,10),b=s(b,g,v,l,p,t[2],1836072691,14),v=n(v,10),p=s(p,b,g,v,l,t[10],1836072691,13),g=n(g,10),l=s(l,p,b,g,v,t[0],1836072691,13),b=n(b,10),v=s(v,l,p,b,g,t[4],1836072691,7),p=n(p,10),g=s(g,v,l,p,b,t[13],1836072691,5),l=n(l,10),b=o(b,g,v,l,p,t[8],2053994217,15),v=n(v,10),p=o(p,b,g,v,l,t[6],2053994217,5),g=n(g,10),l=o(l,p,b,g,v,t[4],2053994217,8),b=n(b,10),v=o(v,l,p,b,g,t[1],2053994217,11),p=n(p,10),g=o(g,v,l,p,b,t[3],2053994217,14),l=n(l,10),b=o(b,g,v,l,p,t[11],2053994217,14),v=n(v,10),p=o(p,b,g,v,l,t[15],2053994217,6),g=n(g,10),l=o(l,p,b,g,v,t[0],2053994217,14),b=n(b,10),v=o(v,l,p,b,g,t[5],2053994217,6),p=n(p,10),g=o(g,v,l,p,b,t[12],2053994217,9),l=n(l,10),b=o(b,g,v,l,p,t[2],2053994217,12),v=n(v,10),p=o(p,b,g,v,l,t[13],2053994217,9),g=n(g,10),l=o(l,p,b,g,v,t[9],2053994217,12),b=n(b,10),v=o(v,l,p,b,g,t[7],2053994217,5),p=n(p,10),g=o(g,v,l,p,b,t[10],2053994217,15),l=n(l,10),b=o(b,g,v,l,p,t[14],2053994217,8),v=n(v,10),p=a(p,b,g,v,l,t[12],0,8),g=n(g,10),l=a(l,p,b,g,v,t[15],0,5),b=n(b,10),v=a(v,l,p,b,g,t[10],0,12),p=n(p,10),g=a(g,v,l,p,b,t[4],0,9),l=n(l,10),b=a(b,g,v,l,p,t[1],0,12),v=n(v,10),p=a(p,b,g,v,l,t[5],0,5),g=n(g,10),l=a(l,p,b,g,v,t[8],0,14),b=n(b,10),v=a(v,l,p,b,g,t[7],0,6),p=n(p,10),g=a(g,v,l,p,b,t[6],0,8),l=n(l,10),b=a(b,g,v,l,p,t[2],0,13),v=n(v,10),p=a(p,b,g,v,l,t[13],0,6),g=n(g,10),l=a(l,p,b,g,v,t[14],0,5),b=n(b,10),v=a(v,l,p,b,g,t[0],0,15),p=n(p,10),g=a(g,v,l,p,b,t[3],0,13),l=n(l,10),b=a(b,g,v,l,p,t[9],0,11),v=n(v,10),p=a(p,b,g,v,l,t[11],0,11),g=n(g,10);var y=this._b+h+g|0;this._b=this._c+u+v|0,this._c=this._d+d+l|0,this._d=this._e+r+p|0,this._e=this._a+i+b|0,this._a=y},i.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=new e(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},t.exports=i}).call(e,r(4).Buffer)},function(t,e,r){e=t.exports=r(64),e.Stream=e,e.Readable=e,e.Writable=r(45),e.Duplex=r(16),e.Transform=r(67),e.PassThrough=r(127)},function(t,e,r){"use strict";(function(e,i,n){function a(t){var e=this;this.next=null,this.entry=null,this.finish=function(){k(e,t)}}function o(t){return C.from(t)}function s(t){return C.isBuffer(t)||t instanceof P}function f(){}function c(t,e){I=I||r(16),t=t||{},this.objectMode=!!t.objectMode,e instanceof I&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,n=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===t.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){y(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function h(t){if(I=I||r(16),!(N.call(h,this)||this instanceof I))return new h(t);this._writableState=new c(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),O.call(this)}function u(t,e){var r=new Error("write after end");t.emit("error",r),D(e,r)}function d(t,e,r,i){var n=!0,a=!1;return null===r?a=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||e.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(t.emit("error",a),D(i,a),n=!1),n}function l(t,e,r){return t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=C.from(e,r)),e}function p(t,e,r,i,n,a){if(!r){var o=l(e,i,n);i!==o&&(r=!0,n="buffer",i=o)}var s=e.objectMode?1:i.length;e.length+=s;var f=e.length<e.highWaterMark;if(f||(e.needDrain=!0),e.writing||e.corked){var c=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:a,next:null},c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else b(t,e,!1,s,i,n,a);return f}function b(t,e,r,i,n,a,o){e.writelen=i,e.writecb=o,e.writing=!0,e.sync=!0,r?t._writev(n,e.onwrite):t._write(n,a,e.onwrite),e.sync=!1}function g(t,e,r,i,n){--e.pendingcb,r?(D(n,i),D(T,t,e),t._writableState.errorEmitted=!0,t.emit("error",i)):(n(i),t._writableState.errorEmitted=!0,t.emit("error",i),T(t,e))}function v(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function y(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(v(r),e)g(t,r,i,e,n);else{var a=S(r);a||r.corked||r.bufferProcessing||!r.bufferedRequest||w(t,r),i?M(m,t,r,a,n):m(t,r,a,n)}}function m(t,e,r,i){r||_(t,e),e.pendingcb--,i(),T(t,e)}function _(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function w(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),o=e.corkedRequestsFree;o.entry=r;for(var s=0,f=!0;r;)n[s]=r,r.isBuf||(f=!1),r=r.next,s+=1;n.allBuffers=f,b(t,e,!0,e.length,n,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new a(e)}else{for(;r;){var c=r.chunk,h=r.encoding,u=r.callback;if(b(t,e,!1,e.objectMode?1:c.length,c,h,u),r=r.next,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequestCount=0,e.bufferedRequest=r,e.bufferProcessing=!1}function S(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function E(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),T(t,e)})}function A(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,D(E,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function T(t,e){var r=S(e);return r&&(A(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),r}function R(t,e,r){e.ending=!0,T(t,e),r&&(e.finished?D(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function k(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}var D=r(31);t.exports=h;var I,M=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?i:D;h.WritableState=c;var x=r(24);x.inherits=r(0);var L={deprecate:r(126)},O=r(65),C=r(3).Buffer,P=n.Uint8Array||function(){},B=r(66);x.inherits(h,O),c.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(c.prototype,"buffer",{get:L.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}();var N;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(N=Function.prototype[Symbol.hasInstance],Object.defineProperty(h,Symbol.hasInstance,{value:function(t){return!!N.call(this,t)||t&&t._writableState instanceof c}})):N=function(t){return t instanceof this},h.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},h.prototype.write=function(t,e,r){var i=this._writableState,n=!1,a=s(t)&&!i.objectMode;return a&&!C.isBuffer(t)&&(t=o(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=i.defaultEncoding),"function"!=typeof r&&(r=f),i.ended?u(this,r):(a||d(this,i,t,r))&&(i.pendingcb++,n=p(this,i,a,t,e,r)),n},h.prototype.cork=function(){this._writableState.corked++},h.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||w(this,t))},h.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},h.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},h.prototype._writev=null,h.prototype.end=function(t,e,r){var i=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!==t&&void 0!==t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||i.finished||R(this,i,r)},Object.defineProperty(h.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),h.prototype.destroy=B.destroy,h.prototype._undestroy=B.undestroy,h.prototype._destroy=function(t,e){this.end(),e(t)}}).call(e,r(14),r(124).setImmediate,r(13))},function(t,e,r){function i(t){if(t&&!f(t))throw new Error("Unknown encoding: "+t)}function n(t){return t.toString(this.encoding)}function a(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function o(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}var s=r(4).Buffer,f=s.isEncoding||function(t){switch(t&&t.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}},c=e.StringDecoder=function(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),i(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=a;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=o;break;default:return void(this.write=n)}this.charBuffer=new s(6),this.charReceived=0,this.charLength=0};c.prototype.write=function(t){for(var e="";this.charLength;){var r=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";t=t.slice(r,t.length),e=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var i=e.charCodeAt(e.length-1);if(!(i>=55296&&i<=56319)){if(this.charReceived=this.charLength=0,0===t.length)return e;break}this.charLength+=this.surrogateSize,e=""}this.detectIncompleteChar(t);var n=t.length;this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,n),n-=this.charReceived),e+=t.toString(this.encoding,0,n);var n=e.length-1,i=e.charCodeAt(n);if(i>=55296&&i<=56319){var a=this.surrogateSize;return this.charLength+=a,this.charReceived+=a,this.charBuffer.copy(this.charBuffer,a,0,a),t.copy(this.charBuffer,0,0,a),e.substring(0,n)}return e},c.prototype.detectIncompleteChar=function(t){for(var e=t.length>=3?3:t.length;e>0;e--){var r=t[t.length-e];if(1==e&&r>>5==6){this.charLength=2;break}if(e<=2&&r>>4==14){this.charLength=3;break}if(e<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=e},c.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var r=this.charReceived,i=this.charBuffer,n=this.encoding;e+=i.slice(0,r).toString(n)}return e}},function(t,e,r){var e=t.exports=function(t){t=t.toLowerCase();var r=e[t];if(!r)throw new Error(t+" is not supported (we accept pull requests)");return new r};e.sha=r(132),e.sha1=r(133),e.sha224=r(134),e.sha256=r(68),e.sha384=r(135),e.sha512=r(69)},function(t,e,r){function i(){return Object.keys(o)}var n=r(142),a=r(150),o=r(78);e.createCipher=e.Cipher=n.createCipher,e.createCipheriv=e.Cipheriv=n.createCipheriv,e.createDecipher=e.Decipher=a.createDecipher,e.createDecipheriv=e.Decipheriv=a.createDecipheriv,e.listCiphers=e.getCiphers=i},function(t,e,r){var i={ECB:r(143),CBC:r(144),CFB:r(145),CFB8:r(146),CFB1:r(147),OFB:r(148),CTR:r(76),GCM:r(76)},n=r(78);for(var a in n)n[a].module=i[n[a].mode];t.exports=n},function(t,e,r){"use strict";e.utils=r(152),e.Cipher=r(153),e.DES=r(154),e.CBC=r(155),e.EDE=r(156)},function(t,e,r){(function(e){function i(t){var e=a(t);return{blinder:e.toRed(o.mont(t.modulus)).redPow(new o(t.publicExponent)).fromRed(),unblinder:e.invm(t.modulus)}}function n(t,r){var n=i(r),a=r.modulus.byteLength(),s=(o.mont(r.modulus),new o(t).mul(n.blinder).umod(r.modulus)),f=s.toRed(o.mont(r.prime1)),c=s.toRed(o.mont(r.prime2)),h=r.coefficient,u=r.prime1,d=r.prime2,l=f.redPow(r.exponent1),p=c.redPow(r.exponent2);l=l.fromRed(),p=p.fromRed();var b=l.isub(p).imul(h).umod(u);return b.imul(d),p.iadd(b),new e(p.imul(n.unblinder).umod(r.modulus).toArray(!1,a))}function a(t){for(var e=t.modulus.byteLength(),r=new o(s(e));r.cmp(t.modulus)>=0||!r.umod(t.prime1)||!r.umod(t.prime2);)r=new o(s(e));return r}var o=r(6),s=r(19);t.exports=n,n.getr=a}).call(e,r(4).Buffer)},function(t,e,r){var i=e;i.utils=r(12),i.common=r(26),i.sha=r(173),i.ripemd=r(177),i.hmac=r(178),i.sha1=i.sha.sha1,i.sha256=i.sha.sha256,i.sha224=i.sha.sha224,i.sha384=i.sha.sha384,i.sha512=i.sha.sha512,i.ripemd160=i.ripemd.ripemd160},function(t,e,r){"use strict";function i(){return new d(null)}function n(t,e){return new d(t,e)}function a(t,e){var r=_[t.charCodeAt(e)];return null==r?-1:r}function o(t){var e=i();return e.fromInt(t),e}function s(t){var e,r=1;return 0!=(e=t>>>16)&&(t=e,r+=16),0!=(e=t>>8)&&(t=e,r+=8),0!=(e=t>>4)&&(t=e,r+=4),0!=(e=t>>2)&&(t=e,r+=2),0!=(e=t>>1)&&(t=e,r+=1),r}r.d(e,"a",function(){return d}),e.b=i,e.c=n;var f,c=r(97),h=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],u=(1<<26)/h[h.length-1],d=function(){function t(t,e,r){null!=t&&("number"==typeof t?this.fromNumber(t,e,r):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}return t.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var r,i=(1<<e)-1,n=!1,a="",o=this.t,s=this.DB-o*this.DB%e;if(o-- >0)for(s<this.DB&&(r=this[o]>>s)>0&&(n=!0,a=Object(c.b)(r));o>=0;)s<e?(r=(this[o]&(1<<s)-1)<<e-s,r|=this[--o]>>(s+=this.DB-e)):(r=this[o]>>(s-=e)&i,s<=0&&(s+=this.DB,--o)),r>0&&(n=!0),n&&(a+=Object(c.b)(r));return n?a:"0"},t.prototype.negate=function(){var e=i();return t.ZERO.subTo(this,e),e},t.prototype.abs=function(){return this.s<0?this.negate():this},t.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;if(0!=(e=r-t.t))return this.s<0?-e:e;for(;--r>=0;)if(0!=(e=this[r]-t[r]))return e;return 0},t.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+s(this[this.t-1]^this.s&this.DM)},t.prototype.mod=function(e){var r=i();return this.abs().divRemTo(e,null,r),this.s<0&&r.compareTo(t.ZERO)>0&&e.subTo(r,r),r},t.prototype.modPowInt=function(t,e){var r;return r=t<256||e.isEven()?new p(e):new b(e),this.exp(t,r)},t.prototype.clone=function(){var t=i();return this.copyTo(t),t},t.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},t.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},t.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},t.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},t.prototype.toByteArray=function(){var t=this.t,e=[];e[0]=this.s;var r,i=this.DB-t*this.DB%8,n=0;if(t-- >0)for(i<this.DB&&(r=this[t]>>i)!=(this.s&this.DM)>>i&&(e[n++]=r|this.s<<this.DB-i);t>=0;)i<8?(r=(this[t]&(1<<i)-1)<<8-i,r|=this[--t]>>(i+=this.DB-8)):(r=this[t]>>(i-=8)&255,i<=0&&(i+=this.DB,--t)),0!=(128&r)&&(r|=-256),0==n&&(128&this.s)!=(128&r)&&++n,(n>0||r!=this.s)&&(e[n++]=r);return e},t.prototype.equals=function(t){return 0==this.compareTo(t)},t.prototype.min=function(t){return this.compareTo(t)<0?this:t},t.prototype.max=function(t){return this.compareTo(t)>0?this:t},t.prototype.and=function(t){var e=i();return this.bitwiseTo(t,c.d,e),e},t.prototype.or=function(t){var e=i();return this.bitwiseTo(t,c.f,e),e},t.prototype.xor=function(t){var e=i();return this.bitwiseTo(t,c.g,e),e},t.prototype.andNot=function(t){var e=i();return this.bitwiseTo(t,c.e,e),e},t.prototype.not=function(){for(var t=i(),e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},t.prototype.shiftLeft=function(t){var e=i();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},t.prototype.shiftRight=function(t){var e=i();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},t.prototype.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+Object(c.c)(this[t]);return this.s<0?this.t*this.DB:-1},t.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,r=0;r<this.t;++r)t+=Object(c.a)(this[r]^e);return t},t.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:0!=(this[e]&1<<t%this.DB)},t.prototype.setBit=function(t){return this.changeBit(t,c.f)},t.prototype.clearBit=function(t){return this.changeBit(t,c.e)},t.prototype.flipBit=function(t){return this.changeBit(t,c.g)},t.prototype.add=function(t){var e=i();return this.addTo(t,e),e},t.prototype.subtract=function(t){var e=i();return this.subTo(t,e),e},t.prototype.multiply=function(t){var e=i();return this.multiplyTo(t,e),e},t.prototype.divide=function(t){var e=i();return this.divRemTo(t,e,null),e},t.prototype.remainder=function(t){var e=i();return this.divRemTo(t,null,e),e},t.prototype.divideAndRemainder=function(t){var e=i(),r=i();return this.divRemTo(t,e,r),[e,r]},t.prototype.modPow=function(t,e){var r,n,a=t.bitLength(),f=o(1);if(a<=0)return f;r=a<18?1:a<48?3:a<144?4:a<768?5:6,n=a<8?new p(e):e.isEven()?new g(e):new b(e);var c=[],h=3,u=r-1,d=(1<<r)-1;if(c[1]=n.convert(this),r>1){var l=i();for(n.sqrTo(c[1],l);h<=d;)c[h]=i(),n.mulTo(l,c[h-2],c[h]),h+=2}var v,y,m=t.t-1,_=!0,w=i();for(a=s(t[m])-1;m>=0;){for(a>=u?v=t[m]>>a-u&d:(v=(t[m]&(1<<a+1)-1)<<u-a,m>0&&(v|=t[m-1]>>this.DB+a-u)),h=r;0==(1&v);)v>>=1,--h;if((a-=h)<0&&(a+=this.DB,--m),_)c[v].copyTo(f),_=!1;else{for(;h>1;)n.sqrTo(f,w),n.sqrTo(w,f),h-=2;h>0?n.sqrTo(f,w):(y=f,f=w,w=y),n.mulTo(w,c[v],f)}for(;m>=0&&0==(t[m]&1<<a);)n.sqrTo(f,w),y=f,f=w,w=y,--a<0&&(a=this.DB-1,--m)}return n.revert(f)},t.prototype.modInverse=function(e){var r=e.isEven();if(this.isEven()&&r||0==e.signum())return t.ZERO;for(var i=e.clone(),n=this.clone(),a=o(1),s=o(0),f=o(0),c=o(1);0!=i.signum();){for(;i.isEven();)i.rShiftTo(1,i),r?(a.isEven()&&s.isEven()||(a.addTo(this,a),s.subTo(e,s)),a.rShiftTo(1,a)):s.isEven()||s.subTo(e,s),s.rShiftTo(1,s);for(;n.isEven();)n.rShiftTo(1,n),r?(f.isEven()&&c.isEven()||(f.addTo(this,f),c.subTo(e,c)),f.rShiftTo(1,f)):c.isEven()||c.subTo(e,c),c.rShiftTo(1,c);i.compareTo(n)>=0?(i.subTo(n,i),r&&a.subTo(f,a),s.subTo(c,s)):(n.subTo(i,n),r&&f.subTo(a,f),c.subTo(s,c))}return 0!=n.compareTo(t.ONE)?t.ZERO:c.compareTo(e)>=0?c.subtract(e):c.signum()<0?(c.addTo(e,c),c.signum()<0?c.add(e):c):c},t.prototype.pow=function(t){return this.exp(t,new l)},t.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(e.compareTo(r)<0){var i=e;e=r,r=i}var n=e.getLowestSetBit(),a=r.getLowestSetBit();if(a<0)return e;for(n<a&&(a=n),a>0&&(e.rShiftTo(a,e),r.rShiftTo(a,r));e.signum()>0;)(n=e.getLowestSetBit())>0&&e.rShiftTo(n,e),(n=r.getLowestSetBit())>0&&r.rShiftTo(n,r),e.compareTo(r)>=0?(e.subTo(r,e),e.rShiftTo(1,e)):(r.subTo(e,r),r.rShiftTo(1,r));return a>0&&r.lShiftTo(a,r),r},t.prototype.isProbablePrime=function(t){var e,r=this.abs();if(1==r.t&&r[0]<=h[h.length-1]){for(e=0;e<h.length;++e)if(r[0]==h[e])return!0;return!1}if(r.isEven())return!1;for(e=1;e<h.length;){for(var i=h[e],n=e+1;n<h.length&&i<u;)i*=h[n++];for(i=r.modInt(i);e<n;)if(i%h[e++]==0)return!1}return r.millerRabin(t)},t.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},t.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},t.prototype.fromString=function(e,r){var i;if(16==r)i=4;else if(8==r)i=3;else if(256==r)i=8;else if(2==r)i=1;else if(32==r)i=5;else{if(4!=r)return void this.fromRadix(e,r);i=2}this.t=0,this.s=0;for(var n=e.length,o=!1,s=0;--n>=0;){var f=8==i?255&+e[n]:a(e,n);f<0?"-"==e.charAt(n)&&(o=!0):(o=!1,0==s?this[this.t++]=f:s+i>this.DB?(this[this.t-1]|=(f&(1<<this.DB-s)-1)<<s,this[this.t++]=f>>this.DB-s):this[this.t-1]|=f<<s,(s+=i)>=this.DB&&(s-=this.DB))}8==i&&0!=(128&+e[0])&&(this.s=-1,s>0&&(this[this.t-1]|=(1<<this.DB-s)-1<<s)),this.clamp(),o&&t.ZERO.subTo(this,this)},t.prototype.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},t.prototype.dlShiftTo=function(t,e){var r;for(r=this.t-1;r>=0;--r)e[r+t]=this[r];for(r=t-1;r>=0;--r)e[r]=0;e.t=this.t+t,e.s=this.s},t.prototype.drShiftTo=function(t,e){for(var r=t;r<this.t;++r)e[r-t]=this[r];e.t=Math.max(this.t-t,0),e.s=this.s},t.prototype.lShiftTo=function(t,e){for(var r=t%this.DB,i=this.DB-r,n=(1<<i)-1,a=Math.floor(t/this.DB),o=this.s<<r&this.DM,s=this.t-1;s>=0;--s)e[s+a+1]=this[s]>>i|o,o=(this[s]&n)<<r;for(var s=a-1;s>=0;--s)e[s]=0;e[a]=o,e.t=this.t+a+1,e.s=this.s,e.clamp()},t.prototype.rShiftTo=function(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t)return void(e.t=0);var i=t%this.DB,n=this.DB-i,a=(1<<i)-1;e[0]=this[r]>>i;for(var o=r+1;o<this.t;++o)e[o-r-1]|=(this[o]&a)<<n,e[o-r]=this[o]>>i;i>0&&(e[this.t-r-1]|=(this.s&a)<<n),e.t=this.t-r,e.clamp()},t.prototype.subTo=function(t,e){for(var r=0,i=0,n=Math.min(t.t,this.t);r<n;)i+=this[r]-t[r],e[r++]=i&this.DM,i>>=this.DB;if(t.t<this.t){for(i-=t.s;r<this.t;)i+=this[r],e[r++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;r<t.t;)i-=t[r],e[r++]=i&this.DM,i>>=this.DB;i-=t.s}e.s=i<0?-1:0,i<-1?e[r++]=this.DV+i:i>0&&(e[r++]=i),e.t=r,e.clamp()},t.prototype.multiplyTo=function(e,r){var i=this.abs(),n=e.abs(),a=i.t;for(r.t=a+n.t;--a>=0;)r[a]=0;for(a=0;a<n.t;++a)r[a+i.t]=i.am(0,n[a],r,a,0,i.t);r.s=0,r.clamp(),this.s!=e.s&&t.ZERO.subTo(r,r)},t.prototype.squareTo=function(t){for(var e=this.abs(),r=t.t=2*e.t;--r>=0;)t[r]=0;for(r=0;r<e.t-1;++r){var i=e.am(r,e[r],t,2*r,0,1);(t[r+e.t]+=e.am(r+1,2*e[r],t,2*r+1,i,e.t-r-1))>=e.DV&&(t[r+e.t]-=e.DV,t[r+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(r,e[r],t,2*r,0,1)),t.s=0,t.clamp()},t.prototype.divRemTo=function(e,r,n){var a=e.abs();if(!(a.t<=0)){var o=this.abs();if(o.t<a.t)return null!=r&&r.fromInt(0),void(null!=n&&this.copyTo(n));null==n&&(n=i());var f=i(),c=this.s,h=e.s,u=this.DB-s(a[a.t-1]);u>0?(a.lShiftTo(u,f),o.lShiftTo(u,n)):(a.copyTo(f),o.copyTo(n));var d=f.t,l=f[d-1];if(0!=l){var p=l*(1<<this.F1)+(d>1?f[d-2]>>this.F2:0),b=this.FV/p,g=(1<<this.F1)/p,v=1<<this.F2,y=n.t,m=y-d,_=null==r?i():r;for(f.dlShiftTo(m,_),n.compareTo(_)>=0&&(n[n.t++]=1,n.subTo(_,n)),t.ONE.dlShiftTo(d,_),_.subTo(f,f);f.t<d;)f[f.t++]=0;for(;--m>=0;){var w=n[--y]==l?this.DM:Math.floor(n[y]*b+(n[y-1]+v)*g);if((n[y]+=f.am(0,w,n,m,0,d))<w)for(f.dlShiftTo(m,_),n.subTo(_,n);n[y]<--w;)n.subTo(_,n)}null!=r&&(n.drShiftTo(d,r),c!=h&&t.ZERO.subTo(r,r)),n.t=d,n.clamp(),u>0&&n.rShiftTo(u,n),c<0&&t.ZERO.subTo(n,n)}}},t.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return e=e*(2-(15&t)*e)&15,e=e*(2-(255&t)*e)&255,e=e*(2-((65535&t)*e&65535))&65535,e=e*(2-t*e%this.DV)%this.DV,e>0?this.DV-e:-e},t.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},t.prototype.exp=function(e,r){if(e>4294967295||e<1)return t.ONE;var n=i(),a=i(),o=r.convert(this),f=s(e)-1;for(o.copyTo(n);--f>=0;)if(r.sqrTo(n,a),(e&1<<f)>0)r.mulTo(a,o,n);else{var c=n;n=a,a=c}return r.revert(n)},t.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},t.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),r=Math.pow(t,e),n=o(r),a=i(),s=i(),f="";for(this.divRemTo(n,a,s);a.signum()>0;)f=(r+s.intValue()).toString(t).substr(1)+f,a.divRemTo(n,a,s);return s.intValue().toString(t)+f},t.prototype.fromRadix=function(e,r){this.fromInt(0),null==r&&(r=10);for(var i=this.chunkSize(r),n=Math.pow(r,i),o=!1,s=0,f=0,c=0;c<e.length;++c){var h=a(e,c);h<0?"-"==e.charAt(c)&&0==this.signum()&&(o=!0):(f=r*f+h,++s>=i&&(this.dMultiply(n),this.dAddOffset(f,0),s=0,f=0))}s>0&&(this.dMultiply(Math.pow(r,s)),this.dAddOffset(f,0)),o&&t.ZERO.subTo(this,this)},t.prototype.fromNumber=function(e,r,i){if("number"==typeof r)if(e<2)this.fromInt(1);else for(this.fromNumber(e,i),this.testBit(e-1)||this.bitwiseTo(t.ONE.shiftLeft(e-1),c.f,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(r);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(t.ONE.shiftLeft(e-1),this);else{var n=[],a=7&e;n.length=1+(e>>3),r.nextBytes(n),a>0?n[0]&=(1<<a)-1:n[0]=0,this.fromString(n,256)}},t.prototype.bitwiseTo=function(t,e,r){var i,n,a=Math.min(t.t,this.t);for(i=0;i<a;++i)r[i]=e(this[i],t[i]);if(t.t<this.t){for(n=t.s&this.DM,i=a;i<this.t;++i)r[i]=e(this[i],n);r.t=this.t}else{for(n=this.s&this.DM,i=a;i<t.t;++i)r[i]=e(n,t[i]);r.t=t.t}r.s=e(this.s,t.s),r.clamp()},t.prototype.changeBit=function(e,r){var i=t.ONE.shiftLeft(e);return this.bitwiseTo(i,r,i),i},t.prototype.addTo=function(t,e){for(var r=0,i=0,n=Math.min(t.t,this.t);r<n;)i+=this[r]+t[r],e[r++]=i&this.DM,i>>=this.DB;if(t.t<this.t){for(i+=t.s;r<this.t;)i+=this[r],e[r++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;r<t.t;)i+=t[r],e[r++]=i&this.DM,i>>=this.DB;i+=t.s}e.s=i<0?-1:0,i>0?e[r++]=i:i<-1&&(e[r++]=this.DV+i),e.t=r,e.clamp()},t.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},t.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},t.prototype.multiplyLowerTo=function(t,e,r){var i=Math.min(this.t+t.t,e);for(r.s=0,r.t=i;i>0;)r[--i]=0;for(var n=r.t-this.t;i<n;++i)r[i+this.t]=this.am(0,t[i],r,i,0,this.t);for(var n=Math.min(t.t,e);i<n;++i)this.am(0,t[i],r,i,0,e-i);r.clamp()},t.prototype.multiplyUpperTo=function(t,e,r){--e;var i=r.t=this.t+t.t-e;for(r.s=0;--i>=0;)r[i]=0;for(i=Math.max(e-this.t,0);i<t.t;++i)r[this.t+i-e]=this.am(e-i,t[i],r,0,0,this.t+i-e);r.clamp(),r.drShiftTo(1,r)},t.prototype.modInt=function(t){if(t<=0)return 0;var e=this.DV%t,r=this.s<0?t-1:0;if(this.t>0)if(0==e)r=this[0]%t;else for(var i=this.t-1;i>=0;--i)r=(e*r+this[i])%t;return r},t.prototype.millerRabin=function(e){var r=this.subtract(t.ONE),n=r.getLowestSetBit();if(n<=0)return!1;var a=r.shiftRight(n);(e=e+1>>1)>h.length&&(e=h.length);for(var o=i(),s=0;s<e;++s){o.fromInt(h[Math.floor(Math.random()*h.length)]);var f=o.modPow(a,this);if(0!=f.compareTo(t.ONE)&&0!=f.compareTo(r)){for(var c=1;c++<n&&0!=f.compareTo(r);)if(f=f.modPowInt(2,this),0==f.compareTo(t.ONE))return!1;if(0!=f.compareTo(r))return!1}}return!0},t.prototype.square=function(){var t=i();return this.squareTo(t),t},t.prototype.gcda=function(t,e){var r=this.s<0?this.negate():this.clone(),i=t.s<0?t.negate():t.clone();if(r.compareTo(i)<0){var n=r;r=i,i=n}var a=r.getLowestSetBit(),o=i.getLowestSetBit();if(o<0)return void e(r);a<o&&(o=a),o>0&&(r.rShiftTo(o,r),i.rShiftTo(o,i));var s=function(){(a=r.getLowestSetBit())>0&&r.rShiftTo(a,r),(a=i.getLowestSetBit())>0&&i.rShiftTo(a,i),r.compareTo(i)>=0?(r.subTo(i,r),r.rShiftTo(1,r)):(i.subTo(r,i),i.rShiftTo(1,i)),r.signum()>0?setTimeout(s,0):(o>0&&i.lShiftTo(o,i),setTimeout(function(){e(i)},0))};setTimeout(s,10)},t.prototype.fromNumberAsync=function(e,r,i,n){if("number"==typeof r)if(e<2)this.fromInt(1);else{this.fromNumber(e,i),this.testBit(e-1)||this.bitwiseTo(t.ONE.shiftLeft(e-1),c.f,this),this.isEven()&&this.dAddOffset(1,0);var a=this,o=function(){a.dAddOffset(2,0),a.bitLength()>e&&a.subTo(t.ONE.shiftLeft(e-1),a),a.isProbablePrime(r)?setTimeout(function(){n()},0):setTimeout(o,0)};setTimeout(o,0)}else{var s=[],f=7&e;s.length=1+(e>>3),r.nextBytes(s),f>0?s[0]&=(1<<f)-1:s[0]=0,this.fromString(s,256)}},t}(),l=function(){function t(){}return t.prototype.convert=function(t){return t},t.prototype.revert=function(t){return t},t.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r)},t.prototype.sqrTo=function(t,e){t.squareTo(e)},t}(),p=function(){function t(t){this.m=t}return t.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},t.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),b=function(){function t(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}return t.prototype.convert=function(t){var e=i();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(d.ZERO)>0&&this.m.subTo(e,e),e},t.prototype.revert=function(t){var e=i();return t.copyTo(e),this.reduce(e),e},t.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var r=32767&t[e],i=r*this.mpl+((r*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(r=e+this.m.t,t[r]+=this.m.am(0,i,t,e,0,this.m.t);t[r]>=t.DV;)t[r]-=t.DV,t[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),g=function(){function t(t){this.m=t,this.r2=i(),this.q3=i(),d.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t)}return t.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=i();return t.copyTo(e),this.reduce(e),e},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),v="undefined"!=typeof navigator;v&&"Microsoft Internet Explorer"==navigator.appName?(d.prototype.am=function(t,e,r,i,n,a){for(var o=32767&e,s=e>>15;--a>=0;){var f=32767&this[t],c=this[t++]>>15,h=s*f+c*o;f=o*f+((32767&h)<<15)+r[i]+(1073741823&n),n=(f>>>30)+(h>>>15)+s*c+(n>>>30),r[i++]=1073741823&f}return n},f=30):v&&"Netscape"!=navigator.appName?(d.prototype.am=function(t,e,r,i,n,a){for(;--a>=0;){var o=e*this[t++]+r[i]+n;n=Math.floor(o/67108864),r[i++]=67108863&o}return n},f=26):(d.prototype.am=function(t,e,r,i,n,a){for(var o=16383&e,s=e>>14;--a>=0;){var f=16383&this[t],c=this[t++]>>14,h=s*f+c*o;f=o*f+((16383&h)<<14)+r[i]+n,n=(f>>28)+(h>>14)+s*c,r[i++]=268435455&f}return n},f=28),d.prototype.DB=f,d.prototype.DM=(1<<f)-1,d.prototype.DV=1<<f;d.prototype.FV=Math.pow(2,52),d.prototype.F1=52-f,d.prototype.F2=2*f-52;var y,m,_=[];for(y="0".charCodeAt(0),m=0;m<=9;++m)_[y++]=m;for(y="a".charCodeAt(0),m=10;m<36;++m)_[y++]=m;for(y="A".charCodeAt(0),m=10;m<36;++m)_[y++]=m;d.ZERO=o(0),d.ONE=o(1)},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}r.d(e,"a",function(){return f}),r.d(e,"b",function(){return c});var o=r(9),s=r(5),f={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"},c=function(t){function e(r){i(this,e);var a=n(this,t.call(this,r,s.a.BUFFER_APPENDED,s.a.FRAG_BUFFERED,s.a.FRAG_LOADED));return a.bufferPadding=.2,a.fragments=Object.create(null),a.timeRanges=Object.create(null),a.config=r.config,a}return a(e,t),e.prototype.destroy=function(){this.fragments=null,this.timeRanges=null,this.config=null,o.a.prototype.destroy.call(this),t.prototype.destroy.call(this)},e.prototype.getBufferedFrag=function(t,e){var r=this.fragments,i=Object.keys(r).filter(function(i){var n=r[i];if(n.body.type!==e)return!1;if(!n.buffered)return!1;var a=n.body;return a.startPTS<=t&&t<=a.endPTS});if(0===i.length)return null;var n=i.pop();return r[n].body},e.prototype.detectEvictedFragments=function(t,e){var r=this,i=void 0,n=void 0;Object.keys(this.fragments).forEach(function(a){var o=r.fragments[a];if(!0===o.buffered){var s=o.range[t];if(s){i=s.time;for(var f=0;f<i.length;f++)if(n=i[f],!1===r.isTimeBuffered(n.startPTS,n.endPTS,e)){r.removeFragment(o.body);break}}}})},e.prototype.detectPartialFragments=function(t){var e=this,r=this.getFragmentKey(t),i=this.fragments[r];i&&(i.buffered=!0,Object.keys(this.timeRanges).forEach(function(r){if(!0===t.hasElementaryStream(r)){var n=e.timeRanges[r];i.range[r]=e.getBufferedTimes(t.startPTS,t.endPTS,n)}}))},e.prototype.getBufferedTimes=function(t,e,r){for(var i=[],n=void 0,a=void 0,o=!1,s=0;s<r.length;s++){if(n=r.start(s)-this.bufferPadding,a=r.end(s)+this.bufferPadding,t>=n&&e<=a){i.push({startPTS:Math.max(t,r.start(s)),endPTS:Math.min(e,r.end(s))});break}if(t<a&&e>n)i.push({startPTS:Math.max(t,r.start(s)),endPTS:Math.min(e,r.end(s))}),o=!0;else if(e<=n)break}return{time:i,partial:o}},e.prototype.getFragmentKey=function(t){return t.type+"_"+t.level+"_"+t.urlId+"_"+t.sn},e.prototype.getPartialFragment=function(t){var e=this,r=void 0,i=void 0,n=void 0,a=null,o=0;return Object.keys(this.fragments).forEach(function(s){var f=e.fragments[s];e.isPartial(f)&&(i=f.body.startPTS-e.bufferPadding,n=f.body.endPTS+e.bufferPadding,t>=i&&t<=n&&(r=Math.min(t-i,n-t),o<=r&&(a=f.body,o=r)))}),a},e.prototype.getState=function(t){var e=this.getFragmentKey(t),r=this.fragments[e],i=f.NOT_LOADED;return void 0!==r&&(i=r.buffered?!0===this.isPartial(r)?f.PARTIAL:f.OK:f.APPENDING),i},e.prototype.isPartial=function(t){return!0===t.buffered&&(void 0!==t.range.video&&!0===t.range.video.partial||void 0!==t.range.audio&&!0===t.range.audio.partial)},e.prototype.isTimeBuffered=function(t,e,r){for(var i=void 0,n=void 0,a=0;a<r.length;a++){if(i=r.start(a)-this.bufferPadding,n=r.end(a)+this.bufferPadding,t>=i&&e<=n)return!0;if(e<=i)return!1}return!1},e.prototype.onFragLoaded=function(t){var e=t.frag;if(!isNaN(e.sn)&&!e.bitrateTest){var r=this.getFragmentKey(e),i={body:e,range:Object.create(null),buffered:!1};this.fragments[r]=i}},e.prototype.onBufferAppended=function(t){var e=this;this.timeRanges=t.timeRanges,Object.keys(this.timeRanges).forEach(function(t){var r=e.timeRanges[t];e.detectEvictedFragments(t,r)})},e.prototype.onFragBuffered=function(t){this.detectPartialFragments(t.frag)},e.prototype.hasFragment=function(t){var e=this.getFragmentKey(t);return void 0!==this.fragments[e]},e.prototype.removeFragment=function(t){var e=this.getFragmentKey(t);delete this.fragments[e]},e.prototype.removeAllFragments=function(){this.fragments=Object.create(null)},e}(o.a)},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.d(e,"a",function(){return n});var n=function(){function t(){i(this,t)}return t.isBuffered=function(t,e){try{if(t)for(var r=t.buffered,i=0;i<r.length;i++)if(e>=r.start(i)&&e<=r.end(i))return!0}catch(t){}return!1},t.bufferInfo=function(t,e,r){try{if(t){var i=t.buffered,n=[],a=void 0;for(a=0;a<i.length;a++)n.push({start:i.start(a),end:i.end(a)});return this.bufferedInfo(n,e,r)}}catch(t){}return{len:0,start:e,end:e,nextStart:void 0}},t.bufferedInfo=function(t,e,r){var i=[],n=void 0,a=void 0,o=void 0,s=void 0,f=void 0;for(t.sort(function(t,e){var r=t.start-e.start;return r||e.end-t.end}),f=0;f<t.length;f++){var c=i.length;if(c){var h=i[c-1].end;t[f].start-h<r?t[f].end>h&&(i[c-1].end=t[f].end):i.push(t[f])}else i.push(t[f])}for(f=0,n=0,a=o=e;f<i.length;f++){var u=i[f].start,d=i[f].end;if(e+r>=u&&e<d)a=u,o=d,n=o-e;else if(e+r<u){s=u;break}}return{len:n,start:a,end:o,nextStart:s}},t}()},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=r(247),a=r(248),o=r(249),s=r(7),f=r(2),c=function(){function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=n.removePKCS7Padding,o=void 0===a||a;if(i(this,t),this.logEnabled=!0,this.observer=e,this.config=r,this.removePKCS7Padding=o,o)try{var s=crypto||self.crypto;this.subtle=s.subtle||s.webkitSubtle}catch(t){}this.disableWebCrypto=!this.subtle}return t.prototype.isSync=function(){return this.disableWebCrypto&&this.config.enableSoftwareAES},t.prototype.decrypt=function(t,e,r,i){var s=this;if(this.disableWebCrypto&&this.config.enableSoftwareAES){this.logEnabled&&(f.b.log("JS AES decrypt"),this.logEnabled=!1);var c=this.decryptor;c||(this.decryptor=c=new o.a),c.expandKey(e),i(c.decrypt(t,0,r,this.removePKCS7Padding))}else{this.logEnabled&&(f.b.log("WebCrypto AES decrypt"),this.logEnabled=!1);var h=this.subtle;this.key!==e&&(this.key=e,this.fastAesKey=new a.a(h,e)),this.fastAesKey.expandKey().then(function(a){new n.a(h,r).decrypt(t,a).catch(function(n){s.onWebCryptoError(n,t,e,r,i)}).then(function(t){i(t)})}).catch(function(n){s.onWebCryptoError(n,t,e,r,i)})}},t.prototype.onWebCryptoError=function(t,e,r,i,n){this.config.enableSoftwareAES?(f.b.log("WebCrypto Error, disable WebCrypto API"),this.disableWebCrypto=!0,this.logEnabled=!0,this.decrypt(e,r,i,n)):(f.b.error("decrypting error : "+t.message),this.observer.trigger(Event.ERROR,{type:s.b.MEDIA_ERROR,details:s.a.FRAG_DECRYPT_ERROR,fatal:!0,reason:t.message}))},t.prototype.destroy=function(){var t=this.decryptor;t&&(t.destroy(),this.decryptor=void 0)},t}();e.a=c},function(t,e,r){"use strict";function i(){if("undefined"!=typeof window)return window.MediaSource||window.WebKitMediaSource}e.a=i},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(9),s=function(t){function e(r){i(this,e);for(var a=arguments.length,o=Array(a>1?a-1:0),s=1;s<a;s++)o[s-1]=arguments[s];var f=n(this,t.call.apply(t,[this,r].concat(o)));return f._tickInterval=null,f._tickTimer=null,f._tickCallCount=0,f._boundTick=f.tick.bind(f),f}return a(e,t),e.prototype.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},e.prototype.hasInterval=function(){return!!this._tickInterval},e.prototype.hasNextTick=function(){return!!this._tickTimer},e.prototype.setInterval=function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(t){return!this._tickInterval&&(this._tickInterval=setInterval(this._boundTick,t),!0)}),e.prototype.clearInterval=function(t){function e(){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(){return!!this._tickInterval&&(clearInterval(this._tickInterval),this._tickInterval=null,!0)}),e.prototype.clearNextTick=function(){return!!this._tickTimer&&(clearTimeout(this._tickTimer),this._tickTimer=null,!0)},e.prototype.tick=function(){1===++this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&(this.clearNextTick(),this._tickTimer=setTimeout(this._boundTick,0)),this._tickCallCount=0)},e.prototype.doTick=function(){},e}(o.a);e.a=s},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(5),s=r(9),f=r(7),c=r(2),h=r(60),u=r(111),d=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),l={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},p={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"},b=function(t){function e(r){i(this,e);var a=n(this,t.call(this,r,o.a.MANIFEST_LOADING,o.a.LEVEL_LOADING,o.a.AUDIO_TRACK_LOADING,o.a.SUBTITLE_TRACK_LOADING));return a.loaders={},a}return a(e,t),e.canHaveQualityLevels=function(t){return t!==l.AUDIO_TRACK&&t!==l.SUBTITLE_TRACK},e.mapContextToLevelType=function(t){switch(t.type){case l.AUDIO_TRACK:return p.AUDIO;case l.SUBTITLE_TRACK:return p.SUBTITLE;default:return p.MAIN}},e.getResponseUrl=function(t,e){var r=t.url;return void 0!==r&&0!==r.indexOf("data:")||(r=e.url),r},e.prototype.createInternalLoader=function(t){var e=this.hls.config,r=e.pLoader,i=e.loader,n=r||i,a=new n(e);return t.loader=a,this.loaders[t.type]=a,a},e.prototype.getInternalLoader=function(t){return this.loaders[t.type]},e.prototype.resetInternalLoader=function(t){this.loaders[t]&&delete this.loaders[t]},e.prototype.destroyInternalLoaders=function(){for(var t in this.loaders){var e=this.loaders[t];e&&e.destroy(),this.resetInternalLoader(t)}},e.prototype.destroy=function(){this.destroyInternalLoaders(),t.prototype.destroy.call(this)},e.prototype.onManifestLoading=function(t){t&&t.url&&this.load(t.url,{type:l.MANIFEST})},e.prototype.onLevelLoading=function(t){this.load(t.url,{type:l.LEVEL,level:t.level,id:t.id})},e.prototype.onAudioTrackLoading=function(t){this.load(t.url,{type:l.AUDIO_TRACK,id:t.id})},e.prototype.onSubtitleTrackLoading=function(t){this.load(t.url,{type:l.SUBTITLE_TRACK,id:t.id})},e.prototype.load=function(t,e){var r=this.hls.config,i=this.getInternalLoader(e);if(i){var n=i.context;if(n&&n.url===t)return c.b.trace("playlist request ongoing"),!1;c.b.warn("aborting previous loader for type: "+e.type),i.abort()}var a=void 0,o=void 0,s=void 0,f=void 0;switch(e.type){case l.MANIFEST:a=r.manifestLoadingMaxRetry,o=r.manifestLoadingTimeOut,s=r.manifestLoadingRetryDelay,f=r.manifestLoadingMaxRetryTimeout;break;case l.LEVEL:a=0,o=r.levelLoadingTimeOut;break;default:a=r.levelLoadingMaxRetry,o=r.levelLoadingTimeOut,s=r.levelLoadingRetryDelay,f=r.levelLoadingMaxRetryTimeout,c.b.log("Playlist loader for "+e.type+" "+(e.level||e.id))}i=this.createInternalLoader(e),e.url=t,e.responseType=e.responseType||"";var h=void 0,u=void 0;return h={timeout:o,maxRetry:a,retryDelay:s,maxRetryDelay:f},u={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)},i.load(e,h,u),!0},e.prototype.loadsuccess=function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(r.isSidxRequest)return this._handleSidxRequest(t,r),void this._handlePlaylistLoaded(t,e,r,i);this.resetInternalLoader(r.type);var n=t.data;if(e.tload=performance.now(),0!==n.indexOf("#EXTM3U"))return void this._handleManifestParsingError(t,r,"no EXTM3U delimiter",i);n.indexOf("#EXTINF:")>0||n.indexOf("#EXT-X-TARGETDURATION:")>0?this._handleTrackOrLevelPlaylist(t,e,r,i):this._handleMasterPlaylist(t,e,r,i)},e.prototype.loaderror=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._handleNetworkError(e,r)},e.prototype.loadtimeout=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._handleNetworkError(e,r,!0)},e.prototype._handleMasterPlaylist=function(t,r,i,n){var a=this.hls,s=t.data,f=e.getResponseUrl(t,i),h=u.a.parseMasterPlaylist(s,f);if(!h.length)return void this._handleManifestParsingError(t,i,"no level found in manifest",n);var d=h.map(function(t){return{id:t.attrs.AUDIO,codec:t.audioCodec}}),l=u.a.parseMasterPlaylistMedia(s,f,"AUDIO",d),p=u.a.parseMasterPlaylistMedia(s,f,"SUBTITLES");if(l.length){var b=!1;l.forEach(function(t){t.url||(b=!0)}),!1===b&&h[0].audioCodec&&!h[0].attrs.AUDIO&&(c.b.log("audio codec signaled in quality level, but no embedded audio track signaled, create one"),l.unshift({type:"main",name:"main"}))}a.trigger(o.a.MANIFEST_LOADED,{levels:h,audioTracks:l,subtitles:p,url:f,stats:r,networkDetails:n})},e.prototype._handleTrackOrLevelPlaylist=function(t,r,i,n){var a=this.hls,s=i.id,f=i.level,c=i.type,h=e.getResponseUrl(t,i),d=isNaN(s)?0:s,p=isNaN(f)?d:f,b=e.mapContextToLevelType(i),g=u.a.parseLevelPlaylist(t.data,h,p,b,d);if(g.tload=r.tload,c===l.MANIFEST){var v={url:h,details:g};a.trigger(o.a.MANIFEST_LOADED,{levels:[v],audioTracks:[],url:h,stats:r,networkDetails:n})}if(r.tparsed=performance.now(),g.needSidxRanges){var y=g.initSegment.url;return void this.load(y,{isSidxRequest:!0,type:c,level:f,levelDetails:g,id:s,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer"})}i.levelDetails=g,this._handlePlaylistLoaded(t,r,i,n)},e.prototype._handleSidxRequest=function(t,e){var r=h.a.parseSegmentIndex(new Uint8Array(t.data));r.references.forEach(function(t,r){var i=t.info,n=e.levelDetails.fragments[r];0===n.byteRange.length&&(n.rawByteRange=String(1+i.end-i.start)+"@"+String(i.start))}),e.levelDetails.initSegment.rawByteRange=String(r.moovEndOffset)+"@0"},e.prototype._handleManifestParsingError=function(t,e,r,i){this.hls.trigger(o.a.ERROR,{type:f.b.NETWORK_ERROR,details:f.a.MANIFEST_PARSING_ERROR,fatal:!0,url:t.url,reason:r,networkDetails:i})},e.prototype._handleNetworkError=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=void 0,n=void 0,a=this.getInternalLoader(t);switch(t.type){case l.MANIFEST:i=r?f.a.MANIFEST_LOAD_TIMEOUT:f.a.MANIFEST_LOAD_ERROR,n=!0;break;case l.LEVEL:i=r?f.a.LEVEL_LOAD_TIMEOUT:f.a.LEVEL_LOAD_ERROR,n=!1;break;case l.AUDIO_TRACK:i=r?f.a.AUDIO_TRACK_LOAD_TIMEOUT:f.a.AUDIO_TRACK_LOAD_ERROR,n=!1;break;default:n=!1}a&&(a.abort(),this.resetInternalLoader(t.type)),this.hls.trigger(o.a.ERROR,{type:f.b.NETWORK_ERROR,details:i,fatal:n,url:a.url,loader:a,context:t,networkDetails:e})},e.prototype._handlePlaylistLoaded=function(t,r,i,n){var a=i.type,s=i.level,f=i.id,c=i.levelDetails;if(!c.targetduration)return void this._handleManifestParsingError(t,i,"invalid target duration",n);if(e.canHaveQualityLevels(i.type))this.hls.trigger(o.a.LEVEL_LOADED,{details:c,level:s||0,id:f||0,stats:r,networkDetails:n});else switch(a){case l.AUDIO_TRACK:this.hls.trigger(o.a.AUDIO_TRACK_LOADED,{details:c,id:f,stats:r,networkDetails:n});break;case l.SUBTITLE_TRACK:this.hls.trigger(o.a.SUBTITLE_TRACK_LOADED,{details:c,id:f,stats:r,networkDetails:n})}},d(e,null,[{key:"ContextType",get:function(){return l}},{key:"LevelType",get:function(){return p}}]),e}(s.a);e.a=b},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=r(2),a=r(5),o=Math.pow(2,32)-1,s=function(){function t(e,r){i(this,t),this.observer=e,this.remuxer=r}return t.prototype.resetTimeStamp=function(t){this.initPTS=t},t.prototype.resetInitSegment=function(e,r,i,n){if(e&&e.byteLength){var o=this.initData=t.parseInitSegment(e);null==r&&(r="mp4a.40.5"),null==i&&(i="avc1.42e01e");var s={};o.audio&&o.video?s.audiovideo={container:"video/mp4",codec:r+","+i,initSegment:n?e:null}:(o.audio&&(s.audio={container:"audio/mp4",codec:r,initSegment:n?e:null}),o.video&&(s.video={container:"video/mp4",codec:i,initSegment:n?e:null})),this.observer.trigger(a.a.FRAG_PARSING_INIT_SEGMENT,{tracks:s})}else r&&(this.audioCodec=r),i&&(this.videoCodec=i)},t.probe=function(e){return t.findBox({data:e,start:0,end:Math.min(e.length,16384)},["moof"]).length>0},t.bin2str=function(t){return String.fromCharCode.apply(null,t)},t.readUint16=function(t,e){t.data&&(e+=t.start,t=t.data);var r=t[e]<<8|t[e+1];return r<0?65536+r:r},t.readUint32=function(t,e){t.data&&(e+=t.start,t=t.data);var r=t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3];return r<0?4294967296+r:r},t.writeUint32=function(t,e,r){t.data&&(e+=t.start,t=t.data),t[e]=r>>24,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=255&r},t.findBox=function(e,r){var i=[],n=void 0,a=void 0,o=void 0,s=void 0,f=void 0,c=void 0,h=void 0;if(e.data?(c=e.start,s=e.end,e=e.data):(c=0,s=e.byteLength),!r.length)return null;for(n=c;n<s;)a=t.readUint32(e,n),o=t.bin2str(e.subarray(n+4,n+8)),h=a>1?n+a:s,o===r[0]&&(1===r.length?i.push({data:e,start:n+8,end:h}):(f=t.findBox({data:e,start:n+8,end:h},r.slice(1)),f.length&&(i=i.concat(f)))),n=h;return i},t.parseSegmentIndex=function(e){var r=t.findBox(e,["moov"])[0],i=r?r.end:null,n=0,a=t.findBox(e,["sidx"]),o=void 0;if(!a||!a[0])return null;o=[],a=a[0];var s=a.data[0];n=0===s?8:16;var f=t.readUint32(a,n);n+=4;n+=0===s?8:16,n+=2;var c=a.end+0,h=t.readUint16(a,n);n+=2;for(var u=0;u<h;u++){var d=n,l=t.readUint32(a,d);d+=4;var p=2147483647&l;if(1===(2147483648&l)>>>31)return void console.warn("SIDX has hierarchical references (not supported)");var b=t.readUint32(a,d);d+=4,o.push({referenceSize:p,subsegmentDuration:b,info:{duration:b/f,start:c,end:c+p-1}}),c+=p,d+=4,n=d}return{earliestPresentationTime:0,timescale:f,version:s,referencesCount:h,references:o,moovEndOffset:i}},t.parseInitSegment=function(e){var r=[];return t.findBox(e,["moov","trak"]).forEach(function(e){var i=t.findBox(e,["tkhd"])[0];if(i){var a=i.data[i.start],o=0===a?12:20,s=t.readUint32(i,o),f=t.findBox(e,["mdia","mdhd"])[0];if(f){a=f.data[f.start],o=0===a?12:20;var c=t.readUint32(f,o),h=t.findBox(e,["mdia","hdlr"])[0];if(h){var u=t.bin2str(h.data.subarray(h.start+8,h.start+12)),d={soun:"audio",vide:"video"}[u];if(d){var l=t.findBox(e,["mdia","minf","stbl","stsd"]);if(l.length){l=l[0];var p=t.bin2str(l.data.subarray(l.start+12,l.start+16));n.b.log("MP4Demuxer:"+d+":"+p+" found")}r[s]={timescale:c,type:d},r[d]={timescale:c,id:s}}}}}}),r},t.getStartDTS=function(e,r){var i=void 0,n=void 0,a=void 0;return i=t.findBox(r,["moof","traf"]),n=[].concat.apply([],i.map(function(r){return t.findBox(r,["tfhd"]).map(function(i){var n=void 0,a=void 0;return n=t.readUint32(i,4),a=e[n].timescale||9e4,t.findBox(r,["tfdt"]).map(function(e){var r=void 0,i=void 0;return r=e.data[e.start],i=t.readUint32(e,4),1===r&&(i*=Math.pow(2,32),i+=t.readUint32(e,8)),i})[0]/a})})),a=Math.min.apply(null,n),isFinite(a)?a:0},t.offsetStartDTS=function(e,r,i){t.findBox(r,["moof","traf"]).map(function(r){return t.findBox(r,["tfhd"]).map(function(n){var a=t.readUint32(n,4),s=e[a].timescale||9e4;t.findBox(r,["tfdt"]).map(function(e){var r=e.data[e.start],n=t.readUint32(e,4);if(0===r)t.writeUint32(e,4,n-i*s);else{n*=Math.pow(2,32),n+=t.readUint32(e,8),n-=i*s,n=Math.max(n,0);var a=Math.floor(n/(o+1)),f=Math.floor(n%(o+1));t.writeUint32(e,4,a),t.writeUint32(e,8,f)}})})})},t.prototype.append=function(e,r,i,n){var o=this.initData;o||(this.resetInitSegment(e,this.audioCodec,this.videoCodec,!1),o=this.initData);var s=void 0,f=this.initPTS;if(void 0===f){var c=t.getStartDTS(o,e);this.initPTS=f=c-r,this.observer.trigger(a.a.INIT_PTS_FOUND,{initPTS:f})}t.offsetStartDTS(o,e,f),s=t.getStartDTS(o,e),this.remuxer.remux(o.audio,o.video,null,null,s,i,n,e)},t.prototype.destroy=function(){},t}();e.a=s},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=r(29),a=r.n(n),o=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),s=function(){function t(){i(this,t),this.method=null,this.key=null,this.iv=null,this._uri=null}return o(t,[{key:"uri",get:function(){return!this._uri&&this.reluri&&(this._uri=a.a.buildAbsoluteURL(this.baseuri,this.reluri,{alwaysNormalize:!0})),this._uri}}]),t}();e.a=s},function(t,e,r){"use strict";function i(t,e){var r=a[e];return!!r&&!0===r[t.slice(0,4)]}function n(t,e){return MediaSource.isTypeSupported((e||"video")+'/mp4;codecs="'+t+'"')}r.d(e,"b",function(){return i}),r.d(e,"a",function(){return n});var a={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0}}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){"use strict";(function(e,i){function n(t){return N.from(t)}function a(t){return N.isBuffer(t)||t instanceof F}function o(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?C(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}function s(t,e){O=O||r(16),t=t||{},this.objectMode=!!t.objectMode,e instanceof O&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,n=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new z,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.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(K||(K=r(46).StringDecoder),this.decoder=new K(t.encoding),this.encoding=t.encoding)}function f(t){if(O=O||r(16),!(this instanceof f))return new f(t);this._readableState=new s(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),B.call(this)}function c(t,e,r,i,a){var o=t._readableState;if(null===e)o.reading=!1,b(t,o);else{var s;a||(s=u(o,e)),s?t.emit("error",s):o.objectMode||e&&e.length>0?("string"==typeof e||o.objectMode||Object.getPrototypeOf(e)===N.prototype||(e=n(e)),i?o.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):h(t,o,e,!0):o.ended?t.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!r?(e=o.decoder.write(e),o.objectMode||0!==e.length?h(t,o,e,!1):y(t,o)):h(t,o,e,!1))):i||(o.reading=!1)}return d(o)}function h(t,e,r,i){e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&g(t)),y(t,e)}function u(t,e){var r;return a(e)||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function d(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}function l(t){return t>=V?t=V:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function p(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=l(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function b(t,e){if(!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,g(t)}}function g(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(G("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?L(v,t):v(t))}function v(t){G("emit readable"),t.emit("readable"),A(t)}function y(t,e){e.readingMore||(e.readingMore=!0,L(m,t,e))}function m(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(G("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function _(t){return function(){var e=t._readableState;G("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&P(t,"data")&&(e.flowing=!0,A(t))}}function w(t){G("readable nexttick read 0"),t.read(0)}function S(t,e){e.resumeScheduled||(e.resumeScheduled=!0,L(E,t,e))}function E(t,e){e.reading||(G("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),A(t),e.flowing&&!e.reading&&t.read(0)}function A(t){var e=t._readableState;for(G("flow",e.flowing);e.flowing&&null!==t.read(););}function T(t,e){if(0===e.length)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=R(t,e.buffer,e.decoder),r}function R(t,e,r){var i;return t<e.head.data.length?(i=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):i=t===e.head.data.length?e.shift():r?k(t,e):D(t,e),i}function k(t,e){var r=e.head,i=1,n=r.data;for(t-=n.length;r=r.next;){var a=r.data,o=t>a.length?a.length:t;if(o===a.length?n+=a:n+=a.slice(0,t),0===(t-=o)){o===a.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=a.slice(o));break}++i}return e.length-=i,n}function D(t,e){var r=N.allocUnsafe(t),i=e.head,n=1;for(i.data.copy(r),t-=i.data.length;i=i.next;){var a=i.data,o=t>a.length?a.length:t;if(a.copy(r,r.length-t,0,o),0===(t-=o)){o===a.length?(++n,i.next?e.head=i.next:e.head=e.tail=null):(e.head=i,i.data=a.slice(o));break}++n}return e.length-=n,r}function I(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,L(M,e,t))}function M(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function x(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}var L=r(31);t.exports=f;var O,C=r(63);f.ReadableState=s;var P=(r(20).EventEmitter,function(t,e){return t.listeners(e).length}),B=r(65),N=r(3).Buffer,F=e.Uint8Array||function(){},U=r(24);U.inherits=r(0);var j=r(122),G=void 0;G=j&&j.debuglog?j.debuglog("stream"):function(){};var K,z=r(123),H=r(66);U.inherits(f,B);var q=["error","close","destroy","pause","resume"];Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),f.prototype.destroy=H.destroy,f.prototype._undestroy=H.undestroy,f.prototype._destroy=function(t,e){this.push(null),e(t)},f.prototype.push=function(t,e){var r,i=this._readableState;return i.objectMode?r=!0:"string"==typeof t&&(e=e||i.defaultEncoding,e!==i.encoding&&(t=N.from(t,e),e=""),r=!0),c(this,t,e,!1,r)},f.prototype.unshift=function(t){return c(this,t,null,!0,!1)},f.prototype.isPaused=function(){return!1===this._readableState.flowing},f.prototype.setEncoding=function(t){return K||(K=r(46).StringDecoder),this._readableState.decoder=new K(t),this._readableState.encoding=t,this};var V=8388608;f.prototype.read=function(t){G("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return G("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?I(this):g(this),null;if(0===(t=p(t,e))&&e.ended)return 0===e.length&&I(this),null;var i=e.needReadable;G("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&(i=!0,G("length less than watermark",i)),e.ended||e.reading?(i=!1,G("reading or ended",i)):i&&(G("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=p(r,e)));var n;return n=t>0?T(t,e):null,null===n?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&I(this)),null!==n&&this.emit("data",n),n},f.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},f.prototype.pipe=function(t,e){function r(t,e){G("onunpipe"),t===d&&e&&!1===e.hasUnpiped&&(e.hasUnpiped=!0,a())}function n(){G("onend"),t.end()}function a(){G("cleanup"),t.removeListener("close",c),t.removeListener("finish",h),t.removeListener("drain",g),t.removeListener("error",f),t.removeListener("unpipe",r),d.removeListener("end",n),d.removeListener("end",u),d.removeListener("data",s),v=!0,!l.awaitDrain||t._writableState&&!t._writableState.needDrain||g()}function s(e){G("ondata"),y=!1,!1!==t.write(e)||y||((1===l.pipesCount&&l.pipes===t||l.pipesCount>1&&-1!==x(l.pipes,t))&&!v&&(G("false write response, pause",d._readableState.awaitDrain),d._readableState.awaitDrain++,y=!0),d.pause())}function f(e){G("onerror",e),u(),t.removeListener("error",f),0===P(t,"error")&&t.emit("error",e)}function c(){t.removeListener("finish",h),u()}function h(){G("onfinish"),t.removeListener("close",c),u()}function u(){G("unpipe"),d.unpipe(t)}var d=this,l=this._readableState;switch(l.pipesCount){case 0:l.pipes=t;break;case 1:l.pipes=[l.pipes,t];break;default:l.pipes.push(t)}l.pipesCount+=1,G("pipe count=%d opts=%j",l.pipesCount,e);var p=(!e||!1!==e.end)&&t!==i.stdout&&t!==i.stderr,b=p?n:u;l.endEmitted?L(b):d.once("end",b),t.on("unpipe",r);var g=_(d);t.on("drain",g);var v=!1,y=!1;return d.on("data",s),o(t,"error",f),t.once("close",c),t.once("finish",h),t.emit("pipe",d),l.flowing||(G("pipe resume"),d.resume()),t},f.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a<n;a++)i[a].emit("unpipe",this,r);return this}var o=x(e.pipes,t);return-1===o?this:(e.pipes.splice(o,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)},f.prototype.on=function(t,e){var r=B.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var i=this._readableState;i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&g(this):L(w,this))}return r},f.prototype.addListener=f.prototype.on,f.prototype.resume=function(){var t=this._readableState;return t.flowing||(G("resume"),t.flowing=!0,S(this,t)),this},f.prototype.pause=function(){return G("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(G("pause"),this._readableState.flowing=!1,this.emit("pause")),this},f.prototype.wrap=function(t){var e=this._readableState,r=!1,i=this;t.on("end",function(){if(G("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&i.push(t)}i.push(null)}),t.on("data",function(n){if(G("wrapped data"),e.decoder&&(n=e.decoder.write(n)),(!e.objectMode||null!==n&&void 0!==n)&&(e.objectMode||n&&n.length)){i.push(n)||(r=!0,t.pause())}});for(var n in t)void 0===this[n]&&"function"==typeof t[n]&&(this[n]=function(e){return function(){return t[e].apply(t,arguments)}}(n));for(var a=0;a<q.length;a++)t.on(q[a],i.emit.bind(i,q[a]));return i._read=function(e){G("wrapped _read",e),r&&(r=!1,t.resume())},i},f._fromList=T}).call(e,r(13),r(14))},function(t,e,r){t.exports=r(20).EventEmitter},function(t,e,r){"use strict";function i(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;if(i||n)return void(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||o(a,this,t));this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!e&&t?(o(a,r,t),r._writableState&&(r._writableState.errorEmitted=!0)):e&&e(t)})}function n(){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.finished=!1,this._writableState.errorEmitted=!1)}function a(t,e){t.emit("error",e)}var o=r(31);t.exports={destroy:i,undestroy:n}},function(t,e,r){"use strict";function i(t){this.afterTransform=function(e,r){return n(t,e,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function n(t,e,r){var i=t._transformState;i.transforming=!1;var n=i.writecb;if(!n)return t.emit("error",new Error("write callback called multiple times"));i.writechunk=null,i.writecb=null,null!==r&&void 0!==r&&t.push(r),n(e);var a=t._readableState;a.reading=!1,(a.needReadable||a.length<a.highWaterMark)&&t._read(a.highWaterMark)}function a(t){if(!(this instanceof a))return new a(t);s.call(this,t),this._transformState=new i(this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.once("prefinish",function(){"function"==typeof this._flush?this._flush(function(t,r){o(e,t,r)}):o(e)})}function o(t,e,r){if(e)return t.emit("error",e);null!==r&&void 0!==r&&t.push(r);var i=t._writableState,n=t._transformState;if(i.length)throw new Error("Calling transform done when ws.length != 0");if(n.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}t.exports=a;var s=r(16),f=r(24);f.inherits=r(0),f.inherits(a,s),a.prototype.push=function(t,e){return this._transformState.needTransform=!1,s.prototype.push.call(this,t,e)},a.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")},a.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},a.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},a.prototype._destroy=function(t,e){var r=this;s.prototype._destroy.call(this,t,function(t){e(t),r.emit("close")})}},function(t,e,r){function i(){this.init(),this._w=p,u.call(this,64,56)}function n(t,e,r){return r^t&(e^r)}function a(t,e,r){return t&e|r&(t|e)}function o(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function s(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function f(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function c(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}var h=r(0),u=r(21),d=r(3).Buffer,l=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],p=new Array(64);h(i,u),i.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},i.prototype._update=function(t){for(var e=this._w,r=0|this._a,i=0|this._b,h=0|this._c,u=0|this._d,d=0|this._e,p=0|this._f,b=0|this._g,g=0|this._h,v=0;v<16;++v)e[v]=t.readInt32BE(4*v);for(;v<64;++v)e[v]=c(e[v-2])+e[v-7]+f(e[v-15])+e[v-16]|0;for(var y=0;y<64;++y){var m=g+s(d)+n(d,p,b)+l[y]+e[y]|0,_=o(r)+a(r,i,h)|0;g=b,b=p,p=d,d=u+m|0,u=h,h=i,i=r,r=m+_|0}this._a=r+this._a|0,this._b=i+this._b|0,this._c=h+this._c|0,this._d=u+this._d|0,this._e=d+this._e|0,this._f=p+this._f|0,this._g=b+this._g|0,this._h=g+this._h|0},i.prototype._hash=function(){var t=d.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=i},function(t,e,r){function i(){this.init(),this._w=v,p.call(this,128,112)}function n(t,e,r){return r^t&(e^r)}function a(t,e,r){return t&e|r&(t|e)}function o(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function s(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function f(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function c(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function h(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function u(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function d(t,e){return t>>>0<e>>>0?1:0}var l=r(0),p=r(21),b=r(3).Buffer,g=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],v=new Array(160);l(i,p),i.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},i.prototype._update=function(t){for(var e=this._w,r=0|this._ah,i=0|this._bh,l=0|this._ch,p=0|this._dh,b=0|this._eh,v=0|this._fh,y=0|this._gh,m=0|this._hh,_=0|this._al,w=0|this._bl,S=0|this._cl,E=0|this._dl,A=0|this._el,T=0|this._fl,R=0|this._gl,k=0|this._hl,D=0;D<32;D+=2)e[D]=t.readInt32BE(4*D),e[D+1]=t.readInt32BE(4*D+4);for(;D<160;D+=2){var I=e[D-30],M=e[D-30+1],x=f(I,M),L=c(M,I);I=e[D-4],M=e[D-4+1];var O=h(I,M),C=u(M,I),P=e[D-14],B=e[D-14+1],N=e[D-32],F=e[D-32+1],U=L+B|0,j=x+P+d(U,L)|0;U=U+C|0,j=j+O+d(U,C)|0,U=U+F|0,j=j+N+d(U,F)|0,e[D]=j,e[D+1]=U}for(var G=0;G<160;G+=2){j=e[G],U=e[G+1];var K=a(r,i,l),z=a(_,w,S),H=o(r,_),q=o(_,r),V=s(b,A),W=s(A,b),Y=g[G],X=g[G+1],Z=n(b,v,y),J=n(A,T,R),Q=k+W|0,$=m+V+d(Q,k)|0;Q=Q+J|0,$=$+Z+d(Q,J)|0,Q=Q+X|0,$=$+Y+d(Q,X)|0,Q=Q+U|0,$=$+j+d(Q,U)|0;var tt=q+z|0,et=H+K+d(tt,q)|0;m=y,k=R,y=v,R=T,v=b,T=A,A=E+Q|0,b=p+$+d(A,E)|0,p=l,E=S,l=i,S=w,i=r,w=_,_=Q+tt|0,r=$+et+d(_,Q)|0}this._al=this._al+_|0,this._bl=this._bl+w|0,this._cl=this._cl+S|0,this._dl=this._dl+E|0,this._el=this._el+A|0,this._fl=this._fl+T|0,this._gl=this._gl+R|0,this._hl=this._hl+k|0,this._ah=this._ah+r+d(this._al,_)|0,this._bh=this._bh+i+d(this._bl,w)|0,this._ch=this._ch+l+d(this._cl,S)|0,this._dh=this._dh+p+d(this._dl,E)|0,this._eh=this._eh+b+d(this._el,A)|0,this._fh=this._fh+v+d(this._fl,T)|0,this._gh=this._gh+y+d(this._gl,R)|0,this._hh=this._hh+m+d(this._hl,k)|0},i.prototype._hash=function(){function t(t,r,i){e.writeInt32BE(t,i),e.writeInt32BE(r,i+4)}var e=b.allocUnsafe(64);return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},t.exports=i},function(t,e,r){"use strict";function i(t,e){o.call(this,"digest"),"string"==typeof e&&(e=s.from(e));var r="sha512"===t||"sha384"===t?128:64;if(this._alg=t,this._key=e,e.length>r){e=("rmd160"===t?new c:h(t)).update(e).digest()}else e.length<r&&(e=s.concat([e,u],r));for(var i=this._ipad=s.allocUnsafe(r),n=this._opad=s.allocUnsafe(r),a=0;a<r;a++)i[a]=54^e[a],n[a]=92^e[a];this._hash="rmd160"===t?new c:h(t),this._hash.update(i)}var n=r(0),a=r(136),o=r(15),s=r(3).Buffer,f=r(42),c=r(43),h=r(47),u=s.alloc(128);n(i,o),i.prototype._update=function(t){this._hash.update(t)},i.prototype._final=function(){var t=this._hash.digest();return("rmd160"===this._alg?new c:h(this._alg)).update(this._opad).update(t).digest()},t.exports=function(t,e){return t=t.toLowerCase(),"rmd160"===t||"ripemd160"===t?new i("rmd160",e):"md5"===t?new a(f,e):new i(t,e)}},function(t,e){t.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}},function(t,e,r){e.pbkdf2=r(138),e.pbkdf2Sync=r(75)},function(t,e){var r=Math.pow(2,30)-1;t.exports=function(t,e){if("number"!=typeof t)throw new TypeError("Iterations not a number");if(t<0)throw new TypeError("Bad iterations");if("number"!=typeof e)throw new TypeError("Key length not a number");if(e<0||e>r||e!==e)throw new TypeError("Bad key length")}},function(t,e,r){(function(e){var r;if(e.browser)r="utf-8";else{r=parseInt(e.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}t.exports=r}).call(e,r(14))},function(t,e,r){function i(t,e,r){var i=n(t),a="sha512"===t||"sha384"===t?128:64;e.length>a?e=i(e):e.length<a&&(e=u.concat([e,d],a));for(var o=u.allocUnsafe(a+l[t]),s=u.allocUnsafe(a+l[t]),f=0;f<a;f++)o[f]=54^e[f],s[f]=92^e[f];var c=u.allocUnsafe(a+r+4);o.copy(c,0,0,a),this.ipad1=c,this.ipad2=o,this.opad=s,this.alg=t,this.blocksize=a,this.hash=i,this.size=l[t]}function n(t){function e(e){return f(t).update(e).digest()}return"rmd160"===t||"ripemd160"===t?s:"md5"===t?o:e}function a(t,e,r,n,a){u.isBuffer(t)||(t=u.from(t,h)),u.isBuffer(e)||(e=u.from(e,h)),c(r,n),a=a||"sha1";var o=new i(a,t,e.length),s=u.allocUnsafe(n),f=u.allocUnsafe(e.length+4);e.copy(f,0,0,e.length);for(var d=0,p=l[a],b=Math.ceil(n/p),g=1;g<=b;g++){f.writeUInt32BE(g,e.length);for(var v=o.run(f,o.ipad1),y=v,m=1;m<r;m++){y=o.run(y,o.ipad2);for(var _=0;_<p;_++)v[_]^=y[_]}v.copy(s,d),d+=p}return s}var o=r(42),s=r(43),f=r(47),c=r(73),h=r(74),u=r(3).Buffer,d=u.alloc(128),l={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};i.prototype.run=function(t,e){return t.copy(e,this.blocksize),this.hash(e).copy(this.opad,this.blocksize),this.hash(this.opad)},t.exports=a},function(t,e,r){function i(t){var e=t._cipher.encryptBlockRaw(t._prev);return o(t._prev),e}var n=r(25),a=r(3).Buffer,o=r(77);e.encrypt=function(t,e){var r=Math.ceil(e.length/16),o=t._cache.length;t._cache=a.concat([t._cache,a.allocUnsafe(16*r)]);for(var s=0;s<r;s++){var f=i(t),c=o+16*s;t._cache.writeUInt32BE(f[0],c+0),t._cache.writeUInt32BE(f[1],c+4),t._cache.writeUInt32BE(f[2],c+8),t._cache.writeUInt32BE(f[3],c+12)}var h=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),n(e,h)}},function(t,e){function r(t){for(var e,r=t.length;r--;){if(255!==(e=t.readUInt8(r))){e++,t.writeUInt8(e,r);break}t.writeUInt8(0,r)}}t.exports=r},function(t,e){t.exports={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}}},function(t,e,r){function i(t,e){var r=0;t.length!==e.length&&r++;for(var i=Math.min(t.length,e.length),n=0;n<i;++n)r+=t[n]^e[n];return r}function n(t,e,r){if(12===e.length)return t._finID=s.concat([e,s.from([0,0,0,1])]),s.concat([e,s.from([0,0,0,2])]);var i=new h(r),n=e.length,a=n%16;i.update(e),a&&(a=16-a,i.update(s.alloc(a,0))),i.update(s.alloc(8,0));var o=8*n,f=s.alloc(8);f.writeUIntBE(o,0,8),i.update(f),t._finID=i.state;var c=s.from(t._finID);return d(c),c}function a(t,e,r,i){f.call(this);var a=s.alloc(4,0);this._cipher=new o.AES(e);var c=this._cipher.encryptBlock(a);this._ghash=new h(c),r=n(this,r,c),this._prev=s.from(r),this._cache=s.allocUnsafe(0),this._secCache=s.allocUnsafe(0),this._decrypt=i,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}var o=r(33),s=r(3).Buffer,f=r(15),c=r(0),h=r(149),u=r(25),d=r(77);c(a,f),a.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=s.alloc(e,0),this._ghash.update(e))}this._called=!0;var r=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(r),this._len+=t.length,r},a.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=u(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&i(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=t,this._cipher.scrub()},a.prototype.getAuthTag=function(){if(this._decrypt||!s.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},a.prototype.setAuthTag=function(t){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=t},a.prototype.setAAD=function(t){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(t),this._alen+=t.length},t.exports=a},function(t,e,r){function i(t,e,r,i){o.call(this),this._cipher=new n.AES(e),this._prev=a.from(r),this._cache=a.allocUnsafe(0),this._secCache=a.allocUnsafe(0),this._decrypt=i,this._mode=t}var n=r(33),a=r(3).Buffer,o=r(15);r(0)(i,o),i.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)},i.prototype._final=function(){this._cipher.scrub()},t.exports=i},function(t,e,r){function i(){if(null!==m)return m;var t=[];t[0]=2;for(var e=1,r=3;r<1048576;r+=2){for(var i=Math.ceil(Math.sqrt(r)),n=0;n<e&&t[n]<=i&&r%t[n]!=0;n++);e!==n&&t[n]<=i||(t[e++]=r)}return m=t,t}function n(t){for(var e=i(),r=0;r<e.length;r++)if(0===t.modn(e[r]))return 0===t.cmpn(e[r]);return!0}function a(t){var e=f.mont(t);return 0===l.toRed(e).redPow(t.subn(1)).fromRed().cmpn(1)}function o(t,e){if(t<16)return new f(2===e||5===e?[140,123]:[140,39]);e=new f(e);for(var r,i;;){for(r=new f(s(Math.ceil(t/8)));r.bitLength()>t;)r.ishrn(1);if(r.isEven()&&r.iadd(d),r.testn(1)||r.iadd(l),e.cmp(l)){if(!e.cmp(p))for(;r.mod(b).cmp(g);)r.iadd(y)}else for(;r.mod(c).cmp(v);)r.iadd(y);if(i=r.shrn(1),n(i)&&n(r)&&a(i)&&a(r)&&u.test(i)&&u.test(r))return r}}var s=r(19);t.exports=o,o.simpleSieve=n,o.fermatTest=a;var f=r(6),c=new f(24),h=r(82),u=new h,d=new f(1),l=new f(2),p=new f(5),b=(new f(16),new f(8),new f(10)),g=new f(3),v=(new f(7),new f(11)),y=new f(4),m=(new f(12),null)},function(t,e,r){function i(t){this.rand=t||new a.Rand}var n=r(6),a=r(83);t.exports=i,i.create=function(t){return new i(t)},i.prototype._randbelow=function(t){var e=t.bitLength(),r=Math.ceil(e/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(t)>=0);return i},i.prototype._randrange=function(t,e){var r=e.sub(t);return t.add(this._randbelow(r))},i.prototype.test=function(t,e,r){var i=t.bitLength(),a=n.mont(t),o=new n(1).toRed(a);e||(e=Math.max(1,i/48|0));for(var s=t.subn(1),f=0;!s.testn(f);f++);for(var c=t.shrn(f),h=s.toRed(a);e>0;e--){var u=this._randrange(new n(2),s);r&&r(u);var d=u.toRed(a).redPow(c);if(0!==d.cmp(o)&&0!==d.cmp(h)){for(var l=1;l<f;l++){if(d=d.redSqr(),0===d.cmp(o))return!1;if(0===d.cmp(h))break}if(l===f)return!1}}return!0},i.prototype.getDivisor=function(t,e){var r=t.bitLength(),i=n.mont(t),a=new n(1).toRed(i);e||(e=Math.max(1,r/48|0));for(var o=t.subn(1),s=0;!o.testn(s);s++);for(var f=t.shrn(s),c=o.toRed(i);e>0;e--){var h=this._randrange(new n(2),o),u=t.gcd(h);if(0!==u.cmpn(1))return u;var d=h.toRed(i).redPow(f);if(0!==d.cmp(a)&&0!==d.cmp(c)){for(var l=1;l<s;l++){if(d=d.redSqr(),0===d.cmp(a))return d.fromRed().subn(1).gcd(t);if(0===d.cmp(c))break}if(l===s)return d=d.redSqr(),d.fromRed().subn(1).gcd(t)}}return!1}},function(t,e,r){function i(t){this.rand=t}var n;if(t.exports=function(t){return n||(n=new i(null)),n.generate(t)},t.exports.Rand=i,i.prototype.generate=function(t){return this._rand(t)},i.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),r=0;r<e.length;r++)e[r]=this.rand.getByte();return e},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(t){var e=new Uint8Array(t);return self.crypto.getRandomValues(e),e}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(t){var e=new Uint8Array(t);return self.msCrypto.getRandomValues(e),e}:"object"==typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var a=r(161);if("function"!=typeof a.randomBytes)throw new Error("Not supported");i.prototype._rand=function(t){return a.randomBytes(t)}}catch(t){}},function(t,e,r){"use strict";function i(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"!=typeof t){for(var i=0;i<t.length;i++)r[i]=0|t[i];return r}if("hex"===e){t=t.replace(/[^a-z0-9]+/gi,""),t.length%2!=0&&(t="0"+t);for(var i=0;i<t.length;i+=2)r.push(parseInt(t[i]+t[i+1],16))}else for(var i=0;i<t.length;i++){var n=t.charCodeAt(i),a=n>>8,o=255&n;a?r.push(a,o):r.push(o)}return r}function n(t){return 1===t.length?"0"+t:t}function a(t){for(var e="",r=0;r<t.length;r++)e+=n(t[r].toString(16));return e}var o=e;o.toArray=i,o.zero2=n,o.toHex=a,o.encode=function(t,e){return"hex"===e?a(t):t}},function(t,e,r){"use strict";function i(t,e,r,i){return 0===t?n(e,r,i):1===t||3===t?o(e,r,i):2===t?a(e,r,i):void 0}function n(t,e,r){return t&e^~t&r}function a(t,e,r){return t&e^t&r^e&r}function o(t,e,r){return t^e^r}function s(t){return d(t,2)^d(t,13)^d(t,22)}function f(t){return d(t,6)^d(t,11)^d(t,25)}function c(t){return d(t,7)^d(t,18)^t>>>3}function h(t){return d(t,17)^d(t,19)^t>>>10}var u=r(12),d=u.rotr32;e.ft_1=i,e.ch32=n,e.maj32=a,e.p32=o,e.s0_256=s,e.s1_256=f,e.g0_256=c,e.g1_256=h},function(t,e,r){"use strict";function i(){if(!(this instanceof i))return new i;v.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y,this.W=new Array(64)}var n=r(12),a=r(26),o=r(85),s=r(11),f=n.sum32,c=n.sum32_4,h=n.sum32_5,u=o.ch32,d=o.maj32,l=o.s0_256,p=o.s1_256,b=o.g0_256,g=o.g1_256,v=a.BlockHash,y=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];n.inherits(i,v),t.exports=i,i.blockSize=512,i.outSize=256,i.hmacStrength=192,i.padLength=64,i.prototype._update=function(t,e){for(var r=this.W,i=0;i<16;i++)r[i]=t[e+i];for(;i<r.length;i++)r[i]=c(g(r[i-2]),r[i-7],b(r[i-15]),r[i-16]);var n=this.h[0],a=this.h[1],o=this.h[2],v=this.h[3],y=this.h[4],m=this.h[5],_=this.h[6],w=this.h[7];for(s(this.k.length===r.length),i=0;i<r.length;i++){var S=h(w,p(y),u(y,m,_),this.k[i],r[i]),E=f(l(n),d(n,a,o));w=_,_=m,m=y,y=f(v,S),v=o,o=a,a=n,n=f(S,E)}this.h[0]=f(this.h[0],n),this.h[1]=f(this.h[1],a),this.h[2]=f(this.h[2],o),this.h[3]=f(this.h[3],v),this.h[4]=f(this.h[4],y),this.h[5]=f(this.h[5],m),this.h[6]=f(this.h[6],_),this.h[7]=f(this.h[7],w)},i.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(t,e,r){"use strict";function i(){if(!(this instanceof i))return new i;M.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=x,this.W=new Array(160)}function n(t,e,r,i,n){var a=t&r^~t&n;return a<0&&(a+=4294967296),a}function a(t,e,r,i,n,a){var o=e&i^~e&a;return o<0&&(o+=4294967296),o}function o(t,e,r,i,n){var a=t&r^t&n^r&n;return a<0&&(a+=4294967296),a}function s(t,e,r,i,n,a){var o=e&i^e&a^i&a;return o<0&&(o+=4294967296),o}function f(t,e){var r=m(t,e,28),i=m(e,t,2),n=m(e,t,7),a=r^i^n;return a<0&&(a+=4294967296),a}function c(t,e){var r=_(t,e,28),i=_(e,t,2),n=_(e,t,7),a=r^i^n;return a<0&&(a+=4294967296),a}function h(t,e){var r=m(t,e,14),i=m(t,e,18),n=m(e,t,9),a=r^i^n;return a<0&&(a+=4294967296),a}function u(t,e){var r=_(t,e,14),i=_(t,e,18),n=_(e,t,9),a=r^i^n;return a<0&&(a+=4294967296),a}function d(t,e){var r=m(t,e,1),i=m(t,e,8),n=w(t,e,7),a=r^i^n;return a<0&&(a+=4294967296),a}function l(t,e){var r=_(t,e,1),i=_(t,e,8),n=S(t,e,7),a=r^i^n;return a<0&&(a+=4294967296),a}function p(t,e){var r=m(t,e,19),i=m(e,t,29),n=w(t,e,6),a=r^i^n;return a<0&&(a+=4294967296),a}function b(t,e){var r=_(t,e,19),i=_(e,t,29),n=S(t,e,6),a=r^i^n;return a<0&&(a+=4294967296),a}var g=r(12),v=r(26),y=r(11),m=g.rotr64_hi,_=g.rotr64_lo,w=g.shr64_hi,S=g.shr64_lo,E=g.sum64,A=g.sum64_hi,T=g.sum64_lo,R=g.sum64_4_hi,k=g.sum64_4_lo,D=g.sum64_5_hi,I=g.sum64_5_lo,M=v.BlockHash,x=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];g.inherits(i,M),t.exports=i,i.blockSize=1024,i.outSize=512,i.hmacStrength=192,i.padLength=128,i.prototype._prepareBlock=function(t,e){for(var r=this.W,i=0;i<32;i++)r[i]=t[e+i];for(;i<r.length;i+=2){var n=p(r[i-4],r[i-3]),a=b(r[i-4],r[i-3]),o=r[i-14],s=r[i-13],f=d(r[i-30],r[i-29]),c=l(r[i-30],r[i-29]),h=r[i-32],u=r[i-31];r[i]=R(n,a,o,s,f,c,h,u),r[i+1]=k(n,a,o,s,f,c,h,u)}},i.prototype._update=function(t,e){this._prepareBlock(t,e);var r=this.W,i=this.h[0],d=this.h[1],l=this.h[2],p=this.h[3],b=this.h[4],g=this.h[5],v=this.h[6],m=this.h[7],_=this.h[8],w=this.h[9],S=this.h[10],R=this.h[11],k=this.h[12],M=this.h[13],x=this.h[14],L=this.h[15];y(this.k.length===r.length);for(var O=0;O<r.length;O+=2){var C=x,P=L,B=h(_,w),N=u(_,w),F=n(_,w,S,R,k),U=a(_,w,S,R,k,M),j=this.k[O],G=this.k[O+1],K=r[O],z=r[O+1],H=D(C,P,B,N,F,U,j,G,K,z),q=I(C,P,B,N,F,U,j,G,K,z);C=f(i,d),P=c(i,d),B=o(i,d,l,p,b),N=s(i,d,l,p,b,g);var V=A(C,P,B,N),W=T(C,P,B,N);x=k,L=M,k=S,M=R,S=_,R=w,_=A(v,m,H,q),w=T(m,m,H,q),v=b,m=g,b=l,g=p,l=i,p=d,i=A(H,q,V,W),d=T(H,q,V,W)}E(this.h,0,i,d),E(this.h,2,l,p),E(this.h,4,b,g),E(this.h,6,v,m),E(this.h,8,_,w),E(this.h,10,S,R),E(this.h,12,k,M),E(this.h,14,x,L)},i.prototype._digest=function(t){return"hex"===t?g.toHex32(this.h,"big"):g.split32(this.h,"big")}},function(t,e,r){function i(t,e){if(o.call(this,e),!s.isBuffer(t))return void this.error("Input not Buffer");this.base=t,this.offset=0,this.length=t.length}function n(t,e){if(Array.isArray(t))this.length=0,this.value=t.map(function(t){return t instanceof n||(t=new n(t,e)),this.length+=t.length,t},this);else if("number"==typeof t){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if("string"==typeof t)this.value=t,this.length=s.byteLength(t);else{if(!s.isBuffer(t))return e.error("Unsupported type: "+typeof t);this.value=t,this.length=t.length}}var a=r(0),o=r(28).Reporter,s=r(4).Buffer;a(i,o),e.DecoderBuffer=i,i.prototype.save=function(){return{offset:this.offset,reporter:o.prototype.save.call(this)}},i.prototype.restore=function(t){var e=new i(this.base);return e.offset=t.offset,e.length=this.offset,this.offset=t.offset,o.prototype.restore.call(this,t.reporter),e},i.prototype.isEmpty=function(){return this.offset===this.length},i.prototype.readUInt8=function(t){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(t||"DecoderBuffer overrun")},i.prototype.skip=function(t,e){if(!(this.offset+t<=this.length))return this.error(e||"DecoderBuffer overrun");var r=new i(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+t,this.offset+=t,r},i.prototype.raw=function(t){return this.base.slice(t?t.offset:this.offset,this.length)},e.EncoderBuffer=n,n.prototype.join=function(t,e){return t||(t=new s(this.length)),e||(e=0),0===this.length?t:(Array.isArray(this.value)?this.value.forEach(function(r){r.join(t,e),e+=r.length}):("number"==typeof this.value?t[e]=this.value:"string"==typeof this.value?t.write(this.value,e):s.isBuffer(this.value)&&this.value.copy(t,e),e+=this.length),t)}},function(t,e,r){var i=e;i._reverse=function(t){var e={};return Object.keys(t).forEach(function(r){(0|r)==r&&(r|=0);var i=t[r];e[i]=r}),e},i.der=r(193)},function(t,e,r){function i(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new n,this.tree._init(t.body)}function n(t){c.Node.call(this,"der",t)}function a(t,e){var r=t.readUInt8(e);if(t.isError(r))return r;var i=u.tagClass[r>>6],n=0==(32&r);if(31==(31&r)){var a=r;for(r=0;128==(128&a);){if(a=t.readUInt8(e),t.isError(a))return a;r<<=7,r|=127&a}}else r&=31;return{cls:i,primitive:n,tag:r,tagStr:u.tag[r]}}function o(t,e,r){var i=t.readUInt8(r);if(t.isError(i))return i;if(!e&&128===i)return null;if(0==(128&i))return i;var n=127&i;if(n>4)return t.error("length octect is too long");i=0;for(var a=0;a<n;a++){i<<=8;var o=t.readUInt8(r);if(t.isError(o))return o;i|=o}return i}var s=r(0),f=r(27),c=f.base,h=f.bignum,u=f.constants.der;t.exports=i,i.prototype.decode=function(t,e){return t instanceof c.DecoderBuffer||(t=new c.DecoderBuffer(t,e)),this.tree._decode(t,e)},s(n,c.Node),n.prototype._peekTag=function(t,e,r){if(t.isEmpty())return!1;var i=t.save(),n=a(t,'Failed to peek tag: "'+e+'"');return t.isError(n)?n:(t.restore(i),n.tag===e||n.tagStr===e||n.tagStr+"of"===e||r)},n.prototype._decodeTag=function(t,e,r){var i=a(t,'Failed to decode tag of "'+e+'"');if(t.isError(i))return i;var n=o(t,i.primitive,'Failed to get length of "'+e+'"');if(t.isError(n))return n;if(!r&&i.tag!==e&&i.tagStr!==e&&i.tagStr+"of"!==e)return t.error('Failed to match tag: "'+e+'"');if(i.primitive||null!==n)return t.skip(n,'Failed to match body of: "'+e+'"');var s=t.save(),f=this._skipUntilEnd(t,'Failed to skip indefinite length body: "'+this.tag+'"');return t.isError(f)?f:(n=t.offset-s.offset,t.restore(s),t.skip(n,'Failed to match body of: "'+e+'"'))},n.prototype._skipUntilEnd=function(t,e){for(;;){var r=a(t,e);if(t.isError(r))return r;var i=o(t,r.primitive,e);if(t.isError(i))return i;var n;if(n=r.primitive||null!==i?t.skip(i):this._skipUntilEnd(t,e),t.isError(n))return n;if("end"===r.tagStr)break}},n.prototype._decodeList=function(t,e,r,i){for(var n=[];!t.isEmpty();){var a=this._peekTag(t,"end");if(t.isError(a))return a;var o=r.decode(t,"der",i);if(t.isError(o)&&a)break;n.push(o)}return n},n.prototype._decodeStr=function(t,e){if("bitstr"===e){var r=t.readUInt8();return t.isError(r)?r:{unused:r,data:t.raw()}}if("bmpstr"===e){var i=t.raw();if(i.length%2==1)return t.error("Decoding of string type: bmpstr length mismatch");for(var n="",a=0;a<i.length/2;a++)n+=String.fromCharCode(i.readUInt16BE(2*a));return n}if("numstr"===e){var o=t.raw().toString("ascii");return this._isNumstr(o)?o:t.error("Decoding of string type: numstr unsupported characters")}if("octstr"===e)return t.raw();if("objDesc"===e)return t.raw();if("printstr"===e){var s=t.raw().toString("ascii");return this._isPrintstr(s)?s:t.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(e)?t.raw().toString():t.error("Decoding of string type: "+e+" unsupported")},n.prototype._decodeObjid=function(t,e,r){for(var i,n=[],a=0;!t.isEmpty();){var o=t.readUInt8();a<<=7,a|=127&o,0==(128&o)&&(n.push(a),a=0)}128&o&&n.push(a);var s=n[0]/40|0,f=n[0]%40;if(i=r?n:[s,f].concat(n.slice(1)),e){var c=e[i.join(" ")];void 0===c&&(c=e[i.join(".")]),void 0!==c&&(i=c)}return i},n.prototype._decodeTime=function(t,e){var r=t.raw().toString();if("gentime"===e)var i=0|r.slice(0,4),n=0|r.slice(4,6),a=0|r.slice(6,8),o=0|r.slice(8,10),s=0|r.slice(10,12),f=0|r.slice(12,14);else{if("utctime"!==e)return t.error("Decoding "+e+" time is not supported yet");var i=0|r.slice(0,2),n=0|r.slice(2,4),a=0|r.slice(4,6),o=0|r.slice(6,8),s=0|r.slice(8,10),f=0|r.slice(10,12);i=i<70?2e3+i:1900+i}return Date.UTC(i,n-1,a,o,s,f,0)},n.prototype._decodeNull=function(t){return null},n.prototype._decodeBool=function(t){var e=t.readUInt8();return t.isError(e)?e:0!==e},n.prototype._decodeInt=function(t,e){var r=t.raw(),i=new h(r);return e&&(i=e[i.toString(10)]||i),i},n.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getDecoder("der").tree}},function(t,e,r){function i(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new n,this.tree._init(t.body)}function n(t){h.Node.call(this,"der",t)}function a(t){return t<10?"0"+t:t}function o(t,e,r,i){var n;if("seqof"===t?t="seq":"setof"===t&&(t="set"),u.tagByName.hasOwnProperty(t))n=u.tagByName[t];else{if("number"!=typeof t||(0|t)!==t)return i.error("Unknown tag: "+t);n=t}return n>=31?i.error("Multi-octet tag encoding unsupported"):(e||(n|=32),n|=u.tagClassByName[r||"universal"]<<6)}var s=r(0),f=r(4).Buffer,c=r(27),h=c.base,u=c.constants.der;t.exports=i,i.prototype.encode=function(t,e){return this.tree._encode(t,e).join()},s(n,h.Node),n.prototype._encodeComposite=function(t,e,r,i){var n=o(t,e,r,this.reporter);if(i.length<128){var a=new f(2);return a[0]=n,a[1]=i.length,this._createEncoderBuffer([a,i])}for(var s=1,c=i.length;c>=256;c>>=8)s++;var a=new f(2+s);a[0]=n,a[1]=128|s;for(var c=1+s,h=i.length;h>0;c--,h>>=8)a[c]=255&h;return this._createEncoderBuffer([a,i])},n.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===e){for(var r=new f(2*t.length),i=0;i<t.length;i++)r.writeUInt16BE(t.charCodeAt(i),2*i);return this._createEncoderBuffer(r)}return"numstr"===e?this._isNumstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===e?this._isPrintstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(e)?this._createEncoderBuffer(t):"objDesc"===e?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: "+e+" unsupported")},n.prototype._encodeObjid=function(t,e,r){if("string"==typeof t){if(!e)return this.reporter.error("string objid given, but no values map found");if(!e.hasOwnProperty(t))return this.reporter.error("objid not found in values map");t=e[t].split(/[\s\.]+/g);for(var i=0;i<t.length;i++)t[i]|=0}else if(Array.isArray(t)){t=t.slice();for(var i=0;i<t.length;i++)t[i]|=0}if(!Array.isArray(t))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(t));if(!r){if(t[1]>=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}for(var n=0,i=0;i<t.length;i++){var a=t[i];for(n++;a>=128;a>>=7)n++}for(var o=new f(n),s=o.length-1,i=t.length-1;i>=0;i--){var a=t[i];for(o[s--]=127&a;(a>>=7)>0;)o[s--]=128|127&a}return this._createEncoderBuffer(o)},n.prototype._encodeTime=function(t,e){var r,i=new Date(t);return"gentime"===e?r=[a(i.getFullYear()),a(i.getUTCMonth()+1),a(i.getUTCDate()),a(i.getUTCHours()),a(i.getUTCMinutes()),a(i.getUTCSeconds()),"Z"].join(""):"utctime"===e?r=[a(i.getFullYear()%100),a(i.getUTCMonth()+1),a(i.getUTCDate()),a(i.getUTCHours()),a(i.getUTCMinutes()),a(i.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(r,"octstr")},n.prototype._encodeNull=function(){return this._createEncoderBuffer("")},n.prototype._encodeInt=function(t,e){if("string"==typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!=typeof t&&!f.isBuffer(t)){var r=t.toArray();!t.sign&&128&r[0]&&r.unshift(0),t=new f(r)}if(f.isBuffer(t)){var i=t.length;0===t.length&&i++;var n=new f(i);return t.copy(n),0===t.length&&(n[0]=0),this._createEncoderBuffer(n)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);for(var i=1,a=t;a>=256;a>>=8)i++;for(var n=new Array(i),a=n.length-1;a>=0;a--)n[a]=255&t,t>>=8;return 128&n[0]&&n.unshift(0),this._createEncoderBuffer(new f(n))},n.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},n.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getEncoder("der").tree},n.prototype._skipDefault=function(t,e,r){var i,n=this._baseState;if(null===n.default)return!1;var a=t.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,e,r).join()),a.length!==n.defaultBuffer.length)return!1;for(i=0;i<a.length;i++)if(a[i]!==n.defaultBuffer[i])return!1;return!0}},function(t,e){t.exports={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}},function(t,e,r){(function(e){function i(t){var r=new e(4);return r.writeUInt32BE(t,0),r}var n=r(23);t.exports=function(t,r){for(var a,o=new e(""),s=0;o.length<r;)a=i(s++),o=e.concat([o,n("sha1").update(t).update(a).digest()]);return o.slice(0,r)}}).call(e,r(4).Buffer)},function(t,e){t.exports=function(t,e){for(var r=t.length,i=-1;++i<r;)t[i]^=e[i];return t}},function(t,e,r){(function(e){function i(t,r){return new e(t.toRed(n.mont(r.modulus)).redPow(new n(r.publicExponent)).fromRed().toArray())}var n=r(6);t.exports=i}).call(e,r(4).Buffer)},function(t,e,r){"use strict";function i(t){var e,r,i="";for(e=0;e+3<=t.length;e+=3)r=parseInt(t.substring(e,e+3),16),i+=o.charAt(r>>6)+o.charAt(63&r);for(e+1==t.length?(r=parseInt(t.substring(e,e+1),16),i+=o.charAt(r<<2)):e+2==t.length&&(r=parseInt(t.substring(e,e+2),16),i+=o.charAt(r>>2)+o.charAt((3&r)<<4));(3&i.length)>0;)i+=s;return i}function n(t){var e,r="",i=0,n=0;for(e=0;e<t.length&&t.charAt(e)!=s;++e){var f=o.indexOf(t.charAt(e));f<0||(0==i?(r+=Object(a.b)(f>>2),n=3&f,i=1):1==i?(r+=Object(a.b)(n<<2|f>>4),n=15&f,i=2):2==i?(r+=Object(a.b)(n),r+=Object(a.b)(f>>2),n=3&f,i=3):(r+=Object(a.b)(n<<2|f>>4),r+=Object(a.b)(15&f),i=0))}return 1==i&&(r+=Object(a.b)(n<<2)),r}e.b=i,e.a=n;var a=r(97),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s="="},function(t,e,r){"use strict";function i(t){return h.charAt(t)}function n(t,e){return t&e}function a(t,e){return t|e}function o(t,e){return t^e}function s(t,e){return t&~e}function f(t){if(0==t)return-1;var e=0;return 0==(65535&t)&&(t>>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function c(t){for(var e=0;0!=t;)t&=t-1,++e;return e}e.b=i,e.d=n,e.f=a,e.g=o,e.e=s,e.c=f,e.a=c;var h="0123456789abcdefghijklmnopqrstuvwxyz"},function(t,e,r){!function(i,n){t.exports=e=n(r(1))}(0,function(t){return function(e){var r=t,i=r.lib,n=i.WordArray,a=i.Hasher,o=r.algo,s=[],f=[];!function(){function t(t){return 4294967296*(t-(0|t))|0}for(var r=2,i=0;i<64;)(function(t){for(var r=e.sqrt(t),i=2;i<=r;i++)if(!(t%i))return!1;return!0})(r)&&(i<8&&(s[i]=t(e.pow(r,.5))),f[i]=t(e.pow(r,1/3)),i++),r++}();var c=[],h=o.SHA256=a.extend({_doReset:function(){this._hash=new n.init(s.slice(0))},_doProcessBlock:function(t,e){for(var r=this._hash.words,i=r[0],n=r[1],a=r[2],o=r[3],s=r[4],h=r[5],u=r[6],d=r[7],l=0;l<64;l++){if(l<16)c[l]=0|t[e+l];else{var p=c[l-15],b=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,g=c[l-2],v=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;c[l]=b+c[l-7]+v+c[l-16]}var y=s&h^~s&u,m=i&n^i&a^n&a,_=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),w=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),S=d+w+y+f[l]+c[l],E=_+m;d=u,u=h,h=s,s=o+S|0,o=a,a=n,n=i,i=S+E|0}r[0]=r[0]+i|0,r[1]=r[1]+n|0,r[2]=r[2]+a|0,r[3]=r[3]+o|0,r[4]=r[4]+s|0,r[5]=r[5]+h|0,r[6]=r[6]+u|0,r[7]=r[7]+d|0},_doFinalize:function(){var t=this._data,r=t.words,i=8*this._nDataBytes,n=8*t.sigBytes;return r[n>>>5]|=128<<24-n%32,r[14+(n+64>>>9<<4)]=e.floor(i/4294967296),r[15+(n+64>>>9<<4)]=i,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var t=a.clone.call(this);return t._hash=this._hash.clone(),t}});r.SHA256=a._createHelper(h),r.HmacSHA256=a._createHmacHelper(h)}(Math),t.SHA256})},function(t,e,r){!function(i,n,a){t.exports=e=n(r(1),r(38))}(0,function(t){return function(){function e(){return o.create.apply(o,arguments)}var r=t,i=r.lib,n=i.Hasher,a=r.x64,o=a.Word,s=a.WordArray,f=r.algo,c=[e(1116352408,3609767458),e(1899447441,602891725),e(3049323471,3964484399),e(3921009573,2173295548),e(961987163,4081628472),e(1508970993,3053834265),e(2453635748,2937671579),e(2870763221,3664609560),e(3624381080,2734883394),e(310598401,1164996542),e(607225278,1323610764),e(1426881987,3590304994),e(1925078388,4068182383),e(2162078206,991336113),e(2614888103,633803317),e(3248222580,3479774868),e(3835390401,2666613458),e(4022224774,944711139),e(264347078,2341262773),e(604807628,2007800933),e(770255983,1495990901),e(1249150122,1856431235),e(1555081692,3175218132),e(1996064986,2198950837),e(2554220882,3999719339),e(2821834349,766784016),e(2952996808,2566594879),e(3210313671,3203337956),e(3336571891,1034457026),e(3584528711,2466948901),e(113926993,3758326383),e(338241895,168717936),e(666307205,1188179964),e(773529912,1546045734),e(1294757372,1522805485),e(1396182291,2643833823),e(1695183700,2343527390),e(1986661051,1014477480),e(2177026350,1206759142),e(2456956037,344077627),e(2730485921,1290863460),e(2820302411,3158454273),e(3259730800,3505952657),e(3345764771,106217008),e(3516065817,3606008344),e(3600352804,1432725776),e(4094571909,1467031594),e(275423344,851169720),e(430227734,3100823752),e(506948616,1363258195),e(659060556,3750685593),e(883997877,3785050280),e(958139571,3318307427),e(1322822218,3812723403),e(1537002063,2003034995),e(1747873779,3602036899),e(1955562222,1575990012),e(2024104815,1125592928),e(2227730452,2716904306),e(2361852424,442776044),e(2428436474,593698344),e(2756734187,3733110249),e(3204031479,2999351573),e(3329325298,3815920427),e(3391569614,3928383900),e(3515267271,566280711),e(3940187606,3454069534),e(4118630271,4000239992),e(116418474,1914138554),e(174292421,2731055270),e(289380356,3203993006),e(460393269,320620315),e(685471733,587496836),e(852142971,1086792851),e(1017036298,365543100),e(1126000580,2618297676),e(1288033470,3409855158),e(1501505948,4234509866),e(1607167915,987167468),e(1816402316,1246189591)],h=[];!function(){for(var t=0;t<80;t++)h[t]=e()}();var u=f.SHA512=n.extend({_doReset:function(){this._hash=new s.init([new o.init(1779033703,4089235720),new o.init(3144134277,2227873595),new o.init(1013904242,4271175723),new o.init(2773480762,1595750129),new o.init(1359893119,2917565137),new o.init(2600822924,725511199),new o.init(528734635,4215389547),new o.init(1541459225,327033209)])},_doProcessBlock:function(t,e){for(var r=this._hash.words,i=r[0],n=r[1],a=r[2],o=r[3],s=r[4],f=r[5],u=r[6],d=r[7],l=i.high,p=i.low,b=n.high,g=n.low,v=a.high,y=a.low,m=o.high,_=o.low,w=s.high,S=s.low,E=f.high,A=f.low,T=u.high,R=u.low,k=d.high,D=d.low,I=l,M=p,x=b,L=g,O=v,C=y,P=m,B=_,N=w,F=S,U=E,j=A,G=T,K=R,z=k,H=D,q=0;q<80;q++){var V,W,Y=h[q];if(q<16)W=Y.high=0|t[e+2*q],V=Y.low=0|t[e+2*q+1];else{var X=h[q-15],Z=X.high,J=X.low,Q=(Z>>>1|J<<31)^(Z>>>8|J<<24)^Z>>>7,$=(J>>>1|Z<<31)^(J>>>8|Z<<24)^(J>>>7|Z<<25),tt=h[q-2],et=tt.high,rt=tt.low,it=(et>>>19|rt<<13)^(et<<3|rt>>>29)^et>>>6,nt=(rt>>>19|et<<13)^(rt<<3|et>>>29)^(rt>>>6|et<<26),at=h[q-7],ot=at.high,st=at.low,ft=h[q-16],ct=ft.high,ht=ft.low;V=$+st,W=Q+ot+(V>>>0<$>>>0?1:0),V+=nt,W=W+it+(V>>>0<nt>>>0?1:0),V+=ht,W=W+ct+(V>>>0<ht>>>0?1:0),Y.high=W,Y.low=V}var ut=N&U^~N&G,dt=F&j^~F&K,lt=I&x^I&O^x&O,pt=M&L^M&C^L&C,bt=(I>>>28|M<<4)^(I<<30|M>>>2)^(I<<25|M>>>7),gt=(M>>>28|I<<4)^(M<<30|I>>>2)^(M<<25|I>>>7),vt=(N>>>14|F<<18)^(N>>>18|F<<14)^(N<<23|F>>>9),yt=(F>>>14|N<<18)^(F>>>18|N<<14)^(F<<23|N>>>9),mt=c[q],_t=mt.high,wt=mt.low,St=H+yt,Et=z+vt+(St>>>0<H>>>0?1:0),St=St+dt,Et=Et+ut+(St>>>0<dt>>>0?1:0),St=St+wt,Et=Et+_t+(St>>>0<wt>>>0?1:0),St=St+V,Et=Et+W+(St>>>0<V>>>0?1:0),At=gt+pt,Tt=bt+lt+(At>>>0<gt>>>0?1:0);z=G,H=K,G=U,K=j,U=N,j=F,F=B+St|0,N=P+Et+(F>>>0<B>>>0?1:0)|0,P=O,B=C,O=x,C=L,x=I,L=M,M=St+At|0,I=Et+Tt+(M>>>0<St>>>0?1:0)|0}p=i.low=p+M,i.high=l+I+(p>>>0<M>>>0?1:0),g=n.low=g+L,n.high=b+x+(g>>>0<L>>>0?1:0),y=a.low=y+C,a.high=v+O+(y>>>0<C>>>0?1:0),_=o.low=_+B,o.high=m+P+(_>>>0<B>>>0?1:0),S=s.low=S+F,s.high=w+N+(S>>>0<F>>>0?1:0),A=f.low=A+j,f.high=E+U+(A>>>0<j>>>0?1:0),R=u.low=R+K,u.high=T+G+(R>>>0<K>>>0?1:0),D=d.low=D+H,d.high=k+z+(D>>>0<H>>>0?1:0)},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return e[i>>>5]|=128<<24-i%32,e[30+(i+128>>>10<<5)]=Math.floor(r/4294967296),e[31+(i+128>>>10<<5)]=r,t.sigBytes=4*e.length,this._process(),this._hash.toX32()},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32});r.SHA512=n._createHelper(u),r.HmacSHA512=n._createHmacHelper(u)}(),t.SHA512})},function(t,e,r){/*! MIT License. Copyright 2015-2018 Richard Moore <me@ricmoo.com>. See LICENSE.txt. */
  8. !function(e){"use strict";function r(t){return parseInt(t)===t}function i(t){if(!r(t.length))return!1;for(var e=0;e<t.length;e++)if(!r(t[e])||t[e]<0||t[e]>255)return!1;return!0}function n(t,e){if(t.buffer&&"Uint8Array"===t.name)return e&&(t=t.slice?t.slice():Array.prototype.slice.call(t)),t;if(Array.isArray(t)){if(!i(t))throw new Error("Array contains invalid value: "+t);return new Uint8Array(t)}if(r(t.length)&&i(t))return new Uint8Array(t);throw new Error("unsupported array-like object")}function a(t){return new Uint8Array(t)}function o(t,e,r,i,n){null==i&&null==n||(t=t.slice?t.slice(i,n):Array.prototype.slice.call(t,i,n)),e.set(t,r)}function s(t){for(var e=[],r=0;r<t.length;r+=4)e.push(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3]);return e}function f(t){t=n(t,!0);var e=16-t.length%16,r=a(t.length+e);o(t,r);for(var i=t.length;i<r.length;i++)r[i]=e;return r}function c(t){if(t=n(t,!0),t.length<16)throw new Error("PKCS#7 invalid length");var e=t[t.length-1];if(e>16)throw new Error("PKCS#7 padding byte out of range");for(var r=t.length-e,i=0;i<e;i++)if(t[r+i]!==e)throw new Error("PKCS#7 invalid padding byte");var s=a(r);return o(t,s,0,0,r),s}var h=function(){function t(t){var e=[],r=0;for(t=encodeURI(t);r<t.length;){var i=t.charCodeAt(r++);37===i?(e.push(parseInt(t.substr(r,2),16)),r+=2):e.push(i)}return n(e)}function e(t){for(var e=[],r=0;r<t.length;){var i=t[r];i<128?(e.push(String.fromCharCode(i)),r++):i>191&&i<224?(e.push(String.fromCharCode((31&i)<<6|63&t[r+1])),r+=2):(e.push(String.fromCharCode((15&i)<<12|(63&t[r+1])<<6|63&t[r+2])),r+=3)}return e.join("")}return{toBytes:t,fromBytes:e}}(),u=function(){function t(t){for(var e=[],r=0;r<t.length;r+=2)e.push(parseInt(t.substr(r,2),16));return e}function e(t){for(var e=[],i=0;i<t.length;i++){var n=t[i];e.push(r[(240&n)>>4]+r[15&n])}return e.join("")}var r="0123456789abcdef";return{toBytes:t,fromBytes:e}}(),d={16:10,24:12,32:14},l=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],p=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],b=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],g=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],v=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],y=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],m=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],_=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],w=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],S=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],E=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],A=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],T=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],R=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],k=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925],D=function(t){if(!(this instanceof D))throw Error("AES must be instanitated with `new`");Object.defineProperty(this,"key",{value:n(t,!0)}),this._prepare()};D.prototype._prepare=function(){var t=d[this.key.length];if(null==t)throw new Error("invalid key size (must be 16, 24 or 32 bytes)");this._Ke=[],this._Kd=[];for(var e=0;e<=t;e++)this._Ke.push([0,0,0,0]),this._Kd.push([0,0,0,0]);for(var r,i=4*(t+1),n=this.key.length/4,a=s(this.key),e=0;e<n;e++)r=e>>2,this._Ke[r][e%4]=a[e],this._Kd[t-r][e%4]=a[e];for(var o,f=0,c=n;c<i;){if(o=a[n-1],a[0]^=p[o>>16&255]<<24^p[o>>8&255]<<16^p[255&o]<<8^p[o>>24&255]^l[f]<<24,f+=1,8!=n)for(var e=1;e<n;e++)a[e]^=a[e-1];else{for(var e=1;e<n/2;e++)a[e]^=a[e-1];o=a[n/2-1],a[n/2]^=p[255&o]^p[o>>8&255]<<8^p[o>>16&255]<<16^p[o>>24&255]<<24;for(var e=n/2+1;e<n;e++)a[e]^=a[e-1]}for(var h,u,e=0;e<n&&c<i;)h=c>>2,u=c%4,this._Ke[h][u]=a[e],this._Kd[t-h][u]=a[e++],c++}for(var h=1;h<t;h++)for(var u=0;u<4;u++)o=this._Kd[h][u],this._Kd[h][u]=A[o>>24&255]^T[o>>16&255]^R[o>>8&255]^k[255&o]},D.prototype.encrypt=function(t){if(16!=t.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var e=this._Ke.length-1,r=[0,0,0,0],i=s(t),n=0;n<4;n++)i[n]^=this._Ke[0][n];for(var o=1;o<e;o++){for(var n=0;n<4;n++)r[n]=g[i[n]>>24&255]^v[i[(n+1)%4]>>16&255]^y[i[(n+2)%4]>>8&255]^m[255&i[(n+3)%4]]^this._Ke[o][n];i=r.slice()}for(var f,c=a(16),n=0;n<4;n++)f=this._Ke[e][n],c[4*n]=255&(p[i[n]>>24&255]^f>>24),c[4*n+1]=255&(p[i[(n+1)%4]>>16&255]^f>>16),c[4*n+2]=255&(p[i[(n+2)%4]>>8&255]^f>>8),c[4*n+3]=255&(p[255&i[(n+3)%4]]^f);return c},D.prototype.decrypt=function(t){if(16!=t.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var e=this._Kd.length-1,r=[0,0,0,0],i=s(t),n=0;n<4;n++)i[n]^=this._Kd[0][n];for(var o=1;o<e;o++){for(var n=0;n<4;n++)r[n]=_[i[n]>>24&255]^w[i[(n+3)%4]>>16&255]^S[i[(n+2)%4]>>8&255]^E[255&i[(n+1)%4]]^this._Kd[o][n];i=r.slice()}for(var f,c=a(16),n=0;n<4;n++)f=this._Kd[e][n],c[4*n]=255&(b[i[n]>>24&255]^f>>24),c[4*n+1]=255&(b[i[(n+3)%4]>>16&255]^f>>16),c[4*n+2]=255&(b[i[(n+2)%4]>>8&255]^f>>8),c[4*n+3]=255&(b[255&i[(n+1)%4]]^f);return c};var I=function(t){if(!(this instanceof I))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new D(t)};I.prototype.encrypt=function(t){if(t=n(t),t.length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var e=a(t.length),r=a(16),i=0;i<t.length;i+=16)o(t,r,0,i,i+16),r=this._aes.encrypt(r),o(r,e,i);return e},I.prototype.decrypt=function(t){if(t=n(t),t.length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var e=a(t.length),r=a(16),i=0;i<t.length;i+=16)o(t,r,0,i,i+16),r=this._aes.decrypt(r),o(r,e,i);return e};var M=function(t,e){if(!(this instanceof M))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Block Chaining",this.name="cbc",e){if(16!=e.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else e=a(16);this._lastCipherblock=n(e,!0),this._aes=new D(t)};M.prototype.encrypt=function(t){if(t=n(t),t.length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var e=a(t.length),r=a(16),i=0;i<t.length;i+=16){o(t,r,0,i,i+16);for(var s=0;s<16;s++)r[s]^=this._lastCipherblock[s];this._lastCipherblock=this._aes.encrypt(r),o(this._lastCipherblock,e,i)}return e},M.prototype.decrypt=function(t){if(t=n(t),t.length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var e=a(t.length),r=a(16),i=0;i<t.length;i+=16){o(t,r,0,i,i+16),r=this._aes.decrypt(r);for(var s=0;s<16;s++)e[i+s]=r[s]^this._lastCipherblock[s];o(t,this._lastCipherblock,0,i,i+16)}return e};var x=function(t,e,r){if(!(this instanceof x))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Feedback",this.name="cfb",e){if(16!=e.length)throw new Error("invalid initialation vector size (must be 16 size)")}else e=a(16);r||(r=1),this.segmentSize=r,this._shiftRegister=n(e,!0),this._aes=new D(t)};x.prototype.encrypt=function(t){if(t.length%this.segmentSize!=0)throw new Error("invalid plaintext size (must be segmentSize bytes)");for(var e,r=n(t,!0),i=0;i<r.length;i+=this.segmentSize){e=this._aes.encrypt(this._shiftRegister);for(var a=0;a<this.segmentSize;a++)r[i+a]^=e[a];o(this._shiftRegister,this._shiftRegister,0,this.segmentSize),o(r,this._shiftRegister,16-this.segmentSize,i,i+this.segmentSize)}return r},x.prototype.decrypt=function(t){if(t.length%this.segmentSize!=0)throw new Error("invalid ciphertext size (must be segmentSize bytes)");for(var e,r=n(t,!0),i=0;i<r.length;i+=this.segmentSize){e=this._aes.encrypt(this._shiftRegister);for(var a=0;a<this.segmentSize;a++)r[i+a]^=e[a];o(this._shiftRegister,this._shiftRegister,0,this.segmentSize),o(t,this._shiftRegister,16-this.segmentSize,i,i+this.segmentSize)}return r};var L=function(t,e){if(!(this instanceof L))throw Error("AES must be instanitated with `new`");if(this.description="Output Feedback",this.name="ofb",e){if(16!=e.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else e=a(16);this._lastPrecipher=n(e,!0),this._lastPrecipherIndex=16,this._aes=new D(t)};L.prototype.encrypt=function(t){for(var e=n(t,!0),r=0;r<e.length;r++)16===this._lastPrecipherIndex&&(this._lastPrecipher=this._aes.encrypt(this._lastPrecipher),this._lastPrecipherIndex=0),e[r]^=this._lastPrecipher[this._lastPrecipherIndex++];return e},L.prototype.decrypt=L.prototype.encrypt;var O=function(t){if(!(this instanceof O))throw Error("Counter must be instanitated with `new`");0===t||t||(t=1),"number"==typeof t?(this._counter=a(16),this.setValue(t)):this.setBytes(t)};O.prototype.setValue=function(t){if("number"!=typeof t||parseInt(t)!=t)throw new Error("invalid counter value (must be an integer)");if(t>Number.MAX_SAFE_INTEGER)throw new Error("integer value out of safe range");for(var e=15;e>=0;--e)this._counter[e]=t%256,t=parseInt(t/256)},O.prototype.setBytes=function(t){if(t=n(t,!0),16!=t.length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=t},O.prototype.increment=function(){for(var t=15;t>=0;t--){if(255!==this._counter[t]){this._counter[t]++;break}this._counter[t]=0}};var C=function(t,e){if(!(this instanceof C))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",e instanceof O||(e=new O(e)),this._counter=e,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new D(t)};C.prototype.encrypt=function(t){for(var e=n(t,!0),r=0;r<e.length;r++)16===this._remainingCounterIndex&&(this._remainingCounter=this._aes.encrypt(this._counter._counter),this._remainingCounterIndex=0,this._counter.increment()),e[r]^=this._remainingCounter[this._remainingCounterIndex++];return e},C.prototype.decrypt=C.prototype.encrypt;var P={AES:D,Counter:O,ModeOfOperation:{ecb:I,cbc:M,cfb:x,ofb:L,ctr:C},utils:{hex:u,utf8:h},padding:{pkcs7:{pad:f,strip:c}},_arrayTest:{coerceArray:n,createArray:a,copyArray:o}};t.exports=P}()},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=r(20),a=r.n(n),o=r(246),s=r.n(o),f=r(5),c=r(102),h=r(2),u=r(7),d=r(57),l=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),p=Object(d.a)(),b=function(){function t(e,r){i(this,t),this.hls=e,this.id=r;var n=this.observer=new a.a,o=e.config;n.trigger=function(t){for(var e=arguments.length,r=Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];n.emit.apply(n,[t,t].concat(r))},n.off=function(t){for(var e=arguments.length,r=Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];n.removeListener.apply(n,[t].concat(r))};var d=function(t,r){r=r||{},r.frag=this.frag,r.id=this.id,e.trigger(t,r)}.bind(this);n.on(f.a.FRAG_DECRYPTED,d),n.on(f.a.FRAG_PARSING_INIT_SEGMENT,d),n.on(f.a.FRAG_PARSING_DATA,d),n.on(f.a.FRAG_PARSED,d),n.on(f.a.ERROR,d),n.on(f.a.FRAG_PARSING_METADATA,d),n.on(f.a.FRAG_PARSING_USERDATA,d),n.on(f.a.INIT_PTS_FOUND,d);var l={mp4:p.isTypeSupported("video/mp4"),mpeg:p.isTypeSupported("audio/mpeg"),mp3:p.isTypeSupported('audio/mp4; codecs="mp3"')},b=navigator.vendor;if(o.enableWorker&&"undefined"!=typeof Worker){h.b.log("demuxing in webworker");var g=void 0;try{g=this.w=s()(259),this.onwmsg=this.onWorkerMessage.bind(this),g.addEventListener("message",this.onwmsg),g.onerror=function(t){e.trigger(f.a.ERROR,{type:u.b.OTHER_ERROR,details:u.a.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",err:{message:t.message+" ("+t.filename+":"+t.lineno+")"}})},g.postMessage({cmd:"init",typeSupported:l,vendor:b,id:r,config:JSON.stringify(o),streamUrl:this.streamUrl})}catch(t){h.b.error("error while initializing DemuxerWorker, fallback on DemuxerInline"),g&&URL.revokeObjectURL(g.objectURL),this.demuxer=new c.a(n,l,o,b,this.streamUrl),this.w=void 0}}else this.demuxer=new c.a(n,l,o,b,this.streamUrl)}return t.prototype.destroy=function(){var t=this.w;if(t)t.removeEventListener("message",this.onwmsg),t.terminate(),this.w=null;else{var e=this.demuxer;e&&(e.destroy(),this.demuxer=null)}var r=this.observer;r&&(r.removeAllListeners(),this.observer=null)},t.prototype.push=function(t,e,r,i,n,a,o,s){var f=this.w,c=isNaN(n.startDTS)?n.start:n.startDTS,u=n.decryptdata,d=this.frag,l=!(d&&n.cc===d.cc),p=!(d&&n.level===d.level),b=d&&n.sn===d.sn+1,g=!p&&b;if(l&&h.b.log(this.id+":discontinuity detected"),p&&h.b.log(this.id+":switch detected"),this.frag=n,f)f.postMessage({cmd:"demux",data:t,decryptdata:u,initSegment:e,audioCodec:r,videoCodec:i,timeOffset:c,discontinuity:l,trackSwitch:p,contiguous:g,duration:a,accurateTimeOffset:o,defaultInitPTS:s},t instanceof ArrayBuffer?[t]:[]);else{var v=this.demuxer;v&&v.push(t,u,e,r,i,c,l,p,g,a,o,s)}},t.prototype.onWorkerMessage=function(t){var e=t.data,r=this.hls;switch(e.event){case"init":URL.revokeObjectURL(this.w.objectURL);break;case f.a.FRAG_PARSING_DATA:e.data.data1=new Uint8Array(e.data1),e.data2&&(e.data.data2=new Uint8Array(e.data2));default:e.data=e.data||{},e.data.frag=this.frag,e.data.id=this.id,r.trigger(e.event,e.data)}},l(t,[{key:"streamUrl",get:function(){return this.hls&&this.hls.streamController&&this.hls.streamController.fragCurrent?this.hls.streamController.fragCurrent.baseurl:""}}]),t}();e.a=b},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=r(5),a=r(7),o=r(56),s=r(250),f=r(60),c=r(251),h=r(254),u=r(255),d=r(258),l=function(){function t(e,r,n,a,o){i(this,t),this.observer=e,this.typeSupported=r,this.config=n,this.vendor=a,this.url=o}return t.prototype.destroy=function(){var t=this.demuxer;t&&t.destroy()},t.prototype.push=function(t,e,r,i,a,s,f,c,h,u,d,l){if(t.byteLength>0&&null!=e&&null!=e.key&&"AES-128"===e.method){var p=this.decrypter;null==p&&(p=this.decrypter=new o.a(this.observer,this.config));var b=this,g=void 0;try{g=performance.now()}catch(t){g=Date.now()}p.decrypt(t,e.key.buffer,e.iv.buffer,function(t){var o=void 0;try{o=performance.now()}catch(t){o=Date.now()}b.observer.trigger(n.a.FRAG_DECRYPTED,{stats:{tstart:g,tdecrypt:o}}),b.pushDecrypted(new Uint8Array(t),e,new Uint8Array(r),i,a,s,f,c,h,u,d,l)})}else this.pushDecrypted(new Uint8Array(t),e,new Uint8Array(r),i,a,s,f,c,h,u,d,l)},t.prototype.pushDecrypted=function(t,e,r,i,o,l,p,b,g,v,y,m){var _=this.demuxer;if(!_||(p||b)&&!this.probe(t)){for(var w=this.observer,S=this.typeSupported,E=this.config,A=[{demux:c.a,remux:u.a},{demux:f.a,remux:d.a},{demux:s.a,remux:u.a},{demux:h.a,remux:u.a}],T=0,R=A.length;T<R;T++){var k=A[T],D=k.demux.probe;if(D(t)){var I=this.remuxer=new k.remux(w,E,S,this.vendor);_=new k.demux(w,I,E,S,this.url),this.probe=D;break}}if(!_)return void w.trigger(n.a.ERROR,{type:a.b.MEDIA_ERROR,details:a.a.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"});this.demuxer=_}var M=this.remuxer;(p||b)&&(_.resetInitSegment(r,i,o,v),M.resetInitSegment()),p&&(_.resetTimeStamp(m),M.resetTimeStamp(m)),"function"==typeof _.setDecryptData&&_.setDecryptData(e),_.append(t,l,g,y)},t}();e.a=l},function(t,e,r){"use strict";function i(t,e,r,i){var n=void 0,a=void 0,o=void 0,s=void 0,f=void 0,c=navigator.userAgent.toLowerCase(),h=i,u=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];return n=1+((192&e[r+2])>>>6),(a=(60&e[r+2])>>>2)>u.length-1?void t.trigger(Event.ERROR,{type:p.b.MEDIA_ERROR,details:p.a.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+a}):(s=(1&e[r+2])<<2,s|=(192&e[r+3])>>>6,l.b.log("manifest codec:"+i+",ADTS data:type:"+n+",sampleingIndex:"+a+"["+u[a]+"Hz],channelConfig:"+s),/firefox/i.test(c)?a>=6?(n=5,f=new Array(4),o=a-3):(n=2,f=new Array(2),o=a):-1!==c.indexOf("android")?(n=2,f=new Array(2),o=a):(n=5,f=new Array(4),i&&(-1!==i.indexOf("mp4a.40.29")||-1!==i.indexOf("mp4a.40.5"))||!i&&a>=6?o=a-3:((i&&-1!==i.indexOf("mp4a.40.2")&&(a>=6&&1===s||/vivaldi/i.test(c))||!i&&1===s)&&(n=2,f=new Array(2)),o=a)),f[0]=n<<3,f[0]|=(14&a)>>1,f[1]|=(1&a)<<7,f[1]|=s<<3,5===n&&(f[1]|=(14&o)>>1,f[2]=(1&o)<<7,f[2]|=8,f[3]=0),{config:f,samplerate:u[a],channelCount:s,codec:"mp4a.40."+n,manifestCodec:h})}function n(t,e){return 255===t[e]&&240==(246&t[e+1])}function a(t,e){return 1&t[e+1]?7:9}function o(t,e){return(3&t[e+3])<<11|t[e+4]<<3|(224&t[e+5])>>>5}function s(t,e){return!!(e+1<t.length&&n(t,e))}function f(t,e){if(e+1<t.length&&n(t,e)){var r=a(t,e),i=r;e+5<t.length&&(i=o(t,e));var s=e+i;if(s===t.length||s+1<t.length&&n(t,s))return!0}return!1}function c(t,e,r,n,a){if(!t.samplerate){var o=i(e,r,n,a);t.config=o.config,t.samplerate=o.samplerate,t.channelCount=o.channelCount,t.codec=o.codec,t.manifestCodec=o.manifestCodec,l.b.log("parsed codec:"+t.codec+",rate:"+o.samplerate+",nb channel:"+o.channelCount)}}function h(t){return 9216e4/t}function u(t,e,r,i,n){var s=void 0,f=void 0,c=void 0,h=t.length;if(s=a(t,e),f=o(t,e),(f-=s)>0&&e+s+f<=h)return c=r+i*n,{headerLength:s,frameLength:f,stamp:c}}function d(t,e,r,i,n){var a=h(t.samplerate),o=u(e,r,i,n,a);if(o){var s=o.stamp,f=o.headerLength,c=o.frameLength,d={unit:e.subarray(r+f,r+f+c),pts:s,dts:s};return t.samples.push(d),t.len+=c,{sample:d,length:c+f}}}e.d=s,e.e=f,e.c=c,e.b=h,e.a=d;var l=r(2),p=r(7)},function(t,e,r){"use strict";var i={BitratesMap:[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],SamplingRateMap:[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],SamplesCoefficients:[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],BytesInSlot:[0,1,1,4],appendFrame:function(t,e,r,i,n){if(!(r+24>e.length)){var a=this.parseHeader(e,r);if(a&&r+a.frameLength<=e.length){var o=9e4*a.samplesPerFrame/a.sampleRate,s=i+n*o,f={unit:e.subarray(r,r+a.frameLength),pts:s,dts:s};return t.config=[],t.channelCount=a.channelCount,t.samplerate=a.sampleRate,t.samples.push(f),t.len+=a.frameLength,{sample:f,length:a.frameLength}}}},parseHeader:function(t,e){var r=t[e+1]>>3&3,n=t[e+1]>>1&3,a=t[e+2]>>4&15,o=t[e+2]>>2&3,s=t[e+2]>>1&1;if(1!==r&&0!==a&&15!==a&&3!==o){var f=3===r?3-n:3===n?3:4,c=1e3*i.BitratesMap[14*f+a-1],h=3===r?0:2===r?1:2,u=i.SamplingRateMap[3*h+o],d=t[e+3]>>6==3?1:2,l=i.SamplesCoefficients[r][n],p=i.BytesInSlot[n],b=8*l*p;return{sampleRate:u,channelCount:d,frameLength:parseInt(l*c/u+s,10)*p,samplesPerFrame:b}}},isHeaderPattern:function(t,e){return 255===t[e]&&224==(224&t[e+1])&&0!=(6&t[e+1])},isHeader:function(t,e){return!!(e+1<t.length&&this.isHeaderPattern(t,e))},probe:function(t,e){if(e+1<t.length&&this.isHeaderPattern(t,e)){var r=this.parseHeader(t,e),i=4;r&&r.frameLength&&(i=r.frameLength);var n=e+i;if(n===t.length||n+1<t.length&&this.isHeaderPattern(t,n))return!0}return!1}};e.a=i},function(t,e,r){"use strict";function i(t,e,r){var i=t[e],n=t[r],a=n.startPTS;isNaN(a)?n.start=r>e?i.start+i.duration:Math.max(i.start-n.duration,0):r>e?(i.duration=a-i.start,i.duration<0&&o.b.warn("negative duration computed for frag "+i.sn+",level "+i.level+", there should be some duration drift between playlist and fragment!")):(n.duration=i.start-a,n.duration<0&&o.b.warn("negative duration computed for frag "+n.sn+",level "+n.level+", there should be some duration drift between playlist and fragment!"))}function n(t,e,r,n,a,o){var s=r;if(!isNaN(e.startPTS)){var f=Math.abs(e.startPTS-r);isNaN(e.deltaPTS)?e.deltaPTS=f:e.deltaPTS=Math.max(f,e.deltaPTS),s=Math.max(r,e.startPTS),r=Math.min(r,e.startPTS),n=Math.max(n,e.endPTS),a=Math.min(a,e.startDTS),o=Math.max(o,e.endDTS)}var c=r-e.start;e.start=e.startPTS=r,e.maxStartPTS=s,e.endPTS=n,e.startDTS=a,e.endDTS=o,e.duration=n-r;var h=e.sn;if(!t||h<t.startSN||h>t.endSN)return 0;var u=void 0,d=void 0,l=void 0;for(u=h-t.startSN,d=t.fragments,d[u]=e,l=u;l>0;l--)i(d,l,l-1);for(l=u;l<d.length-1;l++)i(d,l,l+1);return t.PTSKnown=!0,c}function a(t,e){var r=Math.max(t.startSN,e.startSN)-e.startSN,i=Math.min(t.endSN,e.endSN)-e.startSN,a=e.startSN-t.startSN,s=t.fragments,f=e.fragments,c=0,h=void 0;if(e.initSegment&&t.initSegment&&(e.initSegment=t.initSegment),i<r)return void(e.PTSKnown=!1);for(var u=r;u<=i;u++){var d=s[a+u],l=f[u];l&&d&&(c=d.cc-l.cc,isNaN(d.startPTS)||(l.start=l.startPTS=d.startPTS,l.endPTS=d.endPTS,l.duration=d.duration,l.backtracked=d.backtracked,l.dropped=d.dropped,h=l))}if(c)for(o.b.log("discontinuity sliding from playlist, take drift into account"),u=0;u<f.length;u++)f[u].cc+=c;if(h)n(e,h,h.startPTS,h.endPTS,h.startDTS,h.endDTS);else if(a>=0&&a<s.length){var p=s[a].start;for(u=0;u<f.length;u++)f[u].start+=p}e.PTSKnown=t.PTSKnown}e.b=n,e.a=a;var o=r(2)},function(t,e,r){"use strict";var i={toString:function(t){for(var e="",r=t.length,i=0;i<r;i++)e+="["+t.start(i).toFixed(3)+","+t.end(i).toFixed(3)+"]";return e}};e.a=i},function(t,e,r){"use strict";function i(t,e){for(var r=null,i=0;i<t.length;i+=1){var n=t[i];if(n&&n.cc===e){r=n;break}}return r}function n(t,e){return c.a.search(t,function(t){return t.cc<e?1:t.cc>e?-1:0})}function a(t,e,r){var i=!1;return e&&e.details&&r&&(r.endCC>r.startCC||t&&t.cc<r.startCC)&&(i=!0),i}function o(t,e){var r=t.fragments,n=e.fragments;if(!n.length||!r.length)return void h.b.log("No fragments to align");var a=i(r,n[0].cc);return!a||a&&!a.startPTS?void h.b.log("No frag in previous level to align on"):a}function s(t,e){e.fragments.forEach(function(e){if(e){var r=e.start+t;e.start=e.startPTS=r,e.endPTS=r+e.duration}}),e.PTSKnown=!0}function f(t,e,r){if(a(t,e,r)){var i=o(e.details,r);i&&(h.b.log("Adjusting PTS using last level due to CC increase within current level"),s(i.start,r))}if(!1===r.PTSKnown&&e&&e.details&&e.details.fragments&&e.details.fragments.length){var n=e.details.programDateTime,f=r.programDateTime,c=(f-n)/1e3+e.details.fragments[0].start;isNaN(c)||(h.b.log("adjusting PTS using programDateTime delta, sliding:"+c.toFixed(3)),s(c,r))}}e.b=n,e.a=f;var c=r(39),h=r(2)},function(t,e,r){"use strict";function i(t,e){var r=null;try{r=new window.Event("addtrack")}catch(t){r=document.createEvent("Event"),r.initEvent("addtrack",!1,!1)}r.track=t,e.dispatchEvent(r)}function n(t){if(t&&t.cues)for(;t.cues.length>0;)t.removeCue(t.cues[0])}e.b=i,e.a=n},function(t,e,r){"use strict";function i(){this.window=window,this.state="INITIAL",this.buffer="",this.decoder=new h,this.regionList=[]}function n(t){function e(t,e,r,i){return 3600*(0|t)+60*(0|e)+(0|r)+(0|i)/1e3}var r=t.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return r?r[3]?e(r[1],r[2],r[3].replace(":",""),r[4]):r[1]>59?e(r[1],r[2],0,r[4]):e(0,r[1],r[2],r[4]):null}function a(){this.values=Object.create(null)}function o(t,e,r,i){var n=i?t.split(i):[t];for(var a in n)if("string"==typeof n[a]){var o=n[a].split(r);if(2===o.length){var s=o[0],f=o[1];e(s,f)}}}function s(t,e,r){function i(){var e=n(t);if(null===e)throw new Error("Malformed timestamp: "+f);return t=t.replace(/^[^\sa-zA-Z-]+/,""),e}function s(){t=t.replace(/^\s+/,"")}var f=t;if(s(),e.startTime=i(),s(),"--\x3e"!==t.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+f);t=t.substr(3),s(),e.endTime=i(),s(),function(t,e){var i=new a;o(t,function(t,e){switch(t){case"region":for(var n=r.length-1;n>=0;n--)if(r[n].id===e){i.set(t,r[n].region);break}break;case"vertical":i.alt(t,e,["rl","lr"]);break;case"line":var a=e.split(","),o=a[0];i.integer(t,o),i.percent(t,o)&&i.set("snapToLines",!1),i.alt(t,o,["auto"]),2===a.length&&i.alt("lineAlign",a[1],["start",d,"end"]);break;case"position":a=e.split(","),i.percent(t,a[0]),2===a.length&&i.alt("positionAlign",a[1],["start",d,"end","line-left","line-right","auto"]);break;case"size":i.percent(t,e);break;case"align":i.alt(t,e,["start",d,"end","left","right"])}},/:/,/\s/),e.region=i.get("region",null),e.vertical=i.get("vertical","");var n=i.get("line","auto");"auto"===n&&-1===u.line&&(n=-1),e.line=n,e.lineAlign=i.get("lineAlign","start"),e.snapToLines=i.get("snapToLines",!0),e.size=i.get("size",100),e.align=i.get("align",d);var s=i.get("position","auto");"auto"===s&&50===u.position&&(s="start"===e.align||"left"===e.align?0:"end"===e.align||"right"===e.align?100:50),e.position=s}(t,e)}function f(t){return t.replace(/<br(?: \/)?>/gi,"\n")}r.d(e,"b",function(){return f});var c=r(275),h=function(){return{decode:function(t){if(!t)return"";if("string"!=typeof t)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(t))}}};a.prototype={set:function(t,e){this.get(t)||""===e||(this.values[t]=e)},get:function(t,e,r){return r?this.has(t)?this.values[t]:e[r]:this.has(t)?this.values[t]:e},has:function(t){return t in this.values},alt:function(t,e,r){for(var i=0;i<r.length;++i)if(e===r[i]){this.set(t,e);break}},integer:function(t,e){/^-?\d+$/.test(e)&&this.set(t,parseInt(e,10))},percent:function(t,e){return!!(e.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(e=parseFloat(e))>=0&&e<=100)&&(this.set(t,e),!0)}};var u=new c.a(0,0,0),d="middle"===u.align?"middle":"center";i.prototype={parse:function(t){function e(){var t=r.buffer,e=0;for(t=f(t);e<t.length&&"\r"!==t[e]&&"\n"!==t[e];)++e;var i=t.substr(0,e);return"\r"===t[e]&&++e,"\n"===t[e]&&++e,r.buffer=t.substr(e),i}var r=this;t&&(r.buffer+=r.decoder.decode(t,{stream:!0}));try{var i=void 0;if("INITIAL"===r.state){if(!/\r\n|\n/.test(r.buffer))return this;i=e();var n=i.match(/^()?WEBVTT([ \t].*)?$/);if(!n||!n[0])throw new Error("Malformed WebVTT signature.");r.state="HEADER"}for(var a=!1;r.buffer;){if(!/\r\n|\n/.test(r.buffer))return this;switch(a?a=!1:i=e(),r.state){case"HEADER":/:/.test(i)?function(t){o(t,function(t,e){switch(t){case"Region":console.log("parse region",e)}},/:/)}(i):i||(r.state="ID");continue;case"NOTE":i||(r.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(i)){r.state="NOTE";break}if(!i)continue;if(r.cue=new c.a(0,0,""),r.state="CUE",-1===i.indexOf("--\x3e")){r.cue.id=i;continue}case"CUE":try{s(i,r.cue,r.regionList)}catch(t){r.cue=null,r.state="BADCUE";continue}r.state="CUETEXT";continue;case"CUETEXT":var h=-1!==i.indexOf("--\x3e");if(!i||h&&(a=!0)){r.oncue&&r.oncue(r.cue),r.cue=null,r.state="ID";continue}r.cue.text&&(r.cue.text+="\n"),r.cue.text+=i;continue;case"BADCUE":i||(r.state="ID");continue}}}catch(t){"CUETEXT"===r.state&&r.cue&&r.oncue&&r.oncue(r.cue),r.cue=null,r.state="INITIAL"===r.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var t=this;try{if(t.buffer+=t.decoder.decode(),(t.cue||"HEADER"===t.state)&&(t.buffer+="\n\n",t.parse()),"INITIAL"===t.state)throw new Error("Malformed WebVTT signature.")}catch(t){throw t}return t.onflush&&t.onflush(),this}},e.a=i},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=r(29),a=r.n(n),o=r(7),s=r(59),f=r(113),c=r(114),h=r(54),u=r(245),d=r(261),l=r(262),p=r(263),b=r(2),g=r(264),v=r(5),y=r(20),m=r.n(y),_=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}();r(284);var w=function(){function t(){var e=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,t);var n=t.DefaultConfig;if((r.liveSyncDurationCount||r.liveMaxLatencyDurationCount)&&(r.liveSyncDuration||r.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");for(var a in n)a in r||(r[a]=n[a]);if(void 0!==r.liveMaxLatencyDurationCount&&r.liveMaxLatencyDurationCount<=r.liveSyncDurationCount)throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be gt "liveSyncDurationCount"');if(void 0!==r.liveMaxLatencyDuration&&(r.liveMaxLatencyDuration<=r.liveSyncDuration||void 0===r.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be gt "liveSyncDuration"');Object(b.a)(r.debug),this.config=r,this._autoLevelCapping=-1;var o=this.observer=new m.a;o.trigger=function(t){for(var e=arguments.length,r=Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];o.emit.apply(o,[t,t].concat(r))},o.off=function(t){for(var e=arguments.length,r=Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];o.removeListener.apply(o,[t].concat(r))},this.on=o.on.bind(o),this.off=o.off.bind(o),this.trigger=o.trigger.bind(o);var p=this.abrController=new r.abrController(this),g=new r.bufferController(this),v=new r.capLevelController(this),y=new r.fpsController(this),_=new s.a(this),w=new f.a(this),S=new c.a(this),E=new l.a(this),A=this.levelController=new d.a(this),T=new h.b(this),R=this.streamController=new u.a(this,T),k=[A,R],D=r.audioStreamController;D&&k.push(new D(this,T)),this.networkControllers=k;var I=[_,w,S,p,g,v,y,E,T];if(D=r.audioTrackController){var M=new D(this);this.audioTrackController=M,I.push(M)}if(D=r.subtitleTrackController){var x=new D(this);this.subtitleTrackController=x,I.push(x)}if(D=r.emeController){var L=new D(this);this.emeController=L,I.push(L)}[r.subtitleStreamController,r.timelineController].forEach(function(t){t&&I.push(new t(e))}),this.coreComponents=I}return t.isSupported=function(){return Object(p.a)()},_(t,null,[{key:"version",get:function(){return"9.0.0"}},{key:"Events",get:function(){return v.a}},{key:"ErrorTypes",get:function(){return o.b}},{key:"ErrorDetails",get:function(){return o.a}},{key:"DefaultConfig",get:function(){return t.defaultConfig?t.defaultConfig:g.a},set:function(e){t.defaultConfig=e}}]),t.prototype.destroy=function(){b.b.log("destroy"),this.trigger(v.a.DESTROYING),this.detachMedia(),this.coreComponents.concat(this.networkControllers).forEach(function(t){t.destroy()}),this.url=null,this.observer.removeAllListeners(),this._autoLevelCapping=-1},t.prototype.attachMedia=function(t){b.b.log("attachMedia"),this.media=t,this.trigger(v.a.MEDIA_ATTACHING,{media:t})},t.prototype.detachMedia=function(){b.b.log("detachMedia"),this.trigger(v.a.MEDIA_DETACHING),this.media=null},t.prototype.loadSource=function(t){t=a.a.buildAbsoluteURL(window.location.href,t,{alwaysNormalize:!0}),b.b.log("loadSource:"+t),this.url=t,this.trigger(v.a.MANIFEST_LOADING,{url:t})},t.prototype.startLoad=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;b.b.log("startLoad("+t+")"),this.networkControllers.forEach(function(e){e.startLoad(t)})},t.prototype.stopLoad=function(){b.b.log("stopLoad"),this.networkControllers.forEach(function(t){t.stopLoad()})},t.prototype.swapAudioCodec=function(){b.b.log("swapAudioCodec"),this.streamController.swapAudioCodec()},t.prototype.recoverMediaError=function(){b.b.log("recoverMediaError");var t=this.media;this.detachMedia(),this.attachMedia(t)},_(t,[{key:"levels",get:function(){return this.levelController.levels},set:function(t){return this.levelController.levels=t}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(t){b.b.log("set currentLevel:"+t),this.loadLevel=t,this.config.seamlessHandover?this.streamController.nextLevelSwitch():this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(t){b.b.log("set nextLevel:"+t),this.levelController.manualLevel=t,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(t){b.b.log("set loadLevel:"+t),this.levelController.manualLevel=t}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(t){this.levelController.nextLoadLevel=t}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(t){b.b.log("set firstLevel:"+t),this.levelController.firstLevel=t}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(t){b.b.log("set startLevel:"+t);var e=this;-1!==t&&(t=Math.max(t,e.minAutoLevel)),e.levelController.startLevel=t}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(t){b.b.log("set autoLevelCapping:"+t),this._autoLevelCapping=t}},{key:"autoLevelEnabled",get:function(){return-1===this.levelController.manualLevel}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){for(var t=this,e=t.levels,r=t.config.minAutoBitrate,i=e?e.length:0,n=0;n<i;n++){if((e[n].realBitrate?Math.max(e[n].realBitrate,e[n].bitrate):e[n].bitrate)>r)return n}return 0}},{key:"maxAutoLevel",get:function(){var t=this,e=t.levels,r=t.autoLevelCapping;return-1===r&&e&&e.length?e.length-1:r}},{key:"nextAutoLevel",get:function(){var t=this;return Math.min(Math.max(t.abrController.nextAutoLevel,t.minAutoLevel),t.maxAutoLevel)},set:function(t){var e=this;e.abrController.nextAutoLevel=Math.max(e.minAutoLevel,t)}},{key:"audioTracks",get:function(){var t=this.audioTrackController;return t?t.audioTracks:[]}},{key:"audioTrack",get:function(){var t=this.audioTrackController;return t?t.audioTrack:-1},set:function(t){var e=this.audioTrackController;e&&(e.audioTrack=t)}},{key:"liveSyncPosition",get:function(){return this.streamController.liveSyncPosition}},{key:"subtitleTracks",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTrack:-1},set:function(t){var e=this.subtitleTrackController;e&&(e.subtitleTrack=t)}},{key:"subtitleDisplay",get:function(){var t=this.subtitleTrackController;return!!t&&t.subtitleDisplay},set:function(t){var e=this.subtitleTrackController;e&&(e.subtitleDisplay=t)}}]),t}();e.default=w},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=r(29),a=r.n(n),o=r(41),s=r(61),f=r(112),c=r(2),h=r(62),u=/#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)/g,d=/#EXT-X-MEDIA:(.*)/g,l=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/|(?!#)(\S+)/.source,/|#EXT-X-BYTERANGE:*(.+)/.source,/|#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/|#.*/.source].join(""),"g"),p=/(?:(?:#(EXTM3U))|(?:#EXT-X-(PLAYLIST-TYPE):(.+))|(?:#EXT-X-(MEDIA-SEQUENCE): *(\d+))|(?:#EXT-X-(TARGETDURATION): *(\d+))|(?:#EXT-X-(KEY):(.+))|(?:#EXT-X-(START):(.+))|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DISCONTINUITY-SEQ)UENCE:(\d+))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(VERSION):(\d+))|(?:#EXT-X-(MAP):(.+))|(?:(#)(.*):(.*))|(?:(#)(.*))(?:.*)\r?\n?/,b=/\.(mp4|m4s|m4v|m4a)$/i,g=function(){function t(){i(this,t)}return t.findGroup=function(t,e){if(!t)return null;for(var r=null,i=0;i<t.length;i++){var n=t[i];n.id===e&&(r=n)}return r},t.convertAVC1ToAVCOTI=function(t){var e=void 0,r=t.split(".");return r.length>2?(e=r.shift()+".",e+=parseInt(r.shift()).toString(16),e+=("000"+parseInt(r.shift()).toString(16)).substr(-4)):e=t,e},t.resolve=function(t,e){return a.a.buildAbsoluteURL(e,t,{alwaysNormalize:!0})},t.parseMasterPlaylist=function(e,r){var i=[],n=void 0;for(u.lastIndex=0;null!=(n=u.exec(e));){var a={},o=a.attrs=new f.a(n[1]);a.url=t.resolve(n[2],r);var s=o.decimalResolution("RESOLUTION");s&&(a.width=s.width,a.height=s.height),a.bitrate=o.decimalInteger("AVERAGE-BANDWIDTH")||o.decimalInteger("BANDWIDTH"),a.name=o.NAME,function(t,e){["video","audio"].forEach(function(r){var i=t.filter(function(t){return Object(h.b)(t,r)});if(i.length){var n=i.filter(function(t){return 0===t.lastIndexOf("avc1",0)||0===t.lastIndexOf("mp4a",0)});e[r+"Codec"]=n.length>0?n[0]:i[0],t=t.filter(function(t){return-1===i.indexOf(t)})}}),e.unknownCodecs=t}([].concat((o.CODECS||"").split(/[ ,]+/)),a),a.videoCodec&&-1!==a.videoCodec.indexOf("avc1")&&(a.videoCodec=t.convertAVC1ToAVCOTI(a.videoCodec)),i.push(a)}return i},t.parseMasterPlaylistMedia=function(e,r,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],a=void 0,o=[],s=0;for(d.lastIndex=0;null!==(a=d.exec(e));){var c={},h=new f.a(a[1]);if(h.TYPE===i){if(c.groupId=h["GROUP-ID"],c.name=h.NAME,c.type=i,c.default="YES"===h.DEFAULT,c.autoselect="YES"===h.AUTOSELECT,c.forced="YES"===h.FORCED,h.URI&&(c.url=t.resolve(h.URI,r)),c.lang=h.LANGUAGE,c.name||(c.name=c.lang),n.length){var u=t.findGroup(n,c.groupId);c.audioCodec=u?u.codec:n[0].codec}c.id=s++,o.push(c)}}return o},t.parseLevelPlaylist=function(t,e,r,i,n){var a=0,h=0,u={type:null,version:null,url:e,fragments:[],live:!0,startSN:0},d=new s.a,g=0,v=null,y=new o.a,m=void 0,_=void 0;for(l.lastIndex=0;null!==(m=l.exec(t));){var w=m[1];if(w){y.duration=parseFloat(w);var S=(" "+m[2]).slice(1);y.title=S||null,y.tagList.push(S?["INF",w,S]:["INF",w])}else if(m[3]){if(!isNaN(y.duration)){var E=a++;y.type=i,y.start=h,y.levelkey=d,y.sn=E,y.level=r,y.cc=g,y.urlId=n,y.baseurl=e,y.relurl=(" "+m[3]).slice(1),u.programDateTime&&(v?y.rawProgramDateTime?y.pdt=Date.parse(y.rawProgramDateTime):y.pdt=v.pdt+1e3*v.duration:y.pdt=u.programDateTime,y.endPdt=y.pdt+1e3*y.duration),u.fragments.push(y),v=y,h+=y.duration,y=new o.a}}else if(m[4]){if(y.rawByteRange=(" "+m[4]).slice(1),v){var A=v.byteRangeEndOffset;A&&(y.lastByteRangeEndOffset=A)}}else if(m[5])y.rawProgramDateTime=(" "+m[5]).slice(1),y.tagList.push(["PROGRAM-DATE-TIME",y.rawProgramDateTime]),void 0===u.programDateTime&&(u.programDateTime=new Date(Date.parse(m[5]))-1e3*h);else{for(m=m[0].match(p),_=1;_<m.length&&void 0===m[_];_++);var T=(" "+m[_+1]).slice(1),R=(" "+m[_+2]).slice(1);switch(m[_]){case"#":y.tagList.push(R?[T,R]:[T]);break;case"PLAYLIST-TYPE":u.type=T.toUpperCase();break;case"MEDIA-SEQUENCE":a=u.startSN=parseInt(T);break;case"TARGETDURATION":u.targetduration=parseFloat(T);break;case"VERSION":u.version=parseInt(T);break;case"EXTM3U":break;case"ENDLIST":u.live=!1;break;case"DIS":g++,y.tagList.push(["DIS"]);break;case"DISCONTINUITY-SEQ":g=parseInt(T);break;case"KEY":var k=T,D=new f.a(k),I=D.enumeratedString("METHOD"),M=D.URI,x=D.hexadecimalInteger("IV");I&&(d=new s.a,M&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(I)>=0&&(d.method=I,d.baseuri=e,d.reluri=M,d.key=null,d.iv=x));break;case"START":var L=T,O=new f.a(L),C=O.decimalFloatingPoint("TIME-OFFSET");isNaN(C)||(u.startTimeOffset=C);break;case"MAP":var P=new f.a(T);y.relurl=P.URI,y.rawByteRange=P.BYTERANGE,y.baseurl=e,y.level=r,y.type=i,y.sn="initSegment",u.initSegment=y,y=new o.a;break;default:c.b.warn("line parsed but not handled: "+m)}}}return y=v,y&&!y.relurl&&(u.fragments.pop(),h-=y.duration),u.totalduration=h,u.averagetargetduration=h/u.fragments.length,u.endSN=a-1,u.startCC=u.fragments[0]?u.fragments[0].cc:0,u.endCC=g,!u.initSegment&&u.fragments.length&&u.fragments.every(function(t){return b.test(t.relurl)})&&(c.b.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),y=new o.a,y.relurl=u.fragments[0].relurl,y.baseurl=e,y.level=r,y.type=i,y.sn="initSegment",u.initSegment=y,u.needSidxRanges=!0),u},t}();e.a=g},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=/^(\d+)x(\d+)$/,a=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,o=function(){function t(e){i(this,t),"string"==typeof e&&(e=t.parseAttrList(e));for(var r in e)e.hasOwnProperty(r)&&(this[r]=e[r])}return t.prototype.decimalInteger=function(t){var e=parseInt(this[t],10);return e>Number.MAX_SAFE_INTEGER?1/0:e},t.prototype.hexadecimalInteger=function(t){if(this[t]){var e=(this[t]||"0x").slice(2);e=(1&e.length?"0":"")+e;for(var r=new Uint8Array(e.length/2),i=0;i<e.length/2;i++)r[i]=parseInt(e.slice(2*i,2*i+2),16);return r}return null},t.prototype.hexadecimalIntegerAsNumber=function(t){var e=parseInt(this[t],16);return e>Number.MAX_SAFE_INTEGER?1/0:e},t.prototype.decimalFloatingPoint=function(t){return parseFloat(this[t])},t.prototype.enumeratedString=function(t){return this[t]},t.prototype.decimalResolution=function(t){var e=n.exec(this[t]);if(null!==e)return{width:parseInt(e[1],10),height:parseInt(e[2],10)}},t.parseAttrList=function(t){var e=void 0,r={};for(a.lastIndex=0;null!==(e=a.exec(t));){var i=e[2];0===i.indexOf('"')&&i.lastIndexOf('"')===i.length-1&&(i=i.slice(1,-1)),r[e[1]]=i}return r},t}();e.a=o},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(5),s=r(9),f=r(7),c=r(2),h=function(t){function e(r){i(this,e);var a=n(this,t.call(this,r,o.a.FRAG_LOADING));return a.loaders={},a.count=0,a}return a(e,t),e.prototype.destroy=function(){var e=this.loaders;for(var r in e){var i=e[r];i&&i.destroy()}this.loaders={},t.prototype.destroy.call(this)},e.prototype.onFragLoading=function(t){var e=t.frag,r=e.type,i=this.loaders,n=this.hls.config,a=n.fLoader,o=n.loader;e.loaded=0;var s=i[r];s&&(c.b.warn("abort previous fragment loader for type: "+r),s.abort()),s=i[r]=e.loader=n.fLoader?new a(n):new o(n);var f=void 0,h=void 0,u=void 0;f={url:e.url,frag:e,responseType:"arraybuffer",progressData:!1};var d=e.byteRangeStartOffset,l=e.byteRangeEndOffset;isNaN(d)||isNaN(l)||(f.rangeStart=d,f.rangeEnd=l),h={timeout:n.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:n.fragLoadingMaxRetryTimeout},u={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this),onProgress:this.loadprogress.bind(this)},s.load(f,h,u)},e.prototype.loadsuccess=function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,n=t.data,a=r.frag;a.loader=void 0,this.loaders[a.type]=void 0,this.hls.trigger(o.a.FRAG_LOADED,{payload:n,frag:a,stats:e,networkDetails:i})},e.prototype.loaderror=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.retryfragment(t,e,r,f.a.FRAG_LOAD_ERROR)},e.prototype.loadtimeout=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.retryfragment(null,e,r,f.a.FRAG_LOAD_TIMEOUT)},e.prototype.retryfragment=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,n=e.loader,a=this.hls.config.fragLoadingRetryDelay;n&&n.abort();var s=this;this.count<=3?(setTimeout(function(){s.loaders[e.type?e.type:e.frag.type].reload()},a>1e3?a:1e3),this.count++):(this.loaders[e.type?e.type:e.frag.type]=void 0,t?this.hls.trigger(o.a.ERROR,{type:f.b.NETWORK_ERROR,details:i,fatal:!1,frag:e.frag,response:t,networkDetails:r}):this.hls.trigger(o.a.ERROR,{type:f.b.NETWORK_ERROR,details:i,fatal:!1,frag:e.frag,networkDetails:r}),this.count=0)},e.prototype.loadprogress=function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,n=e.frag;n.loaded=t.loaded,this.hls.trigger(o.a.FRAG_LOAD_PROGRESS,{frag:n,stats:t,networkDetails:i})},e}(s.a);e.a=h},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(5),s=r(9),f=r(7),c=r(2),h=r(115),u=r.n(h),d=r(208),l=r(221),p=r.n(l),b=r(100),g=function(t){function e(r){i(this,e);var a=n(this,t.call(this,r,o.a.KEY_LOADING));return a.loaders={},a.decryptkey=null,a.decrypturl=null,a.aliyunUri="",a.isAliyunEncrypt=!1,a.PUBLIC_KEY="MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqFw8es0P7jNhIt5beGmwKSD/PJ7sLyTBTi3WmPDMnbmmfqpkSc9PvkfOAGubd9LcGpKMxiP+EZv4Wrj0fB3HbSfGf5eSdn6GrEhYTWppnnIZLhN7AfHewxZMpyCla9aWGJW2DSo0B93zFZdeDiW5w6MvZ9ukCian2d1AyIl2MKLoT1P3yH4KxMdhA3wTSm+KikVKDrMco5YdwWzZudHefbMZlC9tuuiQS2v13r5k9KmcxoHBuirsPzBbSn9BtK4rqsDOeZkAkvkiYP+4nYx/1HhPvRLMS69Txu+j7Pc7BAcrMQiUSxI6+PJ3gMDM5Db4K/zL0m6SqCBbDvmGm31bkQIDAQAB",a}return a(e,t),e.prototype.destroy=function(){for(var t in this.loaders){var e=this.loaders[t];e&&e.destroy()}this.loaders={},s.a.prototype.destroy.call(this)},e.prototype.onKeyLoading=function(t){var e=t.frag,r=e.type,i=this.loaders[r],n=e.decryptdata,a=n.uri,s="";if(n.reluri&&(s=this._parseAliyunEncrypt(n.reluri),a=s||n.uri),a!==this.decrypturl||null===this.decryptkey){var f=this.hls.config;i&&(c.b.warn("abort previous key loader for type:"+r),i.abort()),e.loader=this.loaders[r]=new f.loader(f),this.decrypturl=a,this.decryptkey=null;var h=void 0,u=void 0,d=void 0;h={url:a,frag:e,responseType:"arraybuffer"},u={timeout:f.fragLoadingTimeOut,maxRetry:f.fragLoadingMaxRetry,retryDelay:f.fragLoadingRetryDelay,maxRetryDelay:f.fragLoadingMaxRetryTimeout},d={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)},e.loader.load(h,u,d)}else this.decryptkey&&(e.decryptdata.key=this.decryptkey,this.hls.trigger(o.a.KEY_LOADED,{frag:e}))},e.prototype.loadsuccess=function(t,e,r){var i=null;if(this.isAliyunEncrypt){var n=this._decodeUtf8(t.data),a=JSON.parse(n);a&&a.Random&&a.Plaintext&&(i=this._sce_dlgtqred(this.r1,a.Random,a.Plaintext))}var s=r.frag;this.decryptkey=s.decryptdata.key=new Uint8Array(i||t.data),console.log("decryptkey:",this.decryptkey),s.loader=void 0,this.loaders[s.type]=void 0,this.hls.trigger(o.a.KEY_LOADED,{frag:s})},e.prototype.loaderror=function(t,e){var r=e.frag,i=r.loader;i&&i.abort(),this.loaders[e.type]=void 0,this.hls.trigger(o.a.ERROR,{type:f.b.NETWORK_ERROR,details:f.a.KEY_LOAD_ERROR,fatal:!1,frag:r,response:t})},e.prototype.loadtimeout=function(t,e){var r=e.frag,i=r.loader;i&&i.abort(),this.loaders[e.type]=void 0,this.hls.trigger(o.a.ERROR,{type:f.b.NETWORK_ERROR,details:f.a.KEY_LOAD_TIMEOUT,fatal:!1,frag:r})},e.prototype._parseAliyunEncrypt=function(t){if(t&&t.indexOf("metadata=type=aliyun")>=0)for(var e=t.split(";"),r=0;r<e.length;++r)if(e[r]){var i=e[r].indexOf("=");if(i>=0){var n=e[r].substring(0,i);if("uri"==n){if(this.aliyunUri===e[r])return this.decrypturl;var a=e[r].substring(i+1,e[r].length);if((i=a.indexOf("?"))>=0){var o=a.substring(i+1,a.length);if((i=o.indexOf("="))>0){var s=o.substring(0,i),f=o.substring(i+1,o.length),c=this.getParams(s,f);return this.isAliyunEncrypt=!0,this.aliyunUri=e[r],"https://live.aliyuncs.com?"+c}}}}}return""},e.prototype.getParams=function(t,e){var r=this.hls.config.stream;this.r1=this._sce_r_skjhfnck();var i=new d.a;i.setPublicKey("-----BEGIN PUBLIC KEY-----"+this.PUBLIC_KEY+"-----END PUBLIC KEY-----");var n=i.encrypt(this.r1+r),a={Action:"DecryptKey",Domain:this.hls.config.domain,App:this.hls.config.app,Stream:r,SecurityToken:this.hls.config.securityToken,Version:"2016-11-01",Rand:n,AccessKeyId:"LTAI4GDv1nZpttLv1FCQKDB7",SignatureMethod:"HMAC-SHA1",Timestamp:this._ISODateString(new Date),SignatureVersion:"1.0",Format:"JSON",SignatureNonce:String(u.a.randomUUID())};a[t]=e;return u.a.makeUTF8sort(a,"=","&")+"&Signature="+u.a.AliyunEncodeURI(u.a.makeChangeSiga(a,"6GA8IRcjzKFncFeChBnoO1Pot9B1Wj"))},e.prototype._ISODateString=function(t){function e(t){return t<10?"0"+t:t}return t.getUTCFullYear()+"-"+e(t.getUTCMonth()+1)+"-"+e(t.getUTCDate())+"T"+e(t.getUTCHours())+":"+e(t.getUTCMinutes())+":"+e(t.getUTCSeconds())+"Z"},e.prototype._decodeUtf8=function(t){var e="",r=0,i=0,n=0,a=0,o=new Uint8Array(t);for(o.length>=3&&239===o[0]&&187===o[1]&&191===o[2]&&(r=3);r<o.length;)if((i=o[r])<128)e+=String.fromCharCode(i),r++;else if(i>191&&i<224){if(r+1>=o.length)throw"UTF-8 Decode failed. Two byte character was truncated.";n=o[r+1],e+=String.fromCharCode((31&i)<<6|63&n),r+=2}else{if(r+2>=o.length)throw"UTF-8 Decode failed. Multi byte character was truncated.";n=o[r+1],a=o[r+2],e+=String.fromCharCode((15&i)<<12|(63&n)<<6|63&a),r+=3}return e},e.prototype._sce_r_skjhfnck=function(t){var e="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz234567890";t=t||16;for(var r=e.length,i="",n=0;n<t;n++)i+=e.charAt(Math.floor(Math.random()*r));return i},e.prototype._sce_dlgtqred=function(t,e,r){var i=p.a.MD5(t),n=i.toString().substring(8,24),a=p.a.enc.Utf8.parse(n);e=e.replace(/[\r\n]/g,"");var o=p.a.AES.decrypt(e,a,{iv:a,mode:p.a.mode.CBC,padding:p.a.pad.Pkcs7}),s=o.toString(p.a.enc.Utf8),f=p.a.MD5(t+s),c=f.toString().substring(8,24),h=p.a.enc.Utf8.parse(c),u=p.a.AES.decrypt(r,h,{iv:a,mode:p.a.mode.CBC,padding:p.a.pad.Pkcs7}),d=u.toString(p.a.enc.Utf8),l=p.a.enc.Base64.parse(d).toString();return console.log("plainText:",l),l=b.utils.hex.toBytes(l)},e}(s.a);e.a=g},function(t,e,r){var n=r(116),a=r(17),o=r(207);t.exports.randomUUID=function(){for(var t=[],e="0123456789abcdef",r=0;r<36;r++)t[r]=e.substr(Math.floor(16*Math.random()),1);return t[14]="4",t[19]=e.substr(3&t[19]|8,1),t[8]=t[13]=t[18]=t[23]="-",t.join("")},t.exports.returnUTCDate=function(){var t=new Date,e=t.getUTCFullYear(),r=t.getUTCMonth(),i=t.getUTCDate(),n=t.getUTCHours(),a=t.getUTCMinutes(),o=t.getUTCSeconds(),s=t.getUTCMilliseconds();return Date.UTC(e,r,i,n,a,o,s)},t.exports.AliyunEncodeURI=function(t){var e=encodeURIComponent(t);return e=e.replace("+","%2B"),e=e.replace("*","%2A"),e=e.replace("%7E","~")},t.exports.makesort=function(t,e,r){if(!t)throw new Error("PrismPlayer Error: vid should not be null!");var i=[];for(var n in t)i.push(n);for(var a=i.sort(),o="",s=a.length,n=0;n<s;n++)""==o?o=a[n]+e+t[a[n]]:o+=r+a[n]+e+t[a[n]];return o},t.exports.makeUTF8sort=function(e,r,i){if(!e)throw new Error("PrismPlayer Error: vid should not be null!");var n=[];for(var a in e)n.push(a);for(var o=n.sort(),s="",f=o.length,a=0;a<f;a++){var c=t.exports.AliyunEncodeURI(o[a]),h=t.exports.AliyunEncodeURI(e[o[a]]);""==s?s=c+r+h:s+=i+c+r+h}return s},t.exports.makeChangeSiga=function(e,r,i){if(!e)throw new Error("PrismPlayer Error: vid should not be null!");return i||(i="GET"),a.stringify(n(i+"&"+t.exports.AliyunEncodeURI("/")+"&"+t.exports.AliyunEncodeURI(t.exports.makeUTF8sort(e,"=","&")),r+"&"))},t.exports.ISODateString=function(t){function e(t){return t<10?"0"+t:t}return t.getUTCFullYear()+"-"+e(t.getUTCMonth()+1)+"-"+e(t.getUTCDate())+"T"+e(t.getUTCHours())+":"+e(t.getUTCMinutes())+":"+e(t.getUTCSeconds())+"Z"},t.exports.encPlayAuth=function(t){var t=o.stringify(a.parse(t));if(!t)throw new Error("playuth参数解析为空");return JSON.parse(t)},t.exports.encRsa=function(){},t.exports.stringToArray=function(t){for(var e=new ArrayBuffer(2*t.length),r=new Uint16Array(e),i=0,n=t.length;i<n;i++)r[i]=t.charCodeAt(i);return r},t.exports.Uint8ArrayToString=function(t){for(var e="",r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},t.exports.arrayToString=function(t){var e=new Uint16Array(t.buffer);return String.fromCharCode.apply(null,e)},t.exports.base64DecodeUint8Array=function(t){var e=window.atob(t),r=e.length,n=new Uint8Array(new ArrayBuffer(r));for(i=0;i<r;i++)n[i]=e.charCodeAt(i);return n},t.exports.base64EncodeUint8Array=function(t){for(var e,r,i,n,a,o,s,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",c="",h=0;h<t.length;)e=t[h++],r=h<t.length?t[h++]:Number.NaN,i=h<t.length?t[h++]:Number.NaN,n=e>>2,a=(3&e)<<4|r>>4,o=(15&r)<<2|i>>6,s=63&i,isNaN(r)?o=s=64:isNaN(i)&&(s=64),c+=f.charAt(n)+f.charAt(a)+f.charAt(o)+f.charAt(s);return c}},function(t,e,r){!function(i,n,a){t.exports=e=n(r(1),r(36),r(37))}(0,function(t){return t.HmacSHA1})},function(t,e,r){"use strict";e.randomBytes=e.rng=e.pseudoRandomBytes=e.prng=r(19),e.createHash=e.Hash=r(23),e.createHmac=e.Hmac=r(70);var i=r(137),n=Object.keys(i),a=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(n);e.getHashes=function(){return a};var o=r(72);e.pbkdf2=o.pbkdf2,e.pbkdf2Sync=o.pbkdf2Sync;var s=r(139);e.Cipher=s.Cipher,e.createCipher=s.createCipher,e.Cipheriv=s.Cipheriv,e.createCipheriv=s.createCipheriv,e.Decipher=s.Decipher,e.createDecipher=s.createDecipher,e.Decipheriv=s.Decipheriv,e.createDecipheriv=s.createDecipheriv,e.getCiphers=s.getCiphers,e.listCiphers=s.listCiphers;var f=r(158);e.DiffieHellmanGroup=f.DiffieHellmanGroup,e.createDiffieHellmanGroup=f.createDiffieHellmanGroup,e.getDiffieHellman=f.getDiffieHellman,e.createDiffieHellman=f.createDiffieHellman,e.DiffieHellman=f.DiffieHellman;var c=r(164);e.createSign=c.createSign,e.Sign=c.Sign,e.createVerify=c.createVerify,e.Verify=c.Verify,e.createECDH=r(202);var h=r(203);e.publicEncrypt=h.publicEncrypt,e.privateEncrypt=h.privateEncrypt,e.publicDecrypt=h.publicDecrypt,e.privateDecrypt=h.privateDecrypt;var u=r(206);e.randomFill=u.randomFill,e.randomFillSync=u.randomFillSync,e.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},e.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},function(t,e,r){"use strict";function i(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function n(t){return 3*t.length/4-i(t)}function a(t){var e,r,n,a,o,s=t.length;a=i(t),o=new u(3*s/4-a),r=a>0?s-4:s;var f=0;for(e=0;e<r;e+=4)n=h[t.charCodeAt(e)]<<18|h[t.charCodeAt(e+1)]<<12|h[t.charCodeAt(e+2)]<<6|h[t.charCodeAt(e+3)],o[f++]=n>>16&255,o[f++]=n>>8&255,o[f++]=255&n;return 2===a?(n=h[t.charCodeAt(e)]<<2|h[t.charCodeAt(e+1)]>>4,o[f++]=255&n):1===a&&(n=h[t.charCodeAt(e)]<<10|h[t.charCodeAt(e+1)]<<4|h[t.charCodeAt(e+2)]>>2,o[f++]=n>>8&255,o[f++]=255&n),o}function o(t){return c[t>>18&63]+c[t>>12&63]+c[t>>6&63]+c[63&t]}function s(t,e,r){for(var i,n=[],a=e;a<r;a+=3)i=(t[a]<<16)+(t[a+1]<<8)+t[a+2],n.push(o(i));return n.join("")}function f(t){for(var e,r=t.length,i=r%3,n="",a=[],o=0,f=r-i;o<f;o+=16383)a.push(s(t,o,o+16383>f?f:o+16383));return 1===i?(e=t[r-1],n+=c[e>>2],n+=c[e<<4&63],n+="=="):2===i&&(e=(t[r-2]<<8)+t[r-1],n+=c[e>>10],n+=c[e>>4&63],n+=c[e<<2&63],n+="="),a.push(n),a.join("")}e.byteLength=n,e.toByteArray=a,e.fromByteArray=f;for(var c=[],h=[],u="undefined"!=typeof Uint8Array?Uint8Array:Array,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,p=d.length;l<p;++l)c[l]=d[l],h[d.charCodeAt(l)]=l;h["-".charCodeAt(0)]=62,h["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,r,i,n){var a,o,s=8*n-i-1,f=(1<<s)-1,c=f>>1,h=-7,u=r?n-1:0,d=r?-1:1,l=t[e+u];for(u+=d,a=l&(1<<-h)-1,l>>=-h,h+=s;h>0;a=256*a+t[e+u],u+=d,h-=8);for(o=a&(1<<-h)-1,a>>=-h,h+=i;h>0;o=256*o+t[e+u],u+=d,h-=8);if(0===a)a=1-c;else{if(a===f)return o?NaN:1/0*(l?-1:1);o+=Math.pow(2,i),a-=c}return(l?-1:1)*o*Math.pow(2,a-i)},e.write=function(t,e,r,i,n,a){var o,s,f,c=8*a-n-1,h=(1<<c)-1,u=h>>1,d=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,l=i?0:a-1,p=i?1:-1,b=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=h):(o=Math.floor(Math.log(e)/Math.LN2),e*(f=Math.pow(2,-o))<1&&(o--,f*=2),e+=o+u>=1?d/f:d*Math.pow(2,1-u),e*f>=2&&(o++,f/=2),o+u>=h?(s=0,o=h):o+u>=1?(s=(e*f-1)*Math.pow(2,n),o+=u):(s=e*Math.pow(2,u-1)*Math.pow(2,n),o=0));n>=8;t[r+l]=255&s,l+=p,s/=256,n-=8);for(o=o<<n|s,c+=n;c>0;t[r+l]=255&o,l+=p,o/=256,c-=8);t[r+l-p]|=128*b}},function(t,e,r){"use strict";(function(e){function r(t){if(t.length%i!=0){var r=t.length+(i-t.length%i);t=e.concat([t,n],r)}for(var a=new Array(t.length>>>2),o=0,s=0;o<t.length;o+=i,s++)a[s]=t.readInt32LE(o);return a}var i=4,n=new e(i);n.fill(0);t.exports=function(t,i){var n=i(r(t),8*t.length);t=new e(16);for(var a=0;a<n.length;a++)t.writeInt32LE(n[a],a<<2,!0);return t}}).call(e,r(4).Buffer)},function(t,e,r){"use strict";(function(e){function i(t){n.call(this),this._block=new e(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}var n=r(30).Transform;r(0)(i,n),i.prototype._transform=function(t,r,i){var n=null;try{"buffer"!==r&&(t=new e(t,r)),this.update(t)}catch(t){n=t}i(n)},i.prototype._flush=function(t){var e=null;try{this.push(this._digest())}catch(t){e=t}t(e)},i.prototype.update=function(t,r){if(!e.isBuffer(t)&&"string"!=typeof t)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");e.isBuffer(t)||(t=new e(t,r||"binary"));for(var i=this._block,n=0;this._blockOffset+t.length-n>=this._blockSize;){for(var a=this._blockOffset;a<this._blockSize;)i[a++]=t[n++];this._update(),this._blockOffset=0}for(;n<t.length;)i[this._blockOffset++]=t[n++];for(var o=0,s=8*t.length;s>0;++o)this._length[o]+=s,(s=this._length[o]/4294967296|0)>0&&(this._length[o]-=4294967296*s);return this},i.prototype._update=function(t){throw new Error("_update is not implemented")},i.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();return void 0!==t&&(e=e.toString(t)),e},i.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=i}).call(e,r(4).Buffer)},function(t,e){},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e,r){t.copy(e,r)}var a=r(3).Buffer;t.exports=function(){function t(){i(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return a.alloc(0);if(1===this.length)return this.head.data;for(var e=a.allocUnsafe(t>>>0),r=this.head,i=0;r;)n(r.data,e,i),i+=r.data.length,r=r.next;return e},t}()},function(t,e,r){function i(t,e){this._id=t,this._clearFn=e}var n=Function.prototype.apply;e.setTimeout=function(){return new i(n.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new i(n.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(window,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},r(125),e.setImmediate=setImmediate,e.clearImmediate=clearImmediate},function(t,e,r){(function(t,e){!function(t,r){"use strict";function i(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),r=0;r<e.length;r++)e[r]=arguments[r+1];var i={callback:t,args:e};return c[f]=i,s(f),f++}function n(t){delete c[t]}function a(t){var e=t.callback,i=t.args;switch(i.length){case 0:e();break;case 1:e(i[0]);break;case 2:e(i[0],i[1]);break;case 3:e(i[0],i[1],i[2]);break;default:e.apply(r,i)}}function o(t){if(h)setTimeout(o,0,t);else{var e=c[t];if(e){h=!0;try{a(e)}finally{n(t),h=!1}}}}if(!t.setImmediate){var s,f=1,c={},h=!1,u=t.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(t);d=d&&d.setTimeout?d:t,"[object process]"==={}.toString.call(t.process)?function(){s=function(t){e.nextTick(function(){o(t)})}}():function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}}()?function(){var e="setImmediate$"+Math.random()+"$",r=function(r){r.source===t&&"string"==typeof r.data&&0===r.data.indexOf(e)&&o(+r.data.slice(e.length))};t.addEventListener?t.addEventListener("message",r,!1):t.attachEvent("onmessage",r),s=function(r){t.postMessage(e+r,"*")}}():t.MessageChannel?function(){var t=new MessageChannel;t.port1.onmessage=function(t){o(t.data)},s=function(e){t.port2.postMessage(e)}}():u&&"onreadystatechange"in u.createElement("script")?function(){var t=u.documentElement;s=function(e){var r=u.createElement("script");r.onreadystatechange=function(){o(e),r.onreadystatechange=null,t.removeChild(r),r=null},t.appendChild(r)}}():function(){s=function(t){setTimeout(o,0,t)}}(),d.setImmediate=i,d.clearImmediate=n}}("undefined"==typeof self?void 0===t?this:t:self)}).call(e,r(13),r(14))},function(t,e,r){(function(e){function r(t,e){function r(){if(!n){if(i("throwDeprecation"))throw new Error(e);i("traceDeprecation")?console.trace(e):console.warn(e),n=!0}return t.apply(this,arguments)}if(i("noDeprecation"))return t;var n=!1;return r}function i(t){try{if(!e.localStorage)return!1}catch(t){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=r}).call(e,r(13))},function(t,e,r){"use strict";function i(t){if(!(this instanceof i))return new i(t);n.call(this,t)}t.exports=i;var n=r(67),a=r(24);a.inherits=r(0),a.inherits(i,n),i.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){t.exports=r(45)},function(t,e,r){t.exports=r(16)},function(t,e,r){t.exports=r(44).Transform},function(t,e,r){t.exports=r(44).PassThrough},function(t,e,r){function i(){this.init(),this._w=u,f.call(this,64,56)}function n(t){return t<<5|t>>>27}function a(t){return t<<30|t>>>2}function o(t,e,r,i){return 0===t?e&r|~e&i:2===t?e&r|e&i|r&i:e^r^i}var s=r(0),f=r(21),c=r(3).Buffer,h=[1518500249,1859775393,-1894007588,-899497514],u=new Array(80);s(i,f),i.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},i.prototype._update=function(t){for(var e=this._w,r=0|this._a,i=0|this._b,s=0|this._c,f=0|this._d,c=0|this._e,u=0;u<16;++u)e[u]=t.readInt32BE(4*u);for(;u<80;++u)e[u]=e[u-3]^e[u-8]^e[u-14]^e[u-16];for(var d=0;d<80;++d){var l=~~(d/20),p=n(r)+o(l,i,s,f)+c+e[d]+h[l]|0;c=f,f=s,s=a(i),i=r,r=p}this._a=r+this._a|0,this._b=i+this._b|0,this._c=s+this._c|0,this._d=f+this._d|0,this._e=c+this._e|0},i.prototype._hash=function(){var t=c.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=i},function(t,e,r){function i(){this.init(),this._w=d,c.call(this,64,56)}function n(t){return t<<1|t>>>31}function a(t){return t<<5|t>>>27}function o(t){return t<<30|t>>>2}function s(t,e,r,i){return 0===t?e&r|~e&i:2===t?e&r|e&i|r&i:e^r^i}var f=r(0),c=r(21),h=r(3).Buffer,u=[1518500249,1859775393,-1894007588,-899497514],d=new Array(80);f(i,c),i.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},i.prototype._update=function(t){for(var e=this._w,r=0|this._a,i=0|this._b,f=0|this._c,c=0|this._d,h=0|this._e,d=0;d<16;++d)e[d]=t.readInt32BE(4*d);for(;d<80;++d)e[d]=n(e[d-3]^e[d-8]^e[d-14]^e[d-16]);for(var l=0;l<80;++l){var p=~~(l/20),b=a(r)+s(p,i,f,c)+h+e[l]+u[p]|0;h=c,c=f,f=o(i),i=r,r=b}this._a=r+this._a|0,this._b=i+this._b|0,this._c=f+this._c|0,this._d=c+this._d|0,this._e=h+this._e|0},i.prototype._hash=function(){var t=h.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=i},function(t,e,r){function i(){this.init(),this._w=f,o.call(this,64,56)}var n=r(0),a=r(68),o=r(21),s=r(3).Buffer,f=new Array(64);n(i,a),i.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},i.prototype._hash=function(){var t=s.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=i},function(t,e,r){function i(){this.init(),this._w=f,o.call(this,128,112)}var n=r(0),a=r(69),o=r(21),s=r(3).Buffer,f=new Array(160);n(i,a),i.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},i.prototype._hash=function(){function t(t,r,i){e.writeInt32BE(t,i),e.writeInt32BE(r,i+4)}var e=s.allocUnsafe(48);return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},t.exports=i},function(t,e,r){"use strict";function i(t,e){o.call(this,"digest"),"string"==typeof e&&(e=a.from(e)),this._alg=t,this._key=e,e.length>f?e=t(e):e.length<f&&(e=a.concat([e,s],f));for(var r=this._ipad=a.allocUnsafe(f),i=this._opad=a.allocUnsafe(f),n=0;n<f;n++)r[n]=54^e[n],i[n]=92^e[n];this._hash=[r]}var n=r(0),a=r(3).Buffer,o=r(15),s=a.alloc(128),f=64;n(i,o),i.prototype._update=function(t){this._hash.push(t)},i.prototype._final=function(){var t=this._alg(a.concat(this._hash));return this._alg(a.concat([this._opad,t]))},t.exports=i},function(t,e,r){t.exports=r(71)},function(t,e,r){(function(e,i){function n(t){if(e.process&&!e.process.browser)return Promise.resolve(!1);if(!d||!d.importKey||!d.deriveBits)return Promise.resolve(!1);if(void 0!==p[t])return p[t];s=s||u.alloc(8);var r=a(s,s,10,128,t).then(function(){return!0}).catch(function(){return!1});return p[t]=r,r}function a(t,e,r,i,n){return d.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then(function(t){return d.deriveBits({name:"PBKDF2",salt:e,iterations:r,hash:{name:n}},t,i<<3)}).then(function(t){return u.from(t)})}function o(t,e){t.then(function(t){i.nextTick(function(){e(null,t)})},function(t){i.nextTick(function(){e(t)})})}var s,f=r(73),c=r(74),h=r(75),u=r(3).Buffer,d=e.crypto&&e.crypto.subtle,l={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},p=[];t.exports=function(t,r,s,d,p,b){if(u.isBuffer(t)||(t=u.from(t,c)),u.isBuffer(r)||(r=u.from(r,c)),f(s,d),"function"==typeof p&&(b=p,p=void 0),"function"!=typeof b)throw new Error("No callback provided to pbkdf2");p=p||"sha1";var g=l[p.toLowerCase()];if(!g||"function"!=typeof e.Promise)return i.nextTick(function(){var e;try{e=h(t,r,s,d,p)}catch(t){return b(t)}b(null,e)});o(n(g).then(function(e){return e?a(t,r,s,d,g):h(t,r,s,d,p)}),b)}}).call(e,r(13),r(14))},function(t,e,r){function i(t,e){var r,i;if(t=t.toLowerCase(),d[t])r=d[t].key,i=d[t].iv;else{if(!u[t])throw new TypeError("invalid suite type");r=8*u[t].key,i=u[t].iv}var n=f(e,!1,r,i);return a(t,n.key,n.iv)}function n(t,e){var r,i;if(t=t.toLowerCase(),d[t])r=d[t].key,i=d[t].iv;else{if(!u[t])throw new TypeError("invalid suite type");r=8*u[t].key,i=u[t].iv}var n=f(e,!1,r,i);return o(t,n.key,n.iv)}function a(t,e,r){if(t=t.toLowerCase(),d[t])return c.createCipheriv(t,e,r);if(u[t])return new h({key:e,iv:r,mode:t});throw new TypeError("invalid suite type")}function o(t,e,r){if(t=t.toLowerCase(),d[t])return c.createDecipheriv(t,e,r);if(u[t])return new h({key:e,iv:r,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}function s(){return Object.keys(u).concat(c.getCiphers())}var f=r(32),c=r(48),h=r(151),u=r(157),d=r(49);e.createCipher=e.Cipher=i,e.createCipheriv=e.Cipheriv=a,e.createDecipher=e.Decipher=n,e.createDecipheriv=e.Decipheriv=o,e.listCiphers=e.getCiphers=s},function(t,e,r){"use strict";(function(e){function i(){h.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function n(t,e){return t<<e|t>>>32-e}function a(t,e,r,i,a,o,s){return n(t+(e&r|~e&i)+a+o|0,s)+e|0}function o(t,e,r,i,a,o,s){return n(t+(e&i|r&~i)+a+o|0,s)+e|0}function s(t,e,r,i,a,o,s){return n(t+(e^r^i)+a+o|0,s)+e|0}function f(t,e,r,i,a,o,s){return n(t+(r^(e|~i))+a+o|0,s)+e|0}var c=r(0),h=r(141),u=new Array(16);c(i,h),i.prototype._update=function(){for(var t=u,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,i=this._b,n=this._c,c=this._d;r=a(r,i,n,c,t[0],3614090360,7),c=a(c,r,i,n,t[1],3905402710,12),n=a(n,c,r,i,t[2],606105819,17),i=a(i,n,c,r,t[3],3250441966,22),r=a(r,i,n,c,t[4],4118548399,7),c=a(c,r,i,n,t[5],1200080426,12),n=a(n,c,r,i,t[6],2821735955,17),i=a(i,n,c,r,t[7],4249261313,22),r=a(r,i,n,c,t[8],1770035416,7),c=a(c,r,i,n,t[9],2336552879,12),n=a(n,c,r,i,t[10],4294925233,17),i=a(i,n,c,r,t[11],2304563134,22),r=a(r,i,n,c,t[12],1804603682,7),c=a(c,r,i,n,t[13],4254626195,12),n=a(n,c,r,i,t[14],2792965006,17),i=a(i,n,c,r,t[15],1236535329,22),r=o(r,i,n,c,t[1],4129170786,5),c=o(c,r,i,n,t[6],3225465664,9),n=o(n,c,r,i,t[11],643717713,14),i=o(i,n,c,r,t[0],3921069994,20),r=o(r,i,n,c,t[5],3593408605,5),c=o(c,r,i,n,t[10],38016083,9),n=o(n,c,r,i,t[15],3634488961,14),i=o(i,n,c,r,t[4],3889429448,20),r=o(r,i,n,c,t[9],568446438,5),c=o(c,r,i,n,t[14],3275163606,9),n=o(n,c,r,i,t[3],4107603335,14),i=o(i,n,c,r,t[8],1163531501,20),r=o(r,i,n,c,t[13],2850285829,5),c=o(c,r,i,n,t[2],4243563512,9),n=o(n,c,r,i,t[7],1735328473,14),i=o(i,n,c,r,t[12],2368359562,20),r=s(r,i,n,c,t[5],4294588738,4),c=s(c,r,i,n,t[8],2272392833,11),n=s(n,c,r,i,t[11],1839030562,16),i=s(i,n,c,r,t[14],4259657740,23),r=s(r,i,n,c,t[1],2763975236,4),c=s(c,r,i,n,t[4],1272893353,11),n=s(n,c,r,i,t[7],4139469664,16),i=s(i,n,c,r,t[10],3200236656,23),r=s(r,i,n,c,t[13],681279174,4),c=s(c,r,i,n,t[0],3936430074,11),n=s(n,c,r,i,t[3],3572445317,16),i=s(i,n,c,r,t[6],76029189,23),r=s(r,i,n,c,t[9],3654602809,4),c=s(c,r,i,n,t[12],3873151461,11),n=s(n,c,r,i,t[15],530742520,16),i=s(i,n,c,r,t[2],3299628645,23),r=f(r,i,n,c,t[0],4096336452,6),c=f(c,r,i,n,t[7],1126891415,10),n=f(n,c,r,i,t[14],2878612391,15),i=f(i,n,c,r,t[5],4237533241,21),r=f(r,i,n,c,t[12],1700485571,6),c=f(c,r,i,n,t[3],2399980690,10),n=f(n,c,r,i,t[10],4293915773,15),i=f(i,n,c,r,t[1],2240044497,21),r=f(r,i,n,c,t[8],1873313359,6),c=f(c,r,i,n,t[15],4264355552,10),n=f(n,c,r,i,t[6],2734768916,15),i=f(i,n,c,r,t[13],1309151649,21),r=f(r,i,n,c,t[4],4149444226,6),c=f(c,r,i,n,t[11],3174756917,10),n=f(n,c,r,i,t[2],718787259,15),i=f(i,n,c,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+i|0,this._c=this._c+n|0,this._d=this._d+c|0},i.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=new e(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=i}).call(e,r(4).Buffer)},function(t,e,r){"use strict";function i(t,e){if(!a.isBuffer(t)&&"string"!=typeof t)throw new TypeError(e+" must be a string or a buffer")}function n(t){o.call(this),this._block=a.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}var a=r(3).Buffer,o=r(30).Transform;r(0)(n,o),n.prototype._transform=function(t,e,r){var i=null;try{this.update(t,e)}catch(t){i=t}r(i)},n.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)},n.prototype.update=function(t,e){if(i(t,"Data"),this._finalized)throw new Error("Digest already called");a.isBuffer(t)||(t=a.from(t,e));for(var r=this._block,n=0;this._blockOffset+t.length-n>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)r[o++]=t[n++];this._update(),this._blockOffset=0}for(;n<t.length;)r[this._blockOffset++]=t[n++];for(var s=0,f=8*t.length;f>0;++s)this._length[s]+=f,(f=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*f);return this},n.prototype._update=function(){throw new Error("_update is not implemented")},n.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e},n.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=n},function(t,e,r){function i(t,e,r){u.call(this),this._cache=new n,this._cipher=new d.AES(e),this._prev=c.from(r),this._mode=t,this._autopadding=!0}function n(){this.cache=c.allocUnsafe(0)}function a(t,e,r){var n=s[t.toLowerCase()];if(!n)throw new TypeError("invalid suite type");if("string"==typeof e&&(e=c.from(e)),e.length!==n.key/8)throw new TypeError("invalid key length "+e.length);if("string"==typeof r&&(r=c.from(r)),"GCM"!==n.mode&&r.length!==n.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===n.type?new h(n.module,e,r):"auth"===n.type?new f(n.module,e,r):new i(n.module,e,r)}function o(t,e){var r=s[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=l(e,!1,r.key,r.iv);return a(t,i.key,i.iv)}var s=r(49),f=r(79),c=r(3).Buffer,h=r(80),u=r(15),d=r(33),l=r(32);r(0)(i,u),i.prototype._update=function(t){this._cache.add(t);for(var e,r,i=[];e=this._cache.get();)r=this._mode.encrypt(this,e),i.push(r);return c.concat(i)};var p=c.alloc(16,16);i.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(p))throw this._cipher.scrub(),new Error("data not multiple of block length")},i.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},n.prototype.add=function(t){this.cache=c.concat([this.cache,t])},n.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},n.prototype.flush=function(){for(var t=16-this.cache.length,e=c.allocUnsafe(t),r=-1;++r<t;)e.writeUInt8(t,r);return c.concat([this.cache,e])},e.createCipheriv=a,e.createCipher=o},function(t,e){e.encrypt=function(t,e){return t._cipher.encryptBlock(e)},e.decrypt=function(t,e){return t._cipher.decryptBlock(e)}},function(t,e,r){var i=r(25);e.encrypt=function(t,e){var r=i(e,t._prev);return t._prev=t._cipher.encryptBlock(r),t._prev},e.decrypt=function(t,e){var r=t._prev;t._prev=e;var n=t._cipher.decryptBlock(e);return i(n,r)}},function(t,e,r){function i(t,e,r){var i=e.length,o=a(e,t._cache);return t._cache=t._cache.slice(i),t._prev=n.concat([t._prev,r?e:o]),o}var n=r(3).Buffer,a=r(25);e.encrypt=function(t,e,r){for(var a,o=n.allocUnsafe(0);e.length;){if(0===t._cache.length&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=n.allocUnsafe(0)),!(t._cache.length<=e.length)){o=n.concat([o,i(t,e,r)]);break}a=t._cache.length,o=n.concat([o,i(t,e.slice(0,a),r)]),e=e.slice(a)}return o}},function(t,e,r){function i(t,e,r){var i=t._cipher.encryptBlock(t._prev),a=i[0]^e;return t._prev=n.concat([t._prev.slice(1),n.from([r?e:a])]),a}var n=r(3).Buffer;e.encrypt=function(t,e,r){for(var a=e.length,o=n.allocUnsafe(a),s=-1;++s<a;)o[s]=i(t,e[s],r);return o}},function(t,e,r){function i(t,e,r){for(var i,a,o,s=-1,f=0;++s<8;)i=t._cipher.encryptBlock(t._prev),a=e&1<<7-s?128:0,o=i[0]^a,f+=(128&o)>>s%8,t._prev=n(t._prev,r?a:o);return f}function n(t,e){var r=t.length,i=-1,n=a.allocUnsafe(t.length);for(t=a.concat([t,a.from([e])]);++i<r;)n[i]=t[i]<<1|t[i+1]>>7;return n}var a=r(3).Buffer;e.encrypt=function(t,e,r){for(var n=e.length,o=a.allocUnsafe(n),s=-1;++s<n;)o[s]=i(t,e[s],r);return o}},function(t,e,r){(function(t){function i(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}var n=r(25);e.encrypt=function(e,r){for(;e._cache.length<r.length;)e._cache=t.concat([e._cache,i(e)]);var a=e._cache.slice(0,r.length);return e._cache=e._cache.slice(r.length),n(r,a)}}).call(e,r(4).Buffer)},function(t,e,r){function i(t){return[t.readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)]}function n(t){var e=o.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function a(t){this.h=t,this.state=o.alloc(16,0),this.cache=o.allocUnsafe(0)}var o=r(3).Buffer,s=o.alloc(16,0);a.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply()},a.prototype._multiply=function(){for(var t,e,r,a=i(this.h),o=[0,0,0,0],s=-1;++s<128;){for(e=0!=(this.state[~~(s/8)]&1<<7-s%8),e&&(o[0]^=a[0],o[1]^=a[1],o[2]^=a[2],o[3]^=a[3]),r=0!=(1&a[3]),t=3;t>0;t--)a[t]=a[t]>>>1|(1&a[t-1])<<31;a[0]=a[0]>>>1,r&&(a[0]=a[0]^225<<24)}this.state=n(o)},a.prototype.update=function(t){this.cache=o.concat([this.cache,t]);for(var e;this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},a.prototype.final=function(t,e){return this.cache.length&&this.ghash(o.concat([this.cache,s],16)),this.ghash(n([0,t,0,e])),this.state},t.exports=a},function(t,e,r){function i(t,e,r){d.call(this),this._cache=new n,this._last=void 0,this._cipher=new l.AES(e),this._prev=c.from(r),this._mode=t,this._autopadding=!0}function n(){this.cache=c.allocUnsafe(0)}function a(t){for(var e=t[15],r=-1;++r<e;)if(t[r+(16-e)]!==e)throw new Error("unable to decrypt data");if(16!==e)return t.slice(0,16-e)}function o(t,e,r){var n=h[t.toLowerCase()];if(!n)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=c.from(r)),"GCM"!==n.mode&&r.length!==n.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof e&&(e=c.from(e)),e.length!==n.key/8)throw new TypeError("invalid key length "+e.length);return"stream"===n.type?new u(n.module,e,r,!0):"auth"===n.type?new f(n.module,e,r,!0):new i(n.module,e,r)}function s(t,e){var r=h[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=p(e,!1,r.key,r.iv);return o(t,i.key,i.iv)}var f=r(79),c=r(3).Buffer,h=r(49),u=r(80),d=r(15),l=r(33),p=r(32);r(0)(i,d),i.prototype._update=function(t){this._cache.add(t);for(var e,r,i=[];e=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,e),i.push(r);return c.concat(i)},i.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return a(this._mode.decrypt(this,t));if(t)throw new Error("data not multiple of block length")},i.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},n.prototype.add=function(t){this.cache=c.concat([this.cache,t])},n.prototype.get=function(t){var e;if(t){if(this.cache.length>16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},n.prototype.flush=function(){if(this.cache.length)return this.cache},e.createDecipher=s,e.createDecipheriv=o},function(t,e,r){(function(e){function i(t){n.call(this);var r,i=t.mode.toLowerCase(),a=s[i];r=t.decrypt?"decrypt":"encrypt";var o=t.key;"des-ede"!==i&&"des-ede-cbc"!==i||(o=e.concat([o,o.slice(0,8)]));var f=t.iv;this._des=a.create({key:o,iv:f,type:r})}var n=r(15),a=r(50),o=r(0),s={"des-ede3-cbc":a.CBC.instantiate(a.EDE),"des-ede3":a.EDE,"des-ede-cbc":a.CBC.instantiate(a.EDE),"des-ede":a.EDE,"des-cbc":a.CBC.instantiate(a.DES),"des-ecb":a.DES};s.des=s["des-cbc"],s.des3=s["des-ede3-cbc"],t.exports=i,o(i,n),i.prototype._update=function(t){return new e(this._des.update(t))},i.prototype._final=function(){return new e(this._des.final())}}).call(e,r(4).Buffer)},function(t,e,r){"use strict";e.readUInt32BE=function(t,e){return(t[0+e]<<24|t[1+e]<<16|t[2+e]<<8|t[3+e])>>>0},e.writeUInt32BE=function(t,e,r){t[0+r]=e>>>24,t[1+r]=e>>>16&255,t[2+r]=e>>>8&255,t[3+r]=255&e},e.ip=function(t,e,r,i){for(var n=0,a=0,o=6;o>=0;o-=2){for(var s=0;s<=24;s+=8)n<<=1,n|=e>>>s+o&1;for(var s=0;s<=24;s+=8)n<<=1,n|=t>>>s+o&1}for(var o=6;o>=0;o-=2){for(var s=1;s<=25;s+=8)a<<=1,a|=e>>>s+o&1;for(var s=1;s<=25;s+=8)a<<=1,a|=t>>>s+o&1}r[i+0]=n>>>0,r[i+1]=a>>>0},e.rip=function(t,e,r,i){for(var n=0,a=0,o=0;o<4;o++)for(var s=24;s>=0;s-=8)n<<=1,n|=e>>>s+o&1,n<<=1,n|=t>>>s+o&1;for(var o=4;o<8;o++)for(var s=24;s>=0;s-=8)a<<=1,a|=e>>>s+o&1,a<<=1,a|=t>>>s+o&1;r[i+0]=n>>>0,r[i+1]=a>>>0},e.pc1=function(t,e,r,i){for(var n=0,a=0,o=7;o>=5;o--){for(var s=0;s<=24;s+=8)n<<=1,n|=e>>s+o&1;for(var s=0;s<=24;s+=8)n<<=1,n|=t>>s+o&1}for(var s=0;s<=24;s+=8)n<<=1,n|=e>>s+o&1;for(var o=1;o<=3;o++){for(var s=0;s<=24;s+=8)a<<=1,a|=e>>s+o&1;for(var s=0;s<=24;s+=8)a<<=1,a|=t>>s+o&1}for(var s=0;s<=24;s+=8)a<<=1,a|=t>>s+o&1;r[i+0]=n>>>0,r[i+1]=a>>>0},e.r28shl=function(t,e){return t<<e&268435455|t>>>28-e};var i=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];e.pc2=function(t,e,r,n){for(var a=0,o=0,s=i.length>>>1,f=0;f<s;f++)a<<=1,a|=t>>>i[f]&1;for(var f=s;f<i.length;f++)o<<=1,o|=e>>>i[f]&1;r[n+0]=a>>>0,r[n+1]=o>>>0},e.expand=function(t,e,r){var i=0,n=0;i=(1&t)<<5|t>>>27;for(var a=23;a>=15;a-=4)i<<=6,i|=t>>>a&63;for(var a=11;a>=3;a-=4)n|=t>>>a&63,n<<=6;n|=(31&t)<<1|t>>>31,e[r+0]=i>>>0,e[r+1]=n>>>0};var n=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];e.substitute=function(t,e){for(var r=0,i=0;i<4;i++){var a=t>>>18-6*i&63,o=n[64*i+a];r<<=4,r|=o}for(var i=0;i<4;i++){var a=e>>>18-6*i&63,o=n[256+64*i+a];r<<=4,r|=o}return r>>>0};var a=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];e.permute=function(t){for(var e=0,r=0;r<a.length;r++)e<<=1,e|=t>>>a[r]&1;return e>>>0},e.padSplit=function(t,e,r){for(var i=t.toString(2);i.length<e;)i="0"+i;for(var n=[],a=0;a<e;a+=r)n.push(i.slice(a,a+r));return n.join(" ")}},function(t,e,r){"use strict";function i(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}var n=r(11);t.exports=i,i.prototype._init=function(){},i.prototype.update=function(t){return 0===t.length?[]:"decrypt"===this.type?this._updateDecrypt(t):this._updateEncrypt(t)},i.prototype._buffer=function(t,e){for(var r=Math.min(this.buffer.length-this.bufferOff,t.length-e),i=0;i<r;i++)this.buffer[this.bufferOff+i]=t[e+i];return this.bufferOff+=r,r},i.prototype._flushBuffer=function(t,e){return this._update(this.buffer,0,t,e),this.bufferOff=0,this.blockSize},i.prototype._updateEncrypt=function(t){var e=0,r=0,i=(this.bufferOff+t.length)/this.blockSize|0,n=new Array(i*this.blockSize);0!==this.bufferOff&&(e+=this._buffer(t,e),this.bufferOff===this.buffer.length&&(r+=this._flushBuffer(n,r)));for(var a=t.length-(t.length-e)%this.blockSize;e<a;e+=this.blockSize)this._update(t,e,n,r),r+=this.blockSize;for(;e<t.length;e++,this.bufferOff++)this.buffer[this.bufferOff]=t[e];return n},i.prototype._updateDecrypt=function(t){for(var e=0,r=0,i=Math.ceil((this.bufferOff+t.length)/this.blockSize)-1,n=new Array(i*this.blockSize);i>0;i--)e+=this._buffer(t,e),r+=this._flushBuffer(n,r);return e+=this._buffer(t,e),n},i.prototype.final=function(t){var e;t&&(e=this.update(t));var r;return r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(r):r},i.prototype._pad=function(t,e){if(0===e)return!1;for(;e<t.length;)t[e++]=0;return!0},i.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var t=new Array(this.blockSize);return this._update(this.buffer,0,t,0),t},i.prototype._unpad=function(t){return t},i.prototype._finalDecrypt=function(){n.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var t=new Array(this.blockSize);return this._flushBuffer(t,0),this._unpad(t)}},function(t,e,r){"use strict";function i(){this.tmp=new Array(2),this.keys=null}function n(t){c.call(this,t);var e=new i;this._desState=e,this.deriveKeys(e,t.key)}var a=r(11),o=r(0),s=r(50),f=s.utils,c=s.Cipher;o(n,c),t.exports=n,n.create=function(t){return new n(t)};var h=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];n.prototype.deriveKeys=function(t,e){t.keys=new Array(32),a.equal(e.length,this.blockSize,"Invalid key length");var r=f.readUInt32BE(e,0),i=f.readUInt32BE(e,4);f.pc1(r,i,t.tmp,0),r=t.tmp[0],i=t.tmp[1];for(var n=0;n<t.keys.length;n+=2){var o=h[n>>>1];r=f.r28shl(r,o),i=f.r28shl(i,o),f.pc2(r,i,t.keys,n)}},n.prototype._update=function(t,e,r,i){var n=this._desState,a=f.readUInt32BE(t,e),o=f.readUInt32BE(t,e+4);f.ip(a,o,n.tmp,0),a=n.tmp[0],o=n.tmp[1],"encrypt"===this.type?this._encrypt(n,a,o,n.tmp,0):this._decrypt(n,a,o,n.tmp,0),a=n.tmp[0],o=n.tmp[1],f.writeUInt32BE(r,a,i),f.writeUInt32BE(r,o,i+4)},n.prototype._pad=function(t,e){for(var r=t.length-e,i=e;i<t.length;i++)t[i]=r;return!0},n.prototype._unpad=function(t){for(var e=t[t.length-1],r=t.length-e;r<t.length;r++)a.equal(t[r],e);return t.slice(0,t.length-e)},n.prototype._encrypt=function(t,e,r,i,n){for(var a=e,o=r,s=0;s<t.keys.length;s+=2){var c=t.keys[s],h=t.keys[s+1];f.expand(o,t.tmp,0),c^=t.tmp[0],h^=t.tmp[1];var u=f.substitute(c,h),d=f.permute(u),l=o;o=(a^d)>>>0,a=l}f.rip(o,a,i,n)},n.prototype._decrypt=function(t,e,r,i,n){for(var a=r,o=e,s=t.keys.length-2;s>=0;s-=2){var c=t.keys[s],h=t.keys[s+1];f.expand(a,t.tmp,0),c^=t.tmp[0],h^=t.tmp[1];var u=f.substitute(c,h),d=f.permute(u),l=a;a=(o^d)>>>0,o=l}f.rip(a,o,i,n)}},function(t,e,r){"use strict";function i(t){a.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e<this.iv.length;e++)this.iv[e]=t[e]}function n(t){function e(e){t.call(this,e),this._cbcInit()}o(e,t);for(var r=Object.keys(s),i=0;i<r.length;i++){var n=r[i];e.prototype[n]=s[n]}return e.create=function(t){return new e(t)},e}var a=r(11),o=r(0),s={};e.instantiate=n,s._cbcInit=function(){var t=new i(this.options.iv);this._cbcState=t},s._update=function(t,e,r,i){var n=this._cbcState,a=this.constructor.super_.prototype,o=n.iv;if("encrypt"===this.type){for(var s=0;s<this.blockSize;s++)o[s]^=t[e+s];a._update.call(this,o,0,r,i);for(var s=0;s<this.blockSize;s++)o[s]=r[i+s]}else{a._update.call(this,t,e,r,i);for(var s=0;s<this.blockSize;s++)r[i+s]^=o[s];for(var s=0;s<this.blockSize;s++)o[s]=t[e+s]}}},function(t,e,r){"use strict";function i(t,e){a.equal(e.length,24,"Invalid key length");var r=e.slice(0,8),i=e.slice(8,16),n=e.slice(16,24);this.ciphers="encrypt"===t?[c.create({type:"encrypt",key:r}),c.create({type:"decrypt",key:i}),c.create({type:"encrypt",key:n})]:[c.create({type:"decrypt",key:n}),c.create({type:"encrypt",key:i}),c.create({type:"decrypt",key:r})]}function n(t){f.call(this,t);var e=new i(this.type,this.options.key);this._edeState=e}var a=r(11),o=r(0),s=r(50),f=s.Cipher,c=s.DES;o(n,f),t.exports=n,n.create=function(t){return new n(t)},n.prototype._update=function(t,e,r,i){var n=this._edeState;n.ciphers[0]._update(t,e,r,i),n.ciphers[1]._update(r,i,r,i),n.ciphers[2]._update(r,i,r,i)},n.prototype._pad=c.prototype._pad,n.prototype._unpad=c.prototype._unpad},function(t,e){e["des-ecb"]={key:8,iv:0},e["des-cbc"]=e.des={key:8,iv:8},e["des-ede3-cbc"]=e.des3={key:24,iv:8},e["des-ede3"]={key:24,iv:0},e["des-ede-cbc"]={key:16,iv:8},e["des-ede"]={key:16,iv:0}},function(t,e,r){(function(t){function i(e){var r=new t(o[e].prime,"hex"),i=new t(o[e].gen,"hex");return new s(r,i)}function n(e,r,i,o){return t.isBuffer(r)||void 0===f[r]?n(e,"binary",r,i):(r=r||"binary",o=o||"binary",i=i||new t([2]),t.isBuffer(i)||(i=new t(i,o)),"number"==typeof e?new s(a(e,i),i,!0):(t.isBuffer(e)||(e=new t(e,r)),new s(e,i,!0)))}var a=r(81),o=r(162),s=r(163),f={binary:!0,hex:!0,base64:!0};e.DiffieHellmanGroup=e.createDiffieHellmanGroup=e.getDiffieHellman=i,e.createDiffieHellman=e.DiffieHellman=n}).call(e,r(4).Buffer)},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){},function(t,e){},function(t,e){t.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},function(t,e,r){(function(e){function i(t,r){return r=r||"utf8",e.isBuffer(t)||(t=new e(t,r)),this._pub=new f(t),this}function n(t,r){return r=r||"utf8",e.isBuffer(t)||(t=new e(t,r)),this._priv=new f(t),this}function a(t,e){var r=e.toString("hex"),i=[r,t.toString(16)].join("_");if(i in y)return y[i];var n=0;if(t.isEven()||!g.simpleSieve||!g.fermatTest(t)||!h.test(t))return n+=1,n+="02"===r||"05"===r?8:4,y[i]=n,n;h.test(t.shrn(1))||(n+=2);var a;switch(r){case"02":t.mod(u).cmp(d)&&(n+=8);break;case"05":a=t.mod(l),a.cmp(p)&&a.cmp(b)&&(n+=8);break;default:n+=4}return y[i]=n,n}function o(t,e,r){this.setGenerator(e),this.__prime=new f(t),this._prime=f.mont(this.__prime),this._primeLen=t.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=i,this.setPrivateKey=n):this._primeCode=8}function s(t,r){var i=new e(t.toArray());return r?i.toString(r):i}var f=r(6),c=r(82),h=new c,u=new f(24),d=new f(11),l=new f(10),p=new f(3),b=new f(7),g=r(81),v=r(19);t.exports=o;var y={};Object.defineProperty(o.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=a(this.__prime,this.__gen)),this._primeCode}}),o.prototype.generateKeys=function(){return this._priv||(this._priv=new f(v(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},o.prototype.computeSecret=function(t){t=new f(t),t=t.toRed(this._prime);var r=t.redPow(this._priv).fromRed(),i=new e(r.toArray()),n=this.getPrime();if(i.length<n.length){var a=new e(n.length-i.length);a.fill(0),i=e.concat([a,i])}return i},o.prototype.getPublicKey=function(t){return s(this._pub,t)},o.prototype.getPrivateKey=function(t){return s(this._priv,t)},o.prototype.getPrime=function(t){return s(this.__prime,t)},o.prototype.getGenerator=function(t){return s(this._gen,t)},o.prototype.setGenerator=function(t,r){return r=r||"utf8",e.isBuffer(t)||(t=new e(t,r)),this.__gen=t,this._gen=new f(t),this}}).call(e,r(4).Buffer)},function(t,e,r){(function(e){function i(t){f.Writable.call(this);var e=d[t];if(!e)throw new Error("Unknown message digest");this._hashType=e.hash,this._hash=s(e.hash),this._tag=e.id,this._signType=e.sign}function n(t){f.Writable.call(this);var e=d[t];if(!e)throw new Error("Unknown message digest");this._hash=s(e.hash),this._tag=e.id,this._signType=e.sign}function a(t){return new i(t)}function o(t){return new n(t)}var s=r(23),f=r(30),c=r(0),h=r(165),u=r(201),d=r(71);Object.keys(d).forEach(function(t){d[t].id=new e(d[t].id,"hex"),d[t.toLowerCase()]=d[t]}),c(i,f.Writable),i.prototype._write=function(t,e,r){this._hash.update(t),r()},i.prototype.update=function(t,r){return"string"==typeof t&&(t=new e(t,r)),this._hash.update(t),this},i.prototype.sign=function(t,e){this.end();var r=this._hash.digest(),i=h(r,t,this._hashType,this._signType,this._tag);return e?i.toString(e):i},c(n,f.Writable),n.prototype._write=function(t,e,r){this._hash.update(t),r()},n.prototype.update=function(t,r){return"string"==typeof t&&(t=new e(t,r)),this._hash.update(t),this},n.prototype.verify=function(t,r,i){"string"==typeof r&&(r=new e(r,i)),this.end();var n=this._hash.digest();return u(r,n,t,this._signType,this._tag)},t.exports={Sign:a,Verify:o,createSign:a,createVerify:o}}).call(e,r(4).Buffer)},function(t,e,r){(function(e){function i(t,r,i,o,s){var f=g(r);if(f.curve){if("ecdsa"!==o&&"ecdsa/rsa"!==o)throw new Error("wrong private key type");return n(t,f)}if("dsa"===f.type){if("dsa"!==o)throw new Error("wrong private key type");return a(t,f,i)}if("rsa"!==o&&"ecdsa/rsa"!==o)throw new Error("wrong private key type");t=e.concat([s,t]);for(var c=f.modulus.byteLength(),h=[0,1];t.length+h.length+1<c;)h.push(255);h.push(0);for(var u=-1;++u<t.length;)h.push(t[u]);return l(h,f)}function n(t,r){var i=v[r.curve.join(".")];if(!i)throw new Error("unknown curve "+r.curve.join("."));var n=new p(i),a=n.keyFromPrivate(r.privateKey),o=a.sign(t);return new e(o.toDER())}function a(t,e,r){for(var i,n=e.params.priv_key,a=e.params.p,c=e.params.q,d=e.params.g,l=new b(0),p=f(t,c).mod(c),g=!1,v=s(n,c,t,r);!1===g;)i=h(c,v,r),l=u(d,i,a,c),g=i.invm(c).imul(p.add(n.mul(l))).mod(c),0===g.cmpn(0)&&(g=!1,l=new b(0));return o(l,g)}function o(t,r){t=t.toArray(),r=r.toArray(),128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r));var i=t.length+r.length+4,n=[48,i,2,t.length];return n=n.concat(t,[2,r.length],r),new e(n)}function s(t,r,i,n){if(t=new e(t.toArray()),t.length<r.byteLength()){var a=new e(r.byteLength()-t.length);a.fill(0),t=e.concat([a,t])}var o=i.length,s=c(i,r),f=new e(o);f.fill(1);var h=new e(o);return h.fill(0),h=d(n,h).update(f).update(new e([0])).update(t).update(s).digest(),f=d(n,h).update(f).digest(),h=d(n,h).update(f).update(new e([1])).update(t).update(s).digest(),f=d(n,h).update(f).digest(),{k:h,v:f}}function f(t,e){var r=new b(t),i=(t.length<<3)-e.bitLength();return i>0&&r.ishrn(i),r}function c(t,r){t=f(t,r),t=t.mod(r);var i=new e(t.toArray());if(i.length<r.byteLength()){var n=new e(r.byteLength()-i.length);n.fill(0),i=e.concat([n,i])}return i}function h(t,r,i){var n,a;do{for(n=new e(0);8*n.length<t.bitLength();)r.v=d(i,r.k).update(r.v).digest(),n=e.concat([n,r.v]);a=f(n,t),r.k=d(i,r.k).update(r.v).update(new e([0])).digest(),r.v=d(i,r.k).update(r.v).digest()}while(-1!==a.cmp(t));return a}function u(t,e,r,i){return t.toRed(b.mont(r)).redPow(e).fromRed().mod(i)}var d=r(70),l=r(51),p=r(10).ec,b=r(6),g=r(35),v=r(92);t.exports=i,t.exports.getKey=s,t.exports.makeKey=h}).call(e,r(4).Buffer)},function(t,e){t.exports={_args:[["elliptic@6.4.0","/Users/youcheng/Documents/code/prismplayer/src/hls"]],_development:!0,_from:"elliptic@6.4.0",_id:"elliptic@6.4.0",_inBundle:!1,_integrity:"sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=",_location:"/elliptic",_phantomChildren:{},_requested:{type:"version",registry:!0,raw:"elliptic@6.4.0",name:"elliptic",escapedName:"elliptic",rawSpec:"6.4.0",saveSpec:null,fetchSpec:"6.4.0"},_requiredBy:["/browserify-sign","/create-ecdh"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz",_spec:"6.4.0",_where:"/Users/youcheng/Documents/code/prismplayer/src/hls",author:{name:"Fedor Indutny",email:"fedor@indutny.com"},bugs:{url:"https://github.com/indutny/elliptic/issues"},dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"},description:"EC cryptography",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},files:["lib"],homepage:"https://github.com/indutny/elliptic",keywords:["EC","Elliptic","curve","Cryptography"],license:"MIT",main:"lib/elliptic.js",name:"elliptic",repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",test:"npm run lint && npm run unit",unit:"istanbul test _mocha --reporter=spec test/index.js",version:"grunt dist && git add dist/"},version:"6.4.0"}},function(t,e,r){"use strict";function i(t,e){for(var r=[],i=1<<e+1,n=t.clone();n.cmpn(1)>=0;){var a;if(n.isOdd()){var o=n.andln(i-1);a=o>(i>>1)-1?(i>>1)-o:o,n.isubn(a)}else a=0;r.push(a);for(var s=0!==n.cmpn(0)&&0===n.andln(i-1)?e+1:1,f=1;f<s;f++)r.push(0);n.iushrn(s)}return r}function n(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var i=0,n=0;t.cmpn(-i)>0||e.cmpn(-n)>0;){var a=t.andln(3)+i&3,o=e.andln(3)+n&3;3===a&&(a=-1),3===o&&(o=-1);var s;if(0==(1&a))s=0;else{var f=t.andln(7)+i&7;s=3!==f&&5!==f||2!==o?a:-a}r[0].push(s);var c;if(0==(1&o))c=0;else{var f=e.andln(7)+n&7;c=3!==f&&5!==f||2!==a?o:-o}r[1].push(c),2*i===s+1&&(i=1-i),2*n===c+1&&(n=1-n),t.iushrn(1),e.iushrn(1)}return r}function a(t,e,r){var i="_"+e;t.prototype[e]=function(){return void 0!==this[i]?this[i]:this[i]=r.call(this)}}function o(t){return"string"==typeof t?f.toArray(t,"hex"):t}function s(t){return new c(t,"hex","le")}var f=e,c=r(6),h=r(11),u=r(84);f.assert=h,f.toArray=u.toArray,f.zero2=u.zero2,f.toHex=u.toHex,f.encode=u.encode,f.getNAF=i,f.getJSF=n,f.cachedProperty=a,f.parseBytes=o,f.intFromLE=s},function(t,e,r){"use strict";function i(t,e){this.type=t,this.p=new a(e.p,16),this.red=e.prime?a.red(e.prime):a.mont(this.p),this.zero=new a(0).toRed(this.red),this.one=new a(1).toRed(this.red),this.two=new a(2).toRed(this.red),this.n=e.n&&new a(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function n(t,e){this.curve=t,this.type=e,this.precomputed=null}var a=r(6),o=r(10),s=o.utils,f=s.getNAF,c=s.getJSF,h=s.assert;t.exports=i,i.prototype.point=function(){throw new Error("Not implemented")},i.prototype.validate=function(){throw new Error("Not implemented")},i.prototype._fixedNafMul=function(t,e){h(t.precomputed);var r=t._getDoubles(),i=f(e,1),n=(1<<r.step+1)-(r.step%2==0?2:1);n/=3;for(var a=[],o=0;o<i.length;o+=r.step){for(var s=0,e=o+r.step-1;e>=o;e--)s=(s<<1)+i[e];a.push(s)}for(var c=this.jpoint(null,null,null),u=this.jpoint(null,null,null),d=n;d>0;d--){for(var o=0;o<a.length;o++){var s=a[o];s===d?u=u.mixedAdd(r.points[o]):s===-d&&(u=u.mixedAdd(r.points[o].neg()))}c=c.add(u)}return c.toP()},i.prototype._wnafMul=function(t,e){var r=4,i=t._getNAFPoints(r);r=i.wnd;for(var n=i.points,a=f(e,r),o=this.jpoint(null,null,null),s=a.length-1;s>=0;s--){for(var e=0;s>=0&&0===a[s];s--)e++;if(s>=0&&e++,o=o.dblp(e),s<0)break;var c=a[s];h(0!==c),o="affine"===t.type?c>0?o.mixedAdd(n[c-1>>1]):o.mixedAdd(n[-c-1>>1].neg()):c>0?o.add(n[c-1>>1]):o.add(n[-c-1>>1].neg())}return"affine"===t.type?o.toP():o},i.prototype._wnafMulAdd=function(t,e,r,i,n){for(var a=this._wnafT1,o=this._wnafT2,s=this._wnafT3,h=0,u=0;u<i;u++){var d=e[u],l=d._getNAFPoints(t);a[u]=l.wnd,o[u]=l.points}for(var u=i-1;u>=1;u-=2){var p=u-1,b=u;if(1===a[p]&&1===a[b]){var g=[e[p],null,null,e[b]];0===e[p].y.cmp(e[b].y)?(g[1]=e[p].add(e[b]),g[2]=e[p].toJ().mixedAdd(e[b].neg())):0===e[p].y.cmp(e[b].y.redNeg())?(g[1]=e[p].toJ().mixedAdd(e[b]),g[2]=e[p].add(e[b].neg())):(g[1]=e[p].toJ().mixedAdd(e[b]),g[2]=e[p].toJ().mixedAdd(e[b].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],y=c(r[p],r[b]);h=Math.max(y[0].length,h),s[p]=new Array(h),s[b]=new Array(h);for(var m=0;m<h;m++){var _=0|y[0][m],w=0|y[1][m];s[p][m]=v[3*(_+1)+(w+1)],s[b][m]=0,o[p]=g}}else s[p]=f(r[p],a[p]),s[b]=f(r[b],a[b]),h=Math.max(s[p].length,h),h=Math.max(s[b].length,h)}for(var S=this.jpoint(null,null,null),E=this._wnafT4,u=h;u>=0;u--){for(var A=0;u>=0;){for(var T=!0,m=0;m<i;m++)E[m]=0|s[m][u],0!==E[m]&&(T=!1);if(!T)break;A++,u--}if(u>=0&&A++,S=S.dblp(A),u<0)break;for(var m=0;m<i;m++){var d,R=E[m];0!==R&&(R>0?d=o[m][R-1>>1]:R<0&&(d=o[m][-R-1>>1].neg()),S="affine"===d.type?S.mixedAdd(d):S.add(d))}}for(var u=0;u<i;u++)o[u]=null;return n?S:S.toP()},i.BasePoint=n,n.prototype.eq=function(){throw new Error("Not implemented")},n.prototype.validate=function(){return this.curve.validate(this)},i.prototype.decodePoint=function(t,e){t=s.toArray(t,e);var r=this.p.byteLength();if((4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*r){6===t[0]?h(t[t.length-1]%2==0):7===t[0]&&h(t[t.length-1]%2==1);return this.point(t.slice(1,1+r),t.slice(1+r,1+2*r))}if((2===t[0]||3===t[0])&&t.length-1===r)return this.pointFromX(t.slice(1,1+r),3===t[0]);throw new Error("Unknown point format")},n.prototype.encodeCompressed=function(t){return this.encode(t,!0)},n.prototype._encode=function(t){var e=this.curve.p.byteLength(),r=this.getX().toArray("be",e);return t?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",e))},n.prototype.encode=function(t,e){return s.encode(this._encode(e),t)},n.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},n.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return!!e&&e.points.length>=Math.ceil((t.bitLength()+1)/e.step)},n.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],i=this,n=0;n<e;n+=t){for(var a=0;a<t;a++)i=i.dbl();r.push(i)}return{step:t,points:r}},n.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],r=(1<<t)-1,i=1===r?null:this.dbl(),n=1;n<r;n++)e[n]=e[n-1].add(i);return{wnd:t,points:e}},n.prototype._getBeta=function(){return null},n.prototype.dblp=function(t){for(var e=this,r=0;r<t;r++)e=e.dbl();return e}},function(t,e,r){"use strict";function i(t){h.call(this,"short",t),this.a=new f(t.a,16).toRed(this.red),this.b=new f(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function n(t,e,r,i){h.BasePoint.call(this,t,"affine"),null===e&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new f(e,16),this.y=new f(r,16),i&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function a(t,e,r,i){h.BasePoint.call(this,t,"jacobian"),null===e&&null===r&&null===i?(this.x=this.curve.one,this.y=this.curve.one,this.z=new f(0)):(this.x=new f(e,16),this.y=new f(r,16),this.z=new f(i,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}var o=r(34),s=r(10),f=r(6),c=r(0),h=o.base,u=s.utils.assert;c(i,h),t.exports=i,i.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,r;if(t.beta)e=new f(t.beta,16).toRed(this.red);else{var i=this._getEndoRoots(this.p);e=i[0].cmp(i[1])<0?i[0]:i[1],e=e.toRed(this.red)}if(t.lambda)r=new f(t.lambda,16);else{var n=this._getEndoRoots(this.n);0===this.g.mul(n[0]).x.cmp(this.g.x.redMul(e))?r=n[0]:(r=n[1],u(0===this.g.mul(r).x.cmp(this.g.x.redMul(e))))}var a;return a=t.basis?t.basis.map(function(t){return{a:new f(t.a,16),b:new f(t.b,16)}}):this._getEndoBasis(r),{beta:e,lambda:r,basis:a}}},i.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:f.mont(t),r=new f(2).toRed(e).redInvm(),i=r.redNeg(),n=new f(3).toRed(e).redNeg().redSqrt().redMul(r);return[i.redAdd(n).fromRed(),i.redSub(n).fromRed()]},i.prototype._getEndoBasis=function(t){for(var e,r,i,n,a,o,s,c,h,u=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=t,l=this.n.clone(),p=new f(1),b=new f(0),g=new f(0),v=new f(1),y=0;0!==d.cmpn(0);){var m=l.div(d);c=l.sub(m.mul(d)),h=g.sub(m.mul(p));var _=v.sub(m.mul(b));if(!i&&c.cmp(u)<0)e=s.neg(),r=p,i=c.neg(),n=h;else if(i&&2==++y)break;s=c,l=d,d=c,g=p,p=h,v=b,b=_}a=c.neg(),o=h;var w=i.sqr().add(n.sqr());return a.sqr().add(o.sqr()).cmp(w)>=0&&(a=e,o=r),i.negative&&(i=i.neg(),n=n.neg()),a.negative&&(a=a.neg(),o=o.neg()),[{a:i,b:n},{a:a,b:o}]},i.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],i=e[1],n=i.b.mul(t).divRound(this.n),a=r.b.neg().mul(t).divRound(this.n),o=n.mul(r.a),s=a.mul(i.a),f=n.mul(r.b),c=a.mul(i.b);return{k1:t.sub(o).sub(s),k2:f.add(c).neg()}},i.prototype.pointFromX=function(t,e){t=new f(t,16),t.red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),i=r.redSqrt();if(0!==i.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var n=i.fromRed().isOdd();return(e&&!n||!e&&n)&&(i=i.redNeg()),this.point(t,i)},i.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,i=this.a.redMul(e),n=e.redSqr().redMul(e).redIAdd(i).redIAdd(this.b);return 0===r.redSqr().redISub(n).cmpn(0)},i.prototype._endoWnafMulAdd=function(t,e,r){for(var i=this._endoWnafT1,n=this._endoWnafT2,a=0;a<t.length;a++){var o=this._endoSplit(e[a]),s=t[a],f=s._getBeta();o.k1.negative&&(o.k1.ineg(),s=s.neg(!0)),o.k2.negative&&(o.k2.ineg(),f=f.neg(!0)),i[2*a]=s,i[2*a+1]=f,n[2*a]=o.k1,n[2*a+1]=o.k2}for(var c=this._wnafMulAdd(1,i,n,2*a,r),h=0;h<2*a;h++)i[h]=null,n[h]=null;return c},c(n,h.BasePoint),i.prototype.point=function(t,e,r){return new n(this,t,e,r)},i.prototype.pointFromJSON=function(t,e){return n.fromJSON(this,t,e)},n.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var e=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var r=this.curve,i=function(t){return r.point(t.x.redMul(r.endo.beta),t.y)};t.beta=e,e.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(i)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(i)}}}return e}},n.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},n.fromJSON=function(t,e,r){function i(e){return t.point(e[0],e[1],r)}"string"==typeof e&&(e=JSON.parse(e));var n=t.point(e[0],e[1],r);if(!e[2])return n;var a=e[2];return n.precomputed={beta:null,doubles:a.doubles&&{step:a.doubles.step,points:[n].concat(a.doubles.points.map(i))},naf:a.naf&&{wnd:a.naf.wnd,points:[n].concat(a.naf.points.map(i))}},n},n.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},n.prototype.isInfinity=function(){return this.inf},n.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),i=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,i)},n.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),i=t.redInvm(),n=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(i),a=n.redSqr().redISub(this.x.redAdd(this.x)),o=n.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,o)},n.prototype.getX=function(){return this.x.fromRed()},n.prototype.getY=function(){return this.y.fromRed()},n.prototype.mul=function(t){return t=new f(t,16),this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},n.prototype.mulAdd=function(t,e,r){var i=[this,e],n=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,n):this.curve._wnafMulAdd(1,i,n,2)},n.prototype.jmulAdd=function(t,e,r){var i=[this,e],n=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,n,!0):this.curve._wnafMulAdd(1,i,n,2,!0)},n.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},n.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,i=function(t){return t.neg()};e.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(i)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(i)}}}return e},n.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},c(a,h.BasePoint),i.prototype.jpoint=function(t,e,r){return new a(this,t,e,r)},a.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),i=this.y.redMul(e).redMul(t);return this.curve.point(r,i)},a.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},a.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),i=this.x.redMul(e),n=t.x.redMul(r),a=this.y.redMul(e.redMul(t.z)),o=t.y.redMul(r.redMul(this.z)),s=i.redSub(n),f=a.redSub(o);if(0===s.cmpn(0))return 0!==f.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),h=c.redMul(s),u=i.redMul(c),d=f.redSqr().redIAdd(h).redISub(u).redISub(u),l=f.redMul(u.redISub(d)).redISub(a.redMul(h)),p=this.z.redMul(t.z).redMul(s);return this.curve.jpoint(d,l,p)},a.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,i=t.x.redMul(e),n=this.y,a=t.y.redMul(e).redMul(this.z),o=r.redSub(i),s=n.redSub(a);if(0===o.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=o.redSqr(),c=f.redMul(o),h=r.redMul(f),u=s.redSqr().redIAdd(c).redISub(h).redISub(h),d=s.redMul(h.redISub(u)).redISub(n.redMul(c)),l=this.z.redMul(o);return this.curve.jpoint(u,d,l)},a.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var e=this,r=0;r<t;r++)e=e.dbl();return e}for(var i=this.curve.a,n=this.curve.tinv,a=this.x,o=this.y,s=this.z,f=s.redSqr().redSqr(),c=o.redAdd(o),r=0;r<t;r++){var h=a.redSqr(),u=c.redSqr(),d=u.redSqr(),l=h.redAdd(h).redIAdd(h).redIAdd(i.redMul(f)),p=a.redMul(u),b=l.redSqr().redISub(p.redAdd(p)),g=p.redISub(b),v=l.redMul(g);v=v.redIAdd(v).redISub(d);var y=c.redMul(s);r+1<t&&(f=f.redMul(d)),a=b,s=y,c=v}return this.curve.jpoint(a,c.redMul(n),s)},a.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},a.prototype._zeroDbl=function(){var t,e,r;if(this.zOne){var i=this.x.redSqr(),n=this.y.redSqr(),a=n.redSqr(),o=this.x.redAdd(n).redSqr().redISub(i).redISub(a);o=o.redIAdd(o);var s=i.redAdd(i).redIAdd(i),f=s.redSqr().redISub(o).redISub(o),c=a.redIAdd(a);c=c.redIAdd(c),c=c.redIAdd(c),t=f,e=s.redMul(o.redISub(f)).redISub(c),r=this.y.redAdd(this.y)}else{var h=this.x.redSqr(),u=this.y.redSqr(),d=u.redSqr(),l=this.x.redAdd(u).redSqr().redISub(h).redISub(d);l=l.redIAdd(l);var p=h.redAdd(h).redIAdd(h),b=p.redSqr(),g=d.redIAdd(d);g=g.redIAdd(g),g=g.redIAdd(g),t=b.redISub(l).redISub(l),e=p.redMul(l.redISub(t)).redISub(g),r=this.y.redMul(this.z),r=r.redIAdd(r)}return this.curve.jpoint(t,e,r)},a.prototype._threeDbl=function(){var t,e,r;if(this.zOne){var i=this.x.redSqr(),n=this.y.redSqr(),a=n.redSqr(),o=this.x.redAdd(n).redSqr().redISub(i).redISub(a);o=o.redIAdd(o);var s=i.redAdd(i).redIAdd(i).redIAdd(this.curve.a),f=s.redSqr().redISub(o).redISub(o);t=f;var c=a.redIAdd(a);c=c.redIAdd(c),c=c.redIAdd(c),e=s.redMul(o.redISub(f)).redISub(c),r=this.y.redAdd(this.y)}else{var h=this.z.redSqr(),u=this.y.redSqr(),d=this.x.redMul(u),l=this.x.redSub(h).redMul(this.x.redAdd(h));l=l.redAdd(l).redIAdd(l);var p=d.redIAdd(d);p=p.redIAdd(p);var b=p.redAdd(p);t=l.redSqr().redISub(b),r=this.y.redAdd(this.z).redSqr().redISub(u).redISub(h);var g=u.redSqr();g=g.redIAdd(g),g=g.redIAdd(g),g=g.redIAdd(g),e=l.redMul(p.redISub(t)).redISub(g)}return this.curve.jpoint(t,e,r)},a.prototype._dbl=function(){var t=this.curve.a,e=this.x,r=this.y,i=this.z,n=i.redSqr().redSqr(),a=e.redSqr(),o=r.redSqr(),s=a.redAdd(a).redIAdd(a).redIAdd(t.redMul(n)),f=e.redAdd(e);f=f.redIAdd(f);var c=f.redMul(o),h=s.redSqr().redISub(c.redAdd(c)),u=c.redISub(h),d=o.redSqr();d=d.redIAdd(d),d=d.redIAdd(d),d=d.redIAdd(d);var l=s.redMul(u).redISub(d),p=r.redAdd(r).redMul(i);return this.curve.jpoint(h,l,p)},a.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr(),i=e.redSqr(),n=t.redAdd(t).redIAdd(t),a=n.redSqr(),o=this.x.redAdd(e).redSqr().redISub(t).redISub(i);o=o.redIAdd(o),o=o.redAdd(o).redIAdd(o),o=o.redISub(a);var s=o.redSqr(),f=i.redIAdd(i);f=f.redIAdd(f),f=f.redIAdd(f),f=f.redIAdd(f);var c=n.redIAdd(o).redSqr().redISub(a).redISub(s).redISub(f),h=e.redMul(c);h=h.redIAdd(h),h=h.redIAdd(h);var u=this.x.redMul(s).redISub(h);u=u.redIAdd(u),u=u.redIAdd(u);var d=this.y.redMul(c.redMul(f.redISub(c)).redISub(o.redMul(s)));d=d.redIAdd(d),d=d.redIAdd(d),d=d.redIAdd(d);var l=this.z.redAdd(o).redSqr().redISub(r).redISub(s);return this.curve.jpoint(u,d,l)},a.prototype.mul=function(t,e){return t=new f(t,e),this.curve._wnafMul(this,t)},a.prototype.eq=function(t){if("affine"===t.type)return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),r=t.z.redSqr();if(0!==this.x.redMul(r).redISub(t.x.redMul(e)).cmpn(0))return!1;var i=e.redMul(this.z),n=r.redMul(t.z);return 0===this.y.redMul(n).redISub(t.y.redMul(i)).cmpn(0)},a.prototype.eqXToP=function(t){var e=this.z.redSqr(),r=t.toRed(this.curve.red).redMul(e);if(0===this.x.cmp(r))return!0;for(var i=t.clone(),n=this.curve.redN.redMul(e);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(n),0===this.x.cmp(r))return!0}return!1},a.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},a.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(t,e,r){"use strict";function i(t){f.call(this,"mont",t),this.a=new o(t.a,16).toRed(this.red),this.b=new o(t.b,16).toRed(this.red),this.i4=new o(4).toRed(this.red).redInvm(),this.two=new o(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function n(t,e,r){f.BasePoint.call(this,t,"projective"),null===e&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new o(e,16),this.z=new o(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}var a=r(34),o=r(6),s=r(0),f=a.base,c=r(10),h=c.utils;s(i,f),t.exports=i,i.prototype.validate=function(t){var e=t.normalize().x,r=e.redSqr(),i=r.redMul(e).redAdd(r.redMul(this.a)).redAdd(e);return 0===i.redSqrt().redSqr().cmp(i)},s(n,f.BasePoint),i.prototype.decodePoint=function(t,e){return this.point(h.toArray(t,e),1)},i.prototype.point=function(t,e){return new n(this,t,e)},i.prototype.pointFromJSON=function(t){return n.fromJSON(this,t)},n.prototype.precompute=function(){},n.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},n.fromJSON=function(t,e){return new n(t,e[0],e[1]||t.one)},n.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},n.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},n.prototype.dbl=function(){var t=this.x.redAdd(this.z),e=t.redSqr(),r=this.x.redSub(this.z),i=r.redSqr(),n=e.redSub(i),a=e.redMul(i),o=n.redMul(i.redAdd(this.curve.a24.redMul(n)));return this.curve.point(a,o)},n.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},n.prototype.diffAdd=function(t,e){var r=this.x.redAdd(this.z),i=this.x.redSub(this.z),n=t.x.redAdd(t.z),a=t.x.redSub(t.z),o=a.redMul(r),s=n.redMul(i),f=e.z.redMul(o.redAdd(s).redSqr()),c=e.x.redMul(o.redISub(s).redSqr());return this.curve.point(f,c)},n.prototype.mul=function(t){for(var e=t.clone(),r=this,i=this.curve.point(null,null),n=this,a=[];0!==e.cmpn(0);e.iushrn(1))a.push(e.andln(1));for(var o=a.length-1;o>=0;o--)0===a[o]?(r=r.diffAdd(i,n),i=i.dbl()):(i=r.diffAdd(i,n),r=r.dbl());return i},n.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},n.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},n.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},n.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},n.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(t,e,r){"use strict";function i(t){this.twisted=1!=(0|t.a),this.mOneA=this.twisted&&-1==(0|t.a),this.extended=this.mOneA,c.call(this,"edwards",t),this.a=new s(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new s(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new s(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),h(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|t.c)}function n(t,e,r,i,n){c.BasePoint.call(this,t,"projective"),null===e&&null===r&&null===i?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new s(e,16),this.y=new s(r,16),this.z=i?new s(i,16):this.curve.one,this.t=n&&new s(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}var a=r(34),o=r(10),s=r(6),f=r(0),c=a.base,h=o.utils.assert;f(i,c),t.exports=i,i.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},i.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},i.prototype.jpoint=function(t,e,r,i){return this.point(t,e,r,i)},i.prototype.pointFromX=function(t,e){t=new s(t,16),t.red||(t=t.toRed(this.red));var r=t.redSqr(),i=this.c2.redSub(this.a.redMul(r)),n=this.one.redSub(this.c2.redMul(this.d).redMul(r)),a=i.redMul(n.redInvm()),o=a.redSqrt();if(0!==o.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var f=o.fromRed().isOdd();return(e&&!f||!e&&f)&&(o=o.redNeg()),this.point(t,o)},i.prototype.pointFromY=function(t,e){t=new s(t,16),t.red||(t=t.toRed(this.red));var r=t.redSqr(),i=r.redSub(this.one),n=r.redMul(this.d).redAdd(this.one),a=i.redMul(n.redInvm());if(0===a.cmp(this.zero)){if(e)throw new Error("invalid point");return this.point(this.zero,t)}var o=a.redSqrt();if(0!==o.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return o.isOdd()!==e&&(o=o.redNeg()),this.point(o,t)},i.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),r=t.y.redSqr(),i=e.redMul(this.a).redAdd(r),n=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(r)));return 0===i.cmp(n)},f(n,c.BasePoint),i.prototype.pointFromJSON=function(t){return n.fromJSON(this,t)},i.prototype.point=function(t,e,r,i){return new n(this,t,e,r,i)},n.fromJSON=function(t,e){return new n(t,e[0],e[1],e[2])},n.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},n.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&0===this.y.cmp(this.z)},n.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var i=this.curve._mulA(t),n=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),a=i.redAdd(e),o=a.redSub(r),s=i.redSub(e),f=n.redMul(o),c=a.redMul(s),h=n.redMul(s),u=o.redMul(a);return this.curve.point(f,c,u,h)},n.prototype._projDbl=function(){var t,e,r,i=this.x.redAdd(this.y).redSqr(),n=this.x.redSqr(),a=this.y.redSqr();if(this.curve.twisted){var o=this.curve._mulA(n),s=o.redAdd(a);if(this.zOne)t=i.redSub(n).redSub(a).redMul(s.redSub(this.curve.two)),e=s.redMul(o.redSub(a)),r=s.redSqr().redSub(s).redSub(s);else{var f=this.z.redSqr(),c=s.redSub(f).redISub(f);t=i.redSub(n).redISub(a).redMul(c),e=s.redMul(o.redSub(a)),r=s.redMul(c)}}else{var o=n.redAdd(a),f=this.curve._mulC(this.c.redMul(this.z)).redSqr(),c=o.redSub(f).redSub(f);t=this.curve._mulC(i.redISub(o)).redMul(c),e=this.curve._mulC(o).redMul(n.redISub(a)),r=o.redMul(c)}return this.curve.point(t,e,r)},n.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},n.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),r=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),i=this.t.redMul(this.curve.dd).redMul(t.t),n=this.z.redMul(t.z.redAdd(t.z)),a=r.redSub(e),o=n.redSub(i),s=n.redAdd(i),f=r.redAdd(e),c=a.redMul(o),h=s.redMul(f),u=a.redMul(f),d=o.redMul(s);return this.curve.point(c,h,d,u)},n.prototype._projAdd=function(t){var e,r,i=this.z.redMul(t.z),n=i.redSqr(),a=this.x.redMul(t.x),o=this.y.redMul(t.y),s=this.curve.d.redMul(a).redMul(o),f=n.redSub(s),c=n.redAdd(s),h=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(a).redISub(o),u=i.redMul(f).redMul(h);return this.curve.twisted?(e=i.redMul(c).redMul(o.redSub(this.curve._mulA(a))),r=f.redMul(c)):(e=i.redMul(c).redMul(o.redSub(a)),r=this.curve._mulC(f).redMul(c)),this.curve.point(u,e,r)},n.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},n.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},n.prototype.mulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!1)},n.prototype.jmulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!0)},n.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},n.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},n.prototype.getX=function(){return this.normalize(),this.x.fromRed()},n.prototype.getY=function(){return this.normalize(),this.y.fromRed()},n.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},n.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var r=t.clone(),i=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(i),0===this.x.cmp(e))return!0}return!1},n.prototype.toP=n.prototype.normalize,n.prototype.mixedAdd=n.prototype.add},function(t,e,r){"use strict";function i(t){"short"===t.type?this.curve=new s.curve.short(t):"edwards"===t.type?this.curve=new s.curve.edwards(t):this.curve=new s.curve.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,f(this.g.validate(),"Invalid curve"),f(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function n(t,e){Object.defineProperty(a,t,{configurable:!0,enumerable:!0,get:function(){var r=new i(e);return Object.defineProperty(a,t,{configurable:!0,enumerable:!0,value:r}),r}})}var a=e,o=r(52),s=r(10),f=s.utils.assert;a.PresetCurve=i,n("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),n("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),n("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),n("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),n("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),n("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),n("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var c;try{c=r(179)}catch(t){c=void 0}n("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",c]})},function(t,e,r){"use strict";e.sha1=r(174),e.sha224=r(175),e.sha256=r(86),e.sha384=r(176),e.sha512=r(87)},function(t,e,r){"use strict";function i(){if(!(this instanceof i))return new i;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}var n=r(12),a=r(26),o=r(85),s=n.rotl32,f=n.sum32,c=n.sum32_5,h=o.ft_1,u=a.BlockHash,d=[1518500249,1859775393,2400959708,3395469782];n.inherits(i,u),t.exports=i,i.blockSize=512,i.outSize=160,i.hmacStrength=80,i.padLength=64,i.prototype._update=function(t,e){for(var r=this.W,i=0;i<16;i++)r[i]=t[e+i];for(;i<r.length;i++)r[i]=s(r[i-3]^r[i-8]^r[i-14]^r[i-16],1);var n=this.h[0],a=this.h[1],o=this.h[2],u=this.h[3],l=this.h[4];for(i=0;i<r.length;i++){var p=~~(i/20),b=c(s(n,5),h(p,a,o,u),l,r[i],d[p]);l=u,u=o,o=s(a,30),a=n,n=b}this.h[0]=f(this.h[0],n),this.h[1]=f(this.h[1],a),this.h[2]=f(this.h[2],o),this.h[3]=f(this.h[3],u),this.h[4]=f(this.h[4],l)},i.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(t,e,r){"use strict";function i(){if(!(this instanceof i))return new i;a.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}var n=r(12),a=r(86);n.inherits(i,a),t.exports=i,i.blockSize=512,i.outSize=224,i.hmacStrength=192,i.padLength=64,i.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},function(t,e,r){"use strict";function i(){if(!(this instanceof i))return new i;a.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}var n=r(12),a=r(87);n.inherits(i,a),t.exports=i,i.blockSize=1024,i.outSize=384,i.hmacStrength=192,i.padLength=128,i.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},function(t,e,r){"use strict";function i(){if(!(this instanceof i))return new i;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function n(t,e,r,i){return t<=15?e^r^i:t<=31?e&r|~e&i:t<=47?(e|~r)^i:t<=63?e&i|r&~i:e^(r|~i)}function a(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function o(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}var s=r(12),f=r(26),c=s.rotl32,h=s.sum32,u=s.sum32_3,d=s.sum32_4,l=f.BlockHash;s.inherits(i,l),e.ripemd160=i,i.blockSize=512,i.outSize=160,i.hmacStrength=192,i.padLength=64,i.prototype._update=function(t,e){for(var r=this.h[0],i=this.h[1],s=this.h[2],f=this.h[3],l=this.h[4],y=r,m=i,_=s,w=f,S=l,E=0;E<80;E++){var A=h(c(d(r,n(E,i,s,f),t[p[E]+e],a(E)),g[E]),l);r=l,l=f,f=c(s,10),s=i,i=A,A=h(c(d(y,n(79-E,m,_,w),t[b[E]+e],o(E)),v[E]),S),y=S,S=w,w=c(_,10),_=m,m=A}A=u(this.h[1],s,w),this.h[1]=u(this.h[2],f,S),this.h[2]=u(this.h[3],l,y),this.h[3]=u(this.h[4],r,m),this.h[4]=u(this.h[0],i,_),this.h[0]=A},i.prototype._digest=function(t){return"hex"===t?s.toHex32(this.h,"little"):s.split32(this.h,"little")};var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],b=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],g=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],v=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},function(t,e,r){"use strict";function i(t,e,r){if(!(this instanceof i))return new i(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(e,r))}var n=r(12),a=r(11);t.exports=i,i.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),a(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(this.inner=(new this.Hash).update(t),e=0;e<t.length;e++)t[e]^=106;this.outer=(new this.Hash).update(t)},i.prototype.update=function(t,e){return this.inner.update(t,e),this},i.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},function(t,e){t.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},function(t,e,r){"use strict";function i(t){if(!(this instanceof i))return new i(t);"string"==typeof t&&(f(o.curves.hasOwnProperty(t),"Unknown curve "+t),t=o.curves[t]),t instanceof o.curves.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}var n=r(6),a=r(181),o=r(10),s=o.utils,f=s.assert,c=r(182),h=r(183);t.exports=i,i.prototype.keyPair=function(t){return new c(this,t)},i.prototype.keyFromPrivate=function(t,e){return c.fromPrivate(this,t,e)},i.prototype.keyFromPublic=function(t,e){return c.fromPublic(this,t,e)},i.prototype.genKeyPair=function(t){t||(t={});for(var e=new a({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||o.rand(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),i=this.n.sub(new n(2));;){var s=new n(e.generate(r));if(!(s.cmp(i)>0))return s.iaddn(1),this.keyFromPrivate(s)}},i.prototype._truncateToN=function(t,e){var r=8*t.byteLength()-this.n.bitLength();return r>0&&(t=t.ushrn(r)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},i.prototype.sign=function(t,e,r,i){"object"==typeof r&&(i=r,r=null),i||(i={}),e=this.keyFromPrivate(e,r),t=this._truncateToN(new n(t,16));for(var o=this.n.byteLength(),s=e.getPrivate().toArray("be",o),f=t.toArray("be",o),c=new a({hash:this.hash,entropy:s,nonce:f,pers:i.pers,persEnc:i.persEnc||"utf8"}),u=this.n.sub(new n(1)),d=0;!0;d++){var l=i.k?i.k(d):new n(c.generate(this.n.byteLength()));if(l=this._truncateToN(l,!0),!(l.cmpn(1)<=0||l.cmp(u)>=0)){var p=this.g.mul(l);if(!p.isInfinity()){var b=p.getX(),g=b.umod(this.n);if(0!==g.cmpn(0)){var v=l.invm(this.n).mul(g.mul(e.getPrivate()).iadd(t));if(v=v.umod(this.n),0!==v.cmpn(0)){var y=(p.getY().isOdd()?1:0)|(0!==b.cmp(g)?2:0);return i.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),y^=1),new h({r:g,s:v,recoveryParam:y})}}}}}},i.prototype.verify=function(t,e,r,i){t=this._truncateToN(new n(t,16)),r=this.keyFromPublic(r,i),e=new h(e,"hex");var a=e.r,o=e.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var s=o.invm(this.n),f=s.mul(t).umod(this.n),c=s.mul(a).umod(this.n);if(!this.curve._maxwellTrick){var u=this.g.mulAdd(f,r.getPublic(),c);return!u.isInfinity()&&0===u.getX().umod(this.n).cmp(a)}var u=this.g.jmulAdd(f,r.getPublic(),c);return!u.isInfinity()&&u.eqXToP(a)},i.prototype.recoverPubKey=function(t,e,r,i){f((3&r)===r,"The recovery param is more than two bits"),e=new h(e,i);var a=this.n,o=new n(t),s=e.r,c=e.s,u=1&r,d=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");s=d?this.curve.pointFromX(s.add(this.curve.n),u):this.curve.pointFromX(s,u);var l=e.r.invm(a),p=a.sub(o).mul(l).umod(a),b=c.mul(l).umod(a);return this.g.mulAdd(p,s,b)},i.prototype.getKeyRecoveryParam=function(t,e,r,i){if(e=new h(e,i),null!==e.recoveryParam)return e.recoveryParam;for(var n=0;n<4;n++){var a;try{a=this.recoverPubKey(t,e,n)}catch(t){continue}if(a.eq(r))return n}throw new Error("Unable to find valid recovery factor")}},function(t,e,r){"use strict";function i(t){if(!(this instanceof i))return new i(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=a.toArray(t.entropy,t.entropyEnc||"hex"),r=a.toArray(t.nonce,t.nonceEnc||"hex"),n=a.toArray(t.pers,t.persEnc||"hex");o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var n=r(52),a=r(84),o=r(11);t.exports=i,i.prototype._init=function(t,e,r){var i=t.concat(e).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var n=0;n<this.V.length;n++)this.K[n]=0,this.V[n]=1;this._update(i),this._reseed=1,this.reseedInterval=281474976710656},i.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},i.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},i.prototype.reseed=function(t,e,r,i){"string"!=typeof e&&(i=r,r=e,e=null),t=a.toArray(t,e),r=a.toArray(r,i),o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},i.prototype.generate=function(t,e,r,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(i=r,r=e,e=null),r&&(r=a.toArray(r,i||"hex"),this._update(r));for(var n=[];n.length<t;)this.V=this._hmac().update(this.V).digest(),n=n.concat(this.V);var o=n.slice(0,t);return this._update(r),this._reseed++,a.encode(o,e)}},function(t,e,r){"use strict";function i(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}var n=r(6),a=r(10),o=a.utils,s=o.assert;t.exports=i,i.fromPublic=function(t,e,r){return e instanceof i?e:new i(t,{pub:e,pubEnc:r})},i.fromPrivate=function(t,e,r){return e instanceof i?e:new i(t,{priv:e,privEnc:r})},i.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},i.prototype.getPublic=function(t,e){return"string"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},i.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},i.prototype._importPrivate=function(t,e){this.priv=new n(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},i.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?s(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||s(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},i.prototype.derive=function(t){return t.mul(this.priv).getX()},i.prototype.sign=function(t,e,r){return this.ec.sign(t,this,e,r)},i.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},i.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},function(t,e,r){"use strict";function i(t,e){if(t instanceof i)return t;this._importDER(t,e)||(u(t.r&&t.s,"Signature without r or s"),this.r=new f(t.r,16),this.s=new f(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function n(){this.place=0}function a(t,e){var r=t[e.place++];if(!(128&r))return r;for(var i=15&r,n=0,a=0,o=e.place;a<i;a++,o++)n<<=8,n|=t[o];return e.place=o,n}function o(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e<r;)e++;return 0===e?t:t.slice(e)}function s(t,e){if(e<128)return void t.push(e);var r=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}var f=r(6),c=r(10),h=c.utils,u=h.assert;t.exports=i,i.prototype._importDER=function(t,e){t=h.toArray(t,e);var r=new n;if(48!==t[r.place++])return!1;if(a(t,r)+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;var i=a(t,r),o=t.slice(r.place,i+r.place);if(r.place+=i,2!==t[r.place++])return!1;var s=a(t,r);if(t.length!==s+r.place)return!1;var c=t.slice(r.place,s+r.place);return 0===o[0]&&128&o[1]&&(o=o.slice(1)),0===c[0]&&128&c[1]&&(c=c.slice(1)),this.r=new f(o),this.s=new f(c),this.recoveryParam=null,!0},i.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=o(e),r=o(r);!(r[0]||128&r[1]);)r=r.slice(1);var i=[2];s(i,e.length),i=i.concat(e),i.push(2),s(i,r.length);var n=i.concat(r),a=[48];return s(a,n.length),a=a.concat(n),h.encode(a,t)}},function(t,e,r){"use strict";function i(t){if(s("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof i))return new i(t);var t=a.curves[t].curve;this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=n.sha512}var n=r(52),a=r(10),o=a.utils,s=o.assert,f=o.parseBytes,c=r(185),h=r(186);t.exports=i,i.prototype.sign=function(t,e){t=f(t);var r=this.keyFromSecret(e),i=this.hashInt(r.messagePrefix(),t),n=this.g.mul(i),a=this.encodePoint(n),o=this.hashInt(a,r.pubBytes(),t).mul(r.priv()),s=i.add(o).umod(this.curve.n);return this.makeSignature({R:n,S:s,Rencoded:a})},i.prototype.verify=function(t,e,r){t=f(t),e=this.makeSignature(e);var i=this.keyFromPublic(r),n=this.hashInt(e.Rencoded(),i.pubBytes(),t),a=this.g.mul(e.S());return e.R().add(i.pub().mul(n)).eq(a)},i.prototype.hashInt=function(){for(var t=this.hash(),e=0;e<arguments.length;e++)t.update(arguments[e]);return o.intFromLE(t.digest()).umod(this.curve.n)},i.prototype.keyFromPublic=function(t){return c.fromPublic(this,t)},i.prototype.keyFromSecret=function(t){return c.fromSecret(this,t)},i.prototype.makeSignature=function(t){return t instanceof h?t:new h(this,t)},i.prototype.encodePoint=function(t){var e=t.getY().toArray("le",this.encodingLength);return e[this.encodingLength-1]|=t.getX().isOdd()?128:0,e},i.prototype.decodePoint=function(t){t=o.parseBytes(t);var e=t.length-1,r=t.slice(0,e).concat(-129&t[e]),i=0!=(128&t[e]),n=o.intFromLE(r);return this.curve.pointFromY(n,i)},i.prototype.encodeInt=function(t){return t.toArray("le",this.encodingLength)},i.prototype.decodeInt=function(t){return o.intFromLE(t)},i.prototype.isPoint=function(t){return t instanceof this.pointClass}},function(t,e,r){"use strict";function i(t,e){this.eddsa=t,this._secret=s(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=s(e.pub)}var n=r(10),a=n.utils,o=a.assert,s=a.parseBytes,f=a.cachedProperty;i.fromPublic=function(t,e){return e instanceof i?e:new i(t,{pub:e})},i.fromSecret=function(t,e){return e instanceof i?e:new i(t,{secret:e})},i.prototype.secret=function(){return this._secret},f(i,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),f(i,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),f(i,"privBytes",function(){var t=this.eddsa,e=this.hash(),r=t.encodingLength-1,i=e.slice(0,t.encodingLength);return i[0]&=248,i[r]&=127,i[r]|=64,i}),f(i,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),f(i,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),f(i,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),i.prototype.sign=function(t){return o(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)},i.prototype.verify=function(t,e){return this.eddsa.verify(t,e,this)},i.prototype.getSecret=function(t){return o(this._secret,"KeyPair is public only"),a.encode(this.secret(),t)},i.prototype.getPublic=function(t){return a.encode(this.pubBytes(),t)},t.exports=i},function(t,e,r){"use strict";function i(t,e){this.eddsa=t,"object"!=typeof e&&(e=c(e)),Array.isArray(e)&&(e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),s(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof n&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}var n=r(6),a=r(10),o=a.utils,s=o.assert,f=o.cachedProperty,c=o.parseBytes;f(i,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),f(i,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),f(i,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),f(i,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),i.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},i.prototype.toHex=function(){return o.encode(this.toBytes(),"hex").toUpperCase()},t.exports=i},function(t,e,r){"use strict";var i=r(27);e.certificate=r(198);var n=i.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});e.RSAPrivateKey=n;var a=i.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});e.RSAPublicKey=a;var o=i.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())});e.PublicKey=o;var s=i.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),f=i.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())});e.PrivateKey=f;var c=i.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});e.EncryptedPrivateKey=c;var h=i.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});e.DSAPrivateKey=h,e.DSAparam=i.define("DSAparam",function(){this.int()});var u=i.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(d),this.key("publicKey").optional().explicit(1).bitstr())});e.ECPrivateKey=u;var d=i.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});e.signature=i.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},function(t,e,r){function i(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}var n=r(27),a=r(0);e.define=function(t,e){return new i(t,e)},i.prototype._createNamed=function(t){var e;try{e=r(189).runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(t){e=function(t){this._initNamed(t)}}return a(e,t),e.prototype._initNamed=function(e){t.call(this,e)},new e(this)},i.prototype._getDecoder=function(t){return t=t||"der",this.decoders.hasOwnProperty(t)||(this.decoders[t]=this._createNamed(n.decoders[t])),this.decoders[t]},i.prototype.decode=function(t,e,r){return this._getDecoder(e).decode(t,r)},i.prototype._getEncoder=function(t){return t=t||"der",this.encoders.hasOwnProperty(t)||(this.encoders[t]=this._createNamed(n.encoders[t])),this.encoders[t]},i.prototype.encode=function(t,e,r){return this._getEncoder(e).encode(t,r)}},function(t,e,r){function i(){}var n=r(190),a=function(t){if(Object.keys)return Object.keys(t);var e=[];for(var r in t)e.push(r);return e},o=function(t,e){if(t.forEach)return t.forEach(e);for(var r=0;r<t.length;r++)e(t[r],r,t)},s=function(){try{return Object.defineProperty({},"_",{}),function(t,e,r){Object.defineProperty(t,e,{writable:!0,enumerable:!1,configurable:!0,value:r})}}catch(t){return function(t,e,r){t[e]=r}}}(),f=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];i.prototype={};var c=e.Script=function(t){if(!(this instanceof c))return new c(t);this.code=t};c.prototype.runInContext=function(t){if(!(t instanceof i))throw new TypeError("needs a 'context' argument.");var e=document.createElement("iframe");e.style||(e.style={}),e.style.display="none",document.body.appendChild(e);var r=e.contentWindow,c=r.eval,h=r.execScript;!c&&h&&(h.call(r,"null"),c=r.eval),o(a(t),function(e){r[e]=t[e]}),o(f,function(e){t[e]&&(r[e]=t[e])});var u=a(r),d=c.call(r,this.code);return o(a(r),function(e){(e in t||-1===n(u,e))&&(t[e]=r[e])}),o(f,function(e){e in t||s(t,e,r[e])}),document.body.removeChild(e),d},c.prototype.runInThisContext=function(){return eval(this.code)},c.prototype.runInNewContext=function(t){var e=c.createContext(t),r=this.runInContext(e);return o(a(e),function(r){t[r]=e[r]}),r},o(a(c.prototype),function(t){e[t]=c[t]=function(e){var r=c(e);return r[t].apply(r,[].slice.call(arguments,1))}}),e.createScript=function(t){return e.Script(t)},e.createContext=c.createContext=function(t){var e=new i;return"object"==typeof t&&o(a(t),function(r){e[r]=t[r]}),e}},function(t,e){var r=[].indexOf;t.exports=function(t,e){if(r)return t.indexOf(e);for(var i=0;i<t.length;++i)if(t[i]===e)return i;return-1}},function(t,e,r){function i(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}function n(t,e){this.path=t,this.rethrow(e)}var a=r(0);e.Reporter=i,i.prototype.isError=function(t){return t instanceof n},i.prototype.save=function(){var t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},i.prototype.restore=function(t){var e=this._reporterState;e.obj=t.obj,e.path=e.path.slice(0,t.pathLen)},i.prototype.enterKey=function(t){return this._reporterState.path.push(t)},i.prototype.exitKey=function(t){var e=this._reporterState;e.path=e.path.slice(0,t-1)},i.prototype.leaveKey=function(t,e,r){var i=this._reporterState;this.exitKey(t),null!==i.obj&&(i.obj[e]=r)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){var t=this._reporterState,e=t.obj;return t.obj={},e},i.prototype.leaveObject=function(t){var e=this._reporterState,r=e.obj;return e.obj=t,r},i.prototype.error=function(t){var e,r=this._reporterState,i=t instanceof n;if(e=i?t:new n(r.path.map(function(t){return"["+JSON.stringify(t)+"]"}).join(""),t.message||t,t.stack),!r.options.partial)throw e;return i||r.errors.push(e),e},i.prototype.wrapResult=function(t){var e=this._reporterState;return e.options.partial?{result:this.isError(t)?null:t,errors:e.errors}:t},a(n,Error),n.prototype.rethrow=function(t){if(this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,n),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},function(t,e,r){function i(t,e){var r={};this._baseState=r,r.enc=t,r.parent=e||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}var n=r(28).Reporter,a=r(28).EncoderBuffer,o=r(28).DecoderBuffer,s=r(11),f=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],c=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(f),h=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];t.exports=i;var u=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];i.prototype.clone=function(){var t=this._baseState,e={};u.forEach(function(r){e[r]=t[r]});var r=new this.constructor(e.parent);return r._baseState=e,r},i.prototype._wrap=function(){var t=this._baseState;c.forEach(function(e){this[e]=function(){var r=new this.constructor(this);return t.children.push(r),r[e].apply(r,arguments)}},this)},i.prototype._init=function(t){var e=this._baseState;s(null===e.parent),t.call(this),e.children=e.children.filter(function(t){return t._baseState.parent===this},this),s.equal(e.children.length,1,"Root node can have only one child")},i.prototype._useArgs=function(t){var e=this._baseState,r=t.filter(function(t){return t instanceof this.constructor},this);t=t.filter(function(t){return!(t instanceof this.constructor)},this),0!==r.length&&(s(null===e.children),e.children=r,r.forEach(function(t){t._baseState.parent=this},this)),0!==t.length&&(s(null===e.args),e.args=t,e.reverseArgs=t.map(function(t){if("object"!=typeof t||t.constructor!==Object)return t;var e={};return Object.keys(t).forEach(function(r){r==(0|r)&&(r|=0);var i=t[r];e[i]=r}),e}))},h.forEach(function(t){i.prototype[t]=function(){var e=this._baseState;throw new Error(t+" not implemented for encoding: "+e.enc)}}),f.forEach(function(t){i.prototype[t]=function(){var e=this._baseState,r=Array.prototype.slice.call(arguments);return s(null===e.tag),e.tag=t,this._useArgs(r),this}}),i.prototype.use=function(t){s(t);var e=this._baseState;return s(null===e.use),e.use=t,this},i.prototype.optional=function(){return this._baseState.optional=!0,this},i.prototype.def=function(t){var e=this._baseState;return s(null===e.default),e.default=t,e.optional=!0,this},i.prototype.explicit=function(t){var e=this._baseState;return s(null===e.explicit&&null===e.implicit),e.explicit=t,this},i.prototype.implicit=function(t){var e=this._baseState;return s(null===e.explicit&&null===e.implicit),e.implicit=t,this},i.prototype.obj=function(){var t=this._baseState,e=Array.prototype.slice.call(arguments);return t.obj=!0,0!==e.length&&this._useArgs(e),this},i.prototype.key=function(t){var e=this._baseState;return s(null===e.key),e.key=t,this},i.prototype.any=function(){return this._baseState.any=!0,this},i.prototype.choice=function(t){var e=this._baseState;return s(null===e.choice),e.choice=t,this._useArgs(Object.keys(t).map(function(e){return t[e]})),this},i.prototype.contains=function(t){var e=this._baseState;return s(null===e.use),e.contains=t,this},i.prototype._decode=function(t,e){var r=this._baseState;if(null===r.parent)return t.wrapResult(r.children[0]._decode(t,e));var i=r.default,n=!0,a=null;if(null!==r.key&&(a=t.enterKey(r.key)),r.optional){var s=null;if(null!==r.explicit?s=r.explicit:null!==r.implicit?s=r.implicit:null!==r.tag&&(s=r.tag),null!==s||r.any){if(n=this._peekTag(t,s,r.any),t.isError(n))return n}else{var f=t.save();try{null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e),n=!0}catch(t){n=!1}t.restore(f)}}var c;if(r.obj&&n&&(c=t.enterObject()),n){if(null!==r.explicit){var h=this._decodeTag(t,r.explicit);if(t.isError(h))return h;t=h}var u=t.offset;if(null===r.use&&null===r.choice){if(r.any)var f=t.save();var d=this._decodeTag(t,null!==r.implicit?r.implicit:r.tag,r.any);if(t.isError(d))return d;r.any?i=t.raw(f):t=d}if(e&&e.track&&null!==r.tag&&e.track(t.path(),u,t.length,"tagged"),e&&e.track&&null!==r.tag&&e.track(t.path(),t.offset,t.length,"content"),i=r.any?i:null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e),t.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach(function(r){r._decode(t,e)}),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){var l=new o(i);i=this._getUse(r.contains,t._reporterState.obj)._decode(l,e)}}return r.obj&&n&&(i=t.leaveObject(c)),null===r.key||null===i&&!0!==n?null!==a&&t.exitKey(a):t.leaveKey(a,r.key,i),i},i.prototype._decodeGeneric=function(t,e,r){var i=this._baseState;return"seq"===t||"set"===t?null:"seqof"===t||"setof"===t?this._decodeList(e,t,i.args[0],r):/str$/.test(t)?this._decodeStr(e,t,r):"objid"===t&&i.args?this._decodeObjid(e,i.args[0],i.args[1],r):"objid"===t?this._decodeObjid(e,null,null,r):"gentime"===t||"utctime"===t?this._decodeTime(e,t,r):"null_"===t?this._decodeNull(e,r):"bool"===t?this._decodeBool(e,r):"objDesc"===t?this._decodeStr(e,t,r):"int"===t||"enum"===t?this._decodeInt(e,i.args&&i.args[0],r):null!==i.use?this._getUse(i.use,e._reporterState.obj)._decode(e,r):e.error("unknown tag: "+t)},i.prototype._getUse=function(t,e){var r=this._baseState;return r.useDecoder=this._use(t,e),s(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},i.prototype._decodeChoice=function(t,e){var r=this._baseState,i=null,n=!1;return Object.keys(r.choice).some(function(a){var o=t.save(),s=r.choice[a];try{var f=s._decode(t,e);if(t.isError(f))return!1;i={type:a,value:f},n=!0}catch(e){return t.restore(o),!1}return!0},this),n?i:t.error("Choice not matched")},i.prototype._createEncoderBuffer=function(t){return new a(t,this.reporter)},i.prototype._encode=function(t,e,r){var i=this._baseState;if(null===i.default||i.default!==t){var n=this._encodeValue(t,e,r);if(void 0!==n&&!this._skipDefault(n,e,r))return n}},i.prototype._encodeValue=function(t,e,r){var i=this._baseState;if(null===i.parent)return i.children[0]._encode(t,e||new n);var a=null;if(this.reporter=e,i.optional&&void 0===t){if(null===i.default)return;t=i.default}var o=null,s=!1;if(i.any)a=this._createEncoderBuffer(t);else if(i.choice)a=this._encodeChoice(t,e);else if(i.contains)o=this._getUse(i.contains,r)._encode(t,e),s=!0;else if(i.children)o=i.children.map(function(r){if("null_"===r._baseState.tag)return r._encode(null,e,t);if(null===r._baseState.key)return e.error("Child should have a key");var i=e.enterKey(r._baseState.key);if("object"!=typeof t)return e.error("Child expected, but input is not object");var n=r._encode(t[r._baseState.key],e,t);return e.leaveKey(i),n},this).filter(function(t){return t}),o=this._createEncoderBuffer(o);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return e.error("Too many args for : "+i.tag);if(!Array.isArray(t))return e.error("seqof/setof, but data is not Array");var f=this.clone();f._baseState.implicit=null,o=this._createEncoderBuffer(t.map(function(r){var i=this._baseState;return this._getUse(i.args[0],t)._encode(r,e)},f))}else null!==i.use?a=this._getUse(i.use,r)._encode(t,e):(o=this._encodePrimitive(i.tag,t),s=!0);var a;if(!i.any&&null===i.choice){var c=null!==i.implicit?i.implicit:i.tag,h=null===i.implicit?"universal":"context";null===c?null===i.use&&e.error("Tag could be omitted only for .use()"):null===i.use&&(a=this._encodeComposite(c,s,h,o))}return null!==i.explicit&&(a=this._encodeComposite(i.explicit,!1,"context",a)),a},i.prototype._encodeChoice=function(t,e){var r=this._baseState,i=r.choice[t.type];return i||s(!1,t.type+" not found in "+JSON.stringify(Object.keys(r.choice))),i._encode(t.value,e)},i.prototype._encodePrimitive=function(t,e){var r=this._baseState;if(/str$/.test(t))return this._encodeStr(e,t);if("objid"===t&&r.args)return this._encodeObjid(e,r.reverseArgs[0],r.args[1]);if("objid"===t)return this._encodeObjid(e,null,null);if("gentime"===t||"utctime"===t)return this._encodeTime(e,t);if("null_"===t)return this._encodeNull();if("int"===t||"enum"===t)return this._encodeInt(e,r.args&&r.reverseArgs[0]);if("bool"===t)return this._encodeBool(e);if("objDesc"===t)return this._encodeStr(e,t);throw new Error("Unsupported tag: "+t)},i.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},i.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(t)}},function(t,e,r){var i=r(89);e.tagClass={0:"universal",1:"application",2:"context",3:"private"},e.tagClassByName=i._reverse(e.tagClass),e.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},e.tagByName=i._reverse(e.tag)},function(t,e,r){var i=e;i.der=r(90),i.pem=r(195)},function(t,e,r){function i(t){o.call(this,t),this.enc="pem"}var n=r(0),a=r(4).Buffer,o=r(90);n(i,o),t.exports=i,i.prototype.decode=function(t,e){for(var r=t.toString().split(/[\r\n]+/g),i=e.label.toUpperCase(),n=/^-----(BEGIN|END) ([^-]+)-----$/,s=-1,f=-1,c=0;c<r.length;c++){var h=r[c].match(n);if(null!==h&&h[2]===i){if(-1!==s){if("END"!==h[1])break;f=c;break}if("BEGIN"!==h[1])break;s=c}}if(-1===s||-1===f)throw new Error("PEM section not found for: "+i);var u=r.slice(s+1,f).join("");u.replace(/[^a-z0-9\+\/=]+/gi,"");var d=new a(u,"base64");return o.prototype.decode.call(this,d,e)}},function(t,e,r){var i=e;i.der=r(91),i.pem=r(197)},function(t,e,r){function i(t){a.call(this,t),this.enc="pem"}var n=r(0),a=r(91);n(i,a),t.exports=i,i.prototype.encode=function(t,e){for(var r=a.prototype.encode.call(this,t),i=r.toString("base64"),n=["-----BEGIN "+e.label+"-----"],o=0;o<i.length;o+=64)n.push(i.slice(o,o+64));return n.push("-----END "+e.label+"-----"),n.join("\n")}},function(t,e,r){"use strict";var i=r(27),n=i.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),a=i.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),o=i.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional())}),s=i.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(o),this.key("subjectPublicKey").bitstr())}),f=i.define("RelativeDistinguishedName",function(){this.setof(a)}),c=i.define("RDNSequence",function(){this.seqof(f)}),h=i.define("Name",function(){this.choice({rdnSequence:this.use(c)})}),u=i.define("Validity",function(){this.seq().obj(this.key("notBefore").use(n),this.key("notAfter").use(n))}),d=i.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),l=i.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int(),this.key("serialNumber").int(),this.key("signature").use(o),this.key("issuer").use(h),this.key("validity").use(u),this.key("subject").use(h),this.key("subjectPublicKeyInfo").use(s),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(d).optional())}),p=i.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(l),this.key("signatureAlgorithm").use(o),this.key("signatureValue").bitstr())});t.exports=p},function(t,e){t.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}},function(t,e,r){(function(e){var i=/Proc-Type: 4,ENCRYPTED\n\r?DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)\n\r?\n\r?([0-9A-z\n\r\+\/\=]+)\n\r?/m,n=/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----\n/m,a=/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----\n\r?([0-9A-z\n\r\+\/\=]+)\n\r?-----END \1-----$/m,o=r(32),s=r(48);t.exports=function(t,r){var f,c=t.toString(),h=c.match(i);if(h){var u="aes"+h[1],d=new e(h[2],"hex"),l=new e(h[3].replace(/\r?\n/g,""),"base64"),p=o(r,d.slice(0,8),parseInt(h[1],10)).key,b=[],g=s.createDecipheriv(u,p,d);b.push(g.update(l)),b.push(g.final()),f=e.concat(b)}else{var v=c.match(a);f=new e(v[2].replace(/\r?\n/g,""),"base64")}return{tag:c.match(n)[1],data:f}}}).call(e,r(4).Buffer)},function(t,e,r){(function(e){function i(t,r,i,o,f){var h=c(i);if("ec"===h.type){if("ecdsa"!==o&&"ecdsa/rsa"!==o)throw new Error("wrong public key type");return n(t,r,h)}if("dsa"===h.type){if("dsa"!==o)throw new Error("wrong public key type");return a(t,r,h)}if("rsa"!==o&&"ecdsa/rsa"!==o)throw new Error("wrong public key type");r=e.concat([f,r]);for(var u=h.modulus.byteLength(),d=[1],l=0;r.length+d.length+2<u;)d.push(255),l++;d.push(0);for(var p=-1;++p<r.length;)d.push(r[p]);d=new e(d);var b=s.mont(h.modulus);t=new s(t).toRed(b),t=t.redPow(new s(h.publicExponent)),t=new e(t.fromRed().toArray());var g=l<8?1:0;for(u=Math.min(t.length,d.length),t.length!==d.length&&(g=1),p=-1;++p<u;)g|=t[p]^d[p];return 0===g}function n(t,e,r){var i=h[r.data.algorithm.curve.join(".")];if(!i)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var n=new f(i),a=r.data.subjectPrivateKey.data;return n.verify(e,t,a)}function a(t,e,r){var i=r.data.p,n=r.data.q,a=r.data.g,f=r.data.pub_key,h=c.signature.decode(t,"der"),u=h.s,d=h.r;o(u,n),o(d,n);var l=s.mont(i),p=u.invm(n);return 0===a.toRed(l).redPow(new s(e).mul(p).mod(n)).fromRed().mul(f.toRed(l).redPow(d.mul(p).mod(n)).fromRed()).mod(i).mod(n).cmp(d)}function o(t,e){if(t.cmpn(0)<=0)throw new Error("invalid sig");if(t.cmp(e)>=e)throw new Error("invalid sig")}var s=r(6),f=r(10).ec,c=r(35),h=r(92);t.exports=i}).call(e,r(4).Buffer)},function(t,e,r){(function(e){function i(t){this.curveType=s[t],this.curveType||(this.curveType={name:t}),this.curve=new a.ec(this.curveType.name),this.keys=void 0}function n(t,r,i){Array.isArray(t)||(t=t.toArray());var n=new e(t);if(i&&n.length<i){var a=new e(i-n.length);a.fill(0),n=e.concat([a,n])}return r?n.toString(r):n}var a=r(10),o=r(6);t.exports=function(t){return new i(t)};var s={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};s.p224=s.secp224r1,s.p256=s.secp256r1=s.prime256v1,s.p192=s.secp192r1=s.prime192v1,s.p384=s.secp384r1,s.p521=s.secp521r1,i.prototype.generateKeys=function(t,e){return this.keys=this.curve.genKeyPair(),this.getPublicKey(t,e)},i.prototype.computeSecret=function(t,r,i){return r=r||"utf8",e.isBuffer(t)||(t=new e(t,r)),n(this.curve.keyFromPublic(t).getPublic().mul(this.keys.getPrivate()).getX(),i,this.curveType.byteLength)},i.prototype.getPublicKey=function(t,e){var r=this.keys.getPublic("compressed"===e,!0);return"hybrid"===e&&(r[r.length-1]%2?r[0]=7:r[0]=6),n(r,t)},i.prototype.getPrivateKey=function(t){return n(this.keys.getPrivate(),t)},i.prototype.setPublicKey=function(t,r){return r=r||"utf8",e.isBuffer(t)||(t=new e(t,r)),this.keys._importPublic(t),this},i.prototype.setPrivateKey=function(t,r){r=r||"utf8",e.isBuffer(t)||(t=new e(t,r));var i=new o(t);return i=i.toString(16),this.keys._importPrivate(i),this}}).call(e,r(4).Buffer)},function(t,e,r){e.publicEncrypt=r(204),e.privateDecrypt=r(205),e.privateEncrypt=function(t,r){return e.publicEncrypt(t,r,!0)},e.publicDecrypt=function(t,r){return e.privateDecrypt(t,r,!0)}},function(t,e,r){(function(e){function i(t,r){var i=t.modulus.byteLength(),n=r.length,a=f("sha1").update(new e("")).digest(),o=a.length,d=2*o;if(n>i-d-2)throw new Error("message too long");var l=new e(i-n-d-2);l.fill(0);var p=i-o-1,b=s(o),g=h(e.concat([a,l,new e([1]),r],p),c(b,p)),v=h(b,c(g,o));return new u(e.concat([new e([0]),v,g],i))}function n(t,r,i){var n=r.length,o=t.modulus.byteLength();if(n>o-11)throw new Error("message too long");var s;return i?(s=new e(o-n-3),s.fill(255)):s=a(o-n-3),new u(e.concat([new e([0,i?1:2]),s,new e([0]),r],o))}function a(t,r){for(var i,n=new e(t),a=0,o=s(2*t),f=0;a<t;)f===o.length&&(o=s(2*t),f=0),(i=o[f++])&&(n[a++]=i);return n}var o=r(35),s=r(19),f=r(23),c=r(93),h=r(94),u=r(6),d=r(95),l=r(51);t.exports=function(t,e,r){var a;a=t.padding?t.padding:r?1:4;var s,f=o(t);if(4===a)s=i(f,e);else if(1===a)s=n(f,e,r);else{if(3!==a)throw new Error("unknown padding");if(s=new u(e),s.cmp(f.modulus)>=0)throw new Error("data too long for modulus")}return r?l(s,f):d(s,f)}}).call(e,r(4).Buffer)},function(t,e,r){(function(e){function i(t,r){var i=(t.modulus,t.modulus.byteLength()),n=(r.length,u("sha1").update(new e("")).digest()),o=n.length;if(0!==r[0])throw new Error("decryption error");var c=r.slice(1,o+1),h=r.slice(o+1),d=f(c,s(h,o)),l=f(h,s(d,i-o-1));if(a(n,l.slice(0,o)))throw new Error("decryption error");for(var p=o;0===l[p];)p++;if(1!==l[p++])throw new Error("decryption error");return l.slice(p)}function n(t,e,r){for(var i=e.slice(0,2),n=2,a=0;0!==e[n++];)if(n>=e.length){a++;break}var o=e.slice(2,n-1);e.slice(n-1,n);if(("0002"!==i.toString("hex")&&!r||"0001"!==i.toString("hex")&&r)&&a++,o.length<8&&a++,a)throw new Error("decryption error");return e.slice(n)}function a(t,r){t=new e(t),r=new e(r);var i=0,n=t.length;t.length!==r.length&&(i++,n=Math.min(t.length,r.length));for(var a=-1;++a<n;)i+=t[a]^r[a];return i}var o=r(35),s=r(93),f=r(94),c=r(6),h=r(51),u=r(23),d=r(95);t.exports=function(t,r,a){var s;s=t.padding?t.padding:a?1:4;var f=o(t),u=f.modulus.byteLength();if(r.length>u||new c(r).cmp(f.modulus)>=0)throw new Error("decryption error");var l;l=a?d(new c(r),f):h(r,f);var p=new e(u-l.length);if(p.fill(0),l=e.concat([p,l],u),4===s)return i(f,l);if(1===s)return n(f,l,a);if(3===s)return l;throw new Error("unknown padding")}}).call(e,r(4).Buffer)},function(t,e,r){"use strict";(function(t,i){function n(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}function a(t,e){if("number"!=typeof t||t!==t)throw new TypeError("offset must be a number");if(t>b||t<0)throw new TypeError("offset must be a uint32");if(t>l||t>e)throw new RangeError("offset out of range")}function o(t,e,r){if("number"!=typeof t||t!==t)throw new TypeError("size must be a number");if(t>b||t<0)throw new TypeError("size must be a uint32");if(t+e>r||t>l)throw new RangeError("buffer too small")}function s(e,r,i,n){if(!(d.isBuffer(e)||e instanceof t.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof r)n=r,r=0,i=e.length;else if("function"==typeof i)n=i,i=e.length-r;else if("function"!=typeof n)throw new TypeError('"cb" argument must be a function');return a(r,e.length),o(i,r,e.length),f(e,r,i,n)}function f(t,e,r,n){if(i.browser){var a=t.buffer,o=new Uint8Array(a,e,r);return p.getRandomValues(o),n?void i.nextTick(function(){n(null,t)}):t}return n?void u(r,function(r,i){if(r)return n(r);i.copy(t,e),n(null,t)}):(u(r).copy(t,e),t)}function c(e,r,i){if(void 0===r&&(r=0),!(d.isBuffer(e)||e instanceof t.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return a(r,e.length),void 0===i&&(i=e.length-r),o(i,r,e.length),f(e,r,i)}var h=r(3),u=r(19),d=h.Buffer,l=h.kMaxLength,p=t.crypto||t.msCrypto,b=Math.pow(2,32)-1;p&&p.getRandomValues||!i.browser?(e.randomFill=s,e.randomFillSync=c):(e.randomFill=n,e.randomFillSync=n)}).call(e,r(13),r(14))},function(t,e,r){!function(i,n){t.exports=e=n(r(1))}(0,function(t){return t.enc.Utf8})},function(t,e,r){"use strict";var i=r(209);e.a=i.a},function(t,e,r){"use strict";r.d(e,"a",function(){return s});var i=r(96),n=r(210),a=r(220),o=r.n(a),s=function(){function t(t){t=t||{},this.default_key_size=t.default_key_size?parseInt(t.default_key_size,10):1024,this.default_public_exponent=t.default_public_exponent||"010001",this.log=t.log||!1,this.key=null}return t.prototype.setKey=function(t){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new n.a(t)},t.prototype.setPrivateKey=function(t){this.setKey(t)},t.prototype.setPublicKey=function(t){this.setKey(t)},t.prototype.decrypt=function(t){try{return this.getKey().decrypt(Object(i.a)(t))}catch(t){return!1}},t.prototype.encrypt=function(t){try{return Object(i.b)(this.getKey().encrypt(t))}catch(t){return!1}},t.prototype.sign=function(t,e,r){try{return Object(i.b)(this.getKey().sign(t,e,r))}catch(t){return!1}},t.prototype.verify=function(t,e,r){try{return this.getKey().verify(t,Object(i.a)(e),r)}catch(t){return!1}},t.prototype.getKey=function(t){if(!this.key){if(this.key=new n.a,t&&"[object Function]"==={}.toString.call(t))return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,t);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},t.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},t.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},t.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},t.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},t.version=o.a.version,t}()},function(t,e,r){"use strict";r.d(e,"a",function(){return u});var i=r(96),n=r(211),a=r(212),o=r(213),s=r(215),f=r(53),c=r(218),h=this&&this.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),u=function(t){function e(r){var i=t.call(this)||this;return r&&("string"==typeof r?i.parseKey(r):(e.hasPrivateKeyProperty(r)||e.hasPublicKeyProperty(r))&&i.parsePropertiesFrom(r)),i}return h(e,t),e.prototype.parseKey=function(t){try{var e=0,r=0,i=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/,s=i.test(t)?n.a.decode(t):a.a.unarmor(t),c=o.a.decode(s);if(3===c.sub.length&&(c=c.sub[2].sub[0]),9===c.sub.length){e=c.sub[1].getHexStringValue(),this.n=Object(f.c)(e,16),r=c.sub[2].getHexStringValue(),this.e=parseInt(r,16);var h=c.sub[3].getHexStringValue();this.d=Object(f.c)(h,16);var u=c.sub[4].getHexStringValue();this.p=Object(f.c)(u,16);var d=c.sub[5].getHexStringValue();this.q=Object(f.c)(d,16);var l=c.sub[6].getHexStringValue();this.dmp1=Object(f.c)(l,16);var p=c.sub[7].getHexStringValue();this.dmq1=Object(f.c)(p,16);var b=c.sub[8].getHexStringValue();this.coeff=Object(f.c)(b,16)}else{if(2!==c.sub.length)return!1;var g=c.sub[1],v=g.sub[0];e=v.sub[0].getHexStringValue(),this.n=Object(f.c)(e,16),r=v.sub[1].getHexStringValue(),this.e=parseInt(r,16)}return!0}catch(t){return!1}},e.prototype.getPrivateBaseKey=function(){var t={array:[new c.a.asn1.DERInteger({int:0}),new c.a.asn1.DERInteger({bigint:this.n}),new c.a.asn1.DERInteger({int:this.e}),new c.a.asn1.DERInteger({bigint:this.d}),new c.a.asn1.DERInteger({bigint:this.p}),new c.a.asn1.DERInteger({bigint:this.q}),new c.a.asn1.DERInteger({bigint:this.dmp1}),new c.a.asn1.DERInteger({bigint:this.dmq1}),new c.a.asn1.DERInteger({bigint:this.coeff})]};return new c.a.asn1.DERSequence(t).getEncodedHex()},e.prototype.getPrivateBaseKeyB64=function(){return Object(i.b)(this.getPrivateBaseKey())},e.prototype.getPublicBaseKey=function(){var t=new c.a.asn1.DERSequence({array:[new c.a.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new c.a.asn1.DERNull]}),e=new c.a.asn1.DERSequence({array:[new c.a.asn1.DERInteger({bigint:this.n}),new c.a.asn1.DERInteger({int:this.e})]}),r=new c.a.asn1.DERBitString({hex:"00"+e.getEncodedHex()});return new c.a.asn1.DERSequence({array:[t,r]}).getEncodedHex()},e.prototype.getPublicBaseKeyB64=function(){return Object(i.b)(this.getPublicBaseKey())},e.wordwrap=function(t,e){if(e=e||64,!t)return t;var r="(.{1,"+e+"})( +|$\n?)|(.{1,"+e+"})";return t.match(RegExp(r,"g")).join("\n")},e.prototype.getPrivateKey=function(){var t="-----BEGIN RSA PRIVATE KEY-----\n";return t+=e.wordwrap(this.getPrivateBaseKeyB64())+"\n",t+="-----END RSA PRIVATE KEY-----"},e.prototype.getPublicKey=function(){var t="-----BEGIN PUBLIC KEY-----\n";return t+=e.wordwrap(this.getPublicBaseKeyB64())+"\n",t+="-----END PUBLIC KEY-----"},e.hasPublicKeyProperty=function(t){return t=t||{},t.hasOwnProperty("n")&&t.hasOwnProperty("e")},e.hasPrivateKeyProperty=function(t){return t=t||{},t.hasOwnProperty("n")&&t.hasOwnProperty("e")&&t.hasOwnProperty("d")&&t.hasOwnProperty("p")&&t.hasOwnProperty("q")&&t.hasOwnProperty("dmp1")&&t.hasOwnProperty("dmq1")&&t.hasOwnProperty("coeff")},e.prototype.parsePropertiesFrom=function(t){this.n=t.n,this.e=t.e,t.hasOwnProperty("d")&&(this.d=t.d,this.p=t.p,this.q=t.q,this.dmp1=t.dmp1,this.dmq1=t.dmq1,this.coeff=t.coeff)},e}(s.a)},function(t,e,r){"use strict";r.d(e,"a",function(){return n});var i,n={decode:function(t){var e;if(void 0===i){var r="0123456789ABCDEF",n=" \f\n\r\t \u2028\u2029";for(i={},e=0;e<16;++e)i[r.charAt(e)]=e;for(r=r.toLowerCase(),e=10;e<16;++e)i[r.charAt(e)]=e;for(e=0;e<n.length;++e)i[n.charAt(e)]=-1}var a=[],o=0,s=0;for(e=0;e<t.length;++e){var f=t.charAt(e);if("="==f)break;if(-1!=(f=i[f])){if(void 0===f)throw new Error("Illegal character at offset "+e);o|=f,++s>=2?(a[a.length]=o,o=0,s=0):o<<=4}}if(s)throw new Error("Hex encoding incomplete: 4 bits missing");return a}}},function(t,e,r){"use strict";r.d(e,"a",function(){return n});var i,n={decode:function(t){var e;if(void 0===i){var r="= \f\n\r\t \u2028\u2029";for(i=Object.create(null),e=0;e<64;++e)i["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e)]=e;for(i["-"]=62,i._=63,e=0;e<r.length;++e)i[r.charAt(e)]=-1}var n=[],a=0,o=0;for(e=0;e<t.length;++e){var s=t.charAt(e);if("="==s)break;if(-1!=(s=i[s])){if(void 0===s)throw new Error("Illegal character at offset "+e);a|=s,++o>=4?(n[n.length]=a>>16,n[n.length]=a>>8&255,n[n.length]=255&a,a=0,o=0):a<<=6}}switch(o){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:n[n.length]=a>>10;break;case 3:n[n.length]=a>>16,n[n.length]=a>>8&255}return n},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(t){var e=n.re.exec(t);if(e)if(e[1])t=e[1];else{if(!e[2])throw new Error("RegExp out of sync");t=e[2]}return n.decode(t)}}},function(t,e,r){"use strict";function i(t,e){return t.length>e&&(t=t.substring(0,e)+a),t}r.d(e,"a",function(){return c});var n=r(214),a="…",o=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,s=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,f=function(){function t(e,r){this.hexDigits="0123456789ABCDEF",e instanceof t?(this.enc=e.enc,this.pos=e.pos):(this.enc=e,this.pos=r)}return t.prototype.get=function(t){if(void 0===t&&(t=this.pos++),t>=this.enc.length)throw new Error("Requesting byte offset "+t+" on a stream of length "+this.enc.length);return"string"==typeof this.enc?this.enc.charCodeAt(t):this.enc[t]},t.prototype.hexByte=function(t){return this.hexDigits.charAt(t>>4&15)+this.hexDigits.charAt(15&t)},t.prototype.hexDump=function(t,e,r){for(var i="",n=t;n<e;++n)if(i+=this.hexByte(this.get(n)),!0!==r)switch(15&n){case 7:i+=" ";break;case 15:i+="\n";break;default:i+=" "}return i},t.prototype.isASCII=function(t,e){for(var r=t;r<e;++r){var i=this.get(r);if(i<32||i>176)return!1}return!0},t.prototype.parseStringISO=function(t,e){for(var r="",i=t;i<e;++i)r+=String.fromCharCode(this.get(i));return r},t.prototype.parseStringUTF=function(t,e){for(var r="",i=t;i<e;){var n=this.get(i++);r+=n<128?String.fromCharCode(n):n>191&&n<224?String.fromCharCode((31&n)<<6|63&this.get(i++)):String.fromCharCode((15&n)<<12|(63&this.get(i++))<<6|63&this.get(i++))}return r},t.prototype.parseStringBMP=function(t,e){for(var r,i,n="",a=t;a<e;)r=this.get(a++),i=this.get(a++),n+=String.fromCharCode(r<<8|i);return n},t.prototype.parseTime=function(t,e,r){var i=this.parseStringISO(t,e),n=(r?o:s).exec(i);return n?(r&&(n[1]=+n[1],n[1]+=+n[1]<70?2e3:1900),i=n[1]+"-"+n[2]+"-"+n[3]+" "+n[4],n[5]&&(i+=":"+n[5],n[6]&&(i+=":"+n[6],n[7]&&(i+="."+n[7]))),n[8]&&(i+=" UTC","Z"!=n[8]&&(i+=n[8],n[9]&&(i+=":"+n[9]))),i):"Unrecognized time: "+i},t.prototype.parseInteger=function(t,e){for(var r,i=this.get(t),a=i>127,o=a?255:0,s="";i==o&&++t<e;)i=this.get(t);if(0===(r=e-t))return a?-1:0;if(r>4){for(s=i,r<<=3;0==(128&(+s^o));)s=+s<<1,--r;s="("+r+" bit)\n"}a&&(i-=256);for(var f=new n.a(i),c=t+1;c<e;++c)f.mulAdd(256,this.get(c));return s+f.toString()},t.prototype.parseBitString=function(t,e,r){for(var n=this.get(t),a=(e-t-1<<3)-n,o="("+a+" bit)\n",s="",f=t+1;f<e;++f){for(var c=this.get(f),h=f==e-1?n:0,u=7;u>=h;--u)s+=c>>u&1?"1":"0";if(s.length>r)return o+i(s,r)}return o+s},t.prototype.parseOctetString=function(t,e,r){if(this.isASCII(t,e))return i(this.parseStringISO(t,e),r);var n=e-t,o="("+n+" byte)\n";r/=2,n>r&&(e=t+r);for(var s=t;s<e;++s)o+=this.hexByte(this.get(s));return n>r&&(o+=a),o},t.prototype.parseOID=function(t,e,r){for(var a="",o=new n.a,s=0,f=t;f<e;++f){var c=this.get(f);if(o.mulAdd(128,127&c),s+=7,!(128&c)){if(""===a)if((o=o.simplify())instanceof n.a)o.sub(80),a="2."+o.toString();else{var h=o<80?o<40?0:1:2;a=h+"."+(o-40*h)}else a+="."+o.toString();if(a.length>r)return i(a,r);o=new n.a,s=0}}return s>0&&(a+=".incomplete"),a},t}(),c=function(){function t(t,e,r,i,n){if(!(i instanceof h))throw new Error("Invalid tag value.");this.stream=t,this.header=e,this.length=r,this.tag=i,this.sub=n}return t.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},t.prototype.content=function(t){if(void 0===this.tag)return null;void 0===t&&(t=1/0);var e=this.posContent(),r=Math.abs(this.length);if(!this.tag.isUniversal())return null!==this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+r,t);switch(this.tag.tagNumber){case 1:return 0===this.stream.get(e)?"false":"true";case 2:return this.stream.parseInteger(e,e+r);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(e,e+r,t);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+r,t);case 6:return this.stream.parseOID(e,e+r,t);case 16:case 17:return null!==this.sub?"("+this.sub.length+" elem)":"(no elem)";case 12:return i(this.stream.parseStringUTF(e,e+r),t);case 18:case 19:case 20:case 21:case 22:case 26:return i(this.stream.parseStringISO(e,e+r),t);case 30:return i(this.stream.parseStringBMP(e,e+r),t);case 23:case 24:return this.stream.parseTime(e,e+r,23==this.tag.tagNumber)}return null},t.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},t.prototype.toPrettyString=function(t){void 0===t&&(t="");var e=t+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(e+="+"),e+=this.length,this.tag.tagConstructed?e+=" (constructed)":!this.tag.isUniversal()||3!=this.tag.tagNumber&&4!=this.tag.tagNumber||null===this.sub||(e+=" (encapsulates)"),e+="\n",null!==this.sub){t+=" ";for(var r=0,i=this.sub.length;r<i;++r)e+=this.sub[r].toPrettyString(t)}return e},t.prototype.posStart=function(){return this.stream.pos},t.prototype.posContent=function(){return this.stream.pos+this.header},t.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},t.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},t.decodeLength=function(t){var e=t.get(),r=127&e;if(r==e)return r;if(r>6)throw new Error("Length over 48 bits not supported at position "+(t.pos-1));if(0===r)return null;e=0;for(var i=0;i<r;++i)e=256*e+t.get();return e},t.prototype.getHexStringValue=function(){var t=this.toHexString(),e=2*this.header,r=2*this.length;return t.substr(e,r)},t.decode=function(e){var r;r=e instanceof f?e:new f(e,0);var i=new f(r),n=new h(r),a=t.decodeLength(r),o=r.pos,s=o-i.pos,c=null,u=function(){var e=[];if(null!==a){for(var i=o+a;r.pos<i;)e[e.length]=t.decode(r);if(r.pos!=i)throw new Error("Content size is not correct for container starting at offset "+o)}else try{for(;;){var n=t.decode(r);if(n.tag.isEOC())break;e[e.length]=n}a=o-r.pos}catch(t){throw new Error("Exception while decoding undefined length content: "+t)}return e};if(n.tagConstructed)c=u();else if(n.isUniversal()&&(3==n.tagNumber||4==n.tagNumber))try{if(3==n.tagNumber&&0!=r.get())throw new Error("BIT STRINGs with unused bits cannot encapsulate.");c=u();for(var d=0;d<c.length;++d)if(c[d].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch(t){c=null}if(null===c){if(null===a)throw new Error("We can't skip over an invalid tag with undefined length at offset "+o);r.pos=o+Math.abs(a)}return new t(i,s,a,n,c)},t}(),h=function(){function t(t){var e=t.get();if(this.tagClass=e>>6,this.tagConstructed=0!=(32&e),this.tagNumber=31&e,31==this.tagNumber){var r=new n.a;do{e=t.get(),r.mulAdd(128,127&e)}while(128&e);this.tagNumber=r.simplify()}}return t.prototype.isUniversal=function(){return 0===this.tagClass},t.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},t}()},function(t,e,r){"use strict";r.d(e,"a",function(){return i});var i=function(){function t(t){this.buf=[+t||0]}return t.prototype.mulAdd=function(t,e){var r,i,n=this.buf,a=n.length;for(r=0;r<a;++r)i=n[r]*t+e,i<1e13?e=0:(e=0|i/1e13,i-=1e13*e),n[r]=i;e>0&&(n[r]=e)},t.prototype.sub=function(t){var e,r,i=this.buf,n=i.length;for(e=0;e<n;++e)r=i[e]-t,r<0?(r+=1e13,t=1):t=0,i[e]=r;for(;0===i[i.length-1];)i.pop()},t.prototype.toString=function(t){if(10!=(t||10))throw new Error("only base 10 is supported");for(var e=this.buf,r=e[e.length-1].toString(),i=e.length-2;i>=0;--i)r+=(1e13+e[i]).toString().substring(1);return r},t.prototype.valueOf=function(){for(var t=this.buf,e=0,r=t.length-1;r>=0;--r)e=1e13*e+t[r];return e},t.prototype.simplify=function(){var t=this.buf;return 1==t.length?t[0]:this},t}()},function(t,e,r){"use strict";function i(t,e){if(e<t.length+22)return console.error("Message too long for RSA"),null;for(var r=e-t.length-6,i="",n=0;n<r;n+=2)i+="ff";var a="0001"+i+"00"+t;return Object(f.c)(a,16)}function n(t,e){if(e<t.length+11)return console.error("Message too long for RSA"),null;for(var r=[],i=t.length-1;i>=0&&e>0;){var n=t.charCodeAt(i--);n<128?r[--e]=n:n>127&&n<2048?(r[--e]=63&n|128,r[--e]=n>>6|192):(r[--e]=63&n|128,r[--e]=n>>6&63|128,r[--e]=n>>12|224)}r[--e]=0;for(var a=new c.a,o=[];e>2;){for(o[0]=0;0==o[0];)a.nextBytes(o);r[--e]=o[0]}return r[--e]=2,r[--e]=0,new f.a(r)}function a(t,e){for(var r=t.toByteArray(),i=0;i<r.length&&0==r[i];)++i;if(r.length-i!=e-1||2!=r[i])return null;for(++i;0!=r[i];)if(++i>=r.length)return null;for(var n="";++i<r.length;){var a=255&r[i];a<128?n+=String.fromCharCode(a):a>191&&a<224?(n+=String.fromCharCode((31&a)<<6|63&r[i+1]),++i):(n+=String.fromCharCode((15&a)<<12|(63&r[i+1])<<6|63&r[i+2]),i+=2)}return n}function o(t){return u[t]||""}function s(t){for(var e in u)if(u.hasOwnProperty(e)){var r=u[e],i=r.length;if(t.substr(0,i)==r)return t.substr(i)}return t}r.d(e,"a",function(){return h});var f=r(53),c=r(216),h=function(){function t(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return t.prototype.doPublic=function(t){return t.modPowInt(this.e,this.n)},t.prototype.doPrivate=function(t){if(null==this.p||null==this.q)return t.modPow(this.d,this.n);for(var e=t.mod(this.p).modPow(this.dmp1,this.p),r=t.mod(this.q).modPow(this.dmq1,this.q);e.compareTo(r)<0;)e=e.add(this.p);return e.subtract(r).multiply(this.coeff).mod(this.p).multiply(this.q).add(r)},t.prototype.setPublic=function(t,e){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=Object(f.c)(t,16),this.e=parseInt(e,16)):console.error("Invalid RSA public key")},t.prototype.encrypt=function(t){var e=this.n.bitLength()+7>>3,r=n(t,e);if(null==r)return null;var i=this.doPublic(r);if(null==i)return null;for(var a=i.toString(16),o=a.length,s=0;s<2*e-o;s++)a="0"+a;return a},t.prototype.setPrivate=function(t,e,r){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=Object(f.c)(t,16),this.e=parseInt(e,16),this.d=Object(f.c)(r,16)):console.error("Invalid RSA private key")},t.prototype.setPrivateEx=function(t,e,r,i,n,a,o,s){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=Object(f.c)(t,16),this.e=parseInt(e,16),this.d=Object(f.c)(r,16),this.p=Object(f.c)(i,16),this.q=Object(f.c)(n,16),this.dmp1=Object(f.c)(a,16),this.dmq1=Object(f.c)(o,16),this.coeff=Object(f.c)(s,16)):console.error("Invalid RSA private key")},t.prototype.generate=function(t,e){var r=new c.a,i=t>>1;this.e=parseInt(e,16);for(var n=new f.a(e,16);;){for(;this.p=new f.a(t-i,1,r),0!=this.p.subtract(f.a.ONE).gcd(n).compareTo(f.a.ONE)||!this.p.isProbablePrime(10););for(;this.q=new f.a(i,1,r),0!=this.q.subtract(f.a.ONE).gcd(n).compareTo(f.a.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var a=this.p;this.p=this.q,this.q=a}var o=this.p.subtract(f.a.ONE),s=this.q.subtract(f.a.ONE),h=o.multiply(s);if(0==h.gcd(n).compareTo(f.a.ONE)){this.n=this.p.multiply(this.q),this.d=n.modInverse(h),this.dmp1=this.d.mod(o),this.dmq1=this.d.mod(s),this.coeff=this.q.modInverse(this.p);break}}},t.prototype.decrypt=function(t){var e=Object(f.c)(t,16),r=this.doPrivate(e);return null==r?null:a(r,this.n.bitLength()+7>>3)},t.prototype.generateAsync=function(t,e,r){var i=new c.a,n=t>>1;this.e=parseInt(e,16);var a=new f.a(e,16),o=this,s=function(){var e=function(){if(o.p.compareTo(o.q)<=0){var t=o.p;o.p=o.q,o.q=t}var e=o.p.subtract(f.a.ONE),i=o.q.subtract(f.a.ONE),n=e.multiply(i);0==n.gcd(a).compareTo(f.a.ONE)?(o.n=o.p.multiply(o.q),o.d=a.modInverse(n),o.dmp1=o.d.mod(e),o.dmq1=o.d.mod(i),o.coeff=o.q.modInverse(o.p),setTimeout(function(){r()},0)):setTimeout(s,0)},c=function(){o.q=Object(f.b)(),o.q.fromNumberAsync(n,1,i,function(){o.q.subtract(f.a.ONE).gcda(a,function(t){0==t.compareTo(f.a.ONE)&&o.q.isProbablePrime(10)?setTimeout(e,0):setTimeout(c,0)})})},h=function(){o.p=Object(f.b)(),o.p.fromNumberAsync(t-n,1,i,function(){o.p.subtract(f.a.ONE).gcda(a,function(t){0==t.compareTo(f.a.ONE)&&o.p.isProbablePrime(10)?setTimeout(c,0):setTimeout(h,0)})})};setTimeout(h,0)};setTimeout(s,0)},t.prototype.sign=function(t,e,r){var n=o(r),a=n+e(t).toString(),s=i(a,this.n.bitLength()/4);if(null==s)return null;var f=this.doPrivate(s);if(null==f)return null;var c=f.toString(16);return 0==(1&c.length)?c:"0"+c},t.prototype.verify=function(t,e,r){var i=Object(f.c)(e,16),n=this.doPublic(i);return null==n?null:s(n.toString(16).replace(/^1f+00/,""))==r(t).toString()},t}(),u={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"}},function(t,e,r){"use strict";function i(){if(null==n){for(n=Object(o.a)();a<o.b;){var t=Math.floor(65536*Math.random());s[a++]=255&t}for(n.init(s),a=0;a<s.length;++a)s[a]=0;a=0}return n.next()}r.d(e,"a",function(){return d});var n,a,o=r(217),s=null;if(null==s){s=[],a=0;var f=void 0;if(window.crypto&&window.crypto.getRandomValues){var c=new Uint32Array(256);for(window.crypto.getRandomValues(c),f=0;f<c.length;++f)s[a++]=255&c[f]}var h=0,u=function(t){if((h=h||0)>=256||a>=o.b)return void(window.removeEventListener?window.removeEventListener("mousemove",u,!1):window.detachEvent&&window.detachEvent("onmousemove",u));try{var e=t.x+t.y;s[a++]=255&e,h+=1}catch(t){}};window.addEventListener?window.addEventListener("mousemove",u,!1):window.attachEvent&&window.attachEvent("onmousemove",u)}var d=function(){function t(){}return t.prototype.nextBytes=function(t){for(var e=0;e<t.length;++e)t[e]=i()},t}()},function(t,e,r){"use strict";function i(){return new n}e.a=i,r.d(e,"b",function(){return a});var n=function(){function t(){this.i=0,this.j=0,this.S=[]}return t.prototype.init=function(t){var e,r,i;for(e=0;e<256;++e)this.S[e]=e;for(r=0,e=0;e<256;++e)r=r+this.S[e]+t[e%t.length]&255,i=this.S[e],this.S[e]=this.S[r],this.S[r]=i;this.i=0,this.j=0},t.prototype.next=function(){var t;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,t=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]},t}(),a=256},function(t,e,r){"use strict";r.d(e,"a",function(){return a});var i=r(53),n=r(219),a={};void 0!==a.asn1&&a.asn1||(a.asn1={}),a.asn1.ASN1Util=new function(){this.integerToByteHex=function(t){var e=t.toString(16);return e.length%2==1&&(e="0"+e),e},this.bigIntToMinTwosComplementsHex=function(t){var e=t.toString(16);if("-"!=e.substr(0,1))e.length%2==1?e="0"+e:e.match(/^[0-7]/)||(e="00"+e);else{var r=e.substr(1),n=r.length;n%2==1?n+=1:e.match(/^[0-7]/)||(n+=2);for(var a="",o=0;o<n;o++)a+="f";e=new i.a(a,16).xor(t).add(i.a.ONE).toString(16).replace(/^-/,"")}return e},this.getPEMStringFromHex=function(t,e){return hextopem(t,e)},this.newObject=function(t){var e=a,r=e.asn1,i=r.DERBoolean,n=r.DERInteger,o=r.DERBitString,s=r.DEROctetString,f=r.DERNull,c=r.DERObjectIdentifier,h=r.DEREnumerated,u=r.DERUTF8String,d=r.DERNumericString,l=r.DERPrintableString,p=r.DERTeletexString,b=r.DERIA5String,g=r.DERUTCTime,v=r.DERGeneralizedTime,y=r.DERSequence,m=r.DERSet,_=r.DERTaggedObject,w=r.ASN1Util.newObject,S=Object.keys(t);if(1!=S.length)throw"key of param shall be only one.";var E=S[0];if(-1==":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+E+":"))throw"undefined key: "+E;if("bool"==E)return new i(t[E]);if("int"==E)return new n(t[E]);if("bitstr"==E)return new o(t[E]);if("octstr"==E)return new s(t[E]);if("null"==E)return new f(t[E]);if("oid"==E)return new c(t[E]);if("enum"==E)return new h(t[E]);if("utf8str"==E)return new u(t[E]);if("numstr"==E)return new d(t[E]);if("prnstr"==E)return new l(t[E]);if("telstr"==E)return new p(t[E]);if("ia5str"==E)return new b(t[E]);if("utctime"==E)return new g(t[E]);if("gentime"==E)return new v(t[E]);if("seq"==E){for(var A=t[E],T=[],R=0;R<A.length;R++){var k=w(A[R]);T.push(k)}return new y({array:T})}if("set"==E){for(var A=t[E],T=[],R=0;R<A.length;R++){var k=w(A[R]);T.push(k)}return new m({array:T})}if("tag"==E){var D=t[E];if("[object Array]"===Object.prototype.toString.call(D)&&3==D.length){var I=w(D[2]);return new _({tag:D[0],explicit:D[1],obj:I})}var M={};if(void 0!==D.explicit&&(M.explicit=D.explicit),void 0!==D.tag&&(M.tag=D.tag),void 0===D.obj)throw"obj shall be specified for 'tag'.";return M.obj=w(D.obj),new _(M)}},this.jsonToASN1HEX=function(t){return this.newObject(t).getEncodedHex()}},a.asn1.ASN1Util.oidHexToInt=function(t){for(var e="",r=parseInt(t.substr(0,2),16),n=Math.floor(r/40),a=r%40,e=n+"."+a,o="",s=2;s<t.length;s+=2){var f=parseInt(t.substr(s,2),16),c=("00000000"+f.toString(2)).slice(-8);if(o+=c.substr(1,7),"0"==c.substr(0,1)){e=e+"."+new i.a(o,2).toString(10),o=""}}return e},a.asn1.ASN1Util.oidIntToHex=function(t){var e=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e};if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var r="",n=t.split("."),a=40*parseInt(n[0])+parseInt(n[1]);r+=e(a),n.splice(0,2);for(var o=0;o<n.length;o++)r+=function(t){var r="",n=new i.a(t,10),a=n.toString(2),o=7-a.length%7;7==o&&(o=0);for(var s="",f=0;f<o;f++)s+="0";a=s+a;for(var f=0;f<a.length-1;f+=7){var c=a.substr(f,7);f!=a.length-7&&(c="1"+c),r+=e(parseInt(c,2))}return r}(n[o]);return r},a.asn1.ASN1Object=function(){this.getLengthHexFromValue=function(){if(void 0===this.hV||null==this.hV)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n="+"".length+",v="+this.hV;var t=this.hV.length/2,e=t.toString(16);if(e.length%2==1&&(e="0"+e),t<128)return e;var r=e.length/2;if(r>15)throw"ASN.1 length too long to represent by 8x: n = "+t.toString(16);return(128+r).toString(16)+e},this.getEncodedHex=function(){return(null==this.hTLV||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},a.asn1.DERAbstractString=function(t){a.asn1.DERAbstractString.superclass.constructor.call(this);this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(this.s)},this.setStringHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?this.setString(t):void 0!==t.str?this.setString(t.str):void 0!==t.hex&&this.setStringHex(t.hex))},n.a.lang.extend(a.asn1.DERAbstractString,a.asn1.ASN1Object),a.asn1.DERAbstractTime=function(t){a.asn1.DERAbstractTime.superclass.constructor.call(this);this.localDateToUTC=function(t){return utc=t.getTime()+6e4*t.getTimezoneOffset(),new Date(utc)},this.formatDate=function(t,e,r){var i=this.zeroPadding,n=this.localDateToUTC(t),a=String(n.getFullYear());"utc"==e&&(a=a.substr(2,2));var o=i(String(n.getMonth()+1),2),s=i(String(n.getDate()),2),f=i(String(n.getHours()),2),c=i(String(n.getMinutes()),2),h=i(String(n.getSeconds()),2),u=a+o+s+f+c+h;if(!0===r){var d=n.getMilliseconds();if(0!=d){var l=i(String(d),3);l=l.replace(/[0]+$/,""),u=u+"."+l}}return u+"Z"},this.zeroPadding=function(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t},this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(t)},this.setByDateValue=function(t,e,r,i,n,a){var o=new Date(Date.UTC(t,e-1,r,i,n,a,0));this.setByDate(o)},this.getFreshValueHex=function(){return this.hV}},n.a.lang.extend(a.asn1.DERAbstractTime,a.asn1.ASN1Object),a.asn1.DERAbstractStructured=function(t){a.asn1.DERAbstractString.superclass.constructor.call(this);this.setByASN1ObjectArray=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array=t},this.appendASN1Object=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array.push(t)},this.asn1Array=new Array,void 0!==t&&void 0!==t.array&&(this.asn1Array=t.array)},n.a.lang.extend(a.asn1.DERAbstractStructured,a.asn1.ASN1Object),a.asn1.DERBoolean=function(){a.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},n.a.lang.extend(a.asn1.DERBoolean,a.asn1.ASN1Object),a.asn1.DERInteger=function(t){a.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=a.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new i.a(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.bigint?this.setByBigInteger(t.bigint):void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},n.a.lang.extend(a.asn1.DERInteger,a.asn1.ASN1Object),a.asn1.DERBitString=function(t){if(void 0!==t&&void 0!==t.obj){var e=a.asn1.ASN1Util.newObject(t.obj);t.hex="00"+e.getEncodedHex()}a.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(t){this.hTLV=null,this.isModified=!0,this.hV=t},this.setUnusedBitsAndHexValue=function(t,e){if(t<0||7<t)throw"unused bits shall be from 0 to 7: u = "+t;var r="0"+t;this.hTLV=null,this.isModified=!0,this.hV=r+e},this.setByBinaryString=function(t){t=t.replace(/0+$/,"");var e=8-t.length%8;8==e&&(e=0);for(var r=0;r<=e;r++)t+="0";for(var i="",r=0;r<t.length-1;r+=8){var n=t.substr(r,8),a=parseInt(n,2).toString(16);1==a.length&&(a="0"+a),i+=a}this.hTLV=null,this.isModified=!0,this.hV="0"+e+i},this.setByBooleanArray=function(t){for(var e="",r=0;r<t.length;r++)1==t[r]?e+="1":e+="0";this.setByBinaryString(e)},this.newFalseArray=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=!1;return e},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t&&t.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(t):void 0!==t.hex?this.setHexValueIncludingUnusedBits(t.hex):void 0!==t.bin?this.setByBinaryString(t.bin):void 0!==t.array&&this.setByBooleanArray(t.array))},n.a.lang.extend(a.asn1.DERBitString,a.asn1.ASN1Object),a.asn1.DEROctetString=function(t){if(void 0!==t&&void 0!==t.obj){var e=a.asn1.ASN1Util.newObject(t.obj);t.hex=e.getEncodedHex()}a.asn1.DEROctetString.superclass.constructor.call(this,t),this.hT="04"},n.a.lang.extend(a.asn1.DEROctetString,a.asn1.DERAbstractString),a.asn1.DERNull=function(){a.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},n.a.lang.extend(a.asn1.DERNull,a.asn1.ASN1Object),a.asn1.DERObjectIdentifier=function(t){var e=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},r=function(t){var r="",n=new i.a(t,10),a=n.toString(2),o=7-a.length%7;7==o&&(o=0);for(var s="",f=0;f<o;f++)s+="0";a=s+a;for(var f=0;f<a.length-1;f+=7){var c=a.substr(f,7);f!=a.length-7&&(c="1"+c),r+=e(parseInt(c,2))}return r};a.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.setValueOidString=function(t){if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var i="",n=t.split("."),a=40*parseInt(n[0])+parseInt(n[1]);i+=e(a),n.splice(0,2);for(var o=0;o<n.length;o++)i+=r(n[o]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=i},this.setValueName=function(t){var e=a.asn1.x509.OID.name2oid(t);if(""===e)throw"DERObjectIdentifier oidName undefined: "+t;this.setValueOidString(e)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?t.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(t):this.setValueName(t):void 0!==t.oid?this.setValueOidString(t.oid):void 0!==t.hex?this.setValueHex(t.hex):void 0!==t.name&&this.setValueName(t.name))},n.a.lang.extend(a.asn1.DERObjectIdentifier,a.asn1.ASN1Object),a.asn1.DEREnumerated=function(t){a.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=a.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new i.a(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},n.a.lang.extend(a.asn1.DEREnumerated,a.asn1.ASN1Object),a.asn1.DERUTF8String=function(t){a.asn1.DERUTF8String.superclass.constructor.call(this,t),this.hT="0c"},n.a.lang.extend(a.asn1.DERUTF8String,a.asn1.DERAbstractString),a.asn1.DERNumericString=function(t){a.asn1.DERNumericString.superclass.constructor.call(this,t),this.hT="12"},n.a.lang.extend(a.asn1.DERNumericString,a.asn1.DERAbstractString),a.asn1.DERPrintableString=function(t){a.asn1.DERPrintableString.superclass.constructor.call(this,t),this.hT="13"},n.a.lang.extend(a.asn1.DERPrintableString,a.asn1.DERAbstractString),a.asn1.DERTeletexString=function(t){a.asn1.DERTeletexString.superclass.constructor.call(this,t),this.hT="14"},n.a.lang.extend(a.asn1.DERTeletexString,a.asn1.DERAbstractString),a.asn1.DERIA5String=function(t){a.asn1.DERIA5String.superclass.constructor.call(this,t),this.hT="16"},n.a.lang.extend(a.asn1.DERIA5String,a.asn1.DERAbstractString),a.asn1.DERUTCTime=function(t){a.asn1.DERUTCTime.superclass.constructor.call(this,t),this.hT="17",this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},void 0!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{12}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date))},n.a.lang.extend(a.asn1.DERUTCTime,a.asn1.DERAbstractTime),a.asn1.DERGeneralizedTime=function(t){a.asn1.DERGeneralizedTime.superclass.constructor.call(this,t),this.hT="18",this.withMillis=!1,this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},void 0!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{14}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date),!0===t.millis&&(this.withMillis=!0))},n.a.lang.extend(a.asn1.DERGeneralizedTime,a.asn1.DERAbstractTime),a.asn1.DERSequence=function(t){a.asn1.DERSequence.superclass.constructor.call(this,t),this.hT="30",this.getFreshValueHex=function(){for(var t="",e=0;e<this.asn1Array.length;e++){t+=this.asn1Array[e].getEncodedHex()}return this.hV=t,this.hV}},n.a.lang.extend(a.asn1.DERSequence,a.asn1.DERAbstractStructured),a.asn1.DERSet=function(t){a.asn1.DERSet.superclass.constructor.call(this,t),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var t=new Array,e=0;e<this.asn1Array.length;e++){var r=this.asn1Array[e];t.push(r.getEncodedHex())}return 1==this.sortFlag&&t.sort(),this.hV=t.join(""),this.hV},void 0!==t&&void 0!==t.sortflag&&0==t.sortflag&&(this.sortFlag=!1)},n.a.lang.extend(a.asn1.DERSet,a.asn1.DERAbstractStructured),a.asn1.DERTaggedObject=function(t){a.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(t,e,r){this.hT=e,this.isExplicit=t,this.asn1Object=r,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=r.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,e),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.tag&&(this.hT=t.tag),void 0!==t.explicit&&(this.isExplicit=t.explicit),void 0!==t.obj&&(this.asn1Object=t.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},n.a.lang.extend(a.asn1.DERTaggedObject,a.asn1.ASN1Object)},function(t,e,r){"use strict";r.d(e,"a",function(){return i});/*!
  9. Copyright (c) 2011, Yahoo! Inc. All rights reserved.
  10. Code licensed under the BSD License:
  11. http://developer.yahoo.com/yui/license.html
  12. version: 2.9.0
  13. */
  14. var i={};i.lang={extend:function(t,e,r){if(!e||!t)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var i=function(){};if(i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t,t.superclass=e.prototype,e.prototype.constructor==Object.prototype.constructor&&(e.prototype.constructor=e),r){var n;for(n in r)t.prototype[n]=r[n];var a=function(){},o=["toString","valueOf"];try{/MSIE/.test(navigator.userAgent)&&(a=function(t,e){for(n=0;n<o.length;n+=1){var r=o[n],i=e[r];"function"==typeof i&&i!=Object.prototype[r]&&(t[r]=i)}})}catch(t){}a(t.prototype,r)}}}},function(t,e){t.exports={version:"3.2.0"}},function(t,e,r){!function(i,n,a){t.exports=e=n(r(1),r(38),r(222),r(223),r(17),r(22),r(36),r(98),r(224),r(99),r(225),r(226),r(227),r(37),r(228),r(18),r(8),r(229),r(230),r(231),r(232),r(233),r(234),r(235),r(236),r(237),r(238),r(239),r(240),r(241),r(242),r(243),r(244))}(0,function(t){return t})},function(t,e,r){!function(i,n){t.exports=e=n(r(1))}(0,function(t){return function(){if("function"==typeof ArrayBuffer){var e=t,r=e.lib,i=r.WordArray,n=i.init;(i.init=function(t){if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),(t instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),t instanceof Uint8Array){for(var e=t.byteLength,r=[],i=0;i<e;i++)r[i>>>2]|=t[i]<<24-i%4*8;n.call(this,r,e)}else n.apply(this,arguments)}).prototype=i}}(),t.lib.WordArray})},function(t,e,r){!function(i,n){t.exports=e=n(r(1))}(0,function(t){return function(){function e(t){return t<<8&4278255360|t>>>8&16711935}var r=t,i=r.lib,n=i.WordArray,a=r.enc;a.Utf16=a.Utf16BE={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;n<r;n+=2){var a=e[n>>>2]>>>16-n%4*8&65535;i.push(String.fromCharCode(a))}return i.join("")},parse:function(t){for(var e=t.length,r=[],i=0;i<e;i++)r[i>>>1]|=t.charCodeAt(i)<<16-i%2*16;return n.create(r,2*e)}};a.Utf16LE={stringify:function(t){for(var r=t.words,i=t.sigBytes,n=[],a=0;a<i;a+=2){var o=e(r[a>>>2]>>>16-a%4*8&65535);n.push(String.fromCharCode(o))}return n.join("")},parse:function(t){for(var r=t.length,i=[],a=0;a<r;a++)i[a>>>1]|=e(t.charCodeAt(a)<<16-a%2*16);return n.create(i,2*r)}}}(),t.enc.Utf16})},function(t,e,r){!function(i,n,a){t.exports=e=n(r(1),r(98))}(0,function(t){return function(){var e=t,r=e.lib,i=r.WordArray,n=e.algo,a=n.SHA256,o=n.SHA224=a.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var t=a._doFinalize.call(this);return t.sigBytes-=4,t}});e.SHA224=a._createHelper(o),e.HmacSHA224=a._createHmacHelper(o)}(),t.SHA224})},function(t,e,r){!function(i,n,a){t.exports=e=n(r(1),r(38),r(99))}(0,function(t){return function(){var e=t,r=e.x64,i=r.Word,n=r.WordArray,a=e.algo,o=a.SHA512,s=a.SHA384=o.extend({_doReset:function(){this._hash=new n.init([new i.init(3418070365,3238371032),new i.init(1654270250,914150663),new i.init(2438529370,812702999),new i.init(355462360,4144912697),new i.init(1731405415,4290775857),new i.init(2394180231,1750603025),new i.init(3675008525,1694076839),new i.init(1203062813,3204075428)])},_doFinalize:function(){var t=o._doFinalize.call(this);return t.sigBytes-=16,t}});e.SHA384=o._createHelper(s),e.HmacSHA384=o._createHmacHelper(s)}(),t.SHA384})},function(t,e,r){!function(i,n,a){t.exports=e=n(r(1),r(38))}(0,function(t){return function(e){var r=t,i=r.lib,n=i.WordArray,a=i.Hasher,o=r.x64,s=o.Word,f=r.algo,c=[],h=[],u=[];!function(){for(var t=1,e=0,r=0;r<24;r++){c[t+5*e]=(r+1)*(r+2)/2%64;var i=e%5,n=(2*t+3*e)%5;t=i,e=n}for(var t=0;t<5;t++)for(var e=0;e<5;e++)h[t+5*e]=e+(2*t+3*e)%5*5;for(var a=1,o=0;o<24;o++){for(var f=0,d=0,l=0;l<7;l++){if(1&a){var p=(1<<l)-1;p<32?d^=1<<p:f^=1<<p-32}128&a?a=a<<1^113:a<<=1}u[o]=s.create(f,d)}}();var d=[];!function(){for(var t=0;t<25;t++)d[t]=s.create()}();var l=f.SHA3=a.extend({cfg:a.cfg.extend({outputLength:512}),_doReset:function(){for(var t=this._state=[],e=0;e<25;e++)t[e]=new s.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(t,e){for(var r=this._state,i=this.blockSize/2,n=0;n<i;n++){var a=t[e+2*n],o=t[e+2*n+1];a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8);var s=r[n];s.high^=o,s.low^=a}for(var f=0;f<24;f++){for(var l=0;l<5;l++){for(var p=0,b=0,g=0;g<5;g++){var s=r[l+5*g];p^=s.high,b^=s.low}var v=d[l];v.high=p,v.low=b}for(var l=0;l<5;l++)for(var y=d[(l+4)%5],m=d[(l+1)%5],_=m.high,w=m.low,p=y.high^(_<<1|w>>>31),b=y.low^(w<<1|_>>>31),g=0;g<5;g++){var s=r[l+5*g];s.high^=p,s.low^=b}for(var S=1;S<25;S++){var p,b,s=r[S],E=s.high,A=s.low,T=c[S];T<32?(p=E<<T|A>>>32-T,b=A<<T|E>>>32-T):(p=A<<T-32|E>>>64-T,b=E<<T-32|A>>>64-T);var R=d[h[S]];R.high=p,R.low=b}var k=d[0],D=r[0];k.high=D.high,k.low=D.low;for(var l=0;l<5;l++)for(var g=0;g<5;g++){var S=l+5*g,s=r[S],I=d[S],M=d[(l+1)%5+5*g],x=d[(l+2)%5+5*g];s.high=I.high^~M.high&x.high,s.low=I.low^~M.low&x.low}var s=r[0],L=u[f];s.high^=L.high,s.low^=L.low}},_doFinalize:function(){var t=this._data,r=t.words,i=(this._nDataBytes,8*t.sigBytes),a=32*this.blockSize;r[i>>>5]|=1<<24-i%32,r[(e.ceil((i+1)/a)*a>>>5)-1]|=128,t.sigBytes=4*r.length,this._process();for(var o=this._state,s=this.cfg.outputLength/8,f=s/8,c=[],h=0;h<f;h++){var u=o[h],d=u.high,l=u.low;d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),l=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8),c.push(l),c.push(d)}return new n.init(c,s)},clone:function(){for(var t=a.clone.call(this),e=t._state=this._state.slice(0),r=0;r<25;r++)e[r]=e[r].clone();return t}});r.SHA3=a._createHelper(l),r.HmacSHA3=a._createHmacHelper(l)}(Math),t.SHA3})},function(t,e,r){!function(i,n){t.exports=e=n(r(1))}(0,function(t){/** @preserve
  15. (c) 2012 by Cédric Mesnil. All rights reserved.
  16. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
  17. - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  18. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  19. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  20. */
  21. return function(e){function r(t,e,r){return t^e^r}function i(t,e,r){return t&e|~t&r}function n(t,e,r){return(t|~e)^r}function a(t,e,r){return t&r|e&~r}function o(t,e,r){return t^(e|~r)}function s(t,e){return t<<e|t>>>32-e}var f=t,c=f.lib,h=c.WordArray,u=c.Hasher,d=f.algo,l=h.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),p=h.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),b=h.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),g=h.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),v=h.create([0,1518500249,1859775393,2400959708,2840853838]),y=h.create([1352829926,1548603684,1836072691,2053994217,0]),m=d.RIPEMD160=u.extend({_doReset:function(){this._hash=h.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var f=0;f<16;f++){var c=e+f,h=t[c];t[c]=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8)}var u,d,m,_,w,S,E,A,T,R,k=this._hash.words,D=v.words,I=y.words,M=l.words,x=p.words,L=b.words,O=g.words;S=u=k[0],E=d=k[1],A=m=k[2],T=_=k[3],R=w=k[4];for(var C,f=0;f<80;f+=1)C=u+t[e+M[f]]|0,C+=f<16?r(d,m,_)+D[0]:f<32?i(d,m,_)+D[1]:f<48?n(d,m,_)+D[2]:f<64?a(d,m,_)+D[3]:o(d,m,_)+D[4],C|=0,C=s(C,L[f]),C=C+w|0,u=w,w=_,_=s(m,10),m=d,d=C,C=S+t[e+x[f]]|0,C+=f<16?o(E,A,T)+I[0]:f<32?a(E,A,T)+I[1]:f<48?n(E,A,T)+I[2]:f<64?i(E,A,T)+I[3]:r(E,A,T)+I[4],C|=0,C=s(C,O[f]),C=C+R|0,S=R,R=T,T=s(A,10),A=E,E=C;C=k[1]+m+T|0,k[1]=k[2]+_+R|0,k[2]=k[3]+w+S|0,k[3]=k[4]+u+E|0,k[4]=k[0]+d+A|0,k[0]=C},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;e[i>>>5]|=128<<24-i%32,e[14+(i+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),t.sigBytes=4*(e.length+1),this._process();for(var n=this._hash,a=n.words,o=0;o<5;o++){var s=a[o];a[o]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return n},clone:function(){var t=u.clone.call(this);return t._hash=this._hash.clone(),t}});f.RIPEMD160=u._createHelper(m),f.HmacRIPEMD160=u._createHmacHelper(m)}(Math),t.RIPEMD160})},function(t,e,r){!function(i,n,a){t.exports=e=n(r(1),r(36),r(37))}(0,function(t){return function(){var e=t,r=e.lib,i=r.Base,n=r.WordArray,a=e.algo,o=a.SHA1,s=a.HMAC,f=a.PBKDF2=i.extend({cfg:i.extend({keySize:4,hasher:o,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var r=this.cfg,i=s.create(r.hasher,t),a=n.create(),o=n.create([1]),f=a.words,c=o.words,h=r.keySize,u=r.iterations;f.length<h;){var d=i.update(e).finalize(o);i.reset();for(var l=d.words,p=l.length,b=d,g=1;g<u;g++){b=i.finalize(b),i.reset();for(var v=b.words,y=0;y<p;y++)l[y]^=v[y]}a.concat(d),c[0]++}return a.sigBytes=4*h,a}});e.PBKDF2=function(t,e,r){return f.create(r).compute(t,e)}}(),t.PBKDF2})},function(t,e,r){!function(i,n,a){t.exports=e=n(r(1),r(8))}(0,function(t){return t.mode.CFB=function(){function e(t,e,r,i){var n,a=this._iv;a?(n=a.slice(0),this._iv=void 0):n=this._prevBlock,i.encryptBlock(n,0);for(var o=0;o<r;o++)t[e+o]^=n[o]}var r=t.lib.BlockCipherMode.extend();return r.Encryptor=r.extend({processBlock:function(t,r){var i=this._cipher,n=i.blockSize;e.call(this,t,r,n,i),this._prevBlock=t.slice(r,r+n)}}),r.Decryptor=r.extend({processBlock:function(t,r){var i=this._cipher,n=i.blockSize,a=t.slice(r,r+n);e.call(this,t,r,n,i),this._prevBlock=a}}),r}(),t.mode.CFB})},function(t,e,r){!function(i,n,a){t.exports=e=n(r(1),r(8))}(0,function(t){return t.mode.CTR=function(){var e=t.lib.BlockCipherMode.extend(),r=e.Encryptor=e.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,n=this._iv,a=this._counter;n&&(a=this._counter=n.slice(0),this._iv=void 0);var o=a.slice(0);r.encryptBlock(o,0),a[i-1]=a[i-1]+1|0;for(var s=0;s<i;s++)t[e+s]^=o[s]}});return e.Decryptor=r,e}(),t.mode.CTR})},function(t,e,r){!function(i,n,a){t.exports=e=n(r(1),r(8))}(0,function(t){/** @preserve
  22. * Counter block mode compatible with Dr Brian Gladman fileenc.c
  23. * derived from CryptoJS.mode.CTR
  24. * Jan Hruby jhruby.web@gmail.com
  25. */
  26. return t.mode.CTRGladman=function(){function e(t){if(255==(t>>24&255)){var e=t>>16&255,r=t>>8&255,i=255&t;255===e?(e=0,255===r?(r=0,255===i?i=0:++i):++r):++e,t=0,t+=e<<16,t+=r<<8,t+=i}else t+=1<<24;return t}function r(t){return 0===(t[0]=e(t[0]))&&(t[1]=e(t[1])),t}var i=t.lib.BlockCipherMode.extend(),n=i.Encryptor=i.extend({processBlock:function(t,e){var i=this._cipher,n=i.blockSize,a=this._iv,o=this._counter;a&&(o=this._counter=a.slice(0),this._iv=void 0),r(o);var s=o.slice(0);i.encryptBlock(s,0);for(var f=0;f<n;f++)t[e+f]^=s[f]}});return i.Decryptor=n,i}(),t.mode.CTRGladman})},function(t,e,r){!function(i,n,a){t.exports=e=n(r(1),r(8))}(0,function(t){return t.mode.OFB=function(){var e=t.lib.BlockCipherMode.extend(),r=e.Encryptor=e.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,n=this._iv,a=this._keystream;n&&(a=this._keystream=n.slice(0),this._iv=void 0),r.encryptBlock(a,0);for(var o=0;o<i;o++)t[e+o]^=a[o]}});return e.Decryptor=r,e}(),t.mode.OFB})},function(t,e,r){!function(i,n,a){t.exports=e=n(r(1),r(8))}(0,function(t){return t.mode.ECB=function(){var e=t.lib.BlockCipherMode.extend();return e.Encryptor=e.extend({processBlock:function(t,e){this._cipher.encryptBlock(t,e)}}),e.Decryptor=e.extend({processBlock:function(t,e){this._cipher.decryptBlock(t,e)}}),e}(),t.mode.ECB})},function(t,e,r){!function(i,n,a){t.exports=e=n(r(1),r(8))}(0,function(t){return t.pad.AnsiX923={pad:function(t,e){var r=t.sigBytes,i=4*e,n=i-r%i,a=r+n-1;t.clamp(),t.words[a>>>2]|=n<<24-a%4*8,t.sigBytes+=n},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},t.pad.Ansix923})},function(t,e,r){!function(i,n,a){t.exports=e=n(r(1),r(8))}(0,function(t){return t.pad.Iso10126={pad:function(e,r){var i=4*r,n=i-e.sigBytes%i;e.concat(t.lib.WordArray.random(n-1)).concat(t.lib.WordArray.create([n<<24],1))},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},t.pad.Iso10126})},function(t,e,r){!function(i,n,a){t.exports=e=n(r(1),r(8))}(0,function(t){return t.pad.Iso97971={pad:function(e,r){e.concat(t.lib.WordArray.create([2147483648],1)),t.pad.ZeroPadding.pad(e,r)},unpad:function(e){t.pad.ZeroPadding.unpad(e),e.sigBytes--}},t.pad.Iso97971})},function(t,e,r){!function(i,n,a){t.exports=e=n(r(1),r(8))}(0,function(t){return t.pad.ZeroPadding={pad:function(t,e){var r=4*e;t.clamp(),t.sigBytes+=r-(t.sigBytes%r||r)},unpad:function(t){for(var e=t.words,r=t.sigBytes-1,r=t.sigBytes-1;r>=0;r--)if(e[r>>>2]>>>24-r%4*8&255){t.sigBytes=r+1;break}}},t.pad.ZeroPadding})},function(t,e,r){!function(i,n,a){t.exports=e=n(r(1),r(8))}(0,function(t){return t.pad.NoPadding={pad:function(){},unpad:function(){}},t.pad.NoPadding})},function(t,e,r){!function(i,n,a){t.exports=e=n(r(1),r(8))}(0,function(t){return function(e){var r=t,i=r.lib,n=i.CipherParams,a=r.enc,o=a.Hex,s=r.format;s.Hex={stringify:function(t){return t.ciphertext.toString(o)},parse:function(t){var e=o.parse(t);return n.create({ciphertext:e})}}}(),t.format.Hex})},function(t,e,r){!function(i,n,a){t.exports=e=n(r(1),r(17),r(22),r(18),r(8))}(0,function(t){return function(){var e=t,r=e.lib,i=r.BlockCipher,n=e.algo,a=[],o=[],s=[],f=[],c=[],h=[],u=[],d=[],l=[],p=[];!function(){for(var t=[],e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var r=0,i=0,e=0;e<256;e++){var n=i^i<<1^i<<2^i<<3^i<<4;n=n>>>8^255&n^99,a[r]=n,o[n]=r;var b=t[r],g=t[b],v=t[g],y=257*t[n]^16843008*n;s[r]=y<<24|y>>>8,f[r]=y<<16|y>>>16,c[r]=y<<8|y>>>24,h[r]=y;var y=16843009*v^65537*g^257*b^16843008*r;u[n]=y<<24|y>>>8,d[n]=y<<16|y>>>16,l[n]=y<<8|y>>>24,p[n]=y,r?(r=b^t[t[t[v^b]]],i^=t[t[i]]):r=i=1}}();var b=[0,1,2,4,8,16,32,64,128,27,54],g=n.AES=i.extend({_doReset:function(){var t;if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,r=e.words,i=e.sigBytes/4,n=this._nRounds=i+6,o=4*(n+1),s=this._keySchedule=[],f=0;f<o;f++)f<i?s[f]=r[f]:(t=s[f-1],f%i?i>6&&f%i==4&&(t=a[t>>>24]<<24|a[t>>>16&255]<<16|a[t>>>8&255]<<8|a[255&t]):(t=t<<8|t>>>24,t=a[t>>>24]<<24|a[t>>>16&255]<<16|a[t>>>8&255]<<8|a[255&t],t^=b[f/i|0]<<24),s[f]=s[f-i]^t);for(var c=this._invKeySchedule=[],h=0;h<o;h++){var f=o-h;if(h%4)var t=s[f];else var t=s[f-4];c[h]=h<4||f<=4?t:u[a[t>>>24]]^d[a[t>>>16&255]]^l[a[t>>>8&255]]^p[a[255&t]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,s,f,c,h,a)},decryptBlock:function(t,e){var r=t[e+1];t[e+1]=t[e+3],t[e+3]=r,this._doCryptBlock(t,e,this._invKeySchedule,u,d,l,p,o);var r=t[e+1];t[e+1]=t[e+3],t[e+3]=r},_doCryptBlock:function(t,e,r,i,n,a,o,s){for(var f=this._nRounds,c=t[e]^r[0],h=t[e+1]^r[1],u=t[e+2]^r[2],d=t[e+3]^r[3],l=4,p=1;p<f;p++){var b=i[c>>>24]^n[h>>>16&255]^a[u>>>8&255]^o[255&d]^r[l++],g=i[h>>>24]^n[u>>>16&255]^a[d>>>8&255]^o[255&c]^r[l++],v=i[u>>>24]^n[d>>>16&255]^a[c>>>8&255]^o[255&h]^r[l++],y=i[d>>>24]^n[c>>>16&255]^a[h>>>8&255]^o[255&u]^r[l++];c=b,h=g,u=v,d=y}var b=(s[c>>>24]<<24|s[h>>>16&255]<<16|s[u>>>8&255]<<8|s[255&d])^r[l++],g=(s[h>>>24]<<24|s[u>>>16&255]<<16|s[d>>>8&255]<<8|s[255&c])^r[l++],v=(s[u>>>24]<<24|s[d>>>16&255]<<16|s[c>>>8&255]<<8|s[255&h])^r[l++],y=(s[d>>>24]<<24|s[c>>>16&255]<<16|s[h>>>8&255]<<8|s[255&u])^r[l++];t[e]=b,t[e+1]=g,t[e+2]=v,t[e+3]=y},keySize:8});e.AES=i._createHelper(g)}(),t.AES})},function(t,e,r){!function(i,n,a){t.exports=e=n(r(1),r(17),r(22),r(18),r(8))}(0,function(t){return function(){function e(t,e){var r=(this._lBlock>>>t^this._rBlock)&e;this._rBlock^=r,this._lBlock^=r<<t}function r(t,e){var r=(this._rBlock>>>t^this._lBlock)&e;this._lBlock^=r,this._rBlock^=r<<t}var i=t,n=i.lib,a=n.WordArray,o=n.BlockCipher,s=i.algo,f=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],c=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],h=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],u=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],d=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],l=s.DES=o.extend({_doReset:function(){for(var t=this._key,e=t.words,r=[],i=0;i<56;i++){var n=f[i]-1;r[i]=e[n>>>5]>>>31-n%32&1}for(var a=this._subKeys=[],o=0;o<16;o++){for(var s=a[o]=[],u=h[o],i=0;i<24;i++)s[i/6|0]|=r[(c[i]-1+u)%28]<<31-i%6,s[4+(i/6|0)]|=r[28+(c[i+24]-1+u)%28]<<31-i%6;s[0]=s[0]<<1|s[0]>>>31;for(var i=1;i<7;i++)s[i]=s[i]>>>4*(i-1)+3;s[7]=s[7]<<5|s[7]>>>27}for(var d=this._invSubKeys=[],i=0;i<16;i++)d[i]=a[15-i]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._subKeys)},decryptBlock:function(t,e){this._doCryptBlock(t,e,this._invSubKeys)},_doCryptBlock:function(t,i,n){this._lBlock=t[i],this._rBlock=t[i+1],e.call(this,4,252645135),e.call(this,16,65535),r.call(this,2,858993459),r.call(this,8,16711935),e.call(this,1,1431655765);for(var a=0;a<16;a++){for(var o=n[a],s=this._lBlock,f=this._rBlock,c=0,h=0;h<8;h++)c|=u[h][((f^o[h])&d[h])>>>0];this._lBlock=f,this._rBlock=s^c}var l=this._lBlock;this._lBlock=this._rBlock,this._rBlock=l,e.call(this,1,1431655765),r.call(this,8,16711935),r.call(this,2,858993459),e.call(this,16,65535),e.call(this,4,252645135),t[i]=this._lBlock,t[i+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});i.DES=o._createHelper(l);var p=s.TripleDES=o.extend({_doReset:function(){var t=this._key,e=t.words;if(2!==e.length&&4!==e.length&&e.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var r=e.slice(0,2),i=e.length<4?e.slice(0,2):e.slice(2,4),n=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=l.createEncryptor(a.create(r)),this._des2=l.createEncryptor(a.create(i)),this._des3=l.createEncryptor(a.create(n))},encryptBlock:function(t,e){this._des1.encryptBlock(t,e),this._des2.decryptBlock(t,e),this._des3.encryptBlock(t,e)},decryptBlock:function(t,e){this._des3.decryptBlock(t,e),this._des2.encryptBlock(t,e),this._des1.decryptBlock(t,e)},keySize:6,ivSize:2,blockSize:2});i.TripleDES=o._createHelper(p)}(),t.TripleDES})},function(t,e,r){!function(i,n,a){t.exports=e=n(r(1),r(17),r(22),r(18),r(8))}(0,function(t){return function(){function e(){for(var t=this._S,e=this._i,r=this._j,i=0,n=0;n<4;n++){e=(e+1)%256,r=(r+t[e])%256;var a=t[e];t[e]=t[r],t[r]=a,i|=t[(t[e]+t[r])%256]<<24-8*n}return this._i=e,this._j=r,i}var r=t,i=r.lib,n=i.StreamCipher,a=r.algo,o=a.RC4=n.extend({_doReset:function(){for(var t=this._key,e=t.words,r=t.sigBytes,i=this._S=[],n=0;n<256;n++)i[n]=n;for(var n=0,a=0;n<256;n++){var o=n%r,s=e[o>>>2]>>>24-o%4*8&255;a=(a+i[n]+s)%256;var f=i[n];i[n]=i[a],i[a]=f}this._i=this._j=0},_doProcessBlock:function(t,r){t[r]^=e.call(this)},keySize:8,ivSize:0});r.RC4=n._createHelper(o);var s=a.RC4Drop=o.extend({cfg:o.cfg.extend({drop:192}),_doReset:function(){o._doReset.call(this);for(var t=this.cfg.drop;t>0;t--)e.call(this)}});r.RC4Drop=n._createHelper(s)}(),t.RC4})},function(t,e,r){!function(i,n,a){t.exports=e=n(r(1),r(17),r(22),r(18),r(8))}(0,function(t){return function(){function e(){for(var t=this._X,e=this._C,r=0;r<8;r++)s[r]=e[r];e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0<s[0]>>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0<s[1]>>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0<s[2]>>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0<s[3]>>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0<s[4]>>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0<s[5]>>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0<s[6]>>>0?1:0)|0,this._b=e[7]>>>0<s[7]>>>0?1:0;for(var r=0;r<8;r++){var i=t[r]+e[r],n=65535&i,a=i>>>16,o=((n*n>>>17)+n*a>>>15)+a*a,c=((4294901760&i)*i|0)+((65535&i)*i|0);f[r]=o^c}t[0]=f[0]+(f[7]<<16|f[7]>>>16)+(f[6]<<16|f[6]>>>16)|0,t[1]=f[1]+(f[0]<<8|f[0]>>>24)+f[7]|0,t[2]=f[2]+(f[1]<<16|f[1]>>>16)+(f[0]<<16|f[0]>>>16)|0,t[3]=f[3]+(f[2]<<8|f[2]>>>24)+f[1]|0,t[4]=f[4]+(f[3]<<16|f[3]>>>16)+(f[2]<<16|f[2]>>>16)|0,t[5]=f[5]+(f[4]<<8|f[4]>>>24)+f[3]|0,t[6]=f[6]+(f[5]<<16|f[5]>>>16)+(f[4]<<16|f[4]>>>16)|0,t[7]=f[7]+(f[6]<<8|f[6]>>>24)+f[5]|0}var r=t,i=r.lib,n=i.StreamCipher,a=r.algo,o=[],s=[],f=[],c=a.Rabbit=n.extend({_doReset:function(){for(var t=this._key.words,r=this.cfg.iv,i=0;i<4;i++)t[i]=16711935&(t[i]<<8|t[i]>>>24)|4278255360&(t[i]<<24|t[i]>>>8);var n=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],a=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(var i=0;i<4;i++)e.call(this);for(var i=0;i<8;i++)a[i]^=n[i+4&7];if(r){var o=r.words,s=o[0],f=o[1],c=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),u=c>>>16|4294901760&h,d=h<<16|65535&c;a[0]^=c,a[1]^=u,a[2]^=h,a[3]^=d,a[4]^=c,a[5]^=u,a[6]^=h,a[7]^=d;for(var i=0;i<4;i++)e.call(this)}},_doProcessBlock:function(t,r){var i=this._X;e.call(this),o[0]=i[0]^i[5]>>>16^i[3]<<16,o[1]=i[2]^i[7]>>>16^i[5]<<16,o[2]=i[4]^i[1]>>>16^i[7]<<16,o[3]=i[6]^i[3]>>>16^i[1]<<16;for(var n=0;n<4;n++)o[n]=16711935&(o[n]<<8|o[n]>>>24)|4278255360&(o[n]<<24|o[n]>>>8),t[r+n]^=o[n]},blockSize:4,ivSize:2});r.Rabbit=n._createHelper(c)}(),t.Rabbit})},function(t,e,r){!function(i,n,a){t.exports=e=n(r(1),r(17),r(22),r(18),r(8))}(0,function(t){return function(){function e(){for(var t=this._X,e=this._C,r=0;r<8;r++)s[r]=e[r];e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0<s[0]>>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0<s[1]>>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0<s[2]>>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0<s[3]>>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0<s[4]>>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0<s[5]>>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0<s[6]>>>0?1:0)|0,this._b=e[7]>>>0<s[7]>>>0?1:0;for(var r=0;r<8;r++){var i=t[r]+e[r],n=65535&i,a=i>>>16,o=((n*n>>>17)+n*a>>>15)+a*a,c=((4294901760&i)*i|0)+((65535&i)*i|0);f[r]=o^c}t[0]=f[0]+(f[7]<<16|f[7]>>>16)+(f[6]<<16|f[6]>>>16)|0,t[1]=f[1]+(f[0]<<8|f[0]>>>24)+f[7]|0,t[2]=f[2]+(f[1]<<16|f[1]>>>16)+(f[0]<<16|f[0]>>>16)|0,t[3]=f[3]+(f[2]<<8|f[2]>>>24)+f[1]|0,t[4]=f[4]+(f[3]<<16|f[3]>>>16)+(f[2]<<16|f[2]>>>16)|0,t[5]=f[5]+(f[4]<<8|f[4]>>>24)+f[3]|0,t[6]=f[6]+(f[5]<<16|f[5]>>>16)+(f[4]<<16|f[4]>>>16)|0,t[7]=f[7]+(f[6]<<8|f[6]>>>24)+f[5]|0}var r=t,i=r.lib,n=i.StreamCipher,a=r.algo,o=[],s=[],f=[],c=a.RabbitLegacy=n.extend({_doReset:function(){var t=this._key.words,r=this.cfg.iv,i=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],n=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(var a=0;a<4;a++)e.call(this);for(var a=0;a<8;a++)n[a]^=i[a+4&7];if(r){var o=r.words,s=o[0],f=o[1],c=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),u=c>>>16|4294901760&h,d=h<<16|65535&c;n[0]^=c,n[1]^=u,n[2]^=h,n[3]^=d,n[4]^=c,n[5]^=u,n[6]^=h,n[7]^=d;for(var a=0;a<4;a++)e.call(this)}},_doProcessBlock:function(t,r){var i=this._X;e.call(this),o[0]=i[0]^i[5]>>>16^i[3]<<16,o[1]=i[2]^i[7]>>>16^i[5]<<16,o[2]=i[4]^i[1]>>>16^i[7]<<16,o[3]=i[6]^i[3]>>>16^i[1]<<16;for(var n=0;n<4;n++)o[n]=16711935&(o[n]<<8|o[n]>>>24)|4278255360&(o[n]<<24|o[n]>>>8),t[r+n]^=o[n]},blockSize:4,ivSize:2});r.RabbitLegacy=n._createHelper(c)}(),t.RabbitLegacy})},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(39),s=r(55),f=r(101),c=r(5),h=r(54),u=r(41),d=r(59),l=r(105),p=r(106),b=r(7),g=r(2),v=r(107),y=r(58),m=r(260),_=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),w={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_LEVEL:"WAITING_LEVEL",PARSING:"PARSING",PARSED:"PARSED",BUFFER_FLUSHING:"BUFFER_FLUSHING",ENDED:"ENDED",ERROR:"ERROR"},S=function(t){function e(r,a){i(this,e);var o=n(this,t.call(this,r,c.a.MEDIA_ATTACHED,c.a.MEDIA_DETACHING,c.a.MANIFEST_LOADING,c.a.MANIFEST_PARSED,c.a.LEVEL_LOADED,c.a.KEY_LOADED,c.a.FRAG_LOADED,c.a.FRAG_LOAD_EMERGENCY_ABORTED,c.a.FRAG_PARSING_INIT_SEGMENT,c.a.FRAG_PARSING_DATA,c.a.FRAG_PARSED,c.a.ERROR,c.a.AUDIO_TRACK_SWITCHING,c.a.AUDIO_TRACK_SWITCHED,c.a.BUFFER_CREATED,c.a.BUFFER_APPENDED,c.a.BUFFER_FLUSHED));return o.fragmentTracker=a,o.config=r.config,o.audioCodecSwap=!1,o._state=w.STOPPED,o.stallReported=!1,o}return a(e,t),e.prototype.onHandlerDestroying=function(){this.stopLoad()},e.prototype.onHandlerDestroyed=function(){this.state=w.STOPPED,this.fragmentTracker=null},e.prototype.startLoad=function(t){if(this.levels){var e=this.lastCurrentTime,r=this.hls;if(this.stopLoad(),this.setInterval(100),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var i=r.startLevel;-1===i&&(i=0,this.bitrateTest=!0),this.level=r.nextLoadLevel=i,this.loadedmetadata=!1}e>0&&-1===t&&(g.b.log("override startPosition with lastCurrentTime @"+e.toFixed(3)),t=e),this.state=w.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=t,this.tick()}else this.forceStartLoad=!0,this.state=w.STOPPED},e.prototype.stopLoad=function(){var t=this.fragCurrent;t&&(t.loader&&t.loader.abort(),this.fragmentTracker.removeFragment(t),this.fragCurrent=null),this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.clearInterval(),this.state=w.STOPPED,this.forceStartLoad=!1},e.prototype.doTick=function(){switch(this.state){case w.BUFFER_FLUSHING:this.fragLoadError=0;break;case w.IDLE:this._doTickIdle();break;case w.WAITING_LEVEL:var t=this.levels[this.level];t&&t.details&&(this.state=w.IDLE);break;case w.FRAG_LOADING_WAITING_RETRY:var e=performance.now(),r=this.retryDate;(!r||e>=r||this.media&&this.media.seeking)&&(g.b.log("mediaController: retryDate reached, switch back to IDLE state"),this.state=w.IDLE);break;case w.ERROR:case w.STOPPED:case w.FRAG_LOADING:case w.PARSING:case w.PARSED:case w.ENDED:}this._checkBuffer(),this._checkFragmentChanged()},e.prototype._doTickIdle=function(){var t=this.hls,e=t.config,r=this.media;if(void 0!==this.levelLastLoaded&&(r||!this.startFragRequested&&e.startFragPrefetch)){var i=void 0;i=this.loadedmetadata?r.currentTime:this.nextLoadPosition;var n=t.nextLoadLevel,a=this.levels[n];if(a){var o=a.bitrate,f=void 0;f=o?Math.max(8*e.maxBufferSize/o,e.maxBufferLength):e.maxBufferLength,f=Math.min(f,e.maxMaxBufferLength);var h=s.a.bufferInfo(this.mediaBuffer?this.mediaBuffer:r,i,e.maxBufferHole),u=h.len;if(!(u>=f)){g.b.trace("buffer length of "+u.toFixed(3)+" is below max of "+f.toFixed(3)+". checking for more payload ..."),this.level=t.nextLoadLevel=n;var d=a.details;if(void 0===d||!0===d.live&&this.levelLastLoaded!==n)return void(this.state=w.WAITING_LEVEL);var l=this.fragPrevious;if(!d.live&&l&&!l.backtracked&&l.sn===d.endSN&&!h.nextStart){if(Math.min(r.duration,l.start+l.duration)-Math.max(h.end,l.start)<=Math.max(.2,l.duration)){var p={};return this.altAudio&&(p.type="video"),this.hls.trigger(c.a.BUFFER_EOS,p),void(this.state=w.ENDED)}}this._fetchPayloadOrEos(i,h,d)}}}},e.prototype._fetchPayloadOrEos=function(t,e,r){var i=this.fragPrevious,n=this.level,a=r.fragments,o=a.length;if(0!==o){var s=a[0].start,f=a[o-1].start+a[o-1].duration,c=e.end,h=void 0;if(r.initSegment&&!r.initSegment.data)h=r.initSegment;else if(r.live){var u=this.config.initialLiveManifestSize;if(o<u)return void g.b.warn("Can not start playback of a level, reason: not enough fragments "+o+" < "+u);if(null===(h=this._ensureFragmentAtLivePoint(r,c,s,f,i,a,o)))return}else c<s&&(h=a[0]);h||(h=this._findFragment(s,i,o,a,c,f,r)),h&&(h.encrypted?(g.b.log("Loading key for "+h.sn+" of ["+r.startSN+" ,"+r.endSN+"],level "+n),this._loadKey(h)):(g.b.log("Loading "+h.sn+" of ["+r.startSN+" ,"+r.endSN+"],level "+n+", currentTime:"+t.toFixed(3)+",bufferEnd:"+c.toFixed(3)),this._loadFragment(h)))}},e.prototype._ensureFragmentAtLivePoint=function(t,e,r,i,n,a,s){var f=this.hls.config,c=this.media,h=void 0,u=void 0!==f.liveMaxLatencyDuration?f.liveMaxLatencyDuration:f.liveMaxLatencyDurationCount*t.targetduration;if(e<Math.max(r-f.maxFragLookUpTolerance,i-u)){var d=this.liveSyncPosition=this.computeLivePosition(r,t);g.b.log("buffer end: "+e.toFixed(3)+" is located too far from the end of live sliding playlist, reset currentTime to : "+d.toFixed(3)),e=d,c&&c.readyState&&c.duration>d&&(c.currentTime=d),this.nextLoadPosition=d}if(t.PTSKnown&&e>i&&c&&c.readyState)return null;if(this.startFragRequested&&!t.PTSKnown){if(n)if(t.programDateTime)h=Object(m.b)(a,n.endPdt+1);else{var l=n.sn+1;if(l>=t.startSN&&l<=t.endSN){var p=a[l-t.startSN];n.cc===p.cc&&(h=p,g.b.log("live playlist, switching playlist, load frag with next SN: "+h.sn))}h||(h=o.a.search(a,function(t){return n.cc-t.cc}))&&g.b.log("live playlist, switching playlist, load frag with same CC: "+h.sn)}h||(h=a[Math.min(s-1,Math.round(s/2))],g.b.log("live playlist, switching playlist, unknown, load middle frag : "+h.sn))}return h},e.prototype._findFragment=function(t,e,r,i,n,a,o){var s=this.hls.config,f=void 0,c=void 0;if(n<a?o.programDateTime?(c=Object(m.b)(i,Object(m.a)(t,n,o)))&&!Object(m.d)(n,s.maxFragLookUpTolerance,c)||(g.b.warn("Frag found by PDT search did not fit within tolerance; falling back to finding by SN"),c=function(){return Object(m.c)(e,i,n,a,s.maxFragLookUpTolerance)}()):c=Object(m.c)(e,i,n,a,s.maxFragLookUpTolerance):c=i[r-1],c){f=c;var h=f.sn-o.startSN,u=e&&f.level===e.level,d=i[h-1],l=i[h+1];if(e&&f.sn===e.sn)if(u&&!f.backtracked)if(f.sn<o.endSN){var p=e.deltaPTS;p&&p>s.maxBufferHole&&e.dropped&&h?(f=d,g.b.warn("SN just loaded, with large PTS gap between audio and video, maybe frag is not starting with a keyframe ? load previous one to try to overcome this")):(f=l,g.b.log("SN just loaded, load next one: "+f.sn))}else f=null;else f.backtracked&&(l&&l.backtracked?(g.b.warn("Already backtracked from fragment "+l.sn+", will not backtrack to fragment "+f.sn+". Loading fragment "+l.sn),f=l):(g.b.warn("Loaded fragment with dropped frames, backtracking 1 segment to find a keyframe"),f.dropped=0,d?(f=d,f.backtracked=!0):h&&(f=null)))}return f},e.prototype._loadKey=function(t){this.state=w.KEY_LOADING,this.hls.trigger(c.a.KEY_LOADING,{frag:t})},e.prototype._loadFragment=function(t){var e=this.fragmentTracker.getState(t);this.fragCurrent=t,this.startFragRequested=!0,isNaN(t.sn)||t.bitrateTest||(this.nextLoadPosition=t.start+t.duration),t.backtracked||e===h.a.NOT_LOADED||e===h.a.PARTIAL?(t.autoLevel=this.hls.autoLevelEnabled,t.bitrateTest=this.bitrateTest,this.hls.trigger(c.a.FRAG_LOADING,{frag:t}),this.demuxer||(this.demuxer=new f.a(this.hls,"main")),this.state=w.FRAG_LOADING):e===h.a.APPENDING&&this._reduceMaxBufferLength(t.duration)&&this.fragmentTracker.removeFragment(t)},e.prototype.getBufferedFrag=function(t){return this.fragmentTracker.getBufferedFrag(t,d.a.LevelType.MAIN)},e.prototype.followingBufferedFrag=function(t){return t?this.getBufferedFrag(t.endPTS+.5):null},e.prototype._checkFragmentChanged=function(){var t=void 0,e=void 0,r=this.media;if(r&&r.readyState&&!1===r.seeking&&(e=r.currentTime,e>this.lastCurrentTime&&(this.lastCurrentTime=e),s.a.isBuffered(r,e)?t=this.getBufferedFrag(e):s.a.isBuffered(r,e+.1)&&(t=this.getBufferedFrag(e+.1)),t)){var i=t;if(i!==this.fragPlaying){this.hls.trigger(c.a.FRAG_CHANGED,{frag:i});var n=i.level;this.fragPlaying&&this.fragPlaying.level===n||this.hls.trigger(c.a.LEVEL_SWITCHED,{level:n}),this.fragPlaying=i}}},e.prototype.immediateLevelSwitch=function(){if(g.b.log("immediateLevelSwitch"),!this.immediateSwitch){this.immediateSwitch=!0;var t=this.media,e=void 0;t?(e=t.paused,t.pause()):e=!0,this.previouslyPaused=e}var r=this.fragCurrent;r&&r.loader&&r.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},e.prototype.immediateLevelSwitchEnd=function(){var t=this.media;t&&t.buffered.length&&(this.immediateSwitch=!1,s.a.isBuffered(t,t.currentTime)&&(t.currentTime-=1e-4),this.previouslyPaused||t.play())},e.prototype.nextLevelSwitch=function(){var t=this.media;if(t&&t.readyState){var e=void 0,r=void 0,i=void 0;if(r=this.getBufferedFrag(t.currentTime),r&&r.startPTS>1&&this.flushMainBuffer(0,r.startPTS-1),t.paused)e=0;else{var n=this.hls.nextLoadLevel,a=this.levels[n],o=this.fragLastKbps;e=o&&this.fragCurrent?this.fragCurrent.duration*a.bitrate/(1e3*o)+1:0}if((i=this.getBufferedFrag(t.currentTime+e))&&(i=this.followingBufferedFrag(i))){var s=this.fragCurrent;s&&s.loader&&s.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(i.maxStartPTS,Number.POSITIVE_INFINITY)}}},e.prototype.flushMainBuffer=function(t,e){this.state=w.BUFFER_FLUSHING;var r={startOffset:t,endOffset:e};this.altAudio&&(r.type="video"),this.hls.trigger(c.a.BUFFER_FLUSHING,r)},e.prototype.onMediaAttached=function(t){var e=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),this.onvended=this.onMediaEnded.bind(this),e.addEventListener("seeking",this.onvseeking),e.addEventListener("seeked",this.onvseeked),e.addEventListener("ended",this.onvended);var r=this.config;this.levels&&r.autoStartLoad&&this.hls.startLoad(r.startPosition)},e.prototype.onMediaDetaching=function(){var t=this.media;t&&t.ended&&(g.b.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var e=this.levels;e&&e.forEach(function(t){t.details&&t.details.fragments.forEach(function(t){t.backtracked=void 0})}),t&&(t.removeEventListener("seeking",this.onvseeking),t.removeEventListener("seeked",this.onvseeked),t.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.stopLoad()},e.prototype.onMediaSeeking=function(){var t=this.media,e=t?t.currentTime:void 0,r=this.config;isNaN(e)||g.b.log("media seeking to "+e.toFixed(3));var i=this.mediaBuffer?this.mediaBuffer:t,n=s.a.bufferInfo(i,e,this.config.maxBufferHole);if(this.state===w.FRAG_LOADING){var a=this.fragCurrent;if(0===n.len&&a){var o=r.maxFragLookUpTolerance,f=a.start-o,c=a.start+a.duration+o;e<f||e>c?(a.loader&&(g.b.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),a.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.state=w.IDLE):g.b.log("seeking outside of buffer but within currently loaded fragment range")}}else this.state===w.ENDED&&(0===n.len&&(this.fragPrevious=0),this.state=w.IDLE);t&&(this.lastCurrentTime=e),this.loadedmetadata||(this.nextLoadPosition=this.startPosition=e),this.tick()},e.prototype.onMediaSeeked=function(){var t=this.media,e=t?t.currentTime:void 0;isNaN(e)||g.b.log("media seeked to "+e.toFixed(3)),this.tick()},e.prototype.onMediaEnded=function(){g.b.log("media ended"),this.startPosition=this.lastCurrentTime=0},e.prototype.onManifestLoading=function(){g.b.log("trigger BUFFER_RESET"),this.hls.trigger(c.a.BUFFER_RESET),this.fragmentTracker.removeAllFragments(),this.stalled=!1,this.startPosition=this.lastCurrentTime=0},e.prototype.onManifestParsed=function(t){var e=!1,r=!1,i=void 0;t.levels.forEach(function(t){(i=t.audioCodec)&&(-1!==i.indexOf("mp4a.40.2")&&(e=!0),-1!==i.indexOf("mp4a.40.5")&&(r=!0))}),this.audioCodecSwitch=e&&r,this.audioCodecSwitch&&g.b.log("both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1;var n=this.config;(n.autoStartLoad||this.forceStartLoad)&&this.hls.startLoad(n.startPosition)},e.prototype.onLevelLoaded=function(t){var e=t.details,r=t.level,i=this.levels[this.levelLastLoaded],n=this.levels[r],a=e.totalduration,o=0;if(g.b.log("level "+r+" loaded ["+e.startSN+","+e.endSN+"],duration:"+a),e.live){var s=n.details;s&&e.fragments.length>0?(l.a(s,e),o=e.fragments[0].start,this.liveSyncPosition=this.computeLivePosition(o,s),e.PTSKnown&&!isNaN(o)?g.b.log("live playlist sliding:"+o.toFixed(3)):(g.b.log("live playlist - outdated PTS, unknown sliding"),Object(v.a)(this.fragPrevious,i,e))):(g.b.log("live playlist - first load, unknown sliding"),e.PTSKnown=!1,Object(v.a)(this.fragPrevious,i,e))}else e.PTSKnown=!1;if(n.details=e,this.levelLastLoaded=r,this.hls.trigger(c.a.LEVEL_UPDATED,{details:e,level:r}),!1===this.startFragRequested){if(-1===this.startPosition||-1===this.lastCurrentTime){var f=e.startTimeOffset;isNaN(f)?e.live?(this.startPosition=this.computeLivePosition(o,e),g.b.log("configure startPosition to "+this.startPosition)):this.startPosition=0:(f<0&&(g.b.log("negative start time offset "+f+", count from end of last fragment"),f=o+a+f),g.b.log("start time offset found in playlist, adjust startPosition to "+f),this.startPosition=f),this.lastCurrentTime=this.startPosition}this.nextLoadPosition=this.startPosition}this.state===w.WAITING_LEVEL&&(this.state=w.IDLE),this.tick()},e.prototype.onKeyLoaded=function(){this.state===w.KEY_LOADING&&(this.state=w.IDLE,this.tick())},e.prototype.onFragLoaded=function(t){var e=this.fragCurrent,r=t.frag;if(this.state===w.FRAG_LOADING&&e&&"main"===r.type&&r.level===e.level&&r.sn===e.sn){var i=t.stats,n=this.levels[e.level],a=n.details;if(g.b.log("Loaded "+e.sn+" of ["+a.startSN+" ,"+a.endSN+"],level "+e.level),this.bitrateTest=!1,this.stats=i,!0===r.bitrateTest&&this.hls.nextLoadLevel)this.state=w.IDLE,this.startFragRequested=!1,i.tparsed=i.tbuffered=performance.now(),this.hls.trigger(c.a.FRAG_BUFFERED,{stats:i,frag:e,id:"main"}),this.tick();else if("initSegment"===r.sn)this.state=w.IDLE,i.tparsed=i.tbuffered=performance.now(),a.initSegment.data=t.payload,this.hls.trigger(c.a.FRAG_BUFFERED,{stats:i,frag:e,id:"main"}),this.tick();else{this.state=w.PARSING;var o=a.totalduration,s=e.level,h=e.sn,u=this.config.defaultAudioCodec||n.audioCodec;this.audioCodecSwap&&(g.b.log("swapping playlist audio codec"),void 0===u&&(u=this.lastAudioCodec),u&&(u=-1!==u.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5")),this.pendingBuffering=!0,this.appended=!1,g.b.log("Parsing "+h+" of ["+a.startSN+" ,"+a.endSN+"],level "+s+", cc "+e.cc);var d=this.demuxer;d||(d=this.demuxer=new f.a(this.hls,"main"));var l=this.media,p=l&&l.seeking,b=!p&&(a.PTSKnown||!a.live),v=a.initSegment?a.initSegment.data:[];d.push(t.payload,v,u,n.videoCodec,e,o,b,void 0)}}this.fragLoadError=0},e.prototype.onFragParsingInitSegment=function(t){var e=this.fragCurrent,r=t.frag;if(e&&"main"===t.id&&r.sn===e.sn&&r.level===e.level&&this.state===w.PARSING){var i=t.tracks,n=void 0,a=void 0;if(i.audio&&this.altAudio&&delete i.audio,a=i.audio){var o=this.levels[this.level].audioCodec,s=navigator.userAgent.toLowerCase();o&&this.audioCodecSwap&&(g.b.log("swapping playlist audio codec"),o=-1!==o.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),this.audioCodecSwitch&&1!==a.metadata.channelCount&&-1===s.indexOf("firefox")&&(o="mp4a.40.5"),-1!==s.indexOf("android")&&"audio/mpeg"!==a.container&&(o="mp4a.40.2",g.b.log("Android: force audio codec to "+o)),a.levelCodec=o,a.id=t.id}a=i.video,a&&(a.levelCodec=this.levels[this.level].videoCodec,a.id=t.id),this.hls.trigger(c.a.BUFFER_CODECS,i);for(n in i){a=i[n],g.b.log("main track:"+n+",container:"+a.container+",codecs[level/parsed]=["+a.levelCodec+"/"+a.codec+"]");var f=a.initSegment;f&&(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(c.a.BUFFER_APPENDING,{type:n,data:f,parent:"main",content:"initSegment"}))}this.tick()}},e.prototype.onFragParsingData=function(t){var e=this,r=this.fragCurrent,i=t.frag;if(r&&"main"===t.id&&i.sn===r.sn&&i.level===r.level&&("audio"!==t.type||!this.altAudio)&&this.state===w.PARSING){var n=this.levels[this.level],a=r;if(isNaN(t.endPTS)&&(t.endPTS=t.startPTS+r.duration,t.endDTS=t.startDTS+r.duration),!0===t.hasAudio&&a.addElementaryStream(u.a.ElementaryStreamTypes.AUDIO),!0===t.hasVideo&&a.addElementaryStream(u.a.ElementaryStreamTypes.VIDEO),g.b.log("Parsed "+t.type+",PTS:["+t.startPTS.toFixed(3)+","+t.endPTS.toFixed(3)+"],DTS:["+t.startDTS.toFixed(3)+"/"+t.endDTS.toFixed(3)+"],nb:"+t.nb+",dropped:"+(t.dropped||0)),"video"===t.type)if(a.dropped=t.dropped,a.dropped)if(a.backtracked)g.b.warn("Already backtracked on this fragment, appending with the gap",a.sn);else{var o=n.details;if(!o||a.sn!==o.startSN)return g.b.warn("missing video frame(s), backtracking fragment",a.sn),this.fragmentTracker.removeFragment(a),a.backtracked=!0,this.nextLoadPosition=t.startPTS,this.state=w.IDLE,this.fragPrevious=a,void this.tick();g.b.warn("missing video frame(s) on first frag, appending with gap",a.sn)}else a.backtracked=!1;var s=l.b(n.details,a,t.startPTS,t.endPTS,t.startDTS,t.endDTS),f=this.hls;f.trigger(c.a.LEVEL_PTS_UPDATED,{details:n.details,level:this.level,drift:s,type:t.type,start:t.startPTS,end:t.endPTS}),[t.data1,t.data2].forEach(function(r){r&&r.length&&e.state===w.PARSING&&(e.appended=!0,e.pendingBuffering=!0,f.trigger(c.a.BUFFER_APPENDING,{type:t.type,data:r,parent:"main",content:"data"}))}),this.tick()}},e.prototype.onFragParsed=function(t){var e=this.fragCurrent,r=t.frag;e&&"main"===t.id&&r.sn===e.sn&&r.level===e.level&&this.state===w.PARSING&&(this.stats.tparsed=performance.now(),this.state=w.PARSED,this._checkAppendedParsed())},e.prototype.onAudioTrackSwitching=function(t){var e=!!t.url,r=t.id;if(!e){if(this.mediaBuffer!==this.media){g.b.log("switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var i=this.fragCurrent;i.loader&&(g.b.log("switching to main audio track, cancel main fragment load"),i.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=w.IDLE}var n=this.hls;n.trigger(c.a.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),n.trigger(c.a.AUDIO_TRACK_SWITCHED,{id:r}),this.altAudio=!1}},e.prototype.onAudioTrackSwitched=function(t){var e=t.id,r=!!this.hls.audioTracks[e].url;if(r){var i=this.videoBuffer;i&&this.mediaBuffer!==i&&(g.b.log("switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=i)}this.altAudio=r,this.tick()},e.prototype.onBufferCreated=function(t){var e=t.tracks,r=void 0,i=void 0,n=!1;for(var a in e){var o=e[a];"main"===o.id?(i=a,r=o,"video"===a&&(this.videoBuffer=e[a].buffer)):n=!0}n&&r?(g.b.log("alternate track found, use "+i+".buffered to schedule main fragment loading"),this.mediaBuffer=r.buffer):this.mediaBuffer=this.media},e.prototype.onBufferAppended=function(t){if("main"===t.parent){var e=this.state;e!==w.PARSING&&e!==w.PARSED||(this.pendingBuffering=t.pending>0,this._checkAppendedParsed())}},e.prototype._checkAppendedParsed=function(){if(!(this.state!==w.PARSED||this.appended&&this.pendingBuffering)){var t=this.fragCurrent;if(t){var e=this.mediaBuffer?this.mediaBuffer:this.media;g.b.log("main buffered : "+p.a.toString(e.buffered)),this.fragPrevious=t;var r=this.stats;r.tbuffered=performance.now(),this.fragLastKbps=Math.round(8*r.total/(r.tbuffered-r.tfirst)),this.hls.trigger(c.a.FRAG_BUFFERED,{stats:r,frag:t,id:"main"}),this.state=w.IDLE}this.tick()}},e.prototype.onError=function(t){var e=t.frag||this.fragCurrent;if(!e||"main"===e.type){var r=!!this.media&&s.a.isBuffered(this.media,this.media.currentTime)&&s.a.isBuffered(this.media,this.media.currentTime+.5);switch(t.details){case b.a.FRAG_LOAD_ERROR:case b.a.FRAG_LOAD_TIMEOUT:case b.a.KEY_LOAD_ERROR:case b.a.KEY_LOAD_TIMEOUT:if(!t.fatal)if(this.fragLoadError+1<=this.config.fragLoadingMaxRetry){var i=Math.min(Math.pow(2,this.fragLoadError)*this.config.fragLoadingRetryDelay,this.config.fragLoadingMaxRetryTimeout);g.b.warn("mediaController: frag loading failed, retry in "+i+" ms"),this.retryDate=performance.now()+i,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.fragLoadError++,this.state=w.FRAG_LOADING_WAITING_RETRY}else g.b.error("mediaController: "+t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.state=w.ERROR;break;case b.a.LEVEL_LOAD_ERROR:case b.a.LEVEL_LOAD_TIMEOUT:this.state!==w.ERROR&&(t.fatal?(this.state=w.ERROR,g.b.warn("streamController: "+t.details+",switch to "+this.state+" state ...")):t.levelRetry||this.state!==w.WAITING_LEVEL||(this.state=w.IDLE));break;case b.a.BUFFER_FULL_ERROR:"main"!==t.parent||this.state!==w.PARSING&&this.state!==w.PARSED||(r?(this._reduceMaxBufferLength(this.config.maxBufferLength),this.state=w.IDLE):(g.b.warn("buffer full error also media.currentTime is not buffered, flush everything"),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)))}}},e.prototype._reduceMaxBufferLength=function(t){var e=this.config;return e.maxMaxBufferLength>=t&&(e.maxMaxBufferLength/=2,g.b.warn("main:reduce max buffer length to "+e.maxMaxBufferLength+"s"),!0)},e.prototype._checkBuffer=function(){var t=this.config,e=this.media;if(e&&0!==e.readyState){var r=e.currentTime,i=this.mediaBuffer?this.mediaBuffer:e,n=i.buffered;if(!this.loadedmetadata&&n.length)this.loadedmetadata=!0,this._seekToStartPos();else if(this.immediateSwitch)this.immediateLevelSwitchEnd();else{var a=!(e.paused&&e.readyState>1||e.ended||0===e.buffered.length),o=performance.now();if(r!==this.lastCurrentTime)this.stallReported&&(g.b.warn("playback not stuck anymore @"+r+", after "+Math.round(o-this.stalled)+"ms"),this.stallReported=!1),this.stalled=null,this.nudgeRetry=0;else if(a){var f=o-this.stalled,c=s.a.bufferInfo(e,r,t.maxBufferHole);if(!this.stalled)return void(this.stalled=o);f>=1e3&&this._reportStall(c.len),this._tryFixBufferStall(c,f)}}}},e.prototype.onFragLoadEmergencyAborted=function(){this.state=w.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tick()},e.prototype.onBufferFlushed=function(){var t=this.mediaBuffer?this.mediaBuffer:this.media;t&&this.fragmentTracker.detectEvictedFragments(u.a.ElementaryStreamTypes.VIDEO,t.buffered),this.state=w.IDLE,this.fragPrevious=null},e.prototype.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},e.prototype.computeLivePosition=function(t,e){var r=void 0!==this.config.liveSyncDuration?this.config.liveSyncDuration:this.config.liveSyncDurationCount*e.targetduration;return t+Math.max(0,e.totalduration-r)},e.prototype._tryFixBufferStall=function(t,e){var r=this.config,i=this.media,n=i.currentTime,a=this.fragmentTracker.getPartialFragment(n);a&&this._trySkipBufferHole(a),t.len>.5&&e>1e3*r.highBufferWatchdogPeriod&&(this.stalled=null,this._tryNudgeBuffer())},e.prototype._reportStall=function(t){var e=this.hls,r=this.media;this.stallReported||(this.stallReported=!0,g.b.warn("Playback stalling at @"+r.currentTime+" due to low buffer"),e.trigger(c.a.ERROR,{type:b.b.MEDIA_ERROR,details:b.a.BUFFER_STALLED_ERROR,fatal:!1,buffer:t}))},e.prototype._trySkipBufferHole=function(t){for(var e=this.hls,r=this.media,i=r.currentTime,n=0,a=0;a<r.buffered.length;a++){var o=r.buffered.start(a);if(i>=n&&i<o)return r.currentTime=Math.max(o,r.currentTime+.1),g.b.warn("skipping hole, adjusting currentTime from "+i+" to "+r.currentTime),this.stalled=null,void e.trigger(c.a.ERROR,{type:b.b.MEDIA_ERROR,details:b.a.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+i+" to "+r.currentTime,frag:t});n=r.buffered.end(a)}},e.prototype._tryNudgeBuffer=function(){var t=this.config,e=this.hls,r=this.media,i=r.currentTime,n=(this.nudgeRetry||0)+1;if(this.nudgeRetry=n,n<t.nudgeMaxRetry){var a=i+n*t.nudgeOffset;g.b.log("adjust currentTime from "+i+" to "+a),r.currentTime=a,e.trigger(c.a.ERROR,{type:b.b.MEDIA_ERROR,details:b.a.BUFFER_NUDGE_ON_STALL,fatal:!1})}else g.b.error("still stuck in high buffer @"+i+" after "+t.nudgeMaxRetry+", raise fatal error"),e.trigger(c.a.ERROR,{type:b.b.MEDIA_ERROR,details:b.a.BUFFER_STALLED_ERROR,fatal:!0})},e.prototype._seekToStartPos=function(){var t=this.media,e=t.currentTime,r=t.seeking?e:this.startPosition;e!==r&&(g.b.log("target start position not buffered, seek to buffered.start(0) "+r+" from current time "+e+" "),t.currentTime=r)},_(e,[{key:"state",set:function(t){if(this.state!==t){var e=this.state;this._state=t,g.b.log("main stream:"+e+"->"+t),this.hls.trigger(c.a.STREAM_STATE_TRANSITION,{previousState:e,nextState:t})}},get:function(){return this._state}},{key:"currentLevel",get:function(){var t=this.media;if(t){var e=this.getBufferedFrag(t.currentTime);if(e)return e.level}return-1}},{key:"nextBufferedFrag",get:function(){var t=this.media;return t?this.followingBufferedFrag(this.getBufferedFrag(t.currentTime)):null}},{key:"nextLevel",get:function(){var t=this.nextBufferedFrag;return t?t.level:-1}},{key:"liveSyncPosition",get:function(){return this._liveSyncPosition},set:function(t){this._liveSyncPosition=t}}]),e}(y.a);e.a=S},function(t,e,r){function i(t){function e(i){if(r[i])return r[i].exports;var n=r[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,e),n.l=!0,n.exports}var r={};e.m=t,e.c=r,e.i=function(t){return t},e.d=function(t,r,i){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/",e.oe=function(t){throw console.error(t),t};var i=e(e.s=ENTRY_MODULE);return i.default||i}function n(t){return(t+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function a(t,e,i){var a={};a[i]=[];var o=e.toString(),s=o.match(/^function\s?\(\w+,\s*\w+,\s*(\w+)\)/);if(!s)return a;for(var h,u=s[1],d=new RegExp("(\\\\n|\\W)"+n(u)+c,"g");h=d.exec(o);)"dll-reference"!==h[3]&&a[i].push(h[3]);for(d=new RegExp("\\("+n(u)+'\\("(dll-reference\\s('+f+'))"\\)\\)'+c,"g");h=d.exec(o);)t[h[2]]||(a[i].push(h[1]),t[h[2]]=r(h[1]).m),a[h[2]]=a[h[2]]||[],a[h[2]].push(h[4]);return a}function o(t){return Object.keys(t).reduce(function(e,r){return e||t[r].length>0},!1)}function s(t,e){for(var r={main:[e]},i={main:[]},n={main:{}};o(r);)for(var s=Object.keys(r),f=0;f<s.length;f++){var c=s[f],h=r[c],u=h.pop();if(n[c]=n[c]||{},!n[c][u]&&t[c][u]){n[c][u]=!0,i[c]=i[c]||[],i[c].push(u);for(var d=a(t,t[c][u],c),l=Object.keys(d),p=0;p<l.length;p++)r[l[p]]=r[l[p]]||[],r[l[p]]=r[l[p]].concat(d[l[p]])}}return i}var f="[\\.|\\-|\\+|\\w|/|@]+",c="\\((/\\*.*?\\*/)?s?.*?("+f+").*?\\)";t.exports=function(t,e){e=e||{};var n={main:r.m},a=e.all?{main:Object.keys(n)}:s(n,t),o="";Object.keys(a).filter(function(t){return"main"!==t}).forEach(function(t){for(var e=0;a[t][e];)e++;a[t].push(e),n[t][e]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",o=o+"var "+t+" = ("+i.toString().replace("ENTRY_MODULE",JSON.stringify(e))+")({"+a[t].map(function(e){return JSON.stringify(e)+": "+n[t][e].toString()}).join(",")+"});\n"}),o=o+"("+i.toString().replace("ENTRY_MODULE",JSON.stringify(t))+")({"+a.main.map(function(t){return JSON.stringify(t)+": "+n.main[t].toString()}).join(",")+"})(self);";var f=new window.Blob([o],{type:"text/javascript"});if(e.bare)return f;var c=window.URL||window.webkitURL||window.mozURL||window.msURL,h=c.createObjectURL(f),u=new window.Worker(h);return u.objectURL=h,u}},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=function(){function t(e,r){i(this,t),this.subtle=e,this.aesIV=r}return t.prototype.decrypt=function(t,e){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},e,t)},t}();e.a=n},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=function(){function t(e,r){i(this,t),this.subtle=e,this.key=r}return t.prototype.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},t}();e.a=n},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t){var e=t.byteLength,r=e&&new DataView(t).getUint8(e-1);return r?t.slice(0,e-r):t}var a=function(){function t(){i(this,t),this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.initTable()}return t.prototype.uint8ArrayToUint32Array_=function(t){for(var e=new DataView(t),r=new Uint32Array(4),i=0;i<4;i++)r[i]=e.getUint32(4*i);return r},t.prototype.initTable=function(){var t=this.sBox,e=this.invSBox,r=this.subMix,i=r[0],n=r[1],a=r[2],o=r[3],s=this.invSubMix,f=s[0],c=s[1],h=s[2],u=s[3],d=new Uint32Array(256),l=0,p=0,b=0;for(b=0;b<256;b++)d[b]=b<128?b<<1:b<<1^283;for(b=0;b<256;b++){var g=p^p<<1^p<<2^p<<3^p<<4;g=g>>>8^255&g^99,t[l]=g,e[g]=l;var v=d[l],y=d[v],m=d[y],_=257*d[g]^16843008*g;i[l]=_<<24|_>>>8,n[l]=_<<16|_>>>16,a[l]=_<<8|_>>>24,o[l]=_,_=16843009*m^65537*y^257*v^16843008*l,f[g]=_<<24|_>>>8,c[g]=_<<16|_>>>16,h[g]=_<<8|_>>>24,u[g]=_,l?(l=v^d[d[d[m^v]]],p^=d[d[p]]):l=p=1}},t.prototype.expandKey=function(t){for(var e=this.uint8ArrayToUint32Array_(t),r=!0,i=0;i<e.length&&r;)r=e[i]===this.key[i],i++;if(!r){this.key=e;var n=this.keySize=e.length;if(4!==n&&6!==n&&8!==n)throw new Error("Invalid aes key size="+n);var a=this.ksRows=4*(n+6+1),o=void 0,s=void 0,f=this.keySchedule=new Uint32Array(a),c=this.invKeySchedule=new Uint32Array(a),h=this.sBox,u=this.rcon,d=this.invSubMix,l=d[0],p=d[1],b=d[2],g=d[3],v=void 0,y=void 0;for(o=0;o<a;o++)o<n?v=f[o]=e[o]:(y=v,o%n==0?(y=y<<8|y>>>24,y=h[y>>>24]<<24|h[y>>>16&255]<<16|h[y>>>8&255]<<8|h[255&y],y^=u[o/n|0]<<24):n>6&&o%n==4&&(y=h[y>>>24]<<24|h[y>>>16&255]<<16|h[y>>>8&255]<<8|h[255&y]),f[o]=v=(f[o-n]^y)>>>0);for(s=0;s<a;s++)o=a-s,y=3&s?f[o]:f[o-4],c[s]=s<4||o<=4?y:l[h[y>>>24]]^p[h[y>>>16&255]]^b[h[y>>>8&255]]^g[h[255&y]],c[s]=c[s]>>>0}},t.prototype.networkToHostOrderSwap=function(t){return t<<24|(65280&t)<<8|(16711680&t)>>8|t>>>24},t.prototype.decrypt=function(t,e,r,i){for(var a=this.keySize+6,o=this.invKeySchedule,s=this.invSBox,f=this.invSubMix,c=f[0],h=f[1],u=f[2],d=f[3],l=this.uint8ArrayToUint32Array_(r),p=l[0],b=l[1],g=l[2],v=l[3],y=new Int32Array(t),m=new Int32Array(y.length),_=void 0,w=void 0,S=void 0,E=void 0,A=void 0,T=void 0,R=void 0,k=void 0,D=void 0,I=void 0,M=void 0,x=void 0,L=void 0,O=void 0,C=this.networkToHostOrderSwap;e<y.length;){for(D=C(y[e]),I=C(y[e+1]),M=C(y[e+2]),x=C(y[e+3]),A=D^o[0],T=x^o[1],R=M^o[2],k=I^o[3],L=4,O=1;O<a;O++)_=c[A>>>24]^h[T>>16&255]^u[R>>8&255]^d[255&k]^o[L],w=c[T>>>24]^h[R>>16&255]^u[k>>8&255]^d[255&A]^o[L+1],S=c[R>>>24]^h[k>>16&255]^u[A>>8&255]^d[255&T]^o[L+2],E=c[k>>>24]^h[A>>16&255]^u[T>>8&255]^d[255&R]^o[L+3],A=_,T=w,R=S,k=E,L+=4;_=s[A>>>24]<<24^s[T>>16&255]<<16^s[R>>8&255]<<8^s[255&k]^o[L],w=s[T>>>24]<<24^s[R>>16&255]<<16^s[k>>8&255]<<8^s[255&A]^o[L+1],S=s[R>>>24]<<24^s[k>>16&255]<<16^s[A>>8&255]<<8^s[255&T]^o[L+2],E=s[k>>>24]<<24^s[A>>16&255]<<16^s[T>>8&255]<<8^s[255&R]^o[L+3],L+=3,m[e]=C(_^p),m[e+1]=C(E^b),m[e+2]=C(S^g),m[e+3]=C(w^v),p=D,b=I,g=M,v=x,e+=4}return i?n(m.buffer):m.buffer},t.prototype.destroy=function(){this.key=void 0,this.keySize=void 0,this.ksRows=void 0,this.sBox=void 0,this.invSBox=void 0,this.subMix=void 0,this.invSubMix=void 0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.rcon=void 0},t}();e.a=a},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=r(103),a=r(2),o=r(40),s=function(){function t(e,r,n){i(this,t),this.observer=e,this.config=n,this.remuxer=r}return t.prototype.resetInitSegment=function(t,e,r,i){this._audioTrack={container:"audio/adts",type:"audio",id:0,sequenceNumber:0,isAAC:!0,samples:[],len:0,manifestCodec:e,duration:i,inputTimeScale:9e4}},t.prototype.resetTimeStamp=function(){},t.probe=function(t){if(!t)return!1;for(var e=o.a.getID3Data(t,0)||[],r=e.length,i=t.length;r<i;r++)if(n.e(t,r))return a.b.log("ADTS sync word found !"),!0;return!1},t.prototype.append=function(t,e,r,i){for(var s=this._audioTrack,f=o.a.getID3Data(t,0)||[],c=o.a.getTimeStamp(f),h=c?90*c:9e4*e,u=0,d=h,l=t.length,p=f.length,b=[{pts:d,dts:d,data:f}];p<l-1;)if(n.d(t,p)&&p+5<l){n.c(s,this.observer,t,p,s.manifestCodec);var g=n.a(s,t,p,h,u);if(!g){a.b.log("Unable to parse AAC frame");break}p+=g.length,d=g.sample.pts,u++}else o.a.isHeader(t,p)?(f=o.a.getID3Data(t,p),b.push({pts:d,dts:d,data:f}),p+=f.length):p++;this.remuxer.remux(s,{samples:[]},{samples:b,inputTimeScale:9e4},{samples:[]},e,r,i)},t.prototype.destroy=function(){},t}();e.a=s},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){try{var r=(new Date).valueOf(),i=new d.ModeOfOperation.ecb(e),n=t;if(t.length%16>0){var a=16*parseInt(t.length/16);n=n.slice(0,a),n=i.decrypt(n),t.set(n,0);var o=(new Date).valueOf();return h.b.log("parse pes extra time:"+(o-r)),t}n=t,n=i.decrypt(t);var o=(new Date).valueOf();return h.b.log("parse pes extra time:"+(o-r)),n}catch(e){return t}}var a=r(103),o=r(104),s=r(5),f=r(252),c=r(253),h=r(2),u=r(7),d=r(100),l=null,p="",b={video:1,audio:2,id3:3,text:4},g=function(){function t(e,r,a,o,s){if(i(this,t),this.observer=e,this.config=a,this.typeSupported=o,this.remuxer=r,this.sampleAes=null,this.url=s,l=n,a&&a._sce_dlgtqredxx&&a._sce_dlgtqredxx.length&&a._sce_dlgtqredxx[0].url){p=void 0;for(var f=0;f<a._sce_dlgtqredxx.length;++f)if(a._sce_dlgtqredxx[f].url===this.url){p=a._sce_dlgtqredxx[f].secData;break}}else p=a._sce_dlgtqredxx}return t.prototype.setDecryptData=function(t){null!=t&&null!=t.key&&"SAMPLE-AES"===t.method?this.sampleAes=new c.a(this.observer,this.config,t,this.discardEPB):this.sampleAes=null},t.probe=function(e){var r=t._syncOffset(e);return!(r<0)&&(r&&h.b.warn("MPEG2-TS detected but first sync word found @ offset "+r+", junk ahead ?"),!0)},t._syncOffset=function(t){for(var e=Math.min(1e3,t.length-564),r=0;r<e;){if(71===t[r]&&71===t[r+188]&&71===t[r+376])return r;r++}return-1},t.createTrack=function(t,e){return{container:"video"===t||"audio"===t?"video/mp2t":void 0,type:t,id:b[t],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],len:0,dropped:"video"===t?0:void 0,isAAC:"audio"===t||void 0,duration:"audio"===t?e:void 0}},t.prototype.resetInitSegment=function(e,r,i,n){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=t.createTrack("video",n),this._audioTrack=t.createTrack("audio",n),this._id3Track=t.createTrack("id3",n),this._txtTrack=t.createTrack("text",n),this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=r,this.videoCodec=i,this._duration=n},t.prototype.resetTimeStamp=function(){},t.prototype.append=function(e,r,i,n){var a=void 0,o=e.length,f=void 0,c=void 0,d=void 0,l=void 0,p=!1;this.contiguous=i;var b=this.pmtParsed,g=this._avcTrack,v=this._audioTrack,y=this._id3Track,m=g.pid,_=v.pid,w=y.pid,S=this._pmtId,E=g.pesData,A=v.pesData,T=y.pesData,R=this._parsePAT,k=this._parsePMT,D=this._parsePES,I=this._parseAVCPES.bind(this),M=this._parseAACPES.bind(this),x=this._parseMPEGPES.bind(this),L=this._parseID3PES.bind(this),O=t._syncOffset(e);for(o-=(o+O)%188,a=O;a<o;a+=188)if(71===e[a]){if(f=!!(64&e[a+1]),c=((31&e[a+1])<<8)+e[a+2],(48&e[a+3])>>4>1){if((d=a+5+e[a+4])===a+188)continue}else d=a+4;switch(c){case m:f&&(E&&(l=D(E))&&void 0!==l.pts&&I(l,!1),E={data:[],size:0}),E&&(E.data.push(e.subarray(d,a+188)),E.size+=a+188-d);break;case _:f&&(A&&(l=D(A))&&void 0!==l.pts&&(v.isAAC?M(l):x(l)),A={data:[],size:0}),A&&(A.data.push(e.subarray(d,a+188)),A.size+=a+188-d);break;case w:f&&(T&&(l=D(T))&&void 0!==l.pts&&L(l),T={data:[],size:0}),T&&(T.data.push(e.subarray(d,a+188)),T.size+=a+188-d);break;case 0:f&&(d+=e[d]+1),S=this._pmtId=R(e,d);break;case S:f&&(d+=e[d]+1);var C=k(e,d,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,null!=this.sampleAes);m=C.avc,m>0&&(g.pid=m),_=C.audio,_>0&&(v.pid=_,v.isAAC=C.isAAC),w=C.id3,w>0&&(y.pid=w),p&&!b&&(h.b.log("reparse from beginning"),p=!1,a=O-188),b=this.pmtParsed=!0;break;case 17:case 8191:break;default:p=!0}}else this.observer.trigger(s.a.ERROR,{type:u.b.MEDIA_ERROR,details:u.a.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});E&&(l=D(E))&&void 0!==l.pts?(I(l,!0),g.pesData=null):g.pesData=E,A&&(l=D(A))&&void 0!==l.pts?(v.isAAC?M(l):x(l),v.pesData=null):(A&&A.size&&h.b.log("last AAC PES packet truncated,might overlap between fragments"),v.pesData=A),T&&(l=D(T))&&void 0!==l.pts?(L(l),y.pesData=null):y.pesData=T,null==this.sampleAes?this.remuxer.remux(v,g,y,this._txtTrack,r,i,n):this.decryptAndRemux(v,g,y,this._txtTrack,r,i,n)},t.prototype.decryptAndRemux=function(t,e,r,i,n,a,o){if(t.samples&&t.isAAC){var s=this;this.sampleAes.decryptAacSamples(t.samples,0,function(){s.decryptAndRemuxAvc(t,e,r,i,n,a,o)})}else this.decryptAndRemuxAvc(t,e,r,i,n,a,o)},t.prototype.decryptAndRemuxAvc=function(t,e,r,i,n,a,o){if(e.samples){var s=this;this.sampleAes.decryptAvcSamples(e.samples,0,0,function(){s.remuxer.remux(t,e,r,i,n,a,o)})}else this.remuxer.remux(t,e,r,i,n,a,o)},t.prototype.destroy=function(){this._initPTS=this._initDTS=void 0,this._duration=0},t.prototype._parsePAT=function(t,e){return(31&t[e+10])<<8|t[e+11]},t.prototype._parsePMT=function(t,e,r,i){var n=void 0,a=void 0,o=void 0,s=void 0,f={audio:-1,avc:-1,id3:-1,isAAC:!0};for(n=(15&t[e+1])<<8|t[e+2],a=e+3+n-4,o=(15&t[e+10])<<8|t[e+11],e+=12+o;e<a;){switch(s=(31&t[e+1])<<8|t[e+2],t[e]){case 207:if(!i){h.b.log("unkown stream type:"+t[e]);break}case 15:-1===f.audio&&(f.audio=s);break;case 21:-1===f.id3&&(f.id3=s);break;case 219:if(!i){h.b.log("unkown stream type:"+t[e]);break}case 27:-1===f.avc&&(f.avc=s);break;case 3:case 4:r?-1===f.audio&&(f.audio=s,f.isAAC=!1):h.b.log("MPEG audio found, not supported in this browser for now");break;case 36:h.b.warn("HEVC stream type found, not supported for now");break;default:h.b.log("unkown stream type:"+t[e])}e+=5+((15&t[e+3])<<8|t[e+4])}return f},t.prototype._parsePES=function(t){var e=0,r=void 0,i=void 0,n=void 0,a=void 0,o=void 0,s=void 0,f=void 0,c=void 0,u=t.data;if(!t||0===t.size)return null;for(;u[0].length<19&&u.length>1;){var d=new Uint8Array(u[0].length+u[1].length);d.set(u[0]),d.set(u[1],u[0].length),u[0]=d,u.splice(1,1)}if(r=u[0],1===(r[0]<<16)+(r[1]<<8)+r[2]){if((n=(r[4]<<8)+r[5])&&n>t.size-6)return null;i=r[7],192&i&&(s=536870912*(14&r[9])+4194304*(255&r[10])+16384*(254&r[11])+128*(255&r[12])+(254&r[13])/2,s>4294967295&&(s-=8589934592),64&i?(f=536870912*(14&r[14])+4194304*(255&r[15])+16384*(254&r[16])+128*(255&r[17])+(254&r[18])/2,f>4294967295&&(f-=8589934592),s-f>54e5&&(h.b.warn(Math.round((s-f)/9e4)+"s delta between PTS and DTS, align them"),s=f)):f=s),a=r[8],c=a+9,t.size-=c,o=new Uint8Array(t.size);try{for(var b=0,g=u.length;b<g;b++){r=u[b];var v=r.byteLength;if(c){if(c>v){c-=v;continue}r=r.subarray(c),v-=c,c=0}o.set(r,e),e+=v}}catch(t){console.log(t)}return n&&(n-=a+3),p&&l&&(o=l(o,p)),{data:o,pts:s,dts:f,len:n}}return null},t.prototype.pushAccesUnit=function(t,e){if(t.units.length&&t.frame){var r=e.samples,i=r.length;!this.config.forceKeyFrameOnDiscontinuity||!0===t.key||e.sps&&(i||this.contiguous)?(t.id=i,r.push(t)):e.dropped++}t.debug.length&&h.b.log(t.pts+"/"+t.dts+":"+t.debug)},t.prototype._parseAVCPES=function(t,e){var r=this,i=this._avcTrack,n=this._parseAVCNALu(t.data),a=void 0,o=this.avcSample,c=void 0,h=!1,u=void 0,d=this.pushAccesUnit.bind(this),l=function(t,e,r,i){return{key:t,pts:e,dts:r,units:[],debug:i}};t.data=null,o&&n.length&&!i.audFound&&(d(o,i),o=this.avcSample=l(!1,t.pts,t.dts,"")),n.forEach(function(e){switch(e.type){case 1:c=!0,o||(o=r.avcSample=l(!0,t.pts,t.dts,"")),o.frame=!0;var n=e.data;if(h&&n.length>4){var p=new f.a(n).readSliceType();2!==p&&4!==p&&7!==p&&9!==p||(o.key=!0)}break;case 5:c=!0,o||(o=r.avcSample=l(!0,t.pts,t.dts,"")),o.key=!0,o.frame=!0;break;case 6:c=!0,"undefined"!=typeof Uint8Array&&(Uint8Array.prototype.slice||Object.defineProperty(Uint8Array.prototype,"slice",{value:Array.prototype.slice}));var n=e.data;if(n&&n.length>3&&6==n[0]&&5==n[1]){var b=n[2]-16;if(b>0&&n.length>b+19){var g=n.slice(19,b+19);r.observer.trigger(s.a.FRAG_PARSING_USERDATA,{dataContent:g})}}a=new f.a(r.discardEPB(e.data)),a.readUByte();for(var v=0,y=0,m=!1,_=0;!m&&a.bytesAvailable>1;){v=0;do{_=a.readUByte(),v+=_}while(255===_);y=0;do{_=a.readUByte(),y+=_}while(255===_);if(4===v&&0!==a.bytesAvailable){m=!0;if(181===a.readUByte()){if(49===a.readUShort()){if(1195456820===a.readUInt()){if(3===a.readUByte()){var w=a.readUByte(),S=a.readUByte(),E=31&w,A=[w,S];for(u=0;u<E;u++)A.push(a.readUByte()),A.push(a.readUByte()),A.push(a.readUByte());r._insertSampleInOrder(r._txtTrack.samples,{type:3,pts:t.pts,bytes:A})}}}}}else if(y<a.bytesAvailable)for(u=0;u<y;u++)a.readUByte()}break;case 7:if(c=!0,h=!0,!i.sps){a=new f.a(e.data);var T=a.readSPS();i.width=T.width,i.height=T.height,i.pixelRatio=T.pixelRatio,i.sps=[e.data],i.duration=r._duration;var R=e.data.subarray(1,4),k="avc1.";for(u=0;u<3;u++){var D=R[u].toString(16);D.length<2&&(D="0"+D),k+=D}i.codec=k}break;case 8:c=!0,i.pps||(i.pps=[e.data]);break;case 9:c=!1,i.audFound=!0,o&&d(o,i),o=r.avcSample=l(!1,t.pts,t.dts,"");break;case 12:c=!1;break;default:c=!1,o&&(o.debug+="unknown NAL "+e.type+" ")}if(o&&c){o.units.push(e)}}),e&&o&&(d(o,i),this.avcSample=null)},t.prototype._insertSampleInOrder=function(t,e){var r=t.length;if(r>0){if(e.pts>=t[r-1].pts)t.push(e);else for(var i=r-1;i>=0;i--)if(e.pts<t[i].pts){t.splice(i,0,e);break}}else t.push(e)},t.prototype._getLastNalUnit=function(){var t=this.avcSample,e=void 0;if(!t||0===t.units.length){var r=this._avcTrack,i=r.samples;t=i[i.length-1]}if(t){var n=t.units;e=n[n.length-1]}return e},t.prototype._parseAVCNALu=function(t){var e=0,r=t.byteLength,i=void 0,n=void 0,a=this._avcTrack,o=a.naluState||0,s=o,f=[],c=void 0,h=void 0,u=-1,d=void 0;for(-1===o&&(u=0,d=31&t[0],o=0,e=1);e<r;)if(i=t[e++],o)if(1!==o)if(i)if(1===i){if(u>=0)c={data:t.subarray(u,e-o-1),type:d},f.push(c);else{var l=this._getLastNalUnit();if(l&&(s&&e<=4-s&&l.state&&(l.data=l.data.subarray(0,l.data.byteLength-s)),(n=e-o-1)>0)){var p=new Uint8Array(l.data.byteLength+n);p.set(l.data,0),p.set(t.subarray(0,n),l.data.byteLength),l.data=p}}e<r?(h=31&t[e],u=e,d=h,o=0):o=-1}else o=0;else o=3;else o=i?0:2;else o=i?0:1;if(u>=0&&o>=0&&(c={data:t.subarray(u,r),type:d,state:o},f.push(c)),0===f.length){var b=this._getLastNalUnit();if(b){var g=new Uint8Array(b.data.byteLength+t.byteLength);g.set(b.data,0),g.set(t,b.data.byteLength),b.data=g}}return a.naluState=o,f},t.prototype.discardEPB=function(t){for(var e=t.byteLength,r=[],i=1,n=void 0,a=void 0;i<e-2;)0===t[i]&&0===t[i+1]&&3===t[i+2]?(r.push(i+2),i+=2):i++;if(0===r.length)return t;n=e-r.length,a=new Uint8Array(n);var o=0;for(i=0;i<n;o++,i++)o===r[0]&&(o++,r.shift()),a[i]=t[o];return a},t.prototype._parseAACPES=function(t){var e=this._audioTrack,r=t.data,i=t.pts,n=this.aacOverFlow,o=this.aacLastPTS,f=void 0,c=void 0,d=void 0,l=void 0,p=void 0;if(n){var b=new Uint8Array(n.byteLength+r.byteLength);b.set(n,0),b.set(r,n.byteLength),r=b}for(d=0,p=r.length;d<p-1&&!a.d(r,d);d++);if(d){var g=void 0,v=void 0;if(d<p-1?(g="AAC PES did not start with ADTS header,offset:"+d,v=!1):(g="no ADTS header found in AAC PES",v=!0),h.b.warn("parsing error:"+g),this.observer.trigger(s.a.ERROR,{type:u.b.MEDIA_ERROR,details:u.a.FRAG_PARSING_ERROR,fatal:v,reason:g}),v)return}if(a.c(e,this.observer,r,d,this.audioCodec),c=0,f=a.b(e.samplerate),n&&o){var y=o+f;Math.abs(y-i)>1&&(h.b.log("AAC: align PTS for overlapping frames by "+Math.round((y-i)/90)),i=y)}for(;d<p;)if(a.d(r,d)&&d+5<p){var m=a.a(e,r,d,i,c);if(!m)break;d+=m.length,l=m.sample.pts,c++}else d++;n=d<p?r.subarray(d,p):null,this.aacOverFlow=n,this.aacLastPTS=l},t.prototype._parseMPEGPES=function(t){for(var e=t.data,r=e.length,i=0,n=0,a=t.pts;n<r;)if(o.a.isHeader(e,n)){var s=o.a.appendFrame(this._audioTrack,e,n,a,i);if(!s)break;n+=s.length,i++}else n++},t.prototype._parseID3PES=function(t){this._id3Track.samples.push(t)},t}();e.a=g},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=r(2),a=function(){function t(e){i(this,t),this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}return t.prototype.loadWord=function(){var t=this.data,e=this.bytesAvailable,r=t.byteLength-e,i=new Uint8Array(4),n=Math.min(4,e);if(0===n)throw new Error("no bytes available");i.set(t.subarray(r,r+n)),this.word=new DataView(i.buffer).getUint32(0),this.bitsAvailable=8*n,this.bytesAvailable-=n},t.prototype.skipBits=function(t){var e=void 0;this.bitsAvailable>t?(this.word<<=t,this.bitsAvailable-=t):(t-=this.bitsAvailable,e=t>>3,t-=e>>3,this.bytesAvailable-=e,this.loadWord(),this.word<<=t,this.bitsAvailable-=t)},t.prototype.readBits=function(t){var e=Math.min(this.bitsAvailable,t),r=this.word>>>32-e;return t>32&&n.b.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=e,this.bitsAvailable>0?this.word<<=e:this.bytesAvailable>0&&this.loadWord(),e=t-e,e>0&&this.bitsAvailable?r<<e|this.readBits(e):r},t.prototype.skipLZ=function(){var t=void 0;for(t=0;t<this.bitsAvailable;++t)if(0!=(this.word&2147483648>>>t))return this.word<<=t,this.bitsAvailable-=t,t;return this.loadWord(),t+this.skipLZ()},t.prototype.skipUEG=function(){this.skipBits(1+this.skipLZ())},t.prototype.skipEG=function(){this.skipBits(1+this.skipLZ())},t.prototype.readUEG=function(){var t=this.skipLZ();return this.readBits(t+1)-1},t.prototype.readEG=function(){var t=this.readUEG();return 1&t?1+t>>>1:-1*(t>>>1)},t.prototype.readBoolean=function(){return 1===this.readBits(1)},t.prototype.readUByte=function(){return this.readBits(8)},t.prototype.readUShort=function(){return this.readBits(16)},t.prototype.readUInt=function(){return this.readBits(32)},t.prototype.skipScalingList=function(t){var e=8,r=8,i=void 0,n=void 0;for(i=0;i<t;i++)0!==r&&(n=this.readEG(),r=(e+n+256)%256),e=0===r?e:r},t.prototype.readSPS=function(){var t=0,e=0,r=0,i=0,n=void 0,a=void 0,o=void 0,s=void 0,f=void 0,c=void 0,h=void 0,u=this.readUByte.bind(this),d=this.readBits.bind(this),l=this.readUEG.bind(this),p=this.readBoolean.bind(this),b=this.skipBits.bind(this),g=this.skipEG.bind(this),v=this.skipUEG.bind(this),y=this.skipScalingList.bind(this);if(u(),n=u(),d(5),b(3),u(),v(),100===n||110===n||122===n||244===n||44===n||83===n||86===n||118===n||128===n){var m=l();if(3===m&&b(1),v(),v(),b(1),p())for(c=3!==m?8:12,h=0;h<c;h++)p()&&y(h<6?16:64)}v();var _=l();if(0===_)l();else if(1===_)for(b(1),g(),g(),a=l(),h=0;h<a;h++)g();v(),b(1),o=l(),s=l(),f=d(1),0===f&&b(1),b(1),p()&&(t=l(),e=l(),r=l(),i=l());var w=[1,1];if(p()&&p()){switch(u()){case 1:w=[1,1];break;case 2:w=[12,11];break;case 3:w=[10,11];break;case 4:w=[16,11];break;case 5:w=[40,33];break;case 6:w=[24,11];break;case 7:w=[20,11];break;case 8:w=[32,11];break;case 9:w=[80,33];break;case 10:w=[18,11];break;case 11:w=[15,11];break;case 12:w=[64,33];break;case 13:w=[160,99];break;case 14:w=[4,3];break;case 15:w=[3,2];break;case 16:w=[2,1];break;case 255:w=[u()<<8|u(),u()<<8|u()]}}return{width:Math.ceil(16*(o+1)-2*t-2*e),height:(2-f)*(s+1)*16-(f?2:4)*(r+i),pixelRatio:w}},t.prototype.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},t}();e.a=a},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=r(56),a=function(){function t(e,r,a,o){i(this,t),this.decryptdata=a,this.discardEPB=o,this.decrypter=new n.a(e,r,{removePKCS7Padding:!1})}return t.prototype.decryptBuffer=function(t,e){this.decrypter.decrypt(t,this.decryptdata.key.buffer,this.decryptdata.iv.buffer,e)},t.prototype.decryptAacSample=function(t,e,r,i){var n=t[e].unit,a=n.subarray(16,n.length-n.length%16),o=a.buffer.slice(a.byteOffset,a.byteOffset+a.length),s=this;this.decryptBuffer(o,function(a){a=new Uint8Array(a),n.set(a,16),i||s.decryptAacSamples(t,e+1,r)})},t.prototype.decryptAacSamples=function(t,e,r){for(;;e++){if(e>=t.length)return void r();if(!(t[e].unit.length<32)){var i=this.decrypter.isSync();if(this.decryptAacSample(t,e,r,i),!i)return}}},t.prototype.getAvcEncryptedData=function(t){for(var e=16*Math.floor((t.length-48)/160)+16,r=new Int8Array(e),i=0,n=32;n<=t.length-16;n+=160,i+=16)r.set(t.subarray(n,n+16),i);return r},t.prototype.getAvcDecryptedUnit=function(t,e){e=new Uint8Array(e);for(var r=0,i=32;i<=t.length-16;i+=160,r+=16)t.set(e.subarray(r,r+16),i);return t},t.prototype.decryptAvcSample=function(t,e,r,i,n,a){var o=this.discardEPB(n.data),s=this.getAvcEncryptedData(o),f=this;this.decryptBuffer(s.buffer,function(s){n.data=f.getAvcDecryptedUnit(o,s),a||f.decryptAvcSamples(t,e,r+1,i)})},t.prototype.decryptAvcSamples=function(t,e,r,i){for(;;e++,r=0){if(e>=t.length)return void i();for(var n=t[e].units;!(r>=n.length);r++){var a=n[r];if(!(a.data.length<=48||1!==a.type&&5!==a.type)){var o=this.decrypter.isSync();if(this.decryptAvcSample(t,e,r,i,a,o),!o)return}}}},t}();e.a=a},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=r(40),a=r(2),o=r(104),s=function(){function t(e,r,n){i(this,t),this.observer=e,this.config=n,this.remuxer=r}return t.prototype.resetInitSegment=function(t,e,r,i){this._audioTrack={container:"audio/mpeg",type:"audio",id:-1,sequenceNumber:0,isAAC:!1,samples:[],len:0,manifestCodec:e,duration:i,inputTimeScale:9e4}},t.prototype.resetTimeStamp=function(){},t.probe=function(t){var e=void 0,r=void 0,i=n.a.getID3Data(t,0);if(i&&void 0!==n.a.getTimeStamp(i))for(e=i.length,r=Math.min(t.length-1,e+100);e<r;e++)if(o.a.probe(t,e))return a.b.log("MPEG Audio sync word found !"),!0;return!1},t.prototype.append=function(t,e,r,i){for(var a=n.a.getID3Data(t,0),s=n.a.getTimeStamp(a),f=s?90*s:9e4*e,c=a.length,h=t.length,u=0,d=0,l=this._audioTrack,p=[{pts:f,dts:f,data:a}];c<h;)if(o.a.isHeader(t,c)){var b=o.a.appendFrame(l,t,c,f,u);if(!b)break;c+=b.length,d=b.sample.pts,u++}else n.a.isHeader(t,c)?(a=n.a.getID3Data(t,c),p.push({pts:d,dts:d,data:a}),c+=a.length):c++;this.remuxer.remux(l,{samples:[]},{samples:p,inputTimeScale:9e4},{samples:[]},e,r,i)},t.prototype.destroy=function(){},t}();e.a=s},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=r(256),a=r(257),o=r(5),s=r(7),f=r(2),c=function(){function t(e,r,n,a){i(this,t),this.observer=e,this.config=r,this.typeSupported=n;var o=navigator.userAgent;this.isSafari=a&&a.indexOf("Apple")>-1&&o&&!o.match("CriOS"),this.ISGenerated=!1}return t.prototype.destroy=function(){},t.prototype.resetTimeStamp=function(t){this._initPTS=this._initDTS=t},t.prototype.resetInitSegment=function(){this.ISGenerated=!1},t.prototype.remux=function(t,e,r,i,n,a,s){if(this.ISGenerated||this.generateIS(t,e,n),this.ISGenerated){var c=t.samples.length,h=e.samples.length,u=n,d=n;if(c&&h){var l=(t.samples[0].dts-e.samples[0].dts)/e.inputTimeScale;u+=Math.max(0,l),d+=Math.max(0,-l)}if(c){t.timescale||(f.b.warn("regenerate InitSegment as audio detected"),this.generateIS(t,e,n));var p=this.remuxAudio(t,u,a,s);if(h){var b=void 0;p&&(b=p.endPTS-p.startPTS),e.timescale||(f.b.warn("regenerate InitSegment as video detected"),this.generateIS(t,e,n)),this.remuxVideo(e,d,a,b,s)}}else if(h){var g=this.remuxVideo(e,d,a,0,s);g&&t.codec&&this.remuxEmptyAudio(t,u,a,g)}}r.samples.length&&this.remuxID3(r,n),i.samples.length&&this.remuxText(i,n),this.observer.trigger(o.a.FRAG_PARSED)},t.prototype.generateIS=function(t,e,r){var i=this.observer,n=t.samples,c=e.samples,h=this.typeSupported,u="audio/mp4",d={},l={tracks:d},p=void 0===this._initPTS,b=void 0,g=void 0;if(p&&(b=g=1/0),t.config&&n.length&&(t.timescale=t.samplerate,f.b.log("audio sampling rate : "+t.samplerate),t.isAAC||(h.mpeg?(u="audio/mpeg",t.codec=""):h.mp3&&(t.codec="mp3")),d.audio={container:u,codec:t.codec,initSegment:!t.isAAC&&h.mpeg?new Uint8Array:a.a.initSegment([t]),metadata:{channelCount:t.channelCount}},p&&(b=g=n[0].pts-t.inputTimeScale*r)),e.sps&&e.pps&&c.length){var v=e.inputTimeScale;e.timescale=v,d.video={container:"video/mp4",codec:e.codec,initSegment:a.a.initSegment([e]),metadata:{width:e.width,height:e.height}},p&&(b=Math.min(b,c[0].pts-v*r),g=Math.min(g,c[0].dts-v*r),this.observer.trigger(o.a.INIT_PTS_FOUND,{initPTS:b}))}Object.keys(d).length?(i.trigger(o.a.FRAG_PARSING_INIT_SEGMENT,l),this.ISGenerated=!0,p&&(this._initPTS=b,this._initDTS=g)):i.trigger(o.a.ERROR,{type:s.b.MEDIA_ERROR,details:s.a.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})},t.prototype.remuxVideo=function(t,e,r,i,n){var c=8,h=t.timescale,u=void 0,d=void 0,l=void 0,p=void 0,b=void 0,g=void 0,v=void 0,y=t.samples,m=[],_=y.length,w=this._PTSNormalize,S=this._initDTS,E=this.nextAvcDts,A=this.isSafari;if(0!==_){A&&(r|=y.length&&E&&(n&&Math.abs(e-E/h)<.1||Math.abs(y[0].pts-E-S)<h/5)),r||(E=e*h),y.forEach(function(t){t.pts=w(t.pts-S,E),t.dts=w(t.dts-S,E)}),y.sort(function(t,e){var r=t.dts-e.dts,i=t.pts-e.pts;return r||i||t.id-e.id});var T=y.reduce(function(t,e){return Math.max(Math.min(t,e.pts-e.dts),-18e3)},0);if(T<0){f.b.warn("PTS < DTS detected in video samples, shifting DTS by "+Math.round(T/90)+" ms to overcome this issue");for(var R=0;R<y.length;R++)y[R].dts+=T}var k=y[0];b=Math.max(k.dts,0),p=Math.max(k.pts,0);var D=Math.round((b-E)/90);r&&D&&(D>1?f.b.log("AVC:"+D+" ms hole between fragments detected,filling it"):D<-1&&f.b.log("AVC:"+-D+" ms overlapping between fragments detected"),b=E,y[0].dts=b,p=Math.max(p-D,E),y[0].pts=p,f.b.log("Video/PTS/DTS adjusted: "+Math.round(p/90)+"/"+Math.round(b/90)+",delta:"+D+" ms")),b,k=y[y.length-1],v=Math.max(k.dts,0),g=Math.max(k.pts,0,v),A&&(u=Math.round((v-b)/(y.length-1)));for(var I=0,M=0,x=0;x<_;x++){for(var L=y[x],O=L.units,C=O.length,P=0,B=0;B<C;B++)P+=O[B].data.length;M+=P,I+=C,L.length=P,L.dts=A?b+x*u:Math.max(L.dts,b),L.pts=Math.max(L.pts,L.dts)}var N=M+4*I+8;try{d=new Uint8Array(N)}catch(t){return void this.observer.trigger(o.a.ERROR,{type:s.b.MUX_ERROR,details:s.a.REMUX_ALLOC_ERROR,fatal:!1,bytes:N,reason:"fail allocating video mdat "+N})}var F=new DataView(d.buffer);F.setUint32(0,N),d.set(a.a.types.mdat,4);for(var U=0;U<_;U++){for(var j=y[U],G=j.units,K=0,z=void 0,H=0,q=G.length;H<q;H++){var V=G[H],W=V.data,Y=V.data.byteLength;F.setUint32(c,Y),c+=4,d.set(W,c),c+=Y,K+=4+Y}if(A)z=Math.max(0,u*Math.round((j.pts-j.dts)/u));else{if(U<_-1)u=y[U+1].dts-j.dts;else{var X=this.config,Z=j.dts-y[U>0?U-1:U].dts;if(X.stretchShortVideoTrack){var J=X.maxBufferHole,Q=Math.floor(J*h),$=(i?p+i*h:this.nextAudioPts)-j.pts;$>Q?(u=$-Z,u<0&&(u=Z),f.b.log("It is approximately "+$/90+" ms to the next segment; using duration "+u/90+" ms for the last video frame.")):u=Z}else u=Z}z=Math.round(j.pts-j.dts)}m.push({size:K,duration:u,cts:z,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:j.key?2:1,isNonSync:j.key?0:1}})}this.nextAvcDts=v+u;var tt=t.dropped;if(t.len=0,t.nbNalu=0,t.dropped=0,m.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var et=m[0].flags;et.dependsOn=2,et.isNonSync=0}t.samples=m,l=a.a.moof(t.sequenceNumber++,b,t),t.samples=[];var rt={data1:l,data2:d,startPTS:p/h,endPTS:(g+u)/h,startDTS:b/h,endDTS:this.nextAvcDts/h,type:"video",hasAudio:!1,hasVideo:!0,nb:m.length,dropped:tt};return this.observer.trigger(o.a.FRAG_PARSING_DATA,rt),rt}},t.prototype.remuxAudio=function(t,e,r,i){var c=t.inputTimeScale,h=t.timescale,u=c/h,d=t.isAAC?1024:1152,l=d*u,p=this._PTSNormalize,b=this._initDTS,g=!t.isAAC&&this.typeSupported.mpeg,v=void 0,y=void 0,m=void 0,_=void 0,w=void 0,S=void 0,E=void 0,A=t.samples,T=[],R=this.nextAudioPts;if(r|=A.length&&R&&(i&&Math.abs(e-R/c)<.1||Math.abs(A[0].pts-R-b)<20*l),A.forEach(function(t){t.pts=t.dts=p(t.pts-b,e*c)}),A=A.filter(function(t){return t.pts>=0}),0!==A.length){if(r||(R=i?e*c:A[0].pts),t.isAAC)for(var k=this.config.maxAudioFramesDrift,D=0,I=R;D<A.length;){var M,x=A[D],L=x.pts;M=L-I;var O=Math.abs(1e3*M/c);if(M<=-k*l)f.b.warn("Dropping 1 audio frame @ "+(I/c).toFixed(3)+"s due to "+Math.round(O)+" ms overlap."),A.splice(D,1),t.len-=x.unit.length;else if(M>=k*l&&O<1e4&&I){var C=Math.round(M/l);f.b.warn("Injecting "+C+" audio frame @ "+(I/c).toFixed(3)+"s due to "+Math.round(1e3*M/c)+" ms gap.");for(var P=0;P<C;P++){var B=Math.max(I,0);m=n.a.getSilentFrame(t.manifestCodec||t.codec,t.channelCount),m||(f.b.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),m=x.unit.subarray()),A.splice(D,0,{unit:m,pts:B,dts:B}),t.len+=m.length,I+=l,D++}x.pts=x.dts=I,I+=l,D++}else Math.abs(M),x.pts=x.dts=I,I+=l,D++}for(var N=0,F=A.length;N<F;N++){var U=A[N],j=U.unit,G=U.pts;if(void 0!==E)y.duration=Math.round((G-E)/u);else{var K=Math.round(1e3*(G-R)/c),z=0;if(r&&t.isAAC&&K){if(K>0&&K<1e4)z=Math.round((G-R)/l),f.b.log(K+" ms hole between AAC samples detected,filling it"),z>0&&(m=n.a.getSilentFrame(t.manifestCodec||t.codec,t.channelCount),m||(m=j.subarray()),t.len+=z*m.length);else if(K<-12){f.b.log("drop overlapping AAC sample, expected/parsed/delta:"+(R/c).toFixed(3)+"s/"+(G/c).toFixed(3)+"s/"+-K+"ms"),t.len-=j.byteLength;continue}G=R}if(S=G,!(t.len>0))return;var H=g?t.len:t.len+8;v=g?0:8;try{_=new Uint8Array(H)}catch(t){return void this.observer.trigger(o.a.ERROR,{type:s.b.MUX_ERROR,details:s.a.REMUX_ALLOC_ERROR,fatal:!1,bytes:H,reason:"fail allocating audio mdat "+H})}if(!g){new DataView(_.buffer).setUint32(0,H),_.set(a.a.types.mdat,4)}for(var q=0;q<z;q++)m=n.a.getSilentFrame(t.manifestCodec||t.codec,t.channelCount),m||(f.b.log("Unable to get silent frame for given audio codec; duplicating this frame instead."),m=j.subarray()),_.set(m,v),v+=m.byteLength,y={size:m.byteLength,cts:0,duration:1024,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},T.push(y)}_.set(j,v);var V=j.byteLength;v+=V,y={size:V,cts:0,duration:0,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},T.push(y),E=G}var W=0,Y=T.length;if(Y>=2&&(W=T[Y-2].duration,y.duration=W),Y){this.nextAudioPts=R=E+u*W,t.len=0,t.samples=T,w=g?new Uint8Array:a.a.moof(t.sequenceNumber++,S/u,t),t.samples=[];var X=S/c,Z=R/c,J={data1:w,data2:_,startPTS:X,endPTS:Z,startDTS:X,endDTS:Z,type:"audio",hasAudio:!0,hasVideo:!1,nb:Y};return this.observer.trigger(o.a.FRAG_PARSING_DATA,J),J}return null}},t.prototype.remuxEmptyAudio=function(t,e,r,i){var a=t.inputTimeScale,o=t.samplerate?t.samplerate:a,s=a/o,c=this.nextAudioPts,h=(void 0!==c?c:i.startDTS*a)+this._initDTS,u=i.endDTS*a+this._initDTS,d=1024*s,l=Math.ceil((u-h)/d),p=n.a.getSilentFrame(t.manifestCodec||t.codec,t.channelCount);if(f.b.warn("remux empty Audio"),!p)return void f.b.trace("Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!");for(var b=[],g=0;g<l;g++){var v=h+g*d;b.push({unit:p,pts:v,dts:v}),t.len+=p.length}t.samples=b,this.remuxAudio(t,e,r)},t.prototype.remuxID3=function(t,e){var r=t.samples.length,i=void 0,n=t.inputTimeScale,a=this._initPTS,s=this._initDTS;if(r){for(var f=0;f<r;f++)i=t.samples[f],i.pts=(i.pts-a)/n,i.dts=(i.dts-s)/n;this.observer.trigger(o.a.FRAG_PARSING_METADATA,{samples:t.samples})}t.samples=[],e=e},t.prototype.remuxText=function(t,e){t.samples.sort(function(t,e){return t.pts-e.pts});var r=t.samples.length,i=void 0,n=t.inputTimeScale,a=this._initPTS;if(r){for(var s=0;s<r;s++)i=t.samples[s],i.pts=(i.pts-a)/n;this.observer.trigger(o.a.FRAG_PARSING_USERDATA,{samples:t.samples})}t.samples=[],e=e},t.prototype._PTSNormalize=function(t,e){var r=void 0;if(void 0===e)return t;for(r=e<t?-8589934592:8589934592;Math.abs(t-e)>4294967296;)t+=r;return t},t}();e.a=c},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=function(){function t(){i(this,t)}return t.getSilentFrame=function(t,e){switch(t){case"mp4a.40.2":if(1===e)return new Uint8Array([0,200,0,128,35,128]);if(2===e)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(1===e)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===e)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===e)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null},t}();e.a=n},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=Math.pow(2,32)-1,a=function(){function t(){i(this,t)}return t.init=function(){t.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var e=void 0;for(e in t.types)t.types.hasOwnProperty(e)&&(t.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);var r=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),i=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);t.HDLR_TYPES={video:r,audio:i};var n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),a=new Uint8Array([0,0,0,0,0,0,0,0]);t.STTS=t.STSC=t.STCO=a,t.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),t.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),t.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),t.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var o=new Uint8Array([105,115,111,109]),s=new Uint8Array([97,118,99,49]),f=new Uint8Array([0,0,0,1]);t.FTYP=t.box(t.types.ftyp,o,f,o,s),t.DINF=t.box(t.types.dinf,t.box(t.types.dref,n))},t.box=function(t){for(var e=Array.prototype.slice.call(arguments,1),r=8,i=e.length,n=i,a=void 0;i--;)r+=e[i].byteLength;for(a=new Uint8Array(r),a[0]=r>>24&255,a[1]=r>>16&255,a[2]=r>>8&255,a[3]=255&r,a.set(t,4),i=0,r=8;i<n;i++)a.set(e[i],r),r+=e[i].byteLength;return a},t.hdlr=function(e){return t.box(t.types.hdlr,t.HDLR_TYPES[e])},t.mdat=function(e){return t.box(t.types.mdat,e)},t.mdhd=function(e,r){r*=e;var i=Math.floor(r/(n+1)),a=Math.floor(r%(n+1));return t.box(t.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,i>>24,i>>16&255,i>>8&255,255&i,a>>24,a>>16&255,a>>8&255,255&a,85,196,0,0]))},t.mdia=function(e){return t.box(t.types.mdia,t.mdhd(e.timescale,e.duration),t.hdlr(e.type),t.minf(e))},t.mfhd=function(e){return t.box(t.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,255&e]))},t.minf=function(e){return"audio"===e.type?t.box(t.types.minf,t.box(t.types.smhd,t.SMHD),t.DINF,t.stbl(e)):t.box(t.types.minf,t.box(t.types.vmhd,t.VMHD),t.DINF,t.stbl(e))},t.moof=function(e,r,i){return t.box(t.types.moof,t.mfhd(e),t.traf(i,r))},t.moov=function(e){for(var r=e.length,i=[];r--;)i[r]=t.trak(e[r]);return t.box.apply(null,[t.types.moov,t.mvhd(e[0].timescale,e[0].duration)].concat(i).concat(t.mvex(e)))},t.mvex=function(e){for(var r=e.length,i=[];r--;)i[r]=t.trex(e[r]);return t.box.apply(null,[t.types.mvex].concat(i))},t.mvhd=function(e,r){r*=e;var i=Math.floor(r/(n+1)),a=Math.floor(r%(n+1)),o=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,i>>24,i>>16&255,i>>8&255,255&i,a>>24,a>>16&255,a>>8&255,255&a,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return t.box(t.types.mvhd,o)},t.sdtp=function(e){var r=e.samples||[],i=new Uint8Array(4+r.length),n=void 0,a=void 0;for(a=0;a<r.length;a++)n=r[a].flags,i[a+4]=n.dependsOn<<4|n.isDependedOn<<2|n.hasRedundancy;return t.box(t.types.sdtp,i)},t.stbl=function(e){return t.box(t.types.stbl,t.stsd(e),t.box(t.types.stts,t.STTS),t.box(t.types.stsc,t.STSC),t.box(t.types.stsz,t.STSZ),t.box(t.types.stco,t.STCO))},t.avc1=function(e){var r=[],i=[],n=void 0,a=void 0,o=void 0;for(n=0;n<e.sps.length;n++)a=e.sps[n],o=a.byteLength,r.push(o>>>8&255),r.push(255&o),r=r.concat(Array.prototype.slice.call(a));for(n=0;n<e.pps.length;n++)a=e.pps[n],o=a.byteLength,i.push(o>>>8&255),i.push(255&o),i=i.concat(Array.prototype.slice.call(a));var s=t.box(t.types.avcC,new Uint8Array([1,r[3],r[4],r[5],255,224|e.sps.length].concat(r).concat([e.pps.length]).concat(i))),f=e.width,c=e.height,h=e.pixelRatio[0],u=e.pixelRatio[1];return t.box(t.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,f>>8&255,255&f,c>>8&255,255&c,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),s,t.box(t.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),t.box(t.types.pasp,new Uint8Array([h>>24,h>>16&255,h>>8&255,255&h,u>>24,u>>16&255,u>>8&255,255&u])))},t.esds=function(t){var e=t.config.length;return new Uint8Array([0,0,0,0,3,23+e,0,1,0,4,15+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([e]).concat(t.config).concat([6,1,2]))},t.mp4a=function(e){var r=e.samplerate;return t.box(t.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,r>>8&255,255&r,0,0]),t.box(t.types.esds,t.esds(e)))},t.mp3=function(e){var r=e.samplerate;return t.box(t.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,r>>8&255,255&r,0,0]))},t.stsd=function(e){return"audio"===e.type?e.isAAC||"mp3"!==e.codec?t.box(t.types.stsd,t.STSD,t.mp4a(e)):t.box(t.types.stsd,t.STSD,t.mp3(e)):t.box(t.types.stsd,t.STSD,t.avc1(e))},t.tkhd=function(e){var r=e.id,i=e.duration*e.timescale,a=e.width,o=e.height,s=Math.floor(i/(n+1)),f=Math.floor(i%(n+1));return t.box(t.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,r>>24&255,r>>16&255,r>>8&255,255&r,0,0,0,0,s>>24,s>>16&255,s>>8&255,255&s,f>>24,f>>16&255,f>>8&255,255&f,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,a>>8&255,255&a,0,0,o>>8&255,255&o,0,0]))},t.traf=function(e,r){var i=t.sdtp(e),a=e.id,o=Math.floor(r/(n+1)),s=Math.floor(r%(n+1));return t.box(t.types.traf,t.box(t.types.tfhd,new Uint8Array([0,0,0,0,a>>24,a>>16&255,a>>8&255,255&a])),t.box(t.types.tfdt,new Uint8Array([1,0,0,0,o>>24,o>>16&255,o>>8&255,255&o,s>>24,s>>16&255,s>>8&255,255&s])),t.trun(e,i.length+16+20+8+16+8+8),i)},t.trak=function(e){return e.duration=e.duration||4294967295,t.box(t.types.trak,t.tkhd(e),t.mdia(e))},t.trex=function(e){var r=e.id;return t.box(t.types.trex,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},t.trun=function(e,r){var i=e.samples||[],n=i.length,a=12+16*n,o=new Uint8Array(a),s=void 0,f=void 0,c=void 0,h=void 0,u=void 0,d=void 0;for(r+=8+a,o.set([0,0,15,1,n>>>24&255,n>>>16&255,n>>>8&255,255&n,r>>>24&255,r>>>16&255,r>>>8&255,255&r],0),s=0;s<n;s++)f=i[s],c=f.duration,h=f.size,u=f.flags,d=f.cts,o.set([c>>>24&255,c>>>16&255,c>>>8&255,255&c,h>>>24&255,h>>>16&255,h>>>8&255,255&h,u.isLeading<<2|u.dependsOn,u.isDependedOn<<6|u.hasRedundancy<<4|u.paddingValue<<1|u.isNonSync,61440&u.degradPrio,15&u.degradPrio,d>>>24&255,d>>>16&255,d>>>8&255,255&d],12+16*s);return t.box(t.types.trun,o)},t.initSegment=function(e){t.types||t.init();var r=t.moov(e),i=void 0;return i=new Uint8Array(t.FTYP.byteLength+r.byteLength),i.set(t.FTYP),i.set(r,t.FTYP.byteLength),i},t}();e.a=a},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=r(5),a=function(){function t(e){i(this,t),this.observer=e}return t.prototype.destroy=function(){},t.prototype.resetTimeStamp=function(){},t.prototype.resetInitSegment=function(){},t.prototype.remux=function(t,e,r,i,a,o,s,f){var c=this.observer,h="";t&&(h+="audio"),e&&(h+="video"),c.trigger(n.a.FRAG_PARSING_DATA,{data1:f,startPTS:a,startDTS:a,type:h,hasAudio:!!t,hasVideo:!!e,nb:1,dropped:0}),c.trigger(n.a.FRAG_PARSED)},t}();e.a=a},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=r(102),n=r(5),a=r(2),o=r(20),s=r.n(o),f=function(t){var e=new s.a;e.trigger=function(t){for(var r=arguments.length,i=Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];e.emit.apply(e,[t,t].concat(i))},e.off=function(t){for(var r=arguments.length,i=Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];e.removeListener.apply(e,[t].concat(i))};var r=function(e,r){t.postMessage({event:e,data:r})};t.addEventListener("message",function(n){var o=n.data;switch(o.cmd){case"init":var s=JSON.parse(o.config);t.demuxer=new i.a(e,o.typeSupported,s,o.vendor,o.streamUrl);try{Object(a.a)(!0===s.debug)}catch(t){console.warn("demuxerWorker: unable to enable logs")}r("init",null);break;case"demux":t.demuxer.push(o.data,o.decryptdata,o.initSegment,o.audioCodec,o.videoCodec,o.timeOffset,o.discontinuity,o.trackSwitch,o.contiguous,o.duration,o.accurateTimeOffset,o.defaultInitPTS)}}),e.on(n.a.FRAG_DECRYPTED,r),e.on(n.a.FRAG_PARSING_INIT_SEGMENT,r),e.on(n.a.FRAG_PARSED,r),e.on(n.a.ERROR,r),e.on(n.a.FRAG_PARSING_METADATA,r),e.on(n.a.FRAG_PARSING_USERDATA,r),e.on(n.a.INIT_PTS_FOUND,r),e.on(n.a.FRAG_PARSING_DATA,function(e,r){var i=[],n={event:e,data:r};r.data1&&(n.data1=r.data1.buffer,i.push(r.data1.buffer),delete r.data1),r.data2&&(n.data2=r.data2.buffer,i.push(r.data2.buffer),delete r.data2),t.postMessage(n,i)})};e.default=f},function(t,e,r){"use strict";function i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments[2],i=0;if(r.programDateTime){var n=Date.parse(r.programDateTime);isNaN(n)||(i=1e3*e+n-1e3*t)}return i}function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!Array.isArray(t)||!t.length||null===e)return null;if(e<t[0].pdt)return null;if(e>=t[t.length-1].endPdt)return null;for(var r=0;r<t.length;++r){var i=t[r];if(e<i.endPdt)return i}return null}function a(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=void 0,f=t?e[t.sn-e[0].sn+1]:null;return r<i&&(r>i-n&&(n=0),a=f&&!o(r,n,f)?f:s.a.search(e,o.bind(null,r,n))),a}function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments[2],i=Math.min(e,r.duration+(r.deltaPTS?r.deltaPTS:0));return r.start+r.duration-i<=t?1:r.start-i>t&&r.start?-1:0}e.a=i,e.b=n,e.c=a,e.d=o;var s=r(39)},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(5),s=r(9),f=r(2),c=r(7),h=r(62),u=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),d=function(t){function e(r){i(this,e);var a=n(this,t.call(this,r,o.a.MANIFEST_LOADED,o.a.LEVEL_LOADED,o.a.FRAG_LOADED,o.a.ERROR));return a.canload=!1,a.currentLevelIndex=null,a.manualLevelIndex=-1,a.timer=null,a}return a(e,t),e.prototype.onHandlerDestroying=function(){this.cleanTimer(),this.manualLevelIndex=-1},e.prototype.cleanTimer=function(){null!==this.timer&&(clearTimeout(this.timer),this.timer=null)},e.prototype.startLoad=function(){var t=this._levels;this.canload=!0,this.levelRetryCount=0,t&&t.forEach(function(t){t.loadError=0;var e=t.details;e&&e.live&&(t.details=void 0)}),null!==this.timer&&this.loadLevel()},e.prototype.stopLoad=function(){this.canload=!1},e.prototype.onManifestLoaded=function(t){var e=[],r=void 0,i={},n=null,a=!1,s=!1,u=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),d=[];if(t.levels.forEach(function(t){t.loadError=0,t.fragmentError=!1,a=a||!!t.videoCodec,s=s||!!t.audioCodec||!(!t.attrs||!t.attrs.AUDIO),!0===u&&t.audioCodec&&-1!==t.audioCodec.indexOf("mp4a.40.34")&&(t.audioCodec=void 0),n=i[t.bitrate],void 0===n?(t.url=[t.url],t.urlId=0,i[t.bitrate]=t,e.push(t)):n.url.push(t.url)}),!0===a&&!0===s&&(e=e.filter(function(t){return!!t.videoCodec})),e=e.filter(function(t){var e=t.audioCodec,r=t.videoCodec;return(!e||Object(h.a)(e))&&(!r||Object(h.a)(r))}),t.audioTracks&&(d=t.audioTracks.filter(function(t){return!t.audioCodec||Object(h.a)(t.audioCodec,"audio")})),e.length>0){if(e.sort(function(t,e){return t.bitrate-e.bitrate}),this.hls&&this.hls.config&&this.hls.config.defaultBandwidth){var l=-1,p=0,b=0;for(l=0;l<e.length;++l)if(e[l].attrs){if((b=e[l].attrs.BANDWIDTH?e[l].attrs.BANDWIDTH:0)==this.hls.config.defaultBandwidth){r=e[l].bitrate;break}if(b>this.hls.config.defaultBandwidth){0===p||Math.abs(b-this.hls.config.defaultBandwidth)<Math.abs(this.hls.config.defaultBandwidth-p)?r=e[l].bitrate:(--l,r=e[l-1].bitrate);break}l+1===e.length&&(r=e[l].bitrate),p=b}l===e.length?void 0!=(r=e[0].bitrate)&&this.hls.trigger(o.a.DEFAULT_BANDWIDTH,e[0]):(r=e[l].bitrate,this.manualLevel=l,this.hls.trigger(o.a.DEFAULT_BANDWIDTH,e[l]))}else r=e[0].bitrate;this._levels=e;for(var g=0;g<e.length;g++)if(e[g].bitrate===r){this._firstLevel=g,f.b.log("manifest loaded,"+e.length+" level(s) found, first bitrate:"+r);break}this.hls.trigger(o.a.MANIFEST_PARSED,{levels:e,audioTracks:d,firstLevel:this._firstLevel,stats:t.stats,audio:s,video:a,altAudio:d.length>0&&a})}else this.hls.trigger(o.a.ERROR,{type:c.b.MEDIA_ERROR,details:c.a.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:this.hls.url,reason:"no level with compatible codecs found in manifest"})},e.prototype.setLevelInternal=function(t){var e=this._levels,r=this.hls;if(t>=0&&t<e.length){if(this.cleanTimer(),this.currentLevelIndex!==t){f.b.log("switching to level "+t),this.currentLevelIndex=t;var i=e[t];i.level=t,r.trigger(o.a.LEVEL_SWITCHING,i)}var n=e[t],a=n.details;if(!a||!0===a.live){var s=n.urlId;r.trigger(o.a.LEVEL_LOADING,{url:n.url[s],level:t,id:s})}}else r.trigger(o.a.ERROR,{type:c.b.OTHER_ERROR,details:c.a.LEVEL_SWITCH_ERROR,level:t,fatal:!1,reason:"invalid level idx"})},e.prototype.onError=function(t){if(!0===t.fatal)return void(t.type===c.b.NETWORK_ERROR&&this.cleanTimer());var e=!1,r=!1,i=void 0;switch(t.details){case c.a.FRAG_LOAD_ERROR:case c.a.FRAG_LOAD_TIMEOUT:case c.a.KEY_LOAD_ERROR:case c.a.KEY_LOAD_TIMEOUT:i=t.frag.level,r=!0;break;case c.a.LEVEL_LOAD_ERROR:case c.a.LEVEL_LOAD_TIMEOUT:i=t.context.level,e=!0;break;case c.a.REMUX_ALLOC_ERROR:i=t.level,e=!0}void 0!==i&&this.recoverLevel(t,i,e,r)},e.prototype.recoverLevel=function(t,e,r,i){var n=this,a=this.hls.config,o=t.details,s=this._levels[e],c=void 0,h=void 0,u=void 0;if(s.loadError++,s.fragmentError=i,!0===r){if(!(this.levelRetryCount+1<=a.levelLoadingMaxRetry))return f.b.error("level controller, cannot recover from "+o+" error"),this.currentLevelIndex=null,this.cleanTimer(),void(t.fatal=!0);h=Math.min(Math.pow(2,this.levelRetryCount)*a.levelLoadingRetryDelay,a.levelLoadingMaxRetryTimeout),this.timer=setTimeout(function(){return n.loadLevel()},h),t.levelRetry=!0,this.levelRetryCount++,f.b.warn("level controller, "+o+", retry in "+h+" ms, current retry count is "+this.levelRetryCount)}!0!==r&&!0!==i||(c=s.url.length,c>1&&s.loadError<c?(f.b.warn("level controller, "+o+" for level "+e+": switching to redundant stream id "+s.urlId),s.urlId=(s.urlId+1)%c,s.details=void 0):-1===this.manualLevelIndex?(u=0===e?this._levels.length-1:e-1,f.b.warn("level controller, "+o+": switch to "+u),this.hls.nextAutoLevel=this.currentLevelIndex=u):!0===i&&(f.b.warn("level controller, "+o+": reload a fragment"),this.currentLevelIndex=null))},e.prototype.onFragLoaded=function(t){var e=t.frag;if(void 0!==e&&"main"===e.type){var r=this._levels[e.level];void 0!==r&&(r.fragmentError=!1,r.loadError=0,this.levelRetryCount=0)}},e.prototype.onLevelLoaded=function(t){var e=this,r=t.level;if(r===this.currentLevelIndex){var i=this._levels[r];!1===i.fragmentError&&(i.loadError=0,this.levelRetryCount=0);var n=t.details;if(n.live){var a=1e3*(n.averagetargetduration?n.averagetargetduration:n.targetduration),o=a,s=i.details;s&&n.endSN===s.endSN&&(o/=2,f.b.log("same live playlist, reload twice faster")),o-=performance.now()-t.stats.trequest,o=Math.max(a/2,Math.round(o)),f.b.log("live playlist, reload in "+Math.round(o)+" ms"),this.timer=setTimeout(function(){return e.loadLevel()},o)}else this.cleanTimer()}},e.prototype.loadLevel=function(){var t=void 0,e=void 0;null!==this.currentLevelIndex&&!0===this.canload&&void 0!==(t=this._levels[this.currentLevelIndex])&&t.url.length>0&&(e=t.urlId,this.hls.trigger(o.a.LEVEL_LOADING,{url:t.url[e],level:this.currentLevelIndex,id:e}))},u(e,[{key:"levels",get:function(){return this._levels},set:function(t){this._levels=t}},{key:"level",get:function(){return this.currentLevelIndex},set:function(t){var e=this._levels;e&&(t=Math.min(t,e.length-1),this.currentLevelIndex===t&&void 0!==e[t].details||this.setLevelInternal(t))}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(t){this.manualLevelIndex=t,void 0===this._startLevel&&(this._startLevel=t),-1!==t&&(this.level=t)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(t){this._firstLevel=t}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var t=this.hls.config.startLevel;return void 0!==t?t:this._firstLevel}return this._startLevel},set:function(t){this._startLevel=t}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(t){this.level=t,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=t)}}]),e}(s.a);e.a=d},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(5),s=r(9),f=r(40),c=r(108),h=function(t){function e(r){i(this,e);var a=n(this,t.call(this,r,o.a.MEDIA_ATTACHED,o.a.MEDIA_DETACHING,o.a.FRAG_PARSING_METADATA));return a.id3Track=void 0,a.media=void 0,a}return a(e,t),e.prototype.destroy=function(){s.a.prototype.destroy.call(this)},e.prototype.onMediaAttached=function(t){this.media=t.media,this.media},e.prototype.onMediaDetaching=function(){Object(c.a)(this.id3Track),this.id3Track=void 0,this.media=void 0},e.prototype.getID3Track=function(t){for(var e=0;e<t.length;e++){var r=t[e];if("metadata"===r.kind&&"id3"===r.label)return Object(c.b)(r,this.media),r}return this.media.addTextTrack("metadata","id3")},e.prototype.onFragParsingMetadata=function(t){var e=t.frag,r=t.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var i=window.WebKitDataCue||window.VTTCue||window.TextTrackCue,n=0;n<r.length;n++){var a=f.a.getID3Frames(r[n].data);if(a){var o=r[n].pts,s=n<r.length-1?r[n+1].pts:e.endPTS;o===s&&(s+=1e-4);for(var c=0;c<a.length;c++){var h=a[c];if(!f.a.isTimeStampFrame(h)){var u=new i(o,s,"");u.value=h,this.id3Track.addCue(u)}}}}},e}(s.a);e.a=h},function(t,e,r){"use strict";function i(){var t=Object(n.a)(),e=window.SourceBuffer||window.WebKitSourceBuffer,r=t&&"function"==typeof t.isTypeSupported&&t.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),i=!e||e.prototype&&"function"==typeof e.prototype.appendBuffer&&"function"==typeof e.prototype.remove;return!!r&&!!i}e.a=i;var n=r(57)},function(t,e,r){"use strict";r.d(e,"a",function(){return g});var i=r(265),n=r(268),a=r(269),o=r(270),s=r(271),f=r(272),c=r(273),h=r(274),u=r(276),d=r(280),l=r(281),p=r(282),b=r(283),g={autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,maxBufferSize:6e7,maxBufferHole:.5,lowBufferWatchdogPeriod:.5,highBufferWatchdogPeriod:3,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,liveDurationInfinity:!1,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,hlsFrameChasing:!1,chasingFirstParagraph:20,chasingSecondParagraph:40,chasingFirstSpeed:1.1,chasingSecondSpeed:1.2,loader:s.a,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,abrController:i.a,bufferController:n.a,capLevelController:a.a,fpsController:o.a,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,abrBandWidthUpCacheTime:15,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,requestMediaKeySystemAccessFunc:b.a};g.subtitleStreamController=l.a,g.subtitleTrackController=d.a,g.timelineController=u.a,g.cueHandler=h,g.enableCEA708Captions=!0,g.enableWebVTT=!0,g.captionsTextTrack1Label="English",g.captionsTextTrack1LanguageCode="en",g.captionsTextTrack2Label="Spanish",g.captionsTextTrack2LanguageCode="es",g.subtitleLoadInterval=8,g.audioStreamController=c.a,g.audioTrackController=f.a,g.emeController=p.a},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(5),s=r(9),f=r(55),c=r(7),h=r(2),u=r(266),d=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),l=function(t){function e(r){i(this,e);var a=n(this,t.call(this,r,o.a.FRAG_LOADING,o.a.FRAG_LOADED,o.a.FRAG_BUFFERED,o.a.ERROR));return a.lastLoadedFragLevel=0,a._nextAutoLevel=-1,a.hls=r,a.timer=null,a._bwEstimator=null,a.onCheck=a._abandonRulesCheck.bind(a),a}return a(e,t),e.prototype.destroy=function(){this.clearTimer(),s.a.prototype.destroy.call(this)},e.prototype.onFragLoading=function(t){var e=t.frag;if("main"===e.type&&(this.timer||(this.fragCurrent=e,this.timer=setInterval(this.onCheck,100)),!this._bwEstimator)){var r=this.hls,i=t.frag.level,n=r.levels[i].details.live,a=r.config,o=void 0,s=void 0;n?(o=a.abrEwmaFastLive,s=a.abrEwmaSlowLive):(o=a.abrEwmaFastVoD,s=a.abrEwmaSlowVoD),this._bwEstimator=new u.a(r,s,o,a.abrEwmaDefaultEstimate)}},e.prototype._abandonRulesCheck=function(){var t=this.hls,e=t.media,r=this.fragCurrent,i=t.minAutoLevel,n=r.loader;if(!n||n.stats&&n.stats.aborted)return h.b.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),void(this._nextAutoLevel=-1);var a=n.stats;if(e&&a&&(!e.paused&&0!==e.playbackRate||!e.readyState)&&r.autoLevel&&r.level){var s=performance.now()-a.trequest,c=Math.abs(e.playbackRate);if(s>500*r.duration/c){var u=t.levels,d=Math.max(1,a.bw?a.bw/8:1e3*a.loaded/s),l=u[r.level],p=l.realBitrate?Math.max(l.realBitrate,l.bitrate):l.bitrate,b=a.total?a.total:Math.max(a.loaded,Math.round(r.duration*p/8)),g=e.currentTime,v=(b-a.loaded)/d,y=(f.a.bufferInfo(e,g,t.config.maxBufferHole).end-g)/c;if(y<2*r.duration/c&&v>y){var m=void 0,_=void 0;for(_=r.level-1;_>i;_--){var w=u[_].realBitrate?Math.max(u[_].realBitrate,u[_].bitrate):u[_].bitrate;if((m=r.duration*w/(6.4*d))<y)break}m<v&&(h.b.warn("loading too slow, abort fragment loading and switch to level "+_+":fragLoadedDelay["+_+"]<fragLoadedDelay["+(r.level-1)+"];bufferStarvationDelay:"+m.toFixed(1)+"<"+v.toFixed(1)+":"+y.toFixed(1)),t.nextLoadLevel=_,this._bwEstimator.sample(s,a.loaded),n.abort(),this.clearTimer(),t.trigger(o.a.FRAG_LOAD_EMERGENCY_ABORTED,{frag:r,stats:a}))}}}},e.prototype.onFragLoaded=function(t){var e=t.frag;if("main"===e.type&&!isNaN(e.sn)){if(this.clearTimer(),this.lastLoadedFragLevel=e.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var r=this.hls.levels[e.level],i=(r.loaded?r.loaded.bytes:0)+t.stats.loaded,n=(r.loaded?r.loaded.duration:0)+t.frag.duration;r.loaded={bytes:i,duration:n},r.realBitrate=Math.round(8*i/n)}if(t.frag.bitrateTest){var a=t.stats;a.tparsed=a.tbuffered=a.tload,this.onFragBuffered(t)}}},e.prototype.onFragBuffered=function(t){var e=t.stats,r=t.frag;if(!(!0===e.aborted||"main"!==r.type||isNaN(r.sn)||r.bitrateTest&&e.tload!==e.tbuffered)){var i=e.tparsed-e.trequest;h.b.log("latency/loading/parsing/append/kbps:"+Math.round(e.tfirst-e.trequest)+"/"+Math.round(e.tload-e.tfirst)+"/"+Math.round(e.tparsed-e.tload)+"/"+Math.round(e.tbuffered-e.tparsed)+"/"+Math.round(8*e.loaded/(e.tbuffered-e.trequest))),this._bwEstimator.sample(i,e.loaded),e.bwEstimate=this._bwEstimator.getEstimate(),r.bitrateTest?this.bitrateTestDelay=i/1e3:this.bitrateTestDelay=0}},e.prototype.onError=function(t){switch(t.details){case c.a.FRAG_LOAD_ERROR:case c.a.FRAG_LOAD_TIMEOUT:this.clearTimer()}},e.prototype.clearTimer=function(){clearInterval(this.timer),this.timer=null},e.prototype._findBestLevel=function(t,e,r,i,n,a,o,s,f){for(var c=n;c>=i;c--){var u=f[c],d=u.details,l=d?d.totalduration/d.fragments.length:e,p=!!d&&d.live,b=void 0;b=c<=t?o*r:s*r;var g=f[c].realBitrate?Math.max(f[c].realBitrate,f[c].bitrate):f[c].bitrate,v=g*l/b;if(h.b.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+c+"/"+Math.round(b)+"/"+g+"/"+l+"/"+a+"/"+v),b>g&&(!v||p&&!this.bitrateTestDelay||v<a)&&(c<t||a>this.hls.config.abrBandWidthUpCacheTime))return c}return-1},d(e,[{key:"nextAutoLevel",get:function(){var t=this._nextAutoLevel,e=this._bwEstimator;if(!(-1===t||e&&e.canEstimate()))return t;var r=this._nextABRAutoLevel;return-1!==t&&(r=Math.min(t,r)),r},set:function(t){this._nextAutoLevel=t}},{key:"_nextABRAutoLevel",get:function(){var t=this.hls,e=t.maxAutoLevel,r=t.levels,i=t.config,n=t.minAutoLevel,a=t.media,o=this.lastLoadedFragLevel,s=this.fragCurrent?this.fragCurrent.duration:0,c=a?a.currentTime:0,u=a&&0!==a.playbackRate?Math.abs(a.playbackRate):1,d=this._bwEstimator?this._bwEstimator.getEstimate():i.abrEwmaDefaultEstimate,l=(f.a.bufferInfo(a,c,i.maxBufferHole).end-c)/u,p=this._findBestLevel(o,s,d,n,e,l,i.abrBandWidthFactor,i.abrBandWidthUpFactor,r);if(p>=0)return p;h.b.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var b=s?Math.min(s,i.maxStarvationDelay):i.maxStarvationDelay,g=i.abrBandWidthFactor,v=i.abrBandWidthUpFactor;if(0===l){var y=this.bitrateTestDelay;if(y){b=(s?Math.min(s,i.maxLoadingDelay):i.maxLoadingDelay)-y,h.b.trace("bitrate test took "+Math.round(1e3*y)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*b)+" ms"),g=v=1}}return p=this._findBestLevel(o,s,d,n,e,l+b,g,v,r),Math.max(p,0)}}]),e}(s.a);e.a=l},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=r(267),a=function(){function t(e,r,a,o){i(this,t),this.hls=e,this.defaultEstimate_=o,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new n.a(r),this.fast_=new n.a(a)}return t.prototype.sample=function(t,e){t=Math.max(t,this.minDelayMs_);var r=8e3*e/t,i=t/1e3;this.fast_.sample(i,r),this.slow_.sample(i,r)},t.prototype.canEstimate=function(){var t=this.fast_;return t&&t.getTotalWeight()>=this.minWeight_},t.prototype.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},t.prototype.destroy=function(){},t}();e.a=a},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=function(){function t(e){i(this,t),this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=0,this.totalWeight_=0}return t.prototype.sample=function(t,e){var r=Math.pow(this.alpha_,t);this.estimate_=e*(1-r)+r*this.estimate_,this.totalWeight_+=t},t.prototype.getTotalWeight=function(){return this.totalWeight_},t.prototype.getEstimate=function(){if(this.alpha_){var t=1-Math.pow(this.alpha_,this.totalWeight_);return this.estimate_/t}return this.estimate_},t}();e.a=n},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(5),s=r(9),f=r(2),c=r(7),h=r(57),u=Object(h.a)(),d=function(t){function e(r){i(this,e);var a=n(this,t.call(this,r,o.a.MEDIA_ATTACHING,o.a.MEDIA_DETACHING,o.a.MANIFEST_PARSED,o.a.BUFFER_RESET,o.a.BUFFER_APPENDING,o.a.BUFFER_CODECS,o.a.BUFFER_EOS,o.a.BUFFER_FLUSHING,o.a.LEVEL_PTS_UPDATED,o.a.LEVEL_UPDATED));return a._msDuration=null,a._levelDuration=null,a._live=null,a._objectUrl=null,a.onsbue=a.onSBUpdateEnd.bind(a),a.onsbe=a.onSBUpdateError.bind(a),a.pendingTracks={},a.tracks={},a}return a(e,t),e.prototype.destroy=function(){s.a.prototype.destroy.call(this)},e.prototype.onLevelPtsUpdated=function(t){var e=t.type,r=this.tracks.audio;if("audio"===e&&r&&"audio/mpeg"===r.container){var i=this.sourceBuffer.audio;if(Math.abs(i.timestampOffset-t.start)>.1){var n=i.updating;try{i.abort()}catch(t){n=!0,f.b.warn("can not abort audio buffer: "+t)}n?this.audioTimestampOffset=t.start:(f.b.warn("change mpeg audio timestamp offset from "+i.timestampOffset+" to "+t.start),i.timestampOffset=t.start)}}},e.prototype.onManifestParsed=function(t){var e=t.audio,r=t.video||t.levels.length&&t.altAudio,i=0;t.altAudio&&(e||r)&&(i=(e?1:0)+(r?1:0),f.b.log(i+" sourceBuffer(s) expected")),this.sourceBufferNb=i},e.prototype.onMediaAttaching=function(t){var e=this.media=t.media;if(e){var r=this.mediaSource=new u;this.onmso=this.onMediaSourceOpen.bind(this),this.onmse=this.onMediaSourceEnded.bind(this),this.onmsc=this.onMediaSourceClose.bind(this),r.addEventListener("sourceopen",this.onmso),r.addEventListener("sourceended",this.onmse),r.addEventListener("sourceclose",this.onmsc),e.src=URL.createObjectURL(r),this._objectUrl=e.src}},e.prototype.onMediaDetaching=function(){f.b.log("media source detaching");var t=this.mediaSource;if(t){if("open"===t.readyState)try{t.endOfStream()}catch(t){f.b.warn("onMediaDetaching:"+t.message+" while calling endOfStream")}t.removeEventListener("sourceopen",this.onmso),t.removeEventListener("sourceended",this.onmse),t.removeEventListener("sourceclose",this.onmsc),this.media&&(URL.revokeObjectURL(this._objectUrl),this.media.src===this._objectUrl?(this.media.removeAttribute("src"),this.media.load()):f.b.warn("media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.pendingTracks={},this.tracks={},this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}this.onmso=this.onmse=this.onmsc=null,this.hls.trigger(o.a.MEDIA_DETACHED)},e.prototype.onMediaSourceOpen=function(){f.b.log("media source opened"),this.hls.trigger(o.a.MEDIA_ATTACHED,{media:this.media});var t=this.mediaSource;t&&t.removeEventListener("sourceopen",this.onmso),this.checkPendingTracks()},e.prototype.checkPendingTracks=function(){var t=this.pendingTracks,e=Object.keys(t).length;e&&(this.sourceBufferNb<=e||0===this.sourceBufferNb)&&(this.createSourceBuffers(t),this.pendingTracks={},this.doAppending())},e.prototype.onMediaSourceClose=function(){f.b.log("media source closed")},e.prototype.onMediaSourceEnded=function(){f.b.log("media source ended")},e.prototype.onSBUpdateEnd=function(){if(this.audioTimestampOffset){var t=this.sourceBuffer.audio;f.b.warn("change mpeg audio timestamp offset from "+t.timestampOffset+" to "+this.audioTimestampOffset),t.timestampOffset=this.audioTimestampOffset,delete this.audioTimestampOffset}this._needsFlush&&this.doFlush(),this._needsEos&&this.checkEos(),this.appending=!1;var e=this.parent,r=this.segments.reduce(function(t,r){return r.parent===e?t+1:t},0),i={},n=this.sourceBuffer;for(var a in n)i[a]=n[a].buffered;this.hls.trigger(o.a.BUFFER_APPENDED,{parent:e,pending:r,timeRanges:i}),this._needsFlush||this.doAppending(),this.updateMediaElementDuration()},e.prototype.onSBUpdateError=function(t){f.b.error("sourceBuffer error:",t),this.hls.trigger(o.a.ERROR,{type:c.b.MEDIA_ERROR,details:c.a.BUFFER_APPENDING_ERROR,fatal:!1})},e.prototype.onBufferReset=function(){var t=this.sourceBuffer;for(var e in t){var r=t[e];try{this.mediaSource.removeSourceBuffer(r),r.removeEventListener("updateend",this.onsbue),r.removeEventListener("error",this.onsbe)}catch(t){}}this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0},e.prototype.onBufferCodecs=function(t){if(0===Object.keys(this.sourceBuffer).length){for(var e in t)this.pendingTracks[e]=t[e];var r=this.mediaSource;r&&"open"===r.readyState&&this.checkPendingTracks()}},e.prototype.createSourceBuffers=function(t){var e=this.sourceBuffer,r=this.mediaSource;for(var i in t)if(!e[i]){var n=t[i],a=n.levelCodec||n.codec,s=n.container+";codecs="+a;f.b.log("creating sourceBuffer("+s+")");try{var h=e[i]=r.addSourceBuffer(s);h.addEventListener("updateend",this.onsbue),h.addEventListener("error",this.onsbe),this.tracks[i]={codec:a,container:n.container},n.buffer=h}catch(t){f.b.error("error while trying to add sourceBuffer:"+t.message),this.hls.trigger(o.a.ERROR,{type:c.b.MEDIA_ERROR,details:c.a.BUFFER_ADD_CODEC_ERROR,fatal:!1,err:t,mimeType:s})}}this.hls.trigger(o.a.BUFFER_CREATED,{tracks:t})},e.prototype.onBufferAppending=function(t){this._needsFlush||(this.segments?this.segments.push(t):this.segments=[t],this.doAppending())},e.prototype.onBufferAppendFail=function(t){f.b.error("sourceBuffer error:",t.event),this.hls.trigger(o.a.ERROR,{type:c.b.MEDIA_ERROR,details:c.a.BUFFER_APPENDING_ERROR,fatal:!1})},e.prototype.onBufferEos=function(t){var e=this.sourceBuffer,r=t.type;for(var i in e)r&&i!==r||e[i].ended||(e[i].ended=!0,f.b.log(i+" sourceBuffer now EOS"));this.checkEos()},e.prototype.checkEos=function(){var t=this.sourceBuffer,e=this.mediaSource;if(!e||"open"!==e.readyState)return void(this._needsEos=!1);for(var r in t){var i=t[r];if(!i.ended)return;if(i.updating)return void(this._needsEos=!0)}f.b.log("all media data available, signal endOfStream() to MediaSource and stop loading fragment");try{e.endOfStream()}catch(t){f.b.warn("exception while calling mediaSource.endOfStream()")}this._needsEos=!1},e.prototype.onBufferFlushing=function(t){this.flushRange&&(this.flushRange.push({start:t.startOffset,end:t.endOffset,type:t.type}),this.flushBufferCounter=0,this.doFlush())},e.prototype.onLevelUpdated=function(t){var e=t.details;e.fragments.length>0&&(this._levelDuration=e.totalduration+e.fragments[0].start,this._live=e.live,this.updateMediaElementDuration())},e.prototype.updateMediaElementDuration=function(){var t=this.hls.config,e=void 0;if(null!==this._levelDuration&&this.media&&this.mediaSource&&this.sourceBuffer&&0!==this.media.readyState&&"open"===this.mediaSource.readyState){for(var r in this.sourceBuffer)if(!0===this.sourceBuffer[r].updating)return;e=this.media.duration,null===this._msDuration&&(this._msDuration=this.mediaSource.duration),!0===this._live&&!0===t.liveDurationInfinity?(f.b.log("Media Source duration is set to Infinity"),this._msDuration=this.mediaSource.duration=1/0):(this._levelDuration>this._msDuration&&this._levelDuration>e||e===1/0||isNaN(e))&&(f.b.log("Updating Media Source duration to "+this._levelDuration.toFixed(3)),this._msDuration=this.mediaSource.duration=this._levelDuration)}},e.prototype.doFlush=function(){for(;this.flushRange.length;){var t=this.flushRange[0];if(!this.flushBuffer(t.start,t.end,t.type))return void(this._needsFlush=!0);this.flushRange.shift(),this.flushBufferCounter=0}if(0===this.flushRange.length){this._needsFlush=!1;var e=0,r=this.sourceBuffer;try{for(var i in r)e+=r[i].buffered.length}catch(t){f.b.error("error while accessing sourceBuffer.buffered")}this.appended=e,this.hls.trigger(o.a.BUFFER_FLUSHED)}},e.prototype.doAppending=function(){var t=this.hls,e=this.sourceBuffer,r=this.segments;if(Object.keys(e).length){if(this.media.error)return this.segments=[],void f.b.error("trying to append although a media error occured, flush segment and abort");if(this.appending)return;if(this.hls.media&&this.mediaSource.duration&&this.hls.config.hlsFrameChasing){var i=this.mediaSource.duration-this.hls.media.currentTime;i<=this.hls.config.chasingFirstParagraph?this.hls.media.playbackRate=1:i>=this.hls.config.chasingSecondParagraph?this.hls.media.playbackRate=this.hls.config.chasingSecondSpeed:this.hls.media.playbackRate=this.hls.config.chasingFirstSpeed}if(r&&r.length){var n=r.shift();try{var a=n.type,s=e[a];s?s.updating?r.unshift(n):(s.ended=!1,this.parent=n.parent,s.appendBuffer(n.data),this.appendError=0,this.appended++,this.appending=!0):this.onSBUpdateEnd()}catch(e){f.b.error("error while trying to append buffer:"+e.message),r.unshift(n);var h={type:c.b.MEDIA_ERROR,parent:n.parent};22!==e.code?(this.appendError?this.appendError++:this.appendError=1,h.details=c.a.BUFFER_APPEND_ERROR,this.appendError>t.config.appendErrorMaxRetry?(f.b.log("fail "+t.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),r=[],h.fatal=!0,t.trigger(o.a.ERROR,h)):(h.fatal=!1,t.trigger(o.a.ERROR,h))):(this.segments=[],h.details=c.a.BUFFER_FULL_ERROR,h.fatal=!1,t.trigger(o.a.ERROR,h))}}}},e.prototype.flushBuffer=function(t,e,r){var i=void 0,n=void 0,a=void 0,o=void 0,s=void 0,c=void 0,h=this.sourceBuffer;if(Object.keys(h).length){if(f.b.log("flushBuffer,pos/start/end: "+this.media.currentTime.toFixed(3)+"/"+t+"/"+e),this.flushBufferCounter<this.appended){for(var u in h)if(!r||u===r){if(i=h[u],i.ended=!1,i.updating)return f.b.warn("cannot flush, sb updating in progress"),!1;try{for(n=0;n<i.buffered.length;n++)if(a=i.buffered.start(n),o=i.buffered.end(n),-1!==navigator.userAgent.toLowerCase().indexOf("firefox")&&e===Number.POSITIVE_INFINITY?(s=t,c=e):(s=Math.max(a,t),c=Math.min(o,e)),Math.min(c,o)-s>.5)return this.flushBufferCounter++,f.b.log("flush "+u+" ["+s+","+c+"], of ["+a+","+o+"], pos:"+this.media.currentTime),i.remove(s,c),!1}catch(t){f.b.warn("exception while accessing sourcebuffer, it might have been removed from MediaSource")}}}else f.b.warn("abort flushing too many retries");f.b.log("buffer flushed")}return!0},e}(s.a);e.a=d},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(5),s=r(9),f=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),c=function(t){function e(r){i(this,e);var a=n(this,t.call(this,r,o.a.FPS_DROP_LEVEL_CAPPING,o.a.MEDIA_ATTACHING,o.a.MANIFEST_PARSED,o.a.BUFFER_CODECS));return a.autoLevelCapping=Number.POSITIVE_INFINITY,a.firstLevel=null,a.levels=[],a.media=null,a.restrictedLevels=[],a.timer=null,a}return a(e,t),e.prototype.destroy=function(){this.hls.config.capLevelToPlayerSize&&(this.media=null,this._stopCapping())},e.prototype.onFpsDropLevelCapping=function(t){e.isLevelAllowed(t.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(t.droppedLevel)},e.prototype.onMediaAttaching=function(t){this.media=t.media instanceof HTMLVideoElement?t.media:null},e.prototype.onManifestParsed=function(t){var e=this.hls;this.restrictedLevels=[],this.levels=t.levels,this.firstLevel=t.firstLevel,e.config.capLevelToPlayerSize&&(t.video||t.levels.length&&t.altAudio)&&this._startCapping()},e.prototype.onBufferCodecs=function(t){this.hls.config.capLevelToPlayerSize&&t.video&&this._startCapping()},e.prototype.onLevelsUpdated=function(t){this.levels=t.levels},e.prototype.detectPlayerSize=function(){if(this.media){var t=this.levels?this.levels.length:0;if(t){var e=this.hls;e.autoLevelCapping=this.getMaxLevel(t-1),e.autoLevelCapping>this.autoLevelCapping&&e.streamController.nextLevelSwitch(),this.autoLevelCapping=e.autoLevelCapping}}},e.prototype.getMaxLevel=function(t){var r=this;if(!this.levels)return-1;var i=this.levels.filter(function(i,n){return e.isLevelAllowed(n,r.restrictedLevels)&&n<=t});return e.getMaxLevelByMediaSize(i,this.mediaWidth,this.mediaHeight)},e.prototype._startCapping=function(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),clearInterval(this.timer),this.timer=setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},e.prototype._stopCapping=function(){this.restrictedLevels=[],this.firstLevel=null,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(this.timer=clearInterval(this.timer),this.timer=null)},e.isLevelAllowed=function(t){return-1===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).indexOf(t)},e.getMaxLevelByMediaSize=function(t,e,r){if(!t||t&&!t.length)return-1;for(var i=t.length-1,n=0;n<t.length;n+=1){var a=t[n];if((a.width>=e||a.height>=r)&&function(t,e){return!e||(t.width!==e.width||t.height!==e.height)}(a,t[n+1])){i=n;break}}return i},f(e,[{key:"mediaWidth",get:function(){var t=void 0,r=this.media;return r&&(t=r.width||r.clientWidth||r.offsetWidth,t*=e.contentScaleFactor),t}},{key:"mediaHeight",get:function(){var t=void 0,r=this.media;return r&&(t=r.height||r.clientHeight||r.offsetHeight,t*=e.contentScaleFactor),t}}],[{key:"contentScaleFactor",get:function(){var t=1;try{t=window.devicePixelRatio}catch(t){}return t}}]),e}(s.a);e.a=c},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(5),s=r(9),f=r(2),c=function(t){function e(r){return i(this,e),n(this,t.call(this,r,o.a.MEDIA_ATTACHING))}return a(e,t),e.prototype.destroy=function(){this.timer&&clearInterval(this.timer),this.isVideoPlaybackQualityAvailable=!1},e.prototype.onMediaAttaching=function(t){var e=this.hls.config;if(e.capLevelOnFPSDrop){"function"==typeof(this.video=t.media instanceof HTMLVideoElement?t.media:null).getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),clearInterval(this.timer),this.timer=setInterval(this.checkFPSInterval.bind(this),e.fpsDroppedMonitoringPeriod)}},e.prototype.checkFPS=function(t,e,r){var i=performance.now();if(e){if(this.lastTime){var n=i-this.lastTime,a=r-this.lastDroppedFrames,s=e-this.lastDecodedFrames,c=1e3*a/n,h=this.hls;if(h.trigger(o.a.FPS_DROP,{currentDropped:a,currentDecoded:s,totalDroppedFrames:r}),c>0&&a>h.config.fpsDroppedMonitoringThreshold*s){var u=h.currentLevel;f.b.warn("drop FPS ratio greater than max allowed value for currentLevel: "+u),u>0&&(-1===h.autoLevelCapping||h.autoLevelCapping>=u)&&(u-=1,h.trigger(o.a.FPS_DROP_LEVEL_CAPPING,{level:u,droppedLevel:h.currentLevel}),h.autoLevelCapping=u,h.streamController.nextLevelSwitch())}}this.lastTime=i,this.lastDroppedFrames=r,this.lastDecodedFrames=e}},e.prototype.checkFPSInterval=function(){var t=this.video;if(t)if(this.isVideoPlaybackQualityAvailable){var e=t.getVideoPlaybackQuality();this.checkFPS(t,e.totalVideoFrames,e.droppedVideoFrames)}else this.checkFPS(t,t.webkitDecodedFrameCount,t.webkitDroppedFrameCount)},e}(s.a);e.a=c},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=r(2),a=function(){function t(e){i(this,t),e&&e.xhrSetup&&(this.xhrSetup=e.xhrSetup)}return t.prototype.destroy=function(){this.abort(),this.loader=null},t.prototype.abort=function(){var t=this.loader;t&&4!==t.readyState&&(this.stats.aborted=!0,t.abort()),window.clearTimeout(this.requestTimeout),this.requestTimeout=null,window.clearTimeout(this.retryTimeout),this.retryTimeout=null},t.prototype.load=function(t,e,r){this.context=t,this.config=e,this.callbacks=r,this.retryDelay=e.retryDelay,this.reload()},t.prototype.reload=function(){this.stats={trequest:performance.now(),retry:0},this.loadInternal()},t.prototype.loadInternal=function(){var t=void 0,e=this.context;t=this.loader=new XMLHttpRequest;var r=this.stats;r.tfirst=0,r.loaded=0;var i=this.xhrSetup;try{if(i)try{i(t,e.url)}catch(r){t.open("GET",e.url,!0),i(t,e.url)}t.readyState||t.open("GET",e.url,!0)}catch(r){return void this.callbacks.onError({code:t.status,text:r.message},e,t)}e.rangeEnd&&t.setRequestHeader("Range","bytes="+e.rangeStart+"-"+(e.rangeEnd-1)),t.onreadystatechange=this.readystatechange.bind(this),t.onprogress=this.loadprogress.bind(this),t.responseType=e.responseType,this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),this.config.timeout),t.send()},t.prototype.readystatechange=function(t){var e=t.currentTarget,r=e.readyState,i=this.stats,a=this.context,o=this.config;if(!i.aborted&&r>=2)if(window.clearTimeout(this.requestTimeout),0===i.tfirst&&(i.tfirst=Math.max(performance.now(),i.trequest)),4===r){var s=e.status;if(s>=200&&s<300){i.tload=Math.max(i.tfirst,performance.now());var f=void 0,c=void 0;"arraybuffer"===a.responseType?(f=e.response,c=f.byteLength):(f=e.responseText,c=f.length),i.loaded=i.total=c;var h={url:e.responseURL,data:f};this.callbacks.onSuccess(h,i,a,e)}else i.retry>=o.maxRetry||s>=400&&s<499?(n.b.error(s+" while loading "+a.url),this.callbacks.onError({code:s,text:e.statusText},a,e)):(n.b.warn(s+" while loading "+a.url+", retrying in "+this.retryDelay+"..."),this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,o.maxRetryDelay),i.retry++)}else this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),o.timeout)},t.prototype.loadtimeout=function(){n.b.warn("timeout while loading "+this.context.url),this.callbacks.onTimeout(this.stats,this.context,null)},t.prototype.loadprogress=function(t){var e=t.currentTarget,r=this.stats;r.loaded=t.loaded,t.lengthComputable&&(r.total=t.total);var i=this.callbacks.onProgress;i&&i(r,this.context,null,e)},t}();e.a=a},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(5),s=r(9),f=r(2),c=r(7),h=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),u=function(t){function e(r){i(this,e);var a=n(this,t.call(this,r,o.a.MANIFEST_LOADING,o.a.MANIFEST_PARSED,o.a.AUDIO_TRACK_LOADED,o.a.ERROR));return a.ticks=0,a.ontick=a.tick.bind(a),a}return a(e,t),e.prototype.destroy=function(){this.cleanTimer(),s.a.prototype.destroy.call(this)},e.prototype.cleanTimer=function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},e.prototype.tick=function(){1===++this.ticks&&(this.doTick(),this.ticks>1&&setTimeout(this.tick,1),this.ticks=0)},e.prototype.doTick=function(){this.updateTrack(this.trackId)},e.prototype.onError=function(t){t.fatal&&t.type===c.b.NETWORK_ERROR&&this.cleanTimer()},e.prototype.onManifestLoading=function(){this.tracks=[],this.trackId=-1},e.prototype.onManifestParsed=function(t){var e=this,r=t.audioTracks||[],i=!1;this.tracks=r,this.hls.trigger(o.a.AUDIO_TRACKS_UPDATED,{audioTracks:r});var n=0;r.forEach(function(t){if(t.default&&!i)return e.audioTrack=n,void(i=!0);n++}),!1===i&&r.length&&(f.b.log("no default audio track defined, use first audio track as default"),this.audioTrack=0)},e.prototype.onAudioTrackLoaded=function(t){t.id<this.tracks.length&&(f.b.log("audioTrack "+t.id+" loaded"),this.tracks[t.id].details=t.details,t.details.live&&!this.timer&&(this.timer=setInterval(this.ontick,1e3*t.details.targetduration)),!t.details.live&&this.timer&&this.cleanTimer())},e.prototype.setAudioTrackInternal=function(t){if(t>=0&&t<this.tracks.length){this.cleanTimer(),this.trackId=t,f.b.log("switching to audioTrack "+t);var e=this.tracks[t],r=this.hls,i=e.type,n=e.url,a={id:t,type:i,url:n};r.trigger(o.a.AUDIO_TRACK_SWITCHING,a);var s=e.details;!n||void 0!==s&&!0!==s.live||(f.b.log("(re)loading playlist for audioTrack "+t),r.trigger(o.a.AUDIO_TRACK_LOADING,{url:n,id:t}))}},e.prototype.updateTrack=function(t){if(t>=0&&t<this.tracks.length){this.cleanTimer(),this.trackId=t,f.b.log("updating audioTrack "+t);var e=this.tracks[t],r=e.url,i=e.details;!r||void 0!==i&&!0!==i.live||(f.b.log("(re)loading playlist for audioTrack "+t),this.hls.trigger(o.a.AUDIO_TRACK_LOADING,{url:r,id:t}))}},h(e,[{key:"audioTracks",get:function(){return this.tracks}},{key:"audioTrack",get:function(){return this.trackId},set:function(t){this.trackId===t&&void 0!==this.tracks[t].details||this.setAudioTrackInternal(t)}}]),e}(s.a);e.a=u},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(39),s=r(55),f=r(101),c=r(5),h=r(105),u=r(106),d=r(7),l=r(2),p=r(107),b=r(58),g=r(54),v=r(41),y=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),m={STOPPED:"STOPPED",STARTING:"STARTING",IDLE:"IDLE",PAUSED:"PAUSED",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BUFFER_FLUSHING:"BUFFER_FLUSHING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS"},_=function(t){function e(r,a){i(this,e);var o=n(this,t.call(this,r,c.a.MEDIA_ATTACHED,c.a.MEDIA_DETACHING,c.a.AUDIO_TRACKS_UPDATED,c.a.AUDIO_TRACK_SWITCHING,c.a.AUDIO_TRACK_LOADED,c.a.KEY_LOADED,c.a.FRAG_LOADED,c.a.FRAG_PARSING_INIT_SEGMENT,c.a.FRAG_PARSING_DATA,c.a.FRAG_PARSED,c.a.ERROR,c.a.BUFFER_RESET,c.a.BUFFER_CREATED,c.a.BUFFER_APPENDED,c.a.BUFFER_FLUSHED,c.a.INIT_PTS_FOUND));return o.fragmentTracker=a,o.config=r.config,o.audioCodecSwap=!1,o._state=m.STOPPED,o.initPTS=[],o.waitingFragment=null,o.videoTrackCC=null,o}return a(e,t),e.prototype.onHandlerDestroying=function(){this.stopLoad()},e.prototype.onHandlerDestroyed=function(){this.state=m.STOPPED,this.fragmentTracker=null},e.prototype.onInitPtsFound=function(t){var e=t.id,r=t.frag.cc,i=t.initPTS;"main"===e&&(this.initPTS[r]=i,this.videoTrackCC=r,l.b.log("InitPTS for cc: "+r+" found from video track: "+i),this.state===m.WAITING_INIT_PTS&&this.tick())},e.prototype.startLoad=function(t){if(this.tracks){var e=this.lastCurrentTime;this.stopLoad(),this.setInterval(100),this.fragLoadError=0,e>0&&-1===t?(l.b.log("audio:override startPosition with lastCurrentTime @"+e.toFixed(3)),this.state=m.IDLE):(this.lastCurrentTime=this.startPosition?this.startPosition:t,this.state=m.STARTING),this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else this.startPosition=t,this.state=m.STOPPED},e.prototype.stopLoad=function(){var t=this.fragCurrent;t&&(t.loader&&t.loader.abort(),this.fragmentTracker.removeFragment(t),this.fragCurrent=null),this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=m.STOPPED},e.prototype.doTick=function(){var t=void 0,e=void 0,r=void 0,i=this.hls,n=i.config;switch(this.state){case m.ERROR:case m.PAUSED:case m.BUFFER_FLUSHING:break;case m.STARTING:this.state=m.WAITING_TRACK,this.loadedmetadata=!1;break;case m.IDLE:var a=this.tracks;if(!a)break;if(!this.media&&(this.startFragRequested||!n.startFragPrefetch))break;if(this.loadedmetadata)t=this.media.currentTime;else if(void 0===(t=this.nextLoadPosition))break;var f=this.mediaBuffer?this.mediaBuffer:this.media,h=this.videoBuffer?this.videoBuffer:this.media,u=s.a.bufferInfo(f,t,n.maxBufferHole),d=s.a.bufferInfo(h,t,n.maxBufferHole),b=u.len,v=u.end,y=this.fragPrevious,_=Math.min(n.maxBufferLength,n.maxMaxBufferLength),w=Math.max(_,d.len),S=this.audioSwitch,E=this.trackId;if((b<w||S)&&E<a.length){if(void 0===(r=a[E].details)){this.state=m.WAITING_TRACK;break}if(!S&&!r.live&&y&&y.sn===r.endSN&&!u.nextStart&&(!this.media.seeking||this.media.duration-v<y.duration/2)){this.hls.trigger(c.a.BUFFER_EOS,{type:"audio"}),this.state=m.ENDED;break}var A=r.fragments,T=A.length,R=A[0].start,k=A[T-1].start+A[T-1].duration,D=void 0;if(S)if(r.live&&!r.PTSKnown)l.b.log("switching audiotrack, live stream, unknown PTS,load first fragment"),v=0;else if(v=t,r.PTSKnown&&t<R){if(!(u.end>R||u.nextStart))return;l.b.log("alt audio track ahead of main track, seek to start of alt audio track"),this.media.currentTime=R+.05}if(r.initSegment&&!r.initSegment.data)D=r.initSegment;else if(v<=R){if(D=A[0],null!==this.videoTrackCC&&D.cc!==this.videoTrackCC&&(D=Object(p.b)(A,this.videoTrackCC)),r.live&&D.loadIdx&&D.loadIdx===this.fragLoadIdx){var I=u.nextStart?u.nextStart:R;return l.b.log("no alt audio available @currentTime:"+this.media.currentTime+", seeking @"+(I+.05)),void(this.media.currentTime=I+.05)}}else{var M=void 0,x=n.maxFragLookUpTolerance,L=y?A[y.sn-A[0].sn+1]:void 0,O=function(t){var e=Math.min(x,t.duration);return t.start+t.duration-e<=v?1:t.start-e>v&&t.start?-1:0};v<k?(v>k-x&&(x=0),M=L&&!O(L)?L:o.a.search(A,O)):M=A[T-1],M&&(D=M,R=M.start,y&&D.level===y.level&&D.sn===y.sn&&(D.sn<r.endSN?(D=A[D.sn+1-r.startSN],l.b.log("SN just loaded, load next one: "+D.sn)):D=null))}D&&(D.encrypted?(l.b.log("Loading key for "+D.sn+" of ["+r.startSN+" ,"+r.endSN+"],track "+E),this.state=m.KEY_LOADING,i.trigger(c.a.KEY_LOADING,{frag:D})):(l.b.log("Loading "+D.sn+", cc: "+D.cc+" of ["+r.startSN+" ,"+r.endSN+"],track "+E+", currentTime:"+t+",bufferEnd:"+v.toFixed(3)),(S||this.fragmentTracker.getState(D)===g.a.NOT_LOADED)&&(this.fragCurrent=D,this.startFragRequested=!0,isNaN(D.sn)||(this.nextLoadPosition=D.start+D.duration),i.trigger(c.a.FRAG_LOADING,{frag:D}),this.state=m.FRAG_LOADING)))}break;case m.WAITING_TRACK:e=this.tracks[this.trackId],e&&e.details&&(this.state=m.IDLE);break;case m.FRAG_LOADING_WAITING_RETRY:var C=performance.now(),P=this.retryDate;f=this.media;var B=f&&f.seeking;(!P||C>=P||B)&&(l.b.log("audioStreamController: retryDate reached, switch back to IDLE state"),this.state=m.IDLE);break;case m.WAITING_INIT_PTS:var N=this.videoTrackCC;if(void 0===this.initPTS[N])break;var F=this.waitingFragment;if(F){var U=F.frag.cc;N!==U?(e=this.tracks[this.trackId],e.details&&e.details.live&&(l.b.warn("Waiting fragment CC ("+U+") does not match video track CC ("+N+")"),this.waitingFragment=null,this.state=m.IDLE)):(this.state=m.FRAG_LOADING,this.onFragLoaded(this.waitingFragment),this.waitingFragment=null)}else this.state=m.IDLE;break;case m.STOPPED:case m.FRAG_LOADING:case m.PARSING:case m.PARSED:case m.ENDED:}},e.prototype.onMediaAttached=function(t){var e=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),e.addEventListener("seeking",this.onvseeking),e.addEventListener("ended",this.onvended);var r=this.config;this.tracks&&r.autoStartLoad&&this.startLoad(r.startPosition)},e.prototype.onMediaDetaching=function(){var t=this.media;t&&t.ended&&(l.b.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),t&&(t.removeEventListener("seeking",this.onvseeking),t.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1,this.stopLoad()},e.prototype.onMediaSeeking=function(){this.state===m.ENDED&&(this.state=m.IDLE),this.media&&(this.lastCurrentTime=this.media.currentTime),this.tick()},e.prototype.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},e.prototype.onAudioTracksUpdated=function(t){l.b.log("audio tracks updated"),this.tracks=t.audioTracks},e.prototype.onAudioTrackSwitching=function(t){var e=!!t.url;this.trackId=t.id,this.fragCurrent=null,this.state=m.PAUSED,this.waitingFragment=null,e?this.setInterval(100):this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),e&&(this.audioSwitch=!0,this.state=m.IDLE),this.tick()},e.prototype.onAudioTrackLoaded=function(t){var e=t.details,r=t.id,i=this.tracks[r],n=e.totalduration,a=0;if(l.b.log("track "+r+" loaded ["+e.startSN+","+e.endSN+"],duration:"+n),e.live){var o=i.details;o&&e.fragments.length>0?(h.a(o,e),a=e.fragments[0].start,e.PTSKnown?l.b.log("live audio playlist sliding:"+a.toFixed(3)):l.b.log("live audio playlist - outdated PTS, unknown sliding")):(e.PTSKnown=!1,l.b.log("live audio playlist - first load, unknown sliding"))}else e.PTSKnown=!1;if(i.details=e,!this.startFragRequested){if(-1===this.startPosition){var s=e.startTimeOffset;isNaN(s)?this.startPosition=0:(l.b.log("start time offset found in playlist, adjust startPosition to "+s),this.startPosition=s)}this.nextLoadPosition=this.startPosition}this.state===m.WAITING_TRACK&&(this.state=m.IDLE),this.tick()},e.prototype.onKeyLoaded=function(){this.state===m.KEY_LOADING&&(this.state=m.IDLE,this.tick())},e.prototype.onFragLoaded=function(t){var e=this.fragCurrent,r=t.frag;if(this.state===m.FRAG_LOADING&&e&&"audio"===r.type&&r.level===e.level&&r.sn===e.sn){var i=this.tracks[this.trackId],n=i.details,a=n.totalduration,o=e.level,s=e.sn,h=e.cc,u=this.config.defaultAudioCodec||i.audioCodec||"mp4a.40.2",d=this.stats=t.stats;if("initSegment"===s)this.state=m.IDLE,d.tparsed=d.tbuffered=performance.now(),n.initSegment.data=t.payload,this.hls.trigger(c.a.FRAG_BUFFERED,{stats:d,frag:e,id:"audio"}),this.tick();else{this.state=m.PARSING,this.appended=!1,this.demuxer||(this.demuxer=new f.a(this.hls,"audio"));var p=this.initPTS[h],b=n.initSegment?n.initSegment.data:[];if(n.initSegment||void 0!==p){this.pendingBuffering=!0,l.b.log("Demuxing "+s+" of ["+n.startSN+" ,"+n.endSN+"],track "+o);this.demuxer.push(t.payload,b,u,null,e,a,!1,p)}else l.b.log("unknown video PTS for continuity counter "+h+", waiting for video PTS before demuxing audio frag "+s+" of ["+n.startSN+" ,"+n.endSN+"],track "+o),this.waitingFragment=t,this.state=m.WAITING_INIT_PTS}}this.fragLoadError=0},e.prototype.onFragParsingInitSegment=function(t){var e=this.fragCurrent,r=t.frag;if(e&&"audio"===t.id&&r.sn===e.sn&&r.level===e.level&&this.state===m.PARSING){var i=t.tracks,n=void 0;if(i.video&&delete i.video,n=i.audio){n.levelCodec=n.codec,n.id=t.id,this.hls.trigger(c.a.BUFFER_CODECS,i),l.b.log("audio track:audio,container:"+n.container+",codecs[level/parsed]=["+n.levelCodec+"/"+n.codec+"]");var a=n.initSegment;if(a){var o={type:"audio",data:a,parent:"audio",content:"initSegment"};this.audioSwitch?this.pendingData=[o]:(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(c.a.BUFFER_APPENDING,o))}this.tick()}}},e.prototype.onFragParsingData=function(t){var e=this,r=this.fragCurrent,i=t.frag;if(r&&"audio"===t.id&&"audio"===t.type&&i.sn===r.sn&&i.level===r.level&&this.state===m.PARSING){var n=this.trackId,a=this.tracks[n],o=this.hls;isNaN(t.endPTS)&&(t.endPTS=t.startPTS+r.duration,t.endDTS=t.startDTS+r.duration),r.addElementaryStream(v.a.ElementaryStreamTypes.AUDIO),l.b.log("parsed "+t.type+",PTS:["+t.startPTS.toFixed(3)+","+t.endPTS.toFixed(3)+"],DTS:["+t.startDTS.toFixed(3)+"/"+t.endDTS.toFixed(3)+"],nb:"+t.nb),h.b(a.details,r,t.startPTS,t.endPTS);var s=this.audioSwitch,f=this.media,u=!1;if(s&&f)if(f.readyState){var p=f.currentTime;l.b.log("switching audio track : currentTime:"+p),p>=t.startPTS&&(l.b.log("switching audio track : flushing all audio"),this.state=m.BUFFER_FLUSHING,o.trigger(c.a.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),u=!0,this.audioSwitch=!1,o.trigger(c.a.AUDIO_TRACK_SWITCHED,{id:n}))}else this.audioSwitch=!1,o.trigger(c.a.AUDIO_TRACK_SWITCHED,{id:n});var b=this.pendingData;if(!b)return console.warn("Apparently attempt to enqueue media payload without codec initialization data upfront"),void o.trigger(c.a.ERROR,{type:d.b.MEDIA_ERROR,details:null,fatal:!0});this.audioSwitch||([t.data1,t.data2].forEach(function(e){e&&e.length&&b.push({type:t.type,data:e,parent:"audio",content:"data"})}),!u&&b.length&&(b.forEach(function(t){e.state===m.PARSING&&(e.pendingBuffering=!0,e.hls.trigger(c.a.BUFFER_APPENDING,t))}),this.pendingData=[],this.appended=!0)),this.tick()}},e.prototype.onFragParsed=function(t){var e=this.fragCurrent,r=t.frag;e&&"audio"===t.id&&r.sn===e.sn&&r.level===e.level&&this.state===m.PARSING&&(this.stats.tparsed=performance.now(),this.state=m.PARSED,this._checkAppendedParsed())},e.prototype.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},e.prototype.onBufferCreated=function(t){var e=t.tracks.audio;e&&(this.mediaBuffer=e.buffer,this.loadedmetadata=!0),t.tracks.video&&(this.videoBuffer=t.tracks.video.buffer)},e.prototype.onBufferAppended=function(t){if("audio"===t.parent){var e=this.state;e!==m.PARSING&&e!==m.PARSED||(this.pendingBuffering=t.pending>0,this._checkAppendedParsed())}},e.prototype._checkAppendedParsed=function(){if(!(this.state!==m.PARSED||this.appended&&this.pendingBuffering)){var t=this.fragCurrent,e=this.stats,r=this.hls;if(t){this.fragPrevious=t,e.tbuffered=performance.now(),r.trigger(c.a.FRAG_BUFFERED,{stats:e,frag:t,id:"audio"});var i=this.mediaBuffer?this.mediaBuffer:this.media;l.b.log("audio buffered : "+u.a.toString(i.buffered)),this.audioSwitch&&this.appended&&(this.audioSwitch=!1,r.trigger(c.a.AUDIO_TRACK_SWITCHED,{id:this.trackId})),this.state=m.IDLE}this.tick()}},e.prototype.onError=function(t){var e=t.frag;if(!e||"audio"===e.type)switch(t.details){case d.a.FRAG_LOAD_ERROR:case d.a.FRAG_LOAD_TIMEOUT:if(!t.fatal){var r=this.fragLoadError;r?r++:r=1;var i=this.config;if(r<=i.fragLoadingMaxRetry){this.fragLoadError=r;var n=Math.min(Math.pow(2,r-1)*i.fragLoadingRetryDelay,i.fragLoadingMaxRetryTimeout);l.b.warn("audioStreamController: frag loading failed, retry in "+n+" ms"),this.retryDate=performance.now()+n,this.state=m.FRAG_LOADING_WAITING_RETRY}else l.b.error("audioStreamController: "+t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.state=m.ERROR}break;case d.a.AUDIO_TRACK_LOAD_ERROR:case d.a.AUDIO_TRACK_LOAD_TIMEOUT:case d.a.KEY_LOAD_ERROR:case d.a.KEY_LOAD_TIMEOUT:this.state!==m.ERROR&&(this.state=t.fatal?m.ERROR:m.IDLE,l.b.warn("audioStreamController: "+t.details+" while loading frag,switch to "+this.state+" state ..."));break;case d.a.BUFFER_FULL_ERROR:if("audio"===t.parent&&(this.state===m.PARSING||this.state===m.PARSED)){var a=this.mediaBuffer,o=this.media.currentTime;if(a&&s.a.isBuffered(a,o)&&s.a.isBuffered(a,o+.5)){var f=this.config;f.maxMaxBufferLength>=f.maxBufferLength&&(f.maxMaxBufferLength/=2,l.b.warn("audio:reduce max buffer length to "+f.maxMaxBufferLength+"s")),this.state=m.IDLE}else l.b.warn("buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,this.state=m.BUFFER_FLUSHING,this.hls.trigger(c.a.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"})}}},e.prototype.onBufferFlushed=function(){var t=this,e=this.pendingData;e&&e.length?(l.b.log("appending pending audio data on Buffer Flushed"),e.forEach(function(e){t.hls.trigger(c.a.BUFFER_APPENDING,e)}),this.appended=!0,this.pendingData=[],this.state=m.PARSED):(this.state=m.IDLE,this.fragPrevious=null,this.tick())},y(e,[{key:"state",set:function(t){if(this.state!==t){var e=this.state;this._state=t,l.b.log("audio stream:"+e+"->"+t)}},get:function(){return this._state}}]),e}(b.a);e.a=_},function(t,e,r){"use strict";function i(t,e,r,i){for(var a=void 0,o=void 0,s=void 0,f=void 0,c=void 0,h=window.VTTCue||window.TextTrackCue,u=0;u<i.rows.length;u++)if(a=i.rows[u],s=!0,f=0,c="",!a.isEmpty()){for(var d=0;d<a.chars.length;d++)a.chars[d].uchar.match(/\s/)&&s?f++:(c+=a.chars[d].uchar,s=!1);a.cueStartTime=e,e===r&&(r+=1e-4),o=new h(e,r,Object(n.b)(c.trim())),f>=16?f--:f++,navigator.userAgent.match(/Firefox\//)?o.line=u+1:o.line=u>7?u-2:u+1,o.align="left",o.position=Math.max(0,Math.min(100,f/32*100+(navigator.userAgent.match(/Firefox\//)?50:0))),t.addCue(o)}}Object.defineProperty(e,"__esModule",{value:!0}),e.newCue=i;var n=r(109)},function(t,e,r){"use strict";e.a=function(){function t(t){return"string"==typeof t&&(!!a[t.toLowerCase()]&&t.toLowerCase())}function e(t){return"string"==typeof t&&(!!o[t.toLowerCase()]&&t.toLowerCase())}function r(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)t[i]=r[i]}return t}function i(i,a,o){var s=this,f=function(){if("undefined"!=typeof navigator)return/MSIE\s8\.0/.test(navigator.userAgent)}(),c={};f?s=document.createElement("custom"):c.enumerable=!0,s.hasBeenReset=!1;var h="",u=!1,d=i,l=a,p=o,b=null,g="",v=!0,y="auto",m="start",_=50,w="middle",S=50,E="middle";if(Object.defineProperty(s,"id",r({},c,{get:function(){return h},set:function(t){h=""+t}})),Object.defineProperty(s,"pauseOnExit",r({},c,{get:function(){return u},set:function(t){u=!!t}})),Object.defineProperty(s,"startTime",r({},c,{get:function(){return d},set:function(t){if("number"!=typeof t)throw new TypeError("Start time must be set to a number.");d=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"endTime",r({},c,{get:function(){return l},set:function(t){if("number"!=typeof t)throw new TypeError("End time must be set to a number.");l=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"text",r({},c,{get:function(){return p},set:function(t){p=""+t,this.hasBeenReset=!0}})),Object.defineProperty(s,"region",r({},c,{get:function(){return b},set:function(t){b=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"vertical",r({},c,{get:function(){return g},set:function(e){var r=t(e);if(!1===r)throw new SyntaxError("An invalid or illegal string was specified.");g=r,this.hasBeenReset=!0}})),Object.defineProperty(s,"snapToLines",r({},c,{get:function(){return v},set:function(t){v=!!t,this.hasBeenReset=!0}})),Object.defineProperty(s,"line",r({},c,{get:function(){return y},set:function(t){if("number"!=typeof t&&t!==n)throw new SyntaxError("An invalid number or illegal string was specified.");y=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"lineAlign",r({},c,{get:function(){return m},set:function(t){var r=e(t);if(!r)throw new SyntaxError("An invalid or illegal string was specified.");m=r,this.hasBeenReset=!0}})),Object.defineProperty(s,"position",r({},c,{get:function(){return _},set:function(t){if(t<0||t>100)throw new Error("Position must be between 0 and 100.");_=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"positionAlign",r({},c,{get:function(){return w},set:function(t){var r=e(t);if(!r)throw new SyntaxError("An invalid or illegal string was specified.");w=r,this.hasBeenReset=!0}})),Object.defineProperty(s,"size",r({},c,{get:function(){return S},set:function(t){if(t<0||t>100)throw new Error("Size must be between 0 and 100.");S=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"align",r({},c,{get:function(){return E},set:function(t){var r=e(t);if(!r)throw new SyntaxError("An invalid or illegal string was specified.");E=r,this.hasBeenReset=!0}})),s.displayState=void 0,f)return s}if("undefined"!=typeof window&&window.VTTCue)return window.VTTCue;var n="auto",a={"":!0,lr:!0,rl:!0},o={start:!0,middle:!0,end:!0,left:!0,right:!0};return i.prototype.getCueAsHTML=function(){return window.WebVTT.convertCueToDOMTree(window,this.text)},i}()},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function o(t,e){return t&&t.label===e.name&&!(t.textTrack1||t.textTrack2)}function s(t,e,r,i){return Math.min(e,i)-Math.max(t,r)}var f=r(5),c=r(9),h=r(277),u=r(278),d=r(279),l=r(2),p=r(108),b=function(t){function e(r){i(this,e);var a=n(this,t.call(this,r,f.a.MEDIA_ATTACHING,f.a.MEDIA_DETACHING,f.a.FRAG_PARSING_USERDATA,f.a.FRAG_DECRYPTED,f.a.MANIFEST_LOADING,f.a.MANIFEST_LOADED,f.a.FRAG_LOADED,f.a.LEVEL_SWITCHING,f.a.INIT_PTS_FOUND));if(a.hls=r,a.config=r.config,a.enabled=!0,a.Cues=r.config.cueHandler,a.textTracks=[],a.tracks=[],a.unparsedVttFrags=[],a.initPTS=void 0,a.cueRanges=[],a.captionsTracks={},a.captionsProperties={textTrack1:{label:a.config.captionsTextTrack1Label,languageCode:a.config.captionsTextTrack1LanguageCode},textTrack2:{label:a.config.captionsTextTrack2Label,languageCode:a.config.captionsTextTrack2LanguageCode}},a.config.enableCEA708Captions){var o=new u.a(a,"textTrack1"),s=new u.a(a,"textTrack2");a.cea608Parser=new h.a(0,o,s)}return a}return a(e,t),e.prototype.addCues=function(t,e,r,i){for(var n=this.cueRanges,a=!1,o=n.length;o--;){var f=n[o],c=s(f[0],f[1],e,r);if(c>=0&&(f[0]=Math.min(f[0],e),f[1]=Math.max(f[1],r),a=!0,c/(r-e)>.5))return}a||n.push([e,r]),this.Cues.newCue(this.captionsTracks[t],e,r,i)},e.prototype.onInitPtsFound=function(t){var e=this;void 0===this.initPTS&&(this.initPTS=t.initPTS),this.unparsedVttFrags.length&&(this.unparsedVttFrags.forEach(function(t){e.onFragLoaded(t)}),this.unparsedVttFrags=[])},e.prototype.getExistingTrack=function(t){var e=this.media;if(e)for(var r=0;r<e.textTracks.length;r++){var i=e.textTracks[r];if(i[t])return i}return null},e.prototype.createCaptionsTrack=function(t){var e=this.captionsProperties[t],r=e.label,i=e.languageCode,n=this.captionsTracks;if(!n[t]){var a=this.getExistingTrack(t);if(a)n[t]=a,Object(p.a)(n[t]),Object(p.b)(n[t],this.media);else{var o=this.createTextTrack("captions",r,i);o&&(o[t]=!0,n[t]=o)}}},e.prototype.createTextTrack=function(t,e,r){var i=this.media;if(i)return i.addTextTrack(t,e,r)},e.prototype.destroy=function(){c.a.prototype.destroy.call(this)},e.prototype.onMediaAttaching=function(t){this.media=t.media,this._cleanTracks()},e.prototype.onMediaDetaching=function(){var t=this.captionsTracks;Object.keys(t).forEach(function(e){Object(p.a)(t[e]),delete t[e]})},e.prototype.onManifestLoading=function(){this.lastSn=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0},this._cleanTracks()},e.prototype._cleanTracks=function(){var t=this.media;if(t){var e=t.textTracks;if(e)for(var r=0;r<e.length;r++)Object(p.a)(e[r])}},e.prototype.onManifestLoaded=function(t){var e=this;if(this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=void 0,this.cueRanges=[],this.config.enableWebVTT){this.tracks=t.subtitles||[];var r=this.media?this.media.textTracks:[];this.tracks.forEach(function(t,i){var n=void 0;if(i<r.length){var a=r[i];o(a,t)&&(n=a)}n||(n=e.createTextTrack("subtitles",t.name,t.lang)),t.default?n.mode=e.hls.subtitleDisplay?"showing":"hidden":n.mode="disabled",e.textTracks.push(n)})}},e.prototype.onLevelSwitching=function(){this.enabled="NONE"!==this.hls.currentLevel.closedCaptions},e.prototype.onFragLoaded=function(t){var e=t.frag,r=t.payload;if("main"===e.type){var i=e.sn;if(i!==this.lastSn+1){var n=this.cea608Parser;n&&n.reset()}this.lastSn=i}else if("subtitle"===e.type)if(r.byteLength){if(void 0===this.initPTS)return void this.unparsedVttFrags.push(t);var a=e.decryptdata;null!=a&&null!=a.key&&"AES-128"===a.method||this._parseVTTs(e,r)}else this.hls.trigger(f.a.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e})},e.prototype._parseVTTs=function(t,e){var r=this.vttCCs;r[t.cc]||(r[t.cc]={start:t.start,prevCC:this.prevCC,new:!0},this.prevCC=t.cc);var i=this.textTracks,n=this.hls;d.a.parse(e,this.initPTS,r,t.cc,function(e){var r=i[t.trackId];if("disabled"===r.mode)return void n.trigger(f.a.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t});e.forEach(function(t){if(!r.cues.getCueById(t.id))try{r.addCue(t)}catch(i){var e=new window.TextTrackCue(t.startTime,t.endTime,t.text);e.id=t.id,r.addCue(e)}}),n.trigger(f.a.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})},function(e){l.b.log("Failed to parse VTT cue: "+e),n.trigger(f.a.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t})})},e.prototype.onFragDecrypted=function(t){var e=t.payload,r=t.frag;if("subtitle"===r.type){if(void 0===this.initPTS)return void this.unparsedVttFrags.push(t);this._parseVTTs(r,e)}},e.prototype.onFragParsingUserdata=function(t){if(this.enabled&&this.config.enableCEA708Captions)for(var e=0;e<t.samples.length;e++){var r=this.extractCea608Data(t.samples[e].bytes);this.cea608Parser.addData(t.samples[e].pts,r)}},e.prototype.extractCea608Data=function(t){for(var e=31&t[0],r=2,i=void 0,n=void 0,a=void 0,o=void 0,s=void 0,f=[],c=0;c<e;c++)i=t[r++],n=127&t[r++],a=127&t[r++],o=0!=(4&i),s=3&i,0===n&&0===a||o&&0===s&&(f.push(n),f.push(a));return f},e}(c.a);e.a=b},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n={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},a=function(t){var e=t;return n.hasOwnProperty(t)&&(e=n[t]),String.fromCharCode(e)},o=15,s=100,f={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},c={17:2,18:4,21:6,22:8,23:10,19:13,20:15},h={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},u={25:2,26:4,29:6,30:8,31:10,27:13,28:15},d=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],l={verboseFilter:{DATA:3,DEBUG:3,INFO:2,WARNING:2,TEXT:1,ERROR:0},time:null,verboseLevel:0,setTime:function(t){this.time=t},log:function(t,e){var r=this.verboseFilter[t];this.verboseLevel>=r&&console.log(this.time+" ["+t+"] "+e)}},p=function(t){for(var e=[],r=0;r<t.length;r++)e.push(t[r].toString(16));return e},b=function(){function t(e,r,n,a,o){i(this,t),this.foreground=e||"white",this.underline=r||!1,this.italics=n||!1,this.background=a||"black",this.flash=o||!1}return t.prototype.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},t.prototype.setStyles=function(t){for(var e=["foreground","underline","italics","background","flash"],r=0;r<e.length;r++){var i=e[r];t.hasOwnProperty(i)&&(this[i]=t[i])}},t.prototype.isDefault=function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash},t.prototype.equals=function(t){return this.foreground===t.foreground&&this.underline===t.underline&&this.italics===t.italics&&this.background===t.background&&this.flash===t.flash},t.prototype.copy=function(t){this.foreground=t.foreground,this.underline=t.underline,this.italics=t.italics,this.background=t.background,this.flash=t.flash},t.prototype.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},t}(),g=function(){function t(e,r,n,a,o,s){i(this,t),this.uchar=e||" ",this.penState=new b(r,n,a,o,s)}return t.prototype.reset=function(){this.uchar=" ",this.penState.reset()},t.prototype.setChar=function(t,e){this.uchar=t,this.penState.copy(e)},t.prototype.setPenState=function(t){this.penState.copy(t)},t.prototype.equals=function(t){return this.uchar===t.uchar&&this.penState.equals(t.penState)},t.prototype.copy=function(t){this.uchar=t.uchar,this.penState.copy(t.penState)},t.prototype.isEmpty=function(){return" "===this.uchar&&this.penState.isDefault()},t}(),v=function(){function t(){i(this,t),this.chars=[];for(var e=0;e<s;e++)this.chars.push(new g);this.pos=0,this.currPenState=new b}return t.prototype.equals=function(t){for(var e=!0,r=0;r<s;r++)if(!this.chars[r].equals(t.chars[r])){e=!1;break}return e},t.prototype.copy=function(t){for(var e=0;e<s;e++)this.chars[e].copy(t.chars[e])},t.prototype.isEmpty=function(){for(var t=!0,e=0;e<s;e++)if(!this.chars[e].isEmpty()){t=!1;break}return t},t.prototype.setCursor=function(t){this.pos!==t&&(this.pos=t),this.pos<0?(l.log("ERROR","Negative cursor position "+this.pos),this.pos=0):this.pos>s&&(l.log("ERROR","Too large cursor position "+this.pos),this.pos=s)},t.prototype.moveCursor=function(t){var e=this.pos+t;if(t>1)for(var r=this.pos+1;r<e+1;r++)this.chars[r].setPenState(this.currPenState);this.setCursor(e)},t.prototype.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},t.prototype.insertChar=function(t){t>=144&&this.backSpace();var e=a(t);if(this.pos>=s)return void l.log("ERROR","Cannot insert "+t.toString(16)+" ("+e+") at position "+this.pos+". Skipping it!");this.chars[this.pos].setChar(e,this.currPenState),this.moveCursor(1)},t.prototype.clearFromPos=function(t){var e=void 0;for(e=t;e<s;e++)this.chars[e].reset()},t.prototype.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},t.prototype.clearToEndOfRow=function(){this.clearFromPos(this.pos)},t.prototype.getTextString=function(){for(var t=[],e=!0,r=0;r<s;r++){var i=this.chars[r].uchar;" "!==i&&(e=!1),t.push(i)}return e?"":t.join("")},t.prototype.setPenStyles=function(t){this.currPenState.setStyles(t),this.chars[this.pos].setPenState(this.currPenState)},t}(),y=function(){function t(){i(this,t),this.rows=[];for(var e=0;e<o;e++)this.rows.push(new v);this.currRow=o-1,this.nrRollUpRows=null,this.reset()}return t.prototype.reset=function(){for(var t=0;t<o;t++)this.rows[t].clear();this.currRow=o-1},t.prototype.equals=function(t){for(var e=!0,r=0;r<o;r++)if(!this.rows[r].equals(t.rows[r])){e=!1;break}return e},t.prototype.copy=function(t){for(var e=0;e<o;e++)this.rows[e].copy(t.rows[e])},t.prototype.isEmpty=function(){for(var t=!0,e=0;e<o;e++)if(!this.rows[e].isEmpty()){t=!1;break}return t},t.prototype.backSpace=function(){this.rows[this.currRow].backSpace()},t.prototype.clearToEndOfRow=function(){this.rows[this.currRow].clearToEndOfRow()},t.prototype.insertChar=function(t){this.rows[this.currRow].insertChar(t)},t.prototype.setPen=function(t){this.rows[this.currRow].setPenStyles(t)},t.prototype.moveCursor=function(t){this.rows[this.currRow].moveCursor(t)},t.prototype.setCursor=function(t){l.log("INFO","setCursor: "+t),this.rows[this.currRow].setCursor(t)},t.prototype.setPAC=function(t){l.log("INFO","pacData = "+JSON.stringify(t));var e=t.row-1;if(this.nrRollUpRows&&e<this.nrRollUpRows-1&&(e=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==e){for(var r=0;r<o;r++)this.rows[r].clear();var i=this.currRow+1-this.nrRollUpRows,n=this.lastOutputScreen;if(n){var a=n.rows[i].cueStartTime;if(a&&a<l.time)for(var s=0;s<this.nrRollUpRows;s++)this.rows[e-this.nrRollUpRows+s+1].copy(n.rows[i+s])}}this.currRow=e;var f=this.rows[this.currRow];if(null!==t.indent){var c=t.indent,h=Math.max(c-1,0);f.setCursor(t.indent),t.color=f.chars[h].penState.foreground}var u={foreground:t.color,underline:t.underline,italics:t.italics,background:"black",flash:!1};this.setPen(u)},t.prototype.setBkgData=function(t){l.log("INFO","bkgData = "+JSON.stringify(t)),this.backSpace(),this.setPen(t),this.insertChar(32)},t.prototype.setRollUpRows=function(t){this.nrRollUpRows=t},t.prototype.rollUp=function(){if(null===this.nrRollUpRows)return void l.log("DEBUG","roll_up but nrRollUpRows not set yet");l.log("TEXT",this.getDisplayText());var t=this.currRow+1-this.nrRollUpRows,e=this.rows.splice(t,1)[0];e.clear(),this.rows.splice(this.currRow,0,e),l.log("INFO","Rolling up")},t.prototype.getDisplayText=function(t){t=t||!1;for(var e=[],r="",i=-1,n=0;n<o;n++){var a=this.rows[n].getTextString();a&&(i=n+1,t?e.push("Row "+i+": '"+a+"'"):e.push(a.trim()))}return e.length>0&&(r=t?"["+e.join(" | ")+"]":e.join("\n")),r},t.prototype.getTextAndFormat=function(){return this.rows},t}(),m=function(){function t(e,r){i(this,t),this.chNr=e,this.outputFilter=r,this.mode=null,this.verbose=0,this.displayedMemory=new y,this.nonDisplayedMemory=new y,this.lastOutputScreen=new y,this.currRollUpRow=this.displayedMemory.rows[o-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}return t.prototype.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[o-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.lastCueEndTime=null},t.prototype.getHandler=function(){return this.outputFilter},t.prototype.setHandler=function(t){this.outputFilter=t},t.prototype.setPAC=function(t){this.writeScreen.setPAC(t)},t.prototype.setBkgData=function(t){this.writeScreen.setBkgData(t)},t.prototype.setMode=function(t){t!==this.mode&&(this.mode=t,l.log("INFO","MODE="+t),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=t)},t.prototype.insertChars=function(t){for(var e=0;e<t.length;e++)this.writeScreen.insertChar(t[e]);var r=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";l.log("INFO",r+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(l.log("TEXT","DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},t.prototype.ccRCL=function(){l.log("INFO","RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},t.prototype.ccBS=function(){l.log("INFO","BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},t.prototype.ccAOF=function(){},t.prototype.ccAON=function(){},t.prototype.ccDER=function(){l.log("INFO","DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},t.prototype.ccRU=function(t){l.log("INFO","RU("+t+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(t)},t.prototype.ccFON=function(){l.log("INFO","FON - Flash On"),this.writeScreen.setPen({flash:!0})},t.prototype.ccRDC=function(){l.log("INFO","RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},t.prototype.ccTR=function(){l.log("INFO","TR"),this.setMode("MODE_TEXT")},t.prototype.ccRTD=function(){l.log("INFO","RTD"),this.setMode("MODE_TEXT")},t.prototype.ccEDM=function(){l.log("INFO","EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},t.prototype.ccCR=function(){l.log("CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},t.prototype.ccENM=function(){l.log("INFO","ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},t.prototype.ccEOC=function(){if(l.log("INFO","EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var t=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=t,this.writeScreen=this.nonDisplayedMemory,l.log("TEXT","DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},t.prototype.ccTO=function(t){l.log("INFO","TO("+t+") - Tab Offset"),this.writeScreen.moveCursor(t)},t.prototype.ccMIDROW=function(t){var e={flash:!1};if(e.underline=t%2==1,e.italics=t>=46,e.italics)e.foreground="white";else{var r=Math.floor(t/2)-16,i=["white","green","blue","cyan","red","yellow","magenta"];e.foreground=i[r]}l.log("INFO","MIDROW: "+JSON.stringify(e)),this.writeScreen.setPen(e)},t.prototype.outputDataUpdate=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=l.time;null!==e&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue&&(this.outputFilter.newCue(this.cueStartTime,e,this.lastOutputScreen),!0===t&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue()),this.cueStartTime=this.displayedMemory.isEmpty()?null:e):this.cueStartTime=e,this.lastOutputScreen.copy(this.displayedMemory))},t.prototype.cueSplitAtTime=function(t){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,t,this.displayedMemory),this.cueStartTime=t))},t}(),_=function(){function t(e,r,n){i(this,t),this.field=e||1,this.outputs=[r,n],this.channels=[new m(1,r),new m(2,n)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.bufferedData=[],this.startTime=null,this.lastTime=null,this.dataCounters={padding:0,char:0,cmd:0,other:0}}return t.prototype.getHandler=function(t){return this.channels[t].getHandler()},t.prototype.setHandler=function(t,e){this.channels[t].setHandler(e)},t.prototype.addData=function(t,e){var r=void 0,i=void 0,n=void 0,a=!1;this.lastTime=t,l.setTime(t);for(var o=0;o<e.length;o+=2)if(i=127&e[o],n=127&e[o+1],0!==i||0!==n){if(l.log("DATA","["+p([e[o],e[o+1]])+"] -> ("+p([i,n])+")"),r=this.parseCmd(i,n),r||(r=this.parseMidrow(i,n)),r||(r=this.parsePAC(i,n)),r||(r=this.parseBackgroundAttributes(i,n)),!r&&(a=this.parseChars(i,n)))if(this.currChNr&&this.currChNr>=0){var s=this.channels[this.currChNr-1];s.insertChars(a)}else l.log("WARNING","No channel found yet. TEXT-MODE?");r?this.dataCounters.cmd+=2:a?this.dataCounters.char+=2:(this.dataCounters.other+=2,l.log("WARNING","Couldn't parse cleaned data "+p([i,n])+" orig: "+p([e[o],e[o+1]])))}else this.dataCounters.padding+=2},t.prototype.parseCmd=function(t,e){var r=null,i=(20===t||28===t)&&e>=32&&e<=47,n=(23===t||31===t)&&e>=33&&e<=35;if(!i&&!n)return!1;if(t===this.lastCmdA&&e===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,l.log("DEBUG","Repeated command ("+p([t,e])+") is dropped"),!0;r=20===t||23===t?1:2;var a=this.channels[r-1];return 20===t||28===t?32===e?a.ccRCL():33===e?a.ccBS():34===e?a.ccAOF():35===e?a.ccAON():36===e?a.ccDER():37===e?a.ccRU(2):38===e?a.ccRU(3):39===e?a.ccRU(4):40===e?a.ccFON():41===e?a.ccRDC():42===e?a.ccTR():43===e?a.ccRTD():44===e?a.ccEDM():45===e?a.ccCR():46===e?a.ccENM():47===e&&a.ccEOC():a.ccTO(e-32),this.lastCmdA=t,this.lastCmdB=e,this.currChNr=r,!0},t.prototype.parseMidrow=function(t,e){var r=null;if((17===t||25===t)&&e>=32&&e<=47){if((r=17===t?1:2)!==this.currChNr)return l.log("ERROR","Mismatch channel in midrow parsing"),!1;return this.channels[r-1].ccMIDROW(e),l.log("DEBUG","MIDROW ("+p([t,e])+")"),!0}return!1},t.prototype.parsePAC=function(t,e){var r=null,i=null,n=(t>=17&&t<=23||t>=25&&t<=31)&&e>=64&&e<=127,a=(16===t||24===t)&&e>=64&&e<=95;if(!n&&!a)return!1;if(t===this.lastCmdA&&e===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,!0;r=t<=23?1:2,i=e>=64&&e<=95?1===r?f[t]:h[t]:1===r?c[t]:u[t];var o=this.interpretPAC(i,e);return this.channels[r-1].setPAC(o),this.lastCmdA=t,this.lastCmdB=e,this.currChNr=r,!0},t.prototype.interpretPAC=function(t,e){var r=e,i={color:null,italics:!1,indent:null,underline:!1,row:t};return r=e>95?e-96:e-64,i.underline=1==(1&r),r<=13?i.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(r/2)]:r<=15?(i.italics=!0,i.color="white"):i.indent=4*Math.floor((r-16)/2),i},t.prototype.parseChars=function(t,e){var r=null,i=null,n=null;if(t>=25?(r=2,n=t-8):(r=1,n=t),n>=17&&n<=19){var o=e;o=17===n?e+80:18===n?e+112:e+144,l.log("INFO","Special char '"+a(o)+"' in channel "+r),i=[o]}else t>=32&&t<=127&&(i=0===e?[t]:[t,e]);if(i){var s=p(i);l.log("DEBUG","Char codes = "+s.join(",")),this.lastCmdA=null,this.lastCmdB=null}return i},t.prototype.parseBackgroundAttributes=function(t,e){var r=void 0,i=void 0,n=void 0,a=void 0,o=(16===t||24===t)&&e>=32&&e<=47,s=(23===t||31===t)&&e>=45&&e<=47;return!(!o&&!s)&&(r={},16===t||24===t?(i=Math.floor((e-32)/2),r.background=d[i],e%2==1&&(r.background=r.background+"_semi")):45===e?r.background="transparent":(r.foreground="black",47===e&&(r.underline=!0)),n=t<24?1:2,a=this.channels[n-1],a.setBkgData(r),this.lastCmdA=null,this.lastCmdB=null,!0)},t.prototype.reset=function(){for(var t=0;t<this.channels.length;t++)this.channels[t]&&this.channels[t].reset();this.lastCmdA=null,this.lastCmdB=null},t.prototype.cueSplitAtTime=function(t){for(var e=0;e<this.channels.length;e++)this.channels[e]&&this.channels[e].cueSplitAtTime(t)},t}();e.a=_},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=function(){function t(e,r){i(this,t),this.timelineController=e,this.trackName=r,this.startTime=null,this.endTime=null,this.screen=null}return t.prototype.dispatchCue=function(){null!==this.startTime&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen),this.startTime=null)},t.prototype.newCue=function(t,e,r){(null===this.startTime||this.startTime>t)&&(this.startTime=t),this.endTime=e,this.screen=r,this.timelineController.createCaptionsTrack(this.trackName)},t}();e.a=n},function(t,e,r){"use strict";var i=r(109),n=r(40),a=function(t,e,r){return t.substr(r||0,e.length)===e},o=function(t){var e=parseInt(t.substr(-3)),r=parseInt(t.substr(-6,2)),i=parseInt(t.substr(-9,2)),n=t.length>9?parseInt(t.substr(0,t.indexOf(":"))):0;return isNaN(e)||isNaN(r)||isNaN(i)||isNaN(n)?-1:(e+=1e3*r,e+=6e4*i,e+=36e5*n)},s=function(t){for(var e=5381,r=t.length;r;)e=33*e^t.charCodeAt(--r);return(e>>>0).toString()},f=function(t,e,r){var i=t[e],n=t[i.prevCC];if(!n||!n.new&&i.new)return t.ccOffset=t.presentationOffset=i.start,void(i.new=!1);for(;n&&n.new;)t.ccOffset+=i.start-n.start,i.new=!1,i=n,n=t[i.prevCC];t.presentationOffset=r},c={parse:function(t,e,r,c,h,u){var d=/\r\n|\n\r|\n|\r/g,l=Object(n.b)(new Uint8Array(t)).trim().replace(d,"\n").split("\n"),p="00:00.000",b=0,g=0,v=0,y=[],m=void 0,_=!0,w=new i.a;w.oncue=function(t){var e=r[c],i=r.ccOffset;e&&e.new&&(void 0!==g?i=r.ccOffset=e.start:f(r,c,v)),v&&(i=v+r.ccOffset-r.presentationOffset),t.startTime+=i-g-.5,t.endTime+=i-g-.5,t.id=s(t.startTime.toString())+s(t.endTime.toString())+s(t.text),t.text=decodeURIComponent(encodeURIComponent(t.text)),t.endTime>0&&y.push(t)},w.onparsingerror=function(t){m=t},w.onflush=function(){if(m&&u)return void u(m);h(y)},l.forEach(function(t){if(_){if(a(t,"X-TIMESTAMP-MAP=")){_=!1,t.substr(16).split(",").forEach(function(t){a(t,"LOCAL:")?p=t.substr(6):a(t,"MPEGTS:")&&(b=parseInt(t.substr(7)))});try{e=e<0?e+8589934592:e,b-=e,g=o(p)/1e3,v=b/9e4,-1===g&&(m=new Error("Malformed X-TIMESTAMP-MAP: "+t))}catch(e){m=new Error("Malformed X-TIMESTAMP-MAP: "+t)}return}""===t&&(e>0&&(g=e/9e4),_=!1)}w.parse(t+"\n")}),w.flush()}};e.a=c},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function o(t){for(var e=[],r=0;r<t.length;r++)"subtitles"===t[r].kind&&e.push(t[r]);return e}var s=r(5),f=r(9),c=r(2),h=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),u=function(t){function e(r){i(this,e);var a=n(this,t.call(this,r,s.a.MEDIA_ATTACHED,s.a.MEDIA_DETACHING,s.a.MANIFEST_LOADING,s.a.MANIFEST_LOADED,s.a.SUBTITLE_TRACK_LOADED));return a.tracks=[],a.trackId=-1,a.media=null,a.subtitleDisplay=!0,a}return a(e,t),e.prototype._onTextTracksChanged=function(){if(this.media){for(var t=-1,e=o(this.media.textTracks),r=0;r<e.length;r++)if("hidden"===e[r].mode)t=r;else if("showing"===e[r].mode){t=r;break}this.subtitleTrack=t}},e.prototype.destroy=function(){f.a.prototype.destroy.call(this)},e.prototype.onMediaAttached=function(t){var e=this;this.media=t.media,this.media&&(this.queuedDefaultTrack&&(this.subtitleTrack=this.queuedDefaultTrack,delete this.queuedDefaultTrack),this.trackChangeListener=this._onTextTracksChanged.bind(this),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.subtitlePollingInterval=setInterval(function(){e.trackChangeListener()},500):this.media.textTracks.addEventListener("change",this.trackChangeListener))},e.prototype.onMediaDetaching=function(){this.media&&(this.useTextTrackPolling?clearInterval(this.subtitlePollingInterval):this.media.textTracks.removeEventListener("change",this.trackChangeListener),this.media=null)},e.prototype.onManifestLoading=function(){this.tracks=[],this.trackId=-1},e.prototype.onManifestLoaded=function(t){var e=this,r=t.subtitles||[];this.tracks=r,this.trackId=-1,this.hls.trigger(s.a.SUBTITLE_TRACKS_UPDATED,{subtitleTracks:r}),r.forEach(function(t){t.default&&(e.media?e.subtitleTrack=t.id:e.queuedDefaultTrack=t.id)})},e.prototype.onTick=function(){var t=this.trackId,e=this.tracks[t];if(e){var r=e.details;r&&!0!==r.live||(c.b.log("(re)loading playlist for subtitle track "+t),this.hls.trigger(s.a.SUBTITLE_TRACK_LOADING,{url:e.url,id:t}))}},e.prototype.onSubtitleTrackLoaded=function(t){var e=this;if(t.id<this.tracks.length){if(c.b.log("subtitle track "+t.id+" loaded"),this.tracks[t.id].details=t.details,t.details.live&&!this.timer){var r=Math.min(this.hls.config.subtitleLoadInterval,t.details.targetduration);this.timer=setInterval(function(){e.onTick()},1e3*r,this)}!t.details.live&&this.timer&&this._stopTimer()}},e.prototype.setSubtitleTrackInternal=function(t){var e=this.hls,r=this.tracks;if(!("number"!=typeof t||t<-1||t>=r.length)&&(this._stopTimer(),this.trackId=t,c.b.log("switching to subtitle track "+t),e.trigger(s.a.SUBTITLE_TRACK_SWITCH,{id:t}),-1!==t)){var i=r[t],n=i.details;n&&!n.live||(c.b.log("(re)loading playlist for subtitle track "+t),e.trigger(s.a.SUBTITLE_TRACK_LOADING,{url:i.url,id:t}))}},e.prototype._stopTimer=function(){this.timer&&(clearInterval(this.timer),this.timer=null)},e.prototype._toggleTrackModes=function(t){var e=this.media,r=this.subtitleDisplay,i=this.trackId;if(e){var n=o(e.textTracks);if(-1===t)[].slice.call(n).forEach(function(t){t.mode="disabled"});else{var a=n[i];a&&(a.mode="disabled")}var s=n[t];s&&(s.mode=r?"showing":"hidden")}},h(e,[{key:"subtitleTracks",get:function(){return this.tracks}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(t){this.trackId!==t&&(this._toggleTrackModes(t),this.setSubtitleTrackInternal(t))}}]),e}(f.a);e.a=u},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(5),s=r(2),f=r(56),c=r(58),h={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING"},u=function(t){function e(r){i(this,e);var a=n(this,t.call(this,r,o.a.MEDIA_ATTACHED,o.a.ERROR,o.a.KEY_LOADED,o.a.FRAG_LOADED,o.a.SUBTITLE_TRACKS_UPDATED,o.a.SUBTITLE_TRACK_SWITCH,o.a.SUBTITLE_TRACK_LOADED,o.a.SUBTITLE_FRAG_PROCESSED));return a.config=r.config,a.vttFragSNsProcessed={},a.vttFragQueues=void 0,a.currentlyProcessing=null,a.state=h.STOPPED,a.currentTrackId=-1,a.decrypter=new f.a(r.observer,r.config),a}return a(e,t),e.prototype.onHandlerDestroyed=function(){this.state=h.STOPPED},e.prototype.clearVttFragQueues=function(){var t=this;this.vttFragQueues={},this.tracks.forEach(function(e){t.vttFragQueues[e.id]=[]})},e.prototype.nextFrag=function(){if(null===this.currentlyProcessing&&this.currentTrackId>-1&&this.vttFragQueues[this.currentTrackId].length){var t=this.currentlyProcessing=this.vttFragQueues[this.currentTrackId].shift();this.fragCurrent=t,this.hls.trigger(o.a.FRAG_LOADING,{frag:t}),this.state=h.FRAG_LOADING}},e.prototype.onSubtitleFragProcessed=function(t){t.success&&this.vttFragSNsProcessed[t.frag.trackId].push(t.frag.sn),this.currentlyProcessing=null,this.state=h.IDLE,this.nextFrag()},e.prototype.onMediaAttached=function(){this.state=h.IDLE},e.prototype.onError=function(t){var e=t.frag;e&&"subtitle"!==e.type||this.currentlyProcessing&&(this.currentlyProcessing=null,this.nextFrag())},e.prototype.doTick=function(){var t=this;switch(this.state){case h.IDLE:var e=this.tracks,r=this.currentTrackId,i=this.vttFragSNsProcessed[r],n=this.vttFragQueues[r],a=this.currentlyProcessing?this.currentlyProcessing.sn:-1,f=function(t){return i.indexOf(t.sn)>-1},c=function(t){return n.some(function(e){return e.sn===t.sn})};if(!e)break;var u;if(r<e.length&&(u=e[r].details),void 0===u)break;u.fragments.forEach(function(e){f(e)||e.sn===a||c(e)||(e.encrypted?(s.b.log("Loading key for "+e.sn),t.state=h.KEY_LOADING,t.hls.trigger(o.a.KEY_LOADING,{frag:e})):(e.trackId=r,n.push(e),t.nextFrag()))})}},e.prototype.onSubtitleTracksUpdated=function(t){var e=this;s.b.log("subtitle tracks updated"),this.tracks=t.subtitleTracks,this.clearVttFragQueues(),this.vttFragSNsProcessed={},this.tracks.forEach(function(t){e.vttFragSNsProcessed[t.id]=[]})},e.prototype.onSubtitleTrackSwitch=function(t){if(this.currentTrackId=t.id,this.tracks&&-1!==this.currentTrackId){var e=this.tracks[this.currentTrackId];e&&e.details&&this.tick()}},e.prototype.onSubtitleTrackLoaded=function(){this.tick()},e.prototype.onKeyLoaded=function(){this.state===h.KEY_LOADING&&(this.state=h.IDLE,this.tick())},e.prototype.onFragLoaded=function(t){var e=this.fragCurrent,r=t.frag.decryptdata,i=t.frag,n=this.hls;if(this.state===h.FRAG_LOADING&&e&&"subtitle"===t.frag.type&&e.sn===t.frag.sn&&t.payload.byteLength>0&&null!=r&&null!=r.key&&"AES-128"===r.method){var a=void 0;try{a=performance.now()}catch(t){a=Date.now()}this.decrypter.decrypt(t.payload,r.key.buffer,r.iv.buffer,function(t){var e=void 0;try{e=performance.now()}catch(t){e=Date.now()}n.trigger(o.a.FRAG_DECRYPTED,{frag:i,payload:t,stats:{tstart:a,tdecrypt:e}})})}},e}(c.a);e.a=u},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=r(9),s=r(5),f=r(7),c=r(2),h=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),u={WIDEVINE:"com.widevine.alpha",PLAYREADY:"com.microsoft.playready"},d=function(t,e,r){var i={videoCapabilities:[]};return e.forEach(function(t){i.videoCapabilities.push({contentType:'video/mp4; codecs="'+t+'"'})}),[i]},l=function(t,e,r){switch(t){case u.WIDEVINE:return d(0,r);default:throw Error("Unknown key-system: "+t)}},p=function(t){function e(r){i(this,e);var a=n(this,t.call(this,r,s.a.MEDIA_ATTACHED,s.a.MANIFEST_PARSED));return a._widevineLicenseUrl=r.config.widevineLicenseUrl,a._licenseXhrSetup=r.config.licenseXhrSetup,a._emeEnabled=r.config.emeEnabled,a._requestMediaKeySystemAccess=r.config.requestMediaKeySystemAccessFunc,a._mediaKeysList=[],a._media=null,a._hasSetMediaKeys=!1,a._isMediaEncrypted=!1,a._requestLicenseFailureCount=0,a}return a(e,t),e.prototype.getLicenseServerUrl=function(t){var e=void 0;switch(t){case u.WIDEVINE:e=this._widevineLicenseUrl;break;default:e=null}return e||(c.b.error('No license server URL configured for key-system "'+t+'"'),this.hls.trigger(s.a.ERROR,{type:f.b.KEY_SYSTEM_ERROR,details:f.a.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})),e},e.prototype._attemptKeySystemAccess=function(t,e,r){var i=this,n=l(t,0,r);if(!n)return void c.b.warn("Can not create config for key-system (maybe because platform is not supported):",t);c.b.log("Requesting encrypted media key-system access"),this.requestMediaKeySystemAccess(t,n).then(function(e){i._onMediaKeySystemAccessObtained(t,e)}).catch(function(e){c.b.error('Failed to obtain key-system "'+t+'" access:',e)})},e.prototype._onMediaKeySystemAccessObtained=function(t,e){var r=this;c.b.log('Access for key-system "'+t+'" obtained');var i={mediaKeys:null,mediaKeysSession:null,mediaKeysSessionInitialized:!1,mediaKeySystemAccess:e,mediaKeySystemDomain:t};this._mediaKeysList.push(i),e.createMediaKeys().then(function(e){i.mediaKeys=e,c.b.log('Media-keys created for key-system "'+t+'"'),r._onMediaKeysCreated()}).catch(function(t){c.b.error("Failed to create media-keys:",t)})},e.prototype._onMediaKeysCreated=function(){var t=this;this._mediaKeysList.forEach(function(e){e.mediaKeysSession||(e.mediaKeysSession=e.mediaKeys.createSession(),t._onNewMediaKeySession(e.mediaKeysSession))})},e.prototype._onNewMediaKeySession=function(t){var e=this;c.b.log("New key-system session "+t.sessionId),t.addEventListener("message",function(r){e._onKeySessionMessage(t,r.message)},!1)},e.prototype._onKeySessionMessage=function(t,e){c.b.log("Got EME message event, creating license request"),this._requestLicense(e,function(e){c.b.log("Received license data, updating key-session"),t.update(e)})},e.prototype._onMediaEncrypted=function(t,e){c.b.log('Media is encrypted using "'+t+'" init data type'),this._isMediaEncrypted=!0,this._mediaEncryptionInitDataType=t,this._mediaEncryptionInitData=e,this._attemptSetMediaKeys(),this._generateRequestWithPreferredKeySession()},e.prototype._attemptSetMediaKeys=function(){if(!this._hasSetMediaKeys){var t=this._mediaKeysList[0];if(!t||!t.mediaKeys)return c.b.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),void this.hls.trigger(s.a.ERROR,{type:f.b.KEY_SYSTEM_ERROR,details:f.a.KEY_SYSTEM_NO_KEYS,fatal:!0});c.b.log("Setting keys for encrypted media"),this._media.setMediaKeys(t.mediaKeys),this._hasSetMediaKeys=!0}},e.prototype._generateRequestWithPreferredKeySession=function(){var t=this,e=this._mediaKeysList[0];if(!e)return c.b.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),void this.hls.trigger(s.a.ERROR,{type:f.b.KEY_SYSTEM_ERROR,details:f.a.KEY_SYSTEM_NO_ACCESS,fatal:!0});if(e.mediaKeysSessionInitialized)return void c.b.warn("Key-Session already initialized but requested again");var r=e.mediaKeysSession;r||(c.b.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(s.a.ERROR,{type:f.b.KEY_SYSTEM_ERROR,details:f.a.KEY_SYSTEM_NO_SESSION,fatal:!0}));var i=this._mediaEncryptionInitDataType,n=this._mediaEncryptionInitData;c.b.log('Generating key-session request for "'+i+'" init data type'),e.mediaKeysSessionInitialized=!0,r.generateRequest(i,n).then(function(){c.b.debug("Key-session generation succeeded")}).catch(function(e){c.b.error("Error generating key-session request:",e),t.hls.trigger(s.a.ERROR,{type:f.b.KEY_SYSTEM_ERROR,details:f.a.KEY_SYSTEM_NO_SESSION,fatal:!1})})},e.prototype._createLicenseXhr=function(t,e,r){var i=new XMLHttpRequest,n=this._licenseXhrSetup;try{if(n)try{n(i,t)}catch(e){i.open("POST",t,!0),n(i,t)}i.readyState||i.open("POST",t,!0)}catch(t){return c.b.error("Error setting up key-system license XHR",t),void this.hls.trigger(s.a.ERROR,{type:f.b.KEY_SYSTEM_ERROR,details:f.a.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}return i.responseType="arraybuffer",i.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,i,t,e,r),i},e.prototype._onLicenseRequestReadyStageChange=function(t,e,r,i){switch(t.readyState){case 4:if(200===t.status)this._requestLicenseFailureCount=0,c.b.log("License request succeeded"),i(t.response);else{if(c.b.error("License Request XHR failed ("+e+"). Status: "+t.status+" ("+t.statusText+")"),++this._requestLicenseFailureCount<=3){var n=3-this._requestLicenseFailureCount+1;return c.b.warn("Retrying license request, "+n+" attempts left"),void this._requestLicense(r,i)}this.hls.trigger(s.a.ERROR,{type:f.b.KEY_SYSTEM_ERROR,details:f.a.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}}},e.prototype._generateLicenseRequestChallenge=function(t,e){var r=void 0;return t.mediaKeySystemDomain===u.PLAYREADY?c.b.error("PlayReady is not supported (yet)"):t.mediaKeySystemDomain===u.WIDEVINE?r=e:c.b.error("Unsupported key-system:",t.mediaKeySystemDomain),r},e.prototype._requestLicense=function(t,e){c.b.log("Requesting content license for key-system");var r=this._mediaKeysList[0];if(!r)return c.b.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),void this.hls.trigger(s.a.ERROR,{type:f.b.KEY_SYSTEM_ERROR,details:f.a.KEY_SYSTEM_NO_ACCESS,fatal:!0});var i=this.getLicenseServerUrl(r.mediaKeySystemDomain),n=this._createLicenseXhr(i,t,e);c.b.log("Sending license request to URL: "+i),n.send(this._generateLicenseRequestChallenge(r,t))},e.prototype.onMediaAttached=function(t){var e=this;if(this._emeEnabled){var r=t.media;this._media=r,r.addEventListener("encrypted",function(t){e._onMediaEncrypted(t.initDataType,t.initData)})}},e.prototype.onManifestParsed=function(t){if(this._emeEnabled){var e=t.levels.map(function(t){return t.audioCodec}),r=t.levels.map(function(t){return t.videoCodec});this._attemptKeySystemAccess(u.WIDEVINE,e,r)}},h(e,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),e}(o.a);e.a=p},function(t,e,r){"use strict";r.d(e,"a",function(){return i});var i=function(){return"undefined"!=typeof window&&window.navigator&&window.navigator.requestMediaKeySystemAccess?window.navigator.requestMediaKeySystemAccess.bind(window.navigator):null}()},function(t,e){/*! http://mths.be/endswith v0.2.0 by @mathias */
  27. String.prototype.endsWith||function(){"use strict";var t=function(){try{var t={},e=Object.defineProperty,r=e(t,t,t)&&e}catch(t){}return r}(),e={}.toString,r=function(t){if(null==this)throw TypeError();var r=String(this);if(t&&"[object RegExp]"==e.call(t))throw TypeError();var i=r.length,n=String(t),a=n.length,o=i;if(arguments.length>1){var s=arguments[1];void 0!==s&&(o=s?Number(s):0)!=o&&(o=0)}var f=Math.min(Math.max(o,0),i),c=f-a;if(c<0)return!1;for(var h=-1;++h<a;)if(r.charCodeAt(c+h)!=n.charCodeAt(h))return!1;return!0};t?t(String.prototype,"endsWith",{value:r,configurable:!0,writable:!0}):String.prototype.endsWith=r}()}]).default});
  28. //# sourceMappingURL=aliplayer-hls-min.js.map