MediaWiki:Modules/elliptic.js

Материал из Мракопедии
Перейти к: навигация, поиск

Замечание. Возможно, после сохранения вам придётся очистить кэш своего браузера, чтобы увидеть изменения.

  • Firefox / Safari: Удерживая клавишу Shift, нажмите на панели инструментов Обновить либо нажмите Ctrl-F5 или Ctrl-R (⌘-R на Mac)
  • Google Chrome: Нажмите Ctrl-Shift-R (⌘-Shift-R на Mac)
  • Internet Explorer: Удерживая Ctrl, нажмите Обновить либо нажмите Ctrl-F5
  • Opera: Перейдите в Menu → Настройки (Opera → Настройки на Mac), а затем Безопасность → Очистить историю посещений → Кэшированные изображения и файлы
// ECDSA from http://bitcoinjs.org/
(function(e){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=e()}else if(typeof define==="function"&&define.amd){define([],e)}else{var t;if(typeof window!=="undefined"){t=window}else if(typeof global!=="undefined"){t=global}else if(typeof self!=="undefined"){t=self}else{t=this}t.elliptic=e()}})(function(){var e,t,r;return function i(e,t,r){function n(f,o){if(!t[f]){if(!e[f]){var a=typeof require=="function"&&require;if(!o&&a)return a(f,!0);if(s)return s(f,!0);var u=new Error("Cannot find module '"+f+"'");throw u.code="MODULE_NOT_FOUND",u}var h=t[f]={exports:{}};e[f][0].call(h.exports,function(t){var r=e[f][1][t];return n(r?r:t)},h,h.exports,i,e,t,r)}return t[f].exports}var s=typeof require=="function"&&require;for(var f=0;f<r.length;f++)n(r[f]);return n}({1:[function(e,t,r){t.exports={base58:e("bs58"),ecurve:e("ecurve"),bigi:e("bigi"),buffer:e("buffer"),bitcoin:e("bitcoinjs-lib")}},{bigi:5,"bitcoinjs-lib":16,bs58:25,buffer:58,ecurve:38}],2:[function(e,t,r){t.exports=function i(e){var t={};var r=e.length;var i=e.charAt(0);for(var n=0;n<e.length;n++){t[e.charAt(n)]=n}function s(t){if(t.length===0)return"";var i=[0];for(var n=0;n<t.length;++n){for(var s=0,f=t[n];s<i.length;++s){f+=i[s]<<8;i[s]=f%r;f=f/r|0}while(f>0){i.push(f%r);f=f/r|0}}for(var o=0;t[o]===0&&o<t.length-1;++o){i.push(0)}for(var a=0,u=i.length-1;a<=u;++a,--u){var h=e[i[a]];i[a]=e[i[u]];i[u]=h}return i.join("")}function f(e){if(e.length===0)return[];var n=[0];for(var s=0;s<e.length;s++){var f=t[e[s]];if(f===undefined)throw new Error("Non-base"+r+" character");for(var o=0,a=f;o<n.length;++o){a+=n[o]*r;n[o]=a&255;a>>=8}while(a>0){n.push(a&255);a>>=8}}for(var u=0;e[u]===i&&u<e.length-1;++u){n.push(0)}return n.reverse()}return{encode:s,decode:f}}},{}],3:[function(e,t,r){function BigInteger(e,t,r){if(!(this instanceof BigInteger))return new BigInteger(e,t,r);if(e!=null){if("number"==typeof e)this.fromNumber(e,t,r);else if(t==null&&"string"!=typeof e)this.fromString(e,256);else this.fromString(e,t)}}var i=BigInteger.prototype;i.__bigi=e("../package.json").version;BigInteger.isBigInteger=function(e,t){return e&&e.__bigi&&(!t||e.__bigi===i.__bigi)};var n;function s(e,t,r,i,n,s){while(--s>=0){var f=t*this[e++]+r[i]+n;n=Math.floor(f/67108864);r[i++]=f&67108863}return n}function f(e,t,r,i,n,s){var f=t&32767,o=t>>15;while(--s>=0){var a=this[e]&32767;var u=this[e++]>>15;var h=o*a+u*f;a=f*a+((h&32767)<<15)+r[i]+(n&1073741823);n=(a>>>30)+(h>>>15)+o*u+(n>>>30);r[i++]=a&1073741823}return n}function o(e,t,r,i,n,s){var f=t&16383,o=t>>14;while(--s>=0){var a=this[e]&16383;var u=this[e++]>>14;var h=o*a+u*f;a=f*a+((h&16383)<<14)+r[i]+n;n=(a>>28)+(h>>14)+o*u;r[i++]=a&268435455}return n}BigInteger.prototype.am=s;n=26;BigInteger.prototype.DB=n;BigInteger.prototype.DM=(1<<n)-1;var a=BigInteger.prototype.DV=1<<n;var u=52;BigInteger.prototype.FV=Math.pow(2,u);BigInteger.prototype.F1=u-n;BigInteger.prototype.F2=2*n-u;var h="0123456789abcdefghijklmnopqrstuvwxyz";var c=new Array;var l,p;l="0".charCodeAt(0);for(p=0;p<=9;++p)c[l++]=p;l="a".charCodeAt(0);for(p=10;p<36;++p)c[l++]=p;l="A".charCodeAt(0);for(p=10;p<36;++p)c[l++]=p;function d(e){return h.charAt(e)}function v(e,t){var r=c[e.charCodeAt(t)];return r==null?-1:r}function g(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t;e.s=this.s}function y(e){this.t=1;this.s=e<0?-1:0;if(e>0)this[0]=e;else if(e<-1)this[0]=e+a;else this.t=0}function w(e){var t=new BigInteger;t.fromInt(e);return t}function b(e,t){var r=this;var i;if(t==16)i=4;else if(t==8)i=3;else if(t==256)i=8;else if(t==2)i=1;else if(t==32)i=5;else if(t==4)i=2;else{r.fromRadix(e,t);return}r.t=0;r.s=0;var n=e.length,s=false,f=0;while(--n>=0){var o=i==8?e[n]&255:v(e,n);if(o<0){if(e.charAt(n)=="-")s=true;continue}s=false;if(f==0)r[r.t++]=o;else if(f+i>r.DB){r[r.t-1]|=(o&(1<<r.DB-f)-1)<<f;r[r.t++]=o>>r.DB-f}else r[r.t-1]|=o<<f;f+=i;if(f>=r.DB)f-=r.DB}if(i==8&&(e[0]&128)!=0){r.s=-1;if(f>0)r[r.t-1]|=(1<<r.DB-f)-1<<f}r.clamp();if(s)BigInteger.ZERO.subTo(r,r)}function m(){var e=this.s&this.DM;while(this.t>0&&this[this.t-1]==e)--this.t}function _(e){var t=this;if(t.s<0)return"-"+t.negate().toString(e);var r;if(e==16)r=4;else if(e==8)r=3;else if(e==2)r=1;else if(e==32)r=5;else if(e==4)r=2;else return t.toRadix(e);var i=(1<<r)-1,n,s=false,f="",o=t.t;var a=t.DB-o*t.DB%r;if(o-->0){if(a<t.DB&&(n=t[o]>>a)>0){s=true;f=d(n)}while(o>=0){if(a<r){n=(t[o]&(1<<a)-1)<<r-a;n|=t[--o]>>(a+=t.DB-r)}else{n=t[o]>>(a-=r)&i;if(a<=0){a+=t.DB;--o}}if(n>0)s=true;if(s)f+=d(n)}}return s?f:"0"}function E(){var e=new BigInteger;BigInteger.ZERO.subTo(this,e);return e}function S(){return this.s<0?this.negate():this}function T(e){var t=this.s-e.s;if(t!=0)return t;var r=this.t;t=r-e.t;if(t!=0)return this.s<0?-t:t;while(--r>=0)if((t=this[r]-e[r])!=0)return t;return 0}function O(e){var t=1,r;if((r=e>>>16)!=0){e=r;t+=16}if((r=e>>8)!=0){e=r;t+=8}if((r=e>>4)!=0){e=r;t+=4}if((r=e>>2)!=0){e=r;t+=2}if((r=e>>1)!=0){e=r;t+=1}return t}function B(){if(this.t<=0)return 0;return this.DB*(this.t-1)+O(this[this.t-1]^this.s&this.DM)}function P(){return this.bitLength()>>3}function I(e,t){var r;for(r=this.t-1;r>=0;--r)t[r+e]=this[r];for(r=e-1;r>=0;--r)t[r]=0;t.t=this.t+e;t.s=this.s}function x(e,t){for(var r=e;r<this.t;++r)t[r-e]=this[r];t.t=Math.max(this.t-e,0);t.s=this.s}function A(e,t){var r=this;var i=e%r.DB;var n=r.DB-i;var s=(1<<n)-1;var f=Math.floor(e/r.DB),o=r.s<<i&r.DM,a;for(a=r.t-1;a>=0;--a){t[a+f+1]=r[a]>>n|o;o=(r[a]&s)<<i}for(a=f-1;a>=0;--a)t[a]=0;t[f]=o;t.t=r.t+f+1;t.s=r.s;t.clamp()}function R(e,t){var r=this;t.s=r.s;var i=Math.floor(e/r.DB);if(i>=r.t){t.t=0;return}var n=e%r.DB;var s=r.DB-n;var f=(1<<n)-1;t[0]=r[i]>>n;for(var o=i+1;o<r.t;++o){t[o-i-1]|=(r[o]&f)<<s;t[o-i]=r[o]>>n}if(n>0)t[r.t-i-1]|=(r.s&f)<<s;t.t=r.t-i;t.clamp()}function k(e,t){var r=this;var i=0,n=0,s=Math.min(e.t,r.t);while(i<s){n+=r[i]-e[i];t[i++]=n&r.DM;n>>=r.DB}if(e.t<r.t){n-=e.s;while(i<r.t){n+=r[i];t[i++]=n&r.DM;n>>=r.DB}n+=r.s}else{n+=r.s;while(i<e.t){n-=e[i];t[i++]=n&r.DM;n>>=r.DB}n-=e.s}t.s=n<0?-1:0;if(n<-1)t[i++]=r.DV+n;else if(n>0)t[i++]=n;t.t=i;t.clamp()}function D(e,t){var r=this.abs(),i=e.abs();var n=r.t;t.t=n+i.t;while(--n>=0)t[n]=0;for(n=0;n<i.t;++n)t[n+r.t]=r.am(0,i[n],t,n,0,r.t);t.s=0;t.clamp();if(this.s!=e.s)BigInteger.ZERO.subTo(t,t)}function L(e){var t=this.abs();var r=e.t=2*t.t;while(--r>=0)e[r]=0;for(r=0;r<t.t-1;++r){var i=t.am(r,t[r],e,2*r,0,1);if((e[r+t.t]+=t.am(r+1,2*t[r],e,2*r+1,i,t.t-r-1))>=t.DV){e[r+t.t]-=t.DV;e[r+t.t+1]=1}}if(e.t>0)e[e.t-1]+=t.am(r,t[r],e,2*r,0,1);e.s=0;e.clamp()}function U(e,t,r){var i=this;var n=e.abs();if(n.t<=0)return;var s=i.abs();if(s.t<n.t){if(t!=null)t.fromInt(0);if(r!=null)i.copyTo(r);return}if(r==null)r=new BigInteger;var f=new BigInteger,o=i.s,a=e.s;var u=i.DB-O(n[n.t-1]);if(u>0){n.lShiftTo(u,f);s.lShiftTo(u,r)}else{n.copyTo(f);s.copyTo(r)}var h=f.t;var c=f[h-1];if(c==0)return;var l=c*(1<<i.F1)+(h>1?f[h-2]>>i.F2:0);var p=i.FV/l,d=(1<<i.F1)/l,v=1<<i.F2;var g=r.t,y=g-h,w=t==null?new BigInteger:t;f.dlShiftTo(y,w);if(r.compareTo(w)>=0){r[r.t++]=1;r.subTo(w,r)}BigInteger.ONE.dlShiftTo(h,w);w.subTo(f,f);while(f.t<h)f[f.t++]=0;while(--y>=0){var b=r[--g]==c?i.DM:Math.floor(r[g]*p+(r[g-1]+v)*d);if((r[g]+=f.am(0,b,r,y,0,h))<b){f.dlShiftTo(y,w);r.subTo(w,r);while(r[g]<--b)r.subTo(w,r)}}if(t!=null){r.drShiftTo(h,t);if(o!=a)BigInteger.ZERO.subTo(t,t)}r.t=h;r.clamp();if(u>0)r.rShiftTo(u,r);if(o<0)BigInteger.ZERO.subTo(r,r)}function M(e){var t=new BigInteger;this.abs().divRemTo(e,null,t);if(this.s<0&&t.compareTo(BigInteger.ZERO)>0)e.subTo(t,t);return t}function j(e){this.m=e}function N(e){if(e.s<0||e.compareTo(this.m)>=0)return e.mod(this.m);else return e}function C(e){return e}function H(e){e.divRemTo(this.m,null,e)}function q(e,t,r){e.multiplyTo(t,r);this.reduce(r)}function z(e,t){e.squareTo(t);this.reduce(t)}j.prototype.convert=N;j.prototype.revert=C;j.prototype.reduce=H;j.prototype.mulTo=q;j.prototype.sqrTo=z;function F(){if(this.t<1)return 0;var e=this[0];if((e&1)==0)return 0;var t=e&3;t=t*(2-(e&15)*t)&15;t=t*(2-(e&255)*t)&255;t=t*(2-((e&65535)*t&65535))&65535;t=t*(2-e*t%this.DV)%this.DV;return t>0?this.DV-t:-t}function K(e){this.m=e;this.mp=e.invDigit();this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<e.DB-15)-1;this.mt2=2*e.t}function Y(e){var t=new BigInteger;e.abs().dlShiftTo(this.m.t,t);t.divRemTo(this.m,null,t);if(e.s<0&&t.compareTo(BigInteger.ZERO)>0)this.m.subTo(t,t);return t}function G(e){var t=new BigInteger;e.copyTo(t);this.reduce(t);return t}function V(e){while(e.t<=this.mt2)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var r=e[t]&32767;var i=r*this.mpl+((r*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;r=t+this.m.t;e[r]+=this.m.am(0,i,e,t,0,this.m.t);while(e[r]>=e.DV){e[r]-=e.DV;e[++r]++}}e.clamp();e.drShiftTo(this.m.t,e);if(e.compareTo(this.m)>=0)e.subTo(this.m,e)}function W(e,t){e.squareTo(t);this.reduce(t)}function Q(e,t,r){e.multiplyTo(t,r);this.reduce(r)}K.prototype.convert=Y;K.prototype.revert=G;K.prototype.reduce=V;K.prototype.mulTo=Q;K.prototype.sqrTo=W;function J(){return(this.t>0?this[0]&1:this.s)==0}function Z(e,t){if(e>4294967295||e<1)return BigInteger.ONE;var r=new BigInteger,i=new BigInteger,n=t.convert(this),s=O(e)-1;n.copyTo(r);while(--s>=0){t.sqrTo(r,i);if((e&1<<s)>0)t.mulTo(i,n,r);else{var f=r;r=i;i=f}}return t.revert(r)}function X(e,t){var r;if(e<256||t.isEven())r=new j(t);else r=new K(t);return this.exp(e,r)}i.copyTo=g;i.fromInt=y;i.fromString=b;i.clamp=m;i.dlShiftTo=I;i.drShiftTo=x;i.lShiftTo=A;i.rShiftTo=R;i.subTo=k;i.multiplyTo=D;i.squareTo=L;i.divRemTo=U;i.invDigit=F;i.isEven=J;i.exp=Z;i.toString=_;i.negate=E;i.abs=S;i.compareTo=T;i.bitLength=B;i.byteLength=P;i.mod=M;i.modPowInt=X;function $(){var e=new BigInteger;this.copyTo(e);return e}function ee(){if(this.s<0){if(this.t==1)return this[0]-this.DV;else if(this.t==0)return-1}else if(this.t==1)return this[0];else if(this.t==0)return 0;return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function te(){return this.t==0?this.s:this[0]<<24>>24}function re(){return this.t==0?this.s:this[0]<<16>>16}function ie(e){return Math.floor(Math.LN2*this.DB/Math.log(e))}function ne(){if(this.s<0)return-1;else if(this.t<=0||this.t==1&&this[0]<=0)return 0;else return 1}function se(e){if(e==null)e=10;if(this.signum()==0||e<2||e>36)return"0";var t=this.chunkSize(e);var r=Math.pow(e,t);var i=w(r),n=new BigInteger,s=new BigInteger,f="";this.divRemTo(i,n,s);while(n.signum()>0){f=(r+s.intValue()).toString(e).substr(1)+f;n.divRemTo(i,n,s)}return s.intValue().toString(e)+f}function fe(e,t){var r=this;r.fromInt(0);if(t==null)t=10;var i=r.chunkSize(t);var n=Math.pow(t,i),s=false,f=0,o=0;for(var a=0;a<e.length;++a){var u=v(e,a);if(u<0){if(e.charAt(a)=="-"&&r.signum()==0)s=true;continue}o=t*o+u;if(++f>=i){r.dMultiply(n);r.dAddOffset(o,0);f=0;o=0}}if(f>0){r.dMultiply(Math.pow(t,f));r.dAddOffset(o,0)}if(s)BigInteger.ZERO.subTo(r,r)}function oe(e,t,r){var i=this;if("number"==typeof t){if(e<2)i.fromInt(1);else{i.fromNumber(e,r);if(!i.testBit(e-1))i.bitwiseTo(BigInteger.ONE.shiftLeft(e-1),ve,i);if(i.isEven())i.dAddOffset(1,0);while(!i.isProbablePrime(t)){i.dAddOffset(2,0);if(i.bitLength()>e)i.subTo(BigInteger.ONE.shiftLeft(e-1),i)}}}else{var n=new Array,s=e&7;n.length=(e>>3)+1;t.nextBytes(n);if(s>0)n[0]&=(1<<s)-1;else n[0]=0;i.fromString(n,256)}}function ae(){var e=this;var t=e.t,r=new Array;r[0]=e.s;var i=e.DB-t*e.DB%8,n,s=0;if(t-->0){if(i<e.DB&&(n=e[t]>>i)!=(e.s&e.DM)>>i)r[s++]=n|e.s<<e.DB-i;while(t>=0){if(i<8){n=(e[t]&(1<<i)-1)<<8-i;n|=e[--t]>>(i+=e.DB-8)}else{n=e[t]>>(i-=8)&255;if(i<=0){i+=e.DB;--t}}if((n&128)!=0)n|=-256;if(s===0&&(e.s&128)!=(n&128))++s;if(s>0||n!=e.s)r[s++]=n}}return r}function ue(e){return this.compareTo(e)==0}function he(e){return this.compareTo(e)<0?this:e}function ce(e){return this.compareTo(e)>0?this:e}function le(e,t,r){var i=this;var n,s,f=Math.min(e.t,i.t);for(n=0;n<f;++n)r[n]=t(i[n],e[n]);if(e.t<i.t){s=e.s&i.DM;for(n=f;n<i.t;++n)r[n]=t(i[n],s);r.t=i.t}else{s=i.s&i.DM;for(n=f;n<e.t;++n)r[n]=t(s,e[n]);r.t=e.t}r.s=t(i.s,e.s);r.clamp()}function pe(e,t){return e&t}function de(e){var t=new BigInteger;this.bitwiseTo(e,pe,t);return t}function ve(e,t){return e|t}function ge(e){var t=new BigInteger;this.bitwiseTo(e,ve,t);return t}function ye(e,t){return e^t}function we(e){var t=new BigInteger;this.bitwiseTo(e,ye,t);return t}function be(e,t){return e&~t}function me(e){var t=new BigInteger;this.bitwiseTo(e,be,t);return t}function _e(){var e=new BigInteger;for(var t=0;t<this.t;++t)e[t]=this.DM&~this[t];e.t=this.t;e.s=~this.s;return e}function Ee(e){var t=new BigInteger;if(e<0)this.rShiftTo(-e,t);else this.lShiftTo(e,t);return t}function Se(e){var t=new BigInteger;if(e<0)this.lShiftTo(-e,t);else this.rShiftTo(e,t);return t}function Te(e){if(e==0)return-1;var t=0;if((e&65535)==0){e>>=16;t+=16}if((e&255)==0){e>>=8;t+=8}if((e&15)==0){e>>=4;t+=4}if((e&3)==0){e>>=2;t+=2}if((e&1)==0)++t;return t}function Oe(){for(var e=0;e<this.t;++e)if(this[e]!=0)return e*this.DB+Te(this[e]);if(this.s<0)return this.t*this.DB;return-1}function Be(e){var t=0;while(e!=0){e&=e-1;++t}return t}function Pe(){var e=0,t=this.s&this.DM;for(var r=0;r<this.t;++r)e+=Be(this[r]^t);return e}function Ie(e){var t=Math.floor(e/this.DB);if(t>=this.t)return this.s!=0;return(this[t]&1<<e%this.DB)!=0}function xe(e,t){var r=BigInteger.ONE.shiftLeft(e);this.bitwiseTo(r,t,r);return r}function Ae(e){return this.changeBit(e,ve)}function Re(e){return this.changeBit(e,be)}function ke(e){return this.changeBit(e,ye)}function De(e,t){var r=this;var i=0,n=0,s=Math.min(e.t,r.t);while(i<s){n+=r[i]+e[i];t[i++]=n&r.DM;n>>=r.DB}if(e.t<r.t){n+=e.s;while(i<r.t){n+=r[i];t[i++]=n&r.DM;n>>=r.DB}n+=r.s}else{n+=r.s;while(i<e.t){n+=e[i];t[i++]=n&r.DM;n>>=r.DB}n+=e.s}t.s=n<0?-1:0;if(n>0)t[i++]=n;else if(n<-1)t[i++]=r.DV+n;t.t=i;t.clamp()}function Le(e){var t=new BigInteger;this.addTo(e,t);return t}function Ue(e){var t=new BigInteger;this.subTo(e,t);return t}function Me(e){var t=new BigInteger;this.multiplyTo(e,t);return t}function je(){var e=new BigInteger;this.squareTo(e);return e}function Ne(e){var t=new BigInteger;this.divRemTo(e,t,null);return t}function Ce(e){var t=new BigInteger;this.divRemTo(e,null,t);return t}function He(e){var t=new BigInteger,r=new BigInteger;this.divRemTo(e,t,r);return new Array(t,r)}function qe(e){this[this.t]=this.am(0,e-1,this,0,0,this.t);++this.t;this.clamp()}function ze(e,t){if(e==0)return;while(this.t<=t)this[this.t++]=0;this[t]+=e;while(this[t]>=this.DV){this[t]-=this.DV;if(++t>=this.t)this[this.t++]=0;++this[t]}}function Fe(){}function Ke(e){return e}function Ye(e,t,r){e.multiplyTo(t,r)}function Ge(e,t){e.squareTo(t)}Fe.prototype.convert=Ke;Fe.prototype.revert=Ke;Fe.prototype.mulTo=Ye;Fe.prototype.sqrTo=Ge;function Ve(e){return this.exp(e,new Fe)}function We(e,t,r){var i=Math.min(this.t+e.t,t);r.s=0;r.t=i;while(i>0)r[--i]=0;var n;for(n=r.t-this.t;i<n;++i)r[i+this.t]=this.am(0,e[i],r,i,0,this.t);for(n=Math.min(e.t,t);i<n;++i)this.am(0,e[i],r,i,0,t-i);r.clamp()}function Qe(e,t,r){--t;var i=r.t=this.t+e.t-t;r.s=0;while(--i>=0)r[i]=0;for(i=Math.max(t-this.t,0);i<e.t;++i)r[this.t+i-t]=this.am(t-i,e[i],r,0,0,this.t+i-t);r.clamp();r.drShiftTo(1,r)}function Je(e){this.r2=new BigInteger;this.q3=new BigInteger;BigInteger.ONE.dlShiftTo(2*e.t,this.r2);this.mu=this.r2.divide(e);this.m=e}function Ze(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);else if(e.compareTo(this.m)<0)return e;else{var t=new BigInteger;e.copyTo(t);this.reduce(t);return t}}function Xe(e){return e}function $e(e){var t=this;e.drShiftTo(t.m.t-1,t.r2);if(e.t>t.m.t+1){e.t=t.m.t+1;e.clamp()}t.mu.multiplyUpperTo(t.r2,t.m.t+1,t.q3);t.m.multiplyLowerTo(t.q3,t.m.t+1,t.r2);while(e.compareTo(t.r2)<0)e.dAddOffset(1,t.m.t+1);e.subTo(t.r2,e);while(e.compareTo(t.m)>=0)e.subTo(t.m,e)}function et(e,t){e.squareTo(t);this.reduce(t)}function tt(e,t,r){e.multiplyTo(t,r);this.reduce(r)}Je.prototype.convert=Ze;Je.prototype.revert=Xe;Je.prototype.reduce=$e;Je.prototype.mulTo=tt;Je.prototype.sqrTo=et;function rt(e,t){var r=e.bitLength(),i,n=w(1),s;if(r<=0)return n;else if(r<18)i=1;else if(r<48)i=3;else if(r<144)i=4;else if(r<768)i=5;else i=6;if(r<8)s=new j(t);else if(t.isEven())s=new Je(t);else s=new K(t);var f=new Array,o=3,a=i-1,u=(1<<i)-1;f[1]=s.convert(this);if(i>1){var h=new BigInteger;s.sqrTo(f[1],h);while(o<=u){f[o]=new BigInteger;s.mulTo(h,f[o-2],f[o]);o+=2}}var c=e.t-1,l,p=true,d=new BigInteger,v;r=O(e[c])-1;while(c>=0){if(r>=a)l=e[c]>>r-a&u;else{l=(e[c]&(1<<r+1)-1)<<a-r;if(c>0)l|=e[c-1]>>this.DB+r-a}o=i;while((l&1)==0){l>>=1;--o}if((r-=o)<0){r+=this.DB;--c}if(p){f[l].copyTo(n);p=false}else{while(o>1){s.sqrTo(n,d);s.sqrTo(d,n);o-=2}if(o>0)s.sqrTo(n,d);else{v=n;n=d;d=v}s.mulTo(d,f[l],n)}while(c>=0&&(e[c]&1<<r)==0){s.sqrTo(n,d);v=n;n=d;d=v;if(--r<0){r=this.DB-1;--c}}}return s.revert(n)}function it(e){var t=this.s<0?this.negate():this.clone();var r=e.s<0?e.negate():e.clone();if(t.compareTo(r)<0){var i=t;t=r;r=i}var n=t.getLowestSetBit(),s=r.getLowestSetBit();if(s<0)return t;if(n<s)s=n;if(s>0){t.rShiftTo(s,t);r.rShiftTo(s,r)}while(t.signum()>0){if((n=t.getLowestSetBit())>0)t.rShiftTo(n,t);if((n=r.getLowestSetBit())>0)r.rShiftTo(n,r);if(t.compareTo(r)>=0){t.subTo(r,t);t.rShiftTo(1,t)}else{r.subTo(t,r);r.rShiftTo(1,r)}}if(s>0)r.lShiftTo(s,r);return r}function nt(e){if(e<=0)return 0;var t=this.DV%e,r=this.s<0?e-1:0;if(this.t>0)if(t==0)r=this[0]%e;else for(var i=this.t-1;i>=0;--i)r=(t*r+this[i])%e;return r}function st(e){var t=e.isEven();if(this.signum()===0)throw new Error("division by zero");if(this.isEven()&&t||e.signum()==0)return BigInteger.ZERO;var r=e.clone(),i=this.clone();var n=w(1),s=w(0),f=w(0),o=w(1);while(r.signum()!=0){while(r.isEven()){r.rShiftTo(1,r);if(t){if(!n.isEven()||!s.isEven()){n.addTo(this,n);s.subTo(e,s)}n.rShiftTo(1,n)}else if(!s.isEven())s.subTo(e,s);s.rShiftTo(1,s)}while(i.isEven()){i.rShiftTo(1,i);if(t){if(!f.isEven()||!o.isEven()){f.addTo(this,f);o.subTo(e,o)}f.rShiftTo(1,f)}else if(!o.isEven())o.subTo(e,o);o.rShiftTo(1,o)}if(r.compareTo(i)>=0){r.subTo(i,r);if(t)n.subTo(f,n);s.subTo(o,s)}else{i.subTo(r,i);if(t)f.subTo(n,f);o.subTo(s,o)}}if(i.compareTo(BigInteger.ONE)!=0)return BigInteger.ZERO;if(o.compareTo(e)>=0)return o.subtract(e);if(o.signum()<0)o.addTo(e,o);else return o;if(o.signum()<0)return o.add(e);else return o}var ft=[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];var ot=(1<<26)/ft[ft.length-1];function at(e){var t,r=this.abs();if(r.t==1&&r[0]<=ft[ft.length-1]){for(t=0;t<ft.length;++t)if(r[0]==ft[t])return true;return false}if(r.isEven())return false;t=1;while(t<ft.length){var i=ft[t],n=t+1;while(n<ft.length&&i<ot)i*=ft[n++];i=r.modInt(i);while(t<n)if(i%ft[t++]==0)return false}return r.millerRabin(e)}function ut(e){var t=this.subtract(BigInteger.ONE);var r=t.getLowestSetBit();if(r<=0)return false;var i=t.shiftRight(r);e=e+1>>1;if(e>ft.length)e=ft.length;var n=new BigInteger(null);var s,f=[];for(var o=0;o<e;++o){for(;;){s=ft[Math.floor(Math.random()*ft.length)];if(f.indexOf(s)==-1)break}f.push(s);n.fromInt(s);var a=n.modPow(i,this);if(a.compareTo(BigInteger.ONE)!=0&&a.compareTo(t)!=0){var s=1;while(s++<r&&a.compareTo(t)!=0){a=a.modPowInt(2,this);if(a.compareTo(BigInteger.ONE)==0)return false}if(a.compareTo(t)!=0)return false}}return true}i.chunkSize=ie;i.toRadix=se;i.fromRadix=fe;i.fromNumber=oe;i.bitwiseTo=le;i.changeBit=xe;i.addTo=De;i.dMultiply=qe;i.dAddOffset=ze;i.multiplyLowerTo=We;i.multiplyUpperTo=Qe;i.modInt=nt;i.millerRabin=ut;i.clone=$;i.intValue=ee;i.byteValue=te;i.shortValue=re;i.signum=ne;i.toByteArray=ae;i.equals=ue;i.min=he;i.max=ce;i.and=de;i.or=ge;i.xor=we;i.andNot=me;i.not=_e;i.shiftLeft=Ee;i.shiftRight=Se;i.getLowestSetBit=Oe;i.bitCount=Pe;i.testBit=Ie;i.setBit=Ae;i.clearBit=Re;i.flipBit=ke;i.add=Le;i.subtract=Ue;i.multiply=Me;i.divide=Ne;i.remainder=Ce;i.divideAndRemainder=He;i.modPow=rt;i.modInverse=st;i.pow=Ve;i.gcd=it;i.isProbablePrime=at;i.square=je;BigInteger.ZERO=w(0);BigInteger.ONE=w(1);BigInteger.valueOf=w;t.exports=BigInteger},{"../package.json":6}],4:[function(e,t,r){(function(Buffer){var t=e("assert");var BigInteger=e("./bigi");BigInteger.fromByteArrayUnsigned=function(e){if(e[0]&128){return new BigInteger([0].concat(e))}return new BigInteger(e)};BigInteger.prototype.toByteArrayUnsigned=function(){var e=this.toByteArray();return e[0]===0?e.slice(1):e};BigInteger.fromDERInteger=function(e){return new BigInteger(e)};BigInteger.prototype.toDERInteger=BigInteger.prototype.toByteArray;BigInteger.fromBuffer=function(e){if(e[0]&128){var t=Array.prototype.slice.call(e);return new BigInteger([0].concat(t))}return new BigInteger(e)};BigInteger.fromHex=function(e){if(e==="")return BigInteger.ZERO;t.equal(e,e.match(/^[A-Fa-f0-9]+/),"Invalid hex string");t.equal(e.length%2,0,"Incomplete hex");return new BigInteger(e,16)};BigInteger.prototype.toBuffer=function(e){var t=this.toByteArrayUnsigned();var r=[];var i=e-t.length;while(r.length<i)r.push(0);return new Buffer(r.concat(t))};BigInteger.prototype.toHex=function(e){return this.toBuffer(e).toString("hex")}}).call(this,e("buffer").Buffer)},{"./bigi":3,assert:54,buffer:58}],5:[function(e,t,r){var BigInteger=e("./bigi");e("./convert");t.exports=BigInteger},{"./bigi":3,"./convert":4}],6:[function(e,t,r){t.exports={_args:[["bigi@^1.4.1","/Users/toriningen/Projects/mrakopedia-signed"]],_from:"bigi@>=1.4.1 <2.0.0",_id:"[email protected]",_inCache:true,_installable:true,_location:"/bigi",_nodeVersion:"2.1.0",_npmUser:{email:"[email protected]",name:"jprichardson"},_npmVersion:"2.10.1",_phantomChildren:{},_requested:{name:"bigi",raw:"bigi@^1.4.1",rawSpec:"^1.4.1",scope:null,spec:">=1.4.1 <2.0.0",type:"range"},_requiredBy:["/","/bitcoinjs-lib","/ecurve"],_resolved:"https://registry.npmjs.org/bigi/-/bigi-1.4.1.tgz",_shasum:"726e8ab08d1fe1dfb8aa6bb6309bffecf93a21b7",_shrinkwrap:null,_spec:"bigi@^1.4.1",_where:"/Users/toriningen/Projects/mrakopedia-signed",bugs:{url:"https://github.com/cryptocoinjs/bigi/issues"},dependencies:{},description:"Big integers.",devDependencies:{coveralls:"^2.11.2",istanbul:"^0.3.5",jshint:"^2.5.1",mocha:"^2.1.0",mochify:"^2.1.0"},directories:{},dist:{shasum:"726e8ab08d1fe1dfb8aa6bb6309bffecf93a21b7",tarball:"https://registry.npmjs.org/bigi/-/bigi-1.4.1.tgz"},gitHead:"7d034a1b38ca90f68daa9de472dda2fb813836f1",homepage:"https://github.com/cryptocoinjs/bigi#readme",keywords:["cryptography","math","bitcoin","arbitrary","precision","arithmetic","big","integer","int","number","biginteger","bigint","bignumber","decimal","float"],main:"./lib/index.js",maintainers:[{email:"[email protected]",name:"midnightlightning"},{email:"[email protected]",name:"sidazhang"},{email:"[email protected]",name:"nadav"},{email:"[email protected]",name:"jprichardson"}],name:"bigi",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git+https://github.com/cryptocoinjs/bigi.git"},scripts:{"browser-test":"mochify --wd -R spec",coverage:"istanbul cover ./node_modules/.bin/_mocha -- --reporter list test/*.js",coveralls:"npm run-script coverage && node ./node_modules/.bin/coveralls < coverage/lcov.info",jshint:"jshint --config jshint.json lib/*.js ; true",test:"_mocha -- test/*.js",unit:"mocha"},testling:{browsers:["ie/9..latest","firefox/latest","chrome/latest","safari/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"],files:"test/*.js",harness:"mocha"},version:"1.4.1"}},{}],7:[function(e,t,r){(function(Buffer){function e(e){if(e.length<8)return false;if(e.length>72)return false;if(e[0]!==48)return false;if(e[1]!==e.length-2)return false;if(e[2]!==2)return false;var t=e[3];if(t===0)return false;if(5+t>=e.length)return false;if(e[4+t]!==2)return false;var r=e[5+t];if(r===0)return false;if(6+t+r!==e.length)return false;if(e[4]&128)return false;if(t>1&&e[4]===0&&!(e[5]&128))return false;if(e[t+6]&128)return false;if(r>1&&e[t+6]===0&&!(e[t+7]&128))return false;return true}function r(e){if(e.length<8)throw new Error("DER sequence length is too short");if(e.length>72)throw new Error("DER sequence length is too long");if(e[0]!==48)throw new Error("Expected DER sequence");if(e[1]!==e.length-2)throw new Error("DER sequence length is invalid");if(e[2]!==2)throw new Error("Expected DER integer");var t=e[3];if(t===0)throw new Error("R length is zero");if(5+t>=e.length)throw new Error("R length is too long");if(e[4+t]!==2)throw new Error("Expected DER integer (2)");var r=e[5+t];if(r===0)throw new Error("S length is zero");if(6+t+r!==e.length)throw new Error("S length is invalid");if(e[4]&128)throw new Error("R value is negative");if(t>1&&e[4]===0&&!(e[5]&128))throw new Error("R value excessively padded");if(e[t+6]&128)throw new Error("S value is negative");if(r>1&&e[t+6]===0&&!(e[t+7]&128))throw new Error("S value excessively padded");return{r:e.slice(4,4+t),s:e.slice(6+t)}}function i(e,t){var r=e.length;var i=t.length;if(r===0)throw new Error("R length is zero");if(i===0)throw new Error("S length is zero");if(r>33)throw new Error("R length is too long");if(i>33)throw new Error("S length is too long");if(e[0]&128)throw new Error("R value is negative");if(t[0]&128)throw new Error("S value is negative");if(r>1&&e[0]===0&&!(e[1]&128))throw new Error("R value excessively padded");if(i>1&&t[0]===0&&!(t[1]&128))throw new Error("S value excessively padded");var n=new Buffer(6+r+i);n[0]=48;n[1]=n.length-2;n[2]=2;n[3]=e.length;e.copy(n,4);n[4+r]=2;n[5+r]=t.length;t.copy(n,6+r);return n}t.exports={check:e,decode:r,encode:i}}).call(this,e("buffer").Buffer)},{buffer:58}],8:[function(e,t,r){(function(Buffer){var r=e("bs58check");var i=e("./script");var n=e("./networks");var s=e("typeforce");var f=e("./types");function o(e){var t=r.decode(e);if(t.length<21)throw new TypeError(e+" is too short");if(t.length>21)throw new TypeError(e+" is too long");var i=t[0];var n=t.slice(1);return{hash:n,version:i}}function a(e,t){t=t||n.bitcoin;if(i.isPubKeyHashOutput(e))return u(i.compile(e).slice(3,23),t.pubKeyHash);if(i.isScriptHashOutput(e))return u(i.compile(e).slice(2,22),t.scriptHash);throw new Error(i.toASM(e)+" has no matching Address")}function u(e,t){s(f.tuple(f.Hash160bit,f.UInt8),arguments);var i=new Buffer(21);i.writeUInt8(t,0);e.copy(i,1);return r.encode(i)}function h(e,t){t=t||n.bitcoin;var r=o(e);if(r.version===t.pubKeyHash)return i.pubKeyHashOutput(r.hash);if(r.version===t.scriptHash)return i.scriptHashOutput(r.hash);throw new Error(e+" has no matching Script")}t.exports={fromBase58Check:o,fromOutputScript:a,toBase58Check:u,toOutputScript:h}}).call(this,e("buffer").Buffer)},{"./networks":18,"./script":20,"./types":24,bs58check:26,buffer:58,typeforce:52}],9:[function(e,t,r){(function(Buffer){var r=e("./bufferutils");var i=e("./crypto");var n=e("buffer-compare");var s=e("./transaction");function f(){this.version=1;this.prevHash=null;this.merkleRoot=null;this.timestamp=0;this.bits=0;this.nonce=0}f.fromBuffer=function(e){if(e.length<80)throw new Error("Buffer too small (< 80 bytes)");var t=0;function i(r){t+=r;return e.slice(t-r,t)}function n(){var r=e.readUInt32LE(t);t+=4;return r}var o=new f;o.version=n();o.prevHash=i(32);o.merkleRoot=i(32);o.timestamp=n();o.bits=n();o.nonce=n();if(e.length===80)return o;function a(){var i=r.readVarInt(e,t);t+=i.size;return i.number}function u(){var r=s.fromBuffer(e.slice(t),true);t+=r.byteLength();return r}var h=a();o.transactions=[];for(var c=0;c<h;++c){var l=u();o.transactions.push(l)}return o};f.fromHex=function(e){return f.fromBuffer(new Buffer(e,"hex"))};f.prototype.getHash=function(){return i.hash256(this.toBuffer(true))};f.prototype.getId=function(){return[].reverse.call(this.getHash()).toString("hex")};f.prototype.getUTCDate=function(){var e=new Date(0);e.setUTCSeconds(this.timestamp);return e};f.prototype.toBuffer=function(e){var t=new Buffer(80);var i=0;function n(e){e.copy(t,i);i+=e.length}function s(e){t.writeUInt32LE(e,i);i+=4}s(this.version);n(this.prevHash);n(this.merkleRoot);s(this.timestamp);s(this.bits);s(this.nonce);if(e||!this.transactions)return t;var f=r.varIntBuffer(this.transactions.length);var o=this.transactions.map(function(e){return e.toBuffer()});return Buffer.concat([t,f].concat(o))};f.prototype.toHex=function(e){return this.toBuffer(e).toString("hex")};f.calculateTarget=function(e){var t=((e&4278190080)>>24)-3;var r=e&8388607;var i=31-t;var n=new Buffer(32);n.fill(0);n[i]=r&255;n[i-1]=r>>8;n[i-2]=r>>16;n[i-3]=r>>24;return n};f.prototype.checkProofOfWork=function(){var e=[].reverse.call(this.getHash());var t=f.calculateTarget(this.bits);return n(e,t)<=0};t.exports=f}).call(this,e("buffer").Buffer)},{"./bufferutils":10,"./crypto":11,"./transaction":22,buffer:58,"buffer-compare":28}],10:[function(e,t,r){(function(Buffer){var r=e("./opcodes");function i(e,t){if(typeof e!=="number")throw new Error("cannot write a non-number as a number");if(e<0)throw new Error("specified a negative value for writing an unsigned value");if(e>t)throw new Error("value is larger than maximum value for type");if(Math.floor(e)!==e)throw new Error("value has a fractional component")}function n(e){return e<r.OP_PUSHDATA1?1:e<255?2:e<65535?3:5}function s(e,t){var i=e.readUInt8(t);var n,s;if(i<r.OP_PUSHDATA1){n=i;s=1}else if(i===r.OP_PUSHDATA1){if(t+2>e.length)return null;n=e.readUInt8(t+1);s=2}else if(i===r.OP_PUSHDATA2){if(t+3>e.length)return null;n=e.readUInt16LE(t+1);s=3}else{if(t+5>e.length)return null;if(i!==r.OP_PUSHDATA4)throw new Error("Unexpected opcode");n=e.readUInt32LE(t+1);s=5}return{opcode:i,number:n,size:s}}function f(e,t){var r=e.readUInt32LE(t);var n=e.readUInt32LE(t+4);n*=4294967296;i(n+r,9007199254740991);return n+r}function o(e,t){var r=e.readUInt8(t);var i,n;if(r<253){i=r;n=1}else if(r<254){i=e.readUInt16LE(t+1);n=3}else if(r<255){i=e.readUInt32LE(t+1);n=5}else{i=f(e,t+1);n=9}return{number:i,size:n}}function a(e,t,i){var s=n(t);if(s===1){e.writeUInt8(t,i)}else if(s===2){e.writeUInt8(r.OP_PUSHDATA1,i);e.writeUInt8(t,i+1)}else if(s===3){e.writeUInt8(r.OP_PUSHDATA2,i);e.writeUInt16LE(t,i+1)}else{e.writeUInt8(r.OP_PUSHDATA4,i);e.writeUInt32LE(t,i+1)}return s}function u(e,t,r){i(t,9007199254740991);e.writeInt32LE(t&-1,r);e.writeUInt32LE(Math.floor(t/4294967296),r+4)}function h(e){return e<253?1:e<65536?3:e<4294967296?5:9}function c(e,t,r){var i=h(t);if(i===1){e.writeUInt8(t,r)}else if(i===3){e.writeUInt8(253,r);e.writeUInt16LE(t,r+1)}else if(i===5){e.writeUInt8(254,r);e.writeUInt32LE(t,r+1)}else{e.writeUInt8(255,r);u(e,t,r+1)}return i}function l(e){var t=h(e);var r=new Buffer(t);c(r,e,0);return r}t.exports={equal:e("buffer-equals"),pushDataSize:n,readPushDataInt:s,readUInt64LE:f,readVarInt:o,reverse:e("buffer-reverse"),varIntBuffer:l,varIntSize:h,writePushDataInt:a,writeUInt64LE:u,writeVarInt:c}}).call(this,e("buffer").Buffer)},{"./opcodes":19,buffer:58,"buffer-equals":29,"buffer-reverse":30}],11:[function(e,t,r){var i=e("create-hash");function n(e){return f(a(e))}function s(e){return a(a(e))}function f(e){return i("rmd160").update(e).digest()}function o(e){return i("sha1").update(e).digest()}function a(e){return i("sha256").update(e).digest()}t.exports={hash160:n,hash256:s,ripemd160:f,sha1:o,sha256:a}},{"create-hash":32}],12:[function(e,t,r){(function(Buffer){var r=e("create-hmac");var i=e("typeforce");var n=e("./types");var BigInteger=e("bigi");var s=e("./ecsignature");var f=new Buffer([0]);var o=new Buffer([1]);var a=e("ecurve");var u=a.getCurveByName("secp256k1");function h(e,t,s){i(n.tuple(n.Hash256bit,n.Buffer256bit,n.Function),arguments);var a=new Buffer(32);var h=new Buffer(32);h.fill(1);a.fill(0);a=r("sha256",a).update(h).update(f).update(t).update(e).digest();

h=r("sha256",a).update(h).digest();a=r("sha256",a).update(h).update(o).update(t).update(e).digest();h=r("sha256",a).update(h).digest();h=r("sha256",a).update(h).digest();var c=BigInteger.fromBuffer(h);while(c.signum()<=0||c.compareTo(u.n)>=0||!s(c)){a=r("sha256",a).update(h).update(f).digest();h=r("sha256",a).update(h).digest();h=r("sha256",a).update(h).digest();c=BigInteger.fromBuffer(h)}return c}var c=u.n.shiftRight(1);function l(e,t){i(n.tuple(n.Hash256bit,n.BigInt),arguments);var r=t.toBuffer(32);var f=BigInteger.fromBuffer(e);var o=u.n;var a=u.G;var l,p;h(e,r,function(e){var r=a.multiply(e);if(u.isInfinity(r))return false;l=r.affineX.mod(o);if(l.signum()===0)return false;p=e.modInverse(o).multiply(f.add(t.multiply(l))).mod(o);if(p.signum()===0)return false;return true});if(p.compareTo(c)>0){p=o.subtract(p)}return new s(l,p)}function p(e,t,r){i(n.tuple(n.Hash256bit,n.ECSignature,n.ECPoint),arguments);var s=u.n;var f=u.G;var o=t.r;var a=t.s;if(o.signum()<=0||o.compareTo(s)>=0)return false;if(a.signum()<=0||a.compareTo(s)>=0)return false;var h=BigInteger.fromBuffer(e);var c=a.modInverse(s);var l=h.multiply(c).mod(s);var p=o.multiply(c).mod(s);var d=f.multiplyTwo(l,r,p);if(u.isInfinity(d))return false;var v=d.affineX;var g=v.mod(s);return g.equals(o)}function d(e,t,r){i(n.tuple(n.BigInt,n.ECSignature,n.UInt2),arguments);var s=u.n;var f=u.G;var o=t.r;var a=t.s;if(o.signum()<=0||o.compareTo(s)>=0)throw new Error("Invalid r value");if(a.signum()<=0||a.compareTo(s)>=0)throw new Error("Invalid s value");var h=r&1;var c=r>>1;var l=c?o.add(s):o;var p=u.pointFromX(h,l);var d=p.multiply(s);if(!u.isInfinity(d))throw new Error("nR is not a valid curve point");var v=o.modInverse(s);var g=e.negate().mod(s);var y=p.multiplyTwo(a,f,g).multiply(v);u.validate(y);return y}function v(e,t,r){i(n.tuple(n.BigInt,n.ECSignature,n.ECPoint),arguments);for(var s=0;s<4;s++){var f=d(e,t,s);if(f.equals(r)){return s}}throw new Error("Unable to find valid recovery factor")}t.exports={calcPubKeyRecoveryParam:v,deterministicGenerateK:h,recoverPubKey:d,sign:l,verify:p,__curve:u}}).call(this,e("buffer").Buffer)},{"./ecsignature":14,"./types":24,bigi:5,buffer:58,"create-hmac":35,ecurve:38,typeforce:52}],13:[function(e,t,r){(function(Buffer){var r=e("./crypto");var i=e("bs58check");var n=e("./ecdsa");var s=e("randombytes");var f=e("typeforce");var o=e("./types");var a=e("wif");var u=e("./networks");var BigInteger=e("bigi");var h=e("ecurve");var c=n.__curve;function ECPair(e,t,r){if(r){f({compressed:o.maybe(o.Boolean),network:o.maybe(o.Network)},r)}r=r||{};if(e){if(e.signum()<=0)throw new Error("Private key must be greater than 0");if(e.compareTo(c.n)>=0)throw new Error("Private key must be less than the curve order");if(t)throw new TypeError("Unexpected publicKey parameter");this.d=e}else{f(o.ECPoint,t);this.__Q=t}this.compressed=r.compressed===undefined?true:r.compressed;this.network=r.network||u.bitcoin}Object.defineProperty(ECPair.prototype,"Q",{get:function(){if(!this.__Q&&this.d){this.__Q=c.G.multiply(this.d)}return this.__Q}});ECPair.fromPublicKeyBuffer=function(e,t){var r=h.Point.decodeFrom(c,e);return new ECPair(null,r,{compressed:r.compressed,network:t})};ECPair.fromWIF=function(e,t){t=t||u.bitcoin;var r=i.decode(e);if(o.Array(t)){var n=r[0];t=t.filter(function(e){return n===e.wif}).pop()||{}}var s=a.decodeRaw(t.wif,r);var f=BigInteger.fromBuffer(s.d);return new ECPair(f,null,{compressed:s.compressed,network:t})};ECPair.makeRandom=function(e){e=e||{};var t=e.rng||s;var r;do{var i=t(32);f(o.Buffer256bit,i);r=BigInteger.fromBuffer(i)}while(r.signum()<=0||r.compareTo(c.n)>=0);return new ECPair(r,null,e)};ECPair.prototype.getAddress=function(){var e=this.getPublicKeyBuffer();var t=r.hash160(e);var n=new Buffer(21);n.writeUInt8(this.network.pubKeyHash,0);t.copy(n,1);return i.encode(n)};ECPair.prototype.getNetwork=function(){return this.network};ECPair.prototype.getPublicKeyBuffer=function(){return this.Q.getEncoded(this.compressed)};ECPair.prototype.sign=function(e){if(!this.d)throw new Error("Missing private key");return n.sign(e,this.d)};ECPair.prototype.toWIF=function(){if(!this.d)throw new Error("Missing private key");return a.encode(this.network.wif,this.d.toBuffer(32),this.compressed)};ECPair.prototype.verify=function(e,t){return n.verify(e,t,this.Q)};t.exports=ECPair}).call(this,e("buffer").Buffer)},{"./crypto":11,"./ecdsa":12,"./networks":18,"./types":24,bigi:5,bs58check:26,buffer:58,ecurve:38,randombytes:42,typeforce:52,wif:53}],14:[function(e,t,r){(function(Buffer){var r=e("bip66");var i=e("typeforce");var n=e("./types");var BigInteger=e("bigi");function s(e,t){i(n.tuple(n.BigInt,n.BigInt),arguments);this.r=e;this.s=t}s.parseCompact=function(e){if(e.length!==65)throw new Error("Invalid signature length");var t=e.readUInt8(0)-27;if(t!==(t&7))throw new Error("Invalid signature parameter");var r=!!(t&4);var i=t&3;var n=BigInteger.fromBuffer(e.slice(1,33));var f=BigInteger.fromBuffer(e.slice(33));return{compressed:r,i:i,signature:new s(n,f)}};s.fromDER=function(e){var t=r.decode(e);var i=BigInteger.fromDERInteger(t.r);var n=BigInteger.fromDERInteger(t.s);return new s(i,n)};s.parseScriptSignature=function(e){var t=e.readUInt8(e.length-1);var r=t&~128;if(r<=0||r>=4)throw new Error("Invalid hashType "+t);return{signature:s.fromDER(e.slice(0,-1)),hashType:t}};s.prototype.toCompact=function(e,t){if(t){e+=4}e+=27;var r=new Buffer(65);r.writeUInt8(e,0);this.r.toBuffer(32).copy(r,1);this.s.toBuffer(32).copy(r,33);return r};s.prototype.toDER=function(){var e=new Buffer(this.r.toDERInteger());var t=new Buffer(this.s.toDERInteger());return r.encode(e,t)};s.prototype.toScriptSignature=function(e){var t=e&~128;if(t<=0||t>=4)throw new Error("Invalid hashType "+e);var r=new Buffer(1);r.writeUInt8(e,0);return Buffer.concat([this.toDER(),r])};t.exports=s}).call(this,e("buffer").Buffer)},{"./types":24,bigi:5,bip66:7,buffer:58,typeforce:52}],15:[function(e,t,r){(function(Buffer){var r=e("bs58check");var i=e("./crypto");var n=e("create-hmac");var s=e("typeforce");var f=e("./types");var o=e("./networks");var BigInteger=e("bigi");var ECPair=e("./ecpair");var a=e("ecurve");var u=a.getCurveByName("secp256k1");function h(e,t){s(f.tuple("ECPair",f.Buffer256bit),arguments);if(!e.compressed)throw new TypeError("BIP32 only allows compressed keyPairs");this.keyPair=e;this.chainCode=t;this.depth=0;this.index=0;this.parentFingerprint=0}h.HIGHEST_BIT=2147483648;h.LENGTH=78;h.MASTER_SECRET=new Buffer("Bitcoin seed");h.fromSeedBuffer=function(e,t){s(f.tuple(f.Buffer,f.maybe(f.Network)),arguments);if(e.length<16)throw new TypeError("Seed should be at least 128 bits");if(e.length>64)throw new TypeError("Seed should be at most 512 bits");var r=n("sha512",h.MASTER_SECRET).update(e).digest();var i=r.slice(0,32);var o=r.slice(32);var a=BigInteger.fromBuffer(i);var u=new ECPair(a,null,{network:t});return new h(u,o)};h.fromSeedHex=function(e,t){return h.fromSeedBuffer(new Buffer(e,"hex"),t)};h.fromBase58=function(e,t){var i=r.decode(e);if(i.length!==78)throw new Error("Invalid buffer length");var n=i.readUInt32BE(0);var s;if(Array.isArray(t)){s=t.filter(function(e){return n===e.bip32.private||n===e.bip32.public}).pop()||{}}else{s=t||o.bitcoin}if(n!==s.bip32.private&&n!==s.bip32.public)throw new Error("Invalid network");var f=i[4];var c=i.readUInt32BE(5);if(f===0){if(c!==0)throw new Error("Invalid parent fingerprint")}var l=i.readUInt32BE(9);if(f===0&&l!==0)throw new Error("Invalid index");var p=i.slice(13,45);var d;if(n===s.bip32.private){if(i.readUInt8(45)!==0)throw new Error("Invalid private key");var v=BigInteger.fromBuffer(i.slice(46,78));d=new ECPair(v,null,{network:s})}else{var g=a.Point.decodeFrom(u,i.slice(45,78));if(!g.compressed)throw new Error("Invalid public key");u.validate(g);d=new ECPair(null,g,{network:s})}var y=new h(d,p);y.depth=f;y.index=l;y.parentFingerprint=c;return y};h.prototype.getAddress=function(){return this.keyPair.getAddress()};h.prototype.getIdentifier=function(){return i.hash160(this.keyPair.getPublicKeyBuffer())};h.prototype.getFingerprint=function(){return this.getIdentifier().slice(0,4)};h.prototype.getNetwork=function(){return this.keyPair.getNetwork()};h.prototype.getPublicKeyBuffer=function(){return this.keyPair.getPublicKeyBuffer()};h.prototype.neutered=function(){var e=new ECPair(null,this.keyPair.Q,{network:this.keyPair.network});var t=new h(e,this.chainCode);t.depth=this.depth;t.index=this.index;t.parentFingerprint=this.parentFingerprint;return t};h.prototype.sign=function(e){return this.keyPair.sign(e)};h.prototype.verify=function(e,t){return this.keyPair.verify(e,t)};h.prototype.toBase58=function(e){if(e!==undefined)throw new TypeError("Unsupported argument in 2.0.0");var t=this.keyPair.network;var i=this.keyPair.d?t.bip32.private:t.bip32.public;var n=new Buffer(78);n.writeUInt32BE(i,0);n.writeUInt8(this.depth,4);n.writeUInt32BE(this.parentFingerprint,5);n.writeUInt32BE(this.index,9);this.chainCode.copy(n,13);if(this.keyPair.d){n.writeUInt8(0,45);this.keyPair.d.toBuffer(32).copy(n,46)}else{this.keyPair.getPublicKeyBuffer().copy(n,45)}return r.encode(n)};h.prototype.derive=function(e){var t=e>=h.HIGHEST_BIT;var r=new Buffer(37);if(t){if(!this.keyPair.d)throw new TypeError("Could not derive hardened child key");r[0]=0;this.keyPair.d.toBuffer(32).copy(r,1);r.writeUInt32BE(e,33)}else{this.keyPair.getPublicKeyBuffer().copy(r,0);r.writeUInt32BE(e,33)}var i=n("sha512",this.chainCode).update(r).digest();var s=i.slice(0,32);var f=i.slice(32);var o=BigInteger.fromBuffer(s);if(o.compareTo(u.n)>=0){return this.derive(e+1)}var a;if(this.keyPair.d){var c=o.add(this.keyPair.d).mod(u.n);if(c.signum()===0){return this.derive(e+1)}a=new ECPair(c,null,{network:this.keyPair.network})}else{var l=u.G.multiply(o).add(this.keyPair.Q);if(u.isInfinity(l)){return this.derive(e+1)}a=new ECPair(null,l,{network:this.keyPair.network})}var p=new h(a,f);p.depth=this.depth+1;p.index=e;p.parentFingerprint=this.getFingerprint().readUInt32BE(0);return p};h.prototype.deriveHardened=function(e){return this.derive(e+h.HIGHEST_BIT)};h.prototype.toString=h.prototype.toBase58;t.exports=h}).call(this,e("buffer").Buffer)},{"./crypto":11,"./ecpair":13,"./networks":18,"./types":24,bigi:5,bs58check:26,buffer:58,"create-hmac":35,ecurve:38,typeforce:52}],16:[function(e,t,r){t.exports={Block:e("./block"),ECPair:e("./ecpair"),ECSignature:e("./ecsignature"),HDNode:e("./hdnode"),Transaction:e("./transaction"),TransactionBuilder:e("./transaction_builder"),address:e("./address"),bufferutils:e("./bufferutils"),crypto:e("./crypto"),message:e("./message"),networks:e("./networks"),opcodes:e("./opcodes"),script:e("./script")}},{"./address":8,"./block":9,"./bufferutils":10,"./crypto":11,"./ecpair":13,"./ecsignature":14,"./hdnode":15,"./message":17,"./networks":18,"./opcodes":19,"./script":20,"./transaction":22,"./transaction_builder":23}],17:[function(e,t,r){(function(Buffer){var r=e("./bufferutils");var i=e("./crypto");var n=e("./ecdsa");var s=e("./networks");var BigInteger=e("bigi");var ECPair=e("./ecpair");var f=e("./ecsignature");function o(e,t){var n=new Buffer(t.messagePrefix);var s=new Buffer(e);var f=r.varIntBuffer(s.length);var o=Buffer.concat([n,f,s]);return i.hash256(o)}function a(e,t,r){r=r||s.bitcoin;var i=o(t,r);var f=e.sign(i);var a=BigInteger.fromBuffer(i);var u=n.calcPubKeyRecoveryParam(a,f,e.Q);return f.toCompact(u,e.compressed)}function u(e,t,r,i){if(!Buffer.isBuffer(t)){t=new Buffer(t,"base64")}i=i||s.bitcoin;var a=o(r,i);var u=f.parseCompact(t);var h=BigInteger.fromBuffer(a);var c=n.recoverPubKey(h,u.signature,u.i);var l=new ECPair(null,c,{compressed:u.compressed,network:i});return l.getAddress()===e}t.exports={magicHash:o,sign:a,verify:u}}).call(this,e("buffer").Buffer)},{"./bufferutils":10,"./crypto":11,"./ecdsa":12,"./ecpair":13,"./ecsignature":14,"./networks":18,bigi:5,buffer:58}],18:[function(e,t,r){t.exports={bitcoin:{messagePrefix:"�Bitcoin Signed Message:\n",bip32:{"public":76067358,"private":76066276},pubKeyHash:0,scriptHash:5,wif:128,dustThreshold:546},testnet:{messagePrefix:"�Bitcoin Signed Message:\n",bip32:{"public":70617039,"private":70615956},pubKeyHash:111,scriptHash:196,wif:239,dustThreshold:546},litecoin:{messagePrefix:"�Litecoin Signed Message:\n",bip32:{"public":27108450,"private":27106558},pubKeyHash:48,scriptHash:5,wif:176,dustThreshold:0},dogecoin:{messagePrefix:"�Dogecoin Signed Message:\n",bip32:{"public":49990397,"private":49988504},pubKeyHash:30,scriptHash:22,wif:158,dustThreshold:0}}},{}],19:[function(e,t,r){t.exports={OP_FALSE:0,OP_0:0,OP_PUSHDATA1:76,OP_PUSHDATA2:77,OP_PUSHDATA4:78,OP_1NEGATE:79,OP_RESERVED:80,OP_1:81,OP_TRUE:81,OP_2:82,OP_3:83,OP_4:84,OP_5:85,OP_6:86,OP_7:87,OP_8:88,OP_9:89,OP_10:90,OP_11:91,OP_12:92,OP_13:93,OP_14:94,OP_15:95,OP_16:96,OP_NOP:97,OP_VER:98,OP_IF:99,OP_NOTIF:100,OP_VERIF:101,OP_VERNOTIF:102,OP_ELSE:103,OP_ENDIF:104,OP_VERIFY:105,OP_RETURN:106,OP_TOALTSTACK:107,OP_FROMALTSTACK:108,OP_2DROP:109,OP_2DUP:110,OP_3DUP:111,OP_2OVER:112,OP_2ROT:113,OP_2SWAP:114,OP_IFDUP:115,OP_DEPTH:116,OP_DROP:117,OP_DUP:118,OP_NIP:119,OP_OVER:120,OP_PICK:121,OP_ROLL:122,OP_ROT:123,OP_SWAP:124,OP_TUCK:125,OP_CAT:126,OP_SUBSTR:127,OP_LEFT:128,OP_RIGHT:129,OP_SIZE:130,OP_INVERT:131,OP_AND:132,OP_OR:133,OP_XOR:134,OP_EQUAL:135,OP_EQUALVERIFY:136,OP_RESERVED1:137,OP_RESERVED2:138,OP_1ADD:139,OP_1SUB:140,OP_2MUL:141,OP_2DIV:142,OP_NEGATE:143,OP_ABS:144,OP_NOT:145,OP_0NOTEQUAL:146,OP_ADD:147,OP_SUB:148,OP_MUL:149,OP_DIV:150,OP_MOD:151,OP_LSHIFT:152,OP_RSHIFT:153,OP_BOOLAND:154,OP_BOOLOR:155,OP_NUMEQUAL:156,OP_NUMEQUALVERIFY:157,OP_NUMNOTEQUAL:158,OP_LESSTHAN:159,OP_GREATERTHAN:160,OP_LESSTHANOREQUAL:161,OP_GREATERTHANOREQUAL:162,OP_MIN:163,OP_MAX:164,OP_WITHIN:165,OP_RIPEMD160:166,OP_SHA1:167,OP_SHA256:168,OP_HASH160:169,OP_HASH256:170,OP_CODESEPARATOR:171,OP_CHECKSIG:172,OP_CHECKSIGVERIFY:173,OP_CHECKMULTISIG:174,OP_CHECKMULTISIGVERIFY:175,OP_NOP1:176,OP_NOP2:177,OP_CHECKLOCKTIMEVERIFY:177,OP_NOP3:178,OP_NOP4:179,OP_NOP5:180,OP_NOP6:181,OP_NOP7:182,OP_NOP8:183,OP_NOP9:184,OP_NOP10:185,OP_PUBKEYHASH:253,OP_PUBKEY:254,OP_INVALIDOPCODE:255}},{}],20:[function(e,t,r){(function(Buffer){var r=e("bip66");var i=e("./bufferutils");var n=e("typeforce");var s=e("./types");var f=e("./opcodes");var o=function(){var e={};for(var t in f){var r=f[t];e[r]=t}return e}();var a=f.OP_RESERVED;function u(e){if(Buffer.isBuffer(e)){e=l(e)}return e.map(function(e){if(Buffer.isBuffer(e))return e.toString("hex");return o[e]}).join(" ")}function h(e){n(s.String,e);return c(e.split(" ").map(function(e){if(f[e]!==undefined)return f[e];return new Buffer(e,"hex")}))}function c(e){if(Buffer.isBuffer(e))return e;n(s.Array,e);var t=e.reduce(function(e,t){if(Buffer.isBuffer(t)){return e+i.pushDataSize(t.length)+t.length}return e+1},0);var r=new Buffer(t);var f=0;e.forEach(function(e){if(Buffer.isBuffer(e)){f+=i.writePushDataInt(r,e.length,f);e.copy(r,f);f+=e.length}else{r.writeUInt8(e,f);f+=1}});if(f!==r.length)throw new Error("Could not decode chunks");return r}function l(e){if(s.Array(e))return e;n(s.Buffer,e);var t=[];var r=0;while(r<e.length){var o=e[r];if(o>f.OP_0&&o<=f.OP_PUSHDATA4){var a=i.readPushDataInt(e,r);if(a===null)return[];r+=a.size;if(r+a.number>e.length)return[];var u=e.slice(r,r+a.number);r+=a.number;t.push(u)}else{t.push(o);r+=1}}return t}function p(e){if(!Buffer.isBuffer(e))return false;if(e.length<33)return false;switch(e[0]){case 2:case 3:return e.length===33;case 4:return e.length===65}return false}function d(e){if(!Buffer.isBuffer(e))return false;if(!v(e[e.length-1]))return false;return r.check(e.slice(0,-1))}function v(e){var t=e&~128;return t>0&&t<4}function g(e){var t=l(e);return t.length===2&&d(t[0])&&p(t[1])}function y(e){var t=c(e);return t.length===25&&t[0]===f.OP_DUP&&t[1]===f.OP_HASH160&&t[2]===20&&t[23]===f.OP_EQUALVERIFY&&t[24]===f.OP_CHECKSIG}function w(e){var t=l(e);return t.length===1&&d(t[0])}function b(e){var t=l(e);return t.length===2&&p(t[0])&&t[1]===f.OP_CHECKSIG}function m(e,t){var r=l(e);if(r.length<2)return false;var i=r[r.length-1];if(!Buffer.isBuffer(i))return false;var n=r.slice(0,-1);var s=l(i);if(s.length===0)return false;return B(n,t)===O(s)}function _(e){var t=c(e);return t.length===23&&t[0]===f.OP_HASH160&&t[1]===20&&t[22]===f.OP_EQUAL}function E(e,t){var r=l(e);if(r.length<2)return false;if(r[0]!==f.OP_0)return false;if(t){return r.slice(1).every(function(e){return e===f.OP_0||d(e)})}return r.slice(1).every(d)}function S(e){var t=l(e);if(t.length<4)return false;if(t[t.length-1]!==f.OP_CHECKMULTISIG)return false;var r=t[0];var i=t[t.length-2];if(!s.Number(r))return false;if(!s.Number(i))return false;var n=r-a;var o=i-a;if(n<=0)return false;if(n>o)return false;if(o>16)return false;if(o!==t.length-3)return false;return t.slice(1,-2).every(p)}function T(e){var t=l(e);return t[0]===f.OP_RETURN}function O(e){var t=l(e);if(y(t)){return"pubkeyhash"}else if(_(t)){return"scripthash"}else if(S(t)){return"multisig"}else if(b(t)){return"pubkey"}else if(T(t)){return"nulldata"}return"nonstandard"}function B(e,t){var r=l(e);if(g(r)){return"pubkeyhash"}else if(E(r,t)){return"multisig"}else if(m(r,t)){return"scripthash"}else if(w(r)){return"pubkey"}return"nonstandard"}function P(e){return c([e,f.OP_CHECKSIG])}function I(e){n(s.Hash160bit,e);return c([f.OP_DUP,f.OP_HASH160,e,f.OP_EQUALVERIFY,f.OP_CHECKSIG])}function x(e){n(s.Hash160bit,e);return c([f.OP_HASH160,e,f.OP_EQUAL])}function A(e,t){n(s.tuple(s.Number,[s.Buffer]),arguments);var r=t.length;if(r<e)throw new Error("Not enough pubKeys provided");return c([].concat(a+e,t,a+r,f.OP_CHECKMULTISIG))}function R(e){n(s.Buffer,e);return c([e])}function k(e,t){n(s.tuple(s.Buffer,s.Buffer),arguments);return c([e,t])}function D(e,t){var r=l(e);var i=c(t);return c([].concat(r,i))}function L(e,t){if(t){var r=l(t);if(!S(r))throw new Error("Expected multisig scriptPubKey");var i=r[0];var n=r[r.length-2];var s=i-a;var o=n-a;if(e.length<s)throw new Error("Not enough signatures provided");if(e.length>o)throw new Error("Too many signatures provided")}return c([].concat(f.OP_0,e))}function U(e){return c([f.OP_RETURN,e])}t.exports={compile:c,decompile:l,fromASM:h,toASM:u,number:e("./script_number"),isCanonicalPubKey:p,isCanonicalSignature:d,isDefinedHashType:v,isPubKeyHashInput:g,isPubKeyHashOutput:y,isPubKeyInput:w,isPubKeyOutput:b,isScriptHashInput:m,isScriptHashOutput:_,isMultisigInput:E,isMultisigOutput:S,isNullDataOutput:T,classifyOutput:O,classifyInput:B,pubKeyOutput:P,pubKeyHashOutput:I,scriptHashOutput:x,multisigOutput:A,pubKeyInput:R,pubKeyHashInput:k,scriptHashInput:D,multisigInput:L,nullDataOutput:U}}).call(this,e("buffer").Buffer)},{"./bufferutils":10,"./opcodes":19,"./script_number":21,"./types":24,bip66:7,buffer:58,typeforce:52}],21:[function(e,t,r){(function(Buffer){function e(e,t,r){t=t||4;r=r===undefined?true:r;var i=e.length;if(i===0)return 0;if(i>t)throw new TypeError("Script number overflow");if(r){if((e[i-1]&127)===0){if(i<=1||(e[i-2]&128)===0)throw new Error("Non-minimally encoded script number")}}if(i===5){var n=e.readUInt32LE(0);var s=e.readUInt8(4);if(s&128)return-((s&~128)*4294967296+n);return s*4294967296+n}var f=0;for(var o=0;o<i;++o){f|=e[o]<<8*o}if(e[i-1]&128)return-(f&~(128<<8*(i-1)));return f}function r(e){return e>2147483647?5:e>8388607?4:e>32767?3:e>127?2:e>0?1:0}function i(e){var t=Math.abs(e);var i=r(t);var n=new Buffer(i);var s=e<0;for(var f=0;f<i;++f){n.writeUInt8(t&255,f);t>>=8}if(n[i-1]&128){n.writeUInt8(s?128:0,i-1)}else if(s){n[i-1]|=128}return n}t.exports={decode:e,encode:i}}).call(this,e("buffer").Buffer)},{buffer:58}],22:[function(e,t,r){(function(Buffer){var r=e("./crypto");var i=e("./script");var n=e("./bufferutils");var s=e("./opcodes");var f=e("typeforce");var o=e("./types");function a(){this.version=1;this.locktime=0;this.ins=[];this.outs=[]}a.DEFAULT_SEQUENCE=4294967295;a.SIGHASH_ALL=1;a.SIGHASH_NONE=2;a.SIGHASH_SINGLE=3;a.SIGHASH_ANYONECANPAY=128;a.fromBuffer=function(e,t){var r=0;function i(t){r+=t;return e.slice(r-t,r)}function s(){var t=e.readUInt32LE(r);r+=4;return t}function f(){var t=n.readUInt64LE(e,r);r+=8;return t}function o(){var t=n.readVarInt(e,r);r+=t.size;return t.number}function u(){return i(o())}var h=new a;h.version=s();var c=o();for(var l=0;l<c;++l){h.ins.push({hash:i(32),index:s(),script:u(),sequence:s()})}var p=o();for(l=0;l<p;++l){h.outs.push({value:f(),script:u()})}h.locktime=s();if(t)return h;if(r!==e.length)throw new Error("Transaction has unexpected data");return h};a.fromHex=function(e){return a.fromBuffer(new Buffer(e,"hex"))};a.isCoinbaseHash=function(e){return Array.prototype.every.call(e,function(e){return e===0})};var u=new Buffer(0);a.prototype.addInput=function(e,t,r,i){f(o.tuple(o.Hash256bit,o.UInt32,o.maybe(o.UInt32),o.maybe(o.Buffer)),arguments);if(o.Null(r)){r=a.DEFAULT_SEQUENCE}return this.ins.push({hash:e,index:t,script:i||u,sequence:r})-1};a.prototype.addOutput=function(e,t){f(o.tuple(o.Buffer,o.UInt53),arguments);return this.outs.push({script:e,value:t})-1};a.prototype.byteLength=function(){function e(e){var t=e.length;return n.varIntSize(t)+t}return 8+n.varIntSize(this.ins.length)+n.varIntSize(this.outs.length)+this.ins.reduce(function(t,r){return t+40+e(r.script)},0)+this.outs.reduce(function(t,r){return t+8+e(r.script)},0)};a.prototype.clone=function(){var e=new a;e.version=this.version;e.locktime=this.locktime;e.ins=this.ins.map(function(e){return{hash:e.hash,index:e.index,script:e.script,sequence:e.sequence}});e.outs=this.outs.map(function(e){return{script:e.script,value:e.value}});return e};var h=new Buffer("0000000000000000000000000000000000000000000000000000000000000001","hex");var c=new Buffer("ffffffffffffffff","hex");a.prototype.hashForSignature=function(e,t,n){f(o.tuple(o.UInt32,o.Buffer,o.Number),arguments);if(e>=this.ins.length)return h;var l=this.clone();var p=i.compile(i.decompile(t).filter(function(e){return e!==s.OP_CODESEPARATOR}));var d;l.ins.forEach(function(e){e.script=u});l.ins[e].script=p;if((n&31)===a.SIGHASH_NONE){l.outs=[];l.ins.forEach(function(t,r){if(r!==e){t.sequence=0}})}else if((n&31)===a.SIGHASH_SINGLE){var v=e;if(v>=this.outs.length)return h;l.outs=l.outs.slice(0,v+1);var g={script:u,valueBuffer:c};for(d=0;d<v;d++){l.outs[d]=g}l.ins.forEach(function(t,r){if(r!==e){t.sequence=0}})}if(n&a.SIGHASH_ANYONECANPAY){l.ins[0]=l.ins[e];l.ins=l.ins.slice(0,1)}var y=new Buffer(l.byteLength()+4);y.writeInt32LE(n,y.length-4);l.toBuffer().copy(y,0);return r.hash256(y)};a.prototype.getHash=function(){return r.hash256(this.toBuffer())};a.prototype.getId=function(){return[].reverse.call(this.getHash()).toString("hex")};a.prototype.toBuffer=function(){var e=new Buffer(this.byteLength());var t=0;function r(r){r.copy(e,t);t+=r.length}function i(r){e.writeUInt32LE(r,t);t+=4}function s(r){n.writeUInt64LE(e,r,t);t+=8}function f(r){var i=n.writeVarInt(e,r,t);t+=i}i(this.version);f(this.ins.length);this.ins.forEach(function(e){r(e.hash);i(e.index);f(e.script.length);r(e.script);i(e.sequence)});f(this.outs.length);this.outs.forEach(function(e){if(!e.valueBuffer){s(e.value)}else{r(e.valueBuffer)}f(e.script.length);r(e.script)});i(this.locktime);return e};a.prototype.toHex=function(){return this.toBuffer().toString("hex")};a.prototype.setInputScript=function(e,t){f(o.tuple(o.Number,o.Buffer),arguments);this.ins[e].script=t};t.exports=a}).call(this,e("buffer").Buffer)},{"./bufferutils":10,"./crypto":11,"./opcodes":19,"./script":20,"./types":24,buffer:58,typeforce:52}],23:[function(e,t,r){(function(Buffer){var r=e("./address");var i=e("./crypto");var n=e("./script");var s=e("buffer-equals");var f=e("./networks");var o=e("./opcodes");var a=e("typeforce");var u=e("./types");var ECPair=e("./ecpair");var h=e("./ecsignature");var c=e("./transaction");function l(e,t,r,i,n,f,o){var a=i.slice();var u={};return r.map(function(r){if(o&&s(o,r))return undefined;var i;var h=ECPair.fromPublicKeyBuffer(r);a.some(function(r,s){if(!r)return false;var o=u[f]=u[f]||e.hashForSignature(t,n,f);if(!h.verify(o,r))return false;a[s]=undefined;i=r;return true});return i||undefined})}function p(e,t,r){var s;var f=t.script;var a=n.decompile(f);var u;var c=n.classifyInput(f,true);var p;if(c==="scripthash"){s=a.slice(-1)[0];u=n.scriptHashOutput(i.hash160(s));f=n.compile(a.slice(0,-1));a=a.slice(0,-1);p=n.classifyInput(f,true)}else{p=c}var d;if(s){d=n.decompile(s)}var v,g,y,w;switch(p){case"pubkeyhash":g=h.parseScriptSignature(a[0]);v=g.hashType;y=a.slice(1);w=[g.signature];u=n.pubKeyHashOutput(i.hash160(y[0]));break;case"pubkey":g=h.parseScriptSignature(a[0]);v=g.hashType;w=[g.signature];if(s){y=d.slice(0,1)}break;case"multisig":w=a.slice(1).map(function(e){if(e===o.OP_0)return undefined;var t=h.parseScriptSignature(e);v=t.hashType;return t.signature});if(s){y=d.slice(1,-2);if(y.length!==w.length){w=l(e,r,y,w,s,v,s)}}break}return{hashType:v,prevOutScript:u,prevOutType:c,pubKeys:y,redeemScript:s,scriptType:p,signatures:w}}function d(e){this.prevTxMap={};this.prevOutScripts={};this.prevOutTypes={};this.network=e||f.bitcoin;this.inputs=[];this.tx=new c}d.prototype.setLockTime=function(e){a(u.UInt32,e);if(this.inputs.some(function(e){if(!e.signatures)return false;return e.signatures.some(function(e){return e})})){throw new Error("No, this would invalidate signatures")}this.tx.locktime=e};d.fromTransaction=function(e,t){var r=new d(t);r.tx.version=e.version;r.tx.locktime=e.locktime;e.ins.forEach(function(e){r.addInput(e.hash,e.index,e.sequence)});e.outs.forEach(function(e){r.addOutput(e.script,e.value)});r.inputs=e.ins.map(function(t,r){if(c.isCoinbaseHash(t.hash)){throw new Error("coinbase inputs not supported")}if(t.script.length===0)return{};return p(e,t,r)});return r};d.prototype.addInput=function(e,t,r,i){if(typeof e==="string"){e=[].reverse.call(new Buffer(e,"hex"))}else if(e instanceof c){i=e.outs[t].script;e=e.getHash()}var s={};if(i){var f=n.decompile(i);var o=n.classifyOutput(f);switch(o){case"multisig":s.pubKeys=f.slice(1,-2);s.signatures=s.pubKeys.map(function(){return undefined});break;case"pubkey":s.pubKeys=f.slice(0,1);s.signatures=[undefined];break}if(o!=="scripthash"){s.scriptType=o}s.prevOutScript=i;s.prevOutType=o}if(!this.inputs.every(function(e){if(e.hashType===undefined)return true;return e.hashType&c.SIGHASH_ANYONECANPAY})){throw new Error("No, this would invalidate signatures")}var a=e.toString("hex")+":"+t;if(this.prevTxMap[a])throw new Error("Transaction is already an input");var u=this.tx.addInput(e,t,r);this.inputs[u]=s;this.prevTxMap[a]=u;return u};d.prototype.addOutput=function(e,t){var i=this.tx.outs.length;if(!this.inputs.every(function(e,t){if(e.hashType===undefined)return true;var r=e.hashType&31;if(r===c.SIGHASH_NONE)return true;if(r===c.SIGHASH_SINGLE){return t<i}return false})){throw new Error("No, this would invalidate signatures")}if(typeof e==="string"){e=r.toOutputScript(e,this.network)}return this.tx.addOutput(e,t)};d.prototype.build=function(){return this.__build(false)};d.prototype.buildIncomplete=function(){return this.__build(true)};var v={multisig:true,pubkey:true,pubkeyhash:true};d.prototype.__build=function(e){if(!e){if(!this.tx.ins.length)throw new Error("Transaction has no inputs");if(!this.tx.outs.length)throw new Error("Transaction has no outputs")}var t=this.tx.clone();this.inputs.forEach(function(r,i){var s=r.scriptType;var f;if(!e){if(!s)throw new Error("Transaction is not complete");if(!v[s])throw new Error(s+" not supported");if(!r.signatures)throw new Error("Transaction is missing signatures")}if(r.signatures){switch(s){case"pubkeyhash":var a=r.signatures[0].toScriptSignature(r.hashType);f=n.pubKeyHashInput(a,r.pubKeys[0]);break;case"multisig":var u=r.signatures.map(function(e){return e&&e.toScriptSignature(r.hashType)});if(e){for(var h=0;h<u.length;++h){u[h]=u[h]||o.OP_0}}else{u=u.filter(function(e){return e})}var c=e?undefined:r.redeemScript;f=n.multisigInput(u,c);break;case"pubkey":var l=r.signatures[0].toScriptSignature(r.hashType);f=n.pubKeyInput(l);break}}if(f){if(r.prevOutType==="scripthash"){f=n.scriptHashInput(f,r.redeemScript)}t.setInputScript(i,f)}});return t};d.prototype.sign=function(e,t,r,f){if(t.network!==this.network)throw new Error("Inconsistent network");if(!this.inputs[e])throw new Error("No input at index: "+e);f=f||c.SIGHASH_ALL;var o=this.inputs[e];var a=o.hashType&&o.prevOutScript&&o.prevOutType&&o.pubKeys&&o.scriptType&&o.signatures&&o.signatures.length===o.pubKeys.length;var u=t.getPublicKeyBuffer();if(a){if(r){if(!s(o.redeemScript,r))throw new Error("Inconsistent redeemScript")}if(o.hashType!==f)throw new Error("Inconsistent hashType")}else{if(r){if(o.prevOutScript){if(o.prevOutType!=="scripthash")throw new Error("PrevOutScript must be P2SH");var h=n.decompile(o.prevOutScript)[1];if(!s(h,i.hash160(r)))throw new Error("RedeemScript does not match "+h.toString("hex"))}var l=n.classifyOutput(r);var p=n.decompile(r);var d;switch(l){case"multisig":d=p.slice(1,-2);break;case"pubkeyhash":var v=p[2];var g=i.hash160(t.getPublicKeyBuffer());if(!s(v,g))throw new Error("privateKey cannot sign for this input");d=[u];break;case"pubkey":d=p.slice(0,1);break;default:throw new Error("RedeemScript not supported ("+l+")")}if(!o.prevOutScript){o.prevOutScript=n.scriptHashOutput(i.hash160(r));o.prevOutType="scripthash"}o.pubKeys=d;o.redeemScript=r;o.scriptType=l;o.signatures=d.map(function(){return undefined})}else{if(o.prevOutType==="scripthash")throw new Error("PrevOutScript is P2SH, missing redeemScript");if(!o.scriptType){o.prevOutScript=n.pubKeyHashOutput(i.hash160(t.getPublicKeyBuffer()));o.prevOutType="pubkeyhash";o.pubKeys=[u];o.scriptType=o.prevOutType;o.signatures=[undefined]}else{if(!o.pubKeys||!o.signatures)throw new Error(o.scriptType+" not supported")}}o.hashType=f}var y=o.redeemScript||o.prevOutScript;var w=this.tx.hashForSignature(e,y,f);var b=o.pubKeys.some(function(e,r){if(!s(u,e))return false;if(o.signatures[r])throw new Error("Signature already exists");var i=t.sign(w);o.signatures[r]=i;return true});if(!b)throw new Error("Key pair cannot sign for this input")};t.exports=d}).call(this,e("buffer").Buffer)},{"./address":8,"./crypto":11,"./ecpair":13,"./ecsignature":14,"./networks":18,"./opcodes":19,"./script":20,"./transaction":22,"./types":24,buffer:58,"buffer-equals":29,typeforce:52}],24:[function(e,t,r){var i=e("typeforce");function n(e,t){i(y.Buffer,e);if(e.length!==t)throw new i.TfTypeError("Expected "+t*8+"-bit Buffer, got "+e.length*8+"-bit Buffer");return true}function s(e){return n(e,20)}function f(e){return n(e,32)}function o(e){return n(e,32)}var a=Math.pow(2,53)-1;function u(e){return(e&3)===e}function h(e){return(e&255)===e}function c(e){return e>>>0===e}function l(e){return i.Number(e)&&e>=0&&e<=a&&Math.floor(e)===e}var p=i.quacksLike("BigInteger");var d=i.quacksLike("Point");var v=i.compile({r:p,s:p});var g=i.compile({messagePrefix:i.oneOf(i.Buffer,i.String),bip32:{"public":c,"private":c},pubKeyHash:h,scriptHash:h,wif:h,dustThreshold:l});var y={BigInt:p,Buffer256bit:o,ECPoint:d,ECSignature:v,Hash160bit:s,Hash256bit:f,Network:g,UInt2:u,UInt8:h,UInt32:c,UInt53:l};for(var w in i){y[w]=i[w]}t.exports=y},{typeforce:52}],25:[function(e,t,r){var i=e("base-x");var n="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";var s=i(n);t.exports={encode:s.encode,decode:s.decode}},{"base-x":2}],26:[function(e,t,r){(function(Buffer){"use strict";var r=e("bs58");var i=e("create-hash");function n(e){var t=i("sha256").update(e).digest();return i("sha256").update(t).digest()}function s(e){var t=n(e);return r.encode(Buffer.concat([e,t],e.length+4))}function f(e){var t=new Buffer(r.decode(e));var i=t.slice(0,-4);var s=t.slice(-4);var f=n(i);if(s[0]^f[0]|s[1]^f[1]|s[2]^f[2]|s[3]^f[3])throw new Error("Invalid checksum");return i}t.exports={encode:s,decode:f}}).call(this,e("buffer").Buffer)},{bs58:27,buffer:58,"create-hash":32}],27:[function(e,t,r){var i="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";var n={};for(var s=0;s<i.length;s++){n[i.charAt(s)]=s}var f=58;function o(e){if(e.length===0)return"";var t,r,n=[0];for(t=0;t<e.length;t++){
for(r=0;r<n.length;r++)n[r]<<=8;n[0]+=e[t];var s=0;for(r=0;r<n.length;++r){n[r]+=s;s=n[r]/f|0;n[r]%=f}while(s){n.push(s%f);s=s/f|0}}for(t=0;e[t]===0&&t<e.length-1;t++)n.push(0);var o="";for(var t=n.length-1;t>=0;t--){o=o+i[n[t]]}return o}function a(e){if(e.length===0)return[];var t,r,i=[0];for(t=0;t<e.length;t++){var s=e[t];if(!(s in n))throw new Error("Non-base58 character");for(r=0;r<i.length;r++)i[r]*=f;i[0]+=n[s];var o=0;for(r=0;r<i.length;++r){i[r]+=o;o=i[r]>>8;i[r]&=255}while(o){i.push(o&255);o>>=8}}for(t=0;e[t]==="1"&&t<e.length-1;t++)i.push(0);return i.reverse()}t.exports={encode:o,decode:a}},{}],28:[function(e,t,r){t.exports=function(e,t){if(typeof e.compare==="function")return e.compare(t);if(e===t)return 0;var r=e.length;var i=t.length;var n=0;var s=Math.min(r,i);while(n<s){if(e[n]!==t[n])break;++n}if(n!==s){r=e[n];i=t[n]}if(r<i)return-1;if(i<r)return 1;return 0}},{}],29:[function(e,t,r){(function(Buffer){"use strict";t.exports=function(e,t){if(!Buffer.isBuffer(e)||!Buffer.isBuffer(t)){throw new TypeError("Arguments must be Buffers")}if(e===t){return true}if(typeof e.equals==="function"){return e.equals(t)}if(e.length!==t.length){return false}for(var r=0;r<e.length;r++){if(e[r]!==t[r]){return false}}return true}}).call(this,{isBuffer:e("../../../../../../usr/local/nvm/versions/node/v6.2.0/lib/node_modules/browserify/node_modules/is-buffer/index.js")})},{"../../../../../../usr/local/nvm/versions/node/v6.2.0/lib/node_modules/browserify/node_modules/is-buffer/index.js":63}],30:[function(e,t,r){(function(Buffer){t.exports=function e(t){var r=new Buffer(t.length);for(var i=0,n=t.length-1;i<=n;++i,--n){r[i]=t[n];r[n]=t[i]}return r}}).call(this,e("buffer").Buffer)},{buffer:58}],31:[function(e,t,r){(function(Buffer){var r=e("stream").Transform;var i=e("inherits");var n=e("string_decoder").StringDecoder;t.exports=s;i(s,r);function s(e){r.call(this);this.hashMode=typeof e==="string";if(this.hashMode){this[e]=this._finalOrDigest}else{this.final=this._finalOrDigest}this._decoder=null;this._encoding=null}s.prototype.update=function(e,t,r){if(typeof e==="string"){e=new Buffer(e,t)}var i=this._update(e);if(this.hashMode){return this}if(r){i=this._toString(i,r)}return i};s.prototype.setAutoPadding=function(){};s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")};s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")};s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")};s.prototype._transform=function(e,t,r){var i;try{if(this.hashMode){this._update(e)}else{this.push(this._update(e))}}catch(n){i=n}finally{r(i)}};s.prototype._flush=function(e){var t;try{this.push(this._final())}catch(r){t=r}finally{e(t)}};s.prototype._finalOrDigest=function(e){var t=this._final()||new Buffer("");if(e){t=this._toString(t,e,true)}return t};s.prototype._toString=function(e,t,r){if(!this._decoder){this._decoder=new n(t);this._encoding=t}if(this._encoding!==t){throw new Error("can't switch encodings")}var i=this._decoder.write(e);if(r){i+=this._decoder.end()}return i}}).call(this,e("buffer").Buffer)},{buffer:58,inherits:41,stream:77,string_decoder:78}],32:[function(e,t,r){(function(Buffer){"use strict";var r=e("inherits");var i=e("./md5");var n=e("ripemd160");var s=e("sha.js");var f=e("cipher-base");function o(e){f.call(this,"digest");this._hash=e;this.buffers=[]}r(o,f);o.prototype._update=function(e){this.buffers.push(e)};o.prototype._final=function(){var e=Buffer.concat(this.buffers);var t=this._hash(e);this.buffers=null;return t};function a(e){f.call(this,"digest");this._hash=e}r(a,f);a.prototype._update=function(e){this._hash.update(e)};a.prototype._final=function(){return this._hash.digest()};t.exports=function u(e){e=e.toLowerCase();if("md5"===e)return new o(i);if("rmd160"===e||"ripemd160"===e)return new o(n);return new a(s(e))}}).call(this,e("buffer").Buffer)},{"./md5":34,buffer:58,"cipher-base":31,inherits:41,ripemd160:43,"sha.js":45}],33:[function(e,t,r){(function(Buffer){"use strict";var e=4;var t=new Buffer(e);t.fill(0);var i=8;function n(r,i){if(r.length%e!==0){var n=r.length+(e-r.length%e);r=Buffer.concat([r,t],n)}var s=[];var f=i?r.readInt32BE:r.readInt32LE;for(var o=0;o<r.length;o+=e){s.push(f.call(r,o))}return s}function s(e,t,r){var i=new Buffer(t);var n=r?i.writeInt32BE:i.writeInt32LE;for(var s=0;s<e.length;s++){n.call(i,e[s],s*4,true)}return i}function f(e,t,r,f){if(!Buffer.isBuffer(e))e=new Buffer(e);var o=t(n(e,f),e.length*i);return s(o,r,f)}r.hash=f}).call(this,e("buffer").Buffer)},{buffer:58}],34:[function(e,t,r){"use strict";var i=e("./helpers");function n(e,t){e[t>>5]|=128<<t%32;e[(t+64>>>9<<4)+14]=t;var r=1732584193;var i=-271733879;var n=-1732584194;var s=271733878;for(var c=0;c<e.length;c+=16){var l=r;var p=i;var d=n;var v=s;r=f(r,i,n,s,e[c+0],7,-680876936);s=f(s,r,i,n,e[c+1],12,-389564586);n=f(n,s,r,i,e[c+2],17,606105819);i=f(i,n,s,r,e[c+3],22,-1044525330);r=f(r,i,n,s,e[c+4],7,-176418897);s=f(s,r,i,n,e[c+5],12,1200080426);n=f(n,s,r,i,e[c+6],17,-1473231341);i=f(i,n,s,r,e[c+7],22,-45705983);r=f(r,i,n,s,e[c+8],7,1770035416);s=f(s,r,i,n,e[c+9],12,-1958414417);n=f(n,s,r,i,e[c+10],17,-42063);i=f(i,n,s,r,e[c+11],22,-1990404162);r=f(r,i,n,s,e[c+12],7,1804603682);s=f(s,r,i,n,e[c+13],12,-40341101);n=f(n,s,r,i,e[c+14],17,-1502002290);i=f(i,n,s,r,e[c+15],22,1236535329);r=o(r,i,n,s,e[c+1],5,-165796510);s=o(s,r,i,n,e[c+6],9,-1069501632);n=o(n,s,r,i,e[c+11],14,643717713);i=o(i,n,s,r,e[c+0],20,-373897302);r=o(r,i,n,s,e[c+5],5,-701558691);s=o(s,r,i,n,e[c+10],9,38016083);n=o(n,s,r,i,e[c+15],14,-660478335);i=o(i,n,s,r,e[c+4],20,-405537848);r=o(r,i,n,s,e[c+9],5,568446438);s=o(s,r,i,n,e[c+14],9,-1019803690);n=o(n,s,r,i,e[c+3],14,-187363961);i=o(i,n,s,r,e[c+8],20,1163531501);r=o(r,i,n,s,e[c+13],5,-1444681467);s=o(s,r,i,n,e[c+2],9,-51403784);n=o(n,s,r,i,e[c+7],14,1735328473);i=o(i,n,s,r,e[c+12],20,-1926607734);r=a(r,i,n,s,e[c+5],4,-378558);s=a(s,r,i,n,e[c+8],11,-2022574463);n=a(n,s,r,i,e[c+11],16,1839030562);i=a(i,n,s,r,e[c+14],23,-35309556);r=a(r,i,n,s,e[c+1],4,-1530992060);s=a(s,r,i,n,e[c+4],11,1272893353);n=a(n,s,r,i,e[c+7],16,-155497632);i=a(i,n,s,r,e[c+10],23,-1094730640);r=a(r,i,n,s,e[c+13],4,681279174);s=a(s,r,i,n,e[c+0],11,-358537222);n=a(n,s,r,i,e[c+3],16,-722521979);i=a(i,n,s,r,e[c+6],23,76029189);r=a(r,i,n,s,e[c+9],4,-640364487);s=a(s,r,i,n,e[c+12],11,-421815835);n=a(n,s,r,i,e[c+15],16,530742520);i=a(i,n,s,r,e[c+2],23,-995338651);r=u(r,i,n,s,e[c+0],6,-198630844);s=u(s,r,i,n,e[c+7],10,1126891415);n=u(n,s,r,i,e[c+14],15,-1416354905);i=u(i,n,s,r,e[c+5],21,-57434055);r=u(r,i,n,s,e[c+12],6,1700485571);s=u(s,r,i,n,e[c+3],10,-1894986606);n=u(n,s,r,i,e[c+10],15,-1051523);i=u(i,n,s,r,e[c+1],21,-2054922799);r=u(r,i,n,s,e[c+8],6,1873313359);s=u(s,r,i,n,e[c+15],10,-30611744);n=u(n,s,r,i,e[c+6],15,-1560198380);i=u(i,n,s,r,e[c+13],21,1309151649);r=u(r,i,n,s,e[c+4],6,-145523070);s=u(s,r,i,n,e[c+11],10,-1120210379);n=u(n,s,r,i,e[c+2],15,718787259);i=u(i,n,s,r,e[c+9],21,-343485551);r=h(r,l);i=h(i,p);n=h(n,d);s=h(s,v)}return Array(r,i,n,s)}function s(e,t,r,i,n,s){return h(c(h(h(t,e),h(i,s)),n),r)}function f(e,t,r,i,n,f,o){return s(t&r|~t&i,e,t,n,f,o)}function o(e,t,r,i,n,f,o){return s(t&i|r&~i,e,t,n,f,o)}function a(e,t,r,i,n,f,o){return s(t^r^i,e,t,n,f,o)}function u(e,t,r,i,n,f,o){return s(r^(t|~i),e,t,n,f,o)}function h(e,t){var r=(e&65535)+(t&65535);var i=(e>>16)+(t>>16)+(r>>16);return i<<16|r&65535}function c(e,t){return e<<t|e>>>32-t}t.exports=function l(e){return i.hash(e,n,16)}},{"./helpers":33}],35:[function(e,t,r){(function(Buffer){"use strict";var r=e("create-hash/browser");var i=e("inherits");var n=e("stream").Transform;var s=new Buffer(128);s.fill(0);function f(e,t){n.call(this);e=e.toLowerCase();if(typeof t==="string"){t=new Buffer(t)}var i=e==="sha512"||e==="sha384"?128:64;this._alg=e;this._key=t;if(t.length>i){t=r(e).update(t).digest()}else if(t.length<i){t=Buffer.concat([t,s],i)}var f=this._ipad=new Buffer(i);var o=this._opad=new Buffer(i);for(var a=0;a<i;a++){f[a]=t[a]^54;o[a]=t[a]^92}this._hash=r(e).update(f)}i(f,n);f.prototype.update=function(e,t){this._hash.update(e,t);return this};f.prototype._transform=function(e,t,r){this._hash.update(e);r()};f.prototype._flush=function(e){this.push(this.digest());e()};f.prototype.digest=function(e){var t=this._hash.digest();return r(this._alg).update(this._opad).update(t).digest(e)};t.exports=function o(e,t){return new f(e,t)}}).call(this,e("buffer").Buffer)},{buffer:58,"create-hash/browser":32,inherits:41,stream:77}],36:[function(e,t,r){var i=e("assert");var BigInteger=e("bigi");var Point=e("./point");function n(e,t,r,i,n,s,f){this.p=e;this.a=t;this.b=r;this.G=Point.fromAffine(this,i,n);this.n=s;this.h=f;this.infinity=new Point(this,null,null,BigInteger.ZERO);this.pOverFour=e.add(BigInteger.ONE).shiftRight(2)}n.prototype.pointFromX=function(e,t){var r=t.pow(3).add(this.a.multiply(t)).add(this.b).mod(this.p);var i=r.modPow(this.pOverFour,this.p);var n=i;if(i.isEven()^!e){n=this.p.subtract(n)}return Point.fromAffine(this,t,n)};n.prototype.isInfinity=function(e){if(e===this.infinity)return true;return e.z.signum()===0&&e.y.signum()!==0};n.prototype.isOnCurve=function(e){if(this.isInfinity(e))return true;var t=e.affineX;var r=e.affineY;var i=this.a;var n=this.b;var s=this.p;if(t.signum()<0||t.compareTo(s)>=0)return false;if(r.signum()<0||r.compareTo(s)>=0)return false;var f=r.square().mod(s);var o=t.pow(3).add(i.multiply(t)).add(n).mod(s);return f.equals(o)};n.prototype.validate=function(e){i(!this.isInfinity(e),"Point is at infinity");i(this.isOnCurve(e),"Point is not on the curve");var t=e.multiply(this.n);i(this.isInfinity(t),"Point is not a scalar multiple of G");return true};t.exports=n},{"./point":40,assert:54,bigi:5}],37:[function(e,t,r){t.exports={secp128r1:{p:"fffffffdffffffffffffffffffffffff",a:"fffffffdfffffffffffffffffffffffc",b:"e87579c11079f43dd824993c2cee5ed3",n:"fffffffe0000000075a30d1b9038a115",h:"01",Gx:"161ff7528b899b2d0c28607ca52c5b86",Gy:"cf5ac8395bafeb13c02da292dded7a83"},secp160k1:{p:"fffffffffffffffffffffffffffffffeffffac73",a:"00",b:"07",n:"0100000000000000000001b8fa16dfab9aca16b6b3",h:"01",Gx:"3b4c382ce37aa192a4019e763036f4f5dd4d7ebb",Gy:"938cf935318fdced6bc28286531733c3f03c4fee"},secp160r1:{p:"ffffffffffffffffffffffffffffffff7fffffff",a:"ffffffffffffffffffffffffffffffff7ffffffc",b:"1c97befc54bd7a8b65acf89f81d4d4adc565fa45",n:"0100000000000000000001f4c8f927aed3ca752257",h:"01",Gx:"4a96b5688ef573284664698968c38bb913cbfc82",Gy:"23a628553168947d59dcc912042351377ac5fb32"},secp192k1:{p:"fffffffffffffffffffffffffffffffffffffffeffffee37",a:"00",b:"03",n:"fffffffffffffffffffffffe26f2fc170f69466a74defd8d",h:"01",Gx:"db4ff10ec057e9ae26b07d0280b7f4341da5d1b1eae06c7d",Gy:"9b2f2f6d9c5628a7844163d015be86344082aa88d95e2f9d"},secp192r1:{p:"fffffffffffffffffffffffffffffffeffffffffffffffff",a:"fffffffffffffffffffffffffffffffefffffffffffffffc",b:"64210519e59c80e70fa7e9ab72243049feb8deecc146b9b1",n:"ffffffffffffffffffffffff99def836146bc9b1b4d22831",h:"01",Gx:"188da80eb03090f67cbf20eb43a18800f4ff0afd82ff1012",Gy:"07192b95ffc8da78631011ed6b24cdd573f977a11e794811"},secp256k1:{p:"fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f",a:"00",b:"07",n:"fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",h:"01",Gx:"79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",Gy:"483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8"},secp256r1:{p:"ffffffff00000001000000000000000000000000ffffffffffffffffffffffff",a:"ffffffff00000001000000000000000000000000fffffffffffffffffffffffc",b:"5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b",n:"ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551",h:"01",Gx:"6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296",Gy:"4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5"}}},{}],38:[function(e,t,r){var Point=e("./point");var i=e("./curve");var n=e("./names");t.exports={Curve:i,Point:Point,getCurveByName:n}},{"./curve":36,"./names":39,"./point":40}],39:[function(e,t,r){var BigInteger=e("bigi");var i=e("./curves");var n=e("./curve");function s(e){var t=i[e];if(!t)return null;var r=new BigInteger(t.p,16);var s=new BigInteger(t.a,16);var f=new BigInteger(t.b,16);var o=new BigInteger(t.n,16);var a=new BigInteger(t.h,16);var u=new BigInteger(t.Gx,16);var h=new BigInteger(t.Gy,16);return new n(r,s,f,u,h,o,a)}t.exports=s},{"./curve":36,"./curves":37,bigi:5}],40:[function(e,t,r){(function(Buffer){var r=e("assert");var BigInteger=e("bigi");var i=BigInteger.valueOf(3);function Point(e,t,i,n){r.notStrictEqual(n,undefined,"Missing Z coordinate");this.curve=e;this.x=t;this.y=i;this.z=n;this._zInv=null;this.compressed=true}Object.defineProperty(Point.prototype,"zInv",{get:function(){if(this._zInv===null){this._zInv=this.z.modInverse(this.curve.p)}return this._zInv}});Object.defineProperty(Point.prototype,"affineX",{get:function(){return this.x.multiply(this.zInv).mod(this.curve.p)}});Object.defineProperty(Point.prototype,"affineY",{get:function(){return this.y.multiply(this.zInv).mod(this.curve.p)}});Point.fromAffine=function(e,t,r){return new Point(e,t,r,BigInteger.ONE)};Point.prototype.equals=function(e){if(e===this)return true;if(this.curve.isInfinity(this))return this.curve.isInfinity(e);if(this.curve.isInfinity(e))return this.curve.isInfinity(this);var t=e.y.multiply(this.z).subtract(this.y.multiply(e.z)).mod(this.curve.p);if(t.signum()!==0)return false;var r=e.x.multiply(this.z).subtract(this.x.multiply(e.z)).mod(this.curve.p);return r.signum()===0};Point.prototype.negate=function(){var e=this.curve.p.subtract(this.y);return new Point(this.curve,this.x,e,this.z)};Point.prototype.add=function(e){if(this.curve.isInfinity(this))return e;if(this.curve.isInfinity(e))return this;var t=this.x;var r=this.y;var n=e.x;var s=e.y;var f=s.multiply(this.z).subtract(r.multiply(e.z)).mod(this.curve.p);var o=n.multiply(this.z).subtract(t.multiply(e.z)).mod(this.curve.p);if(o.signum()===0){if(f.signum()===0){return this.twice()}return this.curve.infinity}var a=o.square();var u=a.multiply(o);var h=t.multiply(a);var c=f.square().multiply(this.z);var l=c.subtract(h.shiftLeft(1)).multiply(e.z).subtract(u).multiply(o).mod(this.curve.p);var p=h.multiply(i).multiply(f).subtract(r.multiply(u)).subtract(c.multiply(f)).multiply(e.z).add(f.multiply(u)).mod(this.curve.p);var d=u.multiply(this.z).multiply(e.z).mod(this.curve.p);return new Point(this.curve,l,p,d)};Point.prototype.twice=function(){if(this.curve.isInfinity(this))return this;if(this.y.signum()===0)return this.curve.infinity;var e=this.x;var t=this.y;var r=t.multiply(this.z);var n=r.multiply(t).mod(this.curve.p);var s=this.curve.a;var f=e.square().multiply(i);if(s.signum()!==0){f=f.add(this.z.square().multiply(s))}f=f.mod(this.curve.p);var o=f.square().subtract(e.shiftLeft(3).multiply(n)).shiftLeft(1).multiply(r).mod(this.curve.p);var a=f.multiply(i).multiply(e).subtract(n.shiftLeft(1)).shiftLeft(2).multiply(n).subtract(f.pow(3)).mod(this.curve.p);var u=r.pow(3).shiftLeft(3).mod(this.curve.p);return new Point(this.curve,o,a,u)};Point.prototype.multiply=function(e){if(this.curve.isInfinity(this))return this;if(e.signum()===0)return this.curve.infinity;var t=e;var r=t.multiply(i);var n=this.negate();var s=this;for(var f=r.bitLength()-2;f>0;--f){var o=r.testBit(f);var a=t.testBit(f);s=s.twice();if(o!==a){s=s.add(o?this:n)}}return s};Point.prototype.multiplyTwo=function(e,t,r){var i=Math.max(e.bitLength(),r.bitLength())-1;var n=this.curve.infinity;var s=this.add(t);while(i>=0){var f=e.testBit(i);var o=r.testBit(i);n=n.twice();if(f){if(o){n=n.add(s)}else{n=n.add(this)}}else if(o){n=n.add(t)}--i}return n};Point.prototype.getEncoded=function(e){if(e==undefined)e=this.compressed;if(this.curve.isInfinity(this))return new Buffer("00","hex");var t=this.affineX;var r=this.affineY;var i;var n=Math.floor((this.curve.p.bitLength()+7)/8);if(e){i=new Buffer(1+n);i.writeUInt8(r.isEven()?2:3,0)}else{i=new Buffer(1+n+n);i.writeUInt8(4,0);r.toBuffer(n).copy(i,1+n)}t.toBuffer(n).copy(i,1);return i};Point.decodeFrom=function(e,t){var i=t.readUInt8(0);var n=i!==4;var s=Math.floor((e.p.bitLength()+7)/8);var f=BigInteger.fromBuffer(t.slice(1,1+s));var o;if(n){r.equal(t.length,s+1,"Invalid sequence length");r(i===2||i===3,"Invalid sequence tag");var a=i===3;o=e.pointFromX(a,f)}else{r.equal(t.length,1+s+s,"Invalid sequence length");var u=BigInteger.fromBuffer(t.slice(1+s));o=Point.fromAffine(e,f,u)}o.compressed=n;return o};Point.prototype.toString=function(){if(this.curve.isInfinity(this))return"(INFINITY)";return"("+this.affineX.toString()+","+this.affineY.toString()+")"};t.exports=Point}).call(this,e("buffer").Buffer)},{assert:54,bigi:5,buffer:58}],41:[function(e,t,r){if(typeof Object.create==="function"){t.exports=function i(e,t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}}else{t.exports=function n(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype;e.prototype=new r;e.prototype.constructor=e}}},{}],42:[function(e,t,r){(function(e,r,Buffer){"use strict";function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var n=r.crypto||r.msCrypto;if(n&&n.getRandomValues){t.exports=s}else{t.exports=i}function s(t,i){if(t>65536)throw new Error("requested too many random bytes");var s=new r.Uint8Array(t);if(t>0){n.getRandomValues(s)}var f=new Buffer(s.buffer);if(typeof i==="function"){return e.nextTick(function(){i(null,f)})}return f}}).call(this,e("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{},e("buffer").Buffer)},{_process:66,buffer:58}],43:[function(e,t,r){(function(Buffer){var e=[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];var r=[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];var i=[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];var n=[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];var s=[0,1518500249,1859775393,2400959708,2840853838];var f=[1352829926,1548603684,1836072691,2053994217,0];function o(e){var t=[];for(var r=0,i=0;r<e.length;r++,i+=8){t[i>>>5]|=e[r]<<24-i%32}return t}function a(e){var t=[];for(var r=0;r<e.length*32;r+=8){t.push(e[r>>>5]>>>24-r%32&255)}return t}function u(t,o,a){for(var u=0;u<16;u++){var g=a+u;var y=o[g];o[g]=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360}var w,b,m,_,E;var S,T,O,B,P;S=w=t[0];T=b=t[1];O=m=t[2];B=_=t[3];P=E=t[4];var I;for(u=0;u<80;u+=1){I=w+o[a+e[u]]|0;if(u<16){I+=h(b,m,_)+s[0]}else if(u<32){I+=c(b,m,_)+s[1]}else if(u<48){I+=l(b,m,_)+s[2]}else if(u<64){I+=p(b,m,_)+s[3]}else{I+=d(b,m,_)+s[4]}I=I|0;I=v(I,i[u]);I=I+E|0;w=E;E=_;_=v(m,10);m=b;b=I;I=S+o[a+r[u]]|0;if(u<16){I+=d(T,O,B)+f[0]}else if(u<32){I+=p(T,O,B)+f[1]}else if(u<48){I+=l(T,O,B)+f[2]}else if(u<64){I+=c(T,O,B)+f[3]}else{I+=h(T,O,B)+f[4]}I=I|0;I=v(I,n[u]);I=I+P|0;S=P;P=B;B=v(O,10);O=T;T=I}I=t[1]+m+B|0;t[1]=t[2]+_+P|0;t[2]=t[3]+E+S|0;t[3]=t[4]+w+T|0;t[4]=t[0]+b+O|0;t[0]=I}function h(e,t,r){return e^t^r}function c(e,t,r){return e&t|~e&r}function l(e,t,r){return(e|~t)^r}function p(e,t,r){return e&r|t&~r}function d(e,t,r){return e^(t|~r)}function v(e,t){return e<<t|e>>>32-t}function g(e){var t=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e==="string"){e=new Buffer(e,"utf8")}var r=o(e);var i=e.length*8;var n=e.length*8;r[i>>>5]|=128<<24-i%32;r[(i+64>>>9<<4)+14]=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360;for(var s=0;s<r.length;s+=16){u(t,r,s)}for(s=0;s<5;s++){var f=t[s];t[s]=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360}var h=a(t);return new Buffer(h)}t.exports=g}).call(this,e("buffer").Buffer)},{buffer:58}],44:[function(e,t,r){(function(Buffer){function e(e,t){this._block=new Buffer(e);this._finalSize=t;this._blockSize=e;this._len=0;this._s=0}e.prototype.update=function(e,t){if(typeof e==="string"){t=t||"utf8";e=new Buffer(e,t)}var r=this._len+=e.length;var i=this._s||0;var n=0;var s=this._block;while(i<r){var f=Math.min(e.length,n+this._blockSize-i%this._blockSize);var o=f-n;for(var a=0;a<o;a++){s[i%this._blockSize+a]=e[a+n]}i+=o;n+=o;if(i%this._blockSize===0){this._update(s)}}this._s=i;return this};e.prototype.digest=function(e){var t=this._len*8;this._block[this._len%this._blockSize]=128;this._block.fill(0,this._len%this._blockSize+1);if(t%(this._blockSize*8)>=this._finalSize*8){this._update(this._block);this._block.fill(0)}this._block.writeInt32BE(t,this._blockSize-4);var r=this._update(this._block)||this._hash();return e?r.toString(e):r};e.prototype._update=function(){throw new Error("_update must be implemented by subclass")};t.exports=e}).call(this,e("buffer").Buffer)},{buffer:58}],45:[function(e,t,r){var r=t.exports=function i(e){e=e.toLowerCase();var t=r[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};r.sha=e("./sha");r.sha1=e("./sha1");r.sha224=e("./sha224");r.sha256=e("./sha256");r.sha384=e("./sha384");r.sha512=e("./sha512")},{"./sha":46,"./sha1":47,"./sha224":48,"./sha256":49,"./sha384":50,"./sha512":51}],46:[function(e,t,r){(function(Buffer){var r=e("inherits");var i=e("./hash");var n=[1518500249,1859775393,2400959708|0,3395469782|0];var s=new Array(80);function f(){this.init();this._w=s;i.call(this,64,56)}r(f,i);f.prototype.init=function(){this._a=1732584193;this._b=4023233417;this._c=2562383102;this._d=271733878;this._e=3285377520;return this};function o(e){return e<<5|e>>>27}function a(e){return e<<30|e>>>2}function u(e,t,r,i){if(e===0)return t&r|~t&i;if(e===2)return t&r|t&i|r&i;return t^r^i}f.prototype._update=function(e){var t=this._w;var r=this._a|0;var i=this._b|0;var s=this._c|0;var f=this._d|0;var h=this._e|0;for(var c=0;c<16;++c)t[c]=e.readInt32BE(c*4);for(;c<80;++c)t[c]=t[c-3]^t[c-8]^t[c-14]^t[c-16];for(var l=0;l<80;++l){var p=~~(l/20);var d=o(r)+u(p,i,s,f)+h+t[l]+n[p]|0;h=f;f=s;s=a(i);i=r;r=d}this._a=r+this._a|0;this._b=i+this._b|0;this._c=s+this._c|0;this._d=f+this._d|0;this._e=h+this._e|0};f.prototype._hash=function(){var e=new Buffer(20);e.writeInt32BE(this._a|0,0);e.writeInt32BE(this._b|0,4);e.writeInt32BE(this._c|0,8);e.writeInt32BE(this._d|0,12);e.writeInt32BE(this._e|0,16);return e};t.exports=f}).call(this,e("buffer").Buffer)},{"./hash":44,buffer:58,inherits:41}],47:[function(e,t,r){(function(Buffer){var r=e("inherits");var i=e("./hash");var n=[1518500249,1859775393,2400959708|0,3395469782|0];var s=new Array(80);function f(){this.init();this._w=s;i.call(this,64,56)}r(f,i);f.prototype.init=function(){this._a=1732584193;this._b=4023233417;this._c=2562383102;this._d=271733878;this._e=3285377520;return this};function o(e){return e<<1|e>>>31}function a(e){return e<<5|e>>>27}function u(e){return e<<30|e>>>2}function h(e,t,r,i){if(e===0)return t&r|~t&i;if(e===2)return t&r|t&i|r&i;return t^r^i}f.prototype._update=function(e){var t=this._w;var r=this._a|0;var i=this._b|0;var s=this._c|0;var f=this._d|0;var c=this._e|0;for(var l=0;l<16;++l)t[l]=e.readInt32BE(l*4);for(;l<80;++l)t[l]=o(t[l-3]^t[l-8]^t[l-14]^t[l-16]);for(var p=0;p<80;++p){var d=~~(p/20);var v=a(r)+h(d,i,s,f)+c+t[p]+n[d]|0;c=f;f=s;s=u(i);i=r;r=v}this._a=r+this._a|0;this._b=i+this._b|0;this._c=s+this._c|0;this._d=f+this._d|0;this._e=c+this._e|0};f.prototype._hash=function(){var e=new Buffer(20);e.writeInt32BE(this._a|0,0);e.writeInt32BE(this._b|0,4);e.writeInt32BE(this._c|0,8);e.writeInt32BE(this._d|0,12);e.writeInt32BE(this._e|0,16);return e};t.exports=f}).call(this,e("buffer").Buffer)},{"./hash":44,buffer:58,inherits:41}],48:[function(e,t,r){(function(Buffer){var r=e("inherits");var i=e("./sha256");var n=e("./hash");var s=new Array(64);function f(){this.init();this._w=s;n.call(this,64,56)}r(f,i);f.prototype.init=function(){this._a=3238371032;this._b=914150663;this._c=812702999;this._d=4144912697;this._e=4290775857;this._f=1750603025;this._g=1694076839;this._h=3204075428;return this};f.prototype._hash=function(){var e=new Buffer(28);e.writeInt32BE(this._a,0);e.writeInt32BE(this._b,4);e.writeInt32BE(this._c,8);e.writeInt32BE(this._d,12);e.writeInt32BE(this._e,16);e.writeInt32BE(this._f,20);e.writeInt32BE(this._g,24);return e};t.exports=f}).call(this,e("buffer").Buffer)},{"./hash":44,"./sha256":49,buffer:58,inherits:41}],49:[function(e,t,r){(function(Buffer){var r=e("inherits");var i=e("./hash");var n=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];var s=new Array(64);function f(){this.init();this._w=s;i.call(this,64,56)}r(f,i);f.prototype.init=function(){this._a=1779033703;this._b=3144134277;this._c=1013904242;this._d=2773480762;this._e=1359893119;this._f=2600822924;this._g=528734635;this._h=1541459225;return this};function o(e,t,r){return r^e&(t^r)}function a(e,t,r){return e&t|r&(e|t)}function u(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function h(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function c(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function l(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}f.prototype._update=function(e){var t=this._w;var r=this._a|0;var i=this._b|0;var s=this._c|0;var f=this._d|0;var p=this._e|0;var d=this._f|0;var v=this._g|0;var g=this._h|0;for(var y=0;y<16;++y)t[y]=e.readInt32BE(y*4);for(;y<64;++y)t[y]=l(t[y-2])+t[y-7]+c(t[y-15])+t[y-16]|0;for(var w=0;w<64;++w){var b=g+h(p)+o(p,d,v)+n[w]+t[w]|0;var m=u(r)+a(r,i,s)|0;g=v;v=d;d=p;p=f+b|0;f=s;s=i;i=r;r=b+m|0}this._a=r+this._a|0;this._b=i+this._b|0;this._c=s+this._c|0;this._d=f+this._d|0;this._e=p+this._e|0;this._f=d+this._f|0;this._g=v+this._g|0;this._h=g+this._h|0};f.prototype._hash=function(){var e=new Buffer(32);e.writeInt32BE(this._a,0);e.writeInt32BE(this._b,4);e.writeInt32BE(this._c,8);e.writeInt32BE(this._d,12);e.writeInt32BE(this._e,16);e.writeInt32BE(this._f,20);e.writeInt32BE(this._g,24);e.writeInt32BE(this._h,28);return e};t.exports=f}).call(this,e("buffer").Buffer)},{"./hash":44,buffer:58,inherits:41}],50:[function(e,t,r){(function(Buffer){var r=e("inherits");var i=e("./sha512");var n=e("./hash");var s=new Array(160);function f(){this.init();this._w=s;n.call(this,128,112)}r(f,i);f.prototype.init=function(){this._ah=3418070365;this._bh=1654270250;this._ch=2438529370;this._dh=355462360;this._eh=1731405415;this._fh=2394180231;this._gh=3675008525;this._hh=1203062813;this._al=3238371032;this._bl=914150663;this._cl=812702999;this._dl=4144912697;this._el=4290775857;this._fl=1750603025;this._gl=1694076839;this._hl=3204075428;return this};f.prototype._hash=function(){var e=new Buffer(48);function t(t,r,i){e.writeInt32BE(t,i);e.writeInt32BE(r,i+4)}t(this._ah,this._al,0);t(this._bh,this._bl,8);t(this._ch,this._cl,16);t(this._dh,this._dl,24);t(this._eh,this._el,32);t(this._fh,this._fl,40);return e};t.exports=f}).call(this,e("buffer").Buffer)},{"./hash":44,"./sha512":51,buffer:58,inherits:41}],51:[function(e,t,r){(function(Buffer){var r=e("inherits");var i=e("./hash");var n=[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];var s=new Array(160);function f(){this.init();this._w=s;i.call(this,128,112)}r(f,i);f.prototype.init=function(){this._ah=1779033703;this._bh=3144134277;this._ch=1013904242;this._dh=2773480762;this._eh=1359893119;this._fh=2600822924;this._gh=528734635;this._hh=1541459225;this._al=4089235720;this._bl=2227873595;this._cl=4271175723;this._dl=1595750129;this._el=2917565137;this._fl=725511199;this._gl=4215389547;this._hl=327033209;return this};function o(e,t,r){return r^e&(t^r)}function a(e,t,r){return e&t|r&(e|t)}function u(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function h(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function c(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function l(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function p(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function d(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function v(e,t){return e>>>0<t>>>0?1:0}f.prototype._update=function(e){var t=this._w;var r=this._ah|0;var i=this._bh|0;var s=this._ch|0;var f=this._dh|0;var g=this._eh|0;var y=this._fh|0;var w=this._gh|0;var b=this._hh|0;var m=this._al|0;var _=this._bl|0;var E=this._cl|0;var S=this._dl|0;var T=this._el|0;var O=this._fl|0;var B=this._gl|0;var P=this._hl|0;for(var I=0;I<32;I+=2){t[I]=e.readInt32BE(I*4);t[I+1]=e.readInt32BE(I*4+4)}for(;I<160;I+=2){var x=t[I-15*2];var A=t[I-15*2+1];var R=c(x,A);var k=l(A,x);x=t[I-2*2];A=t[I-2*2+1];var D=p(x,A);var L=d(A,x);var U=t[I-7*2];var M=t[I-7*2+1];var j=t[I-16*2];var N=t[I-16*2+1];var C=k+M|0;var H=R+U+v(C,k)|0;C=C+L|0;H=H+D+v(C,L)|0;C=C+N|0;H=H+j+v(C,N)|0;t[I]=H;t[I+1]=C}for(var q=0;q<160;q+=2){H=t[q];C=t[q+1];var z=a(r,i,s);var F=a(m,_,E);var K=u(r,m);var Y=u(m,r);var G=h(g,T);var V=h(T,g);var W=n[q];var Q=n[q+1];var J=o(g,y,w);var Z=o(T,O,B);var X=P+V|0;var $=b+G+v(X,P)|0;X=X+Z|0;$=$+J+v(X,Z)|0;X=X+Q|0;$=$+W+v(X,Q)|0;X=X+C|0;$=$+H+v(X,C)|0;var ee=Y+F|0;var te=K+z+v(ee,Y)|0;b=w;P=B;w=y;B=O;y=g;O=T;T=S+X|0;g=f+$+v(T,S)|0;f=s;S=E;s=i;E=_;i=r;_=m;m=X+ee|0;r=$+te+v(m,X)|0}this._al=this._al+m|0;this._bl=this._bl+_|0;this._cl=this._cl+E|0;this._dl=this._dl+S|0;this._el=this._el+T|0;this._fl=this._fl+O|0;this._gl=this._gl+B|0;this._hl=this._hl+P|0;this._ah=this._ah+r+v(this._al,m)|0;

this._bh=this._bh+i+v(this._bl,_)|0;this._ch=this._ch+s+v(this._cl,E)|0;this._dh=this._dh+f+v(this._dl,S)|0;this._eh=this._eh+g+v(this._el,T)|0;this._fh=this._fh+y+v(this._fl,O)|0;this._gh=this._gh+w+v(this._gl,B)|0;this._hh=this._hh+b+v(this._hl,P)|0};f.prototype._hash=function(){var e=new Buffer(64);function t(t,r,i){e.writeInt32BE(t,i);e.writeInt32BE(r,i+4)}t(this._ah,this._al,0);t(this._bh,this._bl,8);t(this._ch,this._cl,16);t(this._dh,this._dl,24);t(this._eh,this._el,32);t(this._fh,this._fl,40);t(this._gh,this._gl,48);t(this._hh,this._hl,56);return e};t.exports=f}).call(this,e("buffer").Buffer)},{"./hash":44,buffer:58,inherits:41}],52:[function(e,t,r){(function(Buffer){var r=e("inherits");function i(e,t){this.tfError=Error.call(this);if(arguments.length===1&&typeof e==="string"){this.message=e}else{this.tfType=e;this.tfValue=t;var r;Object.defineProperty(this,"message",{get:function(){if(r)return r;r=h(e,t);return r}})}}r(i,Error);Object.defineProperty(i,"stack",{get:function(){return this.tfError.stack}});function n(e,t,r,i){this.tfError=i||Error.call(this);this.tfProperty=t;this.tfType=e;this.tfValue=r;var n;Object.defineProperty(this,"message",{get:function(){if(n)return n;if(e){n=c(e,t,r)}else{n='Unexpected property "'+t+'"'}return n}})}r(n,Error);Object.defineProperty(n,"stack",{get:function(){return this.tfError.stack}});n.prototype.asChildOf=function(e){return new n(this.tfType,e+"."+this.tfProperty,this.tfValue,this.tfError)};function s(e){return e.name||e.toString().match(/function (.*?)\s*\(/)[1]}function f(e){if(l.Null(e))return"";return s(e.constructor)}function o(e){if(l.Function(e))return"";if(l.String(e))return JSON.stringify(e);if(e&&l.Object(e))return"";return e}function a(e){if(l.Function(e))return e.toJSON?e.toJSON():s(e);if(l.Array(e))return"Array";if(e&&l.Object(e))return"Object";return e||""}function u(e){e=a(e);return l.Object(e)?JSON.stringify(e):e}function h(e,t){var r=f(t);var i=o(t);return"Expected "+u(e)+", got"+(r!==""?" "+r:"")+(i!==""?" "+i:"")}function c(e,t,r){return h('property "'+u(t)+'" of type '+u(e),r)}var l={Array:function(e){return e!==null&&e!==undefined&&e.constructor===Array},Boolean:function(e){return typeof e==="boolean"},Buffer:function(e){return Buffer.isBuffer(e)},Function:function(e){return typeof e==="function"},Null:function(e){return e===undefined||e===null},Number:function(e){return typeof e==="number"},Object:function(e){return typeof e==="object"},String:function(e){return typeof e==="string"},"":function(){return true}};var p={arrayOf:function y(e){function y(t,r){if(!l.Array(t))return false;return t.every(function(t){return v(e,t,r,y)})}y.toJSON=function(){return[a(e)]};return y},maybe:function w(e){function w(t,r){return l.Null(t)||v(e,t,r,w)}w.toJSON=function(){return"?"+u(e)};return w},object:function b(e){function b(t,r){if(!l.Object(t))return false;if(l.Null(t))return false;var s;try{for(s in e){var f=e[s];var o=t[s];v(f,o,r)}}catch(a){if(a instanceof n){throw a.asChildOf(s)}else if(a instanceof i){throw new n(a.tfType,s,a.tfValue,a.tfError)}throw a}if(r){for(s in t){if(e[s])continue;throw new n(undefined,s)}}return true}b.toJSON=function(){return a(e)};return b},map:function m(e,t){function m(r,s){v(l.Object,r,s);if(l.Null(r))return false;var f;try{for(f in r){if(t){v(t,f,s)}var o=r[f];v(e,o,s)}}catch(a){if(a instanceof n){throw a.asChildOf(f)}else if(a instanceof i){throw new n(a.tfType,t||f,a.tfValue)}throw a}return true}if(t){m.toJSON=function(){return"{"+u(t)+": "+u(e)+"}"}}else{m.toJSON=function(){return"{"+u(e)+"}"}}return m},oneOf:function _(){var e=[].slice.call(arguments);function _(t,r){return e.some(function(e){try{return v(e,t,r)}catch(s){if(s instanceof i||s instanceof n)return false;throw s}})}_.toJSON=function(){return e.map(u).join("|")};return _},quacksLike:function E(e){function E(t){return e===f(t)}E.toJSON=function(){return e};return E},tuple:function S(){var e=[].slice.call(arguments);function S(t,r){return e.every(function(e,i){return v(e,t[i],r)})}S.toJSON=function(){return"("+e.map(u).join(", ")+")"};return S},value:function T(e){function T(t){return t===e}T.toJSON=function(){return e};return T}};function d(e){if(l.String(e)){if(e[0]==="?")return p.maybe(d(e.slice(1)));return l[e]||p.quacksLike(e)}else if(e&&l.Object(e)){if(l.Array(e))return p.arrayOf(d(e[0]));var t={};for(var r in e){t[r]=d(e[r])}return p.object(t)}else if(l.Function(e)){return e}return p.value(e)}function v(e,t,r,n){if(l.Function(e)){if(e(t,r))return true;throw new i(n||e,t)}return v(d(e),t,r)}var g;Object.keys(l).forEach(function(e){var t=l[e];t.toJSON=function(){return e};v[e]=t});for(g in p){v[g]=p[g]}t.exports=v;t.exports.compile=d;t.exports.TfTypeError=i;t.exports.TfPropertyTypeError=n}).call(this,{isBuffer:e("../../../../../../usr/local/nvm/versions/node/v6.2.0/lib/node_modules/browserify/node_modules/is-buffer/index.js")})},{"../../../../../../usr/local/nvm/versions/node/v6.2.0/lib/node_modules/browserify/node_modules/is-buffer/index.js":63,inherits:41}],53:[function(e,t,r){(function(Buffer){var r=e("bs58check");function i(e,t){if(t[0]!==e)throw new Error("Invalid network version");if(t.length===34){if(t[33]!==1)throw new Error("Invalid compression flag");return{version:t[0],d:t.slice(1,-1),compressed:true}}if(t.length!==33)throw new Error("Invalid WIF length");return{version:t[0],d:t.slice(1),compressed:false}}function n(e,t){return i(e,r.decode(t))}function s(e,t,r){var i=new Buffer(r?34:33);i.writeUInt8(e,0);t.copy(i,1);if(r){i[33]=1}return i}function f(e,t,i){return r.encode(s(e,t,i))}t.exports={decode:n,decodeRaw:i,encode:f,encodeRaw:s}}).call(this,e("buffer").Buffer)},{bs58check:26,buffer:58}],54:[function(e,t,r){var i=e("util/");var n=Array.prototype.slice;var s=Object.prototype.hasOwnProperty;var f=t.exports=c;f.AssertionError=function w(e){this.name="AssertionError";this.actual=e.actual;this.expected=e.expected;this.operator=e.operator;if(e.message){this.message=e.message;this.generatedMessage=false}else{this.message=u(this);this.generatedMessage=true}var t=e.stackStartFunction||h;if(Error.captureStackTrace){Error.captureStackTrace(this,t)}else{var r=new Error;if(r.stack){var i=r.stack;var n=t.name;var s=i.indexOf("\n"+n);if(s>=0){var f=i.indexOf("\n",s+1);i=i.substring(f+1)}this.stack=i}}};i.inherits(f.AssertionError,Error);function o(e,t){if(i.isUndefined(t)){return""+t}if(i.isNumber(t)&&!isFinite(t)){return t.toString()}if(i.isFunction(t)||i.isRegExp(t)){return t.toString()}return t}function a(e,t){if(i.isString(e)){return e.length<t?e:e.slice(0,t)}else{return e}}function u(e){return a(JSON.stringify(e.actual,o),128)+" "+e.operator+" "+a(JSON.stringify(e.expected,o),128)}function h(e,t,r,i,n){throw new f.AssertionError({message:r,actual:e,expected:t,operator:i,stackStartFunction:n})}f.fail=h;function c(e,t){if(!e)h(e,true,t,"==",f.ok)}f.ok=c;f.equal=function b(e,t,r){if(e!=t)h(e,t,r,"==",f.equal)};f.notEqual=function m(e,t,r){if(e==t){h(e,t,r,"!=",f.notEqual)}};f.deepEqual=function _(e,t,r){if(!l(e,t)){h(e,t,r,"deepEqual",f.deepEqual)}};function l(e,t){if(e===t){return true}else if(i.isBuffer(e)&&i.isBuffer(t)){if(e.length!=t.length)return false;for(var r=0;r<e.length;r++){if(e[r]!==t[r])return false}return true}else if(i.isDate(e)&&i.isDate(t)){return e.getTime()===t.getTime()}else if(i.isRegExp(e)&&i.isRegExp(t)){return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase}else if(!i.isObject(e)&&!i.isObject(t)){return e==t}else{return d(e,t)}}function p(e){return Object.prototype.toString.call(e)=="[object Arguments]"}function d(e,t){if(i.isNullOrUndefined(e)||i.isNullOrUndefined(t))return false;if(e.prototype!==t.prototype)return false;if(i.isPrimitive(e)||i.isPrimitive(t)){return e===t}var r=p(e),s=p(t);if(r&&!s||!r&&s)return false;if(r){e=n.call(e);t=n.call(t);return l(e,t)}var f=y(e),o=y(t),a,u;if(f.length!=o.length)return false;f.sort();o.sort();for(u=f.length-1;u>=0;u--){if(f[u]!=o[u])return false}for(u=f.length-1;u>=0;u--){a=f[u];if(!l(e[a],t[a]))return false}return true}f.notDeepEqual=function E(e,t,r){if(l(e,t)){h(e,t,r,"notDeepEqual",f.notDeepEqual)}};f.strictEqual=function S(e,t,r){if(e!==t){h(e,t,r,"===",f.strictEqual)}};f.notStrictEqual=function T(e,t,r){if(e===t){h(e,t,r,"!==",f.notStrictEqual)}};function v(e,t){if(!e||!t){return false}if(Object.prototype.toString.call(t)=="[object RegExp]"){return t.test(e)}else if(e instanceof t){return true}else if(t.call({},e)===true){return true}return false}function g(e,t,r,n){var s;if(i.isString(r)){n=r;r=null}try{t()}catch(f){s=f}n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:".");if(e&&!s){h(s,r,"Missing expected exception"+n)}if(!e&&v(s,r)){h(s,r,"Got unwanted exception"+n)}if(e&&s&&r&&!v(s,r)||!e&&s){throw s}}f.throws=function(e,t,r){g.apply(this,[true].concat(n.call(arguments)))};f.doesNotThrow=function(e,t){g.apply(this,[false].concat(n.call(arguments)))};f.ifError=function(e){if(e){throw e}};var y=Object.keys||function(e){var t=[];for(var r in e){if(s.call(e,r))t.push(r)}return t}},{"util/":81}],55:[function(e,t,r){"use strict";r.toByteArray=o;r.fromByteArray=h;var i=[];var n=[];var s=typeof Uint8Array!=="undefined"?Uint8Array:Array;function f(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var t=0,r=e.length;t<r;++t){i[t]=e[t];n[e.charCodeAt(t)]=t}n["-".charCodeAt(0)]=62;n["_".charCodeAt(0)]=63}f();function o(e){var t,r,i,f,o,a;var u=e.length;if(u%4>0){throw new Error("Invalid string. Length must be a multiple of 4")}o=e[u-2]==="="?2:e[u-1]==="="?1:0;a=new s(u*3/4-o);i=o>0?u-4:u;var h=0;for(t=0,r=0;t<i;t+=4,r+=3){f=n[e.charCodeAt(t)]<<18|n[e.charCodeAt(t+1)]<<12|n[e.charCodeAt(t+2)]<<6|n[e.charCodeAt(t+3)];a[h++]=f>>16&255;a[h++]=f>>8&255;a[h++]=f&255}if(o===2){f=n[e.charCodeAt(t)]<<2|n[e.charCodeAt(t+1)]>>4;a[h++]=f&255}else if(o===1){f=n[e.charCodeAt(t)]<<10|n[e.charCodeAt(t+1)]<<4|n[e.charCodeAt(t+2)]>>2;a[h++]=f>>8&255;a[h++]=f&255}return a}function a(e){return i[e>>18&63]+i[e>>12&63]+i[e>>6&63]+i[e&63]}function u(e,t,r){var i;var n=[];for(var s=t;s<r;s+=3){i=(e[s]<<16)+(e[s+1]<<8)+e[s+2];n.push(a(i))}return n.join("")}function h(e){var t;var r=e.length;var n=r%3;var s="";var f=[];var o=16383;for(var a=0,h=r-n;a<h;a+=o){f.push(u(e,a,a+o>h?h:a+o))}if(n===1){t=e[r-1];s+=i[t>>2];s+=i[t<<4&63];s+="=="}else if(n===2){t=(e[r-2]<<8)+e[r-1];s+=i[t>>10];s+=i[t>>4&63];s+=i[t<<2&63];s+="="}f.push(s);return f.join("")}},{}],56:[function(e,t,r){},{}],57:[function(e,t,r){(function(t){"use strict";var i=e("buffer");var Buffer=i.Buffer;var n=i.SlowBuffer;var s=i.kMaxLength||2147483647;r.alloc=function f(e,t,r){if(typeof Buffer.alloc==="function"){return Buffer.alloc(e,t,r)}if(typeof r==="number"){throw new TypeError("encoding must not be number")}if(typeof e!=="number"){throw new TypeError("size must be a number")}if(e>s){throw new RangeError("size is too large")}var i=r;var n=t;if(n===undefined){i=undefined;n=0}var f=new Buffer(e);if(typeof n==="string"){var o=new Buffer(n,i);var a=o.length;var u=-1;while(++u<e){f[u]=o[u%a]}}else{f.fill(n)}return f};r.allocUnsafe=function o(e){if(typeof Buffer.allocUnsafe==="function"){return Buffer.allocUnsafe(e)}if(typeof e!=="number"){throw new TypeError("size must be a number")}if(e>s){throw new RangeError("size is too large")}return new Buffer(e)};r.from=function a(e,r,i){if(typeof Buffer.from==="function"&&(!t.Uint8Array||Uint8Array.from!==Buffer.from)){return Buffer.from(e,r,i)}if(typeof e==="number"){throw new TypeError('"value" argument must not be a number')}if(typeof e==="string"){return new Buffer(e,r)}if(typeof ArrayBuffer!=="undefined"&&e instanceof ArrayBuffer){var n=r;if(arguments.length===1){return new Buffer(e)}if(typeof n==="undefined"){n=0}var s=i;if(typeof s==="undefined"){s=e.byteLength-n}if(n>=e.byteLength){throw new RangeError("'offset' is out of bounds")}if(s>e.byteLength-n){throw new RangeError("'length' is out of bounds")}return new Buffer(e.slice(n,n+s))}if(Buffer.isBuffer(e)){var f=new Buffer(e.length);e.copy(f,0,0,e.length);return f}if(e){if(Array.isArray(e)||typeof ArrayBuffer!=="undefined"&&e.buffer instanceof ArrayBuffer||"length"in e){return new Buffer(e)}if(e.type==="Buffer"&&Array.isArray(e.data)){return new Buffer(e.data)}}throw new TypeError("First argument must be a string, Buffer, "+"ArrayBuffer, Array, or array-like object.")};r.allocUnsafeSlow=function u(e){if(typeof Buffer.allocUnsafeSlow==="function"){return Buffer.allocUnsafeSlow(e)}if(typeof e!=="number"){throw new TypeError("size must be a number")}if(e>=s){throw new RangeError("size is too large")}return new n(e)}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{buffer:58}],58:[function(e,t,r){(function(t){"use strict";var i=e("base64-js");var n=e("ieee754");var s=e("isarray");r.Buffer=Buffer;r.SlowBuffer=w;r.INSPECT_MAX_BYTES=50;Buffer.TYPED_ARRAY_SUPPORT=t.TYPED_ARRAY_SUPPORT!==undefined?t.TYPED_ARRAY_SUPPORT:f();r.kMaxLength=o();function f(){try{var e=new Uint8Array(1);e.foo=function(){return 42};return e.foo()===42&&typeof e.subarray==="function"&&e.subarray(1,1).byteLength===0}catch(t){return false}}function o(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(o()<t){throw new RangeError("Invalid typed array length")}if(Buffer.TYPED_ARRAY_SUPPORT){e=new Uint8Array(t);e.__proto__=Buffer.prototype}else{if(e===null){e=new Buffer(t)}e.length=t}return e}function Buffer(e,t,r){if(!Buffer.TYPED_ARRAY_SUPPORT&&!(this instanceof Buffer)){return new Buffer(e,t,r)}if(typeof e==="number"){if(typeof t==="string"){throw new Error("If encoding is specified then the first argument must be a string")}return l(this,e)}return u(this,e,t,r)}Buffer.poolSize=8192;Buffer._augment=function(e){e.__proto__=Buffer.prototype;return e};function u(e,t,r,i){if(typeof t==="number"){throw new TypeError('"value" argument must not be a number')}if(typeof ArrayBuffer!=="undefined"&&t instanceof ArrayBuffer){return v(e,t,r,i)}if(typeof t==="string"){return p(e,t,r)}return g(e,t)}Buffer.from=function(e,t,r){return u(null,e,t,r)};if(Buffer.TYPED_ARRAY_SUPPORT){Buffer.prototype.__proto__=Uint8Array.prototype;Buffer.__proto__=Uint8Array;if(typeof Symbol!=="undefined"&&Symbol.species&&Buffer[Symbol.species]===Buffer){Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:true})}}function h(e){if(typeof e!=="number"){throw new TypeError('"size" argument must be a number')}}function c(e,t,r,i){h(t);if(t<=0){return a(e,t)}if(r!==undefined){return typeof i==="string"?a(e,t).fill(r,i):a(e,t).fill(r)}return a(e,t)}Buffer.alloc=function(e,t,r){return c(null,e,t,r)};function l(e,t){h(t);e=a(e,t<0?0:y(t)|0);if(!Buffer.TYPED_ARRAY_SUPPORT){for(var r=0;r<t;r++){e[r]=0}}return e}Buffer.allocUnsafe=function(e){return l(null,e)};Buffer.allocUnsafeSlow=function(e){return l(null,e)};function p(e,t,r){if(typeof r!=="string"||r===""){r="utf8"}if(!Buffer.isEncoding(r)){throw new TypeError('"encoding" must be a valid string encoding')}var i=b(t,r)|0;e=a(e,i);e.write(t,r);return e}function d(e,t){var r=y(t.length)|0;e=a(e,r);for(var i=0;i<r;i+=1){e[i]=t[i]&255}return e}function v(e,t,r,i){t.byteLength;if(r<0||t.byteLength<r){throw new RangeError("'offset' is out of bounds")}if(t.byteLength<r+(i||0)){throw new RangeError("'length' is out of bounds")}if(i===undefined){t=new Uint8Array(t,r)}else{t=new Uint8Array(t,r,i)}if(Buffer.TYPED_ARRAY_SUPPORT){e=t;e.__proto__=Buffer.prototype}else{e=d(e,t)}return e}function g(e,t){if(Buffer.isBuffer(t)){var r=y(t.length)|0;e=a(e,r);if(e.length===0){return e}t.copy(e,0,0,r);return e}if(t){if(typeof ArrayBuffer!=="undefined"&&t.buffer instanceof ArrayBuffer||"length"in t){if(typeof t.length!=="number"||$(t.length)){return a(e,0)}return d(e,t)}if(t.type==="Buffer"&&s(t.data)){return d(e,t.data)}}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function y(e){if(e>=o()){throw new RangeError("Attempt to allocate Buffer larger than maximum "+"size: 0x"+o().toString(16)+" bytes")}return e|0}function w(e){if(+e!=e){e=0}return Buffer.alloc(+e)}Buffer.isBuffer=function ee(e){return!!(e!=null&&e._isBuffer)};Buffer.compare=function te(e,t){if(!Buffer.isBuffer(e)||!Buffer.isBuffer(t)){throw new TypeError("Arguments must be Buffers")}if(e===t)return 0;var r=e.length;var i=t.length;for(var n=0,s=Math.min(r,i);n<s;++n){if(e[n]!==t[n]){r=e[n];i=t[n];break}}if(r<i)return-1;if(i<r)return 1;return 0};Buffer.isEncoding=function re(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return true;default:return false}};Buffer.concat=function ie(e,t){if(!s(e)){throw new TypeError('"list" argument must be an Array of Buffers')}if(e.length===0){return Buffer.alloc(0)}var r;if(t===undefined){t=0;for(r=0;r<e.length;r++){t+=e[r].length}}var i=Buffer.allocUnsafe(t);var n=0;for(r=0;r<e.length;r++){var f=e[r];if(!Buffer.isBuffer(f)){throw new TypeError('"list" argument must be an Array of Buffers')}f.copy(i,n);n+=f.length}return i};function b(e,t){if(Buffer.isBuffer(e)){return e.length}if(typeof ArrayBuffer!=="undefined"&&typeof ArrayBuffer.isView==="function"&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer)){return e.byteLength}if(typeof e!=="string"){e=""+e}var r=e.length;if(r===0)return 0;var i=false;for(;;){switch(t){case"ascii":case"binary":case"raw":case"raws":return r;case"utf8":case"utf-8":case undefined:return W(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Z(e).length;default:if(i)return W(e).length;t=(""+t).toLowerCase();i=true}}}Buffer.byteLength=b;function m(e,t,r){var i=false;if(t===undefined||t<0){t=0}if(t>this.length){return""}if(r===undefined||r>this.length){r=this.length}if(r<=0){return""}r>>>=0;t>>>=0;if(r<=t){return""}if(!e)e="utf8";while(true){switch(e){case"hex":return U(this,t,r);case"utf8":case"utf-8":return A(this,t,r);case"ascii":return D(this,t,r);case"binary":return L(this,t,r);case"base64":return x(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,r);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase();i=true}}}Buffer.prototype._isBuffer=true;function _(e,t,r){var i=e[t];e[t]=e[r];e[r]=i}Buffer.prototype.swap16=function ne(){var e=this.length;if(e%2!==0){throw new RangeError("Buffer size must be a multiple of 16-bits")}for(var t=0;t<e;t+=2){_(this,t,t+1)}return this};Buffer.prototype.swap32=function se(){var e=this.length;if(e%4!==0){throw new RangeError("Buffer size must be a multiple of 32-bits")}for(var t=0;t<e;t+=4){_(this,t,t+3);_(this,t+1,t+2)}return this};Buffer.prototype.toString=function fe(){var e=this.length|0;if(e===0)return"";if(arguments.length===0)return A(this,0,e);return m.apply(this,arguments)};Buffer.prototype.equals=function oe(e){if(!Buffer.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(this===e)return true;return Buffer.compare(this,e)===0};Buffer.prototype.inspect=function ae(){var e="";var t=r.INSPECT_MAX_BYTES;if(this.length>0){e=this.toString("hex",0,t).match(/.{2}/g).join(" ");if(this.length>t)e+=" ... "}return"<Buffer "+e+">"};Buffer.prototype.compare=function ue(e,t,r,i,n){if(!Buffer.isBuffer(e)){throw new TypeError("Argument must be a Buffer")}if(t===undefined){t=0}if(r===undefined){r=e?e.length:0}if(i===undefined){i=0}if(n===undefined){n=this.length}if(t<0||r>e.length||i<0||n>this.length){throw new RangeError("out of range index")}if(i>=n&&t>=r){return 0}if(i>=n){return-1}if(t>=r){return 1}t>>>=0;r>>>=0;i>>>=0;n>>>=0;if(this===e)return 0;var s=n-i;var f=r-t;var o=Math.min(s,f);var a=this.slice(i,n);var u=e.slice(t,r);for(var h=0;h<o;++h){if(a[h]!==u[h]){s=a[h];f=u[h];break}}if(s<f)return-1;if(f<s)return 1;return 0};function E(e,t,r,i){var n=1;var s=e.length;var f=t.length;if(i!==undefined){i=String(i).toLowerCase();if(i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le"){if(e.length<2||t.length<2){return-1}n=2;s/=2;f/=2;r/=2}}function o(e,t){if(n===1){return e[t]}else{return e.readUInt16BE(t*n)}}var a=-1;for(var u=0;r+u<s;u++){if(o(e,r+u)===o(t,a===-1?0:u-a)){if(a===-1)a=u;if(u-a+1===f)return(r+a)*n}else{if(a!==-1)u-=u-a;a=-1}}return-1}Buffer.prototype.indexOf=function he(e,t,r){if(typeof t==="string"){r=t;t=0}else if(t>2147483647){t=2147483647}else if(t<-2147483648){t=-2147483648}t>>=0;if(this.length===0)return-1;if(t>=this.length)return-1;if(t<0)t=Math.max(this.length+t,0);if(typeof e==="string"){e=Buffer.from(e,r)}if(Buffer.isBuffer(e)){if(e.length===0){return-1}return E(this,e,t,r)}if(typeof e==="number"){if(Buffer.TYPED_ARRAY_SUPPORT&&Uint8Array.prototype.indexOf==="function"){return Uint8Array.prototype.indexOf.call(this,e,t)}return E(this,[e],t,r)}throw new TypeError("val must be string, number or Buffer")};Buffer.prototype.includes=function ce(e,t,r){return this.indexOf(e,t,r)!==-1};function S(e,t,r,i){r=Number(r)||0;var n=e.length-r;if(!i){i=n}else{i=Number(i);if(i>n){i=n}}var s=t.length;if(s%2!==0)throw new Error("Invalid hex string");if(i>s/2){i=s/2}for(var f=0;f<i;f++){var o=parseInt(t.substr(f*2,2),16);if(isNaN(o))return f;e[r+f]=o}return f}function T(e,t,r,i){return X(W(t,e.length-r),e,r,i)}function O(e,t,r,i){return X(Q(t),e,r,i)}function B(e,t,r,i){return O(e,t,r,i)}function P(e,t,r,i){return X(Z(t),e,r,i)}function I(e,t,r,i){return X(J(t,e.length-r),e,r,i)}Buffer.prototype.write=function le(e,t,r,i){if(t===undefined){i="utf8";r=this.length;t=0}else if(r===undefined&&typeof t==="string"){i=t;r=this.length;t=0}else if(isFinite(t)){t=t|0;if(isFinite(r)){r=r|0;if(i===undefined)i="utf8"}else{i=r;r=undefined}}else{throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported")}var n=this.length-t;if(r===undefined||r>n)r=n;if(e.length>0&&(r<0||t<0)||t>this.length){throw new RangeError("Attempt to write outside buffer bounds")}if(!i)i="utf8";var s=false;for(;;){switch(i){case"hex":return S(this,e,t,r);case"utf8":case"utf-8":return T(this,e,t,r);case"ascii":return O(this,e,t,r);case"binary":return B(this,e,t,r);case"base64":return P(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,t,r);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase();s=true}}};Buffer.prototype.toJSON=function pe(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function x(e,t,r){if(t===0&&r===e.length){return i.fromByteArray(e)}else{return i.fromByteArray(e.slice(t,r))}}function A(e,t,r){r=Math.min(e.length,r);var i=[];var n=t;while(n<r){var s=e[n];var f=null;var o=s>239?4:s>223?3:s>191?2:1;if(n+o<=r){var a,u,h,c;switch(o){case 1:if(s<128){f=s}break;case 2:a=e[n+1];if((a&192)===128){c=(s&31)<<6|a&63;if(c>127){f=c}}break;case 3:a=e[n+1];u=e[n+2];if((a&192)===128&&(u&192)===128){c=(s&15)<<12|(a&63)<<6|u&63;if(c>2047&&(c<55296||c>57343)){f=c}}break;case 4:a=e[n+1];u=e[n+2];h=e[n+3];if((a&192)===128&&(u&192)===128&&(h&192)===128){c=(s&15)<<18|(a&63)<<12|(u&63)<<6|h&63;if(c>65535&&c<1114112){f=c}}}}if(f===null){f=65533;o=1}else if(f>65535){f-=65536;i.push(f>>>10&1023|55296);f=56320|f&1023}i.push(f);n+=o}return k(i)}var R=4096;function k(e){var t=e.length;if(t<=R){return String.fromCharCode.apply(String,e)}var r="";var i=0;while(i<t){r+=String.fromCharCode.apply(String,e.slice(i,i+=R))}return r}function D(e,t,r){var i="";r=Math.min(e.length,r);for(var n=t;n<r;n++){i+=String.fromCharCode(e[n]&127)}return i}function L(e,t,r){var i="";r=Math.min(e.length,r);for(var n=t;n<r;n++){i+=String.fromCharCode(e[n])}return i}function U(e,t,r){var i=e.length;if(!t||t<0)t=0;if(!r||r<0||r>i)r=i;var n="";for(var s=t;s<r;s++){n+=V(e[s])}return n}function M(e,t,r){var i=e.slice(t,r);var n="";for(var s=0;s<i.length;s+=2){n+=String.fromCharCode(i[s]+i[s+1]*256)}return n}Buffer.prototype.slice=function de(e,t){var r=this.length;e=~~e;t=t===undefined?r:~~t;if(e<0){e+=r;if(e<0)e=0}else if(e>r){e=r}if(t<0){t+=r;if(t<0)t=0}else if(t>r){t=r}if(t<e)t=e;var i;if(Buffer.TYPED_ARRAY_SUPPORT){i=this.subarray(e,t);i.__proto__=Buffer.prototype}else{var n=t-e;i=new Buffer(n,undefined);for(var s=0;s<n;s++){i[s]=this[s+e]}}return i};function j(e,t,r){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}Buffer.prototype.readUIntLE=function ve(e,t,r){e=e|0;t=t|0;if(!r)j(e,t,this.length);var i=this[e];var n=1;var s=0;while(++s<t&&(n*=256)){i+=this[e+s]*n}return i};Buffer.prototype.readUIntBE=function ge(e,t,r){e=e|0;t=t|0;if(!r){j(e,t,this.length)}var i=this[e+--t];var n=1;while(t>0&&(n*=256)){i+=this[e+--t]*n}return i};Buffer.prototype.readUInt8=function ye(e,t){if(!t)j(e,1,this.length);return this[e]};Buffer.prototype.readUInt16LE=function we(e,t){if(!t)j(e,2,this.length);return this[e]|this[e+1]<<8};Buffer.prototype.readUInt16BE=function be(e,t){if(!t)j(e,2,this.length);return this[e]<<8|this[e+1]};Buffer.prototype.readUInt32LE=function me(e,t){if(!t)j(e,4,this.length);return(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};Buffer.prototype.readUInt32BE=function _e(e,t){if(!t)j(e,4,this.length);return this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};Buffer.prototype.readIntLE=function Ee(e,t,r){e=e|0;t=t|0;if(!r)j(e,t,this.length);var i=this[e];var n=1;var s=0;while(++s<t&&(n*=256)){i+=this[e+s]*n}n*=128;if(i>=n)i-=Math.pow(2,8*t);return i};Buffer.prototype.readIntBE=function Se(e,t,r){e=e|0;t=t|0;if(!r)j(e,t,this.length);var i=t;var n=1;var s=this[e+--i];while(i>0&&(n*=256)){s+=this[e+--i]*n}n*=128;if(s>=n)s-=Math.pow(2,8*t);return s};Buffer.prototype.readInt8=function Te(e,t){if(!t)j(e,1,this.length);if(!(this[e]&128))return this[e];return(255-this[e]+1)*-1};Buffer.prototype.readInt16LE=function Oe(e,t){if(!t)j(e,2,this.length);var r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};Buffer.prototype.readInt16BE=function Be(e,t){if(!t)j(e,2,this.length);var r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};Buffer.prototype.readInt32LE=function Pe(e,t){if(!t)j(e,4,this.length);return this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};Buffer.prototype.readInt32BE=function Ie(e,t){if(!t)j(e,4,this.length);return this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};Buffer.prototype.readFloatLE=function xe(e,t){if(!t)j(e,4,this.length);return n.read(this,e,true,23,4)};Buffer.prototype.readFloatBE=function Ae(e,t){if(!t)j(e,4,this.length);return n.read(this,e,false,23,4)};Buffer.prototype.readDoubleLE=function Re(e,t){if(!t)j(e,8,this.length);return n.read(this,e,true,52,8)};Buffer.prototype.readDoubleBE=function ke(e,t){if(!t)j(e,8,this.length);return n.read(this,e,false,52,8)};function N(e,t,r,i,n,s){if(!Buffer.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<s)throw new RangeError('"value" argument is out of bounds');if(r+i>e.length)throw new RangeError("Index out of range")}Buffer.prototype.writeUIntLE=function De(e,t,r,i){e=+e;t=t|0;r=r|0;if(!i){var n=Math.pow(2,8*r)-1;N(this,e,t,r,n,0)}var s=1;var f=0;this[t]=e&255;while(++f<r&&(s*=256)){this[t+f]=e/s&255}return t+r};Buffer.prototype.writeUIntBE=function Le(e,t,r,i){e=+e;t=t|0;r=r|0;if(!i){var n=Math.pow(2,8*r)-1;N(this,e,t,r,n,0)}var s=r-1;var f=1;this[t+s]=e&255;while(--s>=0&&(f*=256)){this[t+s]=e/f&255}return t+r};Buffer.prototype.writeUInt8=function Ue(e,t,r){e=+e;t=t|0;if(!r)N(this,e,t,1,255,0);if(!Buffer.TYPED_ARRAY_SUPPORT)e=Math.floor(e);this[t]=e&255;return t+1};function C(e,t,r,i){if(t<0)t=65535+t+1;for(var n=0,s=Math.min(e.length-r,2);n<s;n++){e[r+n]=(t&255<<8*(i?n:1-n))>>>(i?n:1-n)*8}}Buffer.prototype.writeUInt16LE=function Me(e,t,r){e=+e;t=t|0;if(!r)N(this,e,t,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[t]=e&255;this[t+1]=e>>>8}else{C(this,e,t,true)}return t+2};Buffer.prototype.writeUInt16BE=function je(e,t,r){e=+e;t=t|0;if(!r)N(this,e,t,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[t]=e>>>8;this[t+1]=e&255}else{C(this,e,t,false)}return t+2};function H(e,t,r,i){if(t<0)t=4294967295+t+1;for(var n=0,s=Math.min(e.length-r,4);n<s;n++){e[r+n]=t>>>(i?n:3-n)*8&255}}Buffer.prototype.writeUInt32LE=function Ne(e,t,r){e=+e;t=t|0;if(!r)N(this,e,t,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[t+3]=e>>>24;this[t+2]=e>>>16;this[t+1]=e>>>8;this[t]=e&255}else{H(this,e,t,true)}return t+4};Buffer.prototype.writeUInt32BE=function Ce(e,t,r){e=+e;t=t|0;if(!r)N(this,e,t,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[t]=e>>>24;this[t+1]=e>>>16;this[t+2]=e>>>8;this[t+3]=e&255}else{H(this,e,t,false)}return t+4};Buffer.prototype.writeIntLE=function He(e,t,r,i){e=+e;t=t|0;if(!i){var n=Math.pow(2,8*r-1);N(this,e,t,r,n-1,-n)}var s=0;var f=1;var o=0;this[t]=e&255;while(++s<r&&(f*=256)){if(e<0&&o===0&&this[t+s-1]!==0){o=1}this[t+s]=(e/f>>0)-o&255}return t+r};Buffer.prototype.writeIntBE=function qe(e,t,r,i){e=+e;t=t|0;if(!i){var n=Math.pow(2,8*r-1);N(this,e,t,r,n-1,-n)}var s=r-1;var f=1;var o=0;this[t+s]=e&255;while(--s>=0&&(f*=256)){if(e<0&&o===0&&this[t+s+1]!==0){o=1}this[t+s]=(e/f>>0)-o&255}return t+r};Buffer.prototype.writeInt8=function ze(e,t,r){e=+e;t=t|0;if(!r)N(this,e,t,1,127,-128);if(!Buffer.TYPED_ARRAY_SUPPORT)e=Math.floor(e);if(e<0)e=255+e+1;this[t]=e&255;return t+1};Buffer.prototype.writeInt16LE=function Fe(e,t,r){e=+e;t=t|0;if(!r)N(this,e,t,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[t]=e&255;this[t+1]=e>>>8}else{C(this,e,t,true)}return t+2};Buffer.prototype.writeInt16BE=function Ke(e,t,r){e=+e;t=t|0;if(!r)N(this,e,t,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[t]=e>>>8;this[t+1]=e&255}else{C(this,e,t,false)}return t+2};Buffer.prototype.writeInt32LE=function Ye(e,t,r){e=+e;t=t|0;if(!r)N(this,e,t,4,2147483647,-2147483648);if(Buffer.TYPED_ARRAY_SUPPORT){this[t]=e&255;this[t+1]=e>>>8;this[t+2]=e>>>16;this[t+3]=e>>>24}else{H(this,e,t,true)}return t+4};Buffer.prototype.writeInt32BE=function Ge(e,t,r){e=+e;t=t|0;if(!r)N(this,e,t,4,2147483647,-2147483648);if(e<0)e=4294967295+e+1;if(Buffer.TYPED_ARRAY_SUPPORT){this[t]=e>>>24;this[t+1]=e>>>16;this[t+2]=e>>>8;this[t+3]=e&255}else{H(this,e,t,false)}return t+4};function q(e,t,r,i,n,s){if(r+i>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function z(e,t,r,i,s){if(!s){q(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38)}n.write(e,t,r,i,23,4);return r+4}Buffer.prototype.writeFloatLE=function Ve(e,t,r){return z(this,e,t,true,r)};Buffer.prototype.writeFloatBE=function We(e,t,r){return z(this,e,t,false,r)};function F(e,t,r,i,s){if(!s){q(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308)}n.write(e,t,r,i,52,8);return r+8}Buffer.prototype.writeDoubleLE=function Qe(e,t,r){return F(this,e,t,true,r)};Buffer.prototype.writeDoubleBE=function Je(e,t,r){return F(this,e,t,false,r)};Buffer.prototype.copy=function Ze(e,t,r,i){if(!r)r=0;if(!i&&i!==0)i=this.length;if(t>=e.length)t=e.length;if(!t)t=0;if(i>0&&i<r)i=r;if(i===r)return 0;if(e.length===0||this.length===0)return 0;if(t<0){throw new RangeError("targetStart out of bounds")}if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");if(i>this.length)i=this.length;if(e.length-t<i-r){i=e.length-t+r}var n=i-r;var s;if(this===e&&r<t&&t<i){for(s=n-1;s>=0;s--){e[s+t]=this[s+r]}}else if(n<1e3||!Buffer.TYPED_ARRAY_SUPPORT){for(s=0;s<n;s++){e[s+t]=this[s+r]}}else{Uint8Array.prototype.set.call(e,this.subarray(r,r+n),t)}return n};Buffer.prototype.fill=function Xe(e,t,r,i){if(typeof e==="string"){if(typeof t==="string"){i=t;t=0;r=this.length}else if(typeof r==="string"){i=r;r=this.length}if(e.length===1){var n=e.charCodeAt(0);if(n<256){e=n}}if(i!==undefined&&typeof i!=="string"){throw new TypeError("encoding must be a string")}if(typeof i==="string"&&!Buffer.isEncoding(i)){throw new TypeError("Unknown encoding: "+i)}}else if(typeof e==="number"){e=e&255}if(t<0||this.length<t||this.length<r){throw new RangeError("Out of range index")}if(r<=t){return this}t=t>>>0;

r=r===undefined?this.length:r>>>0;if(!e)e=0;var s;if(typeof e==="number"){for(s=t;s<r;s++){this[s]=e}}else{var f=Buffer.isBuffer(e)?e:W(new Buffer(e,i).toString());var o=f.length;for(s=0;s<r-t;s++){this[s+t]=f[s%o]}}return this};var K=/[^+\/0-9A-Za-z-_]/g;function Y(e){e=G(e).replace(K,"");if(e.length<2)return"";while(e.length%4!==0){e=e+"="}return e}function G(e){if(e.trim)return e.trim();return e.replace(/^\s+|\s+$/g,"")}function V(e){if(e<16)return"0"+e.toString(16);return e.toString(16)}function W(e,t){t=t||Infinity;var r;var i=e.length;var n=null;var s=[];for(var f=0;f<i;f++){r=e.charCodeAt(f);if(r>55295&&r<57344){if(!n){if(r>56319){if((t-=3)>-1)s.push(239,191,189);continue}else if(f+1===i){if((t-=3)>-1)s.push(239,191,189);continue}n=r;continue}if(r<56320){if((t-=3)>-1)s.push(239,191,189);n=r;continue}r=(n-55296<<10|r-56320)+65536}else if(n){if((t-=3)>-1)s.push(239,191,189)}n=null;if(r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else{throw new Error("Invalid code point")}}return s}function Q(e){var t=[];for(var r=0;r<e.length;r++){t.push(e.charCodeAt(r)&255)}return t}function J(e,t){var r,i,n;var s=[];for(var f=0;f<e.length;f++){if((t-=2)<0)break;r=e.charCodeAt(f);i=r>>8;n=r%256;s.push(n);s.push(i)}return s}function Z(e){return i.toByteArray(Y(e))}function X(e,t,r,i){for(var n=0;n<i;n++){if(n+r>=t.length||n>=e.length)break;t[n+r]=e[n]}return n}function $(e){return e!==e}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"base64-js":55,ieee754:61,isarray:64}],59:[function(e,t,r){(function(Buffer){function e(e){if(Array.isArray){return Array.isArray(e)}return v(e)==="[object Array]"}r.isArray=e;function t(e){return typeof e==="boolean"}r.isBoolean=t;function i(e){return e===null}r.isNull=i;function n(e){return e==null}r.isNullOrUndefined=n;function s(e){return typeof e==="number"}r.isNumber=s;function f(e){return typeof e==="string"}r.isString=f;function o(e){return typeof e==="symbol"}r.isSymbol=o;function a(e){return e===void 0}r.isUndefined=a;function u(e){return v(e)==="[object RegExp]"}r.isRegExp=u;function h(e){return typeof e==="object"&&e!==null}r.isObject=h;function c(e){return v(e)==="[object Date]"}r.isDate=c;function l(e){return v(e)==="[object Error]"||e instanceof Error}r.isError=l;function p(e){return typeof e==="function"}r.isFunction=p;function d(e){return e===null||typeof e==="boolean"||typeof e==="number"||typeof e==="string"||typeof e==="symbol"||typeof e==="undefined"}r.isPrimitive=d;r.isBuffer=Buffer.isBuffer;function v(e){return Object.prototype.toString.call(e)}}).call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":63}],60:[function(e,t,r){function i(){this._events=this._events||{};this._maxListeners=this._maxListeners||undefined}t.exports=i;i.EventEmitter=i;i.prototype._events=undefined;i.prototype._maxListeners=undefined;i.defaultMaxListeners=10;i.prototype.setMaxListeners=function(e){if(!s(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");this._maxListeners=e;return this};i.prototype.emit=function(e){var t,r,i,s,a,u;if(!this._events)this._events={};if(e==="error"){if(!this._events.error||f(this._events.error)&&!this._events.error.length){t=arguments[1];if(t instanceof Error){throw t}throw TypeError('Uncaught, unspecified "error" event.')}}r=this._events[e];if(o(r))return false;if(n(r)){switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1);r.apply(this,s)}}else if(f(r)){s=Array.prototype.slice.call(arguments,1);u=r.slice();i=u.length;for(a=0;a<i;a++)u[a].apply(this,s)}return true};i.prototype.addListener=function(e,t){var r;if(!n(t))throw TypeError("listener must be a function");if(!this._events)this._events={};if(this._events.newListener)this.emit("newListener",e,n(t.listener)?t.listener:t);if(!this._events[e])this._events[e]=t;else if(f(this._events[e]))this._events[e].push(t);else this._events[e]=[this._events[e],t];if(f(this._events[e])&&!this._events[e].warned){if(!o(this._maxListeners)){r=this._maxListeners}else{r=i.defaultMaxListeners}if(r&&r>0&&this._events[e].length>r){this._events[e].warned=true;console.error("(node) warning: possible EventEmitter memory "+"leak detected. %d listeners added. "+"Use emitter.setMaxListeners() to increase limit.",this._events[e].length);if(typeof console.trace==="function"){console.trace()}}}return this};i.prototype.on=i.prototype.addListener;i.prototype.once=function(e,t){if(!n(t))throw TypeError("listener must be a function");var r=false;function i(){this.removeListener(e,i);if(!r){r=true;t.apply(this,arguments)}}i.listener=t;this.on(e,i);return this};i.prototype.removeListener=function(e,t){var r,i,s,o;if(!n(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;r=this._events[e];s=r.length;i=-1;if(r===t||n(r.listener)&&r.listener===t){delete this._events[e];if(this._events.removeListener)this.emit("removeListener",e,t)}else if(f(r)){for(o=s;o-->0;){if(r[o]===t||r[o].listener&&r[o].listener===t){i=o;break}}if(i<0)return this;if(r.length===1){r.length=0;delete this._events[e]}else{r.splice(i,1)}if(this._events.removeListener)this.emit("removeListener",e,t)}return this};i.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener){if(arguments.length===0)this._events={};else if(this._events[e])delete this._events[e];return this}if(arguments.length===0){for(t in this._events){if(t==="removeListener")continue;this.removeAllListeners(t)}this.removeAllListeners("removeListener");this._events={};return this}r=this._events[e];if(n(r)){this.removeListener(e,r)}else if(r){while(r.length)this.removeListener(e,r[r.length-1])}delete this._events[e];return this};i.prototype.listeners=function(e){var t;if(!this._events||!this._events[e])t=[];else if(n(this._events[e]))t=[this._events[e]];else t=this._events[e].slice();return t};i.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(n(t))return 1;else if(t)return t.length}return 0};i.listenerCount=function(e,t){return e.listenerCount(t)};function n(e){return typeof e==="function"}function s(e){return typeof e==="number"}function f(e){return typeof e==="object"&&e!==null}function o(e){return e===void 0}},{}],61:[function(e,t,r){r.read=function(e,t,r,i,n){var s,f;var o=n*8-i-1;var a=(1<<o)-1;var u=a>>1;var h=-7;var c=r?n-1:0;var l=r?-1:1;var p=e[t+c];c+=l;s=p&(1<<-h)-1;p>>=-h;h+=o;for(;h>0;s=s*256+e[t+c],c+=l,h-=8){}f=s&(1<<-h)-1;s>>=-h;h+=i;for(;h>0;f=f*256+e[t+c],c+=l,h-=8){}if(s===0){s=1-u}else if(s===a){return f?NaN:(p?-1:1)*Infinity}else{f=f+Math.pow(2,i);s=s-u}return(p?-1:1)*f*Math.pow(2,s-i)};r.write=function(e,t,r,i,n,s){var f,o,a;var u=s*8-n-1;var h=(1<<u)-1;var c=h>>1;var l=n===23?Math.pow(2,-24)-Math.pow(2,-77):0;var p=i?0:s-1;var d=i?1:-1;var v=t<0||t===0&&1/t<0?1:0;t=Math.abs(t);if(isNaN(t)||t===Infinity){o=isNaN(t)?1:0;f=h}else{f=Math.floor(Math.log(t)/Math.LN2);if(t*(a=Math.pow(2,-f))<1){f--;a*=2}if(f+c>=1){t+=l/a}else{t+=l*Math.pow(2,1-c)}if(t*a>=2){f++;a/=2}if(f+c>=h){o=0;f=h}else if(f+c>=1){o=(t*a-1)*Math.pow(2,n);f=f+c}else{o=t*Math.pow(2,c-1)*Math.pow(2,n);f=0}}for(;n>=8;e[r+p]=o&255,p+=d,o/=256,n-=8){}f=f<<n|o;u+=n;for(;u>0;e[r+p]=f&255,p+=d,f/=256,u-=8){}e[r+p-d]|=v*128}},{}],62:[function(e,t,r){arguments[4][41][0].apply(r,arguments)},{dup:41}],63:[function(e,t,r){t.exports=function(e){return!!(e!=null&&(e._isBuffer||e.constructor&&typeof e.constructor.isBuffer==="function"&&e.constructor.isBuffer(e)))}},{}],64:[function(e,t,r){var i={}.toString;t.exports=Array.isArray||function(e){return i.call(e)=="[object Array]"}},{}],65:[function(e,t,r){(function(e){"use strict";if(!e.version||e.version.indexOf("v0.")===0||e.version.indexOf("v1.")===0&&e.version.indexOf("v1.8.")!==0){t.exports=r}else{t.exports=e.nextTick}function r(t,r,i,n){if(typeof t!=="function"){throw new TypeError('"callback" argument must be a function')}var s=arguments.length;var f,o;switch(s){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function a(){t.call(null,r)});case 3:return e.nextTick(function u(){t.call(null,r,i)});case 4:return e.nextTick(function h(){t.call(null,r,i,n)});default:f=new Array(s-1);o=0;while(o<f.length){f[o++]=arguments[o]}return e.nextTick(function c(){t.apply(null,f)})}}}).call(this,e("_process"))},{_process:66}],66:[function(e,t,r){var i=t.exports={};var n=[];var s=false;var f;var o=-1;function a(){if(!s||!f){return}s=false;if(f.length){n=f.concat(n)}else{o=-1}if(n.length){u()}}function u(){if(s){return}var e=setTimeout(a);s=true;var t=n.length;while(t){f=n;n=[];while(++o<t){if(f){f[o].run()}}o=-1;t=n.length}f=null;s=false;clearTimeout(e)}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1){for(var r=1;r<arguments.length;r++){t[r-1]=arguments[r]}}n.push(new h(e,t));if(n.length===1&&!s){setTimeout(u,0)}};function h(e,t){this.fun=e;this.array=t}h.prototype.run=function(){this.fun.apply(null,this.array)};i.title="browser";i.browser=true;i.env={};i.argv=[];i.version="";i.versions={};function c(){}i.on=c;i.addListener=c;i.once=c;i.off=c;i.removeListener=c;i.removeAllListeners=c;i.emit=c;i.binding=function(e){throw new Error("process.binding is not supported")};i.cwd=function(){return"/"};i.chdir=function(e){throw new Error("process.chdir is not supported")};i.umask=function(){return 0}},{}],67:[function(e,t,r){t.exports=e("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":68}],68:[function(e,t,r){"use strict";var i=Object.keys||function(e){var t=[];for(var r in e){t.push(r)}return t};t.exports=c;var n=e("process-nextick-args");var s=e("core-util-is");s.inherits=e("inherits");var f=e("./_stream_readable");var o=e("./_stream_writable");s.inherits(c,f);var a=i(o.prototype);for(var u=0;u<a.length;u++){var h=a[u];if(!c.prototype[h])c.prototype[h]=o.prototype[h]}function c(e){if(!(this instanceof c))return new c(e);f.call(this,e);o.call(this,e);if(e&&e.readable===false)this.readable=false;if(e&&e.writable===false)this.writable=false;this.allowHalfOpen=true;if(e&&e.allowHalfOpen===false)this.allowHalfOpen=false;this.once("end",l)}function l(){if(this.allowHalfOpen||this._writableState.ended)return;n(p,this)}function p(e){e.end()}function d(e,t){for(var r=0,i=e.length;r<i;r++){t(e[r],r)}}},{"./_stream_readable":70,"./_stream_writable":72,"core-util-is":59,inherits:62,"process-nextick-args":65}],69:[function(e,t,r){"use strict";t.exports=s;var i=e("./_stream_transform");var n=e("core-util-is");n.inherits=e("inherits");n.inherits(s,i);function s(e){if(!(this instanceof s))return new s(e);i.call(this,e)}s.prototype._transform=function(e,t,r){r(null,e)}},{"./_stream_transform":71,"core-util-is":59,inherits:62}],70:[function(e,t,r){(function(r){"use strict";t.exports=y;var i=e("process-nextick-args");var n=e("isarray");y.ReadableState=g;var s=e("events").EventEmitter;var f=function(e,t){return e.listeners(t).length};var o;(function(){try{o=e("st"+"ream")}catch(t){}finally{if(!o)o=e("events").EventEmitter}})();var Buffer=e("buffer").Buffer;var a=e("buffer-shims");var u=e("core-util-is");u.inherits=e("inherits");var h=e("util");var c=void 0;if(h&&h.debuglog){c=h.debuglog("stream")}else{c=function(){}}var l;u.inherits(y,o);var p=typeof s.prototype.prependListener==="function";function d(e,t,r){if(p)return e.prependListener(t,r);if(!e._events||!e._events[t])e.on(t,r);else if(n(e._events[t]))e._events[t].unshift(r);else e._events[t]=[r,e._events[t]]}var v;function g(t,r){v=v||e("./_stream_duplex");t=t||{};this.objectMode=!!t.objectMode;if(r instanceof v)this.objectMode=this.objectMode||!!t.readableObjectMode;var i=t.highWaterMark;var n=this.objectMode?16:16*1024;this.highWaterMark=i||i===0?i:n;this.highWaterMark=~~this.highWaterMark;this.buffer=[];this.length=0;this.pipes=null;this.pipesCount=0;this.flowing=null;this.ended=false;this.endEmitted=false;this.reading=false;this.sync=true;this.needReadable=false;this.emittedReadable=false;this.readableListening=false;this.resumeScheduled=false;this.defaultEncoding=t.defaultEncoding||"utf8";this.ranOut=false;this.awaitDrain=0;this.readingMore=false;this.decoder=null;this.encoding=null;if(t.encoding){if(!l)l=e("string_decoder/").StringDecoder;this.decoder=new l(t.encoding);this.encoding=t.encoding}}var v;function y(t){v=v||e("./_stream_duplex");if(!(this instanceof y))return new y(t);this._readableState=new g(t,this);this.readable=true;if(t&&typeof t.read==="function")this._read=t.read;o.call(this)}y.prototype.push=function(e,t){var r=this._readableState;if(!r.objectMode&&typeof e==="string"){t=t||r.defaultEncoding;if(t!==r.encoding){e=a.from(e,t);t=""}}return w(this,r,e,t,false)};y.prototype.unshift=function(e){var t=this._readableState;return w(this,t,e,"",true)};y.prototype.isPaused=function(){return this._readableState.flowing===false};function w(e,t,r,i,n){var s=S(t,r);if(s){e.emit("error",s)}else if(r===null){t.reading=false;T(e,t)}else if(t.objectMode||r&&r.length>0){if(t.ended&&!n){var f=new Error("stream.push() after EOF");e.emit("error",f)}else if(t.endEmitted&&n){var o=new Error("stream.unshift() after end event");e.emit("error",o)}else{var a;if(t.decoder&&!n&&!i){r=t.decoder.write(r);a=!t.objectMode&&r.length===0}if(!n)t.reading=false;if(!a){if(t.flowing&&t.length===0&&!t.sync){e.emit("data",r);e.read(0)}else{t.length+=t.objectMode?1:r.length;if(n)t.buffer.unshift(r);else t.buffer.push(r);if(t.needReadable)O(e)}}P(e,t)}}else if(!n){t.reading=false}return b(t)}function b(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}y.prototype.setEncoding=function(t){if(!l)l=e("string_decoder/").StringDecoder;this._readableState.decoder=new l(t);this._readableState.encoding=t;return this};var m=8388608;function _(e){if(e>=m){e=m}else{e--;e|=e>>>1;e|=e>>>2;e|=e>>>4;e|=e>>>8;e|=e>>>16;e++}return e}function E(e,t){if(t.length===0&&t.ended)return 0;if(t.objectMode)return e===0?0:1;if(e===null||isNaN(e)){if(t.flowing&&t.buffer.length)return t.buffer[0].length;else return t.length}if(e<=0)return 0;if(e>t.highWaterMark)t.highWaterMark=_(e);if(e>t.length){if(!t.ended){t.needReadable=true;return 0}else{return t.length}}return e}y.prototype.read=function(e){c("read",e);var t=this._readableState;var r=e;if(typeof e!=="number"||e>0)t.emittedReadable=false;if(e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended)){c("read: emitReadable",t.length,t.ended);if(t.length===0&&t.ended)U(this);else O(this);return null}e=E(e,t);if(e===0&&t.ended){if(t.length===0)U(this);return null}var i=t.needReadable;c("need readable",i);if(t.length===0||t.length-e<t.highWaterMark){i=true;c("length less than watermark",i)}if(t.ended||t.reading){i=false;c("reading or ended",i)}if(i){c("do read");t.reading=true;t.sync=true;if(t.length===0)t.needReadable=true;this._read(t.highWaterMark);t.sync=false}if(i&&!t.reading)e=E(r,t);var n;if(e>0)n=L(e,t);else n=null;if(n===null){t.needReadable=true;e=0}t.length-=e;if(t.length===0&&!t.ended)t.needReadable=true;if(r!==e&&t.ended&&t.length===0)U(this);if(n!==null)this.emit("data",n);return n};function S(e,t){var r=null;if(!Buffer.isBuffer(t)&&typeof t!=="string"&&t!==null&&t!==undefined&&!e.objectMode){r=new TypeError("Invalid non-string/buffer chunk")}return r}function T(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();if(r&&r.length){t.buffer.push(r);t.length+=t.objectMode?1:r.length}}t.ended=true;O(e)}function O(e){var t=e._readableState;t.needReadable=false;if(!t.emittedReadable){c("emitReadable",t.flowing);t.emittedReadable=true;if(t.sync)i(B,e);else B(e)}}function B(e){c("emit readable");e.emit("readable");D(e)}function P(e,t){if(!t.readingMore){t.readingMore=true;i(I,e,t)}}function I(e,t){var r=t.length;while(!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark){c("maybeReadMore read 0");e.read(0);if(r===t.length)break;else r=t.length}t.readingMore=false}y.prototype._read=function(e){this.emit("error",new Error("not implemented"))};y.prototype.pipe=function(e,t){var n=this;var s=this._readableState;switch(s.pipesCount){case 0:s.pipes=e;break;case 1:s.pipes=[s.pipes,e];break;default:s.pipes.push(e);break}s.pipesCount+=1;c("pipe count=%d opts=%j",s.pipesCount,t);var o=(!t||t.end!==false)&&e!==r.stdout&&e!==r.stderr;var a=o?h:v;if(s.endEmitted)i(a);else n.once("end",a);e.on("unpipe",u);function u(e){c("onunpipe");if(e===n){v()}}function h(){c("onend");e.end()}var l=x(n);e.on("drain",l);var p=false;function v(){c("cleanup");e.removeListener("close",w);e.removeListener("finish",b);e.removeListener("drain",l);e.removeListener("error",y);e.removeListener("unpipe",u);n.removeListener("end",h);n.removeListener("end",v);n.removeListener("data",g);p=true;if(s.awaitDrain&&(!e._writableState||e._writableState.needDrain))l()}n.on("data",g);function g(t){c("ondata");var r=e.write(t);if(false===r){if((s.pipesCount===1&&s.pipes===e||s.pipesCount>1&&N(s.pipes,e)!==-1)&&!p){c("false write response, pause",n._readableState.awaitDrain);n._readableState.awaitDrain++}n.pause()}}function y(t){c("onerror",t);m();e.removeListener("error",y);if(f(e,"error")===0)e.emit("error",t)}d(e,"error",y);function w(){e.removeListener("finish",b);m()}e.once("close",w);function b(){c("onfinish");e.removeListener("close",w);m()}e.once("finish",b);function m(){c("unpipe");n.unpipe(e)}e.emit("pipe",n);if(!s.flowing){c("pipe resume");n.resume()}return e};function x(e){return function(){var t=e._readableState;c("pipeOnDrain",t.awaitDrain);if(t.awaitDrain)t.awaitDrain--;if(t.awaitDrain===0&&f(e,"data")){t.flowing=true;D(e)}}}y.prototype.unpipe=function(e){var t=this._readableState;if(t.pipesCount===0)return this;if(t.pipesCount===1){if(e&&e!==t.pipes)return this;if(!e)e=t.pipes;t.pipes=null;t.pipesCount=0;t.flowing=false;if(e)e.emit("unpipe",this);return this}if(!e){var r=t.pipes;var i=t.pipesCount;t.pipes=null;t.pipesCount=0;t.flowing=false;for(var n=0;n<i;n++){r[n].emit("unpipe",this)}return this}var s=N(t.pipes,e);if(s===-1)return this;t.pipes.splice(s,1);t.pipesCount-=1;if(t.pipesCount===1)t.pipes=t.pipes[0];e.emit("unpipe",this);return this};y.prototype.on=function(e,t){var r=o.prototype.on.call(this,e,t);if(e==="data"&&false!==this._readableState.flowing){this.resume()}if(e==="readable"&&!this._readableState.endEmitted){var n=this._readableState;if(!n.readableListening){n.readableListening=true;n.emittedReadable=false;n.needReadable=true;if(!n.reading){i(A,this)}else if(n.length){O(this,n)}}}return r};y.prototype.addListener=y.prototype.on;function A(e){c("readable nexttick read 0");e.read(0)}y.prototype.resume=function(){var e=this._readableState;if(!e.flowing){c("resume");e.flowing=true;R(this,e)}return this};function R(e,t){if(!t.resumeScheduled){t.resumeScheduled=true;i(k,e,t)}}function k(e,t){if(!t.reading){c("resume read 0");e.read(0)}t.resumeScheduled=false;e.emit("resume");D(e);if(t.flowing&&!t.reading)e.read(0)}y.prototype.pause=function(){c("call pause flowing=%j",this._readableState.flowing);if(false!==this._readableState.flowing){c("pause");this._readableState.flowing=false;this.emit("pause")}return this};function D(e){var t=e._readableState;c("flow",t.flowing);if(t.flowing){do{var r=e.read()}while(null!==r&&t.flowing)}}y.prototype.wrap=function(e){var t=this._readableState;var r=false;var i=this;e.on("end",function(){c("wrapped end");if(t.decoder&&!t.ended){var e=t.decoder.end();if(e&&e.length)i.push(e)}i.push(null)});e.on("data",function(n){c("wrapped data");if(t.decoder)n=t.decoder.write(n);if(t.objectMode&&(n===null||n===undefined))return;else if(!t.objectMode&&(!n||!n.length))return;var s=i.push(n);if(!s){r=true;e.pause()}});for(var n in e){if(this[n]===undefined&&typeof e[n]==="function"){this[n]=function(t){return function(){return e[t].apply(e,arguments)}}(n)}}var s=["error","close","destroy","pause","resume"];j(s,function(t){e.on(t,i.emit.bind(i,t))});i._read=function(t){c("wrapped _read",t);if(r){r=false;e.resume()}};return i};y._fromList=L;function L(e,t){var r=t.buffer;var i=t.length;var n=!!t.decoder;var s=!!t.objectMode;var f;if(r.length===0)return null;if(i===0)f=null;else if(s)f=r.shift();else if(!e||e>=i){if(n)f=r.join("");else if(r.length===1)f=r[0];else f=Buffer.concat(r,i);r.length=0}else{if(e<r[0].length){var o=r[0];f=o.slice(0,e);r[0]=o.slice(e)}else if(e===r[0].length){f=r.shift()}else{if(n)f="";else f=a.allocUnsafe(e);var u=0;for(var h=0,c=r.length;h<c&&u<e;h++){var l=r[0];var p=Math.min(e-u,l.length);if(n)f+=l.slice(0,p);else l.copy(f,u,0,p);if(p<l.length)r[0]=l.slice(p);else r.shift();u+=p}}}return f}function U(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');if(!t.endEmitted){t.ended=true;i(M,t,e)}}function M(e,t){if(!e.endEmitted&&e.length===0){e.endEmitted=true;t.readable=false;t.emit("end")}}function j(e,t){for(var r=0,i=e.length;r<i;r++){t(e[r],r)}}function N(e,t){for(var r=0,i=e.length;r<i;r++){if(e[r]===t)return r}return-1}}).call(this,e("_process"))},{"./_stream_duplex":68,_process:66,buffer:58,"buffer-shims":57,"core-util-is":59,events:60,inherits:62,isarray:64,"process-nextick-args":65,"string_decoder/":78,util:56}],71:[function(e,t,r){"use strict";t.exports=o;var i=e("./_stream_duplex");var n=e("core-util-is");n.inherits=e("inherits");n.inherits(o,i);function s(e){this.afterTransform=function(t,r){return f(e,t,r)};this.needTransform=false;this.transforming=false;this.writecb=null;this.writechunk=null;this.writeencoding=null}function f(e,t,r){var i=e._transformState;i.transforming=false;var n=i.writecb;if(!n)return e.emit("error",new Error("no writecb in Transform class"));i.writechunk=null;i.writecb=null;if(r!==null&&r!==undefined)e.push(r);n(t);var s=e._readableState;s.reading=false;if(s.needReadable||s.length<s.highWaterMark){e._read(s.highWaterMark)}}function o(e){if(!(this instanceof o))return new o(e);i.call(this,e);this._transformState=new s(this);var t=this;this._readableState.needReadable=true;this._readableState.sync=false;if(e){if(typeof e.transform==="function")this._transform=e.transform;if(typeof e.flush==="function")this._flush=e.flush}this.once("prefinish",function(){if(typeof this._flush==="function")this._flush(function(e){a(t,e)});else a(t)})}o.prototype.push=function(e,t){this._transformState.needTransform=false;return i.prototype.push.call(this,e,t)};o.prototype._transform=function(e,t,r){throw new Error("Not implemented")};o.prototype._write=function(e,t,r){var i=this._transformState;i.writecb=r;i.writechunk=e;i.writeencoding=t;if(!i.transforming){var n=this._readableState;if(i.needTransform||n.needReadable||n.length<n.highWaterMark)this._read(n.highWaterMark)}};o.prototype._read=function(e){var t=this._transformState;if(t.writechunk!==null&&t.writecb&&!t.transforming){t.transforming=true;this._transform(t.writechunk,t.writeencoding,t.afterTransform)}else{t.needTransform=true}};function a(e,t){if(t)return e.emit("error",t);var r=e._writableState;var i=e._transformState;if(r.length)throw new Error("Calling transform done when ws.length != 0");if(i.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}},{"./_stream_duplex":68,"core-util-is":59,inherits:62}],72:[function(e,t,r){(function(r){"use strict";t.exports=p;var i=e("process-nextick-args");var n=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?setImmediate:i;p.WritableState=l;var s=e("core-util-is");s.inherits=e("inherits");var f={deprecate:e("util-deprecate")};var o;(function(){try{o=e("st"+"ream")}catch(t){}finally{if(!o)o=e("events").EventEmitter}})();var Buffer=e("buffer").Buffer;var a=e("buffer-shims");s.inherits(p,o);function u(){}function h(e,t,r){this.chunk=e;this.encoding=t;this.callback=r;this.next=null}var c;function l(t,r){c=c||e("./_stream_duplex");t=t||{};this.objectMode=!!t.objectMode;if(r instanceof c)this.objectMode=this.objectMode||!!t.writableObjectMode;var i=t.highWaterMark;var n=this.objectMode?16:16*1024;this.highWaterMark=i||i===0?i:n;this.highWaterMark=~~this.highWaterMark;this.needDrain=false;this.ending=false;this.ended=false;this.finished=false;var s=t.decodeStrings===false;this.decodeStrings=!s;this.defaultEncoding=t.defaultEncoding||"utf8";this.length=0;this.writing=false;this.corked=0;this.sync=true;this.bufferProcessing=false;this.onwrite=function(e){_(r,e)};this.writecb=null;this.writelen=0;this.bufferedRequest=null;this.lastBufferedRequest=null;this.pendingcb=0;this.prefinished=false;this.errorEmitted=false;this.bufferedRequestCount=0;this.corkedRequestsFree=new x(this)}l.prototype.getBuffer=function A(){var e=this.bufferedRequest;var t=[];while(e){t.push(e);e=e.next}return t};(function(){try{Object.defineProperty(l.prototype,"buffer",{get:f.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.")})}catch(e){}})();var c;function p(t){c=c||e("./_stream_duplex");if(!(this instanceof p)&&!(this instanceof c))return new p(t);this._writableState=new l(t,this);this.writable=true;if(t){if(typeof t.write==="function")this._write=t.write;if(typeof t.writev==="function")this._writev=t.writev}o.call(this)}p.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function d(e,t){var r=new Error("write after end");e.emit("error",r);i(t,r)}function v(e,t,r,n){var s=true;var f=false;if(r===null){f=new TypeError("May not write null values to stream")}else if(!Buffer.isBuffer(r)&&typeof r!=="string"&&r!==undefined&&!t.objectMode){f=new TypeError("Invalid non-string/buffer chunk")}if(f){e.emit("error",f);i(n,f);s=false}return s}p.prototype.write=function(e,t,r){var i=this._writableState;var n=false;if(typeof t==="function"){r=t;t=null}if(Buffer.isBuffer(e))t="buffer";else if(!t)t=i.defaultEncoding;if(typeof r!=="function")r=u;if(i.ended)d(this,r);else if(v(this,i,e,r)){i.pendingcb++;n=y(this,i,e,t,r)}return n};p.prototype.cork=function(){var e=this._writableState;e.corked++};p.prototype.uncork=function(){var e=this._writableState;if(e.corked){e.corked--;if(!e.writing&&!e.corked&&!e.finished&&!e.bufferProcessing&&e.bufferedRequest)T(this,e)}};p.prototype.setDefaultEncoding=function R(e){if(typeof e==="string")e=e.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);this._writableState.defaultEncoding=e;return this};function g(e,t,r){if(!e.objectMode&&e.decodeStrings!==false&&typeof t==="string"){t=a.from(t,r)}return t}function y(e,t,r,i,n){r=g(t,r,i);if(Buffer.isBuffer(r))i="buffer";var s=t.objectMode?1:r.length;t.length+=s;var f=t.length<t.highWaterMark;if(!f)t.needDrain=true;if(t.writing||t.corked){var o=t.lastBufferedRequest;t.lastBufferedRequest=new h(r,i,n);if(o){o.next=t.lastBufferedRequest}else{t.bufferedRequest=t.lastBufferedRequest}t.bufferedRequestCount+=1}else{w(e,t,false,s,r,i,n)}return f}function w(e,t,r,i,n,s,f){t.writelen=i;t.writecb=f;t.writing=true;t.sync=true;if(r)e._writev(n,t.onwrite);else e._write(n,s,t.onwrite);t.sync=false}function b(e,t,r,n,s){--t.pendingcb;if(r)i(s,n);else s(n);e._writableState.errorEmitted=true;e.emit("error",n)}function m(e){e.writing=false;e.writecb=null;e.length-=e.writelen;e.writelen=0}function _(e,t){var r=e._writableState;var i=r.sync;var s=r.writecb;m(r);if(t)b(e,r,i,t,s);else{var f=O(r);if(!f&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest){T(e,r)}if(i){n(E,e,r,f,s)}else{E(e,r,f,s)}}}function E(e,t,r,i){if(!r)S(e,t);t.pendingcb--;i();P(e,t)}function S(e,t){if(t.length===0&&t.needDrain){t.needDrain=false;e.emit("drain")}}function T(e,t){t.bufferProcessing=true;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount;var n=new Array(i);var s=t.corkedRequestsFree;s.entry=r;var f=0;while(r){n[f]=r;r=r.next;f+=1}w(e,t,true,t.length,n,"",s.finish);t.pendingcb++;t.lastBufferedRequest=null;if(s.next){t.corkedRequestsFree=s.next;s.next=null}else{t.corkedRequestsFree=new x(t)}}else{while(r){var o=r.chunk;var a=r.encoding;var u=r.callback;var h=t.objectMode?1:o.length;w(e,t,false,h,o,a,u);r=r.next;if(t.writing){break}}if(r===null)t.lastBufferedRequest=null}t.bufferedRequestCount=0;t.bufferedRequest=r;t.bufferProcessing=false}p.prototype._write=function(e,t,r){r(new Error("not implemented"))};p.prototype._writev=null;p.prototype.end=function(e,t,r){var i=this._writableState;if(typeof e==="function"){r=e;e=null;t=null}else if(typeof t==="function"){r=t;t=null}if(e!==null&&e!==undefined)this.write(e,t);if(i.corked){i.corked=1;this.uncork()}if(!i.ending&&!i.finished)I(this,i,r)};function O(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function B(e,t){if(!t.prefinished){t.prefinished=true;e.emit("prefinish")}}function P(e,t){var r=O(t);if(r){if(t.pendingcb===0){B(e,t);t.finished=true;e.emit("finish")}else{B(e,t)}}return r}function I(e,t,r){t.ending=true;P(e,t);if(r){if(t.finished)i(r);else e.once("finish",r)}t.ended=true;e.writable=false}function x(e){var t=this;this.next=null;this.entry=null;this.finish=function(r){var i=t.entry;t.entry=null;while(i){var n=i.callback;e.pendingcb--;n(r);i=i.next}if(e.corkedRequestsFree){e.corkedRequestsFree.next=t}else{e.corkedRequestsFree=t}}}}).call(this,e("_process"))},{"./_stream_duplex":68,_process:66,buffer:58,"buffer-shims":57,"core-util-is":59,events:60,inherits:62,"process-nextick-args":65,"util-deprecate":79}],73:[function(e,t,r){t.exports=e("./lib/_stream_passthrough.js")},{"./lib/_stream_passthrough.js":69}],74:[function(e,t,r){(function(i){var n=function(){try{return e("st"+"ream")}catch(t){}}();r=t.exports=e("./lib/_stream_readable.js");r.Stream=n||r;r.Readable=r;r.Writable=e("./lib/_stream_writable.js");r.Duplex=e("./lib/_stream_duplex.js");r.Transform=e("./lib/_stream_transform.js");r.PassThrough=e("./lib/_stream_passthrough.js");if(!i.browser&&i.env.READABLE_STREAM==="disable"&&n){t.exports=n}}).call(this,e("_process"))},{"./lib/_stream_duplex.js":68,"./lib/_stream_passthrough.js":69,"./lib/_stream_readable.js":70,"./lib/_stream_transform.js":71,"./lib/_stream_writable.js":72,_process:66}],75:[function(e,t,r){t.exports=e("./lib/_stream_transform.js")},{"./lib/_stream_transform.js":71}],76:[function(e,t,r){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":72}],77:[function(e,t,r){t.exports=s;var i=e("events").EventEmitter;var n=e("inherits");n(s,i);s.Readable=e("readable-stream/readable.js");s.Writable=e("readable-stream/writable.js");s.Duplex=e("readable-stream/duplex.js");s.Transform=e("readable-stream/transform.js");s.PassThrough=e("readable-stream/passthrough.js");s.Stream=s;function s(){i.call(this)}s.prototype.pipe=function(e,t){var r=this;function n(t){if(e.writable){if(false===e.write(t)&&r.pause){r.pause()}}}r.on("data",n);function s(){if(r.readable&&r.resume){r.resume()}}e.on("drain",s);if(!e._isStdio&&(!t||t.end!==false)){r.on("end",o);r.on("close",a)}var f=false;function o(){if(f)return;f=true;e.end()}function a(){if(f)return;f=true;if(typeof e.destroy==="function")e.destroy()}function u(e){h();if(i.listenerCount(this,"error")===0){throw e}}r.on("error",u);e.on("error",u);function h(){r.removeListener("data",n);e.removeListener("drain",s);r.removeListener("end",o);r.removeListener("close",a);r.removeListener("error",u);e.removeListener("error",u);r.removeListener("end",h);r.removeListener("close",h);e.removeListener("close",h)}r.on("end",h);r.on("close",h);e.on("close",h);e.emit("pipe",r);return e}},{events:60,inherits:62,"readable-stream/duplex.js":67,"readable-stream/passthrough.js":73,"readable-stream/readable.js":74,"readable-stream/transform.js":75,"readable-stream/writable.js":76}],78:[function(e,t,r){var Buffer=e("buffer").Buffer;var i=Buffer.isEncoding||function(e){
switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return true;default:return false}};function n(e){if(e&&!i(e)){throw new Error("Unknown encoding: "+e)}}var s=r.StringDecoder=function(e){this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,"");n(e);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2;this.detectIncompleteChar=o;break;case"base64":this.surrogateSize=3;this.detectIncompleteChar=a;break;default:this.write=f;return}this.charBuffer=new Buffer(6);this.charReceived=0;this.charLength=0};s.prototype.write=function(e){var t="";while(this.charLength){var r=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;e.copy(this.charBuffer,this.charReceived,0,r);this.charReceived+=r;if(this.charReceived<this.charLength){return""}e=e.slice(r,e.length);t=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var i=t.charCodeAt(t.length-1);if(i>=55296&&i<=56319){this.charLength+=this.surrogateSize;t="";continue}this.charReceived=this.charLength=0;if(e.length===0){return t}break}this.detectIncompleteChar(e);var n=e.length;if(this.charLength){e.copy(this.charBuffer,0,e.length-this.charReceived,n);n-=this.charReceived}t+=e.toString(this.encoding,0,n);var n=t.length-1;var i=t.charCodeAt(n);if(i>=55296&&i<=56319){var s=this.surrogateSize;this.charLength+=s;this.charReceived+=s;this.charBuffer.copy(this.charBuffer,s,0,s);e.copy(this.charBuffer,0,0,s);return t.substring(0,n)}return t};s.prototype.detectIncompleteChar=function(e){var t=e.length>=3?3:e.length;for(;t>0;t--){var r=e[e.length-t];if(t==1&&r>>5==6){this.charLength=2;break}if(t<=2&&r>>4==14){this.charLength=3;break}if(t<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=t};s.prototype.end=function(e){var t="";if(e&&e.length)t=this.write(e);if(this.charReceived){var r=this.charReceived;var i=this.charBuffer;var n=this.encoding;t+=i.slice(0,r).toString(n)}return t};function f(e){return e.toString(this.encoding)}function o(e){this.charReceived=e.length%2;this.charLength=this.charReceived?2:0}function a(e){this.charReceived=e.length%3;this.charLength=this.charReceived?3:0}},{buffer:58}],79:[function(e,t,r){(function(e){t.exports=r;function r(e,t){if(i("noDeprecation")){return e}var r=false;function n(){if(!r){if(i("throwDeprecation")){throw new Error(t)}else if(i("traceDeprecation")){console.trace(t)}else{console.warn(t)}r=true}return e.apply(this,arguments)}return n}function i(t){try{if(!e.localStorage)return false}catch(r){return false}var i=e.localStorage[t];if(null==i)return false;return String(i).toLowerCase()==="true"}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],80:[function(e,t,r){t.exports=function i(e){return e&&typeof e==="object"&&typeof e.copy==="function"&&typeof e.fill==="function"&&typeof e.readUInt8==="function"}},{}],81:[function(e,t,r){(function(t,i){var n=/%[sdj%]/g;r.format=function(e){if(!E(e)){var t=[];for(var r=0;r<arguments.length;r++){t.push(o(arguments[r]))}return t.join(" ")}var r=1;var i=arguments;var s=i.length;var f=String(e).replace(n,function(e){if(e==="%%")return"%";if(r>=s)return e;switch(e){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":try{return JSON.stringify(i[r++])}catch(t){return"[Circular]"}default:return e}});for(var a=i[r];r<s;a=i[++r]){if(b(a)||!B(a)){f+=" "+a}else{f+=" "+o(a)}}return f};r.deprecate=function(e,n){if(T(i.process)){return function(){return r.deprecate(e,n).apply(this,arguments)}}if(t.noDeprecation===true){return e}var s=false;function f(){if(!s){if(t.throwDeprecation){throw new Error(n)}else if(t.traceDeprecation){console.trace(n)}else{console.error(n)}s=true}return e.apply(this,arguments)}return f};var s={};var f;r.debuglog=function(e){if(T(f))f=t.env.NODE_DEBUG||"";e=e.toUpperCase();if(!s[e]){if(new RegExp("\\b"+e+"\\b","i").test(f)){var i=t.pid;s[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,i,t)}}else{s[e]=function(){}}}return s[e]};function o(e,t){var i={seen:[],stylize:u};if(arguments.length>=3)i.depth=arguments[2];if(arguments.length>=4)i.colors=arguments[3];if(w(t)){i.showHidden=t}else if(t){r._extend(i,t)}if(T(i.showHidden))i.showHidden=false;if(T(i.depth))i.depth=2;if(T(i.colors))i.colors=false;if(T(i.customInspect))i.customInspect=true;if(i.colors)i.stylize=a;return c(i,e,i.depth)}r.inspect=o;o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};o.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"};function a(e,t){var r=o.styles[t];if(r){return"�["+o.colors[r][0]+"m"+e+"�["+o.colors[r][1]+"m"}else{return e}}function u(e,t){return e}function h(e){var t={};e.forEach(function(e,r){t[e]=true});return t}function c(e,t,i){if(e.customInspect&&t&&x(t.inspect)&&t.inspect!==r.inspect&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(i,e);if(!E(n)){n=c(e,n,i)}return n}var s=l(e,t);if(s){return s}var f=Object.keys(t);var o=h(f);if(e.showHidden){f=Object.getOwnPropertyNames(t)}if(I(t)&&(f.indexOf("message")>=0||f.indexOf("description")>=0)){return p(t)}if(f.length===0){if(x(t)){var a=t.name?": "+t.name:"";return e.stylize("[Function"+a+"]","special")}if(O(t)){return e.stylize(RegExp.prototype.toString.call(t),"regexp")}if(P(t)){return e.stylize(Date.prototype.toString.call(t),"date")}if(I(t)){return p(t)}}var u="",w=false,b=["{","}"];if(y(t)){w=true;b=["[","]"]}if(x(t)){var m=t.name?": "+t.name:"";u=" [Function"+m+"]"}if(O(t)){u=" "+RegExp.prototype.toString.call(t)}if(P(t)){u=" "+Date.prototype.toUTCString.call(t)}if(I(t)){u=" "+p(t)}if(f.length===0&&(!w||t.length==0)){return b[0]+u+b[1]}if(i<0){if(O(t)){return e.stylize(RegExp.prototype.toString.call(t),"regexp")}else{return e.stylize("[Object]","special")}}e.seen.push(t);var _;if(w){_=d(e,t,i,o,f)}else{_=f.map(function(r){return v(e,t,i,o,r,w)})}e.seen.pop();return g(_,u,b)}function l(e,t){if(T(t))return e.stylize("undefined","undefined");if(E(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(_(t))return e.stylize(""+t,"number");if(w(t))return e.stylize(""+t,"boolean");if(b(t))return e.stylize("null","null")}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,r,i,n){var s=[];for(var f=0,o=t.length;f<o;++f){if(U(t,String(f))){s.push(v(e,t,r,i,String(f),true))}else{s.push("")}}n.forEach(function(n){if(!n.match(/^\d+$/)){s.push(v(e,t,r,i,n,true))}});return s}function v(e,t,r,i,n,s){var f,o,a;a=Object.getOwnPropertyDescriptor(t,n)||{value:t[n]};if(a.get){if(a.set){o=e.stylize("[Getter/Setter]","special")}else{o=e.stylize("[Getter]","special")}}else{if(a.set){o=e.stylize("[Setter]","special")}}if(!U(i,n)){f="["+n+"]"}if(!o){if(e.seen.indexOf(a.value)<0){if(b(r)){o=c(e,a.value,null)}else{o=c(e,a.value,r-1)}if(o.indexOf("\n")>-1){if(s){o=o.split("\n").map(function(e){return"  "+e}).join("\n").substr(2)}else{o="\n"+o.split("\n").map(function(e){return"   "+e}).join("\n")}}}else{o=e.stylize("[Circular]","special")}}if(T(f)){if(s&&n.match(/^\d+$/)){return o}f=JSON.stringify(""+n);if(f.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)){f=f.substr(1,f.length-2);f=e.stylize(f,"name")}else{f=f.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'");f=e.stylize(f,"string")}}return f+": "+o}function g(e,t,r){var i=0;var n=e.reduce(function(e,t){i++;if(t.indexOf("\n")>=0)i++;return e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);if(n>60){return r[0]+(t===""?"":t+"\n ")+" "+e.join(",\n  ")+" "+r[1]}return r[0]+t+" "+e.join(", ")+" "+r[1]}function y(e){return Array.isArray(e)}r.isArray=y;function w(e){return typeof e==="boolean"}r.isBoolean=w;function b(e){return e===null}r.isNull=b;function m(e){return e==null}r.isNullOrUndefined=m;function _(e){return typeof e==="number"}r.isNumber=_;function E(e){return typeof e==="string"}r.isString=E;function S(e){return typeof e==="symbol"}r.isSymbol=S;function T(e){return e===void 0}r.isUndefined=T;function O(e){return B(e)&&R(e)==="[object RegExp]"}r.isRegExp=O;function B(e){return typeof e==="object"&&e!==null}r.isObject=B;function P(e){return B(e)&&R(e)==="[object Date]"}r.isDate=P;function I(e){return B(e)&&(R(e)==="[object Error]"||e instanceof Error)}r.isError=I;function x(e){return typeof e==="function"}r.isFunction=x;function A(e){return e===null||typeof e==="boolean"||typeof e==="number"||typeof e==="string"||typeof e==="symbol"||typeof e==="undefined"}r.isPrimitive=A;r.isBuffer=e("./support/isBuffer");function R(e){return Object.prototype.toString.call(e)}function k(e){return e<10?"0"+e.toString(10):e.toString(10)}var D=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function L(){var e=new Date;var t=[k(e.getHours()),k(e.getMinutes()),k(e.getSeconds())].join(":");return[e.getDate(),D[e.getMonth()],t].join(" ")}r.log=function(){console.log("%s - %s",L(),r.format.apply(r,arguments))};r.inherits=e("inherits");r._extend=function(e,t){if(!t||!B(t))return e;var r=Object.keys(t);var i=r.length;while(i--){e[r[i]]=t[r[i]]}return e};function U(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}).call(this,e("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./support/isBuffer":80,_process:66,inherits:62}]},{},[1])(1)});

//
finishLoading('elliptic');