/*! For license information please see PublicKey.js.LICENSE.txt */ (()=>{var t={67526:(t,e)=>{"use strict";e.byteLength=function(t){var e=o(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,s=o(t),a=s[0],u=s[1],h=new i(function(t,e,r){return 3*(e+r)/4-r}(0,a,u)),c=0,l=u>0?a-4:a;for(r=0;r>16&255,h[c++]=e>>8&255,h[c++]=255&e;return 2===u&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,h[c++]=255&e),1===u&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,h[c++]=e>>8&255,h[c++]=255&e),h},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,s=[],a=16383,o=0,h=n-i;oh?h:o+a));return 1===i?(e=t[n-1],s.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],s.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),s.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=s[a],n[s.charCodeAt(a)]=a;function o(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function u(t,e,n){for(var i,s,a=[],o=e;o>18&63]+r[s>>12&63]+r[s>>6&63]+r[63&s]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},48287:(t,e,r)=>{"use strict";const n=r(67526),i=r(251),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=u,e.INSPECT_MAX_BYTES=50;const a=2147483647;function o(t){if(t>a)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,u.prototype),e}function u(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return l(t)}return h(t,e,r)}function h(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!u.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|d(t,e);let n=o(r);const i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(J(t,Uint8Array)){const e=new Uint8Array(t);return p(e.buffer,e.byteOffset,e.byteLength)}return f(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(J(t,ArrayBuffer)||t&&J(t.buffer,ArrayBuffer))return p(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(J(t,SharedArrayBuffer)||t&&J(t.buffer,SharedArrayBuffer)))return p(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return u.from(n,e,r);const i=function(t){if(u.isBuffer(t)){const e=0|g(t.length),r=o(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||X(t.length)?o(0):f(t):"Buffer"===t.type&&Array.isArray(t.data)?f(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return u.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function c(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function l(t){return c(t),o(t<0?0:0|g(t))}function f(t){const e=t.length<0?0:0|g(t.length),r=o(e);for(let n=0;n=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|t}function d(t,e){if(u.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||J(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return $(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(t).length;default:if(i)return n?-1:$(t).length;e=(""+e).toLowerCase(),i=!0}}function v(t,e,r){let n=!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))return"";for(t||(t="utf8");;)switch(t){case"hex":return P(this,e,r);case"utf8":case"utf-8":return C(this,e,r);case"ascii":return I(this,e,r);case"latin1":case"binary":return D(this,e,r);case"base64":return A(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function y(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function m(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),X(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:x(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):x(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function x(t,e,r,n,i){let s,a=1,o=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,o/=2,u/=2,r/=2}function h(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){let n=-1;for(s=r;so&&(r=o-u),s=r;s>=0;s--){let r=!0;for(let n=0;ni&&(n=i):n=i;const s=e.length;let a;for(n>s/2&&(n=s/2),a=0;a>8,i=r%256,s.push(i),s.push(n);return s}(e,t.length-r),t,r,n)}function A(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function C(t,e,r){r=Math.min(t.length,r);const n=[];let i=e;for(;i239?4:e>223?3:e>191?2:1;if(i+a<=r){let r,n,o,u;switch(a){case 1:e<128&&(s=e);break;case 2:r=t[i+1],128==(192&r)&&(u=(31&e)<<6|63&r,u>127&&(s=u));break;case 3:r=t[i+1],n=t[i+2],128==(192&r)&&128==(192&n)&&(u=(15&e)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(s=u));break;case 4:r=t[i+1],n=t[i+2],o=t[i+3],128==(192&r)&&128==(192&n)&&128==(192&o)&&(u=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&o,u>65535&&u<1114112&&(s=u))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),i+=a}return function(t){const e=t.length;if(e<=B)return String.fromCharCode.apply(String,t);let r="",n=0;for(;nn.length?(u.isBuffer(e)||(e=u.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else{if(!u.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,i)}i+=e.length}return n},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;er&&(t+=" ... "),""},s&&(u.prototype[s]=u.prototype.inspect),u.prototype.compare=function(t,e,r,n,i){if(J(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;let s=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0);const o=Math.min(s,a),h=this.slice(n,i),c=t.slice(e,r);for(let t=0;t>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let s=!1;for(;;)switch(n){case"hex":return w(this,t,e,r);case"utf8":case"utf-8":return b(this,t,e,r);case"ascii":case"latin1":case"binary":return S(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,t,e,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const B=4096;function I(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;in)&&(r=n);let i="";for(let n=e;nr)throw new RangeError("Trying to access beyond buffer length")}function k(t,e,r,n,i,s){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function N(t,e,r,n,i){K(e,n,i,t,r,7);let s=Number(e&BigInt(4294967295));t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,r}function O(t,e,r,n,i){K(e,n,i,t,r,7);let s=Number(e&BigInt(4294967295));t[r+7]=s,s>>=8,t[r+6]=s,s>>=8,t[r+5]=s,s>>=8,t[r+4]=s;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=a,a>>=8,t[r+2]=a,a>>=8,t[r+1]=a,a>>=8,t[r]=a,r+8}function H(t,e,r,n,i,s){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function j(t,e,r,n,s){return e=+e,r>>>=0,s||H(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function L(t,e,r,n,s){return e=+e,r>>>=0,s||H(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||T(t,e,this.length);let n=this[t],i=1,s=0;for(;++s>>=0,e>>>=0,r||T(t,e,this.length);let n=this[t+--e],i=1;for(;e>0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(t,e){return t>>>=0,e||T(t,1,this.length),this[t]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(t,e){return t>>>=0,e||T(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(t,e){return t>>>=0,e||T(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(t,e){return t>>>=0,e||T(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(t,e){return t>>>=0,e||T(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readBigUInt64LE=Z((function(t){_(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||q(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(i)<>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||q(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<>>=0,e>>>=0,r||T(t,e,this.length);let n=this[t],i=1,s=0;for(;++s=i&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||T(t,e,this.length);let n=e,i=1,s=this[t+--n];for(;n>0&&(i*=256);)s+=this[t+--n]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*e)),s},u.prototype.readInt8=function(t,e){return t>>>=0,e||T(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){t>>>=0,e||T(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){t>>>=0,e||T(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return t>>>=0,e||T(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return t>>>=0,e||T(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readBigInt64LE=Z((function(t){_(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||q(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||q(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<>>=0,e||T(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return t>>>=0,e||T(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return t>>>=0,e||T(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return t>>>=0,e||T(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||k(this,t,e,r,Math.pow(2,8*r)-1,0);let i=1,s=0;for(this[e]=255&t;++s>>=0,r>>>=0,n||k(this,t,e,r,Math.pow(2,8*r)-1,0);let i=r-1,s=1;for(this[e+i]=255&t;--i>=0&&(s*=256);)this[e+i]=t/s&255;return e+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||k(this,t,e,1,255,0),this[e]=255&t,e+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||k(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||k(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||k(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||k(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigUInt64LE=Z((function(t,e=0){return N(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=Z((function(t,e=0){return O(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);k(this,t,e,r,n-1,-n)}let i=0,s=1,a=0;for(this[e]=255&t;++i>>=0,!n){const n=Math.pow(2,8*r-1);k(this,t,e,r,n-1,-n)}let i=r-1,s=1,a=0;for(this[e+i]=255&t;--i>=0&&(s*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/s|0)-a&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||k(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||k(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||k(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||k(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||k(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigInt64LE=Z((function(t,e=0){return N(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=Z((function(t,e=0){return O(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(t,e,r){return j(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return j(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return L(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return L(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(!u.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function K(t,e,r,n,i,s){if(t>r||t3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(s+1)}${n}`:`>= -(2${n} ** ${8*(s+1)-1}${n}) and < 2 ** ${8*(s+1)-1}${n}`:`>= ${e}${n} and <= ${r}${n}`,new V.ERR_OUT_OF_RANGE("value",i,t)}!function(t,e,r){_(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||q(e,t.length-(r+1))}(n,i,s)}function _(t,e){if("number"!=typeof t)throw new V.ERR_INVALID_ARG_TYPE(e,"number",t)}function q(t,e,r){if(Math.floor(t)!==t)throw _(t,r),new V.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new V.ERR_BUFFER_OUT_OF_BOUNDS;throw new V.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}U("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),U("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),U("ERR_OUT_OF_RANGE",(function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=M(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=M(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n}),RangeError);const W=/[^+/0-9A-Za-z-_]/g;function $(t,e){let r;e=e||1/0;const n=t.length;let i=null;const s=[];for(let a=0;a55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&s.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&s.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;s.push(r)}else if(r<2048){if((e-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;s.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;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function G(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(t,e,r,n){let i;for(i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function J(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function X(t){return t!=t}const Y=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function Z(t){return"undefined"==typeof BigInt?Q:t}function Q(){throw new Error("BigInt not supported")}},251:(t,e)=>{e.read=function(t,e,r,n,i){var s,a,o=8*i-n-1,u=(1<>1,c=-7,l=r?i-1:0,f=r?-1:1,p=t[e+l];for(l+=f,s=p&(1<<-c)-1,p>>=-c,c+=o;c>0;s=256*s+t[e+l],l+=f,c-=8);for(a=s&(1<<-c)-1,s>>=-c,c+=n;c>0;a=256*a+t[e+l],l+=f,c-=8);if(0===s)s=1-h;else{if(s===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),s-=h}return(p?-1:1)*a*Math.pow(2,s-n)},e.write=function(t,e,r,n,i,s){var a,o,u,h=8*s-i-1,c=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:s-1,g=n?1:-1,d=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(o=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+l>=1?f/u:f*Math.pow(2,1-l))*u>=2&&(a++,u/=2),a+l>=c?(o=0,a=c):a+l>=1?(o=(e*u-1)*Math.pow(2,i),a+=l):(o=e*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;t[r+p]=255&o,p+=g,o/=256,i-=8);for(a=a<0;t[r+p]=255&a,p+=g,a/=256,h-=8);t[r+p-g]|=128*d}},95355:(t,e,r)=>{var n,i,s,a,o,u,h,c,l,f,p,g=r(48287).Buffer,d={userAgent:!1},v={},y=y||(n=Math,s=(i={}).lib={},a=s.Base=function(){function t(){}return{extend:function(e){t.prototype=this;var r=new t;return e&&r.mixIn(e),r.hasOwnProperty("init")||(r.init=function(){r.$super.init.apply(this,arguments)}),r.init.prototype=r,r.$super=this,r},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)}}}(),o=s.WordArray=a.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length},toString:function(t){return(t||h).stringify(this)},concat:function(t){var e=this.words,r=t.words,n=this.sigBytes,i=t.sigBytes;if(this.clamp(),n%4)for(var s=0;s>>2]>>>24-s%4*8&255;e[n+s>>>2]|=a<<24-(n+s)%4*8}else for(s=0;s>>2]=r[s>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,e=this.sigBytes;t[e>>>2]&=4294967295<<32-e%4*8,t.length=n.ceil(e/4)},clone:function(){var t=a.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],r=0;r>>2]>>>24-i%4*8&255;n.push((s>>>4).toString(16)),n.push((15&s).toString(16))}return n.join("")},parse:function(t){for(var e=t.length,r=[],n=0;n>>3]|=parseInt(t.substr(n,2),16)<<24-n%8*4;return new o.init(r,e/2)}},c=u.Latin1={stringify:function(t){for(var e=t.words,r=t.sigBytes,n=[],i=0;i>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(s))}return n.join("")},parse:function(t){for(var e=t.length,r=[],n=0;n>>2]|=(255&t.charCodeAt(n))<<24-n%4*8;return new o.init(r,e)}},l=u.Utf8={stringify:function(t){try{return decodeURIComponent(escape(c.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return c.parse(unescape(encodeURIComponent(t)))}},f=s.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=l.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(t){var e=this._data,r=e.words,i=e.sigBytes,s=this.blockSize,a=i/(4*s),u=(a=t?n.ceil(a):n.max((0|a)-this._minBufferSize,0))*s,h=n.min(4*u,i);if(u){for(var c=0;c>>2]}},t.BlockCipher=a.extend({cfg:a.cfg.extend({mode:o,padding:h}),reset:function(){a.reset.call(this);var t=(e=this.cfg).iv,e=e.mode;if(this._xformMode==this._ENC_XFORM_MODE)var r=e.createEncryptor;else r=e.createDecryptor,this._minBufferSize=1;this._mode=r.call(e,this,t&&t.words)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){t.pad(this._data,this.blockSize);var e=this._process(!0)}else e=this._process(!0),t.unpad(e);return e},blockSize:4});var c=t.CipherParams=e.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}}),l=(o=(f.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext;return((t=t.salt)?r.create([1398893684,1701076831]).concat(t).concat(e):e).toString(i)},parse:function(t){var e=(t=i.parse(t)).words;if(1398893684==e[0]&&1701076831==e[1]){var n=r.create(e.slice(2,4));e.splice(0,4),t.sigBytes-=16}return c.create({ciphertext:t,salt:n})}},t.SerializableCipher=e.extend({cfg:e.extend({format:o}),encrypt:function(t,e,r,n){n=this.cfg.extend(n);var i=t.createEncryptor(r,n);return e=i.finalize(e),i=i.cfg,c.create({ciphertext:e,key:r,iv:i.iv,algorithm:t,mode:i.mode,padding:i.padding,blockSize:t.blockSize,formatter:n.format})},decrypt:function(t,e,r,n){return n=this.cfg.extend(n),e=this._parse(e,n.format),t.createDecryptor(r,n).finalize(e.ciphertext)},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}})),f=(f.kdf={}).OpenSSL={execute:function(t,e,n,i){return i||(i=r.random(8)),t=s.create({keySize:e+n}).compute(t,i),n=r.create(t.words.slice(e),4*n),t.sigBytes=4*e,c.create({key:t,iv:n,salt:i})}},p=t.PasswordBasedCipher=l.extend({cfg:l.cfg.extend({kdf:f}),encrypt:function(t,e,r,n){return r=(n=this.cfg.extend(n)).kdf.execute(r,t.keySize,t.ivSize),n.iv=r.iv,(t=l.encrypt.call(this,t,e,r.key,n)).mixIn(r),t},decrypt:function(t,e,r,n){return n=this.cfg.extend(n),e=this._parse(e,n.format),r=n.kdf.execute(r,t.keySize,t.ivSize,e.salt),n.iv=r.iv,l.decrypt.call(this,t,e,r.key,n)}})}(),function(){for(var t=y,e=t.lib.BlockCipher,r=t.algo,n=[],i=[],s=[],a=[],o=[],u=[],h=[],c=[],l=[],f=[],p=[],g=0;256>g;g++)p[g]=128>g?g<<1:g<<1^283;var d=0,v=0;for(g=0;256>g;g++){var m=(m=v^v<<1^v<<2^v<<3^v<<4)>>>8^255&m^99;n[d]=m,i[m]=d;var x=p[d],w=p[x],b=p[w],S=257*p[m]^16843008*m;s[d]=S<<24|S>>>8,a[d]=S<<16|S>>>16,o[d]=S<<8|S>>>24,u[d]=S,S=16843009*b^65537*w^257*x^16843008*d,h[m]=S<<24|S>>>8,c[m]=S<<16|S>>>16,l[m]=S<<8|S>>>24,f[m]=S,d?(d=x^p[p[p[b^x]]],v^=p[p[v]]):d=v=1}var E=[0,1,2,4,8,16,32,64,128,27,54];r=r.AES=e.extend({_doReset:function(){for(var t=(r=this._key).words,e=r.sigBytes/4,r=4*((this._nRounds=e+6)+1),i=this._keySchedule=[],s=0;s>>24]<<24|n[a>>>16&255]<<16|n[a>>>8&255]<<8|n[255&a]):(a=n[(a=a<<8|a>>>24)>>>24]<<24|n[a>>>16&255]<<16|n[a>>>8&255]<<8|n[255&a],a^=E[s/e|0]<<24),i[s]=i[s-e]^a}for(t=this._invKeySchedule=[],e=0;ee||4>=s?a:h[n[a>>>24]]^c[n[a>>>16&255]]^l[n[a>>>8&255]]^f[n[255&a]]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,s,a,o,u,n)},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,h,c,l,f,i),r=t[e+1],t[e+1]=t[e+3],t[e+3]=r},_doCryptBlock:function(t,e,r,n,i,s,a,o){for(var u=this._nRounds,h=t[e]^r[0],c=t[e+1]^r[1],l=t[e+2]^r[2],f=t[e+3]^r[3],p=4,g=1;g>>24]^i[c>>>16&255]^s[l>>>8&255]^a[255&f]^r[p++],v=n[c>>>24]^i[l>>>16&255]^s[f>>>8&255]^a[255&h]^r[p++],y=n[l>>>24]^i[f>>>16&255]^s[h>>>8&255]^a[255&c]^r[p++];f=n[f>>>24]^i[h>>>16&255]^s[c>>>8&255]^a[255&l]^r[p++],h=d,c=v,l=y}d=(o[h>>>24]<<24|o[c>>>16&255]<<16|o[l>>>8&255]<<8|o[255&f])^r[p++],v=(o[c>>>24]<<24|o[l>>>16&255]<<16|o[f>>>8&255]<<8|o[255&h])^r[p++],y=(o[l>>>24]<<24|o[f>>>16&255]<<16|o[h>>>8&255]<<8|o[255&c])^r[p++],f=(o[f>>>24]<<24|o[h>>>16&255]<<16|o[c>>>8&255]<<8|o[255&l])^r[p++],t[e]=d,t[e+1]=v,t[e+2]=y,t[e+3]=f},keySize:8}),t.AES=e._createHelper(r)}(),function(){function t(t,e){var r=(this._lBlock>>>t^this._rBlock)&e;this._rBlock^=r,this._lBlock^=r<>>t^this._lBlock)&e;this._lBlock^=r,this._rBlock^=r<r;r++){var n=a[r]-1;e[r]=t[n>>>5]>>>31-n%32&1}for(t=this._subKeys=[],n=0;16>n;n++){var i=t[n]=[],s=u[n];for(r=0;24>r;r++)i[r/6|0]|=e[(o[r]-1+s)%28]<<31-r%6,i[4+(r/6|0)]|=e[28+(o[r+24]-1+s)%28]<<31-r%6;for(i[0]=i[0]<<1|i[0]>>>31,r=1;7>r;r++)i[r]>>>=4*(r-1)+3;i[7]=i[7]<<5|i[7]>>>27}for(e=this._invSubKeys=[],r=0;16>r;r++)e[r]=t[15-r]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._subKeys)},decryptBlock:function(t,e){this._doCryptBlock(t,e,this._invSubKeys)},_doCryptBlock:function(r,n,i){this._lBlock=r[n],this._rBlock=r[n+1],t.call(this,4,252645135),t.call(this,16,65535),e.call(this,2,858993459),e.call(this,8,16711935),t.call(this,1,1431655765);for(var s=0;16>s;s++){for(var a=i[s],o=this._lBlock,u=this._rBlock,l=0,f=0;8>f;f++)l|=h[f][((u^a[f])&c[f])>>>0];this._lBlock=u,this._rBlock=o^l}i=this._lBlock,this._lBlock=this._rBlock,this._rBlock=i,t.call(this,1,1431655765),e.call(this,8,16711935),e.call(this,2,858993459),t.call(this,16,65535),t.call(this,4,252645135),r[n]=this._lBlock,r[n+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});r.DES=i._createHelper(l),s=s.TripleDES=i.extend({_doReset:function(){var t=this._key.words;this._des1=l.createEncryptor(n.create(t.slice(0,2))),this._des2=l.createEncryptor(n.create(t.slice(2,4))),this._des3=l.createEncryptor(n.create(t.slice(4,6)))},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}),r.TripleDES=i._createHelper(s)}(),function(){var t=y,e=t.lib.WordArray;t.enc.Base64={stringify:function(t){var e=t.words,r=t.sigBytes,n=this._map;t.clamp(),t=[];for(var i=0;i>>2]>>>24-i%4*8&255)<<16|(e[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|e[i+2>>>2]>>>24-(i+2)%4*8&255,a=0;4>a&&i+.75*a>>6*(3-a)&63));if(e=n.charAt(64))for(;t.length%4;)t.push(e);return t.join("")},parse:function(t){var r=t.length,n=this._map;(i=n.charAt(64))&&-1!=(i=t.indexOf(i))&&(r=i);for(var i=[],s=0,a=0;a>>6-a%4*2;i[s>>>2]|=(o|u)<<24-s%4*8,s++}return e.create(i,s)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(t){function e(t,e,r,n,i,s,a){return((t=t+(e&r|~e&n)+i+a)<>>32-s)+e}function r(t,e,r,n,i,s,a){return((t=t+(e&n|r&~n)+i+a)<>>32-s)+e}function n(t,e,r,n,i,s,a){return((t=t+(e^r^n)+i+a)<>>32-s)+e}function i(t,e,r,n,i,s,a){return((t=t+(r^(e|~n))+i+a)<>>32-s)+e}for(var s=y,a=(u=s.lib).WordArray,o=u.Hasher,u=s.algo,h=[],c=0;64>c;c++)h[c]=4294967296*t.abs(t.sin(c+1))|0;u=u.MD5=o.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,s){for(var a=0;16>a;a++){var o=t[u=s+a];t[u]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}a=this._hash.words;var u=t[s+0],c=(o=t[s+1],t[s+2]),l=t[s+3],f=t[s+4],p=t[s+5],g=t[s+6],d=t[s+7],v=t[s+8],y=t[s+9],m=t[s+10],x=t[s+11],w=t[s+12],b=t[s+13],S=t[s+14],E=t[s+15],F=e(F=a[0],B=a[1],C=a[2],A=a[3],u,7,h[0]),A=e(A,F,B,C,o,12,h[1]),C=e(C,A,F,B,c,17,h[2]),B=e(B,C,A,F,l,22,h[3]);F=e(F,B,C,A,f,7,h[4]),A=e(A,F,B,C,p,12,h[5]),C=e(C,A,F,B,g,17,h[6]),B=e(B,C,A,F,d,22,h[7]),F=e(F,B,C,A,v,7,h[8]),A=e(A,F,B,C,y,12,h[9]),C=e(C,A,F,B,m,17,h[10]),B=e(B,C,A,F,x,22,h[11]),F=e(F,B,C,A,w,7,h[12]),A=e(A,F,B,C,b,12,h[13]),C=e(C,A,F,B,S,17,h[14]),F=r(F,B=e(B,C,A,F,E,22,h[15]),C,A,o,5,h[16]),A=r(A,F,B,C,g,9,h[17]),C=r(C,A,F,B,x,14,h[18]),B=r(B,C,A,F,u,20,h[19]),F=r(F,B,C,A,p,5,h[20]),A=r(A,F,B,C,m,9,h[21]),C=r(C,A,F,B,E,14,h[22]),B=r(B,C,A,F,f,20,h[23]),F=r(F,B,C,A,y,5,h[24]),A=r(A,F,B,C,S,9,h[25]),C=r(C,A,F,B,l,14,h[26]),B=r(B,C,A,F,v,20,h[27]),F=r(F,B,C,A,b,5,h[28]),A=r(A,F,B,C,c,9,h[29]),C=r(C,A,F,B,d,14,h[30]),F=n(F,B=r(B,C,A,F,w,20,h[31]),C,A,p,4,h[32]),A=n(A,F,B,C,v,11,h[33]),C=n(C,A,F,B,x,16,h[34]),B=n(B,C,A,F,S,23,h[35]),F=n(F,B,C,A,o,4,h[36]),A=n(A,F,B,C,f,11,h[37]),C=n(C,A,F,B,d,16,h[38]),B=n(B,C,A,F,m,23,h[39]),F=n(F,B,C,A,b,4,h[40]),A=n(A,F,B,C,u,11,h[41]),C=n(C,A,F,B,l,16,h[42]),B=n(B,C,A,F,g,23,h[43]),F=n(F,B,C,A,y,4,h[44]),A=n(A,F,B,C,w,11,h[45]),C=n(C,A,F,B,E,16,h[46]),F=i(F,B=n(B,C,A,F,c,23,h[47]),C,A,u,6,h[48]),A=i(A,F,B,C,d,10,h[49]),C=i(C,A,F,B,S,15,h[50]),B=i(B,C,A,F,p,21,h[51]),F=i(F,B,C,A,w,6,h[52]),A=i(A,F,B,C,l,10,h[53]),C=i(C,A,F,B,m,15,h[54]),B=i(B,C,A,F,o,21,h[55]),F=i(F,B,C,A,v,6,h[56]),A=i(A,F,B,C,E,10,h[57]),C=i(C,A,F,B,g,15,h[58]),B=i(B,C,A,F,b,21,h[59]),F=i(F,B,C,A,f,6,h[60]),A=i(A,F,B,C,x,10,h[61]),C=i(C,A,F,B,c,15,h[62]),B=i(B,C,A,F,y,21,h[63]),a[0]=a[0]+F|0,a[1]=a[1]+B|0,a[2]=a[2]+C|0,a[3]=a[3]+A|0},_doFinalize:function(){var e=this._data,r=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;r[i>>>5]|=128<<24-i%32;var s=t.floor(n/4294967296);for(r[15+(i+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),r[14+(i+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.sigBytes=4*(r.length+1),this._process(),r=(e=this._hash).words,n=0;4>n;n++)i=r[n],r[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8);return e},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}}),s.MD5=o._createHelper(u),s.HmacMD5=o._createHmacHelper(u)}(Math),function(){var t=y,e=(i=t.lib).WordArray,r=i.Hasher,n=[],i=t.algo.SHA1=r.extend({_doReset:function(){this._hash=new e.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var r=this._hash.words,i=r[0],s=r[1],a=r[2],o=r[3],u=r[4],h=0;80>h;h++){if(16>h)n[h]=0|t[e+h];else{var c=n[h-3]^n[h-8]^n[h-14]^n[h-16];n[h]=c<<1|c>>>31}c=(i<<5|i>>>27)+u+n[h],c=20>h?c+(1518500249+(s&a|~s&o)):40>h?c+(1859775393+(s^a^o)):60>h?c+((s&a|s&o|a&o)-1894007588):c+((s^a^o)-899497514),u=o,o=a,a=s<<30|s>>>2,s=i,i=c}r[0]=r[0]+i|0,r[1]=r[1]+s|0,r[2]=r[2]+a|0,r[3]=r[3]+o|0,r[4]=r[4]+u|0},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,n=8*t.sigBytes;return e[n>>>5]|=128<<24-n%32,e[14+(n+64>>>9<<4)]=Math.floor(r/4294967296),e[15+(n+64>>>9<<4)]=r,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=r.clone.call(this);return t._hash=this._hash.clone(),t}});t.SHA1=r._createHelper(i),t.HmacSHA1=r._createHmacHelper(i)}(),function(t){for(var e=y,r=(i=e.lib).WordArray,n=i.Hasher,i=e.algo,s=[],a=[],o=function(t){return 4294967296*(t-(0|t))|0},u=2,h=0;64>h;){var c;t:{c=u;for(var l=t.sqrt(c),f=2;f<=l;f++)if(!(c%f)){c=!1;break t}c=!0}c&&(8>h&&(s[h]=o(t.pow(u,.5))),a[h]=o(t.pow(u,1/3)),h++),u++}var p=[];i=i.SHA256=n.extend({_doReset:function(){this._hash=new r.init(s.slice(0))},_doProcessBlock:function(t,e){for(var r=this._hash.words,n=r[0],i=r[1],s=r[2],o=r[3],u=r[4],h=r[5],c=r[6],l=r[7],f=0;64>f;f++){if(16>f)p[f]=0|t[e+f];else{var g=p[f-15],d=p[f-2];p[f]=((g<<25|g>>>7)^(g<<14|g>>>18)^g>>>3)+p[f-7]+((d<<15|d>>>17)^(d<<13|d>>>19)^d>>>10)+p[f-16]}g=l+((u<<26|u>>>6)^(u<<21|u>>>11)^(u<<7|u>>>25))+(u&h^~u&c)+a[f]+p[f],d=((n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22))+(n&i^n&s^i&s),l=c,c=h,h=u,u=o+g|0,o=s,s=i,i=n,n=g+d|0}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+s|0,r[3]=r[3]+o|0,r[4]=r[4]+u|0,r[5]=r[5]+h|0,r[6]=r[6]+c|0,r[7]=r[7]+l|0},_doFinalize:function(){var e=this._data,r=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;return r[i>>>5]|=128<<24-i%32,r[14+(i+64>>>9<<4)]=t.floor(n/4294967296),r[15+(i+64>>>9<<4)]=n,e.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t}}),e.SHA256=n._createHelper(i),e.HmacSHA256=n._createHmacHelper(i)}(Math),function(){var t=y,e=t.lib.WordArray,r=(n=t.algo).SHA256,n=n.SHA224=r.extend({_doReset:function(){this._hash=new e.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var t=r._doFinalize.call(this);return t.sigBytes-=4,t}});t.SHA224=r._createHelper(n),t.HmacSHA224=r._createHmacHelper(n)}(),function(){function t(){return n.create.apply(n,arguments)}for(var e=y,r=e.lib.Hasher,n=(s=e.x64).Word,i=s.WordArray,s=e.algo,a=[t(1116352408,3609767458),t(1899447441,602891725),t(3049323471,3964484399),t(3921009573,2173295548),t(961987163,4081628472),t(1508970993,3053834265),t(2453635748,2937671579),t(2870763221,3664609560),t(3624381080,2734883394),t(310598401,1164996542),t(607225278,1323610764),t(1426881987,3590304994),t(1925078388,4068182383),t(2162078206,991336113),t(2614888103,633803317),t(3248222580,3479774868),t(3835390401,2666613458),t(4022224774,944711139),t(264347078,2341262773),t(604807628,2007800933),t(770255983,1495990901),t(1249150122,1856431235),t(1555081692,3175218132),t(1996064986,2198950837),t(2554220882,3999719339),t(2821834349,766784016),t(2952996808,2566594879),t(3210313671,3203337956),t(3336571891,1034457026),t(3584528711,2466948901),t(113926993,3758326383),t(338241895,168717936),t(666307205,1188179964),t(773529912,1546045734),t(1294757372,1522805485),t(1396182291,2643833823),t(1695183700,2343527390),t(1986661051,1014477480),t(2177026350,1206759142),t(2456956037,344077627),t(2730485921,1290863460),t(2820302411,3158454273),t(3259730800,3505952657),t(3345764771,106217008),t(3516065817,3606008344),t(3600352804,1432725776),t(4094571909,1467031594),t(275423344,851169720),t(430227734,3100823752),t(506948616,1363258195),t(659060556,3750685593),t(883997877,3785050280),t(958139571,3318307427),t(1322822218,3812723403),t(1537002063,2003034995),t(1747873779,3602036899),t(1955562222,1575990012),t(2024104815,1125592928),t(2227730452,2716904306),t(2361852424,442776044),t(2428436474,593698344),t(2756734187,3733110249),t(3204031479,2999351573),t(3329325298,3815920427),t(3391569614,3928383900),t(3515267271,566280711),t(3940187606,3454069534),t(4118630271,4000239992),t(116418474,1914138554),t(174292421,2731055270),t(289380356,3203993006),t(460393269,320620315),t(685471733,587496836),t(852142971,1086792851),t(1017036298,365543100),t(1126000580,2618297676),t(1288033470,3409855158),t(1501505948,4234509866),t(1607167915,987167468),t(1816402316,1246189591)],o=[],u=0;80>u;u++)o[u]=t();s=s.SHA512=r.extend({_doReset:function(){this._hash=new i.init([new n.init(1779033703,4089235720),new n.init(3144134277,2227873595),new n.init(1013904242,4271175723),new n.init(2773480762,1595750129),new n.init(1359893119,2917565137),new n.init(2600822924,725511199),new n.init(528734635,4215389547),new n.init(1541459225,327033209)])},_doProcessBlock:function(t,e){for(var r=(l=this._hash.words)[0],n=l[1],i=l[2],s=l[3],u=l[4],h=l[5],c=l[6],l=l[7],f=r.high,p=r.low,g=n.high,d=n.low,v=i.high,y=i.low,m=s.high,x=s.low,w=u.high,b=u.low,S=h.high,E=h.low,F=c.high,A=c.low,C=l.high,B=l.low,I=f,D=p,P=g,R=d,T=v,k=y,N=m,O=x,H=w,j=b,L=S,V=E,U=F,M=A,K=C,_=B,q=0;80>q;q++){var W=o[q];if(16>q)var $=W.high=0|t[e+2*q],G=W.low=0|t[e+2*q+1];else{$=((G=($=o[q-15]).high)>>>1|(z=$.low)<<31)^(G>>>8|z<<24)^G>>>7;var z=(z>>>1|G<<31)^(z>>>8|G<<24)^(z>>>7|G<<25),J=((G=(J=o[q-2]).high)>>>19|(X=J.low)<<13)^(G<<3|X>>>29)^G>>>6,X=(X>>>19|G<<13)^(X<<3|G>>>29)^(X>>>6|G<<26),Y=(G=o[q-7]).high,Z=(Q=o[q-16]).high,Q=Q.low;$=($=($=$+Y+((G=z+G.low)>>>0>>0?1:0))+J+((G+=X)>>>0>>0?1:0))+Z+((G+=Q)>>>0>>0?1:0),W.high=$,W.low=G}Y=H&L^~H&U,Q=j&V^~j&M,W=I&P^I&T^P&T;var tt=D&R^D&k^R&k,et=(z=(I>>>28|D<<4)^(I<<30|D>>>2)^(I<<25|D>>>7),J=(D>>>28|I<<4)^(D<<30|I>>>2)^(D<<25|I>>>7),(X=a[q]).high),rt=X.low;Z=K+((H>>>14|j<<18)^(H>>>18|j<<14)^(H<<23|j>>>9))+((X=_+((j>>>14|H<<18)^(j>>>18|H<<14)^(j<<23|H>>>9)))>>>0<_>>>0?1:0),K=U,_=M,U=L,M=V,L=H,V=j,H=N+(Z=(Z=(Z=Z+Y+((X+=Q)>>>0>>0?1:0))+et+((X+=rt)>>>0>>0?1:0))+$+((X+=G)>>>0>>0?1:0))+((j=O+X|0)>>>0>>0?1:0)|0,N=T,O=k,T=P,k=R,P=I,R=D,I=Z+(W=z+W+((G=J+tt)>>>0>>0?1:0))+((D=X+G|0)>>>0>>0?1:0)|0}p=r.low=p+D,r.high=f+I+(p>>>0>>0?1:0),d=n.low=d+R,n.high=g+P+(d>>>0>>0?1:0),y=i.low=y+k,i.high=v+T+(y>>>0>>0?1:0),x=s.low=x+O,s.high=m+N+(x>>>0>>0?1:0),b=u.low=b+j,u.high=w+H+(b>>>0>>0?1:0),E=h.low=E+V,h.high=S+L+(E>>>0>>0?1:0),A=c.low=A+M,c.high=F+U+(A>>>0>>0?1:0),B=l.low=B+_,l.high=C+K+(B>>>0<_>>>0?1:0)},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,n=8*t.sigBytes;return e[n>>>5]|=128<<24-n%32,e[30+(n+128>>>10<<5)]=Math.floor(r/4294967296),e[31+(n+128>>>10<<5)]=r,t.sigBytes=4*e.length,this._process(),this._hash.toX32()},clone:function(){var t=r.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32}),e.SHA512=r._createHelper(s),e.HmacSHA512=r._createHmacHelper(s)}(),function(){var t=y,e=(i=t.x64).Word,r=i.WordArray,n=(i=t.algo).SHA512,i=i.SHA384=n.extend({_doReset:function(){this._hash=new r.init([new e.init(3418070365,3238371032),new e.init(1654270250,914150663),new e.init(2438529370,812702999),new e.init(355462360,4144912697),new e.init(1731405415,4290775857),new e.init(2394180231,1750603025),new e.init(3675008525,1694076839),new e.init(1203062813,3204075428)])},_doFinalize:function(){var t=n._doFinalize.call(this);return t.sigBytes-=16,t}});t.SHA384=n._createHelper(i),t.HmacSHA384=n._createHmacHelper(i)}(),function(){var t=y,e=(n=t.lib).WordArray,r=n.Hasher,n=t.algo,i=e.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]),s=e.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]),a=e.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]),o=e.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]),u=e.create([0,1518500249,1859775393,2400959708,2840853838]),h=e.create([1352829926,1548603684,1836072691,2053994217,0]);n=n.RIPEMD160=r.extend({_doReset:function(){this._hash=e.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var r=0;16>r;r++){var n=t[b=e+r];t[b]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8)}var c,l,f,p,g,d,v,y,m,x,w,b=this._hash.words,S=(n=u.words,h.words),E=i.words,F=s.words,A=a.words,C=o.words;for(d=c=b[0],v=l=b[1],y=f=b[2],m=p=b[3],x=g=b[4],r=0;80>r;r+=1)w=c+t[e+E[r]]|0,w=16>r?w+((l^f^p)+n[0]):32>r?w+((l&f|~l&p)+n[1]):48>r?w+(((l|~f)^p)+n[2]):64>r?w+((l&p|f&~p)+n[3]):w+((l^(f|~p))+n[4]),w=(w=(w|=0)<>>32-A[r])+g|0,c=g,g=p,p=f<<10|f>>>22,f=l,l=w,w=d+t[e+F[r]]|0,w=16>r?w+((v^(y|~m))+S[0]):32>r?w+((v&m|y&~m)+S[1]):48>r?w+(((v|~y)^m)+S[2]):64>r?w+((v&y|~v&m)+S[3]):w+((v^y^m)+S[4]),w=(w=(w|=0)<>>32-C[r])+x|0,d=x,x=m,m=y<<10|y>>>22,y=v,v=w;w=b[1]+f+m|0,b[1]=b[2]+p+x|0,b[2]=b[3]+g+d|0,b[3]=b[4]+c+v|0,b[4]=b[0]+l+y|0,b[0]=w},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,n=8*t.sigBytes;for(e[n>>>5]|=128<<24-n%32,e[14+(n+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),t.sigBytes=4*(e.length+1),this._process(),e=(t=this._hash).words,r=0;5>r;r++)n=e[r],e[r]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8);return t},clone:function(){var t=r.clone.call(this);return t._hash=this._hash.clone(),t}}),t.RIPEMD160=r._createHelper(n),t.HmacRIPEMD160=r._createHmacHelper(n)}(Math),function(){var t=y,e=t.enc.Utf8;t.algo.HMAC=t.lib.Base.extend({init:function(t,r){t=this._hasher=new t.init,"string"==typeof r&&(r=e.parse(r));var n=t.blockSize,i=4*n;r.sigBytes>i&&(r=t.finalize(r)),r.clamp();for(var s=this._oKey=r.clone(),a=this._iKey=r.clone(),o=s.words,u=a.words,h=0;h>6)+x.charAt(63&r);for(e+1==t.length?(r=parseInt(t.substring(e,e+1),16),n+=x.charAt(r<<2)):e+2==t.length&&(r=parseInt(t.substring(e,e+2),16),n+=x.charAt(r>>2)+x.charAt((3&r)<<4));(3&n.length)>0;)n+="=";return n}function b(t){var e,r,n,i="",s=0;for(e=0;e>2),r=3&n,s=1):1==s?(i+=I(r<<2|n>>4),r=15&n,s=2):2==s?(i+=I(r),i+=I(n>>2),r=3&n,s=3):(i+=I(r<<2|n>>4),i+=I(15&n),s=0));return 1==s&&(i+=I(r<<2)),i}function S(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))}function E(){return new S(null)}"Microsoft Internet Explorer"==d.appName?(S.prototype.am=function(t,e,r,n,i,s){for(var a=32767&e,o=e>>15;--s>=0;){var u=32767&this[t],h=this[t++]>>15,c=o*u+h*a;i=((u=a*u+((32767&c)<<15)+r[n]+(1073741823&i))>>>30)+(c>>>15)+o*h+(i>>>30),r[n++]=1073741823&u}return i},m=30):"Netscape"!=d.appName?(S.prototype.am=function(t,e,r,n,i,s){for(;--s>=0;){var a=e*this[t++]+r[n]+i;i=Math.floor(a/67108864),r[n++]=67108863&a}return i},m=26):(S.prototype.am=function(t,e,r,n,i,s){for(var a=16383&e,o=e>>14;--s>=0;){var u=16383&this[t],h=this[t++]>>14,c=o*u+h*a;i=((u=a*u+((16383&c)<<14)+r[n]+i)>>28)+(c>>14)+o*h,r[n++]=268435455&u}return i},m=28),S.prototype.DB=m,S.prototype.DM=(1<>>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}function T(t){this.m=t}function k(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<>=16,e+=16),255&t||(t>>=8,e+=8),15&t||(t>>=4,e+=4),3&t||(t>>=2,e+=2),1&t||++e,e}function V(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function U(){}function M(t){return t}function K(t){this.r2=E(),this.q3=E(),S.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}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)},k.prototype.convert=function(t){var e=E();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(S.ZERO)>0&&this.m.subTo(e,e),e},k.prototype.revert=function(t){var e=E();return t.copyTo(e),this.reduce(e),e},k.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e>15)*this.mpl&this.um)<<15)&t.DM;for(t[r=e+this.m.t]+=this.m.am(0,n,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)},k.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},k.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},S.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},S.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},S.prototype.fromString=function(t,e){var r;if(16==e)r=4;else if(8==e)r=3;else if(256==e)r=8;else if(2==e)r=1;else if(32==e)r=5;else{if(4!=e)return void this.fromRadix(t,e);r=2}this.t=0,this.s=0;for(var n=t.length,i=!1,s=0;--n>=0;){var a=8==r?255&t[n]:D(t,n);a<0?"-"==t.charAt(n)&&(i=!0):(i=!1,0==s?this[this.t++]=a:s+r>this.DB?(this[this.t-1]|=(a&(1<>this.DB-s):this[this.t-1]|=a<=this.DB&&(s-=this.DB))}8==r&&128&t[0]&&(this.s=-1,s>0&&(this[this.t-1]|=(1<0&&this[this.t-1]==t;)--this.t},S.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},S.prototype.drShiftTo=function(t,e){for(var r=t;r=0;--r)e[r+a+1]=this[r]>>i|o,o=(this[r]&s)<=0;--r)e[r]=0;e[a]=o,e.t=this.t+a+1,e.s=this.s,e.clamp()},S.prototype.rShiftTo=function(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t)e.t=0;else{var n=t%this.DB,i=this.DB-n,s=(1<>n;for(var a=r+1;a>n;n>0&&(e[this.t-r-1]|=(this.s&s)<>=this.DB;if(t.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n-=t.s}e.s=n<0?-1:0,n<-1?e[r++]=this.DV+n:n>0&&(e[r++]=n),e.t=r,e.clamp()},S.prototype.multiplyTo=function(t,e){var r=this.abs(),n=t.abs(),i=r.t;for(e.t=i+n.t;--i>=0;)e[i]=0;for(i=0;i=0;)t[r]=0;for(r=0;r=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()},S.prototype.divRemTo=function(t,e,r){var n=t.abs();if(!(n.t<=0)){var i=this.abs();if(i.t0?(n.lShiftTo(u,s),i.lShiftTo(u,r)):(n.copyTo(s),i.copyTo(r));var h=s.t,c=s[h-1];if(0!=c){var l=c*(1<1?s[h-2]>>this.F2:0),f=this.FV/l,p=(1<=0&&(r[r.t++]=1,r.subTo(y,r)),S.ONE.dlShiftTo(h,y),y.subTo(s,s);s.t=0;){var m=r[--d]==c?this.DM:Math.floor(r[d]*f+(r[d-1]+g)*p);if((r[d]+=s.am(0,m,r,v,0,h))0&&r.rShiftTo(u,r),a<0&&S.ZERO.subTo(r,r)}}},S.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(!(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},S.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},S.prototype.exp=function(t,e){if(t>4294967295||t<1)return S.ONE;var r=E(),n=E(),i=e.convert(this),s=R(t)-1;for(i.copyTo(r);--s>=0;)if(e.sqrTo(r,n),(t&1<0)e.mulTo(n,i,r);else{var a=r;r=n,n=a}return e.revert(r)},S.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,n=(1<0)for(o>o)>0&&(i=!0,s=I(r));a>=0;)o>(o+=this.DB-e)):(r=this[a]>>(o-=e)&n,o<=0&&(o+=this.DB,--a)),r>0&&(i=!0),i&&(s+=I(r));return i?s:"0"},S.prototype.negate=function(){var t=E();return S.ZERO.subTo(this,t),t},S.prototype.abs=function(){return this.s<0?this.negate():this},S.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},S.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+R(this[this.t-1]^this.s&this.DM)},S.prototype.mod=function(t){var e=E();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(S.ZERO)>0&&t.subTo(e,e),e},S.prototype.modPowInt=function(t,e){var r;return r=t<256||e.isEven()?new T(e):new k(e),this.exp(t,r)},S.ZERO=P(0),S.ONE=P(1),U.prototype.convert=M,U.prototype.revert=M,U.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r)},U.prototype.sqrTo=function(t,e){t.squareTo(e)},K.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=E();return t.copyTo(e),this.reduce(e),e},K.prototype.revert=function(t){return t},K.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)},K.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},K.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)};var _,q,W,$=[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],G=(1<<26)/$[$.length-1];function z(){this.i=0,this.j=0,this.S=new Array}function J(){!function(t){q[W++]^=255&t,q[W++]^=t>>8&255,q[W++]^=t>>16&255,q[W++]^=t>>24&255,W>=256&&(W-=256)}((new Date).getTime())}if(S.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},S.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=P(r),i=E(),s=E(),a="";for(this.divRemTo(n,i,s);i.signum()>0;)a=(r+s.intValue()).toString(t).substr(1)+a,i.divRemTo(n,i,s);return s.intValue().toString(t)+a},S.prototype.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var r=this.chunkSize(e),n=Math.pow(e,r),i=!1,s=0,a=0,o=0;o=r&&(this.dMultiply(n),this.dAddOffset(a,0),s=0,a=0))}s>0&&(this.dMultiply(Math.pow(e,s)),this.dAddOffset(a,0)),i&&S.ZERO.subTo(this,this)},S.prototype.fromNumber=function(t,e,r){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(S.ONE.shiftLeft(t-1),O,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(S.ONE.shiftLeft(t-1),this);else{var n=new Array,i=7&t;n.length=1+(t>>3),e.nextBytes(n),i>0?n[0]&=(1<>=this.DB;if(t.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n+=t.s}e.s=n<0?-1:0,n>0?e[r++]=n:n<-1&&(e[r++]=this.DV+n),e.t=r,e.clamp()},S.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},S.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]}},S.prototype.multiplyLowerTo=function(t,e,r){var n,i=Math.min(this.t+t.t,e);for(r.s=0,r.t=i;i>0;)r[--i]=0;for(n=r.t-this.t;i=0;)r[n]=0;for(n=Math.max(e-this.t,0);n0)if(0==e)r=this[0]%t;else for(var n=this.t-1;n>=0;--n)r=(e*r+this[n])%t;return r},S.prototype.millerRabin=function(t){var e=this.subtract(S.ONE),r=e.getLowestSetBit();if(r<=0)return!1;var n=e.shiftRight(r);(t=t+1>>1)>$.length&&(t=$.length);for(var i=E(),s=0;s>24},S.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},S.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},S.prototype.toByteArray=function(){var t=this.t,e=new Array;e[0]=this.s;var r,n=this.DB-t*this.DB%8,i=0;if(t-- >0)for(n>n)!=(this.s&this.DM)>>n&&(e[i++]=r|this.s<=0;)n<8?(r=(this[t]&(1<>(n+=this.DB-8)):(r=this[t]>>(n-=8)&255,n<=0&&(n+=this.DB,--t)),128&r&&(r|=-256),0==i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(e[i++]=r);return e},S.prototype.equals=function(t){return 0==this.compareTo(t)},S.prototype.min=function(t){return this.compareTo(t)<0?this:t},S.prototype.max=function(t){return this.compareTo(t)>0?this:t},S.prototype.and=function(t){var e=E();return this.bitwiseTo(t,N,e),e},S.prototype.or=function(t){var e=E();return this.bitwiseTo(t,O,e),e},S.prototype.xor=function(t){var e=E();return this.bitwiseTo(t,H,e),e},S.prototype.andNot=function(t){var e=E();return this.bitwiseTo(t,j,e),e},S.prototype.not=function(){for(var t=E(),e=0;e=this.t?0!=this.s:!!(this[e]&1<1){var c=E();for(n.sqrTo(a[1],c);o<=h;)a[o]=E(),n.mulTo(c,a[o-2],a[o]),o+=2}var l,f,p=t.t-1,g=!0,d=E();for(i=R(t[p])-1;p>=0;){for(i>=u?l=t[p]>>i-u&h:(l=(t[p]&(1<0&&(l|=t[p-1]>>this.DB+i-u)),o=r;!(1&l);)l>>=1,--o;if((i-=o)<0&&(i+=this.DB,--p),g)a[l].copyTo(s),g=!1;else{for(;o>1;)n.sqrTo(s,d),n.sqrTo(d,s),o-=2;o>0?n.sqrTo(s,d):(f=s,s=d,d=f),n.mulTo(d,a[l],s)}for(;p>=0&&!(t[p]&1<=0?(r.subTo(n,r),e&&i.subTo(a,i),s.subTo(o,s)):(n.subTo(r,n),e&&a.subTo(i,a),o.subTo(s,o))}return 0!=n.compareTo(S.ONE)?S.ZERO:o.compareTo(t)>=0?o.subtract(t):o.signum()<0?(o.addTo(t,o),o.signum()<0?o.add(t):o):o},S.prototype.pow=function(t){return this.exp(t,new U)},S.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 n=e;e=r,r=n}var i=e.getLowestSetBit(),s=r.getLowestSetBit();if(s<0)return e;for(i0&&(e.rShiftTo(s,e),r.rShiftTo(s,r));e.signum()>0;)(i=e.getLowestSetBit())>0&&e.rShiftTo(i,e),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),e.compareTo(r)>=0?(e.subTo(r,e),e.rShiftTo(1,e)):(r.subTo(e,r),r.rShiftTo(1,r));return s>0&&r.lShiftTo(s,r),r},S.prototype.isProbablePrime=function(t){var e,r=this.abs();if(1==r.t&&r[0]<=$[$.length-1]){for(e=0;e<$.length;++e)if(r[0]==$[e])return!0;return!1}if(r.isEven())return!1;for(e=1;e<$.length;){for(var n=$[e],i=e+1;i<$.length&&n>>8,q[W++]=255&X;W=0,J()}function tt(){if(null==_){for(J(),(_=new z).init(q),W=0;W0&&e.length>0))throw"Invalid RSA public key";this.n=rt(t,16),this.e=parseInt(e,16)}},nt.prototype.type="RSA",nt.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)},nt.prototype.setPrivate=function(t,e,r){if(this.isPrivate=!0,"string"!=typeof t)this.n=t,this.e=e,this.d=r;else{if(!(null!=t&&null!=e&&t.length>0&&e.length>0))throw"Invalid RSA private key";this.n=rt(t,16),this.e=parseInt(e,16),this.d=rt(r,16)}},nt.prototype.setPrivateEx=function(t,e,r,n,i,s,a,o){if(this.isPrivate=!0,this.isPublic=!1,null==t)throw"RSASetPrivateEx N == null";if(null==e)throw"RSASetPrivateEx E == null";if(0==t.length)throw"RSASetPrivateEx N.length == 0";if(0==e.length)throw"RSASetPrivateEx E.length == 0";if(!(null!=t&&null!=e&&t.length>0&&e.length>0))throw"Invalid RSA private key in RSASetPrivateEx";this.n=rt(t,16),this.e=parseInt(e,16),this.d=rt(r,16),this.p=rt(n,16),this.q=rt(i,16),this.dmp1=rt(s,16),this.dmq1=rt(a,16),this.coeff=rt(o,16)},nt.prototype.generate=function(t,e){var r=new et,n=t>>1;this.e=parseInt(e,16);for(var i=new S(e,16),s=t/2-100,a=S.ONE.shiftLeft(s);;){for(;this.p=new S(t-n,1,r),0!=this.p.subtract(S.ONE).gcd(i).compareTo(S.ONE)||!this.p.isProbablePrime(10););for(;this.q=new S(n,1,r),0!=this.q.subtract(S.ONE).gcd(i).compareTo(S.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var o=this.p;this.p=this.q,this.q=o}var u=this.q.subtract(this.p).abs();if(!(u.bitLength()0;--e){s=s.twice();var c=n.testBit(e);c!=r.testBit(e)&&(s=s.add(c?this:i))}for(e=o.bitLength()-2;e>0;--e){u=u.twice();var l=o.testBit(e);l!=a.testBit(e)&&(u=u.add(l?u:h))}return s},st.prototype.multiplyTwo=function(t,e,r){var n;n=t.bitLength()>r.bitLength()?t.bitLength()-1:r.bitLength()-1;for(var i=this.curve.getInfinity(),s=this.add(e);n>=0;)i=i.twice(),t.testBit(n)?i=r.testBit(n)?i.add(s):i.add(this):r.testBit(n)&&(i=i.add(e)),--n;return i},at.prototype.getQ=function(){return this.q},at.prototype.getA=function(){return this.a},at.prototype.getB=function(){return this.b},at.prototype.equals=function(t){return t==this||this.q.equals(t.q)&&this.a.equals(t.a)&&this.b.equals(t.b)},at.prototype.getInfinity=function(){return this.infinity},at.prototype.fromBigInteger=function(t){return new it(this.q,t)},at.prototype.decodePointHex=function(t){switch(parseInt(t.substr(0,2),16)){case 0:return this.infinity;case 2:case 3:var e=t.substr(0,2),r=(t.substr(2),this.fromBigInteger(new S(o,16))),n=this.getA(),i=this.getB(),s=r.square().add(n).multiply(r).add(i).sqrt();return"03"==e&&(s=s.negate()),new st(this,r,s);case 4:case 6:case 7:var a=(t.length-2)/2,o=t.substr(2,a),u=t.substr(a+2,a);return new st(this,this.fromBigInteger(new S(o,16)),this.fromBigInteger(new S(u,16)));default:return null}},it.prototype.getByteLength=function(){return Math.floor((this.toBigInteger().bitLength()+7)/8)},st.prototype.getEncoded=function(t){var e=function(t,e){var r=t.toByteArrayUnsigned();if(er.length;)r.unshift(0);return r},r=this.getX().toBigInteger(),n=this.getY().toBigInteger(),i=e(r,32);return t?n.isEven()?i.unshift(2):i.unshift(3):(i.unshift(4),i=i.concat(e(n,32))),i},st.decodeFrom=function(t,e){e[0];var r=e.length-1,n=e.slice(1,1+r/2),i=e.slice(1+r/2,1+r);n.unshift(0),i.unshift(0);var s=new S(n),a=new S(i);return new st(t,t.fromBigInteger(s),t.fromBigInteger(a))},st.decodeFromHex=function(t,e){e.substr(0,2);var r=e.length-2,n=e.substr(2,r/2),i=e.substr(2+r/2,r/2),s=new S(n,16),a=new S(i,16);return new st(t,t.fromBigInteger(s),t.fromBigInteger(a))},st.prototype.add2D=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;if(this.x.equals(t.x))return this.y.equals(t.y)?this.twice():this.curve.getInfinity();var e=t.x.subtract(this.x),r=t.y.subtract(this.y).divide(e),n=r.square().subtract(this.x).subtract(t.x),i=r.multiply(this.x.subtract(n)).subtract(this.y);return new st(this.curve,n,i)},st.prototype.twice2D=function(){if(this.isInfinity())return this;if(0==this.y.toBigInteger().signum())return this.curve.getInfinity();var t=this.curve.fromBigInteger(S.valueOf(2)),e=this.curve.fromBigInteger(S.valueOf(3)),r=this.x.square().multiply(e).add(this.curve.a).divide(this.y.multiply(t)),n=r.square().subtract(this.x.multiply(t)),i=r.multiply(this.x.subtract(n)).subtract(this.y);return new st(this.curve,n,i)},st.prototype.multiply2D=function(t){if(this.isInfinity())return this;if(0==t.signum())return this.curve.getInfinity();var e,r=t,n=r.multiply(new S("3")),i=this.negate(),s=this;for(e=n.bitLength()-2;e>0;--e){s=s.twice();var a=n.testBit(e);a!=r.testBit(e)&&(s=s.add2D(a?this:i))}return s},st.prototype.isOnCurve=function(){var t=this.getX().toBigInteger(),e=this.getY().toBigInteger(),r=this.curve.getA().toBigInteger(),n=this.curve.getB().toBigInteger(),i=this.curve.getQ(),s=e.multiply(e).mod(i),a=t.multiply(t).multiply(t).add(r.multiply(t)).add(n).mod(i);return s.equals(a)},st.prototype.toString=function(){return"("+this.getX().toBigInteger().toString()+","+this.getY().toBigInteger().toString()+")"},st.prototype.validate=function(){var t=this.curve.getQ();if(this.isInfinity())throw new Error("Point is at infinity.");var e=this.getX().toBigInteger(),r=this.getY().toBigInteger();if(e.compareTo(S.ONE)<0||e.compareTo(t.subtract(S.ONE))>0)throw new Error("x coordinate out of bounds");if(r.compareTo(S.ONE)<0||r.compareTo(t.subtract(S.ONE))>0)throw new Error("y coordinate out of bounds");if(!this.isOnCurve())throw new Error("Point is not on the curve.");if(this.multiply(t).isInfinity())throw new Error("Point is not a scalar multiple of G.");return!0};var ot=function(){var t=new RegExp('(?:false|true|null|[\\{\\}\\[\\]]|(?:-?\\b(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?:[eE][+-]?[0-9]+)?\\b)|(?:"(?:[^\\0-\\x08\\x0a-\\x1f"\\\\]|\\\\(?:["/\\\\bfnrt]|u[0-9A-Fa-f]{4}))*"))',"g"),e=new RegExp("\\\\(?:([^u])|u(.{4}))","g"),r={'"':'"',"/":"/","\\":"\\",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function n(t,e,n){return e?r[e]:String.fromCharCode(parseInt(n,16))}var i=new String(""),s=Object.hasOwnProperty;return function(r,a){var o,u,h=r.match(t),c=h[0],l=!1;"{"===c?o={}:"["===c?o=[]:(o=[],l=!0);for(var f=[o],p=1-l,g=h.length;p=0;)delete r[n[u]]}return a.call(t,e,r)};o=v({"":o},"")}return o}}();void 0!==ut&&ut||(ut={}),void 0!==ut.asn1&&ut.asn1||(ut.asn1={}),ut.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){return Mt(t)},this.getPEMStringFromHex=function(t,e){return Et(t,e)},this.newObject=function(t){var e=ut.asn1,r=e.ASN1Object,n=e.DERBoolean,i=e.DERInteger,s=e.DERBitString,a=e.DEROctetString,o=e.DERNull,u=e.DERObjectIdentifier,h=e.DEREnumerated,c=e.DERUTF8String,l=e.DERNumericString,f=e.DERPrintableString,p=e.DERTeletexString,g=e.DERIA5String,d=e.DERUTCTime,v=e.DERGeneralizedTime,y=e.DERVisibleString,m=e.DERBMPString,x=e.DERSequence,w=e.DERSet,b=e.DERTaggedObject,S=e.ASN1Util.newObject;if(t instanceof e.ASN1Object)return t;var E=Object.keys(t);if(1!=E.length)throw new Error("key of param shall be only one.");var F=E[0];if(-1==":asn1:bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:visstr:bmpstr:seq:set:tag:".indexOf(":"+F+":"))throw new Error("undefined key: "+F);if("bool"==F)return new n(t[F]);if("int"==F)return new i(t[F]);if("bitstr"==F)return new s(t[F]);if("octstr"==F)return new a(t[F]);if("null"==F)return new o(t[F]);if("oid"==F)return new u(t[F]);if("enum"==F)return new h(t[F]);if("utf8str"==F)return new c(t[F]);if("numstr"==F)return new l(t[F]);if("prnstr"==F)return new f(t[F]);if("telstr"==F)return new p(t[F]);if("ia5str"==F)return new g(t[F]);if("utctime"==F)return new d(t[F]);if("gentime"==F)return new v(t[F]);if("visstr"==F)return new y(t[F]);if("bmpstr"==F)return new m(t[F]);if("asn1"==F)return new r(t[F]);if("seq"==F){for(var A=t[F],C=[],B=0;B15)throw new Error("ASN.1 length too long to represent by 8x: n = "+t.toString(16));return(128+r).toString(16)+e},this.tohex=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.getEncodedHex=function(){return this.tohex()},this.getValueHex=function(){return this.tohex(),this.hV},this.getFreshValueHex=function(){return""},this.setByParam=function(t){this.params=t},null!=t&&null!=t.tlv&&(this.hTLV=t.tlv,this.isModified=!1)},ut.asn1.DERAbstractString=function(t){ut.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=mt(this.s).toLowerCase()},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))},Wt(ut.asn1.DERAbstractString,ut.asn1.ASN1Object),ut.asn1.DERAbstractTime=function(t){ut.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(t){var e=t.getTime()+6e4*t.getTimezoneOffset();return new Date(e)},this.formatDate=function(t,e,r){var n=this.zeroPadding,i=this.localDateToUTC(t),s=String(i.getFullYear());"utc"==e&&(s=s.substr(2,2));var a=s+n(String(i.getMonth()+1),2)+n(String(i.getDate()),2)+n(String(i.getHours()),2)+n(String(i.getMinutes()),2)+n(String(i.getSeconds()),2);if(!0===r){var o=i.getMilliseconds();if(0!=o){var u=n(String(o),3);a=a+"."+(u=u.replace(/[0]+$/,""))}}return a+"Z"},this.zeroPadding=function(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t},this.setByParam=function(t){this.hV=null,this.hTLV=null,this.params=t},this.getString=function(){},this.setString=function(t){this.hTLV=null,this.isModified=!0,null==this.params&&(this.params={}),this.params.str=t},this.setByDate=function(t){this.hTLV=null,this.isModified=!0,null==this.params&&(this.params={}),this.params.date=t},this.setByDateValue=function(t,e,r,n,i,s){var a=new Date(Date.UTC(t,e-1,r,n,i,s,0));this.setByDate(a)},this.getFreshValueHex=function(){return this.hV}},Wt(ut.asn1.DERAbstractTime,ut.asn1.ASN1Object),ut.asn1.DERAbstractStructured=function(t){ut.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)},Wt(ut.asn1.DERAbstractStructured,ut.asn1.ASN1Object),ut.asn1.DERBoolean=function(t){ut.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV=0==t?"010100":"0101ff"},Wt(ut.asn1.DERBoolean,ut.asn1.ASN1Object),ut.asn1.DERInteger=function(t){ut.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.params=null;var e=Mt;this.setByBigInteger=function(t){this.isModified=!0,this.params={bigint:t}},this.setByInteger=function(t){this.isModified=!0,this.params=t},this.setValueHex=function(t){this.isModified=!0,this.params={hex:t}},this.getFreshValueHex=function(){var t=this.params,r=null;if(null==t)throw new Error("value not set");if("object"==typeof t&&null!=t.hex)return this.hV=t.hex,this.hV;if("number"==typeof t)r=new S(String(t),10);else if(null!=t.int)r=new S(String(t.int),10);else{if(null==t.bigint)throw new Error("wrong parameter");r=t.bigint}return this.hV=e(r),this.hV},null!=t&&(this.params=t)},Wt(ut.asn1.DERInteger,ut.asn1.ASN1Object),ut.asn1.DERBitString=function(t){if(void 0!==t&&void 0!==t.obj){var e=ut.asn1.ASN1Util.newObject(t.obj);t.hex="00"+e.tohex()}ut.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>6).toString(16)+n.toString(16))}n=128|(15&e)<<2|(192&r)>>6;var i=128|63&r;return xt((224|(240&e)>>4).toString(16)+n.toString(16)+i.toString(16))}));return e.join("")}function Ot(t){for(var e=encodeURIComponent(t),r="",n=0;n"7"?"00"+t:t}function Vt(t){if(!Ht(t))return null;try{var e=[],r=t.substr(0,2),n=parseInt(r,16);e[0]=new String(Math.floor(n/40)),e[1]=new String(n%40);for(var i=t.substr(2),s=[],a=0;a0&&(h=h+"."+o.join(".")),h}catch(t){return null}}function Ut(t){return Mt(new S(String(t),10))}function Mt(t){var e=t.toString(16);if("-"!=e.substr(0,1))return e.length%2==1?e="0"+e:e.match(/^[0-7]/)||(e="00"+e),e;var r=e.substr(1).length;r%2==1?r+=1:e.match(/^[0-7]/)||(r+=2);for(var n="",i=0;i=n)break}return a},lt.getNthChildIdx=function(t,e,r){return lt.getChildIdx(t,e)[r]},lt.getIdxbyList=function(t,e,r,n){var i,s,a=lt;return 0==r.length?void 0!==n&&t.substr(e,2)!==n?-1:e:(i=r.shift())>=(s=a.getChildIdx(t,e)).length?-1:a.getIdxbyList(t,s[i],r,n)},lt.getIdxbyListEx=function(t,e,r,n){var i,s,a=lt;if(0==r.length)return void 0!==n&&t.substr(e,2)!==n?-1:e;i=r.shift(),s=a.getChildIdx(t,e);for(var o=0,u=0;u=t.length?null:i.getTLV(t,s)},lt.getTLVbyListEx=function(t,e,r,n){var i=lt,s=i.getIdxbyListEx(t,e,r,n);return-1==s?null:i.getTLV(t,s)},lt.getVbyList=function(t,e,r,n,i){var s,a,o=lt;return-1==(s=o.getIdxbyList(t,e,r,n))||s>=t.length?null:(a=o.getV(t,s),!0===i&&(a=a.substr(2)),a)},lt.getVbyListEx=function(t,e,r,n,i){var s,a,o=lt;return-1==(s=o.getIdxbyListEx(t,e,r,n))?null:(a=o.getV(t,s),"03"==t.substr(s,2)&&!1!==i&&(a=a.substr(2)),a)},lt.getInt=function(t,e,r){null==r&&(r=-1);try{var n=t.substr(e,2);if("02"!=n&&"03"!=n)return r;var i=lt.getV(t,e);return"02"==n?parseInt(i,16):function(t){if(t.length%2!=0)return-1;if(null==(t=t.toLowerCase()).match(/^[0-9a-f]+$/))return-1;try{var e=t.substr(0,2);if("00"==e)return parseInt(t.substr(2),16);var r=parseInt(e,16);if(r>7)return-1;var n=t.substr(2),i=parseInt(n,16).toString(2);"0"==i&&(i="00000000"),i=i.slice(0,0-r);var s=parseInt(i,2);return NaN==s?-1:s}catch(t){return-1}}(i)}catch(t){return r}},lt.getOID=function(t,e,r){null==r&&(r=null);try{return"06"!=t.substr(e,2)?r:Vt(lt.getV(t,e))}catch(t){return r}},lt.getOIDName=function(t,e,r){null==r&&(r=null);try{var n=lt.getOID(t,e,r);if(n==r)return r;var i=ut.asn1.x509.OID.oid2name(n);return""==i?n:i}catch(t){return r}},lt.getString=function(t,e,r){null==r&&(r=null);try{return bt(lt.getV(t,e))}catch(t){return r}},lt.hextooidstr=function(t){var e=function(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t},r=[],n=t.substr(0,2),i=parseInt(n,16);r[0]=new String(Math.floor(i/40)),r[1]=new String(i%40);for(var s=t.substr(2),a=[],o=0;o0&&(c=c+"."+u.join(".")),c},lt.dump=function(t,e,r,n){var i=lt,s=i.getV,a=i.dump,o=i.getChildIdx,u=t;t instanceof ut.asn1.ASN1Object&&(u=t.tohex());var h=function(t,e){return t.length<=2*e?t:t.substr(0,e)+"..(total "+t.length/2+"bytes).."+t.substr(t.length-e,e)};void 0===e&&(e={ommit_long_octet:32}),void 0===r&&(r=0),void 0===n&&(n="");var c,l=e.ommit_long_octet;if("01"==(c=u.substr(r,2)))return"00"==(f=s(u,r))?n+"BOOLEAN FALSE\n":n+"BOOLEAN TRUE\n";if("02"==c)return n+"INTEGER "+h(f=s(u,r),l)+"\n";if("03"==c){var f=s(u,r);return i.isASN1HEX(f.substr(2))?(b=n+"BITSTRING, encapsulates\n")+a(f.substr(2),e,0,n+" "):n+"BITSTRING "+h(f,l)+"\n"}if("04"==c)return f=s(u,r),i.isASN1HEX(f)?(b=n+"OCTETSTRING, encapsulates\n")+a(f,e,0,n+" "):n+"OCTETSTRING "+h(f,l)+"\n";if("05"==c)return n+"NULL\n";if("06"==c){var p=s(u,r),g=ut.asn1.ASN1Util.oidHexToInt(p),d=ut.asn1.x509.OID.oid2name(g),v=g.replace(/\./g," ");return""!=d?n+"ObjectIdentifier "+d+" ("+v+")\n":n+"ObjectIdentifier ("+v+")\n"}if("0a"==c)return n+"ENUMERATED "+parseInt(s(u,r))+"\n";if("0c"==c)return n+"UTF8String '"+xt(s(u,r))+"'\n";if("13"==c)return n+"PrintableString '"+xt(s(u,r))+"'\n";if("14"==c)return n+"TeletexString '"+xt(s(u,r))+"'\n";if("16"==c)return n+"IA5String '"+xt(s(u,r))+"'\n";if("17"==c)return n+"UTCTime "+xt(s(u,r))+"\n";if("18"==c)return n+"GeneralizedTime "+xt(s(u,r))+"\n";if("1a"==c)return n+"VisualString '"+xt(s(u,r))+"'\n";if("1e"==c)return n+"BMPString '"+Nt(s(u,r))+"'\n";if("30"==c){if("3000"==u.substr(r,4))return n+"SEQUENCE {}\n";b=n+"SEQUENCE\n";var y=e;if((2==(w=o(u,r)).length||3==w.length)&&"06"==u.substr(w[0],2)&&"04"==u.substr(w[w.length-1],2)){d=i.oidname(s(u,w[0]));var m=JSON.parse(JSON.stringify(e));m.x509ExtName=d,y=m}for(var x=0;x4?{enum:{hex:v}}:{enum:parseInt(v,16)};if("30"==g||"31"==g)return d[p[g]]=function(t){for(var e=[],n=a(t,0),i=0;i31)&&128==(192&r)&&(31&r)==n}catch(t){return!1}},lt.isASN1HEX=function(t){var e=lt;if(t.length%2==1)return!1;var r=e.getVblen(t,0),n=t.substr(0,2),i=e.getL(t,0);return t.length-n.length-i.length==2*r},lt.checkStrictDER=function(t,e,r,n,i){var s=lt;if(void 0===r){if("string"!=typeof t)throw new Error("not hex string");if(t=t.toLowerCase(),!ut.lang.String.isHex(t))throw new Error("not hex string");r=t.length,i=(n=t.length/2)<128?1:Math.ceil(n.toString(16))+1}if(s.getL(t,e).length>2*i)throw new Error("L of TLV too long: idx="+e);var a=s.getVblen(t,e);if(a>n)throw new Error("value of L too long than hex: idx="+e);var o=s.getTLV(t,e),u=o.length-2-s.getL(t,e).length;if(u!==2*a)throw new Error("V string length and L's value not the same:"+u+"/"+2*a);if(0===e&&t.length!=o.length)throw new Error("total length and TLV length unmatch:"+t.length+"!="+o.length);var h=t.substr(e,2);if("02"===h){var c=s.getVidx(t,e);if("00"==t.substr(c,2)&&t.charCodeAt(c+2)<56)throw new Error("not least zeros for DER INTEGER")}if(32&parseInt(h,16)){for(var l=s.getVblen(t,e),f=0,p=s.getChildIdx(t,e),g=0;g0&&t.push(new n({tag:"a3",obj:new h(e.ext)})),new ut.asn1.DERSequence({array:t}).tohex()},this.getEncodedHex=function(){return this.tohex()},void 0!==t&&this.setByParam(t)},Wt(ut.asn1.x509.TBSCertificate,ut.asn1.ASN1Object),ut.asn1.x509.Extensions=function(t){ut.asn1.x509.Extensions.superclass.constructor.call(this);var e=ut.asn1,r=e.DERSequence,n=e.x509;this.aParam=[],this.setByParam=function(t){this.aParam=t},this.tohex=function(){for(var t=[],e=0;e-1&&t.push(new n({int:this.pathLen}));var e=new i({array:t});return this.asn1ExtnValue=e,this.asn1ExtnValue.tohex()},this.oid="2.5.29.19",this.cA=!1,this.pathLen=-1,void 0!==t&&(void 0!==t.cA&&(this.cA=t.cA),void 0!==t.pathLen&&(this.pathLen=t.pathLen))},Wt(ut.asn1.x509.BasicConstraints,ut.asn1.x509.Extension),ut.asn1.x509.CRLDistributionPoints=function(t){ut.asn1.x509.CRLDistributionPoints.superclass.constructor.call(this,t);var e=ut.asn1,r=e.x509;this.getExtnValueHex=function(){return this.asn1ExtnValue.tohex()},this.setByDPArray=function(t){for(var n=[],i=0;i0&&t.push(new r({array:e}))}return new r({array:t}).tohex()},this.getEncodedHex=function(){return this.tohex()},void 0!==t&&(this.params=t)},Wt(ut.asn1.x509.PolicyInformation,ut.asn1.ASN1Object),ut.asn1.x509.PolicyQualifierInfo=function(t){ut.asn1.x509.PolicyQualifierInfo.superclass.constructor.call(this,t);var e=ut.asn1,r=e.DERSequence,n=e.DERIA5String,i=e.DERObjectIdentifier,s=e.x509.UserNotice;this.params=null,this.tohex=function(){return void 0!==this.params.cps?new r({array:[new i({oid:"1.3.6.1.5.5.7.2.1"}),new n({str:this.params.cps})]}).tohex():null!=this.params.unotice?new r({array:[new i({oid:"1.3.6.1.5.5.7.2.2"}),new s(this.params.unotice)]}).tohex():void 0},this.getEncodedHex=function(){return this.tohex()},void 0!==t&&(this.params=t)},Wt(ut.asn1.x509.PolicyQualifierInfo,ut.asn1.ASN1Object),ut.asn1.x509.UserNotice=function(t){ut.asn1.x509.UserNotice.superclass.constructor.call(this,t);var e=ut.asn1.DERSequence,r=(ut.asn1.DERInteger,ut.asn1.x509.DisplayText),n=ut.asn1.x509.NoticeReference;this.params=null,this.tohex=function(){var t=[];return void 0!==this.params.noticeref&&t.push(new n(this.params.noticeref)),void 0!==this.params.exptext&&t.push(new r(this.params.exptext)),new e({array:t}).tohex()},this.getEncodedHex=function(){return this.tohex()},void 0!==t&&(this.params=t)},Wt(ut.asn1.x509.UserNotice,ut.asn1.ASN1Object),ut.asn1.x509.NoticeReference=function(t){ut.asn1.x509.NoticeReference.superclass.constructor.call(this,t);var e=ut.asn1.DERSequence,r=ut.asn1.DERInteger,n=ut.asn1.x509.DisplayText;this.params=null,this.tohex=function(){var t=[];if(void 0!==this.params.org&&t.push(new n(this.params.org)),void 0!==this.params.noticenum){for(var i=[],s=this.params.noticenum,a=0;a0)for(var t=0;t0;i++){var s=e.shift();if(!0===r){var a=(n.pop()+","+s).replace(/\\,/g,",");n.push(a),r=!1}else n.push(s);"\\"===s.substr(-1,1)&&(r=!0)}return n=n.map((function(t){return t.replace("/","\\/")})),n.reverse(),"/"+n.join("/")},ut.asn1.x509.X500Name.ldapToOneline=function(t){return ut.asn1.x509.X500Name.ldapToCompat(t)},ut.asn1.x509.RDN=function(t){ut.asn1.x509.RDN.superclass.constructor.call(this),this.asn1Array=[],this.paramArray=[],this.sRule="utf8";var e=ut.asn1.x509.AttributeTypeAndValue;this.setByParam=function(t){void 0!==t.rule&&(this.sRule=t.rule),void 0!==t.str&&this.addByMultiValuedString(t.str),void 0!==t.array&&(this.paramArray=t.array)},this.addByString=function(t){this.asn1Array.push(new ut.asn1.x509.AttributeTypeAndValue({str:t,rule:this.sRule}))},this.addByMultiValuedString=function(t){for(var e=ut.asn1.x509.RDN.parseString(t),r=0;r0)for(var t=0;t0;i++){var s=e.shift();if(!0===r){var a=(n.pop()+"+"+s).replace(/\\\+/g,"+");n.push(a),r=!1}else n.push(s);"\\"===s.substr(-1,1)&&(r=!0)}var o=!1,u=[];for(i=0;n.length>0;i++){if(s=n.shift(),!0===o){var h=u.pop();s.match(/"$/)?(a=(h+"+"+s).replace(/^([^=]+)="(.*)"$/,"$1=$2"),u.push(a),o=!1):u.push(h+"+"+s)}else u.push(s);s.match(/^[^=]+="/)&&(o=!0)}return u},ut.asn1.x509.AttributeTypeAndValue=function(t){ut.asn1.x509.AttributeTypeAndValue.superclass.constructor.call(this),this.sRule="utf8",this.sType=null,this.sValue=null,this.dsType=null;var e=ut,r=e.asn1,n=r.DERSequence,i=r.DERUTF8String,s=r.DERPrintableString,a=r.DERTeletexString,o=r.DERIA5String,u=r.DERVisibleString,h=r.DERBMPString,c=e.lang.String.isMail,l=e.lang.String.isPrintable;this.setByParam=function(t){if(void 0!==t.rule&&(this.sRule=t.rule),void 0!==t.ds&&(this.dsType=t.ds),void 0===t.value&&void 0!==t.str){var e=t.str.match(/^([^=]+)=(.+)$/);if(!e)throw new Error("malformed attrTypeAndValueStr: "+attrTypeAndValueStr);this.sType=e[1],this.sValue=e[2]}else this.sType=t.type,this.sValue=t.value},this.setByString=function(t,e){void 0!==e&&(this.sRule=e);var r=t.match(/^([^=]+)=(.+)$/);if(!r)throw new Error("malformed attrTypeAndValueStr: "+attrTypeAndValueStr);this.setByAttrTypeAndValueStr(r[1],r[2])},this._getDsType=function(){var t=this.sType,e=this.sValue,r=this.sRule;return"prn"===r?"CN"==t&&c(e)?"ia5":l(e)?"prn":"utf8":"utf8"===r?"CN"==t&&c(e)?"ia5":"C"==t?"prn":"utf8":"utf8"},this.setByAttrTypeAndValueStr=function(t,e,r){void 0!==r&&(this.sRule=r),this.sType=t,this.sValue=e},this.getValueObj=function(t,e){if("utf8"==t)return new i({str:e});if("prn"==t)return new s({str:e});if("tel"==t)return new a({str:e});if("ia5"==t)return new o({str:e});if("vis"==t)return new u({str:e});if("bmp"==t)return new h({str:e});throw new Error("unsupported directory string type: type="+t+" value="+e)},this.tohex=function(){null==this.dsType&&(this.dsType=this._getDsType());var t=ut.asn1.x509.OID.atype2obj(this.sType),e=this.getValueObj(this.dsType,this.sValue),r=new n({array:[t,e]});return this.TLV=r.tohex(),this.TLV},this.getEncodedHex=function(){return this.tohex()},void 0!==t&&this.setByParam(t)},Wt(ut.asn1.x509.AttributeTypeAndValue,ut.asn1.ASN1Object),ut.asn1.x509.SubjectPublicKeyInfo=function(t){ut.asn1.x509.SubjectPublicKeyInfo.superclass.constructor.call(this);var e=ut,r=e.asn1,n=r.DERInteger,i=r.DERBitString,s=r.DERObjectIdentifier,a=r.DERSequence,o=r.ASN1Util.newObject,u=r.x509.AlgorithmIdentifier,h=e.crypto;h.ECDSA,h.DSA,this.getASN1Object=function(){if(null==this.asn1AlgId||null==this.asn1SubjPKey)throw"algId and/or subjPubKey not set";return new a({array:[this.asn1AlgId,this.asn1SubjPKey]})},this.tohex=function(){var t=this.getASN1Object();return this.hTLV=t.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},this.setPubKey=function(t){try{if(t instanceof nt){var e=o({seq:[{int:{bigint:t.n}},{int:{int:t.e}}]}).tohex();this.asn1AlgId=new u({name:"rsaEncryption"}),this.asn1SubjPKey=new i({hex:"00"+e})}}catch(t){}try{if(t instanceof ut.crypto.ECDSA){var r=new s({name:t.curveName});this.asn1AlgId=new u({name:"ecPublicKey",asn1params:r}),this.asn1SubjPKey=new i({hex:"00"+t.pubKeyHex})}}catch(t){}try{if(t instanceof ut.crypto.DSA){r=new o({seq:[{int:{bigint:t.p}},{int:{bigint:t.q}},{int:{bigint:t.g}}]}),this.asn1AlgId=new u({name:"dsa",asn1params:r});var a=new n({bigint:t.y});this.asn1SubjPKey=new i({hex:"00"+a.tohex()})}}catch(t){}},void 0!==t&&this.setPubKey(t)},Wt(ut.asn1.x509.SubjectPublicKeyInfo,ut.asn1.ASN1Object),ut.asn1.x509.Time=function(t){ut.asn1.x509.Time.superclass.constructor.call(this);var e=ut.asn1,r=e.DERUTCTime,n=e.DERGeneralizedTime;this.params=null,this.type=null,this.setTimeParams=function(t){this.timeParams=t},this.setByParam=function(t){this.params=t},this.getType=function(t){return t.match(/^[0-9]{12}Z$/)?"utc":t.match(/^[0-9]{14}Z$/)?"gen":t.match(/^[0-9]{12}\.[0-9]+Z$/)?"utc":t.match(/^[0-9]{14}\.[0-9]+Z$/)?"gen":null},this.tohex=function(){var t=this.params,e=null;if("string"==typeof t&&(t={str:t}),null==t||!t.str||null!=t.type&&null!=t.type||(t.type=this.getType(t.str)),null!=t&&t.str?("utc"==t.type&&(e=new r(t.str)),"gen"==t.type&&(e=new n(t.str))):e="gen"==this.type?new n:new r,null==e)throw new Error("wrong setting for Time");return this.TLV=e.tohex(),this.TLV},this.getEncodedHex=function(){return this.tohex()},null!=t&&this.setByParam(t)},ut.asn1.x509.Time_bak=function(t){ut.asn1.x509.Time_bak.superclass.constructor.call(this);var e=ut.asn1,r=e.DERUTCTime,n=e.DERGeneralizedTime;this.setTimeParams=function(t){this.timeParams=t},this.tohex=function(){var t=null;return t=null!=this.timeParams?"utc"==this.type?new r(this.timeParams):new n(this.timeParams):"utc"==this.type?new r:new n,this.TLV=t.tohex(),this.TLV},this.getEncodedHex=function(){return this.tohex()},this.type="utc",void 0!==t&&(void 0!==t.type?this.type=t.type:void 0!==t.str&&(t.str.match(/^[0-9]{12}Z$/)&&(this.type="utc"),t.str.match(/^[0-9]{14}Z$/)&&(this.type="gen")),this.timeParams=t)},Wt(ut.asn1.x509.Time,ut.asn1.ASN1Object),ut.asn1.x509.AlgorithmIdentifier=function(t){ut.asn1.x509.AlgorithmIdentifier.superclass.constructor.call(this),this.nameAlg=null,this.asn1Alg=null,this.asn1Params=null,this.paramEmpty=!1;var e=ut.asn1,r=e.x509.AlgorithmIdentifier.PSSNAME2ASN1TLV;if(this.tohex=function(){if(null===this.nameAlg&&null===this.asn1Alg)throw new Error("algorithm not specified");if(null!==this.nameAlg){var t=null;for(var n in r)n===this.nameAlg&&(t=r[n]);if(null!==t)return this.hTLV=t,this.hTLV}null!==this.nameAlg&&null===this.asn1Alg&&(this.asn1Alg=e.x509.OID.name2obj(this.nameAlg));var i=[this.asn1Alg];null!==this.asn1Params&&i.push(this.asn1Params);var s=new e.DERSequence({array:i});return this.hTLV=s.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},void 0!==t&&(void 0!==t.name&&(this.nameAlg=t.name),void 0!==t.asn1params&&(this.asn1Params=t.asn1params),void 0!==t.paramempty&&(this.paramEmpty=t.paramempty)),null===this.asn1Params&&!1===this.paramEmpty&&null!==this.nameAlg){void 0!==this.nameAlg.name&&(this.nameAlg=this.nameAlg.name);var n=this.nameAlg.toLowerCase();"withdsa"!==n.substr(-7,7)&&"withecdsa"!==n.substr(-9,9)&&(this.asn1Params=new e.DERNull)}},Wt(ut.asn1.x509.AlgorithmIdentifier,ut.asn1.ASN1Object),ut.asn1.x509.AlgorithmIdentifier.PSSNAME2ASN1TLV={SHAwithRSAandMGF1:"300d06092a864886f70d01010a3000",SHA256withRSAandMGF1:"303d06092a864886f70d01010a3030a00d300b0609608648016503040201a11a301806092a864886f70d010108300b0609608648016503040201a203020120",SHA384withRSAandMGF1:"303d06092a864886f70d01010a3030a00d300b0609608648016503040202a11a301806092a864886f70d010108300b0609608648016503040202a203020130",SHA512withRSAandMGF1:"303d06092a864886f70d01010a3030a00d300b0609608648016503040203a11a301806092a864886f70d010108300b0609608648016503040203a203020140"},ut.asn1.x509.GeneralName=function(t){ut.asn1.x509.GeneralName.superclass.constructor.call(this);var e=ut.asn1,r=e.x509,n=r.X500Name,i=r.OtherName,s=e.DERIA5String,a=(e.DERPrintableString,e.DEROctetString),o=e.DERTaggedObject,u=e.ASN1Object,h=Error;this.params=null,this.setByParam=function(t){this.params=t},this.tohex=function(){var t,e,r=this.params,c=!1;if(void 0!==r.other)t="a0",e=new i(r.other);else if(void 0!==r.rfc822)t="81",e=new s({str:r.rfc822});else if(void 0!==r.dns)t="82",e=new s({str:r.dns});else if(void 0!==r.dn)t="a4",c=!0,e="string"==typeof r.dn?new n({str:r.dn}):r.dn instanceof ut.asn1.x509.X500Name?r.dn:new n(r.dn);else if(void 0!==r.ldapdn)t="a4",c=!0,e=new n({ldapstr:r.ldapdn});else if(void 0!==r.certissuer||void 0!==r.certsubj){var l,f;t="a4",c=!0;var p=null;if(void 0!==r.certsubj?(l=!1,f=r.certsubj):(l=!0,f=r.certissuer),f.match(/^[0-9A-Fa-f]+$/),-1!=f.indexOf("-----BEGIN ")&&(p=Ft(f)),null==p)throw new Error("certsubj/certissuer not cert");var g,d=new Xt;d.hex=p,g=l?d.getIssuerHex():d.getSubjectHex(),(e=new u).hTLV=g}else if(void 0!==r.uri)t="86",e=new s({str:r.uri});else{if(void 0===r.ip)throw new h("improper params");var v;t="87";var y=r.ip;try{if(y.match(/^[0-9a-f]+$/)){var m=y.length;if(8!=m&&16!=m&&32!=m&&64!=m)throw"err";v=y}else v=Tt(y)}catch(t){throw new h("malformed IP address: "+r.ip+":"+t.message)}e=new a({hex:v})}return new o({tag:t,explicit:c,obj:e}).tohex()},this.getEncodedHex=function(){return this.tohex()},void 0!==t&&this.setByParam(t)},Wt(ut.asn1.x509.GeneralName,ut.asn1.ASN1Object),ut.asn1.x509.GeneralNames=function(t){ut.asn1.x509.GeneralNames.superclass.constructor.call(this);var e=ut.asn1;this.setByParamArray=function(t){for(var r=0;r0){for(var r=s(t.valhex,e[0]),n=c(r,0),i=[],a=0;a1){var h=s(t.valhex,e[1]);t.polhex=h}delete t.valhex},this.setSignaturePolicyIdentifier=function(t){var r=c(t.valhex,0);if(r.length>0){var a=n.getOID(t.valhex,r[0]);t.oid=a}if(r.length>1){var o=new e,u=c(t.valhex,r[1]),h=s(t.valhex,u[0]),l=o.getAlgorithmIdentifierName(h);t.alg=l;var f=i(t.valhex,u[1]);t.hash=f}delete t.valhex},this.setSigningCertificateV2=function(t){var e=c(t.valhex,0);if(e.length>0){for(var r=s(t.valhex,e[0]),n=c(r,0),i=[],a=0;a1){var h=s(t.valhex,e[1]);t.polhex=h}delete t.valhex},this.getESSCertID=function(t){var e={},r=c(t,0);if(r.length>0){var n=i(t,r[0]);e.hash=n}if(r.length>1){var a=s(t,r[1]),o=this.getIssuerSerial(a);null!=o.serial&&(e.serial=o.serial),null!=o.issuer&&(e.issuer=o.issuer)}return e},this.getESSCertIDv2=function(e){var n={},a=c(e,0);if(a.length<1||3o+1){var l=s(e,a[o+1]),f=this.getIssuerSerial(l);n.issuer=f.issuer,n.serial=f.serial}return n},this.getIssuerSerial=function(t){var e={},n=c(t,0),a=s(t,n[0]),o=r.getGeneralNames(a)[0].dn;e.issuer=o;var u=i(t,n[1]);return e.serial={hex:u},e},this.getCertificateSet=function(t){for(var e=c(t,0),r=[],n=0;n=0;a--)i+=n[a];return i}if("string"==typeof t&&null!=s[t])return _t([t],s);if("object"==typeof t&&null!=t.length)return _t(t,s);throw new e("wrong params")},this.tohex=function(){this.params;var t=this.getBinValue();return new n({bin:t}).tohex()},this.getEncodedHex=function(){return this.tohex()},null!=t&&this.setByParam(t)},Wt(ut.asn1.tsp.PKIFailureInfo,ut.asn1.ASN1Object),ut.asn1.tsp.AbstractTSAAdapter=function(t){this.getTSTHex=function(t,e){throw"not implemented yet"}},ut.asn1.tsp.SimpleTSAAdapter=function(t){var e=ut,r=e.asn1.tsp,n=e.crypto.Util.hashHex;r.SimpleTSAAdapter.superclass.constructor.call(this),this.params=null,this.serial=0,this.getTSTHex=function(t,e){var i=n(t,e);this.params.econtent.content.messageImprint={alg:e,hash:i},this.params.econtent.content.serial={int:this.serial++};var s=Math.floor(1e9*Math.random());return this.params.econtent.content.nonce={int:s},new r.TimeStampToken(this.params).getContentInfoEncodedHex()},void 0!==t&&(this.params=t)},Wt(ut.asn1.tsp.SimpleTSAAdapter,ut.asn1.tsp.AbstractTSAAdapter),ut.asn1.tsp.FixedTSAAdapter=function(t){var e=ut,r=e.asn1.tsp,n=e.crypto.Util.hashHex;r.FixedTSAAdapter.superclass.constructor.call(this),this.params=null,this.getTSTHex=function(t,e){var i=n(t,e);return this.params.econtent.content.messageImprint={alg:e,hash:i},new r.TimeStampToken(this.params).getContentInfoEncodedHex()},void 0!==t&&(this.params=t)},Wt(ut.asn1.tsp.FixedTSAAdapter,ut.asn1.tsp.AbstractTSAAdapter),ut.asn1.tsp.TSPUtil=new function(){},ut.asn1.tsp.TSPUtil.newTimeStampToken=function(t){return new ut.asn1.tsp.TimeStampToken(t)},ut.asn1.tsp.TSPUtil.parseTimeStampReq=function(t){return(new ut.asn1.tsp.TSPParser).getTimeStampReq(t)},ut.asn1.tsp.TSPUtil.parseMessageImprint=function(t){return(new ut.asn1.tsp.TSPParser).getMessageImprint(t)},ut.asn1.tsp.TSPParser=function(){Error;var t=new Xt,e=lt,r=e.getV,n=e.getTLV,i=e.getIdxbyList,s=(e.getTLVbyListEx,e.getChildIdx),a=["granted","grantedWithMods","rejection","waiting","revocationWarning","revocationNotification"],o={0:"badAlg",2:"badRequest",5:"badDataFormat",14:"timeNotAvailable",15:"unacceptedPolicy",16:"unacceptedExtension",17:"addInfoNotAvailable",25:"systemFailure"};this.getResponse=function(t){var e=s(t,0);if(1==e.length)return this.getPKIStatusInfo(n(t,e[0]));if(e.length>1){var r=this.getPKIStatusInfo(n(t,e[0])),i=n(t,e[1]),a=this.getToken(i);return a.statusinfo=r,a}},this.getToken=function(t){var e=(new ut.asn1.cms.CMSParser).getCMSSignedData(t);return this.setTSTInfo(e),e},this.setTSTInfo=function(t){var e=t.econtent;if("tstinfo"==e.type){var r=e.content.hex,n=this.getTSTInfo(r);e.content=n}},this.getTSTInfo=function(e){var i={},a=s(e,0),o=r(e,a[1]);i.policy=Vt(o);var u=n(e,a[2]);i.messageImprint=this.getMessageImprint(u);var h=r(e,a[3]);i.serial={hex:h};var c=r(e,a[4]);i.genTime={str:xt(c)};var l=0;if(a.length>5&&"30"==e.substr(a[5],2)){var f=n(e,a[5]);i.accuracy=this.getAccuracy(f),l++}if(a.length>5+l&&"01"==e.substr(a[5+l],2)&&("ff"==r(e,a[5+l])&&(i.ordering=!0),l++),a.length>5+l&&"02"==e.substr(a[5+l],2)){var p=r(e,a[5+l]);i.nonce={hex:p},l++}if(a.length>5+l&&"a0"==e.substr(a[5+l],2)){var g=n(e,a[5+l]);g="30"+g.substr(2),pGeneralNames=t.getGeneralNames(g);var d=pGeneralNames[0].dn;i.tsa=d,l++}if(a.length>5+l&&"a1"==e.substr(a[5+l],2)){var v=n(e,a[5+l]);v="30"+v.substr(2);var y=t.getExtParamArray(v);i.ext=y,l++}return i},this.getAccuracy=function(t){for(var e={},n=s(t,0),i=0;i1&&"30"==t.substr(i[1],2)){var c=n(t,i[1]);e.statusstr=this.getPKIFreeText(c),o++}if(i.length>o&&"03"==t.substr(i[1+o],2)){var l=n(t,i[1+o]);e.failinfo=this.getPKIFailureInfo(l)}return e},this.getPKIFreeText=function(t){for(var r=[],n=s(t,0),i=0;i=e?t:new Array(e-t.length+1).join(r)+t};function _t(t,e){for(var r=0,n=0;n=0;n--)s+=i[n];return s}function qt(t,e,r){if("object"==typeof t){e=String(e).split(".");for(var n=0;ni)throw"key is too short for SigAlg: keylen="+r+","+e;for(var s="00"+n,a="",o=i-4-s.length,u=0;u=0)return!1;if(n.compareTo(r.ONE)<0||n.compareTo(s)>=0)return!1;var o=n.modInverse(s),u=t.multiply(o).mod(s),h=e.multiply(o).mod(s);return a.multiply(u).add(i.multiply(h)).getX().toBigInteger().mod(s).equals(e)},this.serializeSig=function(t,e){var r=t.toByteArraySigned(),n=e.toByteArraySigned(),i=[];return i.push(2),i.push(r.length),(i=i.concat(r)).push(2),i.push(n.length),(i=i.concat(n)).unshift(i.length),i.unshift(48),i},this.parseSig=function(t){var e;if(48!=t[0])throw new Error("Signature not a valid DERSequence");if(2!=t[e=2])throw new Error("First element in signature must be a DERInteger");var n=t.slice(e+2,e+2+t[e+1]);if(2!=t[e+=2+t[e+1]])throw new Error("Second element in signature must be a DERInteger");var i=t.slice(e+2,e+2+t[e+1]);return e+=2+t[e+1],{r:r.fromByteArrayUnsigned(n),s:r.fromByteArrayUnsigned(i)}},this.parseSigCompact=function(t){if(65!==t.length)throw"Signature has the wrong length";var e=t[0]-27;if(e<0||e>7)throw"Invalid signature type";var n=this.ecparams.n;return{r:r.fromByteArrayUnsigned(t.slice(1,33)).mod(n),s:r.fromByteArrayUnsigned(t.slice(33,65)).mod(n),i:e}},this.readPKCS5PrvKeyHex=function(t){if(!1===h(t))throw new Error("not ASN.1 hex string");var e,r,n;try{e=u(t,0,["[0]",0],"06"),r=u(t,0,[1],"04");try{n=u(t,0,["[1]",0],"03")}catch(t){}}catch(t){throw new Error("malformed PKCS#1/5 plain ECC private key")}if(this.curveName=a(e),void 0===this.curveName)throw"unsupported curve name";this.setNamedCurve(this.curveName),this.setPublicKeyHex(n),this.setPrivateKeyHex(r),this.isPublic=!1},this.readPKCS8PrvKeyHex=function(t){if(!1===h(t))throw new e("not ASN.1 hex string");var r,n,i;try{u(t,0,[1,0],"06"),r=u(t,0,[1,1],"06"),n=u(t,0,[2,0,1],"04");try{i=u(t,0,[2,0,"[1]",0],"03")}catch(t){}}catch(t){throw new e("malformed PKCS#8 plain ECC private key")}if(this.curveName=a(r),void 0===this.curveName)throw new e("unsupported curve name");this.setNamedCurve(this.curveName),this.setPublicKeyHex(i),this.setPrivateKeyHex(n),this.isPublic=!1},this.readPKCS8PubKeyHex=function(t){if(!1===h(t))throw new e("not ASN.1 hex string");var r,n;try{u(t,0,[0,0],"06"),r=u(t,0,[0,1],"06"),n=u(t,0,[1],"03")}catch(t){throw new e("malformed PKCS#8 ECC public key")}if(this.curveName=a(r),null===this.curveName)throw new e("unsupported curve name");this.setNamedCurve(this.curveName),this.setPublicKeyHex(n)},this.readCertPubKeyHex=function(t,r){if(!1===h(t))throw new e("not ASN.1 hex string");var n,i;try{n=u(t,0,[0,5,0,1],"06"),i=u(t,0,[0,5,1],"03")}catch(t){throw new e("malformed X.509 certificate ECC public key")}if(this.curveName=a(n),null===this.curveName)throw new e("unsupported curve name");this.setNamedCurve(this.curveName),this.setPublicKeyHex(i)},void 0!==t&&void 0!==t.curve&&(this.curveName=t.curve),void 0===this.curveName&&(this.curveName="secp256r1"),this.setNamedCurve(this.curveName),void 0!==t&&(void 0!==t.prv&&this.setPrivateKeyHex(t.prv),void 0!==t.pub&&this.setPublicKeyHex(t.pub))},ut.crypto.ECDSA.parseSigHex=function(t){var e=ut.crypto.ECDSA.parseSigHexInHexRS(t);return{r:new S(e.r,16),s:new S(e.s,16)}},ut.crypto.ECDSA.parseSigHexInHexRS=function(t){var e=lt,r=e.getChildIdx,n=e.getV;if(e.checkStrictDER(t,0),"30"!=t.substr(0,2))throw new Error("signature is not a ASN.1 sequence");var i=r(t,0);if(2!=i.length)throw new Error("signature shall have two elements");var s=i[0],a=i[1];if("02"!=t.substr(s,2))throw new Error("1st item not ASN.1 integer");if("02"!=t.substr(a,2))throw new Error("2nd item not ASN.1 integer");return{r:n(t,s),s:n(t,a)}},ut.crypto.ECDSA.asn1SigToConcatSig=function(t){var e=ut.crypto.ECDSA.parseSigHexInHexRS(t),r=e.r,n=e.s;if(r.length>=130&&r.length<=134){if(r.length%2!=0)throw Error("unknown ECDSA sig r length error");if(n.length%2!=0)throw Error("unknown ECDSA sig s length error");"00"==r.substr(0,2)&&(r=r.substr(2)),"00"==n.substr(0,2)&&(n=n.substr(2));var i=Math.max(r.length,n.length);return(r=("000000"+r).slice(-i))+("000000"+n).slice(-i)}if("00"==r.substr(0,2)&&r.length%32==2&&(r=r.substr(2)),"00"==n.substr(0,2)&&n.length%32==2&&(n=n.substr(2)),r.length%32==30&&(r="00"+r),n.length%32==30&&(n="00"+n),r.length%32!=0)throw Error("unknown ECDSA sig r length error");if(n.length%32!=0)throw Error("unknown ECDSA sig s length error");return r+n},ut.crypto.ECDSA.concatSigToASN1Sig=function(t){if(t.length%4!=0)throw Error("unknown ECDSA concatinated r-s sig length error");var e=t.substr(0,t.length/2),r=t.substr(t.length/2);return ut.crypto.ECDSA.hexRSSigToASN1Sig(e,r)},ut.crypto.ECDSA.hexRSSigToASN1Sig=function(t,e){var r=new S(t,16),n=new S(e,16);return ut.crypto.ECDSA.biRSSigToASN1Sig(r,n)},ut.crypto.ECDSA.biRSSigToASN1Sig=function(t,e){var r=ut.asn1,n=new r.DERInteger({bigint:t}),i=new r.DERInteger({bigint:e});return new r.DERSequence({array:[n,i]}).tohex()},ut.crypto.ECDSA.getName=function(t){return"2b8104001f"===t?"secp192k1":"2a8648ce3d030107"===t?"secp256r1":"2b8104000a"===t?"secp256k1":"2b81040021"===t?"secp224r1":"2b81040022"===t?"secp384r1":"2b81040023"===t?"secp521r1":-1!=="|secp256r1|NIST P-256|P-256|prime256v1|".indexOf(t)?"secp256r1":-1!=="|secp256k1|".indexOf(t)?"secp256k1":-1!=="|secp224r1|NIST P-224|P-224|".indexOf(t)?"secp224r1":-1!=="|secp384r1|NIST P-384|P-384|".indexOf(t)?"secp384r1":-1!=="|secp521r1|NIST P-521|P-521|".indexOf(t)?"secp521r1":null},void 0!==ut&&ut||(ut={}),void 0!==ut.crypto&&ut.crypto||(ut.crypto={}),ut.crypto.ECParameterDB=new function(){var t={},e={};function r(t){return new S(t,16)}this.getByName=function(r){var n=r;if(void 0!==e[n]&&(n=e[r]),void 0!==t[n])return t[n];throw"unregistered EC curve name: "+n},this.regist=function(n,i,s,a,o,u,h,c,l,f,p,g){t[n]={};var d=r(s),v=r(a),y=r(o),m=r(u),x=r(h),w=new at(d,v,y),b=w.decodePointHex("04"+c+l);t[n].name=n,t[n].keylen=i,t[n].keycharlen=2*Math.ceil(i/8),t[n].curve=w,t[n].G=b,t[n].n=m,t[n].h=x,t[n].oid=p,t[n].info=g;for(var S=0;S1?new S(n,16):null,h=new S(i,16),this.setPrivate(s,a,o,u,h)},this.setPublic=function(t,e,r,n){this.isPublic=!0,this.p=t,this.q=e,this.g=r,this.y=n,this.x=null},this.setPublicHex=function(t,e,r,n){var i,s,a,o;i=new S(t,16),s=new S(e,16),a=new S(r,16),o=new S(n,16),this.setPublic(i,s,a,o)},this.signWithMessageHash=function(t){var e=this.p,r=this.q,n=this.g,i=(this.y,this.x),s=ut.crypto.Util.getRandomBigIntegerMinToMax(S.ONE.add(S.ONE),r.subtract(S.ONE)),a=new S(t.substr(0,r.bitLength()/4),16),o=n.modPow(s,e).mod(r),u=s.modInverse(r).multiply(a.add(i.multiply(o))).mod(r);return ut.asn1.ASN1Util.jsonToASN1HEX({seq:[{int:{bigint:o}},{int:{bigint:u}}]})},this.verifyWithMessageHash=function(t,e){var r=this.p,n=this.q,i=this.g,s=this.y,a=this.parseASN1Signature(e),o=a[0],u=a[1],h=new S(t.substr(0,n.bitLength()/4),16);if(S.ZERO.compareTo(o)>0||o.compareTo(n)>0)throw"invalid DSA signature";if(S.ZERO.compareTo(u)>=0||u.compareTo(n)>0)throw"invalid DSA signature";var c=u.modInverse(n),l=h.multiply(c).mod(n),f=o.multiply(c).mod(n);return 0==i.modPow(l,r).multiply(s.modPow(f,r)).mod(r).mod(n).compareTo(o)},this.parseASN1Signature=function(t){try{return[new n(e(t,0,[0],"02"),16),new n(e(t,0,[1],"02"),16)]}catch(t){throw new Error("malformed ASN.1 DSA signature")}},this.readPKCS5PrvKeyHex=function(t){var n,i,s,a,o;if(!1===r(t))throw new Error("not ASN.1 hex string");try{n=e(t,0,[1],"02"),i=e(t,0,[2],"02"),s=e(t,0,[3],"02"),a=e(t,0,[4],"02"),o=e(t,0,[5],"02")}catch(t){throw new Error("malformed PKCS#1/5 plain DSA private key")}this.setPrivateHex(n,i,s,a,o)},this.readPKCS8PrvKeyHex=function(t){var n,i,s,a;if(!1===r(t))throw new Error("not ASN.1 hex string");try{n=e(t,0,[1,1,0],"02"),i=e(t,0,[1,1,1],"02"),s=e(t,0,[1,1,2],"02"),a=e(t,0,[2,0],"02")}catch(t){throw new Error("malformed PKCS#8 plain DSA private key")}this.setPrivateHex(n,i,s,null,a)},this.readPKCS8PubKeyHex=function(t){var n,i,s,a;if(!1===r(t))throw new Error("not ASN.1 hex string");try{n=e(t,0,[0,1,0],"02"),i=e(t,0,[0,1,1],"02"),s=e(t,0,[0,1,2],"02"),a=e(t,0,[1,0],"02")}catch(t){throw new Error("malformed PKCS#8 DSA public key")}this.setPublicHex(n,i,s,a)},this.readCertPubKeyHex=function(t,n){var i,s,a,o;if(!1===r(t))throw new Error("not ASN.1 hex string");try{i=e(t,0,[0,5,0,1,0],"02"),s=e(t,0,[0,5,0,1,1],"02"),a=e(t,0,[0,5,0,1,2],"02"),o=e(t,0,[0,5,1,0],"02")}catch(t){throw new Error("malformed X.509 certificate DSA public key")}this.setPublicHex(i,s,a,o)}};var $t=function(){var t=function(t,r,n){return e(y.AES,t,r,n)},e=function(t,e,r,n){var i=y.enc.Hex.parse(e),s=y.enc.Hex.parse(r),a=y.enc.Hex.parse(n),o={};o.key=s,o.iv=a,o.ciphertext=i;var u=t.decrypt(o,s,{iv:a});return y.enc.Hex.stringify(u)},r=function(t,e,r){return n(y.AES,t,e,r)},n=function(t,e,r,n){var i=y.enc.Hex.parse(e),s=y.enc.Hex.parse(r),a=y.enc.Hex.parse(n),o=t.encrypt(i,s,{iv:a}),u=y.enc.Hex.parse(o.toString());return y.enc.Base64.stringify(u)},i={"AES-256-CBC":{proc:t,eproc:r,keylen:32,ivlen:16},"AES-192-CBC":{proc:t,eproc:r,keylen:24,ivlen:16},"AES-128-CBC":{proc:t,eproc:r,keylen:16,ivlen:16},"DES-EDE3-CBC":{proc:function(t,r,n){return e(y.TripleDES,t,r,n)},eproc:function(t,e,r){return n(y.TripleDES,t,e,r)},keylen:24,ivlen:8},"DES-CBC":{proc:function(t,r,n){return e(y.DES,t,r,n)},eproc:function(t,e,r){return n(y.DES,t,e,r)},keylen:8,ivlen:8}},s=function(t){var e={},r=t.match(new RegExp("DEK-Info: ([^,]+),([0-9A-Fa-f]+)","m"));r&&(e.cipher=r[1],e.ivsalt=r[2]);var n=t.match(new RegExp("-----BEGIN ([A-Z]+) PRIVATE KEY-----"));n&&(e.type=n[1]);var i=-1,s=0;-1!=t.indexOf("\r\n\r\n")&&(i=t.indexOf("\r\n\r\n"),s=2),-1!=t.indexOf("\n\n")&&(i=t.indexOf("\n\n"),s=1);var a=t.indexOf("-----END");if(-1!=i&&-1!=a){var o=t.substring(i+2*s,a-s);o=o.replace(/\s+/g,""),e.data=o}return e},a=function(t,e,r){for(var n=r.substring(0,16),s=y.enc.Hex.parse(n),a=y.enc.Utf8.parse(e),o=i[t].keylen+i[t].ivlen,u="",h=null;;){var c=y.algo.MD5.create();if(null!=h&&c.update(h),c.update(a),c.update(s),h=c.finalize(),(u+=y.enc.Hex.stringify(h)).length>=2*o)break}var l={};return l.keyhex=u.substr(0,2*i[t].keylen),l.ivhex=u.substr(2*i[t].keylen,2*i[t].ivlen),l},o=function(t,e,r,n){var s=y.enc.Base64.parse(t),a=y.enc.Hex.stringify(s);return(0,i[e].proc)(a,r,n)};return{version:"1.0.0",parsePKCS5PEM:function(t){return s(t)},getKeyAndUnusedIvByPasscodeAndIvsalt:function(t,e,r){return a(t,e,r)},decryptKeyB64:function(t,e,r,n){return o(t,e,r,n)},getDecryptedKeyHex:function(t,e){var r=s(t),n=(r.type,r.cipher),i=r.ivsalt,u=r.data,h=a(n,e,i).keyhex;return o(u,n,h,i)},getEncryptedPKCS5PEMFromPrvKeyHex:function(t,e,r,n,s){var o="";if(void 0!==n&&null!=n||(n="AES-256-CBC"),void 0===i[n])throw new Error("KEYUTIL unsupported algorithm: "+n);if(void 0===s||null==s){var u=function(t){var e=y.lib.WordArray.random(t);return y.enc.Hex.stringify(e)}(i[n].ivlen);s=u.toUpperCase()}var h=function(t,e,r,n){return(0,i[e].eproc)(t,r,n)}(e,n,a(n,r,s).keyhex,s);return o="-----BEGIN "+t+" PRIVATE KEY-----\r\n",o+="Proc-Type: 4,ENCRYPTED\r\n",o+="DEK-Info: "+n+","+s+"\r\n",o+="\r\n",(o+=h.replace(/(.{64})/g,"$1\r\n"))+"\r\n-----END "+t+" PRIVATE KEY-----\r\n"},getEncryptedPKCS8PEM:function(t,e,r){return Et(this.getEncryptedPKCS8Hex(t,e,r),"ENCRYPTED PRIVATE KEY")},getEncryptedPKCS8Hex:function(t,e,r){var n;(n=null==r||null==r?{}:JSON.parse(JSON.stringify(r))).plain=t,this.initPBES2Param(n),this.encryptPBES2Param(n,e);var i=this.generatePBES2ASN1Param(n);return ut.asn1.ASN1Util.newObject(i).tohex()},initPBES2Param:function(t){var e;null==qt(t,"encalg")&&(t.encalg="aes256-CBC"),null==qt(t,"iter")&&(t.iter=2048),null==qt(t,"prf")&&(t.prf="hmacWithSHA256"),null==qt(t,"salt")&&(t.salt=y.enc.Hex.stringify(y.lib.WordArray.random(8))),null==qt(t,"enciv")&&("des-EDE3-CBC"==t.encalg&&(e=8),"aes128-CBC"==t.encalg&&(e=16),"aes256-CBC"==t.encalg&&(e=16),t.enciv=y.enc.Hex.stringify(y.lib.WordArray.random(e)))},encryptPBES2Param:function(t,e){var r=$t.getDKFromPBES2Param(t,e);try{var n=ut.crypto.Cipher.encrypt(t.plain,r,t.encalg,{iv:t.enciv})}catch(e){throw new Error("encrypt error: "+t.plain+" "+r+" "+t.encalg+" "+t.enciv)}t.enc=n},generatePBES2ASN1Param:function(t){var e={seq:[{seq:[{oid:"pkcs5PBES2"},{seq:[{seq:[{oid:"pkcs5PBKDF2"},{seq:[{octstr:{hex:t.salt}},{int:{hex:Ut(t.iter)}}]}]},{seq:[{oid:t.encalg},{octstr:{hex:t.enciv}}]}]}]},{octstr:{hex:t.enc}}]};return"hmacWithSHA1"!=t.prf&&e.seq[0].seq[1].seq[0].seq[1].seq.push({seq:[{oid:t.prf},{null:""}]}),e},parseHexOfEncryptedPKCS8:function(t){var e=lt,r=e.getChildIdx,n=e.getV,i={},s=r(t,0);if(2!=s.length)throw new Error("malformed format: SEQUENCE(0).items != 2: "+s.length);i.ciphertext=n(t,s[1]);var a=r(t,s[0]);if(2!=a.length)throw new Error("malformed format: SEQUENCE(0.0).items != 2: "+a.length);if("2a864886f70d01050d"!=n(t,a[0]))throw new Error("this only supports pkcs5PBES2");var o=r(t,a[1]);if(2!=a.length)throw new Error("malformed format: SEQUENCE(0.0.1).items != 2: "+o.length);var u=r(t,o[1]);if(2!=u.length)throw new Error("malformed format: SEQUENCE(0.0.1.1).items != 2: "+u.length);if("2a864886f70d0307"!=n(t,u[0]))throw"this only supports TripleDES";i.encryptionSchemeAlg="TripleDES",i.encryptionSchemeIV=n(t,u[1]);var h=r(t,o[0]);if(2!=h.length)throw new Error("malformed format: SEQUENCE(0.0.1.0).items != 2: "+h.length);if("2a864886f70d01050c"!=n(t,h[0]))throw new Error("this only supports pkcs5PBKDF2");var c=r(t,h[1]);if(c.length<2)throw new Error("malformed format: SEQUENCE(0.0.1.0.1).items < 2: "+c.length);i.pbkdf2Salt=n(t,c[0]);var l=n(t,c[1]);try{i.pbkdf2Iter=parseInt(l,16)}catch(t){throw new Error("malformed format pbkdf2Iter: "+l)}return i},getPBKDF2KeyHexFromParam:function(t,e){var r=y.enc.Hex.parse(t.pbkdf2Salt),n=t.pbkdf2Iter,i=y.PBKDF2(e,r,{keySize:6,iterations:n});return y.enc.Hex.stringify(i)},_getPlainPKCS8HexFromEncryptedPKCS8PEM:function(t,e){var r=Ft(t,"ENCRYPTED PRIVATE KEY"),n=this.parseHexOfEncryptedPKCS8(r),i=$t.getPBKDF2KeyHexFromParam(n,e),s={};s.ciphertext=y.enc.Hex.parse(n.ciphertext);var a=y.enc.Hex.parse(i),o=y.enc.Hex.parse(n.encryptionSchemeIV),u=y.TripleDES.decrypt(s,a,{iv:o});return y.enc.Hex.stringify(u)},parsePBES2:function(t){var e=lt.parse(t);if("pkcs5PBES2"!=qt(e,"seq.0.seq.0.oid")||"pkcs5PBKDF2"!=qt(e,"seq.0.seq.1.seq.0.seq.0.oid"))throw new Error("not pkcs5PBES2 and pkcs5PBKDF2 used");var r=qt(e,"seq.0.seq.1.seq.0.seq.1.seq");if(null==r)throw new Error("PBKDF2 parameter not found");var n=qt(r,"0.octstr.hex"),i=qt(r,"1.int.hex"),s=qt(r,"2.seq.0.oid","hmacWithSHA1"),a=-1;try{a=parseInt(i,16)}catch(t){throw new Error("iter not proper value")}var o=qt(e,"seq.0.seq.1.seq.1.seq.0.oid"),u=qt(e,"seq.0.seq.1.seq.1.seq.1.octstr.hex"),h=qt(e,"seq.1.octstr.hex");if(null==o||null==u||null==h)throw new Error("encalg, enciv or enc is undefined");return{salt:n,iter:a,prf:s,encalg:o,enciv:u,enc:h}},getDKFromPBES2Param:function(t,e){var r={hmacWithSHA1:y.algo.SHA1,hmacWithSHA224:y.algo.SHA224,hmacWithSHA256:y.algo.SHA256,hmacWithSHA384:y.algo.SHA384,hmacWithSHA512:y.algo.SHA512}[t.prf];if(null==r)throw new Error("unsupported prf");var n={"des-EDE3-CBC":6,"aes128-CBC":4,"aes256-CBC":8}[t.encalg];if(null==n)throw new Error("unsupported encalg");var i=y.enc.Hex.parse(t.salt),s=t.iter;try{var a=y.PBKDF2(e,i,{keySize:n,iterations:s,hasher:r});return y.enc.Hex.stringify(a)}catch(r){throw new Error("PBKDF2 error: "+r+" "+JSON.stringify(t)+" "+e)}},getPlainHexFromEncryptedPKCS8PEM:function(t,e){if(-1==t.indexOf("BEGIN ENCRYPTED PRIVATE KEY"))throw new Error("not Encrypted PKCS#8 PEM string");var r,n=Ft(t);try{r=$t.parsePBES2(n)}catch(t){throw new Error("malformed PBES2 format: "+t.message)}var i=$t.getDKFromPBES2Param(r,e);return ut.crypto.Cipher.decrypt(r.enc,i,r.encalg,{iv:r.enciv})},getKeyFromEncryptedPKCS8PEM:function(t,e){var r=this.getPlainHexFromEncryptedPKCS8PEM(t,e);return this.getKeyFromPlainPrivatePKCS8Hex(r)},parsePlainPrivatePKCS8Hex:function(t){var e=lt,r=e.getChildIdx,n=e.getV,i={algparam:null};if("30"!=t.substr(0,2))throw new Error("malformed plain PKCS8 private key(code:001)");var s=r(t,0);if(s.length<3)throw new Error("malformed plain PKCS8 private key(code:002)");if("30"!=t.substr(s[1],2))throw new Error("malformed PKCS8 private key(code:003)");var a=r(t,s[1]);if(2!=a.length)throw new Error("malformed PKCS8 private key(code:004)");if("06"!=t.substr(a[0],2))throw new Error("malformed PKCS8 private key(code:005)");if(i.algoid=n(t,a[0]),"06"==t.substr(a[1],2)&&(i.algparam=n(t,a[1])),"04"!=t.substr(s[2],2))throw new Error("malformed PKCS8 private key(code:006)");return i.keyidx=e.getVidx(t,s[2]),i},getKeyFromPlainPrivatePKCS8PEM:function(t){var e=Ft(t,"PRIVATE KEY");return this.getKeyFromPlainPrivatePKCS8Hex(e)},getKeyFromPlainPrivatePKCS8Hex:function(t){var e,r=this.parsePlainPrivatePKCS8Hex(t);if("2a864886f70d010101"==r.algoid)e=new nt;else if("2a8648ce380401"==r.algoid)e=new ut.crypto.DSA;else{if("2a8648ce3d0201"!=r.algoid)throw new Error("unsupported private key algorithm");e=new ut.crypto.ECDSA}return e.readPKCS8PrvKeyHex(t),e},_getKeyFromPublicPKCS8Hex:function(t){var e,r=lt.getVbyList(t,0,[0,0],"06");if("2a864886f70d010101"===r)e=new nt;else if("2a8648ce380401"===r)e=new ut.crypto.DSA;else{if("2a8648ce3d0201"!==r)throw new Error("unsupported PKCS#8 public key hex");e=new ut.crypto.ECDSA}return e.readPKCS8PubKeyHex(t),e},parsePublicRawRSAKeyHex:function(t){var e=lt,r=e.getChildIdx,n=e.getV,i={};if("30"!=t.substr(0,2))throw new Error("malformed RSA key(code:001)");var s=r(t,0);if(2!=s.length)throw new Error("malformed RSA key(code:002)");if("02"!=t.substr(s[0],2))throw new Error("malformed RSA key(code:003)");if(i.n=n(t,s[0]),"02"!=t.substr(s[1],2))throw new Error("malformed RSA key(code:004)");return i.e=n(t,s[1]),i},parsePublicPKCS8Hex:function(t){var e=lt,r=e.getChildIdx,n=e.getV,i={algparam:null},s=r(t,0);if(2!=s.length)throw new Error("outer DERSequence shall have 2 elements: "+s.length);var a=s[0];if("30"!=t.substr(a,2))throw new Error("malformed PKCS8 public key(code:001)");var o=r(t,a);if(2!=o.length)throw new Error("malformed PKCS8 public key(code:002)");if("06"!=t.substr(o[0],2))throw new Error("malformed PKCS8 public key(code:003)");if(i.algoid=n(t,o[0]),"06"==t.substr(o[1],2)?i.algparam=n(t,o[1]):"30"==t.substr(o[1],2)&&(i.algparam={},i.algparam.p=e.getVbyList(t,o[1],[0],"02"),i.algparam.q=e.getVbyList(t,o[1],[1],"02"),i.algparam.g=e.getVbyList(t,o[1],[2],"02")),"03"!=t.substr(s[1],2))throw new Error("malformed PKCS8 public key(code:004)");return i.key=n(t,s[1]).substr(2),i}}}();function Gt(t,e){for(var r="",n=e/4-t.length,i=0;i>24,(16711680&i)>>16,(65280&i)>>8,255&i])))),i+=1;return n}function Jt(t){for(var e in ut.crypto.Util.DIGESTINFOHEAD){var r=ut.crypto.Util.DIGESTINFOHEAD[e],n=r.length;if(t.substring(0,n)==r)return[e,t.substring(n)]}return[]}function Xt(t){var e,r=lt,n=r.getChildIdx,i=r.getV,s=(r.dump,r.parse),a=r.getTLV,o=r.getVbyList,u=r.getVbyListEx,h=r.getTLVbyList,c=r.getTLVbyListEx,l=r.getIdxbyList,f=r.getIdxbyListEx,p=r.getVidx,g=r.getInt,d=r.oidname,v=r.hextooidstr,y=Ft,m=Error;try{e=ut.asn1.x509.AlgorithmIdentifier.PSSNAME2ASN1TLV}catch(t){}this.HEX2STAG={"0c":"utf8",13:"prn",16:"ia5","1a":"vis","1e":"bmp"},this.hex=null,this.version=0,this.foffset=0,this.aExtInfo=null,this.getVersion=function(){if(null===this.hex||0!==this.version)return this.version;var t=h(this.hex,0,[0,0]);if("a0"==t.substr(0,2)){var e=h(t,0,[0]),r=g(e,0);if(r<0||20?e:void 0}catch(t){return}},this._asn1ToNoticeRef=function(t){try{for(var e={},r=qt(t,"seq"),n=0;n0?e:void 0}catch(t){return}},this._asn1ToNoticeNum=function(t){try{for(var e=qt(t,"seq"),r=[],n=0;n1){var o=a(t,s[1]),u=this.getGeneralName(o);null!=u.uri&&(i.uri=u.uri)}if(s.length>2){var h=a(t,s[2]);"0101ff"==h&&(i.reqauth=!0),"010100"==h&&(i.reqauth=!1)}return i},this.getExtSubjectDirectoryAttributes=function(t,e){if(void 0===t&&void 0===e){var r=this.getExtInfo("subjectDirectoryAttributes");if(void 0===r)return;t=a(this.hex,r.vidx),e=r.critical}var n={extname:"subjectDirectoryAttributes"};e&&(n.critical=!0);try{for(var i=s(t),o=[],u=0;u0&&(e.ext=this.getExtParamArray()),e.sighex=this.getSignatureValueHex(),1==t.tbshex&&(e.tbshex=h(this.hex,0,[0])),1==t.nodnarray&&(delete e.issuer.array,delete e.subject.array),e},this.getExtParamArray=function(t){null==t&&-1!=f(this.hex,0,[0,"[3]"])&&(t=c(this.hex,0,[0,"[3]",0],"30"));for(var e=[],r=n(t,0),i=0;i2&&"04"===v.substr(d[1],2)))throw new Error("unsupported PKCS#1/5 hexadecimal key");(D=new o).readPKCS5PrvKeyHex(v)}return D}if("pkcs8prv"===r)return l.getKeyFromPlainPrivatePKCS8Hex(t);if("pkcs8pub"===r)return l._getKeyFromPublicPKCS8Hex(t);if("x509pub"===r)return Xt.getPublicKeyFromCertHex(t);if(-1!=t.indexOf("-END CERTIFICATE-",0)||-1!=t.indexOf("-END X509 CERTIFICATE-",0)||-1!=t.indexOf("-END TRUSTED CERTIFICATE-",0))return Xt.getPublicKeyFromCertPEM(t);if(-1!=t.indexOf("-END PUBLIC KEY-")){var m=Ft(t,"PUBLIC KEY");return l._getKeyFromPublicPKCS8Hex(m)}if(-1!=t.indexOf("-END RSA PRIVATE KEY-")&&-1==t.indexOf("4,ENCRYPTED")){var x=c(t,"RSA PRIVATE KEY");return l.getKey(x,null,"pkcs5prv")}if(-1!=t.indexOf("-END DSA PRIVATE KEY-")&&-1==t.indexOf("4,ENCRYPTED")){var w=s(n=c(t,"DSA PRIVATE KEY"),0,[1],"02"),b=s(n,0,[2],"02"),E=s(n,0,[3],"02"),F=s(n,0,[4],"02"),A=s(n,0,[5],"02");return(D=new u).setPrivate(new S(w,16),new S(b,16),new S(E,16),new S(F,16),new S(A,16)),D}if(-1!=t.indexOf("-END EC PRIVATE KEY-")&&-1==t.indexOf("4,ENCRYPTED"))return x=c(t,"EC PRIVATE KEY"),l.getKey(x,null,"pkcs5prv");if(-1!=t.indexOf("-END PRIVATE KEY-"))return l.getKeyFromPlainPrivatePKCS8PEM(t);if(-1!=t.indexOf("-END RSA PRIVATE KEY-")&&-1!=t.indexOf("4,ENCRYPTED")){var C=l.getDecryptedKeyHex(t,e),B=new nt;return B.readPKCS5PrvKeyHex(C),B}if(-1!=t.indexOf("-END EC PRIVATE KEY-")&&-1!=t.indexOf("4,ENCRYPTED")){var I,D=s(n=l.getDecryptedKeyHex(t,e),0,[1],"04"),P=s(n,0,[2,0],"06"),R=s(n,0,[3,0],"03").substr(2);if(void 0===ut.crypto.OID.oidhex2name[P])throw new Error("undefined OID(hex) in KJUR.crypto.OID: "+P);return(I=new o({curve:ut.crypto.OID.oidhex2name[P]})).setPublicKeyHex(R),I.setPrivateKeyHex(D),I.isPublic=!1,I}if(-1!=t.indexOf("-END DSA PRIVATE KEY-")&&-1!=t.indexOf("4,ENCRYPTED"))return w=s(n=l.getDecryptedKeyHex(t,e),0,[1],"02"),b=s(n,0,[2],"02"),E=s(n,0,[3],"02"),F=s(n,0,[4],"02"),A=s(n,0,[5],"02"),(D=new u).setPrivate(new S(w,16),new S(b,16),new S(E,16),new S(F,16),new S(A,16)),D;if(-1!=t.indexOf("-END ENCRYPTED PRIVATE KEY-"))return l.getKeyFromEncryptedPKCS8PEM(t,e);throw new Error("not supported argument")},$t.generateKeypair=function(t,e){if("RSA"==t){var r=e;(a=new nt).generate(r,"10001"),a.isPrivate=!0,a.isPublic=!0;var n=new nt,i=a.n.toString(16),s=a.e.toString(16);return n.setPublic(i,s),n.isPrivate=!1,n.isPublic=!0,(o={}).prvKeyObj=a,o.pubKeyObj=n,o}if("EC"==t){var a,o,u=e,h=new ut.crypto.ECDSA({curve:u}).generateKeyPairHex();return(a=new ut.crypto.ECDSA({curve:u})).setPublicKeyHex(h.ecpubhex),a.setPrivateKeyHex(h.ecprvhex),a.isPrivate=!0,a.isPublic=!1,(n=new ut.crypto.ECDSA({curve:u})).setPublicKeyHex(h.ecpubhex),n.isPrivate=!1,n.isPublic=!0,(o={}).prvKeyObj=a,o.pubKeyObj=n,o}throw new Error("unknown algorithm: "+t)},$t.getPEM=function(t,e,r,n,i,s){var a=ut,o=a.asn1,u=o.DERObjectIdentifier,h=o.DERInteger,c=o.ASN1Util.newObject,l=o.x509.SubjectPublicKeyInfo,f=a.crypto,p=f.DSA,g=f.ECDSA,d=nt;function v(t){return c({seq:[{int:0},{int:{bigint:t.n}},{int:t.e},{int:{bigint:t.d}},{int:{bigint:t.p}},{int:{bigint:t.q}},{int:{bigint:t.dmp1}},{int:{bigint:t.dmq1}},{int:{bigint:t.coeff}}]})}function y(t){return c({seq:[{int:1},{octstr:{hex:t.prvKeyHex}},{tag:["a0",!0,{oid:{name:t.curveName}}]},{tag:["a1",!0,{bitstr:{hex:"00"+t.pubKeyHex}}]}]})}function m(t){return c({seq:[{int:0},{int:{bigint:t.p}},{int:{bigint:t.q}},{int:{bigint:t.g}},{int:{bigint:t.y}},{int:{bigint:t.x}}]})}if((void 0!==d&&t instanceof d||void 0!==p&&t instanceof p||void 0!==g&&t instanceof g)&&1==t.isPublic&&(void 0===e||"PKCS8PUB"==e))return Et(S=new l(t).tohex(),"PUBLIC KEY");if("PKCS1PRV"==e&&void 0!==d&&t instanceof d&&(void 0===r||null==r)&&1==t.isPrivate)return Et(S=v(t).tohex(),"RSA PRIVATE KEY");if("PKCS1PRV"==e&&void 0!==g&&t instanceof g&&(void 0===r||null==r)&&1==t.isPrivate){var x=new u({name:t.curveName}).tohex(),w=y(t).tohex(),b="";return(b+=Et(x,"EC PARAMETERS"))+Et(w,"EC PRIVATE KEY")}if("PKCS1PRV"==e&&void 0!==p&&t instanceof p&&(void 0===r||null==r)&&1==t.isPrivate)return Et(S=m(t).tohex(),"DSA PRIVATE KEY");if("PKCS5PRV"==e&&void 0!==d&&t instanceof d&&void 0!==r&&null!=r&&1==t.isPrivate){var S=v(t).tohex();return void 0===n&&(n="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("RSA",S,r,n,s)}if("PKCS5PRV"==e&&void 0!==g&&t instanceof g&&void 0!==r&&null!=r&&1==t.isPrivate)return S=y(t).tohex(),void 0===n&&(n="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("EC",S,r,n,s);if("PKCS5PRV"==e&&void 0!==p&&t instanceof p&&void 0!==r&&null!=r&&1==t.isPrivate)return S=m(t).tohex(),void 0===n&&(n="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("DSA",S,r,n,s);var E=function(t,e){if("string"==typeof e)return $t.getEncryptedPKCS8PEM(t,e);if("object"==typeof e&&null!=qt(e,"passcode")){var r=JSON.parse(JSON.stringify(e)),n=r.passcode;return delete r.passcode,$t.getEncryptedPKCS8PEM(t,n,r)}};if("PKCS8PRV"==e&&null!=d&&t instanceof d&&1==t.isPrivate){var F=v(t).tohex();return S=c({seq:[{int:0},{seq:[{oid:{name:"rsaEncryption"}},{null:!0}]},{octstr:{hex:F}}]}).tohex(),void 0===r||null==r?Et(S,"PRIVATE KEY"):E(S,r)}if("PKCS8PRV"==e&&void 0!==g&&t instanceof g&&1==t.isPrivate){var A={seq:[{int:1},{octstr:{hex:t.prvKeyHex}}]};return"string"==typeof t.pubKeyHex&&A.seq.push({tag:["a1",!0,{bitstr:{hex:"00"+t.pubKeyHex}}]}),F=new c(A).tohex(),S=c({seq:[{int:0},{seq:[{oid:{name:"ecPublicKey"}},{oid:{name:t.curveName}}]},{octstr:{hex:F}}]}).tohex(),void 0===r||null==r?Et(S,"PRIVATE KEY"):E(S,r)}if("PKCS8PRV"==e&&void 0!==p&&t instanceof p&&1==t.isPrivate)return F=new h({bigint:t.x}).tohex(),S=c({seq:[{int:0},{seq:[{oid:{name:"dsa"}},{seq:[{int:{bigint:t.p}},{int:{bigint:t.q}},{int:{bigint:t.g}}]}]},{octstr:{hex:F}}]}).tohex(),void 0===r||null==r?Et(S,"PRIVATE KEY"):E(S,r);throw new Error("unsupported object nor format")},$t.getKeyFromCSRPEM=function(t){var e=Ft(t,"CERTIFICATE REQUEST");return $t.getKeyFromCSRHex(e)},$t.getKeyFromCSRHex=function(t){var e=$t.parseCSRHex(t);return $t.getKey(e.p8pubkeyhex,null,"pkcs8pub")},$t.parseCSRHex=function(t){var e=lt,r=e.getChildIdx,n=e.getTLV,i={},s=t;if("30"!=s.substr(0,2))throw new Error("malformed CSR(code:001)");var a=r(s,0);if(a.length<1)throw new Error("malformed CSR(code:002)");if("30"!=s.substr(a[0],2))throw new Error("malformed CSR(code:003)");var o=r(s,a[0]);if(o.length<3)throw new Error("malformed CSR(code:004)");return i.p8pubkeyhex=n(s,o[2]),i},$t.getKeyID=function(t){var e=$t,r=lt;"string"==typeof t&&-1!=t.indexOf("BEGIN ")&&(t=e.getKey(t));var n=Ft(e.getPEM(t)),i=r.getIdxbyList(n,0,[1]),s=r.getV(n,i).substring(2);return ut.crypto.Util.hashHex(s,"sha1")},$t.getJWK=function(t,e,r,n,i){var s,a,o={},u=ut.crypto.Util.hashHex;if("string"==typeof t)s=$t.getKey(t),-1!=t.indexOf("CERTIFICATE")&&(a=Ft(t));else{if("object"!=typeof t)throw new Error("unsupported keyinfo type");t instanceof Xt?(s=t.getPublicKey(),a=t.hex):s=t}if(s instanceof nt&&s.isPrivate)o.kty="RSA",o.n=vt(s.n.toString(16)),o.e=vt(s.e.toString(16)),o.d=vt(s.d.toString(16)),o.p=vt(s.p.toString(16)),o.q=vt(s.q.toString(16)),o.dp=vt(s.dmp1.toString(16)),o.dq=vt(s.dmq1.toString(16)),o.qi=vt(s.coeff.toString(16));else if(s instanceof nt&&s.isPublic)o.kty="RSA",o.n=vt(s.n.toString(16)),o.e=vt(s.e.toString(16));else if(s instanceof ut.crypto.ECDSA&&s.isPrivate){if("P-256"!==(c=s.getShortNISTPCurveName())&&"P-384"!==c&&"P-521"!==c)throw new Error("unsupported curve name for JWT: "+c);var h=s.getPublicKeyXYHex();o.kty="EC",o.crv=c,o.x=vt(h.x),o.y=vt(h.y),o.d=vt(s.prvKeyHex)}else if(s instanceof ut.crypto.ECDSA&&s.isPublic){var c;if("P-256"!==(c=s.getShortNISTPCurveName())&&"P-384"!==c&&"P-521"!==c)throw new Error("unsupported curve name for JWT: "+c);h=s.getPublicKeyXYHex(),o.kty="EC",o.crv=c,o.x=vt(h.x),o.y=vt(h.y)}if(null==o.kty)throw new Error("unsupported keyinfo");return s.isPrivate||1==e||(o.kid=ut.jws.JWS.getJWKthumbprint(o)),null!=a&&1!=r&&(o.x5c=[w(a)]),null!=a&&1!=n&&(o.x5t=gt(w(u(a,"sha1")))),null!=a&&1!=i&&(o["x5t#S256"]=gt(w(u(a,"sha256")))),o},$t.getJWKFromKey=function(t){return $t.getJWK(t,!0,!0,!0,!0)},nt.getPosArrayOfChildrenFromHex=function(t){return lt.getChildIdx(t,0)},nt.getHexValueArrayOfChildrenFromHex=function(t){var e,r=lt.getV,n=r(t,(e=nt.getPosArrayOfChildrenFromHex(t))[0]),i=r(t,e[1]),s=r(t,e[2]),a=r(t,e[3]),o=r(t,e[4]),u=r(t,e[5]),h=r(t,e[6]),c=r(t,e[7]),l=r(t,e[8]);return(e=new Array).push(n,i,s,a,o,u,h,c,l),e},nt.prototype.readPrivateKeyFromPEMString=function(t){var e=Ft(t),r=nt.getHexValueArrayOfChildrenFromHex(e);this.setPrivateEx(r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8])},nt.prototype.readPKCS5PrvKeyHex=function(t){var e=nt.getHexValueArrayOfChildrenFromHex(t);this.setPrivateEx(e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])},nt.prototype.readPKCS8PrvKeyHex=function(t){var e,r,n,i,s,a,o,u,h=lt,c=h.getVbyListEx;if(!1===h.isASN1HEX(t))throw new Error("not ASN.1 hex string");try{e=c(t,0,[2,0,1],"02"),r=c(t,0,[2,0,2],"02"),n=c(t,0,[2,0,3],"02"),i=c(t,0,[2,0,4],"02"),s=c(t,0,[2,0,5],"02"),a=c(t,0,[2,0,6],"02"),o=c(t,0,[2,0,7],"02"),u=c(t,0,[2,0,8],"02")}catch(t){throw new Error("malformed PKCS#8 plain RSA private key")}this.setPrivateEx(e,r,n,i,s,a,o,u)},nt.prototype.readPKCS5PubKeyHex=function(t){var e=lt,r=e.getV;if(!1===e.isASN1HEX(t))throw new Error("keyHex is not ASN.1 hex string");var n=e.getChildIdx(t,0);if(2!==n.length||"02"!==t.substr(n[0],2)||"02"!==t.substr(n[1],2))throw new Error("wrong hex for PKCS#5 public key");var i=r(t,n[0]),s=r(t,n[1]);this.setPublic(i,s)},nt.prototype.readPKCS8PubKeyHex=function(t){var e=lt;if(!1===e.isASN1HEX(t))throw new Error("not ASN.1 hex string");if("06092a864886f70d010101"!==e.getTLVbyListEx(t,0,[0,0]))throw new Error("not PKCS8 RSA public key");var r=e.getTLVbyListEx(t,0,[1,0]);this.readPKCS5PubKeyHex(r)},nt.prototype.readCertPubKeyHex=function(t,e){var r,n;(r=new Xt).readCertHex(t),n=r.getPublicKeyHex(),this.readPKCS8PubKeyHex(n)},nt.prototype.sign=function(t,e){var r=function(t){return ut.crypto.Util.hashString(t,e)}(t);return this.signWithMessageHash(r,e)},nt.prototype.signWithMessageHash=function(t,e){var r=rt(ut.crypto.Util.getPaddedDigestInfoHex(t,e,this.n.bitLength()),16);return Gt(this.doPrivate(r).toString(16),this.n.bitLength())},nt.prototype.signPSS=function(t,e,r){var n,i=(n=St(t),ut.crypto.Util.hashHex(n,e));return void 0===r&&(r=-1),this.signWithMessageHashPSS(i,e,r)},nt.prototype.signWithMessageHashPSS=function(t,e,r){var n,i=bt(t),s=i.length,a=this.n.bitLength()-1,o=Math.ceil(a/8),u=function(t){return ut.crypto.Util.hashHex(t,e)};if(-1===r||void 0===r)r=s;else if(-2===r)r=o-s-2;else if(r<-2)throw new Error("invalid salt length");if(o0&&(h=new Array(r),(new et).nextBytes(h),h=String.fromCharCode.apply(String,h));var c=bt(u(St("\0\0\0\0\0\0\0\0"+i+h))),l=[];for(n=0;n>8*o-a&255;for(g[0]&=~d,n=0;nn)return!1;var i=this.doPublic(r).toString(16);if(i.length+3!=n/4)return!1;var s=Jt(i.replace(/^1f+00/,""));if(0==s.length)return!1;var a=s[0],o=s[1],u=function(t){return ut.crypto.Util.hashString(t,a)}(t);return o==u},nt.prototype.verifyWithMessageHash=function(t,e){if(e.length!=Math.ceil(this.n.bitLength()/4))return!1;var r=rt(e,16);if(r.bitLength()>this.n.bitLength())return 0;var n=Jt(this.doPublic(r).toString(16).replace(/^1f+00/,""));return 0!=n.length&&(n[0],n[1]==t)},nt.prototype.verifyPSS=function(t,e,r,n){var i,s=(i=St(t),ut.crypto.Util.hashHex(i,r));return void 0===n&&(n=-1),this.verifyWithMessageHashPSS(s,e,r,n)},nt.prototype.verifyWithMessageHashPSS=function(t,e,r,n){if(e.length!=Math.ceil(this.n.bitLength()/4))return!1;var i,s=new S(e,16),a=function(t){return ut.crypto.Util.hashHex(t,r)},o=bt(t),u=o.length,h=this.n.bitLength()-1,c=Math.ceil(h/8);if(-1===n||void 0===n)n=u;else if(-2===n)n=c-u-2;else if(n<-2)throw new Error("invalid salt length");if(c>8*c-h&255;if(f.charCodeAt(0)&g)throw new Error("bits beyond keysize not zero");var d=zt(p,f.length,a),v=[];for(i=0;i0&&-1==(":"+r.join(":")+":").indexOf(":"+v+":"))throw"algorithm '"+v+"' not accepted in the list";if("none"!=v&&null===e)throw"key shall be specified to verify.";if("string"==typeof e&&-1!=e.indexOf("-----BEGIN ")&&(e=$t.getKey(e)),!("RS"!=f&&"PS"!=f||e instanceof n))throw"key shall be a RSAKey obj for RS* and PS* algs";if("ES"==f&&!(e instanceof u))throw"key shall be a ECDSA obj for ES* algs";var y=null;if(void 0===s.jwsalg2sigalg[d.alg])throw"unsupported alg name: "+v;if("none"==(y=s.jwsalg2sigalg[v]))throw"not supported";if("Hmac"==y.substr(0,4)){if(void 0===e)throw"hexadecimal key shall be specified for HMAC";var m=new h({alg:y,pass:e});return m.updateString(p),g==m.doFinal()}if(-1!=y.indexOf("withECDSA")){var x,w=null;try{w=u.concatSigToASN1Sig(g)}catch(t){return!1}return(x=new c({alg:y})).init(e),x.updateString(p),x.verify(w)}return(x=new c({alg:y})).init(e),x.updateString(p),x.verify(g)},ut.jws.JWS.parse=function(t){var e,r,n,i=t.split("."),s={};if(2!=i.length&&3!=i.length)throw"malformed sJWS: wrong number of '.' splitted elements";return e=i[0],r=i[1],3==i.length&&(n=i[2]),s.headerObj=ut.jws.JWS.readSafeJSONString(ct(e)),s.payloadObj=ut.jws.JWS.readSafeJSONString(ct(r)),s.headerPP=JSON.stringify(s.headerObj,null," "),null==s.payloadObj?s.payloadPP=ct(r):s.payloadPP=JSON.stringify(s.payloadObj,null," "),void 0!==n&&(s.sigHex=yt(n)),s},ut.jws.JWS.verifyJWT=function(t,e,r){var n=ut.jws,i=n.JWS,s=i.readSafeJSONString,a=i.inArray,o=i.includedArray;if(!jt(t))return!1;var u=t.split(".");if(3!=u.length)return!1;var h=u[0],c=u[1],l=(yt(u[2]),s(ct(h))),f=s(ct(c));if(void 0===l.alg)return!1;if(void 0===r.alg)throw"acceptField.alg shall be specified";if(!a(l.alg,r.alg))return!1;if(void 0!==f.iss&&"object"==typeof r.iss&&!a(f.iss,r.iss))return!1;if(void 0!==f.sub&&"object"==typeof r.sub&&!a(f.sub,r.sub))return!1;if(void 0!==f.aud&&"object"==typeof r.aud)if("string"==typeof f.aud){if(!a(f.aud,r.aud))return!1}else if("object"==typeof f.aud&&!o(f.aud,r.aud))return!1;var p=n.IntDate.getNow();return void 0!==r.verifyAt&&"number"==typeof r.verifyAt&&(p=r.verifyAt),void 0!==r.gracePeriod&&"number"==typeof r.gracePeriod||(r.gracePeriod=0),!(void 0!==f.exp&&"number"==typeof f.exp&&f.exp+r.gracePeriodi&&this.aHeader.pop(),this.aSignature.length>i&&this.aSignature.pop(),"addSignature failed: "+t}},this.verifyAll=function(t){if(this.aHeader.length!==t.length||this.aSignature.length!==t.length)return!1;for(var e=0;e0))throw"malformed header";if(this.aHeader=t.headers,"string"!=typeof t.payload)throw"malformed signatures";if(this.sPayload=t.payload,!(t.signatures.length>0))throw"malformed signatures";this.aSignature=t.signatures}catch(t){throw"malformed JWS-JS JSON object: "+t}},this.getJSON=function(){return{headers:this.aHeader,payload:this.sPayload,signatures:this.aSignature}},this.isEmpty=function(){return 0==this.aHeader.length?1:0}},e.jZ=S,e.sD=nt,ut.crypto.ECDSA,ut.crypto.DSA,ut.crypto.Signature,ut.crypto.MessageDigest,ut.crypto.Mac,e.ym=$t,e.d6=lt,e.dy=Xt,e.od=function(t){var e=ut.lang.String.isHex,r=lt,n=r.getV,i=r.getTLV,s=r.getVbyList,a=r.getTLVbyList,o=r.getTLVbyListEx,u=r.getIdxbyList,h=r.getIdxbyListEx,c=r.getChildIdx,l=new Xt;this.hex=null,this.posSigAlg=null,this.posRevCert=null,this.parsed=null,this._setPos=function(){var t=u(this.hex,0,[0,0]),e=this.hex.substr(t,2);if("02"==e)this.posSigAlg=1;else{if("30"!=e)throw new Error("malformed 1st item of TBSCertList: "+e);this.posSigAlg=0}var r,n=u(this.hex,0,[0,this.posSigAlg+3]),i=this.hex.substr(n,2);if("17"==i||"18"==i)r=u(this.hex,0,[0,this.posSigAlg+4]),this.posRevCert=null,-1!=r&&"30"==this.hex.substr(r,2)&&(this.posRevCert=this.posSigAlg+4);else if("30"==i)this.posRevCert=this.posSigAlg+3;else{if("a0"!=i)throw new Error("malformed nextUpdate or revCert tag: "+i);this.posRevCert=null}},this.getVersion=function(){return 0==this.posSigAlg?null:parseInt(s(this.hex,0,[0,0],"02"),16)+1},this.getSignatureAlgorithmField=function(){var t=a(this.hex,0,[0,this.posSigAlg],"30");return l.getAlgorithmIdentifierName(t)},this.getIssuer=function(){return l.getX500Name(this.getIssuerHex())},this.getIssuerHex=function(){return a(this.hex,0,[0,this.posSigAlg+1],"30")},this.getThisUpdate=function(){var t=s(this.hex,0,[0,this.posSigAlg+2]);return result=bt(t)},this.getNextUpdate=function(){var t=u(this.hex,0,[0,this.posSigAlg+3]),e=this.hex.substr(t,2);return"17"!=e&&"18"!=e?null:bt(n(this.hex,t))},this.getRevCertArray=function(){if(null==this.posRevCert)return null;for(var t=[],e=u(this.hex,0,[0,this.posRevCert]),r=c(this.hex,e),n=0;n=0&&e<=l.levels.SILENT)return e;throw new TypeError("log.setLevel() called with invalid level: "+t)}"string"==typeof t?f+=":"+t:"symbol"==typeof t&&(f=void 0),l.name=t,l.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},l.methodFactory=r||c,l.getLevel=function(){return null!=h?h:null!=o?o:a},l.setLevel=function(t,r){return h=g(t),!1!==r&&function(t){var r=(n[t]||"silent").toUpperCase();if(typeof window!==e&&f){try{return void(window.localStorage[f]=r)}catch(t){}try{window.document.cookie=encodeURIComponent(f)+"="+r+";"}catch(t){}}}(h),u.call(l)},l.setDefaultLevel=function(t){o=g(t),p()||l.setLevel(t,!1)},l.resetLevel=function(){h=null,function(){if(typeof window!==e&&f){try{window.localStorage.removeItem(f)}catch(t){}try{window.document.cookie=encodeURIComponent(f)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(t){}}}(),u.call(l)},l.enableAll=function(t){l.setLevel(l.levels.TRACE,t)},l.disableAll=function(t){l.setLevel(l.levels.SILENT,t)},l.rebuild=function(){if(s!==l&&(a=g(s.getLevel())),u.call(l),s===l)for(var t in i)i[t].rebuild()},a=g(s?s.getLevel():"WARN");var d=p();null!=d&&(h=g(d)),u.call(l)}(s=new l).getLogger=function(t){if("symbol"!=typeof t&&"string"!=typeof t||""===t)throw new TypeError("You must supply a name when creating a logger.");var e=i[t];return e||(e=i[t]=new l(t,s.methodFactory)),e};var f=typeof window!==e?window.log:void 0;return s.noConflict=function(){return typeof window!==e&&window.log===s&&(window.log=f),s},s.getLoggers=function(){return i},s.default=s,s},void 0===(i=n.call(e,r,e,t))||(t.exports=i)}()},65606:t=>{var e,r,n=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(e===setTimeout)return setTimeout(t,0);if((e===i||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:i}catch(t){e=i}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(t){r=s}}();var o,u=[],h=!1,c=-1;function l(){h&&o&&(h=!1,o.length?u=o.concat(u):c=-1,u.length&&f())}function f(){if(!h){var t=a(l);h=!0;for(var e=u.length;e;){for(o=u,u=[];++c1)for(var r=1;r{!function(t){var e,r,n,i=String.fromCharCode;function s(t){for(var e,r,n=[],i=0,s=t.length;i=55296&&e<=56319&&i=55296&&t<=57343)throw Error("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function o(t,e){return i(t>>e&63|128)}function u(t){if(!(4294967168&t))return i(t);var e="";return 4294965248&t?4294901760&t?4292870144&t||(e=i(t>>18&7|240),e+=o(t,12),e+=o(t,6)):(a(t),e=i(t>>12&15|224),e+=o(t,6)):e=i(t>>6&31|192),e+i(63&t|128)}function h(){if(n>=r)throw Error("Invalid byte index");var t=255&e[n];if(n++,128==(192&t))return 63&t;throw Error("Invalid continuation byte")}function c(){var t,i;if(n>r)throw Error("Invalid byte index");if(n==r)return!1;if(t=255&e[n],n++,!(128&t))return t;if(192==(224&t)){if((i=(31&t)<<6|h())>=128)return i;throw Error("Invalid continuation byte")}if(224==(240&t)){if((i=(15&t)<<12|h()<<6|h())>=2048)return a(i),i;throw Error("Invalid continuation byte")}if(240==(248&t)&&(i=(7&t)<<18|h()<<12|h()<<6|h())>=65536&&i<=1114111)return i;throw Error("Invalid UTF-8 detected")}t.version="3.0.0",t.encode=function(t){for(var e=s(t),r=e.length,n=-1,i="";++n65535&&(s+=i((e-=65536)>>>10&1023|55296),e=56320|1023&e),s+=i(e);return s}(o)}}(e)},4633:(t,e,r)=>{var n=r(73738).default;function i(){"use strict";t.exports=i=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var e,r={},s=Object.prototype,a=s.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},h=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",l=u.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(e){f=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var i=e&&e.prototype instanceof w?e:w,s=Object.create(i.prototype),a=new k(n||[]);return o(s,"_invoke",{value:D(t,r,a)}),s}function g(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}r.wrap=p;var d="suspendedStart",v="suspendedYield",y="executing",m="completed",x={};function w(){}function b(){}function S(){}var E={};f(E,h,(function(){return this}));var F=Object.getPrototypeOf,A=F&&F(F(N([])));A&&A!==s&&a.call(A,h)&&(E=A);var C=S.prototype=w.prototype=Object.create(E);function B(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,e){function r(i,s,o,u){var h=g(t[i],t,s);if("throw"!==h.type){var c=h.arg,l=c.value;return l&&"object"==n(l)&&a.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,o,u)}),(function(t){r("throw",t,o,u)})):e.resolve(l).then((function(t){c.value=t,o(c)}),(function(t){return r("throw",t,o,u)}))}u(h.arg)}var i;o(this,"_invoke",{value:function(t,n){function s(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(s,s):s()}})}function D(t,r,n){var i=d;return function(s,a){if(i===y)throw Error("Generator is already running");if(i===m){if("throw"===s)throw a;return{value:e,done:!0}}for(n.method=s,n.arg=a;;){var o=n.delegate;if(o){var u=P(o,n);if(u){if(u===x)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var h=g(t,r,n);if("normal"===h.type){if(i=n.done?m:v,h.arg===x)continue;return{value:h.arg,done:n.done}}"throw"===h.type&&(i=m,n.method="throw",n.arg=h.arg)}}}function P(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),x;var s=g(i,t.iterator,r.arg);if("throw"===s.type)return r.method="throw",r.arg=s.arg,r.delegate=null,x;var a=s.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,x):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,x)}function R(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(R,this),this.reset(!0)}function N(t){if(t||""===t){var r=t[h];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,s=function r(){for(;++i=0;--i){var s=this.tryEntries[i],o=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var u=a.call(s,"catchLoc"),h=a.call(s,"finallyLoc");if(u&&h){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),x}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;T(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:N(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),x}},r}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},73738:t=>{function e(r){return t.exports=e="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},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},54756:(t,e,r)=>{var n=r(4633)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var s=e[n]={exports:{}};return t[n].call(s.exports,s,s.exports,r),s.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t){return e="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},e(t)}function n(t){var r=function(t){if("object"!=e(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=e(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==e(r)?r:r+""}function i(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=Array(e);r1&&void 0!==arguments[1]?arguments[1]:"A-Za-z0-9+/=";if(!t)return"";if("string"==typeof t&&(t=H.strToArrayBuffer(t)),t instanceof ArrayBuffer&&(t=new Uint8Array(t)),64!==(e=H.expandAlphRange(e).join("")).length&&65!==e.length)throw new E(`Invalid Base64 alphabet length (${e.length}): ${e}`);for(var r,n,i,s,a,o,u,h="",c=0;c>2,a=(3&r)<<4|(n=t[c++])>>4,o=(15&n)<<2|(i=t[c++])>>6,u=63&i,isNaN(n)?o=u=64:isNaN(i)&&(u=64),h+=e.charAt(s)+e.charAt(a)+e.charAt(o)+e.charAt(u);return h}function A(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"A-Za-z0-9+/=",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"string",n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(!t)return"string"===r?"":[];if(e=e||"A-Za-z0-9+/=",64!==(e=H.expandAlphRange(e).join("")).length&&65!==e.length)throw new E(`Error: Base64 alphabet should be 64 characters long, or 65 with a padding character. Found ${e.length}: ${e}`);if(n){var s=new RegExp("[^"+e.replace(/[[\]\\\-^$]/g,"\\$&")+"]","g");t=t.replace(s,"")}if(i){if(t.length%4==1)throw new E(`Error: Invalid Base64 input length (${t.length}). Cannot be 4n+1, even without padding chars.`);if(65===e.length){var a=e.charAt(64),o=t.indexOf(a);if(o>=0){if(o>2,c=(3&p)<<6|g,(u=l<<2|f>>4)>=0&&u<256&&d.push(u),h>=0&&h<256&&64!==p&&d.push(h),c>=0&&c<256&&64!==g&&d.push(c)}return"string"===r?H.byteArrayToUtf8(d):d}function C(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(!t)return"";t instanceof ArrayBuffer&&(t=new Uint8Array(t));for(var s="",a="0x"===e||"\\x"===e,o=0;o1&&void 0!==arguments[1]?arguments[1]:"Auto",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;if(r<1||Math.round(r)!==r)throw new E("Byte length must be a positive integer");if("None"!==e){var n="Auto"===e?/[^a-f\d]|0x/gi:H.regexRep(e);t=t.split(n)}else t=[t];for(var i=[],s=0;s1&&void 0!==arguments[1]?arguments[1]:"Auto";e=H.charRep(e);var r=[],n=t.split(e);""===n[n.length-1]&&(n=n.slice(0,n.length-1));for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:"Space",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:8;if(r<1||Math.round(r)!==r)throw new E("Byte length must be a positive integer");var n=H.regexRep(e);t=t.replace(n,"");for(var i=[],s=0;s65535){t-=65536;var e=String.fromCharCode(t>>>10&1023|55296);return t=56320|1023&t,e+String.fromCharCode(t)}return String.fromCharCode(t)}},{key:"ord",value:function(t){if(2===t.length){var e=t.charCodeAt(0),r=t.charCodeAt(1);if(e>=55296&&e<56320&&r>=56320&&r<57344)return 1024*(e-55296)+r-56320+65536}return t.charCodeAt(0)}},{key:"padBytesRight",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=new Array(e);return n.fill(r),y(t).forEach((function(t,e){n[e]=t})),n}},{key:"truncate",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...";return t.length>e&&(t=t.slice(0,e-r.length)+r),t}},{key:"hex",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return(t="string"==typeof t?e.ord(t):t).toString(16).padStart(r,"0")}},{key:"bin",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;return(t="string"==typeof t?e.ord(t):t).toString(2).padStart(r,"0")}},{key:"printable",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?t.replace(/[^\x20-\x7f]/g,"."):(t=t.replace(/[\0-\x08\x0B-\x0C\x0E-\x1F\x7F-\x9F\xAD\u0378\u0379\u037F-\u0383\u038B\u038D\u03A2\u0528-\u0530\u0557\u0558\u0560\u0588\u058B-\u058E\u0590\u05C8-\u05CF\u05EB-\u05EF\u05F5-\u0605\u061C\u061D\u06DD\u070E\u070F\u074B\u074C\u07B2-\u07BF\u07FB-\u07FF\u082E\u082F\u083F\u085C\u085D\u085F-\u089F\u08A1\u08AD-\u08E3\u08FF\u0978\u0980\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09FC-\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF2-\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B55\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B78-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BFB-\u0C00\u0C04\u0C0D\u0C11\u0C29\u0C34\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5A-\u0C5F\u0C64\u0C65\u0C70-\u0C77\u0C80\u0C81\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0D01\u0D04\u0D0D\u0D11\u0D3B\u0D3C\u0D45\u0D49\u0D4F-\u0D56\u0D58-\u0D5F\u0D64\u0D65\u0D76-\u0D78\u0D80\u0D81\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DF1\u0DF5-\u0E00\u0E3B-\u0E3E\u0E5C-\u0E80\u0E83\u0E85\u0E86\u0E89\u0E8B\u0E8C\u0E8E-\u0E93\u0E98\u0EA0\u0EA4\u0EA6\u0EA8\u0EA9\u0EAC\u0EBA\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F48\u0F6D-\u0F70\u0F98\u0FBD\u0FCD\u0FDB-\u0FFF\u10C6\u10C8-\u10CC\u10CE\u10CF\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u137D-\u137F\u139A-\u139F\u13F5-\u13FF\u169D-\u169F\u16F1-\u16FF\u170D\u1715-\u171F\u1737-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17DE\u17DF\u17EA-\u17EF\u17FA-\u17FF\u180F\u181A-\u181F\u1878-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191D-\u191F\u192C-\u192F\u193C-\u193F\u1941-\u1943\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19DD\u1A1C\u1A1D\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1A9F\u1AAE-\u1AFF\u1B4C-\u1B4F\u1B7D-\u1B7F\u1BF4-\u1BFB\u1C38-\u1C3A\u1C4A-\u1C4C\u1C80-\u1CBF\u1CC8-\u1CCF\u1CF7-\u1CFF\u1DE7-\u1DFB\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FC5\u1FD4\u1FD5\u1FDC\u1FF0\u1FF1\u1FF5\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u206F\u2072\u2073\u208F\u209D-\u209F\u20BB-\u20CF\u20F1-\u20FF\u218A-\u218F\u23F4-\u23FF\u2427-\u243F\u244B-\u245F\u2700\u2B4D-\u2B4F\u2B5A-\u2BFF\u2C2F\u2C5F\u2CF4-\u2CF8\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D71-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E3C-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u2FFF\u3040\u3097\u3098\u3100-\u3104\u312E-\u3130\u318F\u31BB-\u31BF\u31E4-\u31EF\u321F\u32FF\u4DB6-\u4DBF\u9FCD-\u9FFF\uA48D-\uA48F\uA4C7-\uA4CF\uA62C-\uA63F\uA698-\uA69E\uA6F8-\uA6FF\uA78F\uA794-\uA79F\uA7AB-\uA7F7\uA82C-\uA82F\uA83A-\uA83F\uA878-\uA87F\uA8C5-\uA8CD\uA8DA-\uA8DF\uA8FC-\uA8FF\uA954-\uA95E\uA97D-\uA97F\uA9CE\uA9DA-\uA9DD\uA9E0-\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A\uAA5B\uAA7C-\uAA7F\uAAC3-\uAADA\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F-\uABBF\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBC2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFE\uFDFF\uFE1A-\uFE1F\uFE27-\uFE2F\uFE53\uFE67\uFE6C-\uFE6F\uFE75\uFEFD-\uFF00\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF]/g,"."),e||(t=t.replace(/[\x09-\x10\u2028\u2029]/g,".")),t)}},{key:"escapeWhitespace",value:function(t){return t.replace(/[\x09-\x10]/g,(function(t){return String.fromCharCode(57344+t.charCodeAt(0))}))}},{key:"parseEscapedChars",value:function(t){return t.replace(/\\([abfnrtv'"]|[0-3][0-7]{2}|[0-7]{1,2}|x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]{1,6}\}|\\)/g,(function(t,e){switch(e[0]){case"\\":return"\\";case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":return String.fromCharCode(parseInt(e,8));case"a":return String.fromCharCode(7);case"b":return"\b";case"t":return"\t";case"n":return"\n";case"v":return"\v";case"f":return"\f";case"r":return"\r";case'"':return'"';case"'":return"'";case"x":return String.fromCharCode(parseInt(e.substr(1),16));case"u":return"{"===e[1]?String.fromCodePoint(parseInt(e.slice(2,-1),16)):String.fromCharCode(parseInt(e.substr(1),16))}}))}},{key:"escapeRegex",value:function(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}},{key:"expandAlphRange",value:function(t){for(var r=[],n=0;n=0;i--)r=256*r+t[i];return r}},{key:"intToByteArray",value:function(t,e,r){var n=new Array(e);if("little"===r)for(var i=0;i>>=8;else for(var s=e-1;s>=0;s--)n[s]=255&t,t>>>=8;return n}},{key:"strToArrayBuffer",value:function(t){if(x().debug(`Converting string[${null==t?void 0:t.length}] to array buffer`),!t)return new ArrayBuffer;for(var r,n=new Uint8Array(t.length),i=t.length;i--;)if(r=t.charCodeAt(i),n[i]=r,r>255)return e.strToUtf8ArrayBuffer(t);return n.buffer}},{key:"strToUtf8ArrayBuffer",value:function(t){if(x().debug(`Converting string[${null==t?void 0:t.length}] to UTF8 array buffer`),!t)return new ArrayBuffer;var e=new TextEncoder("utf-8").encode(t);return t.length!==e.length&&(O()&&self&&"function"==typeof self.setOption?self.setOption("attemptHighlight",!1):N()&&(window.app.options.attemptHighlight=!1)),e.buffer}},{key:"strToByteArray",value:function(t){if(x().debug(`Converting string[${null==t?void 0:t.length}] to byte array`),!t)return[];for(var r,n=new Array(t.length),i=t.length;i--;)if(r=t.charCodeAt(i),n[i]=r,r>255)return e.strToUtf8ByteArray(t);return n}},{key:"strToUtf8ByteArray",value:function(t){if(x().debug(`Converting string[${null==t?void 0:t.length}] to UTF8 byte array`),!t)return[];var r=b().encode(t);return t.length!==r.length&&(O()?self.setOption("attemptHighlight",!1):N()&&(window.app.options.attemptHighlight=!1)),e.strToByteArray(r)}},{key:"strToCharcode",value:function(t){if(x().debug(`Converting string[${null==t?void 0:t.length}] to charcode`),!t)return[];for(var r=[],n=0;n=55296&&i<56320){var s=t[n+1].charCodeAt(0);s>=56320&&s<57344&&(i=e.ord(t[n]+t[++n]))}r.push(i)}return r}},{key:"byteArrayToUtf8",value:function(t){var r;if(x().debug(`Converting byte array[${null===(r=t)||void 0===r?void 0:r.length}] to UTF8`),!t||!t.length)return"";t instanceof Uint8Array||(t=new Uint8Array(t));try{var n=new TextDecoder("utf-8",{fatal:!0}).decode(t);return n.length!==t.length&&(O()?self.setOption("attemptHighlight",!1):N()&&(window.app.options.attemptHighlight=!1)),n}catch(r){return e.byteArrayToChars(t)}}},{key:"byteArrayToChars",value:function(t){if(x().debug(`Converting byte array[${null==t?void 0:t.length}] to chars`),!t||!t.length)return"";for(var e="",r=0;r1&&void 0!==arguments[1])||arguments[1];if(x().debug(`Converting array buffer[${null==t?void 0:t.byteLength}] to str`),!t||!t.byteLength)return"";var n=new Uint8Array(t);return r?e.byteArrayToUtf8(n):e.byteArrayToChars(n)}},{key:"calculateShannonEntropy",value:function(t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var e,r=[],n=new Array(256).fill(0);for(e=0;e0&&r.push(n[e]/t.length);var i,s=0;for(e=0;e1&&void 0!==arguments[1]?arguments[1]:[","],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["\n","\r"],s=!1,a=!1,o="",u=[],h=[];t.length&&"\ufeff"===t[0]&&(t=t.substr(1));for(var c=0;c=0?(u.push(o),o=""):!a&&i.indexOf(e)>=0?(u.push(o),o="",h.push(u),u=[],i.indexOf(r)>=0&&r!==e&&c++):o+=e:a=!0;return u.length&&(u.push(o),h.push(u)),h}},{key:"stripHtmlTags",value:function(t){function e(t,r){var n=r.replace(t,"");return n.length===r.length?n:e(t,n)}return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&(t=e(/]*>(\s|\S)*?<\/script[^>]*>/gi,t),t=e(/]*>(\s|\S)*?<\/style[^>]*>/gi,t)),e(/<[^>]+>/g,t)}},{key:"escapeHtml",value:function(t){var e={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","\0":""};return t?t.replace(/[&<>"'`\u0000]/g,(function(t){return e[t]})):t}},{key:"unescapeHtml",value:function(t){var e={"&":"&","<":"<",">":">",""":'"',"'":"'","/":"/","`":"`","":"\0"};return t.replace(/(&#?x?[a-z0-9]{2,4};|\ue000)/gi,(function(t){return e[t]||t}))}},{key:"toTitleCase",value:function(t){return t.replace(/\w\S*/g,(function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}))}},{key:"encodeURIFragment",value:function(t){var e={"%2D":"-","%2E":".","%5F":"_","%7E":"~","%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2C":",","%3B":";","%3A":":","%40":"@","%2F":"/","%3F":"?"};return(t=encodeURIComponent(t)).replace(/%[0-9A-F]{2}/g,(function(t){return e[t]||t}))}},{key:"generatePrettyRecipe",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r="",n="",i="",s="",a="";return t.forEach((function(t){n=t.op.replace(/ /g,"_"),i=JSON.stringify(t.args).slice(1,-1).replace(/'/g,"\\'").replace(/"((?:[^"\\]|\\.)*)"/g,"'$1'").replace(/\\"/g,'"'),s=t.disabled?"/disabled":"",a=t.breakpoint?"/breakpoint":"",r+=`${n}(${i}${s}${a})`,e&&(r+="\n")})),r}},{key:"parseRecipeConfig",value:function(t){if(0===(t=t.trim()).length)return[];if("["===t[0])return JSON.parse(t);var e,r;t=t.replace(/\n/g,"");for(var n=/([^(]+)\(((?:'[^'\\]*(?:\\.[^'\\]*)*'|[^)/'])*)(\/[^)]+)?\)/g,i=[];e=n.exec(t);){r="["+(r=e[2].replace(/"/g,'\\"').replace(/(^|,|{|:)'/g,'$1"').replace(/([^\\]|(?:\\\\)+)'(,|:|}|$)/g,'$1"$2').replace(/\\'/g,"'"))+"]";var s={op:e[1].replace(/_/g," "),args:JSON.parse(r)};e[3]&&e[3].indexOf("disabled")>0&&(s.disabled=!0),e[3]&&e[3].indexOf("breakpoint")>0&&(s.breakpoint=!0),i.push(s)}return i}},{key:"displayFilesAsHTML",value:(r=f(g().mark((function t(r){var n,i,s,a,o;return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=function(t){return`
\n
\n
\n ${e.escapeHtml(t.name)}\n
\n
\n
`},i=function(t,r){if(r.startsWith("image")){var n="data:";return n+=r+";",""}return`
${e.escapeHtml(e.arrayBufferToStr(t.buffer))}
`},s=function(){var t=f(g().mark((function t(r,n){var s,a,o,u;return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.readFile(r);case 2:return s=t.sent,a=new Blob([s],{type:r.type||"octet/stream"}),o=URL.createObjectURL(a),u=`
\n
\n
\n \n \n ${r.size.toLocaleString()} bytes\n \n save\n \n \n open_in_browser\n \n \n
\n
\n
\n
\n ${i(s,r.type)}\n
\n
\n
`,t.abrupt("return",u);case 7:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),a=`
\n ${r.length} file(s) found\n
`,o=0;case 5:if(!(o=t.size)e(i);else{var r=t.slice(s,s+a);n.readAsArrayBuffer(r)}};n.onload=function(t){i.set(new Uint8Array(n.result),s),s+=a,o()},n.onerror=function(t){r(n.error.message)},o()}))}},{key:"readFileSync",value:function(t){if(!k())throw new TypeError("Browser environment cannot support readFileSync");return Uint8Array.from(t.data).buffer}},{key:"mod",value:function(t,e){return(t%e+e)%e}},{key:"gcd",value:function(t,r){return r?e.gcd(r,t%r):t}},{key:"modInv",value:function(t,e){t%=e;for(var r=1;rt?String(this):((t-=this.length)>e.length&&(e+=e.repeat(t/e.length)),e.slice(0,t)+String(this))}),String.prototype.padEnd||(String.prototype.padEnd=function(t,e){return t|=0,e=String(void 0!==e?e:" "),this.length>t?String(this):((t-=this.length)>e.length&&(e+=e.repeat(t/e.length)),String(this)+e.slice(0,t))});const L=function(e){function r(){var e,n,i,s;t(this,r);for(var u=arguments.length,h=new Array(u),c=0;c0||t===e?e:e-1}function Y(t){for(var e,r,n=1,i=t.length,s=t[0]+"";nh^r?1:-1;for(o=(u=i.length)<(h=s.length)?u:h,a=0;as[a]^r?1:-1;return u==h?0:u>h^r?1:-1}function Q(t,e,r,n){if(tr||t!==M(t))throw Error(K+(n||"Argument")+("number"==typeof t?tr?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function tt(t){var e=t.c.length-1;return X(t.e/W)==e&&t.c[e]%2!=0}function et(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function rt(t,e,r){var n,i;if(e<0){for(i=r+".";++e;i+=r);t=i+t}else if(++e>(n=t.length)){for(i=r,e-=n;--e;i+=r);t+=i}else ex?f.c=f.e=null:t.e=10;u/=10,o++);return void(o>x?f.c=f.e=null:(f.e=o,f.c=[t]))}l=String(t)}else{if(!V.test(l=String(t)))return i(f,l,h);f.s=45==l.charCodeAt(0)?(l=l.slice(1),-1):1}(o=l.indexOf("."))>-1&&(l=l.replace(".","")),(u=l.search(/e/i))>0?(o<0&&(o=u),o+=+l.slice(u+1),l=l.substring(0,u)):o<0&&(o=l.length)}else{if(Q(e,2,F.length,"Base"),10==e&&A)return P(f=new C(t),g+f.e+1,d);if(l=String(t),h="number"==typeof t){if(0*t!=0)return i(f,l,h,e);if(f.s=1/t<0?(l=l.slice(1),-1):1,C.DEBUG&&l.replace(/^0\.0*|\./,"").length>15)throw Error(_+t)}else f.s=45===l.charCodeAt(0)?(l=l.slice(1),-1):1;for(r=F.slice(0,e),o=u=0,c=l.length;uo){o=c;continue}}else if(!a&&(l==l.toUpperCase()&&(l=l.toLowerCase())||l==l.toLowerCase()&&(l=l.toUpperCase()))){a=!0,u=-1,o=0;continue}return i(f,String(t),h,e)}h=!1,(o=(l=n(l,e,10,f.s)).indexOf("."))>-1?l=l.replace(".",""):o=l.length}for(u=0;48===l.charCodeAt(u);u++);for(c=l.length;48===l.charCodeAt(--c););if(l=l.slice(u,++c)){if(c-=u,h&&C.DEBUG&&c>15&&(t>$||t!==M(t)))throw Error(_+f.s*t);if((o=o-u-1)>x)f.c=f.e=null;else if(o=y)?et(u,a):rt(u,a,"0");else if(s=(t=P(new C(t),e,r)).e,o=(u=Y(t.c)).length,1==n||2==n&&(e<=s||s<=v)){for(;oo){if(--e>0)for(u+=".";e--;u+="0");}else if((e+=s-o)>0)for(s+1==o&&(u+=".");e--;u+="0");return t.s<0&&i?"-"+u:u}function I(t,e){for(var r,n,i=1,s=new C(t[0]);i=10;i/=10,n++);return(r=n+r*W-1)>x?t.c=t.e=null:r=10;o/=10,i++);if((s=e-i)<0)s+=W,a=e,u=l[h=0],c=M(u/f[i-a-1]%10);else if((h=U((s+1)/W))>=l.length){if(!n)break t;for(;l.length<=h;l.push(0));u=c=0,i=1,a=(s%=W)-W+1}else{for(u=o=l[h],i=1;o>=10;o/=10,i++);c=(a=(s%=W)-W+i)<0?0:M(u/f[i-a-1]%10)}if(n=n||e<0||null!=l[h+1]||(a<0?u:u%f[i-a-1]),n=r<4?(c||n)&&(0==r||r==(t.s<0?3:2)):c>5||5==c&&(4==r||n||6==r&&(s>0?a>0?u/f[i-a]:0:l[h-1])%10&1||r==(t.s<0?8:7)),e<1||!l[0])return l.length=0,n?(e-=t.e+1,l[0]=f[(W-e%W)%W],t.e=-e||0):l[0]=t.e=0,t;if(0==s?(l.length=h,o=1,h--):(l.length=h+1,o=f[W-s],l[h]=a>0?M(u/f[i-a]%f[a])*o:0),n)for(;;){if(0==h){for(s=1,a=l[0];a>=10;a/=10,s++);for(a=l[0]+=o,o=1;a>=10;a/=10,o++);s!=o&&(t.e++,l[0]==q&&(l[0]=1));break}if(l[h]+=o,l[h]!=q)break;l[h--]=0,o=1}for(s=l.length;0===l[--s];l.pop());}t.e>x?t.c=t.e=null:t.e=y?et(e,r):rt(e,r,"0"),t.s<0?"-"+e:e)}return C.clone=t,C.ROUND_UP=0,C.ROUND_DOWN=1,C.ROUND_CEIL=2,C.ROUND_FLOOR=3,C.ROUND_HALF_UP=4,C.ROUND_HALF_DOWN=5,C.ROUND_HALF_EVEN=6,C.ROUND_HALF_CEIL=7,C.ROUND_HALF_FLOOR=8,C.EUCLID=9,C.config=C.set=function(t){var e,r;if(null!=t){if("object"!=typeof t)throw Error(K+"Object expected: "+t);if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(Q(r=t[e],0,J,e),g=r),t.hasOwnProperty(e="ROUNDING_MODE")&&(Q(r=t[e],0,8,e),d=r),t.hasOwnProperty(e="EXPONENTIAL_AT")&&((r=t[e])&&r.pop?(Q(r[0],-J,0,e),Q(r[1],0,J,e),v=r[0],y=r[1]):(Q(r,-J,J,e),v=-(y=r<0?-r:r))),t.hasOwnProperty(e="RANGE"))if((r=t[e])&&r.pop)Q(r[0],-J,-1,e),Q(r[1],1,J,e),m=r[0],x=r[1];else{if(Q(r,-J,J,e),!r)throw Error(K+e+" cannot be zero: "+r);m=-(x=r<0?-r:r)}if(t.hasOwnProperty(e="CRYPTO")){if((r=t[e])!==!!r)throw Error(K+e+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw w=!r,Error(K+"crypto unavailable");w=r}else w=r}if(t.hasOwnProperty(e="MODULO_MODE")&&(Q(r=t[e],0,9,e),b=r),t.hasOwnProperty(e="POW_PRECISION")&&(Q(r=t[e],0,J,e),S=r),t.hasOwnProperty(e="FORMAT")){if("object"!=typeof(r=t[e]))throw Error(K+e+" not an object: "+r);E=r}if(t.hasOwnProperty(e="ALPHABET")){if("string"!=typeof(r=t[e])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(K+e+" invalid: "+r);A="0123456789"==r.slice(0,10),F=r}}return{DECIMAL_PLACES:g,ROUNDING_MODE:d,EXPONENTIAL_AT:[v,y],RANGE:[m,x],CRYPTO:w,MODULO_MODE:b,POW_PRECISION:S,FORMAT:E,ALPHABET:F}},C.isBigNumber=function(t){if(!t||!0!==t._isBigNumber)return!1;if(!C.DEBUG)return!0;var e,r,n=t.c,i=t.e,s=t.s;t:if("[object Array]"=={}.toString.call(n)){if((1===s||-1===s)&&i>=-J&&i<=J&&i===M(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break t}if((e=(i+1)%W)<1&&(e+=W),String(n[0]).length==e){for(e=0;e=q||r!==M(r))break t;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===s||1===s||-1===s))return!0;throw Error(K+"Invalid BigNumber: "+t)},C.maximum=C.max=function(){return I(arguments,-1)},C.minimum=C.min=function(){return I(arguments,1)},C.random=(s=9007199254740992,a=Math.random()*s&2097151?function(){return M(Math.random()*s)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(t){var e,r,n,i,s,o=0,u=[],h=new C(p);if(null==t?t=g:Q(t,0,J),i=U(t/W),w)if(crypto.getRandomValues){for(e=crypto.getRandomValues(new Uint32Array(i*=2));o>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),e[o]=r[0],e[o+1]=r[1]):(u.push(s%1e14),o+=2);o=i/2}else{if(!crypto.randomBytes)throw w=!1,Error(K+"crypto unavailable");for(e=crypto.randomBytes(i*=7);o=9e15?crypto.randomBytes(7).copy(e,o):(u.push(s%1e14),o+=7);o=i/7}if(!w)for(;o=10;s/=10,o++);or-1&&(null==a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/r|0,a[i]%=r)}return a.reverse()}return function(n,i,s,a,o){var u,h,c,l,f,p,v,y,m=n.indexOf("."),x=g,w=d;for(m>=0&&(l=S,S=0,n=n.replace(".",""),p=(y=new C(i)).pow(n.length-m),S=l,y.c=e(rt(Y(p.c),p.e,"0"),10,s,t),y.e=y.c.length),c=l=(v=e(n,i,s,o?(u=F,t):(u=t,F))).length;0==v[--l];v.pop());if(!v[0])return u.charAt(0);if(m<0?--c:(p.c=v,p.e=c,p.s=a,v=(p=r(p,y,x,w,s)).c,f=p.r,c=p.e),m=v[h=c+x+1],l=s/2,f=f||h<0||null!=v[h+1],f=w<4?(null!=m||f)&&(0==w||w==(p.s<0?3:2)):m>l||m==l&&(4==w||f||6==w&&1&v[h-1]||w==(p.s<0?8:7)),h<1||!v[0])n=f?rt(u.charAt(1),-x,u.charAt(0)):u.charAt(0);else{if(v.length=h,f)for(--s;++v[--h]>s;)v[h]=0,h||(++c,v=[1].concat(v));for(l=v.length;!v[--l];);for(m=0,n="";m<=l;n+=u.charAt(v[m++]));n=rt(n,c,u.charAt(0))}return n}}(),r=function(){function t(t,e,r){var n,i,s,a,o=0,u=t.length,h=e%z,c=e/z|0;for(t=t.slice();u--;)o=((i=h*(s=t[u]%z)+(n=c*s+(a=t[u]/z|0)*h)%z*z+o)/r|0)+(n/z|0)+c*a,t[u]=i%r;return o&&(t=[o].concat(t)),t}function e(t,e,r,n){var i,s;if(r!=n)s=r>n?1:-1;else for(i=s=0;ie[i]?1:-1;break}return s}function r(t,e,r,n){for(var i=0;r--;)t[r]-=i,i=t[r]1;t.splice(0,1));}return function(n,i,s,a,o){var u,h,c,l,f,p,g,d,v,y,m,x,w,b,S,E,F,A=n.s==i.s?1:-1,B=n.c,I=i.c;if(!(B&&B[0]&&I&&I[0]))return new C(n.s&&i.s&&(B?!I||B[0]!=I[0]:I)?B&&0==B[0]||!I?0*A:A/0:NaN);for(v=(d=new C(A)).c=[],A=s+(h=n.e-i.e)+1,o||(o=q,h=X(n.e/W)-X(i.e/W),A=A/W|0),c=0;I[c]==(B[c]||0);c++);if(I[c]>(B[c]||0)&&h--,A<0)v.push(1),l=!0;else{for(b=B.length,E=I.length,c=0,A+=2,(f=M(o/(I[0]+1)))>1&&(I=t(I,f,o),B=t(B,f,o),E=I.length,b=B.length),w=E,m=(y=B.slice(0,E)).length;m=o/2&&S++;do{if(f=0,(u=e(I,y,E,m))<0){if(x=y[0],E!=m&&(x=x*o+(y[1]||0)),(f=M(x/S))>1)for(f>=o&&(f=o-1),g=(p=t(I,f,o)).length,m=y.length;1==e(p,y,g,m);)f--,r(p,E=10;A/=10,c++);P(d,s+(d.e=c+h*W-1)+1,a,l)}else d.e=h,d.r=+l;return d}}(),o=/^(-?)0([xbo])(?=\w[\w.]*$)/i,u=/^([^.]+)\.$/,h=/^\.([^.]+)$/,c=/^-?(Infinity|NaN)$/,l=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(t,e,r,n){var i,s=r?e:e.replace(l,"");if(c.test(s))t.s=isNaN(s)?null:s<0?-1:1;else{if(!r&&(s=s.replace(o,(function(t,e,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?t:e})),n&&(i=n,s=s.replace(u,"$1").replace(h,"0.$1")),e!=s))return new C(s,i);if(C.DEBUG)throw Error(K+"Not a"+(n?" base "+n:"")+" number: "+e);t.s=null}t.c=t.e=null},f.absoluteValue=f.abs=function(){var t=new C(this);return t.s<0&&(t.s=1),t},f.comparedTo=function(t,e){return Z(this,new C(t,e))},f.decimalPlaces=f.dp=function(t,e){var r,n,i,s=this;if(null!=t)return Q(t,0,J),null==e?e=d:Q(e,0,8),P(new C(s),t+s.e+1,e);if(!(r=s.c))return null;if(n=((i=r.length-1)-X(this.e/W))*W,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},f.dividedBy=f.div=function(t,e){return r(this,new C(t,e),g,d)},f.dividedToIntegerBy=f.idiv=function(t,e){return r(this,new C(t,e),0,1)},f.exponentiatedBy=f.pow=function(t,e){var r,n,i,s,a,o,u,h,c=this;if((t=new C(t)).c&&!t.isInteger())throw Error(K+"Exponent not an integer: "+R(t));if(null!=e&&(e=new C(e)),a=t.e>14,!c.c||!c.c[0]||1==c.c[0]&&!c.e&&1==c.c.length||!t.c||!t.c[0])return h=new C(Math.pow(+R(c),a?t.s*(2-tt(t)):+R(t))),e?h.mod(e):h;if(o=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new C(NaN);(n=!o&&c.isInteger()&&e.isInteger())&&(c=c.mod(e))}else{if(t.e>9&&(c.e>0||c.e<-1||(0==c.e?c.c[0]>1||a&&c.c[1]>=24e7:c.c[0]<8e13||a&&c.c[0]<=9999975e7)))return s=c.s<0&&tt(t)?-0:0,c.e>-1&&(s=1/s),new C(o?1/s:s);S&&(s=U(S/W+2))}for(a?(r=new C(.5),o&&(t.s=1),u=tt(t)):u=(i=Math.abs(+R(t)))%2,h=new C(p);;){if(u){if(!(h=h.times(c)).c)break;s?h.c.length>s&&(h.c.length=s):n&&(h=h.mod(e))}if(i){if(0===(i=M(i/2)))break;u=i%2}else if(P(t=t.times(r),t.e+1,1),t.e>14)u=tt(t);else{if(0==(i=+R(t)))break;u=i%2}c=c.times(c),s?c.c&&c.c.length>s&&(c.c.length=s):n&&(c=c.mod(e))}return n?h:(o&&(h=p.div(h)),e?h.mod(e):s?P(h,S,d,void 0):h)},f.integerValue=function(t){var e=new C(this);return null==t?t=d:Q(t,0,8),P(e,e.e+1,t)},f.isEqualTo=f.eq=function(t,e){return 0===Z(this,new C(t,e))},f.isFinite=function(){return!!this.c},f.isGreaterThan=f.gt=function(t,e){return Z(this,new C(t,e))>0},f.isGreaterThanOrEqualTo=f.gte=function(t,e){return 1===(e=Z(this,new C(t,e)))||0===e},f.isInteger=function(){return!!this.c&&X(this.e/W)>this.c.length-2},f.isLessThan=f.lt=function(t,e){return Z(this,new C(t,e))<0},f.isLessThanOrEqualTo=f.lte=function(t,e){return-1===(e=Z(this,new C(t,e)))||0===e},f.isNaN=function(){return!this.s},f.isNegative=function(){return this.s<0},f.isPositive=function(){return this.s>0},f.isZero=function(){return!!this.c&&0==this.c[0]},f.minus=function(t,e){var r,n,i,s,a=this,o=a.s;if(e=(t=new C(t,e)).s,!o||!e)return new C(NaN);if(o!=e)return t.s=-e,a.plus(t);var u=a.e/W,h=t.e/W,c=a.c,l=t.c;if(!u||!h){if(!c||!l)return c?(t.s=-e,t):new C(l?a:NaN);if(!c[0]||!l[0])return l[0]?(t.s=-e,t):new C(c[0]?a:3==d?-0:0)}if(u=X(u),h=X(h),c=c.slice(),o=u-h){for((s=o<0)?(o=-o,i=c):(h=u,i=l),i.reverse(),e=o;e--;i.push(0));i.reverse()}else for(n=(s=(o=c.length)<(e=l.length))?o:e,o=e=0;e0)for(;e--;c[r++]=0);for(e=q-1;n>o;){if(c[--n]=0;){for(r=0,f=x[i]%v,p=x[i]/v|0,s=i+(a=u);s>i;)r=((h=f*(h=m[--a]%v)+(o=p*h+(c=m[a]/v|0)*f)%v*v+g[s]+r)/d|0)+(o/v|0)+p*c,g[s--]=h%d;g[s]=r}return r?++n:g.splice(0,1),D(t,g,n)},f.negated=function(){var t=new C(this);return t.s=-t.s||null,t},f.plus=function(t,e){var r,n=this,i=n.s;if(e=(t=new C(t,e)).s,!i||!e)return new C(NaN);if(i!=e)return t.s=-e,n.minus(t);var s=n.e/W,a=t.e/W,o=n.c,u=t.c;if(!s||!a){if(!o||!u)return new C(i/0);if(!o[0]||!u[0])return u[0]?t:new C(o[0]?n:0*i)}if(s=X(s),a=X(a),o=o.slice(),i=s-a){for(i>0?(a=s,r=u):(i=-i,r=o),r.reverse();i--;r.push(0));r.reverse()}for((i=o.length)-(e=u.length)<0&&(r=u,u=o,o=r,e=i),i=0;e;)i=(o[--e]=o[e]+u[e]+i)/q|0,o[e]=q===o[e]?0:o[e]%q;return i&&(o=[i].concat(o),++a),D(t,o,a)},f.precision=f.sd=function(t,e){var r,n,i,s=this;if(null!=t&&t!==!!t)return Q(t,1,J),null==e?e=d:Q(e,0,8),P(new C(s),t,e);if(!(r=s.c))return null;if(n=(i=r.length-1)*W+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return t&&s.e+1>n&&(n=s.e+1),n},f.shiftedBy=function(t){return Q(t,-9007199254740991,$),this.times("1e"+t)},f.squareRoot=f.sqrt=function(){var t,e,n,i,s,a=this,o=a.c,u=a.s,h=a.e,c=g+4,l=new C("0.5");if(1!==u||!o||!o[0])return new C(!u||u<0&&(!o||o[0])?NaN:o?a:1/0);if(0==(u=Math.sqrt(+R(a)))||u==1/0?(((e=Y(o)).length+h)%2==0&&(e+="0"),u=Math.sqrt(+e),h=X((h+1)/2)-(h<0||h%2),n=new C(e=u==1/0?"5e"+h:(e=u.toExponential()).slice(0,e.indexOf("e")+1)+h)):n=new C(u+""),n.c[0])for((u=(h=n.e)+c)<3&&(u=0);;)if(s=n,n=l.times(s.plus(r(a,s,c,1))),Y(s.c).slice(0,u)===(e=Y(n.c)).slice(0,u)){if(n.e0&&g>0){for(s=g%o||o,c=p.substr(0,s);s0&&(c+=h+p.slice(s)),f&&(c="-"+c)}n=l?c+(r.decimalSeparator||"")+((u=+r.fractionGroupSize)?l.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):l):c}return(r.prefix||"")+n+(r.suffix||"")},f.toFraction=function(t){var e,n,i,s,a,o,u,h,c,l,f,g,v=this,y=v.c;if(null!=t&&(!(u=new C(t)).isInteger()&&(u.c||1!==u.s)||u.lt(p)))throw Error(K+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+R(u));if(!y)return new C(v);for(e=new C(p),c=n=new C(p),i=h=new C(p),g=Y(y),a=e.e=g.length-v.e-1,e.c[0]=G[(o=a%W)<0?W+o:o],t=!t||u.comparedTo(e)>0?a>0?e:c:u,o=x,x=1/0,u=new C(g),h.c[0]=0;l=r(u,e,0,1),1!=(s=n.plus(l.times(i))).comparedTo(t);)n=i,i=s,c=h.plus(l.times(s=c)),h=s,e=u.minus(l.times(s=e)),u=s;return s=r(t.minus(n),i,0,1),h=h.plus(s.times(c)),n=n.plus(s.times(i)),h.s=c.s=v.s,f=r(c,i,a*=2,d).minus(v).abs().comparedTo(r(h,n,a,d).minus(v).abs())<1?[c,i]:[h,n],x=o,f},f.toNumber=function(){return+R(this)},f.toPrecision=function(t,e){return null!=t&&Q(t,1,J),B(this,t,e,2)},f.toString=function(t){var e,r=this,i=r.s,s=r.e;return null===s?i?(e="Infinity",i<0&&(e="-"+e)):e="NaN":(null==t?e=s<=v||s>=y?et(Y(r.c),s):rt(Y(r.c),s,"0"):10===t&&A?e=rt(Y((r=P(new C(r),g+s+1,d)).c),r.e,"0"):(Q(t,2,F.length,"Base"),e=n(rt(Y(r.c),s,"0"),10,t,i,!0)),i<0&&r.c[0]&&(e="-"+e)),e},f.valueOf=f.toJSON=function(){return R(this)},f._isBigNumber=!0,f[Symbol.toStringTag]="BigNumber",f[Symbol.for("nodejs.util.inspect.custom")]=f.valueOf,null!=e&&C.set(e),C}();const it=nt;function st(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,s,a,o=[],u=!0,h=!1;try{if(s=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=s.call(r)).done)&&(o.push(n.value),o.length!==e);u=!0);}catch(t){h=!0,i=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(h)throw i}}return o}}(t,e)||v(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var at=function(){function e(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t(this,e),this.bytes=r,this.length=this.bytes.length,this.position=n,this.bitPos=i}return s(e,[{key:"clone",value:function(){return new e(this.bytes,this.position,this.bitPos)}},{key:"getBytes",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!(this.position>this.length)){var e=null!==t?this.position+t:this.length,r=this.bytes.slice(this.position,e);return this.position=e,this.bitPos=0,r}}},{key:"readString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(!(this.position>this.length)){-1===t&&(t=this.length-this.position);for(var e="",r=this.position;r1&&void 0!==arguments[1]?arguments[1]:"be";if(!(this.position>this.length)){var r=0;if("be"===e)for(var n=this.position;n=this.position;i--)r<<=8,r|=this.bytes[i];return this.position+=t,this.bitPos=0,r}}},{key:"readBits",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"be";if(!(this.position>this.length)){var r,n=0,i=0;for(n=this.bytes[this.position++]&(r=this.bitPos,"be"===e?(1<<8-r)-1:256-(1<>>=this.bitPos),i=8-this.bitPos,this.bitPos=0;it){var s=i-t;"be"===e?n>>>=s:n&=(1<this.length))if(this.bitPos=0,"number"!=typeof t){var e=t.length,r=t[e-1];this.position=e;for(var n,i=function(t,e){var r=new Array;return t.forEach((function(t,n){r[t]=e-n})),r}(t,e);this.position=0;s--)if(this.bytes[this.position-e+s]!==t[s]){n=!1,this.position+=i[t[s]];break}if(n){this.position-=e;break}}}else for(;++this.positionthis.length)throw new Error("Cannot move to position "+e+" in stream. Out of bounds.");this.position=e,this.bitPos=0}},{key:"moveBackwardsBy",value:function(t){var e=this.position-t;if(e<0||e>this.length)throw new Error("Cannot move to position "+e+" in stream. Out of bounds.");this.position=e,this.bitPos=0}},{key:"moveBackwardsByBits",value:function(t){if(t<=this.bitPos)this.bitPos-=t;else for(this.bitPos>0&&(t-=this.bitPos,this.bitPos=0);t>0;)this.moveBackwardsBy(1),this.bitPos=8,this.moveBackwardsByBits(t),t-=8}},{key:"moveTo",value:function(t){if(t<0||t>this.length)throw new Error("Cannot move to position "+t+" in stream. Out of bounds.");this.position=t,this.bitPos=0}},{key:"hasMore",value:function(){return this.position0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.position;return this.bitPos>0&&e++,this.bytes.slice(t,e)}}])}();function ot(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return ut(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ut(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,o=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){o=!0,s=t},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw s}}}}function ut(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r>4],u=i[(15&a)>>2],h=(2&a)>>1;if("free"===o||"bad"===o||"reserved"===u){r.moveBackwardsBy(1);break}var c=Math.floor(144*o/u+h);if(r.position+c>r.length){r.moveTo(r.length);break}r.moveForwardsBy(c-3)}return r.carve()}},{name:"MPEG-4 Part 14 audio",extension:"m4a",mime:"audio/m4a",description:"",signature:[{4:102,5:116,6:121,7:112,8:77,9:52,10:65},{0:77,1:52,2:65,3:32}],extractor:null},{name:"Free Lossless Audio Codec",extension:"flac",mime:"audio/x-flac",description:"",signature:{0:102,1:76,2:97,3:67},extractor:null},{name:"Adaptive Multi-Rate audio codec",extension:"amr",mime:"audio/amr",description:"",signature:{0:35,1:33,2:65,3:77,4:82,5:10},extractor:null},{name:"Audacity",extension:"au",mime:"audio/x-au",description:"",signature:{0:100,1:110,2:115,3:46,24:65,25:117,26:100,27:97,28:99,29:105,30:116,31:121,32:66,33:108,34:111,35:99,36:107,37:70,38:105,39:108,40:101},extractor:null},{name:"Audacity Block",extension:"auf",mime:"application/octet-stream",description:"",signature:{0:65,1:117,2:100,3:97,4:99,5:105,6:116,7:121,8:66,9:108,10:111,11:99,12:107,13:70,14:105,15:108,16:101},extractor:null},{name:"Audio Interchange File",extension:"aif",mime:"audio/x-aiff",description:"",signature:{0:70,1:79,2:82,3:77,8:65,9:73,10:70,11:70},extractor:null},{name:"Audio Interchange File (compressed)",extension:"aifc",mime:"audio/x-aifc",description:"",signature:{0:70,1:79,2:82,3:77,8:65,9:73,10:70,11:67},extractor:null}],Documents:[{name:"Portable Document Format",extension:"pdf",mime:"application/pdf",description:"",signature:{0:37,1:80,2:68,3:70},extractor:function(t,e){var r=new at(t.slice(e));return r.continueUntil([37,37,69,79,70]),r.moveForwardsBy(5),r.consumeIf(13),r.consumeIf(10),r.carve()}},{name:"Portable Document Format (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:65,1:74,2:86,3:66,4:69,5:82,6:105},extractor:null},{name:"Adobe PostScript",extension:"ps,eps,ai,pfa",mime:"application/postscript",description:"",signature:{0:37,1:33,2:80,3:83,4:45,5:65,6:100,7:111,8:98,9:101},extractor:null},{name:"PostScript",extension:"ps",mime:"application/postscript",description:"",signature:{0:37,1:33},extractor:null},{name:"Encapsulated PostScript",extension:"eps,ai",mime:"application/eps",description:"",signature:{0:197,1:208,2:211,3:198},extractor:null},{name:"Rich Text Format",extension:"rtf",mime:"application/rtf",description:"",signature:{0:123,1:92,2:114,3:116},extractor:function(t,e){var r=new at(t.slice(e)),n=0;if(123!==r.readInt(1))throw new Error("Not a valid RTF file");for(n++;n>0&&r.hasMore();)switch(r.readInt(1)){case 123:n++;break;case 125:n--;break;case 92:r.consumeIf(92),r.position++}return r.carve()}},{name:"Microsoft Office document/OLE2",extension:"ole2,doc,xls,dot,ppt,xla,ppa,pps,pot,msi,sdw,db,vsd,msg",mime:"application/msword,application/vnd.ms-excel,application/vnd.ms-powerpoint",description:"Microsoft Office documents",signature:{0:208,1:207,2:17,3:224,4:161,5:177,6:26,7:225},extractor:null},{name:"Microsoft Office document/OLE2 (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:48,1:77,2:56,3:82,4:52,5:75,6:71,7:120},extractor:null},{name:"Microsoft Office 2007+ document",extension:"docx,xlsx,pptx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.presentationml.presentation",description:"",signature:{38:95,39:84,40:121,41:112,42:101,43:115,44:93,45:46,46:120,47:109,48:108},extractor:ct},{name:"Microsoft Access database",extension:"mdb,mda,mde,mdt,fdb,psa",mime:"application/msaccess",description:"",signature:{0:0,1:1,2:0,3:0,4:83,5:116,6:97,7:110,8:100,9:97,10:114,11:100,12:32,13:74,14:101,15:116},extractor:null},{name:"Microsoft Access 2007+ database",extension:"accdb,accde,accda,accdu",mime:"application/msaccess",description:"",signature:{0:0,1:1,2:0,3:0,4:83,5:116,6:97,7:110,8:100,9:97,10:114,11:100,12:32,13:65,14:67,15:69,16:32},extractor:null},{name:"Microsoft OneNote document",extension:"one",mime:"application/onenote",description:"",signature:{0:228,1:82,2:92,3:123,4:140,5:216,6:167,7:77,8:174,9:177,10:83,11:120,12:208,13:41,14:150,15:211},extractor:null},{name:"Outlook Express database",extension:"dbx",mime:"application/octet-stream",description:"",signature:{0:207,1:173,2:18,3:254,4:[48,197,198,199],11:17},extractor:null},{name:"Personal Storage Table (Outlook)",extension:"pst,ost,fdb,pab",mime:"application/octet-stream",description:"",signature:{0:33,1:66,2:68,3:78},extractor:null},{name:"Microsoft Exchange Database",extension:"edb",mime:"application/octet-stream",description:"",signature:{4:239,5:205,6:171,7:137,8:[32,35],9:6,10:0,11:0,12:[0,1],13:0,14:0,15:0},extractor:null},{name:"WordPerfect document",extension:"wpd,wp,wp5,wp6,wpp,bk!,wcm",mime:"application/wordperfect",description:"",signature:{0:255,1:87,2:80,3:67,7:[0,1,2],8:1,9:10},extractor:null},{name:"EPUB e-book",extension:"epub",mime:"application/epub+zip",description:"",signature:{0:80,1:75,2:3,3:4,30:109,31:105,32:109,33:101,34:116,35:121,36:112,37:101,38:97,39:112,40:112,41:108,42:105,43:99,44:97,45:116,46:105,47:111,48:110,49:47,50:101,51:112,52:117,53:98,54:43,55:122,56:105,57:112},extractor:ct}],Applications:[{name:"Windows Portable Executable",extension:"exe,dll,drv,vxd,sys,ocx,vbx,com,fon,scr",mime:"application/vnd.microsoft.portable-executable",description:"",signature:{0:77,1:90,3:[0,1,2],5:[0,1,2]},extractor:function(t,e){var r=new at(t.slice(e));r.moveTo(60);var n=r.readInt(4,"le");r.moveTo(n),r.moveForwardsBy(6);var i=r.readInt(2,"le");r.moveForwardsBy(16);var s=523===r.readInt(2,"le")?112:96;r.moveForwardsBy(s-2),r.moveForwardsBy(32);var a=r.readInt(4,"le"),o=r.readInt(4,"le");if(a>0)return r.moveTo(a+o),r.carve();r.moveForwardsBy(88),r.moveForwardsBy(40*(i-1)),r.moveForwardsBy(16);var u=r.readInt(4,"le"),h=r.readInt(4,"le");return r.moveTo(h+u),r.carve()}},{name:"Executable and Linkable Format",extension:"elf,bin,axf,o,prx,so",mime:"application/x-executable",description:"Executable and Linkable Format file. No standard file extension.",signature:{0:127,1:69,2:76,3:70},extractor:function(t,e){var r=new at(t.slice(e));r.moveForwardsBy(4);var n=1===r.readInt(1),i=1===r.readInt(1)?"le":"be";r.moveForwardsBy(n?26:34);var s=n?r.readInt(4,i):r.readInt(8,i);r.moveForwardsBy(10);var a=r.readInt(2,i),o=r.readInt(2,i);return r.moveTo(s),r.moveForwardsBy(a*o),r.carve()}},{name:"MacOS Mach-O object",extension:"dylib",mime:"application/octet-stream",description:"",signature:[{0:202,1:254,2:186,3:190,4:0,5:0,6:0,7:[1,2,3]},{0:206,1:250,2:237,3:254,4:7,5:0,6:0,7:0,8:[1,2,3]}],extractor:lt},{name:"MacOS Mach-O 64-bit object",extension:"dylib",mime:"application/octet-stream",description:"",signature:{0:207,1:250,2:237,3:254},extractor:lt},{name:"Adobe Flash",extension:"swf",mime:"application/x-shockwave-flash",description:"",signature:{0:[67,70],1:87,2:83},extractor:null},{name:"Java Class",extension:"class",mime:"application/java-vm",description:"",signature:{0:202,1:254,2:186,3:190},extractor:null},{name:"Dalvik Executable",extension:"dex",mime:"application/octet-stream",description:"Dalvik Executable as used by Android",signature:{0:100,1:101,2:120,3:10,4:48,5:51,6:53,7:0},extractor:null},{name:"Google Chrome Extension",extension:"crx",mime:"application/crx",description:"Google Chrome extension or packaged app",signature:{0:67,1:114,2:50,3:52},extractor:null}],Archives:[{name:"PKZIP archive",extension:"zip",mime:"application/zip",description:"",signature:{0:80,1:75,2:[3,5,7],3:[4,6,8]},extractor:ct},{name:"PKZIP archive (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:85,1:69,2:115,3:68,4:66,5:66},extractor:null},{name:"TAR archive",extension:"tar",mime:"application/x-tar",description:"",signature:{257:117,258:115,259:116,260:97,261:114},extractor:function(t,e){for(var r=new at(t.slice(e)),n=function(){if(r.moveForwardsBy(257),r.getBytes(5).join("")!==[117,115,116,97,114].join(""))return r.moveBackwardsBy(262),1;r.moveBackwardsBy(138);var t=0;r.getBytes(11).forEach((function(e,r){t+=(e-48).toString()})),t=512*Math.ceil(parseInt(t,8)/512),r.moveForwardsBy(t+377)};r.hasMore()&&!n(););return r.consumeWhile(0),r.carve()}},{name:"Roshal Archive",extension:"rar",mime:"application/x-rar-compressed",description:"",signature:{0:82,1:97,2:114,3:33,4:26,5:7,6:[0,1]},extractor:null},{name:"Gzip",extension:"gz",mime:"application/gzip",description:"",signature:{0:31,1:139,2:8},extractor:function(t,e){var r=new at(t.slice(e));r.moveForwardsBy(3);var n=r.readInt(1);if(r.moveForwardsBy(4),r.readInt(1),r.moveForwardsBy(1),4&n){var i=r.readInt(2,"le");r.moveForwardsby(i)}return 8&n&&(r.continueUntil(0),r.moveForwardsBy(1)),16&n&&(r.continueUntil(0),r.moveForwardsBy(1)),2&n&&r.moveForwardsBy(2),yt(r),r.moveForwardsBy(8),r.carve()}},{name:"Bzip2",extension:"bz2",mime:"application/x-bzip2",description:"",signature:{0:66,1:90,2:104},extractor:function(t,e){for(var r=new at(t.slice(e)),n=[[119,36,83,133,9],[238,72,167,10,18],[220,145,78,20,36],[185,34,156,40,72],[114,69,56,80,144],[187,146,41,194,132],[93,201,20,225,66],[46,228,138,112,161],[23,114,69,56,80]],i=0;i=2368&&r.moveForwardsBy(4);var o=r.readInt(1,"be");if(r.moveForwardsBy(o),64&a){var u=r.readInt(4,"be");r.moveForwardsBy(u)}for(r.moveForwardsBy(4);r.hasMore();){var h=r.readInt(4,"be");if(0===h)break;var c=r.readInt(4,"be"),l=h===c?i:i+n;r.moveForwardsBy(c+4*l)}return r.carve()}},{name:"Linux deb package",extension:"deb",mime:"application/vnd.debian.binary-package",description:"",signature:{0:33,1:60,2:97,3:114,4:99,5:104,6:62},extractor:function(t,e){var r=new at(t.slice(e));for(r.moveForwardsBy(8);r.hasMore();){r.moveForwardsBy(48);var n,i="",s=ot(r.getBytes(10));try{for(s.s();!(n=s.n()).done;){var a=n.value;i+=String.fromCharCode(a)}}catch(t){s.e(t)}finally{s.f()}i=parseInt(i.trim(),10),r.moveForwardsBy(2),r.moveForwardsBy(i)}return r.carve()}},{name:"Apple Disk Image",extension:"dmg",mime:"application/x-apple-diskimage",description:"",signature:{0:120,1:1,2:115,3:13,4:98,5:98,6:96},extractor:null}],Miscellaneous:[{name:"UTF-8 text",extension:"txt",mime:"text/plain",description:"UTF-8 encoded Unicode byte order mark, commonly but not exclusively seen in text files.",signature:{0:239,1:187,2:191},extractor:null},{name:"UTF-32 LE text",extension:"utf32le",mime:"charset/utf32le",description:"Little-endian UTF-32 encoded Unicode byte order mark.",signature:{0:255,1:254,2:0,3:0},extractor:null},{name:"UTF-16 LE text",extension:"utf16le",mime:"charset/utf16le",description:"Little-endian UTF-16 encoded Unicode byte order mark.",signature:{0:255,1:254},extractor:null},{name:"Web Open Font Format",extension:"woff",mime:"application/font-woff",description:"",signature:{0:119,1:79,2:70,3:70,4:0,5:1,6:0,7:0},extractor:null},{name:"Web Open Font Format 2",extension:"woff2",mime:"application/font-woff",description:"",signature:{0:119,1:79,2:70,3:50,4:0,5:1,6:0,7:0},extractor:null},{name:"Embedded OpenType font",extension:"eot",mime:"application/octet-stream",description:"",signature:[{8:2,9:0,10:1,34:76,35:80},{8:1,9:0,10:0,34:76,35:80},{8:2,9:0,10:2,34:76,35:80}],extractor:null},{name:"TrueType Font",extension:"ttf",mime:"application/font-sfnt",description:"",signature:{0:0,1:1,2:0,3:0,4:0},extractor:null},{name:"OpenType Font",extension:"otf",mime:"application/font-sfnt",description:"",signature:{0:79,1:84,2:84,3:79,4:0},extractor:null},{name:"SQLite",extension:"sqlite",mime:"application/x-sqlite3",description:"",signature:{0:83,1:81,2:76,3:105},extractor:function(t,e){var r=new at(t.slice(e));r.moveTo(16);var n=r.readInt(2);r.moveTo(28);var i=r.readInt(4);return r.moveTo(n*i),r.carve()}},{name:"BitTorrent link",extension:"torrent",mime:"application/x-bittorrent",description:"",signature:[{0:100,1:56,2:58,3:97,4:110,5:110,6:111,7:117,8:110,9:99,10:101,11:35,12:35,13:58},{0:100,1:52,2:58,3:105,4:110,5:102,6:111,7:100,8:[52,53,54],9:58}],extractor:null},{name:"Cryptocurrency wallet",extension:"wallet",mime:"application/octet-stream",description:"",signature:{0:0,1:0,2:0,3:0,4:1,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:98,13:49,14:5,15:0},extractor:null},{name:"Registry fragment",extension:"hbin",mime:"application/octet-stream",description:"",signature:{0:104,1:98,2:105,3:110,4:0},extractor:null},{name:"Registry script",extension:"rgs",mime:"application/octet-stream",description:"",signature:{0:72,1:75,2:67,3:82,4:13,5:10,6:92,7:123},extractor:null},{name:"WinNT Registry Hive",extension:"registry",mime:"application/octet-stream",description:"",signature:{0:114,1:101,2:103,3:102},extractor:null},{name:"Windows Event Log",extension:"evt",mime:"application/octet-stream",description:"",signature:{0:48,1:0,2:0,3:0,4:76,5:102,6:76,7:101},extractor:function(t,e){var r=new at(t.slice(e));r.moveTo(20);var n=r.readInt(4,"le");r.moveTo(n);var i=r.readInt(4,"le");return r.moveForwardsBy(i-4),r.carve()}},{name:"Windows Event Log",extension:"evtx",mime:"application/octet-stream",description:"",signature:{0:69,1:108,2:102,3:70,4:105,5:108,6:101},extractor:function(t,e){var r=new at(t.slice(e));r.moveTo(40);var n=r.readInt(4,"le")-44;for(r.moveForwardsBy(n);r.hasMore()&&r.getBytes(7).join("")===[69,108,102,67,104,110,107].join("");)r.moveForwardsBy(65529);return r.consumeWhile(0),r.carve()}},{name:"Windows Pagedump",extension:"dmp",mime:"application/octet-stream",description:"",signature:{0:80,1:65,2:71,3:69,4:68,5:85,6:[77,54],7:[80,52]},extractor:function(t,e){var r=new at(t.slice(e));return r.moveTo(112),r.moveTo(4096*(r.readInt(4,"le")+1)),r.carve()}},{name:"Windows Prefetch",extension:"pf",mime:"application/x-pf",description:"",signature:{0:[17,23,26],1:0,2:0,3:0,4:83,5:67,6:67,7:65},extractor:function(t,e){var r=new at(t.slice(e));return r.moveTo(12),r.moveTo(r.readInt(4,"be")),r.carve()}},{name:"Windows Prefetch (Win 10)",extension:"pf",mime:"application/x-pf",description:"",signature:{0:77,1:65,2:77,3:4,7:0},extractor:function(t,e){var r=new at(t.slice(e));return r.moveTo(r.readInt(4,"be")),r.carve()}},{name:"PList (XML)",extension:"plist",mime:"application/xml",description:"",signature:{39:60,40:33,41:68,42:79,43:67,44:84,45:89,46:80,47:69,48:32,49:112,50:108,51:105,52:115,53:116},extractor:function(t,e){var r=new at(t.slice(e)),n=0;for(r.continueUntil([60,112,108,105,115,116]),r.moveForwardsBy(6),n++;n>0&&r.hasMore();)60===r.readInt(1)&&(r.getBytes(5).join("")===[112,108,105,115,116].join("")?n++:r.moveBackwardsBy(5),r.getBytes(7).join("")===[47,112,108,105,115,116,62].join("")?n--:r.moveBackwardsBy(7));return r.consumeIf(10),r.carve()}},{name:"PList (binary)",extension:"bplist,plist,ipmeta,abcdp,mdbackup,mdinfo,strings,nib,ichat,qtz,webbookmark,webhistory",mime:"application/x-plist",description:"",signature:{0:98,1:112,2:108,3:105,4:115,5:116,6:48,7:48},extractor:null},{name:"MacOS X Keychain",extension:"keychain",mime:"application/octet-stream",description:"",signature:{0:107,1:121,2:99,3:104,4:0,5:1},extractor:function(t,e){var r=new at(t.slice(e));return r.moveTo(20),r.moveForwardsBy(r.readInt(4)),r.carve()}},{name:"TCP Packet",extension:"tcp",mime:"application/tcp",description:"",signature:{12:8,13:0,14:69,15:0,21:0,22:function(t){return t>=1&&t<=128},23:6},extractor:null},{name:"UDP Packet",extension:"udp",mime:"application/udp",description:"",signature:{12:8,13:0,14:69,15:0,16:[0,1,2,3,4,5],22:function(t){return t>=1&&t<=128},23:17},extractor:null},{name:"Compiled HTML",extension:"chm,chw,chi",mime:"application/vnd.ms-htmlhelp",description:"",signature:{0:73,1:84,2:83,3:70,4:3,5:0,6:0,7:0},extractor:null},{name:"Windows Password",extension:"pwl",mime:"application/octet-stream",description:"",signature:{0:227,1:130,2:133,3:150},extractor:null},{name:"Bitlocker recovery key",extension:"bitlocker",mime:"application/octet-stream",description:"",signature:{0:255,1:254,2:66,3:0,4:105,5:0,6:116,7:0,8:76,9:0,10:111,11:0,12:99,13:0,14:107,15:0,16:101,17:0,18:114,19:0,20:32,21:0},extractor:null},{name:"Certificate",extension:"cer,cat,p7b,p7c,p7m,p7s,swz,rsa,crl,crt,der",mime:"application/pkix-cert",description:"",signature:{0:48,1:130,4:[6,10,48]},extractor:null},{name:"Certificate",extension:"cat,swz,p7m",mime:"application/vnd.ms-pki.seccat",description:"",signature:{0:48,1:131,2:function(t){return 0!==t},5:6,6:9},extractor:null},{name:"PGP pubring",extension:"pkr,gpg",mime:"application/pgp-keys",description:"",signature:{0:153,1:1,2:[13,162],3:4},extractor:null},{name:"PGP secring",extension:"skr",mime:"application/pgp-keys",description:"",signature:[{0:149,1:1,2:207,3:4},{0:149,1:3,2:198,3:4},{0:149,1:5,2:134,3:4}],extractor:null},{name:"PGP Safe",extension:"pgd",mime:"application/pgp-keys",description:"",signature:{0:80,1:71,2:80,3:100,4:77,5:65,6:73,7:78,8:96,9:1,10:0},extractor:null},{name:"Task Scheduler",extension:"job",mime:"application/octet-stream",description:"",signature:{0:[0,1,2,3],1:[5,6],2:1,3:0,20:70,21:0},extractor:null},{name:"Windows Shortcut",extension:"lnk",mime:"application/x-ms-shortcut",description:"",signature:{0:76,1:0,2:0,3:0,4:1,5:20,6:2,7:0,8:0,9:0,10:0,11:0,12:192,13:0,14:0,15:0,16:0,17:0,18:0,19:70},extractor:function(t,e){var r=new at(t.slice(e));return r.moveTo(52),r.moveTo(r.readInt(4,"le")),r.carve()}},{name:"Bash",extension:"bash",mime:"application/bash",description:"",signature:{0:35,1:33,2:47,3:98,4:105,5:110,6:47,7:98,8:97,9:115,10:104},extractor:null},{name:"Shell",extension:"sh",mime:"application/sh",description:"",signature:{0:35,1:33,2:47,3:98,4:105,5:110,6:47,7:115,8:104},extractor:null},{name:"Python",extension:"py,pyc,pyd,pyo,pyw,pyz",mime:"application/python",description:"",signature:{0:35,1:33,2:47,3:117,4:115,5:114,6:47,7:98,8:105,9:110,10:47,11:112,12:121,13:116,14:104,15:111,16:110,17:[50,51,10,13]},extractor:null},{name:"Ruby",extension:"rb",mime:"application/ruby",description:"",signature:{0:35,1:33,2:47,3:117,4:115,5:114,6:47,7:98,8:105,9:110,10:47,11:114,12:117,13:98,14:121},extractor:null},{name:"perl",extension:"pl,pm,t,pod",mime:"application/perl",description:"",signature:{0:35,1:33,2:47,3:117,4:115,5:114,6:47,7:98,8:105,9:110,10:47,11:112,12:101,13:114,14:108},extractor:null},{name:"php",extension:"php,phtml,php3,php4,php5,php7,phps,php-s,pht,phar",mime:"application/php",description:"",signature:{0:60,1:63,2:112,3:104,4:112},extractor:null},{name:"Smile",extension:"sml",mime:"\tapplication/x-jackson-smile",description:"",signature:{0:58,1:41,2:10},extractor:null},{name:"Lua Bytecode",extension:"luac",mime:"application/x-lua",description:"",signature:{0:27,1:76,2:117,3:97},extractor:null},{name:"WebAssembly binary",extension:"wasm",mime:"application/octet-stream",description:"",signature:{0:0,1:97,2:115,3:109},extractor:null}]};function ct(t,e){var r=new at(t.slice(e));r.continueUntil([80,75,5,6]),r.moveForwardsBy(20);var n=r.readInt(2,"le");return r.moveForwardsBy(n),r.carve()}function lt(t,e){var r="207250237254",n=new at(t.slice(e)),i=n.getBytes(4).join("");return n.moveTo(function(t,e,r){var n=28;e&&(n+=4),t.moveTo(16);var i=t.readInt(4,r);return function(t,e,r,n){for(var i=0,s=0;s0&&t.moveForwardsBy(1)}var mt=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],xt=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function wt(t,e,r){for(var n,i=0;(n=St(t,e))&&256!==n;){if(++i>1e4)throw new Error("Caught in probable infinite loop while parsing Huffman Block");n<256||(t.readBits(mt[n-257],"le"),n=St(t,r),t.readBits(xt[n],"le"))}}function bt(t){for(var e=Math.max.apply(Math,t),r=Math.min.apply(Math,t),n=1<>=1;for(var f=s<<16|u,p=h;p>>16;if(a>i)throw new Error(`Invalid Huffman Code length while parsing DEFLATE block at pos ${t.position}: ${a}`);return t.moveBackwardsByBits(i-a),65535&s}function Et(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(t.length){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:0;for(var n in t){var i=parseInt(n,10)+r;switch(typeof t[n]){case"number":if(e[i]!==t[n])return!1;break;case"object":if(t[n].indexOf(e[i])<0)return!1;break;case"function":if(!t[n](e[i]))return!1;break;default:throw new Error(`Unrecognised signature type at offset ${n}`)}}return!0}const At=function(){return s((function e(){t(this,e)}),null,[{key:"checkForValue",value:function(t){if(void 0===t)throw new Error("only use translation methods with .bind")}},{key:"toArrayBuffer",value:function(){throw new Error("toArrayBuffer has not been implemented")}},{key:"fromArrayBuffer",value:function(){throw new Error("fromArrayBuffer has not been implemented")}}])}();function Ct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ct=function(){return!!t})()}const Bt=function(e){function r(){return t(this,r),e=this,i=arguments,n=o(n=r),a(e,Ct()?Reflect.construct(n,i||[],o(e).constructor):n.apply(e,i));var e,n,i}return h(r,e),s(r,null,[{key:"toArrayBuffer",value:function(){r.checkForValue(this.value),this.value=new Uint8Array(this.value).buffer}},{key:"fromArrayBuffer",value:function(){r.checkForValue(this.value),this.value=Array.prototype.slice.call(new Uint8Array(this.value))}}])}(At);function It(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(It=function(){return!!t})()}const Dt=function(e){function r(){return t(this,r),e=this,i=arguments,n=o(n=r),a(e,It()?Reflect.construct(n,i||[],o(e).constructor):n.apply(e,i));var e,n,i}return h(r,e),s(r,null,[{key:"toArrayBuffer",value:function(){r.checkForValue(this.value),this.value=it.isBigNumber(this.value)?H.strToArrayBuffer(this.value.toFixed()):new ArrayBuffer}},{key:"fromArrayBuffer",value:function(){r.checkForValue(this.value);try{this.value=new it(H.arrayBufferToStr(this.value))}catch(t){this.value=new it(NaN)}}}])}(At);function Pt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Pt=function(){return!!t})()}const Rt=function(e){function r(){return t(this,r),e=this,i=arguments,n=o(n=r),a(e,Pt()?Reflect.construct(n,i||[],o(e).constructor):n.apply(e,i));var e,n,i}return h(r,e),s(r,null,[{key:"toArrayBuffer",value:function(){var t=this;if(r.checkForValue(this.value),!k())return new Promise((function(e,r){H.readFile(t.value).then((function(e){return t.value=e.buffer})).then(e).catch(r)}));this.value=H.readFileSync(this.value)}},{key:"fromArrayBuffer",value:function(){r.checkForValue(this.value),this.value=new File(this.value,"unknown")}}])}(At);function Tt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Tt=function(){return!!t})()}const kt=function(e){function r(){return t(this,r),e=this,i=arguments,n=o(n=r),a(e,Tt()?Reflect.construct(n,i||[],o(e).constructor):n.apply(e,i));var e,n,i}return h(r,e),s(r,null,[{key:"toArrayBuffer",value:function(){r.checkForValue(this.value),this.value=this.value?H.strToArrayBuffer(this.value):new ArrayBuffer}},{key:"fromArrayBuffer",value:function(){r.checkForValue(this.value),this.value=this.value?H.arrayBufferToStr(this.value):""}}])}(At);function Nt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Nt=function(){return!!t})()}const Ot=function(e){function r(){return t(this,r),e=this,i=arguments,n=o(n=r),a(e,Nt()?Reflect.construct(n,i||[],o(e).constructor):n.apply(e,i));var e,n,i}return h(r,e),s(r,null,[{key:"toArrayBuffer",value:function(){r.checkForValue(this.value),this.value=this.value?H.strToArrayBuffer(H.unescapeHtml(H.stripHtmlTags(this.value,!0))):new ArrayBuffer}}])}(kt);function Ht(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ht=function(){return!!t})()}const jt=function(e){function r(){return t(this,r),e=this,i=arguments,n=o(n=r),a(e,Ht()?Reflect.construct(n,i||[],o(e).constructor):n.apply(e,i));var e,n,i}return h(r,e),s(r,null,[{key:"toArrayBuffer",value:function(){r.checkForValue(this.value),this.value=void 0!==this.value?H.strToArrayBuffer(JSON.stringify(this.value,null,4)):new ArrayBuffer}},{key:"fromArrayBuffer",value:function(){r.checkForValue(this.value),this.value=JSON.parse(H.arrayBufferToStr(this.value))}}])}(At);function Lt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Lt=function(){return!!t})()}const Vt=function(e){function r(){return t(this,r),e=this,i=arguments,n=o(n=r),a(e,Lt()?Reflect.construct(n,i||[],o(e).constructor):n.apply(e,i));var e,n,i}return h(r,e),s(r,null,[{key:"toArrayBuffer",value:(i=f(g().mark((function t(){return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r.checkForValue(this.value),!k()){t.next=5;break}this.value=this.value.map((function(t){return Uint8Array.from(t.data)})),t.next=8;break;case 5:return t.next=7,r.concatenateTypedArraysWithTypedElements.apply(r,y(this.value));case 7:this.value=t.sent;case 8:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"fromArrayBuffer",value:function(){r.checkForValue(this.value),this.value=[new File(this.value,"unknown")]}},{key:"concatenateTypedArraysWithTypedElements",value:(n=f(g().mark((function t(){var e,r,n,i,s,a,o,u,h,c,l,f,p,d=arguments;return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(e=0,r=d.length,n=new Array(r),i=0;i0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t(this,e),this.value=new ArrayBuffer(0),this.type=e.ARRAY_BUFFER,r&&Object.prototype.hasOwnProperty.call(r,"value")&&Object.prototype.hasOwnProperty.call(r,"type"))this.set(r.value,r.type);else if(r&&null!==n)this.set(r,n);else if(r){var i=e.typeEnum(r.constructor.name);this.set(r,i)}}return s(e,[{key:"get",value:function(t){var r=this;return"string"==typeof t&&(t=e.typeEnum(t)),this.type!==t?k()?(this._translate(t),this.value):new Promise((function(e,n){r._translate(t).then((function(){e(r.value)})).catch(n)})):this.value}},{key:"set",value:function(t,r){if("string"==typeof r&&(r=e.typeEnum(r)),x().debug("Dish type: "+e.enumLookup(r)),this.value=t,this.type=r,!this.valid()){var n=H.truncate(JSON.stringify(this.value),25);throw new L(`Data is not a valid ${e.enumLookup(r)}: ${n}`)}}},{key:"presentAs",value:function(t){return this.clone().get(t)}},{key:"detectDishType",value:function(){var t=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object.keys(ht);if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),!(t&&t.length>1))return[];var r=[],n={};for(var i in ht)e.includes(i)&&(n[i]=ht[i]);for(var s in n)n[s].forEach((function(e){Et(e.signature,t)&&r.push(e)}));return r}(new Uint8Array(this.value.slice(0,2048)));return t.length&&t[0].mime&&"text/plain"===t[0].mime?t[0].mime:null}},{key:"getTitle",value:(r=f(g().mark((function t(r){var n,i;return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n="",t.t0=this.type,t.next=t.t0===e.FILE?4:t.t0===e.LIST_FILE?6:t.t0===e.JSON?8:t.t0===e.NUMBER||t.t0===e.BIG_NUMBER?10:t.t0===e.ARRAY_BUFFER||t.t0===e.BYTE_ARRAY?12:15;break;case 4:return n=this.value.name,t.abrupt("break",26);case 6:return n=`${this.value.length} file(s)`,t.abrupt("break",26);case 8:return n="application/json",t.abrupt("break",26);case 10:return n=this.value.toString(),t.abrupt("break",26);case 12:if(null===(n=this.detectDishType())){t.next=15;break}return t.abrupt("break",26);case 15:return t.prev=15,(i=this.clone()).value=i.value.slice(0,256),t.next=20,i.get(e.STRING);case 20:n=t.sent,t.next=26;break;case 23:t.prev=23,t.t1=t.catch(15),x().error(`${e.enumLookup(this.type)} cannot be sliced. ${t.t1}`);case 26:return t.abrupt("return",n.slice(0,r));case 27:case"end":return t.stop()}}),t,this,[[15,23]])}))),function(t){return r.apply(this,arguments)})},{key:"valid",value:function(){switch(this.type){case e.BYTE_ARRAY:if(!(this.value instanceof Uint8Array||this.value instanceof Array))return!1;for(var t=0;t255)return!1;return!0;case e.STRING:case e.HTML:return"string"==typeof this.value;case e.NUMBER:return"number"==typeof this.value;case e.ARRAY_BUFFER:return this.value instanceof ArrayBuffer;case e.BIG_NUMBER:if(it.isBigNumber(this.value))return!0;if(Object.keys(this.value).sort().equals(["c","e","s"])){var r=new it;return r.c=this.value.c,r.e=this.value.e,r.s=this.value.s,this.value=r,!0}return!1;case e.JSON:return!0;case e.FILE:return this.value instanceof File;case e.LIST_FILE:return this.value instanceof Array&&this.value.reduce((function(t,e){return t&&e instanceof File}),!0);default:return!1}}},{key:"size",get:function(){switch(this.type){case e.BYTE_ARRAY:case e.STRING:case e.HTML:return this.value.length;case e.NUMBER:case e.BIG_NUMBER:return this.value.toString().length;case e.ARRAY_BUFFER:return this.value.byteLength;case e.JSON:return JSON.stringify(this.value).length;case e.FILE:return this.value.size;case e.LIST_FILE:return this.value.reduce((function(t,e){return t+e.size}),0);default:return-1}}},{key:"clone",value:function(){var t=new e;switch(this.type){case e.STRING:case e.HTML:case e.NUMBER:case e.BIG_NUMBER:t.set(this.value,this.type);break;case e.BYTE_ARRAY:case e.JSON:t.set(JSON.parse(JSON.stringify(this.value)),this.type);break;case e.ARRAY_BUFFER:t.set(this.value.slice(0),this.type);break;case e.FILE:t.set(new File([this.value],this.value.name,{type:this.value.type,lastModified:this.value.lastModified}),this.type);break;case e.LIST_FILE:t.set(this.value.map((function(t){return new File([t],t.name,{type:t.type,lastModified:t.lastModified})})),this.type);break;default:throw new L("Cannot clone Dish, unknown type")}return t}},{key:"_translate",value:function(t){var r=this;if(x().debug(`Translating Dish from ${e.enumLookup(this.type)} to ${e.enumLookup(t)}`),!k())return new Promise((function(n,i){r._toArrayBuffer().then((function(){return r.type=e.ARRAY_BUFFER})).then((function(){r._fromArrayBuffer(t),n()})).catch(i)}));this._toArrayBuffer(),this.type=e.ARRAY_BUFFER,this._fromArrayBuffer(t)}},{key:"_toArrayBuffer",value:function(){var t=this,r={browser:{[e.STRING]:function(){return Promise.resolve(kt.toArrayBuffer.bind(t)())},[e.NUMBER]:function(){return Promise.resolve(Mt.toArrayBuffer.bind(t)())},[e.HTML]:function(){return Promise.resolve(Ot.toArrayBuffer.bind(t)())},[e.ARRAY_BUFFER]:function(){return Promise.resolve()},[e.BIG_NUMBER]:function(){return Promise.resolve(Dt.toArrayBuffer.bind(t)())},[e.JSON]:function(){return Promise.resolve(jt.toArrayBuffer.bind(t)())},[e.FILE]:function(){return Rt.toArrayBuffer.bind(t)()},[e.LIST_FILE]:function(){return Promise.resolve(Vt.toArrayBuffer.bind(t)())},[e.BYTE_ARRAY]:function(){return Promise.resolve(Bt.toArrayBuffer.bind(t)())}},node:{[e.STRING]:function(){return kt.toArrayBuffer.bind(t)()},[e.NUMBER]:function(){return Mt.toArrayBuffer.bind(t)()},[e.HTML]:function(){return Ot.toArrayBuffer.bind(t)()},[e.ARRAY_BUFFER]:function(){},[e.BIG_NUMBER]:function(){return Dt.toArrayBuffer.bind(t)()},[e.JSON]:function(){return jt.toArrayBuffer.bind(t)()},[e.FILE]:function(){return Rt.toArrayBuffer.bind(t)()},[e.LIST_FILE]:function(){return Vt.toArrayBuffer.bind(t)()},[e.BYTE_ARRAY]:function(){return Bt.toArrayBuffer.bind(t)()}}};try{return r[k()?"node":"browser"][this.type]()}catch(t){throw new L(`Error translating from ${e.enumLookup(this.type)} to ArrayBuffer: ${t}`)}}},{key:"_fromArrayBuffer",value:function(t){var r=this,n={[e.STRING]:function(){return kt.fromArrayBuffer.bind(r)()},[e.NUMBER]:function(){return Mt.fromArrayBuffer.bind(r)()},[e.HTML]:function(){return Ot.fromArrayBuffer.bind(r)()},[e.ARRAY_BUFFER]:function(){},[e.BIG_NUMBER]:function(){return Dt.fromArrayBuffer.bind(r)()},[e.JSON]:function(){return jt.fromArrayBuffer.bind(r)()},[e.FILE]:function(){return Rt.fromArrayBuffer.bind(r)()},[e.LIST_FILE]:function(){return Vt.fromArrayBuffer.bind(r)()},[e.BYTE_ARRAY]:function(){return Bt.fromArrayBuffer.bind(r)()}};try{n[t](),this.type=t}catch(r){throw new L(`Error translating from ArrayBuffer to ${e.enumLookup(t)}: ${r}`)}}}],[{key:"typeEnum",value:function(t){switch(t.toLowerCase()){case"bytearray":case"byte array":return e.BYTE_ARRAY;case"string":return e.STRING;case"number":return e.NUMBER;case"html":return e.HTML;case"arraybuffer":case"array buffer":return e.ARRAY_BUFFER;case"bignumber":case"big number":return e.BIG_NUMBER;case"json":case"object":return e.JSON;case"file":return e.FILE;case"list":return e.LIST_FILE;default:throw new L("Invalid data type string. No matching enum.")}}},{key:"enumLookup",value:function(t){switch(t){case e.BYTE_ARRAY:return"byteArray";case e.STRING:return"string";case e.NUMBER:return"number";case e.HTML:return"html";case e.ARRAY_BUFFER:return"ArrayBuffer";case e.BIG_NUMBER:return"BigNumber";case e.JSON:return"JSON";case e.FILE:return"File";case e.LIST_FILE:return"List";default:throw new L("Invalid data type enum. No matching type.")}}}]);var r}();Kt.BYTE_ARRAY=0,Kt.STRING=1,Kt.NUMBER=2,Kt.HTML=3,Kt.ARRAY_BUFFER=4,Kt.BIG_NUMBER=5,Kt.JSON=6,Kt.FILE=7,Kt.LIST_FILE=8;const _t=Kt,qt=function(){function e(r){t(this,e),this.name="",this.type="",this._value=null,this.disabled=!1,this.hint="",this.rows=0,this.toggleValues=[],this.target=null,this.defaultIndex=0,this.maxLength=null,this.min=null,this.max=null,this.step=1,r&&this._parseConfig(r)}return s(e,[{key:"_parseConfig",value:function(t){this.name=t.name,this.type=t.type,this.defaultValue=t.value,this.disabled=!!t.disabled,this.hint=t.hint||!1,this.rows=t.rows||!1,this.toggleValues=t.toggleValues,this.target=void 0!==t.target?t.target:null,this.defaultIndex=void 0!==t.defaultIndex?t.defaultIndex:0,this.maxLength=t.maxLength||null,this.min=t.min,this.max=t.max,this.step=t.step}},{key:"config",get:function(){return this._value}},{key:"value",get:function(){return this._value},set:function(t){this._value=e.prepare(t,this.type)}}],[{key:"prepare",value:function(t,e){var r;switch(e){case"binaryString":case"binaryShortString":case"editableOption":case"editableOptionShort":return H.parseEscapedChars(t);case"byteArray":return"string"==typeof t?B(t=t.replace(/\s+/g,"")):t;case"number":if(null===t)return t;if(r=parseFloat(t),isNaN(r))throw"Invalid ingredient value. Not a number: "+H.truncate(t.toString(),10);return r;default:return t}}}])}();var Wt=function(){return s((function e(){t(this,e),this._inputType=-1,this._outputType=-1,this._presentType=-1,this._breakpoint=!1,this._disabled=!1,this._flowControl=!1,this._manualBake=!1,this._ingList=[],this.name="",this.module="",this.description="",this.infoURL=null}),[{key:"run",value:function(t,e){return t}},{key:"highlight",value:function(t,e){return!1}},{key:"highlightReverse",value:function(t,e){return!1}},{key:"present",value:function(t,e){return t}},{key:"inputType",get:function(){return _t.enumLookup(this._inputType)},set:function(t){this._inputType=_t.typeEnum(t)}},{key:"outputType",get:function(){return _t.enumLookup(this._outputType)},set:function(t){this._outputType=_t.typeEnum(t),this._presentType<0&&(this._presentType=this._outputType)}},{key:"presentType",get:function(){return _t.enumLookup(this._presentType)},set:function(t){this._presentType=_t.typeEnum(t)}},{key:"args",get:function(){return this._ingList.map((function(t){var e={name:t.name,type:t.type,value:t.defaultValue};return t.toggleValues&&(e.toggleValues=t.toggleValues),t.hint&&(e.hint=t.hint),t.rows&&(e.rows=t.rows),t.disabled&&(e.disabled=t.disabled),t.target&&(e.target=t.target),t.defaultIndex&&(e.defaultIndex=t.defaultIndex),t.maxLength&&(e.maxLength=t.maxLength),"number"==typeof t.min&&(e.min=t.min),"number"==typeof t.max&&(e.max=t.max),t.step&&(e.step=t.step),e}))},set:function(t){var e=this;t.forEach((function(t){var r=new qt(t);e.addIngredient(r)}))}},{key:"config",get:function(){return{op:this.name,args:this._ingList.map((function(t){return t.config}))}}},{key:"addIngredient",value:function(t){this._ingList.push(t)}},{key:"ingValues",get:function(){return this._ingList.map((function(t){return t.value}))},set:function(t){var e=this;t.forEach((function(t,r){e._ingList[r].value=t}))}},{key:"breakpoint",get:function(){return this._breakpoint},set:function(t){this._breakpoint=!!t}},{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=!!t}},{key:"flowControl",get:function(){return this._flowControl},set:function(t){this._flowControl=!!t}},{key:"manualBake",get:function(){return this._manualBake},set:function(t){this._manualBake=!!t}}])}();const $t=Wt;function Gt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Gt=function(){return!!t})()}const zt=function(e){function r(){var e,n,i,s;return t(this,r),n=this,i=o(i=r),(e=a(n,Gt()?Reflect.construct(i,[],o(n).constructor):i.apply(n,s))).name="Hex to Object Identifier",e.module="PublicKey",e.description="Converts a hexadecimal string into an object identifier (OID).",e.infoURL="https://wikipedia.org/wiki/Object_identifier",e.inputType="string",e.outputType="string",e.args=[],e}return h(r,e),s(r,[{key:"run",value:function(t,e){return c.pj.asn1.ASN1Util.oidHexToInt(t.replace(/\s/g,""))}}])}($t);function Jt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Jt=function(){return!!t})()}const Xt=function(e){function r(){var e,n,i,s;return t(this,r),n=this,i=o(i=r),(e=a(n,Jt()?Reflect.construct(i,[],o(n).constructor):i.apply(n,s))).name="Hex to PEM",e.module="PublicKey",e.description="Converts a hexadecimal DER (Distinguished Encoding Rules) string into PEM (Privacy Enhanced Mail) format.",e.infoURL="https://wikipedia.org/wiki/Privacy-Enhanced_Mail",e.inputType="string",e.outputType="string",e.args=[{name:"Header string",type:"string",value:"CERTIFICATE"}],e}return h(r,e),s(r,[{key:"run",value:function(t,e){return c.pj.asn1.ASN1Util.getPEMStringFromHex(t.replace(/\s/g,""),e[0])}}])}($t);function Yt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Yt=function(){return!!t})()}var Zt=function(e){function r(){var e,n,i,s;return t(this,r),n=this,i=o(i=r),(e=a(n,Yt()?Reflect.construct(i,[],o(n).constructor):i.apply(n,s))).name="JWK to PEM",e.module="PublicKey",e.description="Converts Keys in JSON Web Key format to PEM format (PKCS#8).",e.infoURL="https://datatracker.ietf.org/doc/html/rfc7517",e.inputType="string",e.outputType="string",e.args=[],e.checks=[{pattern:'"kty":\\s*"(EC|RSA)"',flags:"gm",args:[]}],e}return h(r,e),s(r,[{key:"run",value:function(t,e){var r=JSON.parse(t),n=[];if(Array.isArray(r))n=r;else if(Array.isArray(r.keys))n=r.keys;else{if("object"!=typeof r)throw new E("Input is not a JSON Web Key");n.push(r)}for(var i="",s=0;s0&&(n+="\n"),n+=JSON.stringify(f)}else{if("CERTIFICATE"!==r[1])throw new E(`Unsupported PEM type '${r[1]}'`);var p=new c.dy;p.readCertPEM(h);var g=p.getPublicKey(),d=c.ym.getJWKFromKey(g);n.length>0&&(n+="\n"),n+=JSON.stringify(d)}}return n}}])}($t);const ie=ne;function se(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(se=function(){return!!t})()}const ae=function(e){function r(){var e,n,i,s;return t(this,r),n=this,i=o(i=r),(e=a(n,se()?Reflect.construct(i,[],o(n).constructor):i.apply(n,s))).name="Parse ASN.1 hex string",e.module="PublicKey",e.description="Abstract Syntax Notation One (ASN.1) is a standard and notation that describes rules and structures for representing, encoding, transmitting, and decoding data in telecommunications and computer networking.

This operation parses arbitrary ASN.1 data (encoded as an hex string: use the 'To Hex' operation if necessary) and presents the resulting tree.",e.infoURL="https://wikipedia.org/wiki/Abstract_Syntax_Notation_One",e.inputType="string",e.outputType="string",e.args=[{name:"Starting index",type:"number",value:0},{name:"Truncate octet strings longer than",type:"number",value:32}],e}return h(r,e),s(r,[{key:"run",value:function(t,e){var r=st(e,2),n=r[0],i=r[1];return c.d6.dump(t.replace(/\s/g,"").toLowerCase(),{ommit_long_octet:i},n)}}])}($t);function oe(t,e){for(var r="",n=t.array.reduce((function(t,e){return e[0].type.length>t?e[0].type.length:t}),0),i=0;i=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,o=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){o=!0,s=t},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw s}}}}function ce(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=2&&128&parseInt(t.substring(0,2),16)&&(t="00"+t),t)}function ve(t){var e=[];return e.push("CA = "+(Object.hasOwn(t,"cA")&&t.cA?"true":"false")),Object.hasOwn(t,"pathLen")&&e.push(`PathLenConstraint = ${t.pathLen}`),e}function ye(t){var e=[],r={digitalSignature:"Digital Signature",nonRepudiation:"Non-repudiation",keyEncipherment:"Key encipherment",dataEncipherment:"Data encipherment",keyAgreement:"Key agreement",keyCertSign:"Key certificate signing",cRLSign:"CRL signing",encipherOnly:"Encipher Only",decipherOnly:"Decipher Only"};return Object.hasOwn(t,"names")&&t.names.forEach((function(t){Object.hasOwn(r,t)?e.push(r[t]):e.push(`unknown key usage (${t})`)})),0===e.length&&e.push("(none)"),e}function me(t){var e=[],r={serverAuth:"TLS Web Server Authentication",clientAuth:"TLS Web Client Authentication",codeSigning:"Code signing",emailProtection:"E-mail Protection (S/MIME)",timeStamping:"Trusted Timestamping","1.3.6.1.4.1.311.2.1.21":"Microsoft Individual Code Signing","1.3.6.1.4.1.311.2.1.22":"Microsoft Commercial Code Signing","1.3.6.1.4.1.311.10.3.1":"Microsoft Trust List Signing","1.3.6.1.4.1.311.10.3.3":"Microsoft Server Gated Crypto","1.3.6.1.4.1.311.10.3.4":"Microsoft Encrypted File System","1.3.6.1.4.1.311.20.2.2":"Microsoft Smartcard Login","2.16.840.1.113730.4.1":"Netscape Server Gated Crypto"};return Object.hasOwn(t,"array")&&t.array.forEach((function(t){Object.hasOwn(r,t)?e.push(r[t]):e.push(t)})),0===e.length&&e.push("(none)"),e}function xe(t){var e=[];if(Object.hasOwn(t,"extname")&&"subjectAltName"===t.extname&&Object.hasOwn(t,"array")){var r,n=he(t.array);try{var i=function(){var t=r.value;Object.keys(t).forEach((function(r){switch(r){case"rfc822":e.push(`EMAIL: ${t[r]}`);break;case"dns":e.push(`DNS: ${t[r]}`);break;case"uri":e.push(`URI: ${t[r]}`);break;case"ip":e.push(`IP: ${t[r]}`);break;case"dn":e.push(`DIR: ${t[r].str}`);break;case"other":e.push(`Other: ${t[r].oid}::${t[r].value.utf8str.str}`);break;default:e.push(`(unable to format SAN '${r}':${t[r]})\n`)}}))};for(n.s();!(r=n.n()).done;)i()}catch(t){n.e(t)}finally{n.f()}}return e}function we(t,e){var r=" ".repeat(t);return r+e.join("\n"+r)+"\n"}function be(t){return t.substring(0,t.length-1)}const Se=function(e){function r(){var e,n,i,s;return t(this,r),n=this,i=o(i=r),(e=a(n,le()?Reflect.construct(i,[],o(n).constructor):i.apply(n,s))).name="Parse CSR",e.module="PublicKey",e.description="Parse Certificate Signing Request (CSR) for an X.509 certificate",e.infoURL="https://wikipedia.org/wiki/Certificate_signing_request",e.inputType="string",e.outputType="string",e.args=[{name:"Input format",type:"option",value:["PEM"]}],e.checks=[{pattern:"^-+BEGIN CERTIFICATE REQUEST-+\\r?\\n[\\da-z+/\\n\\r]+-+END CERTIFICATE REQUEST-+\\r?\\n?$",flags:"i",args:["PEM"]}],e}return h(r,e),s(r,[{key:"run",value:function(t,e){if(!t.length)return"No input";var r,n,i,s=new c.pj.asn1.csr.CSRUtil.getParam(t);return`Subject\n${oe(s.subject,2)}\nPublic Key${r=s.sbjpubkey,n="\n",i=c.ym.getKey(r),i instanceof c.sD?n+=` Algorithm: RSA\n Length: ${i.n.bitLength()} bits\n Modulus: ${pe(ge(i.n))}\n Exponent: ${i.e} (0x${H.hex(i.e)})\n`:i instanceof c.pj.crypto.ECDSA?n+=` Algorithm: ECDSA\n Length: ${i.ecparams.keylen} bits\n Pub: ${pe(i.pubKeyHex)}\n ASN1 OID: ${c.pj.crypto.ECDSA.getName(i.getShortNISTPCurveName())}\n NIST CURVE: ${i.getShortNISTPCurveName()}\n`:i instanceof c.pj.crypto.DSA?n+=` Algorithm: DSA\n Length: ${4*i.p.toString(16).length} bits\n Pub: ${pe(ge(i.y))}\n P: ${pe(ge(i.p))}\n Q: ${pe(ge(i.q))}\n G: ${pe(ge(i.g))}\n`:n+="unsupported public key algorithm\n",be(n)}\nSignature${function(t,e){var r="\n";if(r+=` Algorithm: ${t}\n`,new RegExp("withdsa","i").test(t)){var n=(new c.pj.crypto.DSA).parseASN1Signature(e);r+=` Signature:\n R: ${pe(ge(n[0]))}\n S: ${pe(ge(n[1]))}\n`}else new RegExp("withrsa","i").test(t)?r+=` Signature: ${pe(e)}\n`:r+=` Signature: ${pe(de(e))}\n`;return be(r)}(s.sigalg,s.sighex)}\nRequested Extensions${function(t){var e=new Array(4).fill("");if(Object.hasOwn(t,"extreq")){var r,n=he(t.extreq);try{for(n.s();!(r=n.n()).done;){var i=r.value,s=[];switch(i.extname){case"basicConstraints":s=ve(i),e[0]=` Basic Constraints:${fe(i)}\n${we(4,s)}`;break;case"keyUsage":s=ye(i),e[1]=` Key Usage:${fe(i)}\n${we(4,s)}`;break;case"extKeyUsage":s=me(i),e[2]=` Extended Key Usage:${fe(i)}\n${we(4,s)}`;break;case"subjectAltName":s=xe(i),e[3]=` Subject Alternative Name:${fe(i)}\n${we(4,s)}`;break;default:s=["(unsuported extension)"],e.push(` ${i.extname}:${fe(i)}\n${we(4,s)}`)}}}catch(t){n.e(t)}finally{n.f()}}var a="\n";return e.forEach((function(t){null!=t&&0!==t.length&&(a+=t)})),be(a)}(s)}`}}])}($t);function Ee(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ee=function(){return!!t})()}function Fe(t){if(!/^\d{12,14}Z$/.test(t))throw new E(`failed to format datetime string ${t}`);var e="20";15===t.length&&(e=t.substring(0,2),t=t.slice(2));var r=e+t.substring(0,2),n=t.substring(2,4),i=t.substring(4,6),s=t.substring(6,8),a=t.substring(8,10),o=t.substring(10,12);return new Date(`${r}-${n}-${i}T${s}:${a}:${o}Z`).toUTCString()}function Ae(t,e){var r="";return t.forEach((function(t){var e=Object.keys(t)[0];switch(e){case"ip":r+=`IP:${t.ip}\n`;break;case"dns":r+=`DNS:${t.dns}\n`;break;case"uri":r+=`URI:${t.uri}\n`;break;case"rfc822":r+=`EMAIL:${t.rfc822}\n`;break;case"dn":r+=`DIR:${t.dn.str}\n`;break;case"other":r+=`OtherName:${t.other.oid}::${Object.values(t.other.value)[0].str}\n`;break;default:r+=`${e}: unsupported general name type`}})),Be(Ie(r),e)}function Ce(t){return t.length%2!=0&&(t="0"+t),Ie(t.replace(/(..)/g,"$&:"))}function Be(t,e){var r=" ".repeat(e);return t.replace(/^/gm,r)}function Ie(t){return t.length<1?t:t.substring(0,t.length-1)}const De=function(e){function r(){var e,n,i,s;return t(this,r),n=this,i=o(i=r),(e=a(n,Ee()?Reflect.construct(i,[],o(n).constructor):i.apply(n,s))).name="Parse X.509 CRL",e.module="PublicKey",e.description="Parse Certificate Revocation List (CRL)",e.infoURL="https://wikipedia.org/wiki/Certificate_revocation_list",e.inputType="string",e.outputType="string",e.args=[{name:"Input format",type:"option",value:["PEM","DER Hex","Base64","Raw"]}],e.checks=[{pattern:"^-+BEGIN X509 CRL-+\\r?\\n[\\da-z+/\\n\\r]+-+END X509 CRL-+\\r?\\n?$",flags:"i",args:["PEM"]}],e}return h(r,e),s(r,[{key:"run",value:function(t,e){if(!t.length)return"No input";var r=e[0],n=!1;try{switch(r){case"DER Hex":t=t.replace(/\s/g,"").toLowerCase();break;case"PEM":break;case"Base64":t=C(A(t,null,"byteArray"),"");break;case"Raw":t=C(H.strToArrayBuffer(t),"");break;default:n=!0}}catch(t){throw"Certificate load error (non-certificate input?)"}if(n)throw"Undefined input format";var i,s=new c.od(t),a=`Certificate Revocation List (CRL):\n Version: ${null===s.getVersion()?"1 (0x0)":"2 (0x1)"}\n Signature Algorithm: ${s.getSignatureAlgorithmField()}\n Issuer:\n${oe(s.getIssuer(),8)}\n Last Update: ${Fe(s.getThisUpdate())}\n Next Update: ${Fe(s.getNextUpdate())}\n`;return void 0!==s.getParam().ext&&(a+=`\tCRL extensions:\n${function(t){if(!1===Array.isArray(t)||0===t.length)return Be("No CRL extensions.",8);var e="";return t.sort((function(t,e){return Object.hasOwn(t,"extname")&&Object.hasOwn(e,"extname")?t.extname=this.blockSizeInBytes;){this.blockUnits=[];for(var t=0;t>8&255)+String.fromCharCode(this.state.hash[r]>>16&255)+String.fromCharCode(this.state.hash[r]>>24&255);return e}},{key:"addLengthBits",value:function(){this.state.message+=String.fromCharCode(this.state.length<<3&255)+String.fromCharCode(this.state.length>>5&255)+String.fromCharCode(this.state.length>>13&255)+String.fromCharCode(this.state.length>>21&255)+String.fromCharCode(this.state.length>>29&255)+"\0\0\0"}}])}(Re);const Ne=ke;function Oe(t,e){return t<>>32-e}function He(t,e){return t>>>e|t<<32-e}function je(t,e,r){return 32===r?e:r>32?je(e,t,r-32):4294967295&(t>>>r|e<<32-r)}function Le(t,e,r){return 32===r?t:r>32?Le(e,t,r-32):4294967295&(e>>>r|t<<32-r)}function Ve(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ve=function(){return!!t})()}var Ue=[0,1518500249,1859775393,2400959708],Me=[5,11,7,15,6,13,8,14,7,12,9,11,8,15,6,12,9,14,5,13],Ke=[10,17,25,30],_e=[18,0,1,2,3,19,4,5,6,7,16,8,9,10,11,17,12,13,14,15,22,3,6,9,12,23,15,2,5,8,20,11,14,1,4,21,7,10,13,0,26,12,5,14,7,27,0,9,2,11,24,4,13,6,15,25,8,1,10,3,30,7,2,13,8,31,3,14,9,4,28,15,10,5,0,29,11,6,1,12],qe=function(e){function r(e){var n,i,s,u;return t(this,r),i=this,u=[e],s=o(s=r),(n=a(i,Ve()?Reflect.construct(s,u||[],o(i).constructor):s.apply(i,u))).options.rounds=n.options.rounds||80,n.W=new Array(32),n}return h(r,e),s(r,[{key:"reset",value:function(){var t,e,n;(t=r,e=this,"function"==typeof(n=Pe(o(1&3?t.prototype:t),"reset",e))?function(t){return n.apply(e,t)}:n)([]),this.state.hash=[1732584193,4023233417,2562383102,271733878,3285377520]}},{key:"processBlock",value:function(t){for(var e=0|this.state.hash[0],r=0|this.state.hash[1],n=0|this.state.hash[2],i=0|this.state.hash[3],s=0|this.state.hash[4],a=0;a<16;a++)this.W[a]=0|t[a];this.W[16]=this.W[0]^this.W[1]^this.W[2]^this.W[3],this.W[17]=this.W[4]^this.W[5]^this.W[6]^this.W[7],this.W[18]=this.W[8]^this.W[9]^this.W[10]^this.W[11],this.W[19]=this.W[12]^this.W[13]^this.W[14]^this.W[15],this.W[20]=this.W[3]^this.W[6]^this.W[9]^this.W[12],this.W[21]=this.W[2]^this.W[5]^this.W[8]^this.W[15],this.W[22]=this.W[1]^this.W[4]^this.W[11]^this.W[14],this.W[23]=this.W[0]^this.W[7]^this.W[10]^this.W[13],this.W[24]=this.W[5]^this.W[7]^this.W[12]^this.W[14],this.W[25]=this.W[0]^this.W[2]^this.W[9]^this.W[11],this.W[26]=this.W[4]^this.W[6]^this.W[13]^this.W[15],this.W[27]=this.W[1]^this.W[3]^this.W[8]^this.W[10],this.W[28]=this.W[2]^this.W[7]^this.W[8]^this.W[13],this.W[29]=this.W[3]^this.W[4]^this.W[9]^this.W[14],this.W[30]=this.W[0]^this.W[5]^this.W[10]^this.W[15],this.W[31]=this.W[1]^this.W[6]^this.W[11]^this.W[12];for(var o=0;o=this.blockSizeInBytes;){this.blockUnits=new Array(this.blockSizeInBytes);for(var t=0;t=this.blockSizeInBytes;){this.blockUnits=[];for(var t=0;t>24&255)+String.fromCharCode(this.state.hash[r]>>16&255)+String.fromCharCode(this.state.hash[r]>>8&255)+String.fromCharCode(255&this.state.hash[r]);return e}},{key:"addLengthBits",value:function(){this.state.message+="\0\0\0"+String.fromCharCode(this.state.length>>29&255)+String.fromCharCode(this.state.length>>21&255)+String.fromCharCode(this.state.length>>13&255)+String.fromCharCode(this.state.length>>5&255)+String.fromCharCode(this.state.length<<3&255)}}])}(Re);const yr=vr;function mr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(mr=function(){return!!t})()}var xr=[1518500249,1859775393,2400959708,3395469782],wr=function(e){function r(e){var n,i,s,u;return t(this,r),i=this,u=[e],s=o(s=r),(n=a(i,mr()?Reflect.construct(s,u||[],o(i).constructor):s.apply(i,u))).options.rounds=n.options.rounds||80,n.W=new Array(80),n}return h(r,e),s(r,[{key:"reset",value:function(){var t,e,n;(t=r,e=this,"function"==typeof(n=Pe(o(1&3?t.prototype:t),"reset",e))?function(t){return n.apply(e,t)}:n)([]),this.state.hash=[1732584193,-271733879,-1732584194,271733878,-1009589776]}},{key:"processBlock",value:function(t){for(var e=0|this.state.hash[0],r=0|this.state.hash[1],n=0|this.state.hash[2],i=0|this.state.hash[3],s=0|this.state.hash[4],a=0;a>>3)+this.W[h-7]+(He(this.W[h-2],17)^He(this.W[h-2],19)^this.W[h-2]>>>10)|0;var c=u+(He(s,6)^He(s,11)^He(s,25))+(s&a^~s&o)+Br[h]+this.W[h]|0,l=(He(e,2)^He(e,13)^He(e,22))+(e&r^e&n^r&n)|0;u=o,o=a,a=s,s=i+c|0,i=n,n=r,r=e,e=c+l|0}this.state.hash[0]=this.state.hash[0]+e|0,this.state.hash[1]=this.state.hash[1]+r|0,this.state.hash[2]=this.state.hash[2]+n|0,this.state.hash[3]=this.state.hash[3]+i|0,this.state.hash[4]=this.state.hash[4]+s|0,this.state.hash[5]=this.state.hash[5]+a|0,this.state.hash[6]=this.state.hash[6]+o|0,this.state.hash[7]=this.state.hash[7]+u|0}},{key:"finalize",value:function(){return this.addPaddingISO7816(this.state.message.length<56?56-this.state.message.length|0:120-this.state.message.length|0),this.addLengthBits(),this.process(),this.getStateHash(this.options.length/32|0)}}])}(yr);const Dr=Ir;function Pr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Pr=function(){return!!t})()}var Rr=[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],Tr=function(e){function r(e){var n,i,s,u;return t(this,r),(e=e||{}).length=e.length||512,e.rounds=e.rounds||160,i=this,u=[e],s=o(s=r),(n=a(i,Pr()?Reflect.construct(s,u||[],o(i).constructor):s.apply(i,u))).blockSize=32,n.blockSizeInBytes=n.blockSize*n.unitSize,n.W=new Array(160),n}return h(r,e),s(r,[{key:"reset",value:function(){var t,e,n;switch((t=r,e=this,"function"==typeof(n=Pe(o(1&3?t.prototype:t),"reset",e))?function(t){return n.apply(e,t)}:n)([]),this.options.length){case 384:this.state.hash=[-876896931,-1056596264,1654270250,914150663,-1856437926,812702999,355462360,-150054599,1731405415,-4191439,-1900787065,1750603025,-619958771,1694076839,1203062813,-1090891868];break;case 512:this.state.hash=[1779033703,-205731576,-1150833019,-2067093701,1013904242,-23791573,-1521486534,1595750129,1359893119,-1377402159,-1694144372,725511199,528734635,-79577749,1541459225,327033209];break;default:for(var i=new r,s=0;s<16;s++)i.state.hash[s]=2779096485^i.state.hash[s];i.update("SHA-512/"+this.options.length);var a=i.finalize();this.state.hash=[];for(var u=0;u<64;u+=4)this.state.hash.push(a.charCodeAt(u)<<24|a.charCodeAt(u+1)<<16|a.charCodeAt(u+2)<<8|a.charCodeAt(u+3))}}},{key:"processBlock",value:function(t){for(var e,r,n,i,s=this.state.hash[0],a=this.state.hash[1],o=this.state.hash[2],u=this.state.hash[3],h=this.state.hash[4],c=this.state.hash[5],l=this.state.hash[6],f=this.state.hash[7],p=this.state.hash[8],g=this.state.hash[9],d=this.state.hash[10],v=this.state.hash[11],y=this.state.hash[12],m=this.state.hash[13],x=this.state.hash[14],w=this.state.hash[15],b=0;b>>7,r=Le(this.W[b-30],this.W[b-29],1)^Le(this.W[b-30],this.W[b-29],8)^(this.W[b-29]>>>7|this.W[b-30]<<25),n=je(this.W[b-4],this.W[b-3],19)^je(this.W[b-4],this.W[b-3],61)^this.W[b-4]>>>6,i=Le(this.W[b-4],this.W[b-3],19)^Le(this.W[b-4],this.W[b-3],61)^(this.W[b-3]>>>6|this.W[b-4]<<26);var S=(65535&this.W[b-13])+(65535&this.W[b-31])+(65535&r)+(65535&i)|0,E=(this.W[b-13]>>>16)+(this.W[b-31]>>>16)+(r>>>16)+(i>>>16)+(S>>>16)|0,F=(65535&this.W[b-14])+(65535&this.W[b-32])+(65535&e)+(65535&n)+(E>>>16)|0,A=(this.W[b-14]>>>16)+(this.W[b-32]>>>16)+(e>>>16)+(n>>>16)+(F>>>16)|0;this.W[b]=4294967295&(A<<16|65535&F),this.W[b+1]=4294967295&(E<<16|65535&S)}e=je(s,a,28)^je(s,a,34)^je(s,a,39),r=Le(s,a,28)^Le(s,a,34)^Le(s,a,39),n=je(p,g,14)^je(p,g,18)^je(p,g,41);var C=g&v^~g&m,B=s&o^s&h^o&h,I=a&u^a&c^u&c,D=w+(i=Le(p,g,14)^Le(p,g,18)^Le(p,g,41))|0,P=x+n+(D>>>0>>0?1:0)|0;P=(P=P+(p&d^~p&y)+((D=D+C|0)>>>0>>0?1:0)|0)+Rr[b]+((D=D+Rr[b+1]|0)>>>0>>0?1:0)|0,D=D+this.W[b+1]|0;var R=r+I|0;x=y,w=m,y=d,m=v,d=p,v=g,p=l+(P=P+this.W[b]+(D>>>0>>0?1:0)|0)+((g=f+D|0)>>>0>>0?1:0)|0,l=h,f=c,h=o,c=u,o=s,u=a,s=P+(e+B+(R>>>0>>0?1:0)|0)+((a=D+R|0)>>>0>>0?1:0)|0}this.state.hash[1]=this.state.hash[1]+a|0,this.state.hash[0]=this.state.hash[0]+s+(this.state.hash[1]>>>0>>0?1:0)|0,this.state.hash[3]=this.state.hash[3]+u|0,this.state.hash[2]=this.state.hash[2]+o+(this.state.hash[3]>>>0>>0?1:0)|0,this.state.hash[5]=this.state.hash[5]+c|0,this.state.hash[4]=this.state.hash[4]+h+(this.state.hash[5]>>>0>>0?1:0)|0,this.state.hash[7]=this.state.hash[7]+f|0,this.state.hash[6]=this.state.hash[6]+l+(this.state.hash[7]>>>0>>0?1:0)|0,this.state.hash[9]=this.state.hash[9]+g|0,this.state.hash[8]=this.state.hash[8]+p+(this.state.hash[9]>>>0>>0?1:0)|0,this.state.hash[11]=this.state.hash[11]+v|0,this.state.hash[10]=this.state.hash[10]+d+(this.state.hash[11]>>>0>>0?1:0)|0,this.state.hash[13]=this.state.hash[13]+m|0,this.state.hash[12]=this.state.hash[12]+y+(this.state.hash[13]>>>0>>0?1:0)|0,this.state.hash[15]=this.state.hash[15]+w|0,this.state.hash[14]=this.state.hash[14]+x+(this.state.hash[15]>>>0>>0?1:0)|0}},{key:"finalize",value:function(){return this.addPaddingISO7816(this.state.message.length<112?112-this.state.message.length|0:240-this.state.message.length|0),this.state.message+="\0\0\0\0\0\0\0\0",this.addLengthBits(),this.process(),this.getStateHash(this.options.length/32|0)}}])}(yr);const kr=Tr;function Nr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Nr=function(){return!!t})()}var Or=[10097,32533,76520,13586,34673,54876,80959,9117,39292,74945,37542,4805,64894,74296,24805,24037,20636,10402,822,91665,8422,68953,19645,9303,23209,2560,15953,34764,35080,33606,99019,2529,9376,70715,38311,31165,88676,74397,4436,27659,12807,99970,80157,36147,64032,36653,98951,16877,12171,76833,66065,74717,34072,76850,36697,36170,65813,39885,11199,29170,31060,10805,45571,82406,35303,42614,86799,7439,23403,9732,85269,77602,2051,65692,68665,74818,73053,85247,18623,88579,63573,32135,5325,47048,90553,57548,28468,28709,83491,25624,73796,45753,3529,64778,35808,34282,60935,20344,35273,88435,98520,17767,14905,68607,22109,40558,60970,93433,50500,73998,11805,5431,39808,27732,50725,68248,29405,24201,52775,67851,83452,99634,6288,98083,13746,70078,18475,40610,68711,77817,88685,40200,86507,58401,36766,67951,90364,76493,29609,11062,99594,67348,87517,64969,91826,8928,93785,61368,23478,34113,65481,17674,17468,50950,58047,76974,73039,57186,40218,16544,80124,35635,17727,8015,45318,22374,21115,78253,14385,53763,74350,99817,77402,77214,43236,210,45521,64237,96286,2655,69916,26803,66252,29148,36936,87203,76621,13990,94400,56418,9893,20505,14225,68514,46427,56788,96297,78822,54382,14598,91499,14523,68479,27686,46162,83554,94750,89923,37089,20048,80336,94598,26940,36858,70297,34135,53140,33340,42050,82341,44104,81949,85157,47954,32979,26575,57600,40881,22222,6413,12550,73742,11100,2040,12860,74697,96644,89439,28707,25815,63606,49329,16505,34484,40219,52563,43651,77082,7207,31790,61196,90446,26457,47774,51924,33729,65394,59593,42582,60527,15474,45266,95270,79953,59367,83848,82396,10118,33211,59466,94557,28573,67897,54387,54622,44431,91190,42592,92927,45973,42481,16213,97344,8721,16868,48767,3071,12059,25701,46670,23523,78317,73208,89837,68935,91416,26252,29663,5522,82562,4493,52494,75246,33824,45862,51025,61962,79335,65337,12472,549,97654,64051,88159,96119,63896,54692,82391,23287,29529,35963,15307,26898,9354,33351,35462,77974,50024,90103,39333,59808,8391,45427,26842,83609,49700,13021,24892,78565,20106,46058,85236,1390,92286,77281,44077,93910,83647,70617,42941,32179,597,87379,25241,5567,7007,86743,17157,85394,11838,69234,61406,20117,45204,15956,6e4,18743,92423,97118,96338,19565,41430,1758,75379,40419,21585,66674,36806,84962,85207,45155,14938,19476,7246,43667,94543,59047,90033,20826,69541,94864,31994,36168,10851,34888,81553,1540,35456,5014,51176,98086,24826,45240,28404,44999,8896,39094,73407,35441,31880,33185,16232,41941,50949,89435,48581,88695,41994,37548,73043,80951,406,96382,70774,20151,23387,25016,25298,94624,61171,79752,49140,71961,28296,69861,2591,74852,20539,387,59579,18633,32537,98145,6571,31010,24674,5455,61427,77938,91936,74029,43902,77557,32270,97790,17119,52527,58021,80814,51748,54178,45611,80993,37143,5335,12969,56127,19255,36040,90324,11664,49883,52079,84827,59381,71539,9973,33440,88461,23356,48324,77928,31249,64710,2295,36870,32307,57546,15020,9994,69074,94138,87637,91976,35584,4401,10518,21615,1848,76938,9188,20097,32825,39527,4220,86304,83389,87374,64278,58044,90045,85497,51981,50654,94938,81997,91870,76150,68476,64659,73189,50207,47677,26269,62290,64464,27124,67018,41361,82760,75768,76490,20971,87749,90429,12272,95375,5871,93823,43178,54016,44056,66281,31003,682,27398,20714,53295,7706,17813,8358,69910,78542,42785,13661,58873,4618,97553,31223,8420,28306,3264,81333,10591,40510,7893,32604,60475,94119,1840,53840,86233,81594,13628,51215,90290,28466,68795,77762,20791,91757,53741,61613,62269,50263,90212,55781,76514,83483,47055,89415,92694,397,58391,12607,17646,48949,72306,94541,37408,77513,3820,86864,29901,68414,82774,51908,13980,72893,55507,19502,37174,69979,20288,55210,29773,74287,75251,65344,67415,21818,59313,93278,81757,5686,73156,7082,85046,31853,38452,51474,66499,68107,23621,94049,91345,42836,9191,8007,45449,99559,68331,62535,24170,69777,12830,74819,78142,43860,72834,33713,48007,93584,72869,51926,64721,58303,29822,93174,93972,85274,86893,11303,22970,28834,34137,73515,90400,71148,43643,84133,89640,44035,52166,73852,70091,61222,60561,62327,18423,56732,16234,17395,96131,10123,91622,85496,57560,81604,18880,65138,56806,87648,85261,34313,65861,45875,21069,85644,47277,38001,2176,81719,11711,71602,92937,74219,64049,65584,49698,37402,96397,1304,77586,56271,10086,47324,62605,40030,37438,97125,40348,87083,31417,21815,39250,75237,62047,15501,29578,21826,41134,47143,34072,64638,85902,49139,6441,3856,54552,73135,42742,95719,9035,85794,74296,8789,88156,64691,19202,7638,77929,3061,18072,96207,44156,23821,99538,4713,66994,60528,83441,7954,19814,59175,20695,5533,52139,61212,6455,83596,35655,6958,92983,5128,9719,77433,53783,92301,50498,10850,62746,99599,10507,13499,6319,53075,71839,6410,19362,39820,98952,43622,63147,64421,80814,43800,9351,31024,73167,59580,6478,75569,78800,88835,54486,23768,6156,4111,8408,38508,7341,23793,48763,90822,97022,17719,4207,95954,49953,30692,70668,94688,16127,56196,80091,82067,63400,5462,69200,65443,95659,18288,27437,49632,24041,8337,65676,96299,90836,27267,50264,13192,72294,7477,44606,17985,48911,97341,30358,91307,6991,19072,24210,36699,53728,28825,35793,28976,66252,68434,94688,84473,13622,62126,98408,12843,82590,9815,93146,48908,15877,54745,24591,35700,4754,83824,52692,54130,55160,6913,45197,42672,78601,11883,9528,63011,98901,14974,40344,10455,16019,14210,33712,91342,37821,88325,80851,43667,70883,12883,97343,65027,61184,4285,1392,17974,15077,90712,26769,21778,30976,38807,36961,31649,42096,63281,2023,8816,47449,19523,59515,65122,59659,86283,68258,69572,13798,16435,91529,67245,52670,35583,16563,79246,86686,76463,34222,26655,90802,60584,47377,7500,37992,45134,26529,26760,83637,41326,44344,53853,41377,36066,94850,58838,73859,49364,73331,96240,43642,24637,38736,74384,89342,52623,7992,12369,18601,3742,83873,83080,12451,38992,22815,7759,51777,97377,27585,51972,37867,16444,24334,36151,99073,27493,70939,85130,32552,54846,54759,60790,18157,57178,65762,11161,78576,45819,52979,65130,4860,3991,10461,93716,16894,66083,24653,84609,58232,88618,19161,38555,95554,32886,59780,8355,60860,29735,47762,71299,23853,17546,73704,92052,46215,55121,29281,59076,7936,27954,58909,32643,52861,95819,6831,911,98936,76355,93779,80863,514,69572,68777,39510,35905,14060,40619,29549,69616,33564,60780,24122,66591,27699,6494,14845,46672,61958,77100,90899,75754,61196,30231,92962,61773,41839,55382,17267,70943,78038,70267,30532,21704,10274,12202,39685,23309,10061,68829,55986,66485,3788,97599,75867,20717,74416,53166,35208,33374,87539,8823,48228,63379,85783,47619,53152,67433,35663,52972,16818,60311,60365,94653,35075,33949,42614,29297,1918,28316,98953,73231,83799,42402,56623,34442,34994,41374,70071,14736,9958,18065,32960,7405,36409,83232,99385,41600,11133,7586,15917,6253,19322,53845,57620,52606,66497,68646,78138,66559,19640,99413,11220,94747,7399,37408,48509,23929,27482,45476,85244,35159,31751,57260,68980,5339,15470,48355,88651,22596,3152,19121,88492,99382,14454,4504,20094,98977,74843,93413,22109,78508,30934,47744,7481,83828,73788,6533,28597,20405,94205,20380,22888,48893,27499,98748,60530,45128,74022,84617,82037,10268,78212,16993,35902,91386,44372,15486,65741,14014,87481,37220,41849,84547,46850,52326,34677,58300,74910,64345,19325,81549,46352,33049,69248,93460,45305,7521,61318,31855,14413,70951,11087,96294,14013,31792,59747,67277,76503,34513,39663,77544,52701,8337,56303,87315,16520,69676,11654,99893,2181,68161,57275,36898,81304,48585,68652,27376,92852,55866,88448,3584,20857,73156,70284,24326,79375,95220,1159,63267,10622,48391,15633,84924,90415,93614,33521,26665,55823,47641,86225,31704,92694,48297,39904,2115,59589,49067,66821,41575,49767,4037,77613,19019,88152,80,20554,91409,96277,48257,50816,97616,38688,32486,45134,63545,59404,72059,43947,51680,43852,59693,25163,1889,70014,15021,41290,67312,71857,15957,68971,11403,65251,7629,37239,33295,5870,1119,92784,26340,18477,65622,36815,43625,18637,37509,82444,99005,4921,73701,14707,93997,64397,11692,5327,82162,20247,81759,45197,25332,83745,22567,4515,25624,95096,67946,48460,85558,15191,18782,16930,33361,83761,60873,43253,84145,60833,25983,1291,41349,20368,7126,14387,6345,80854,9279,43529,6318,38384,74761,41196,37480,51321,92246,80088,77074,88722,56736,66164,49431,66919,31678,72472,8,80890,18002,94813,31900,54155,83436,35352,54131,5466,55306,93128,18464,74457,90561,72848,11834,79982,68416,39528,72484,82474,25593,48545,35247,18619,13674,18611,19241,81616,18711,53342,44276,75122,11724,74627,73707,58319,15997,7586,16120,82641,22820,92904,13141,32392,19763,61199,67940,90767,4235,13574,17200,69902,63742,78464,22501,18627,90872,40188,28193,29593,88627,94972,11598,62095,36787,441,58997,34414,82157,86887,55087,19152,23,12302,80783,32624,68691,63439,75363,44989,16822,36024,867,76378,41605,65961,73488,67049,9070,93399,45547,94458,74284,5041,49807,20288,34060,79495,4146,52162,90286,54158,34243,46978,35482,59362,95938,91704,30552,4737,21031,75051,93029,47665,64382,99782,93478,94015,46874,32444,48277,59820,96163,64654,25843,41145,42820,74108,88222,88570,74015,25704,91035,1755,14750,48968,38603,62880,87873,95160,59221,22304,90314,72877,17334,39283,4149,11748,12102,80580,41867,17710,59621,6554,7850,73950,79552,17944,5600,60478,3343,25852,58905,57216,39618,49856,99326,66067,42792,95043,52680,46780,56487,9971,59481,37006,22186,54244,91030,45547,70818,59849,96169,61459,21647,87417,17198,30945,57589,31732,57260,47670,7654,46376,25366,94746,49580,69170,37403,86995,90307,94304,71803,26825,5511,12459,91314,8345,88975,35841,85771,8105,59987,87112,21476,14713,71181,27767,43584,85301,88977,29490,69714,73035,41207,74699,9310,13025,14338,54066,15243,47724,66733,47431,43905,31048,56699,80217,36292,98525,24335,24432,24896,43277,58874,11466,16082,10875,62004,90391,61105,57411,6368,53856,30743,8670,84741,54127,57326,26629,19087,24472,88779,30540,27886,61732,75454,60311,42824,37301,42678,45990,43242,17374,52003,70707,70214,49739,71484,92003,98086,76668,73209,59202,11973,2902,33250,78626,51594,16453,94614,39014,97066,83012,9832,25571,77628,66692,13986,99837,582,81232,44987,9504,96412,90193,79568,44071,28091,7362,97703,76447,42537,98524,97831,65704,9514,41468,85149,49554,17994,14924,39650,95294,556,70481,6905,94559,37559,49678,53119,70312,5682,66986,34099,74474,20740,41615,70360,64114,58660,90850,64618,80620,51790,11436,38072,50273,93113,41794,86861,24781,89683,55411,85667,77535,99892,41396,80504,90670,8289,40902,5069,95083,6783,28102,57816,25807,24260,71529,78920,72682,7385,90726,57166,98884,8583,6170,97965,88302,98041,21443,41808,68984,83620,89747,98882,60808,54444,74412,81105,1176,28838,36421,16489,18059,51061,80940,44893,10408,36222,80582,71944,92638,40333,67054,16067,19516,90120,46759,71643,13177,55292,21036,82808,77501,97427,49386,54480,23604,23554,21785,41101,91178,10174,29420,90438,6312,88940,15995,69321,47458,64809,98189,81851,29651,84215,60942,307,11897,92674,40405,68032,96717,54244,10701,41393,92329,98932,78284,46347,71209,92061,39448,93136,25722,8564,77936,63574,31384,51924,85561,29671,58137,17820,22751,36518,38101,77756,11657,13897,95889,57067,47648,13885,70669,93406,39641,69457,91339,22502,92613,89719,11947,56203,19324,20504,84054,40455,99396,63680,67667,60631,69181,96845,38525,11600,47468,3577,57649,63266,24700,71594,14004,23153,69249,5747,43321,31370,28977,23896,76479,68562,62342,7589,8899,5985,64281,61826,18555,64937,13173,33365,78851,16499,87064,13075,66847,70495,32350,2985,86716,38746,26313,77463,55387,72681,72461,33230,21529,53424,92581,2262,78438,66276,18396,73538,21032,91050,13058,16218,12470,56500,15292,76139,59526,52113,95362,67011,6651,16136,1016,857,55018,56374,35824,71708,49712,97380,10404,55452,34030,60726,75211,10271,36633,68424,58275,61764,97586,54716,50259,46345,87195,46092,26787,60939,89514,11788,68224,23417,73959,76145,30342,40277,11049,72049,15472,50669,48139,36732,46874,37088,73465,9819,58869,35220,12120,86124,51247,44302,60883,52109,21437,36786,49226,77837,19612,78430,11661,94770,77603,65669,86868,12665,30012,75989,39141,77400,28e3,64238,73258,71794,31340,26256,66453,37016,64756,80457,8747,12836,3469,50678,3274,43423,66677,82556,92901,51878,56441,22998,29718,38447,6453,25311,7565,53771,3551,90070,9483,94050,45938,18135,36908,43321,11073,51803,98884,66209,6830,53656,14663,56346,71430,4909,19818,5707,27369,86882,53473,7541,53633,70863,3748,12822,19360,49088,59066,75974,63335,20483,43514,37481,58278,26967,49325,43951,91647,93783,64169,49022,98588,9495,49829,59068,38831,4838,83605,92419,39542,7772,71568,75673,35185,89759,44901,74291,24895,88530,70774,35439,46758,70472,70207,92675,91623,61275,35720,26556,95596,20094,73750,85788,34264,1703,46833,65248,14141,53410,38649,6343,57256,61342,72709,75318,90379,37562,27416,75670,92176,72535,93119,56077,6886,18244,92344,31374,82071,7429,81007,47749,40744,56974,23336,88821,53841,10536,21445,82793,24831,93241,14199,76268,70883,68002,3829,17443,72513,76400,52225,92348,62308,98481,29744,33165,33141,61020,71479,45027,76160,57411,13780,13632,52308,77762,88874,33697,83210,51466,9088,50395,26743,5306,21706,70001,99439,80767,68749,95148,94897,78636,96750,9024,94538,91143,96693,61886,5184,75763,47075,88158,5313,53439,14908,8830,60096,21551,13651,62546,96892,25240,47511,58483,87342,78818,7855,39269,566,21220,292,24069,25072,29519,52548,54091,21282,21296,50958,17695,58072,68990,60329,95955,71586,63417,35947,67807,57621,64547,46850,37981,38527,9037,64756,3324,4986,83666,9282,25844,79139,78435,35428,43561,69799,63314,12991,93516,23394,94206,93432,37836,94919,26846,2555,74410,94915,48199,5280,37470,93622,4345,15092,19510,18094,16613,78234,50001,95491,97976,38306,32192,82639,54624,72434,92606,23191,74693,78521,104,18248,75583,90326,50785,54034,66251,35774,14692,96345,44579,85932,44053,75704,20840,86583,83944,52456,73766,77963,31151,32364,91691,47357,40338,23435,24065,8458,95366,7520,11294,23238,1748,41690,67328,54814,37777,10057,42332,38423,2309,70703,85736,46148,14258,29236,12152,5088,65825,2463,65533,21199,60555,33928,1817,7396,89215,30722,22102,15880,92261,17292,88190,61781,48898,92525,21283,88581,60098,71926,819,59144,224,30570,90194,18329,6999,26857,19238,64425,28108,16554,16016,42,83229,10333,36168,65617,94834,79782,23924,49440,30432,81077,31543,95216,64865,13658,51081,35337,74538,44553,64672,90960,41849,93865,44608,93176,34851,5249,29329,19715,94082,14738,86667,43708,66354,93692,25527,56463,99380,38793,85774,19056,13939,46062,27647,66146,63210,96296,33121,54196,34108,75814,85986,71171,15102,28992,63165,98380,36269,60014,7201,62448,46385,42175,88350,46182,49126,52567,64350,16315,53969,80395,81114,54358,64578,47269,15747,78498,90830,25955,99236,43286,91064,99969,95144,64424,77377,49553,24241,8150,89535,8703,91041,77323,81079,45127,93686,32151,7075,83155,10252,73100,88618,23891,87418,45417,20268,11314,50363,26860,27799,49416,83534,19187,8059,76677,2110,12364,71210,87052,50241,90785,97889,81399,58130,64439,5614,59467,58309,87834,57213,37510,33689,1259,62486,56320,46265,73452,17619,56421,40725,23439,41701,93223,41682,45026,47505,27635,56293,91700,4391,67317,89604,73020,69853,61517,51207,86040,2596,1655,9918,45161,222,54577,74821,47335,8582,52403,94255,26351,46527,68224,90183,85057,72310,34963,83462,49465,46581,61499,4844,94626,2963,41482,83879,44942,63915,94365,92560,12363,30246,2086,75036,88620,91088,67691,67762,34261,8769,91830,23313,18256,28850,37639,92748,57791,71328,37110,66538,39318,15626,44324,82827,8782,65960,58167,1305,83950,45424,72453,19444,68219,64733,94088,62006,89985,36936,61630,97966,76537,46467,30942,7479,67971,14558,22458,35148,1929,17165,12037,74558,16250,71750,55546,29693,94984,37782,41659,39098,23982,29899,71594,77979,54477,13764,17315,72893,32031,39608,75992,73445,1317,50525,87313,45191,30214,19769,90043,93478,58044,6949,31176,88370,50274,83987,45316,38551,79418,14322,91065,7841,36130,86602,10659,40859,964,71577,85447,61079,96910,72906,7361,84338,34114,52096,66715,51091,86219,81115,49625,48799,89485,24855,13684,68433,70595,70102,71712,88559,92476,32903,68009,58417,87962,11787,16644,72964,29776,63075,13270,84758,49560,10317,28778,23006,31036,84906,81488,17340,74154,42801,27917,89792,62604,62234,13124,76471,51667,37589,87147,24743,48023,6325,79794,35889,13255,4925,99004,70322,60832,76636,56907,56534,72615,46288,36788,93196,68656,66492,35933,52293,47953,95495,95304,50009,83464,28608,38074,74083,9337,7965,65047,36871,59015,21769,30398,44855,1020,80680,59328,8712,48190,45332,27284,31287,66011,9376,86379,74508,33579,77114,92955,23085,92824,3054,25242,16322,48498,9938,44420,13484,52319,58875,2012,88591,52500,95795,41800,95363,54142,17482,32705,60564,12505,40954,46174,64130,63026,96712,79883,39225,52653,69549,36693,59822,22684,31661,88298,15489,16030,42480,15372,38781,71995,77438,91161,10192,7839,62735,99218,25624,2547,27445,69187,55749,32322,15504,73298,51108,48717,92926,75705,89787,96114,99902,37749,96305,12829,70474,838,50385,91711,80370,56504,56857,80906,9018,76569,61072,48568,36491,22587,44363,39592,61546,90181,37348,41665,41339,62106,44203,6732,76111,79840,67999,32231,76869,58652,49983,1669,27464,79553,52855,25988,18087,38052,17529,13607,657,76173,43357,77334,24140,53860,2906,89863,44651,55715,26203,65933,51087,98234,40625,45545,63563,89148,82581,4110,66683,99001,9796,47349,65003,66524,81970,71262,14479,31300,8681,58068,44115,40064,77879,23965,69019,73985,19453,26225,97543,37044,7494,85778,35345,61115,92498,49737,64599,7158,82763,25072,38478,57782,75291,62155,52056,4786,11585,71251,25572,79771,93328,66927,54069,58752,26624,50463,77361,29991,96526,2820,91659,12818,96356,49499,1507,40223,9171,83642,21057,2677,9367,38097,16100,19355,6120,15378,56559,69167,30235,6767,66323,78294,14916,19124,88044,16673,66102,86018,29406,75415,22038,27056,26906,25867,14751,92380,30434,44114,6026,79553,55091,95385,41212,37882,46864,54717,97038,53805,64150,70915,63127,63695,41288,38192,72437,75075,18570,52065,8853,30104,79937,66913,53200,84570,78079,28970,53859,37632,80274,35240,32960,74859,7359,55176,3930,38984,35151,82576,82805,94031,12779,90879,24109,25367,77861,9541,85739,69023,64971,99321,7521,95909,43897,71724,92581,5471,64337,98949,3606,78236,78985,29212,57369,34857,67757,58019,58872,96526,28749,56592,37871,72905,70198,57319,54116,47014,18285,33692,72111,60958,96848,17893,40993,50445,14186,76877,87867,50335,9513,44346,26439,55293,6449,44301,63740,40158,72703,88321,85062,57345,66231,15409,3451,95261,43561,15673,28956,90303,62469,82517,43035,36850,15592,64098,59022,31752,4370,50486,11885,23085,41712,80692,48492,16495,99721,36912,28267,27882,16269,64483,11273,2680,1616,46138,54606,14761,5134,45144,63213,49666,27441,86989,29884,54334,6740,8368,80051,81020,17882,74973,74531,94994,24927,64894,22667,20466,82948,66831,47427,76033,31197,59817,20064,61135,28556,29695,80179,74058,18293,9963,35278,13062,83094,23373,90287,33477,48865,30348,70174,11468,25994,25343,22317,1587,30682,1,67814,59557,23362,13746,82244,42093,24671,79458,93730,45488,60234,67098,9899,25775,332,36636,57594,19958,85564,58977,12247,60774,66371,69442,20385,14486,91330,50332,46023,75768,59877,60081,92936,72302,75064,85727,52987,5750,19384,33684,78859,80458,69902,34870,88684,49762,40801,86291,18194,90366,82639,53844,96326,65728,48563,26027,52692,62406,76294,41848,63010,69841,29451,36170,21529,16525,64326,22086,24469,57407,96033,37771,31002,18311,93285,31948,14331,58335,15977,80336,81667,27286,24361,61638,57580,95270,46180,76990,53031,94366,2727,49944,19278,5756,51875,53445,33342,1965,7937,10054,97712,87693,58124,46064,39133,77385,9605,65359,70113,90563,86637,94282,12025,31926,24541,23854,58407,32131,92845,20714,27898,26917,50326,35145,50859,72119,95094,29441,42301,62460,75252,94267,38422,73047,24200,85349,72049,91723,97802,98496,12734,73432,10371,57213,53300,80847,46229,7099,72961,13767,65654,31102,82119,96946,65919,81083,3819,57888,57908,16849,77111,41429,92261,45263,1172,55926,78835,27697,48420,58865,41207,21406,8582,10785,36233,12237,7866,13706,92551,11021,63813,71512,65206,37768,94325,14721,20990,54235,71986,5345,56239,52028,1419,7215,55067,11669,21738,66605,69621,69827,8537,18638,60982,28151,98885,76431,25566,3085,23639,30849,63986,73287,26201,36174,14106,54102,57041,16141,64174,3591,90024,73332,31254,17288,59809,25061,51612,47951,16570,43330,79213,11354,55585,19646,99246,37564,32660,20632,21124,60597,69315,31312,57741,85108,21615,24365,27684,16124,33888,14966,35303,69921,15795,4020,67672,86816,63027,84470,45605,44887,26222,79888,58982,22466,98844,48353,60666,58256,31140,93507,69561,6256,88526,18655,865,75247,264,65957,98261,72706,36396,46065,85700,32121,99975,73627,78812,89638,86602,96758,65099,52777,46792,13790,55240,52002,10313,91933,71231,10053,78416,54563,96004,42215,30094,45958,48437,49591,50483,13422,69108,59952,27896,40450,79327,31962,46456,39260,51479,61882,48181,50691,64709,32902,10676,12083,35771,79656,56667,76783,3937,99859,10362,57411,40986,35045,2838,29255,64230,84418,34988,77644,39892,77327,74129,53444,35487,95803,38640,20383,55402,25793,14213,87082,42837,95030,97198,61608,97723,79390,35290,34683,81419,87133,70447,53127,97146,28299,56763,12868,1145,12147,58158,92124,60934,18414,97510,7056,54488,20719,53743,91037,44797,52110,8512,18991,20129,31441,51449,14661,71126,23180,68124,18807,70997,21913,19594,70355,73637,68266,60775,43164,52643,96363,77989,79332,39890,65379,20405,52935,43816,92740,95319,4538,60660,28982,15328,80475,34690,2293,19646,46524,96627,33159,42081,8816,74931,20674,8697,66169,46460,46326,39923,60625,28386,22919,19415,75766,43668,31626,70301,67053,3949,70082,2303,48642,38429,94053,38770,68137,68441,52928,70244,91954,17401,92693,98342,21451,84988,80487,33807,73797,49494,41878,76635,83227,76618,11946,13451,87591,78381,21407,90038,72638,69692,51599,86413,32019,64856,74730,41531,11064,1790,58817,86400,66213,92599,70905,78324,54326,43659,34206,63132,38837,40210,96346,16967,81619,96503,14881,89405,32205,49508,98425,2451,35423,56072,36810,30332,85998,49358,92748,84147,79835,94867,41224,61794,35066,82220,66684,20096,2754,41731,37068,32753,91059,13407,5607,69384,53329,95909,44968,11397,92973,50014,92997,80968,93761,57598,74703,7768,37978,73873,33475,9720,97852,98449,48722,84977,11271,11728,68318,22312,78792,87508,88466,72976,47099,84126,38595,85124,64405,90020,7492,52413,95111,34455,86311,68892,1074,60274,28136,19328,38161,57475,13771,63562,84207,94121,18901,52768,33801,82087,86091,59969,90398,56870,55756,78841,98450,54165,55106,50343,70519,14567,36780,55450,19606,83749,67562,64765,38543,16585,86841,73742,8766,39252,75678,75379,78760,37279,15280,13558,95916,89759,76686,76467,67147,63110,94008,8037,35263,53710,16667,79008,11231,29397,67136,18601,64502,90228,89109,72849,22711,65547,34542,26686,81678,87765,77654,23664,96352,14106,32938,28083,18633,80286,65507,46197,52722,75476,77816,47204,34876,45963,79262,90181,84041,3745,90041,30780,27226,92847,85572,15308,80688,5761,82638,13464,23683,81015,54214,64175,43701,86845,15569,50687,52679,87696,8285,97444,47599,94472,64150,87753,68652,60726,26213,17320,64553,81285,98126,12158,52095,64833,492,35817,55571,91300,97812,37507,4209,53515,64342,21223,16662,43265,68219,3529,43636,68417,53640,95326,93381,37113,80751,76469,96677,43054,22937,31954,13266,34140,27253,2734,99070,60077,57988,93211,92795,83795,57477,3941,39007,14619,38320,93449,31336,25279,97030,26245,47394,39475,90621,23820,29344,94859,91604,14033,41868,14816,4075,66644,87803,97815,99552,78666,3942,8175,22345,19983,76783,99044,20851,84981,59052,77178,72109,76475,21619,73017,6812,56633,50612,55289,4671,84419,94072,94446,80603,32188,93415,23464,43947,43728,74284,67177,57105,31059,10642,13803,69602,46961,66567,19359,84676,63918,40650,12923,15974,79732,20225,92525,71179,4859,91208,60430,5239,61458,24089,68852,60171,29603,42535,86365,93905,28237,45317,60718,82001,41679,20679,56304,70043,87568,21386,59049,78353,48696,77379,55309,23780,28391,5940,55583,81256,59418,97521,32846,70761,90115,45325,5490,65974,11186,15357,3568,450,96644,58976,36211,88240,92457,89200,94696,11370,91157,48487,59501,56983,89795,42789,69758,79701,29511,55968,41472,89474,84344,80517,7485,97523,17264,82840,59556,37119,30985,48866,60605,95719,70417,59083,95137,76538,44155,67286,57897,28262,4052,919,86207,79932,44236,10089,44373,65670,44285,6903,20834,49701,95735,21149,3425,17594,31427,14262,32252,68540,39427,44026,47257,45055,95091,8367,28381,57375,41562,83883,27715,10122,67745,46497,28626,87297,36568,39483,11385,63292,92305,78683,6146,81905,15038,38338,51206,65749,34119,71516,74068,51094,6665,91884,66762,11428,70908,21506,480,94183,78484,66507,75901,25728,52539,86806,69944,65036,27882,2530,4918,74351,65737,89178,8791,39342,94963,22581,56917,17541,83578,75376,65202,30935,79270,91986,99286,45236,44720,81915,70881,45886,43213,49789,97081,16075,20517,69980,25310,91953,1759,67635,88933,54558,18395,73375,62251,58871,9870,70538,48936,7757,90374,56631,88862,30487,38794,36079,32712,11130,55451,25137,38785,83558,31960,69473,45950,18225,9871,88502,75179,11551,75664,74321,67351,27703,83717,18913,42470,8816,37627,14288,62831,44047,67612,72738,26995,50933,63758,50003,43693,52661,55852,52372,59042,37595,4931,73622,68387,86478,40997,5245,75300,24902,59609,35653,15970,37681,69365,22236,86374,65550,343,98377,35354,65770,15365,41422,71356,16630,40044,19290,66449,53629,79452,71674,30260,97303,6487,62789,13005,70152,22501,49867,89294,59232,31776,54919,99851,5438,1096,72269,50486,16719,6144,82041,38332,64452,31840,99287,59928,25503,8407,46970,45907,99238,74547,19704,72035,26542,54600,79172,58779,35747,78956,11478,41195,58135,63856,33037,45753,60159,25193,71838,7526,7985,60714,88627,75790,38454,96110,39237,19792,34534,70169,24805,63215,38175,38784,38855,24826,50917,25147,17082,26997,32295,10894,21805,65245,85407,37926,69214,38579,84721,23544,88548,65626,75517,69737,55626,52175,21697,19453,16908,82841,24060,40285,19195,80281,89322,15232,70043,60691,86370,91949,19017,83846,77869,14321,95102,87073,71467,31305,64677,80358,52629,79419,22359,87867,48296,50141,46807,82184,95812,84665,74511,59914,4146,90417,58508,62875,17630,21868,9199,30322,33352,43374,25473,4119,63086,14147,14863,38020,44757,98628,57916,22199,11865,42911,62651,78290,9392,77294,63168,21043,17409,13786,27475,75979,89668,43596,74316,84489,54941,95992,45445,41059,55142,15214,42903,16799,88254,95984,48575,77822,21067,57238,35352,96779,89564,23797,99937,46379,27119,16060,30302,95327,12849,38111,97090,7598,78473,63079,18570,72803,70040,91385,96436,96263,17368,56188,85999,50026,36050,73736,13351,48321,28357,51718,65636,72903,21584,21060,39829,15564,4716,14594,22363,97639,65937,17802,31535,42767,98761,30987,57657,33398,63053,25926,20944,19306,81727,2695,97479,79172,72764,66446,78864,12698,15812,97209,38827,91016,91281,57875,45228,49211,69755,99224,43999,62879,8879,80015,74396,57146,64665,31159,6980,79069,37409,75037,69977,85919,42826,6974,61063,97640,13433,92528,91311,8440,38840,22362,93929,1836,36590,75052,89475,15437,65648,99012,70236,12307,83585,414,62851,48787,28447,21702,57033,29633,44760,34165,27548,37516,24343,63046,2081,20378,19510,42226,97134,68739,32982,56455,53129,77693,25022,55534,99375,30086,98001,7432,67126,76656,29347,28492,43108,64736,32278,84816,80440,30461,818,9136,1952,48442,91058,92590,10443,5195,34009,32141,62209,43740,54102,76895,98172,31583,4155,66492,58981,16591,11331,6838,3818,77063,12523,45570,68970,70055,77751,73743,71732,4704,61384,57343,66682,44500,89745,10436,67202,36455,42467,88801,91280,1056,27534,81619,79004,25824,66362,33280,20706,31929,57422,18730,96197,22101,47592,2180,18287,82310,60430,59627,26471,7794,60475,76713,45427,89654,14370,81674,41246,98416,8669,48883,77154,9806,94015,60347,20027,8405,33150,27368,53375,70171,59431,14534,34018,85665,77797,17944,49602,74391,48830,55029,10371,94261,16658,68400,44148,28150,40364,90913,73151,64463,50058,78191,84439,82478,62398,3113,17578,12830,6571,95934,9132,25287,78731,80683,67207,76597,42096,34934,76609,52553,47508,71561,8038,83011,72577,95790,40076,20292,32138,61197,95476,23123,26648,13611,48452,39963,85857,4855,27029,1542,72443,53688,82635,56264,7977,23090,93553,65434,12124,91087,87800,95675,99419,44659,30382,55263,82514,86800,16781,65977,65946,13033,93895,4056,75895,47878,91309,51233,81409,46773,69135,56906,84493,34530,84534,38312,54574,92933,77341,20839,36126,1143,35356,35459,7959,98335,53266,36146,78047,50607,22486,63308,8996,96056,39085,26567,6779,62663,30523,47881,41279,49864,82248,78333,29466,48151,41957,93235,53308,22682,90722,54478,7235,34306,15827,20121,96837,6283,80172,66109,92592,48238,76428,94546,45430,16288,74839,740,25553,83767,35900,5998,7493,46755,11449,88824,44906,33143,7454,56652,34755,63992,59674,65131,46358,12799,96988,51158,73176,1184,49925,63519,11785,29073,72850,47997,75172,55187,15313,40725,33225,56643,10465,38583,86440,97967,26401,17078,38765,33454,19136,57712,48446,98790,27315,71074,10157,57946,35582,49383,61324,26572,84503,3496,60449,17962,26017,65651,40400,83246,80056,75306,75147,41863,25581,87530,33193,43294,5065,99644,62771,75986,79005,44924,18703,40889,4403,5862,2571,82500,74200,36170,46836,74642,65471,26815,30937,64946,10160,15544,31962,54015,28853,66533,14573,79398,47391,73165,47805,77589,16881,13423,89452,76992,62509,9796,57540,13486,48855,25546,47589,21012,47388,78428,70196,84413,81026,87597,22445,83769,85937,38321,85485,87359,9839,67228,71179,94372,4446,62801,50775,96179,40646,44272,12417,47199,39701,30665,32775,66525,53558,78882,31939,67209,38906,34533,99914,27719,216,99225,96537,3843,90564,91110,51838,30300,9559,37795,94880,11325,44979,89696,28129,29931,89971,46292,92710,11036,74760,75307,12291,49618,16293,92408,67928,80823,32872,25460,66819,35374,4035,99087,61129,11341,39118,10891,37217,63638,75477,30068,42334,57570,6890,59353,89939,37692,15232,20033,32202,22348,2766,96791,58448,92248,5769,96684,67885,99295,47271,38655,59513,96960,31718,8974,16122,20535,52380,29769,70660,57425,50891,75044,84257,73315,38181,28673,93140,26307,82265,78382,19681,56585,8975,76764,39956,83450,84663,89963,71584,57696,30829,60527,64947,34899,28805,28397,91830,51842,99838,39839,66971,67177,74219,35637,35634,93581,81746,29991,81096,94279,2968,62561,2479,82126,25702,67953,88088,50293,83423,86206,39935,23253,43041,48941,85787,8388,6671,43574,84908,67295,33623,55060,28174,48415,2529,22009,24524,5283,30460,32399,80423,56929,40852,69969,88541,5979,91496,64730,57198,83145,39750,3568,54669,98679,4297,51047,31492,47734,31343,31180,232,19707,24823,75079,73943,17997,8446,91252,39879,58682,82972,18417,39203,36681,42895,8459,15618,17941,52594,43277,16530,40052,91100,87422,47230,95699,49794,50492,87439,86354,4546,65333,11057,77727,19748,38722,91821,18107,42125,89239,28847,54623,38783,47803,31414,38450,3697,89186,30579,44188,26532,8420,80723,48100,60748,76330,45832,8311,16051,4475,13400,48527,46073,17439,56498,94632,9021,16871,83366,14896,4219,38375,87890,90217,42370,61028,85101,76771,83715,94737,69973,74187,1958,59691,86712,86570,60984,76342,13648,85250,28323,48379,45141,36277,51845,29039,3553,5128,59866,51281,68124,17007,24729,29710,41439,40574,11774,86746,89698,56020,37810,88972,11361,95583,70786,589,74473,87513,17690,61427,72914,32517,1804,97910,6327,30246,33049,2622,41026,80875,41293,16752,84225,84414,37137,68956,8095,64981,28180,38629,76962,23840,17477,75268,48297,70340,57888,13938,38554,86836,2195,30270,55484,53364,54705,41380,56316,37723,234,21424,26664,63804,75139,36534,18579,9833,98849,72762,59767,52497,24227,83152,71794,21398,99456,89215,51632,54799,27973,68568,68465,98500,28681,18369,24279,96335,12874,82160,67202,85199,27908,67022,49810,77929,96212,81153,77884,7032,1671,53362,28119,56786,30883,28540,76029,3774,64611,19736,25589,46569,45206,48215,69523,17423,91807,90039,30393,58319,85098,66519,57571,24541,3562,14400,62731,82534,61477,89731,18421,29861,52829,838,78040,43350,74323,82892,84746,28302,13264,7595,134,12933,46831,24864,47275,20527,9110,28485,30326,99826,64005,99308,65779,42760,90066,3974,38688,39968,32604,11694,46262,73262,45405,43923,67397,88228,56405,17839,92073,57622,93328,15442,50186,7570,58001,31e3,8915,11467,14793,82691,51238,12485,51745,18192,5985,36826,89434,38669,91592,88799,65621,67237,59541,19657,93402,58705,73553,78280,69125,95591,81168,91927,25976,89077,71690,19404,64603,59752,74698,44233,67602,38615,31303,28650,53700,89819,7783,4351,77451,47350,21234,16016,41532,76508,23063,44993,43983,33356,61715,96485,22121,78004,6316,87896,99289,93981,37850,66128,92735,45064,50924,24204,58816,65290,34392,55567,66416,72353,45775,68590,85685,72683,60090,37149,85347,57414,72336,12979,5720,92754,76911,96883,74420,5220,85815,23557,80567,44365,70254,50864,36619,51479,23281,76428,18580,34240,59289,49076,18439,29522,42541,4024,84446,92434,90407,77241,19690,78143,65919,13699,91844,91241,38361,67171,90551,5709,3474,76025,97043,33834,44638,54040,82797,545,38159,16089,35870,89158,55864,98078,50563,36492,10994,85909,9018,19252,73887,67928,60045,70782,11937,4074,53814,46621,52577,94853,45968,73667,65062,73306,76045,78649,91654,53958,96537,95542,67622,54579,17279,67440,56441,20681,64011,52226,96618,32831,60664,67547,39523,2043,59748,1887,69229,94653,99271,98164,62155,9234,47367,13047,6364,35064,10073,6793,80248,29009,44969,11129,17139,79630,89772,26921,56949,23465,30036,17173,82459,96218,60768,76417,24405,18710,68887,82394,69729,82503,40873,41590,67255,30757,9657,91881,34578,9511,5417,58953,18532,10721,22029,48524,47778,881,83489,3464,57462,97459,86689,39755,39547,740,36666,7993,31671,86304,12970,73402,52849,31652,79655,11250,18463,57518,20306,25301,1374,51208,33298,87662,61849,60923,68685,69411,39266,80320,34844,89416,81569,83651,35795,40168,33501,1042,58931,3892,85188,74740,85476,23790,33842,89565,53359,25579,59049,62394,72435,12457,21904,18370,97035,57905,9581,91227,92754,37760,1411,7440,87175,88318,63242,85960,56690,12618,30493,11569,73723,7448,58830,157,65814,21118,22140,73793,57855,81830,6795,13183,12625,30635,56429,73216,12342,36722,83886,96828,82870,90954,97614,2370,42160,73370,11944,49067,59452,80495,43911,46712,17033,68037,41963,3874,44856,82985,57453,84358,16120,4454,76624,405,62369,55080,61880,51270,87807,10653,36894,70850,35660,234,14705,93418,94084,82856,25384,71555,56754,78315,18291,91656,98079,52384,43306,65205,75903,58701,99496,50048,33557,87793,90857,10143,46726,84284,43635,41213,83845,70986,91408,80220,5728,68890,46577,21152,43759,43301,93661,97252,50106,10099,13722,18572,44024,351,18173,23717,85114,85998,57782,63951,53723,86853,63851,79430,49181,46386,69666,55743,76162,71724,40028,94786,34457,16906,90040,30789,40281,94697,96584,81907,4055,53990,66397,80579,42517,78181,39251,9467,67097,95523,66568,63632,71048,15581,39904,75774,77495,75994,29911,65690,41178,47712,70355,16998,56025,5230,10093,71495,34784,70950,54680,57811,53782,39145,36829,85342,40406,35883,45668,3459,29870,78252,70088,70621,67153,5737,40933,91075,93335,86853,15860,81167,91259,16118,52401,83593,84474,2423,75608,39646,90871,70284,82100,96032,5115,63678,2225,88087,58581,44364,57468,21539,13042,64150,63754,5210,87644,54114,64013,63562,41388,32397,74152,23982,71982,71700,33026,66477,47838,46712,39848,35083,65927,97868,11067,76771,71799,43836,41014,97025,93225,8511,63096,26628,73012,12543,76269,99708,2629,49845,73677,19193,14924,57236,95564,15010,59667,73773,78515,2624,99744,13585,33746,58771,94785,62628,99585,11363,80832,59979,9444,78700,2596,85984,69438,16913,96475,93283,18625,77086,45911,39746,64722,39938,43930,54619,302,50384,2738,75714,75249,95439,80714,52555,47266,96190,78750,94973,83669,16479,53163,48071,28e3,45011,26733,67132,83362,84162,43028,8415,27236,52651,89059,64844,80910,1676,91752,57815,26264,3415,57532,29981,61200,96036,62600,20068,56530,38487,8432,89514,26883,69165,97237,22361,55276,39902,95927,82190,49269,27212,46095,37106,64254,27460,49572,51700,27679,12574,33891,3867,9925,6476,82018,45094,59014,67113,44192,75,23318,79895,70550,81717,28833,30271,15821,14999,88174,62617,57517,55256,50281,51583,96879,5225,42272,5339,20483,57596,41011,75937,22767,50120,95938,49753,63882,99616,69083,38721,73889,80236,99531,23053,71237,48861,59046,76283,60538,19732,93877,30345,64882,66660,17026,70364,45676,8039,96228,89936,59141,95585,89552,97247,59325,27848,80058,15950,61481,90906,40998,44137,16144,66300,44091,50018,81364,18211,60294,76559,20279,27414,10589,39860,23e3,31767,95618,56738,50332,16936,70342,92481,30702,76264,62619,68678,62284,83112,93032,55203,52614,36950,41796,45403,79262,2887,53596,61308,20738,34811,27099,90956,65448,3080,75795,29753,97699,80872,23830,85882,74427,99523,74904,28017,45898,57232,48525,7086,26805,74533,92470,18840,76011,93109,14344,55614,50284,15865,19458,35856,13464,53679,64603,51571,56124,79107,29596,89572,78198,57121,73649,8804,87977,87959,70859,40909,77295,87877,75158,62810,92074,23244,59516,50552,31602,41899,6347,27821,68370,48596,88577,30231,25267,84622,31449,12086,56461,22962,78213,62483,93966,60437,52239,58113,32526,38708,81607,57016,1695,90110,4649,59990,23979,3855,10297,46516,96092,82305,30760,78756,4967,82876,4773,86651,16648,53133,82439,78851,49766,24553,15273,36417,1901,33386,76979,25920,33372,2695,11982,40911,6230,91696,43907,17827,30332,89203,32215,91806,23080,49102,9174,11548,54590,75803,66108,73882,62324,26017,72716,33887,1285,31604,71039,24337,53514,58964,89901,22040,92751,12617,37007,5523,61672,62557,98540,26094,60284,19621,96230,38044,6545,9458,42988,2913,86345,67936,90174,40840,44991,24256,34989,74086,13652,68706,1363,4294,88008,78693,83068,94746,221,89299,53186,5930,61889,51341,45412,58860,72568,11381,59785,36887,10690,31347,93326,96267,86987,57565,86836,49071,90331,41248,34629,30240,27270,3864,84308,3035,61369,36902,51017,44409,17120,23823,36460,63359,8333,63173,19134,6493,303,18550,26191,19051,81502,66343,6737,90430,65478,58982,82484,16483,47704,44640,68322,44548,72787,2335,28749,39320,5436,98146,56596,812,51445,35533,35478,47573,38414,25542,38032,13442,42983,97207,77854,57806,81616,52828,79429,47389,96795,57764,19605,24767,63253,18809,65093,44449,22952,76872,30983,38948,9310,48336,87651,27110,84427,76209,56412,12760,16747,14551,82626,31224,98636,75100,84882,79479,83420,5347,6803,90063,4617,40257,79183,41766,71873,25242,12275,336,40798,42055,74066,69128,32547,76508,32530,42359,89207,49758,58984,92732,15779,7234,28884,28226,50011,35883,99606,45423,76224,75427,85747,33879,97978,57441,927,19164,74716,40702,19715,70917,60344,40236,9019,50577,15598,53136,57285,20536,7539,74832,89184,41501,39447,97422,97041,21913,40581,76081,13089,28776,54164,55736,36263,71841,34488,74988,55467,43322,9214,36746,67981,71877,81683,32461,84091,19422,88366,62054,85664,13409,8003,88276,6989,16607,33633,85349,5784,25950,97998,74110,16699,60184,92818,79705,10381,1474,18656,50434,18232,92132,66537,70141,42854,25120,39581,28249,14215,34810,19767,3409,11807,6566,66138,42997,41999,67504,87117,28961,5e3,29673,77726,73225,54753,69712,71576,92337,17713,63185,87923,91889,68351,17712,75532,93849,48280,62219,317,25290,29209,90927,92929,92762,60413,2018,31793,76290,73373,80777,60819,77375,57886,47291,99670,32605,29064,99476,80999,31217,35,91300,14892,73653,26593,25305,56797,12837,39560,27582,37253,38531,76489,49946,69108,58687,43092,73807,96282,6648,67431,87124,57694,21660,64002,6,33600,30245,60636,80164,9285,61426,4658,54130,14710,76553,1904,93668,63110,98618,5601,32199,74923,98049,49717,55539,35940,58545,43295,35810,45451,38735,42065,66769,69825,45461,83881,67372,67351,90612,79502,69460,23108,74421,82990,46821,40683,71603,55267,48192,50242,79738,96417,6664,19929,23644,41116,51056,219,45086,32747,49492,15399,24874,80825,95928,61457,45813,59037,16136,3953,83583,5910,12654,53630,92997,22168,93491,71897,74579,24022,6278,24049,71670,43044,8474,38572,77402,35800,7455,96177,41653,74493,20802,65843,73050,73349,2638,65813,96209,49196,45007,32207,14097,66059,46681,7534,71263,20582,10171,51514,52142,60961,57951,25637,37860,21683,86190,90434,94481,85697,95344,2606,74095,61133,7472,64777,94050,41482,975,23471,76052,82021,87676,91345,20196,2612,86299,44996,40312,65712,46079,88514,8610,3685,63197,9073,53105,86824,28112,99306,40706,66840,83003,51590,52755,32285,68454,85058,13645,23073,24724,52989,71880,21952,44144,74975,76715,7844,46447,86643,75579,29276,10864,83179,36721,19300,35066,29383,47478,56644,33354,31414,17643,92374,85085,88458,87191,85248,34963,76278,53230,13953,76985,70959,36663,5293,32658,56767,56997,76736,6558,64248,11907,29123,78458,17678,63805,89973,5076,39263,54404,4355,64957,74407,99838,18836,78098,6490,74888,73719,80675,86178,56283,33591,96957,38382,18772,74773,71229,2603,52673,44609,14843,58418,18060,95459,626,30914,13550,42195,44863,8871,89182,64446,78422,41140,15312,98274,48168,95651,35562,85386,56252,72136,85088,68761,78434,98143,61330,2446,64409,49406,99127,98626,55095,44808,13594,87370,89472,12833,98932,68064,58193,20225,5192,28425,23978,24542,80845,55858,4015,21454,37346,51007,17202,10242,12682,55933,96922,22280,75597,50227,70712,44236,20470,36320,49339,60536,80083,38880,93327,49522,93585,9918,55268,4671,57526,11457,48424,54610,7211,78610,9473,72923,27347,30057,76968,26177,59367,46172,88951,40229,34921,60405,88959,16779,29547,92231,61997,36002,21080,39795,77221,10012,49748,76900,15964,3803,40260,92351,92844,10288,57483,10881,70408,75688,16610,1638,93082,44282,66849,75702,69428,34047,84968,71281,72328,73143,88672,49802,50639,18129,93659,58389,49095,45971,34196,84609,59222,19332,17777,41004,47057,30688,16039,20906,41477,42915,60877,33864,75195,62294,3371,11672,1370,2486,35553,17907,90621,45136,9722,67635,12114,63055,16004,21625,24321,20491,26881,66259,94287,54751,36242,36557,5842,30687,65418,94608,24741,45887,78800,86912,42076,50287,9284,68891,76368,83094,96302,35997,30761,97081,9501,68887,32876,1705,34260,95065,45528,88241,30402,12318,52430,40139,96986,84900,72408,42027,31676,54382,73370,26184,14024,57444,57660,52173,30274,93448,63273,77681,74946,2099,69091,19372,66961,14595,58642,75760,52253,53148,26074,52293,65359,63971,4833,86492,1227,54505,19515,89889,46933,13364,33883,83389,36952,52505,67513,40071,31001,3105,87912,29610,75108,37363,28479,43546,89992,19550,54863,82633,19209,21548,35022,21960,57961,11815,95867,559,26428,69386,57453,70147,73538,49562,46806,64550,36653,25718,68792,31113,7607,48037,71020,22666,65957,11141,39227,7990,19849,65972,74528,40888,55386,95918,92088,91125,53648,66122,138,79933,71058,34826,97725,69513,22915,18246,52244,91161,40861,40374,13239,56162,4703,95851,22824,41271,28202,62852,84238,46625,20031,8524,20077,65817,21174,29279,57712,22401,67500,30980,74485,26480,21343,30031,61921,35744,57308,71196,1865,49234,62616,54021,29008,83672,85839,96836,45077,80900,66906,63526,93824,71820,11033,20183,85704,4683,63512,39144,56880,64424,95979,17709,94849,31771,5737,84286,16757,46256,24478,73180,59978,8254,78963,95437,86351,33824,32540,18357,2668,99260,21284,81351,70961,10255,6911,47394,72408,23827,59865,96395,30665,43699,3593,29165,23388,26628,92402,16731,86740,29493,9069,78653,90094,42735,33682,95041,89887,92369,57949,81585,50593,14698,4737,72551,57271,59433,156,33966,58773,59108,49578,18100,59836,73221,21110,1650,11058,47770,66141,84576,58388,40915,94507,32209,17272,65674,95552,25685,5345,36995,36302,7971,67001,62062,75939,36005,26739,56484,46885,66348,87666,78055,44485,82955,85936,9219,1847,92687,72579,45457,78252,98239,4e4,75563,92408,17175,78845,32638,26959,35406,59553,57852,7506,9,93172,77713,93880,40981,27924,9678,24538,52426,84852,83781,23712,82490,77890,22482,66668,55850,25644,44972,62275,78089,28894,98685,32998,98766,89119,34355,75127,69797,71419,62067,57990,96514,50603,79807,26135,29207,43632,32905,38513,18924,88872,20758,70232,60425,1116,24077,21369,93541,75329,78656,44251,42014,98154,42552,14575,30765,348,1134,71581,68420,78141,21105,63305,9718,54851,65867,8595,47390,39182,51174,41478,64433,59628,31945,87322,78667,95282,5622,26224,19972,97269,98376,14779,51138,49658,45345,4972,52794,15737,496,48939,63485,42780,16061,59631,37171,13483,56058,51093,62290,88227,17400,88433,67363,89507,26482,85964,71336,67799,28342,37747,61722,27180,78755,18603,42953,6606,23875,56766,1932,36113,62807,84012,21103,9685,69662,76755,13701,95168,13169,44726,15284,16702,89617,54397,52052,12835,37741,86434,22400,37947,95763,86337,35189,22756,47473,16618,42479,47405,14055,64262,66670,89692,54032,94591,44149,29854,76691,33263,62048,25116,88598,16119,62116,54517,31883,86707,18895,81790,71294,2684,15292,48107,14341,91416,75609,92564,39987,2283,89970,95855,80970,5432,89860,90293,99851,94648,5598,32171,28793,92305,64244,8277,93391,96717,34464,29838,10664,28050,60122,77934,10758,84922,92220,45071,97697,36368,17792,84792,76594,67319,51886,5665,45201,11348,9254,7510,51039,91683,84500,85338,5555,19633,3870,39576,41486,58524,54508,20707,58504,39642,22454,80069,83455,31043,90794,51934,3295,26582,16300,74990,22197,83310,69642,81113,58558,84833,17105,46659,25003,85749,44829,4103,67516,76458,52392,53546,70291,98846,67315,30686,18555,29755,5923,22732,19501,56181,85351,5023,4808,56911,16793,75336,49712,27723,96974,34321,5454,12862,71924,45928,95697,68664,58183,78104,42483,71204,99628,40642,56410,17350,13396,76724,87509,9158,83708,27298,92651,95086,38851,63558,89810,1580,32518,35795,26514,56322,78635,63731,91428,7247,66460,38671,26799,22549,47991,46064,80467,40083,17141,39152,99872,27561,75389,74778,94893,82935,99076,93419,10474,84436,47536,16719,60136,80566,28404,74525,74212,3704,65516,98197,34210,64140,22238,49939,99542,27481,21992,78181,90060,71365,66935,29578,14961,8569,9454,43308,66753,45972,93572,16382,87320,37183,25478,38164,31997,69856,60898,63968,62264,4799,17591,89937,73905,55890,88285,2448,40398,54180,65869,45155,43407,39105,339,51619,20203,21189,68245,76912,1222,76411,82679,7,66047,32043,42627,16638,27019,15248,66444,8249,18790,82150,54084,84469,3426,50226,99868,88894,43769,66384,8593,41414,2976,60053,51866,87904,74135,53842,59520,67482,16995,32328,29555,49067,2799,68851,41049,97190,53984,99755,46412,45885,64e3,21962,36438,71742,57223,66599,86071,31436,32667,98099,38399,47377,5171,2742,48803,17823,22093,9866,691,5514,25546,2114,5919,56181,96052,67211,61712,25995,3188,23833,38549,44775,55355,61548,55988,47309,23749,30667,70732,33299,16127,30842,78961,41072,9876,18903,30292,25275,61881,15939,72573,84502,92654,97226,53434,77025,63892,12421,33644,39445,30933,84218,13757,37719,84450,2697,60309,22402,80310,92771,45205,72792,95776,85945,74651,216,50842,47854,21916,61588,75405,10495,83083,60427,78495,99809,47890,22993,21508,9459,26845,98130,1184,46438,27698,40652,65654,98517,1096,6998,49133,57041,77983,58708,42176,67356,324,70063,10597,65205,25622,34336,16640,27896,26907,86760,48244,89650,44997,51609,28934,9171,97859,97213,19859,41037,64081,94781,27683,41521,52871,86935,26486,38744,25943,60617,6414,42292,46204,53262,30201,38776,88831,97253,67282,72860,18452,60927,81504,57713,30296,10896,39900,67135,42772,4631,55283,39253,25264,1809,12874,88035,88421,90491,83290,6884,15444,90113,20406,20796,40239,34431,15018,45600,17241,26611,9551,89126,65673,31708,91252,39647,63011,24193,58932,89326,33491,53217,27976,70151,37531,53576,23931,11789,73073,52171,89301,51718,15385,79487,66436,35771,34163,86540,42665,80748,77622,14679,40185,25030,42622,13162,17048,24243,59985,59807,60562,3595,10135,29199,69784,59796,38194,58432,50943,40422,63035,3208,81440,90749,88046,32218,88092,22224,2627,91576,16781,43948,57795,71073,27817,87077,82717,24473,42096,76920,88864,90537,14715,42551,45066,24316,37361,38582,21871,14672,93362,21727,57021,94313,39562,64985,94028,46094,43845,91838,79574,7597,3153,56783,18817,74711,6883,91061,31674,73729,99315,66183,57647,74484,68077,33224,397,56753,53158,71872,68153,9298,20961,49656,33407,95683,14328,44708,72952,27048,67887,28741,46752,88177,95894,40086,88534,87112,68614,83073,88794,96799,67588,75049,84603,83140,97347,87316,73087,77135,71883,98643,3808,8848,14133,60447,1366,72976,1868,51667,63279,60040,88264,79152,3474,61366,20523,21584,93712,83654,89761,90154,96345,37539,32556,74254,70603,97122,44978,78028,8943,13778,11080,34271,68276,85372,48410,94516,15427,75323,71685,70774,50342,33771,3678,42321,69788,41758,55004,30992,17402,63523,42328,87171,24751,15084,33884,83655,88345,69602,52606,57886,18034,3381,75796,35901,77480,28683,68324,66035,7223,14926,16128,13645,90370,31949,11057,98849,29499,21565,30786,83292,92392,37104,36899,49906,79368,43710,80365,88735,75275,21664,57965,19002,301,12658,94385,1717,96191,50404,80166,93965,24688,27839,10812,31715,92127,42588,93307,80834,11317,26583,25769,98227,14884,58462,29148,68662,26872,72927,79021,51622,29521,33355,45701,45996,33782,93424,16530,96086,17329,74020,11501,46660,5583,22277,77653,55430,84644,448,86828,58855,67451,95264,67386,82424,52611,60012,88620,72894,94716,22262,99813,69592,63464,33163,91857,47904,22209,78590,68615,52952,31441,41313,18550,72685,68825,4795,53971,14592,39634,23682,76630,2731,81481,86542,23727,54291,56045,61635,32186,9355,73416,63532,24340,18886,84832,30654,48543,18339,65024,91197,64624,74648,9660,27897,49771,11123,8732,49393,12911,72416,17834,18878,62754,85072,23727,56577,51257,83291,12329,16203,91681,68137,79959,43609,58987,2026,42969,59144,84349,75214,76972,22633,64104,53799,16851,99197,70476,77113,46320,88693,37711,96536,68156,7119,2104,49435,77706,18924,24957,92406,87148,70482,36491,42605,54440,7893,31618,35707,65130,30007,75706,77266,37100,9601,87681,42543,69847,81848,32034,49429,99434,62209,17125,55227,61634,52574,83649,28725,70119,62467,80676,21192,99584,21310,25292,72781,17186,10393,98390,19789,92931,36234,62627,23437,3885,58822,82941,43806,8172,23790,72295,36196,98200,2889,87619,13846,56197,27151,21238,48794,81100,62643,40001,39243,33213,78416,194,91369,79342,36404,52308,13741,24442,88610,12659,11574,70052,93039,79367,41792,61816,35435,47192,97596,28330,41145,16918,62865,9576,45857,68737,90124,16703,7071,48433,57222,34435,800,72496,16449,68187,28739,97672,86818,50768,40807,88681,64340,2224,19703,59245,90905,31239,84216,93942,97371,16842,92168,52692,16064,84686,89444,27938,98406,41365,4515,20494,18813,16242,10634,61566,18592,78057,8720,33739,78345,87693,30242,70545,55521,23687,9160,8655,38811,61768,7228,5567,5561,82071,85,50145,23113,97761,88441,14891,72188,85166,37189,75671,81377,92470,73645,93258,6610,12185,43065,26704,47922,56650,7527,18006,56948,51675,16658,66402,1047,81624,77395,62310,73262,66050,57275,32936,87641,51528,58183,21952,84098,28913,28622,18140,89796,41317,93954,67690,64667,57092,21315,4731,76115,77291,11204,8634,93034,27411,27149,13843,9817,9407,84492,28444,59901,14592,89654,66207,66232,80293,74502,36925,55515,10121,16768,4720,71502,40500,21406,571,87320,81683,42788,86367,44686,22159,67015,35892,49668,83991,72088,30210,74009,86370,97956,2132,93512,54819,26094,51409,21485,94764,85806,13393,48543,7042,76538,64224,47909,9994,23750,17351,52141,30486,60380,86546,66606,36913,58173,45709,83679,82617,23381,9603,61107,566,6572,64745,10614,86371,43244,97154,10397,50975,68006,20045,16942,25536,74031,31807,70133,78790,40341,68730,39635,39013,66841,44043,96215,21270,59427,25034,40645,84741,52083,54503,36861,27659,95463,53847,40921,70116,61536,56756,8967,31079,20097,76014,99818,16606,19713,66904,27106,24874,96701,73287,76772,6073,57343,51428,91171,28299,17520,64903,4177,36071,94952,59008,28543,11576,74547,13260,20688,41261,2780,6633,37536,8844,95774,49323,30448,14154,83379,71259,23302,68402,43750,88505,15575,44927,6584,29867,21541,65763,12154,86616,79877,73259,68626,98962,68548,86576,48046,51755,64995,3661,64585,81550,46798,49319,50206,22024,5175,12923,23427,55915,91723,55831,83784,81034,86779,34622,84570,18960,48798,42970,95789,39465,82353,68905,44234,18244,54345,5592,89361,14644,67924,66415,89349,88530,72096,44459,5258,48317,48866,56886,90458,75889,4514,37227,11302,4667,2129,80414,86289,15887,87380,50749,83220,50529,20619,11606,36531,23409,78122,19566,76564,33045,66703,30017,35347,35038,12952,13971,3922,98702,11786,38388,69556,76728,60535,59961,23634,42211,98387,34880,27755,93182,99040,96390,65989,38375,3652,59657,57431,24666,11061,64713,85185,72849,58611,31220,26657,77056,24553,24993,5210,89024,32054,46997,92652,28363,98992,22593,97710,47766,37646,93573,95502,33790,92973,27766,62671,89698,10877,73893,41004,96035,18795,48080,59666,30241,35233,87353,43647,13404,41982,19264,29229,61369,8309,39383,42305,25944,13577,51545,68990,69801,37145,79189,55897,57793,66816,21930,56771,79296,73793,21632,42301,23696,72641,56310,85576,3004,25669,69221,32996,23040,65782,23712,13414,10758,15590,97298,74246,51511,46900,36795,38292,3852,6384,84421,3446,91670,45312,27609,87034,6683,83891,88991,16533,9197,34427,60384,48525,90978,46107,21693,12956,21804,46558,37682,81207,85840,53238,35026,4835,53264,41376,17783,64756,39278,25403,33042,20954,31193,24247,45911,92453,25370,86602,48574,57865,26436,16122,76614,17028,21262,59718,77821,14036,31033,90563,45410,15158,90209,84089,38053,60780,54166,14255,33120,27171,71798,91214,80040,56699,12475,40193,59415,4769,75920,1036,2692,75862,16612,73670,61182,3305,90334,187,91659,28063,75684,50017,82643,9282,77376,85469,8164,5584,36623,82597,83859,3435,98460,70095,80257,4381,6501,8924,35514,14297,54373,71369,5172,15955,82441,4636,48215,6821,3385,17663,40107,55679,30366,42390,95895,16083,58499,17176,55993,51034,49296,4010,78974,35930,2019,96226,27167,68245,53109,59037,37843,79243,10262,58797,61490,82590,52411,54783,29447,94551,30026,97959,93939,73217,82573,62154,78291,33728,39102,11484,86210,43794,73553,87435,1110,77108,56521,78610,8254,1842,43068,70415,79195,26136,49786,47279,38471,20379,54704,86614,91138,51595,50818,80186,73087,17262,94735,4952,27935,4928,74862,51392,62388,9570,38485,30594,56278,47395,72762,94597,72279,16010,34697,54475,67874,78014,88381,4045,41494,55178,46054,24373,1824,55333,7525,97908,61178,84635,2199,35361,4803,21907,79414,66083,54782,58692,28332,41851,28198,55819,37313,67046,16147,90478,71230,34141,85002,44332,35906,429,39744,773,22909,19536,98986,90945,45209,85439,92265,25291,22775,60611,49159,95701,36113,53923,60824,84935,29656,50007,86624,61691,76150,32187,42765,60660,13859,10792,88210,29374,29563,45188,28811,19739,67649,73775,99247,48414,91067,68253,9452,90116,91737,73979,62370,69112,58791,20349,71480,56852,36919,87977,77609,68738,85159,4918,70076,46473,4122,57713,1426,50987,77910,66211,62546,77749,96462,34304,77441,12104,91805,10287,60943,49632,83116,25716,23113,22707,77770,31176,6759,46130,4739,55554,3843,31653,70834,72877,41561,36903,23010,6663,2266,16360,70118,91936,17098,77278,4880,23484,94970,41826,46733,93484,68350,38861,18134,32936,241,24803,13876,93278,5039,35873,44418,5305,28510,36115,46717,15238,78607,23464,68635,55712,55007,92411,65739,4858,67537,37041,67453,89801,45963,14800,14225,65655,80463,9716,77255,65136,11230,76323,81433,36445,86523,61058,59560,19380,40791,48073,29626,36661,87907,57369,41623,13705,3880,45088,55444,41003,27754,1450,75312,71801,99600,60719,54182,29245,63315,73758,42973,32702,10855,56363,14638,84424,27178,78195,3133,70865,48019,26117,7151,52107,85562,41347,50486,69457,86961,95482,11857,93587,45680,42145,13029,10043,5142,49213,54525,85761,42707,70754,33768,87671,85038,58900,88438,20004,63390,14815,38875,73417,82875,89481,55517,944,15773,61814,32915,27868,5510,21916,28426,89881,16680,88850,11056,51991,4230,39107,49216,40065,4523,75848,95349,56034,10724,9885,88232,42478,65702,95696,39746,66032,88082,86905,30007,75068,66629,7358,26706,90511,72843,67857,20061,98581,69682,38e3,14186,70,2290,17269,30909,69449,19997,13275,2444,84985,51290,97641,15092,69650,21920,19617,7418,49725,91090,20805,28627,80665,67192,34697,57667,99323,50101,40587,35081,14037,34414,19898,60779,83267,87499,29596,41852,15813,32419,72232,8322,39184,46525,13833,65743,94595,37363,4711,35386,96413,10627,62625,56555,12919,93218,25191,98380,51923,66181,5788,73491,1452,487,12277,45415,11884,61300,94528,9181,26616,11455,31514,63290,45035,42759,33804,85721,80979,46010,50975,72482,31231,3086,58941,46102,25773,89742,29788,96741,88523,14922,88262,76305,57676,93259,2396,69145,26074,30056,3853,75317,56639,66203,38923,48939,22813,91864,10934,6714,84099,25631,73223,95630,97552,45950,22197,42886,33764,1263,41856,82057,62349,94091,78028,62651,18911,5693,92561,97821,41994,92343,76785,22216,4203,5038,86151,23596,24338,77181,51761,97693,10955,98159,37568,58932,72128,27303,99608,31688,57557,91022,43036,93927,32869,53653,55205,33139,47271,31224,51650,36422,86857,73799,22068,43376,84760,44898,65776,42451,71480,38509,41673,44141,75918,95652,68981,83001,48815,98086,67950,27986,33175,43624,55274,71051,61124,51550,64967,31570,15748,19159,38174,51078,79811,39183,57527,96550,85168,28824,47466,56993,13151,96664,29735,70251,1079,4314,77714,11507,1440,48415,31984,99915,20282,26524,18057,4992,40521,98108,84045,91961,79256,72244,25788,5487,23595,73302,14205,8925,27625,64343,28821,37992,67156,83320,31106,10884,30735,15067,51091,15668,48777,50770,19169,76504,41165,29749,92812,8065,66782,26841,1411,95461,61134,18699,52261,60469,81373,44825,11448,73320,30151,56991,31372,6655,36472,86292,30247,30931,21029,53410,9859,37267,47514,3492,49008,94727,25234,40546,53417,36492,25723,76227,58456,15979,34876,9574,34392,3751,36933,83921,65108,63135,67572,40184,21098],Hr=new Array(16),jr=[16,8,16,24],Lr=4,Vr=0;function Ur(t,e){var r=e-t+1,n=0,i=1;do{for(n=0,i=1;i=(i/r|0)*r);return t+n%r|0}!function(){for(var t=0;t<16;t++){Hr[t]=new Array(256);for(var e=0;e<256;e++)Hr[t][e]=e|e<<8|e<<16|e<<24;for(var r=3;r>=0;r--)for(var n=0;n<255;n++){var i=255<<(r<<3),s=0|Hr[t][n],a=Ur(n,255);Hr[t][n]=Hr[t][n]&~i|Hr[t][a]&i,Hr[t][a]=Hr[t][a]&~i|s&i}}}();var Mr=function(e){function r(e){var n,i,s,u;return t(this,r),(e=e||{}).length=e.length||128,e.rounds=e.rounds||8,i=this,u=[e],s=o(s=r),(n=a(i,Nr()?Reflect.construct(s,u||[],o(i).constructor):s.apply(i,u))).blockSize=16-n.state.hash.length,n.blockSizeInBytes=n.blockSize*n.unitSize,n.W=new Array(16),n}return h(r,e),s(r,[{key:"reset",value:function(){var t,e,n;(t=r,e=this,"function"==typeof(n=Pe(o(1&3?t.prototype:t),"reset",e))?function(t){return n.apply(e,t)}:n)([]),this.state.hash=new Array(this.options.length/32|0);for(var i=0;i>>0&15]^=a,this.W[s+1&15]^=a}for(var o=0;o<16;o++)this.W[o]=He(this.W[o],jr[i])}for(var u=0;u0&&this.addPaddingZero(this.blockSizeInBytes-this.state.message.length|0),this.addPaddingZero(this.blockSizeInBytes-8|0),this.addLengthBits(),this.process(),this.getStateHash()}}])}(yr);const Kr=Mr;function _r(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(_r=function(){return!!t})()}var qr=new Array(256),Wr=[104,208,235,43,72,157,106,228,227,163,86,129,125,241,133,158,44,142,120,202,23,169,97,213,93,11,140,60,119,81,34,66,63,84,65,128,204,134,179,24,46,87,6,98,244,54,209,107,27,101,117,16,218,73,38,249,203,102,231,186,174,80,82,171,5,240,13,115,59,4,32,254,221,245,180,95,10,181,192,160,113,165,45,96,114,147,57,8,131,33,92,135,177,224,0,195,18,145,138,2,28,230,69,194,196,253,191,68,161,76,51,197,132,35,124,176,37,21,53,105,255,148,77,112,162,175,205,214,108,183,248,9,243,103,164,234,236,182,212,210,20,30,225,36,56,198,219,75,122,58,222,94,223,149,252,170,215,206,7,15,61,88,154,152,156,242,167,17,126,139,67,3,226,220,229,178,78,199,109,233,39,64,216,55,146,143,1,29,83,62,89,193,79,50,22,250,116,251,99,159,52,26,42,90,141,201,207,246,144,40,136,155,49,14,189,74,232,150,166,12,200,121,188,190,239,110,70,151,91,237,25,217,172,153,168,41,100,31,173,85,19,187,247,111,185,71,47,238,184,123,137,48,211,127,118,130],$r=[1,11,9,12,13,6,15,3,14,8,7,4,10,2,5,0],Gr=[7,12,11,13,14,4,9,15,6,3,8,10,2,5,1,0],zr=new Array(16),Jr=[1,1,4,1,8,5,2,9],Xr=[1,1,3,1,5,8,9,5],Yr=new Array(512),Zr=new Array(22),Qr=new Array(512),tn=new Array(22),en=new Array(512),rn=new Array(22);function nn(t,e){for(var r=new Array(512),n=new Array(22),i=0;i<8;i++)r[i]=[];for(var s=0;s<256;s++){var a=new Array(10);a[1]=t[s],a[2]=a[1]<<1,a[2]>=256&&(a[2]^=285),a[3]=a[2]^a[1],a[4]=a[2]<<1,a[4]>=256&&(a[4]^=285),a[5]=a[4]^a[1],a[8]=a[4]<<1,a[8]>=256&&(a[8]^=285),a[9]=a[8]^a[1],r[0][2*s]=a[e[0]]<<24|a[e[1]]<<16|a[e[2]]<<8|a[e[3]],r[0][2*s+1]=a[e[4]]<<24|a[e[5]]<<16|a[e[6]]<<8|a[e[7]];for(var o=1;o<8;o++)r[o][2*s]=Le(r[0][2*s+1],r[0][2*s],o<<3),r[o][2*s+1]=je(r[0][2*s+1],r[0][2*s],o<<3)}n[0]=0,n[1]=0;for(var u=1;u<=10;u++)n[2*u]=4278190080&r[0][16*u-16]^16711680&r[1][16*u-14]^65280&r[2][16*u-12]^255&r[3][16*u-10],n[2*u+1]=4278190080&r[4][16*u-7]^16711680&r[5][16*u-5]^65280&r[6][16*u-3]^255&r[7][16*u-1];return[r,n]}!function(){!function(){for(var t=0;t<16;t++)zr[$r[t]]=0|t;for(var e=0;e<256;e++){var r=$r[e>>4],n=zr[15&e],i=Gr[r^n];qr[e]=$r[r^i]<<4|zr[n^i]}}();var t=nn(Wr,Xr);Qr=t[0],tn=t[1],t=nn(qr,Xr),en=t[0],rn=t[1],t=nn(qr,Jr),Yr=t[0],Zr=t[1]}();var sn=function(e){function r(e){var n,i,s,u;switch(t(this,r),(e=e||{}).type=e.type||"",e.rounds=e.rounds||10,i=this,u=[e],s=o(s=r),(n=a(i,_r()?Reflect.construct(s,u||[],o(i).constructor):s.apply(i,u))).options.type){case"0":case 0:n.C=Qr,n.RC=tn;break;case"t":n.C=en,n.RC=rn;break;default:n.C=Yr,n.RC=Zr}return n}return h(r,e),s(r,[{key:"reset",value:function(){var t,e,n;(t=r,e=this,"function"==typeof(n=Pe(o(1&3?t.prototype:t),"reset",e))?function(t){return n.apply(e,t)}:n)([]),this.state.hash=new Array(16);for(var i=0;i<16;i++)this.state.hash[i]=0}},{key:"processBlock",value:function(t){for(var e=new Array(16),r=[],n=0;n<16;n++)r[n]=t[n]^(e[n]=this.state.hash[n]);for(var i=[],s=1;s<=this.options.rounds;s++){for(var a=0;a<8;a++){i[2*a]=0,i[2*a+1]=0;for(var o=0,u=56,h=0;o<8;o++,h=(u-=8)<32?1:0)i[2*a]^=this.C[o][2*(e[2*(a-o&7)+h]>>>u%32&255)],i[2*a+1]^=this.C[o][2*(e[2*(a-o&7)+h]>>>u%32&255)+1]}for(var c=0;c<16;c++)e[c]=i[c];e[0]^=this.RC[2*s],e[1]^=this.RC[2*s+1];for(var l=0;l<8;l++){i[2*l]=e[2*l],i[2*l+1]=e[2*l+1];for(var f=0,p=56,g=0;f<8;f++,g=(p-=8)<32?1:0)i[2*l]^=this.C[f][2*(r[2*(l-f&7)+g]>>>p%32&255)],i[2*l+1]^=this.C[f][2*(r[2*(l-f&7)+g]>>>p%32&255)+1]}for(var d=0;d<16;d++)r[d]=i[d]}for(var v=0;v<16;v++)this.state.hash[v]^=r[v]^t[v]}},{key:"finalize",value:function(){return this.addPaddingISO7816(this.state.message.length<32?56-this.state.message.length|0:120-this.state.message.length|0),this.addLengthBits(),this.process(),this.getStateHash()}}])}(yr);const an=sn;function on(t){for(var e="",r=0,n=t.length;r>6),e+=String.fromCharCode(128|63&i)):i<55296||i>=57344?(e+=String.fromCharCode(224|i>>12),e+=String.fromCharCode(128|i>>6&63),e+=String.fromCharCode(128|63&i)):(r++,i=65536+((1023&i)<<10|1023&t.charCodeAt(r)),e+=String.fromCharCode(240|i>>18),e+=String.fromCharCode(128|i>>12&63),e+=String.fromCharCode(128|i>>6&63),e+=String.fromCharCode(128|63&i))}return e}function un(t){for(var e="",r=new Uint8Array(t),n=0;n>18)+cn.charAt(n>>12&63)+cn.charAt(n>>6&63)+cn.charAt(63&n);return t.length-r==2?(n=t.charCodeAt(r)<<16|t.charCodeAt(r+1)<<8,e+=cn.charAt(n>>18)+cn.charAt(n>>12&63)+cn.charAt(n>>6&63)+"="):t.length-r==1&&(n=t.charCodeAt(r)<<16,e+=cn.charAt(n>>18)+cn.charAt(n>>12&63)+"=="),e}var fn=function(){return s((function e(r,n){t(this,e),r.length>n.blockSizeInBytes&&(n.update(r),r=n.finalize(),n.reset());for(var i=r.length;i2&&void 0!==arguments[2]?arguments[2]:{},n=H.arrayBufferToStr(e,!1),i=dn.getHasher(t,r);return i.update(n),dn.encoder.toHex(i.finalize())}function yn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(yn=function(){return!!t})()}var mn=function(e){function r(){var e,n,i,s;return t(this,r),n=this,i=o(i=r),(e=a(n,yn()?Reflect.construct(i,[],o(n).constructor):i.apply(n,s))).name="Parse X.509 certificate",e.module="PublicKey",e.description="X.509 is an ITU-T standard for a public key infrastructure (PKI) and Privilege Management Infrastructure (PMI). It is commonly involved with SSL/TLS security.

This operation displays the contents of a certificate in a human readable format, similar to the openssl command line tool.

Tags: X509, server hello, handshake",e.infoURL="https://wikipedia.org/wiki/X.509",e.inputType="string",e.outputType="string",e.args=[{name:"Input format",type:"option",value:["PEM","DER Hex","Base64","Raw"]}],e.checks=[{pattern:"^-+BEGIN CERTIFICATE-+\\r?\\n[\\da-z+/\\n\\r]+-+END CERTIFICATE-+\\r?\\n?$",flags:"i",args:["PEM"]}],e}return h(r,e),s(r,[{key:"run",value:function(t,e){if(!t.length)return"No input";var r=new c.dy,n=e[0],i=!1;try{switch(n){case"DER Hex":t=t.replace(/\s/g,"").toLowerCase(),r.readCertHex(t);break;case"PEM":r.readCertPEM(t);break;case"Base64":r.readCertHex(C(A(t,null,"byteArray"),""));break;case"Raw":r.readCertHex(C(H.strToArrayBuffer(t),""));break;default:i=!0}}catch(t){throw"Certificate load error (non-certificate input?)"}if(i)throw"Undefined input format";var s,a=H.strToArrayBuffer(H.byteArrayToChars(B(r.hex))),o=r.getSerialNumberHex(),u=r.getIssuer(),h=r.getSubject(),l=r.getPublicKey(),f=[],p=r.getSignatureValueHex(),g="",d="";f.push({key:"Algorithm",value:l.type}),"EC"===l.type?(f.push({key:"Curve Name",value:l.curveName}),f.push({key:"Length",value:(new c.jZ(l.pubKeyHex,16).bitLength()-3)/2+" bits"}),f.push({key:"pub",value:ue(l.pubKeyHex,16,18)})):"DSA"===l.type?(f.push({key:"pub",value:ue(l.y.toString(16),16,18)}),f.push({key:"P",value:ue(l.p.toString(16),16,18)}),f.push({key:"Q",value:ue(l.q.toString(16),16,18)}),f.push({key:"G",value:ue(l.g.toString(16),16,18)})):l.e?(f.push({key:"Length",value:l.n.bitLength()+" bits"}),f.push({key:"Modulus",value:ue(l.n.toString(16),16,18)}),f.push({key:"Exponent",value:l.e+" (0x"+l.e.toString(16)+")"})):f.push({key:"Error",value:"Unknown Public Key type"});for(var v=0;v