!function(l){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=l();else if("function"==typeof define&&define.amd)define([],l);else{var n;n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,n.neo4j=l()}}(function(){var define,module,exports;return function(){function l(n,e,t){function u(i,o){if(!e[i]){if(!n[i]){var a="function"==typeof require&&require;if(!o&&a)return a(i,!0);if(r)return r(i,!0);var s=new Error("Cannot find module '"+i+"'");throw s.code="MODULE_NOT_FOUND",s}var c=e[i]={exports:{}};n[i][0].call(c.exports,function(l){var e=n[i][1][l];return u(e||l)},c,c.exports,l,n,e,t)}return e[i].exports}for(var r="function"==typeof require&&require,i=0;i>6],u=0===(32&e);if(31===(31&e)){var r=e;for(e=0;128===(128&r);){if(r=l.readUInt8(n),l.isError(r))return r;e<<=7,e|=127&r}}else e&=31;var i=f.tag[e];return{cls:t,primitive:u,tag:e,tagStr:i}}function i(l,n,e){var t=l.readUInt8(e);if(l.isError(t))return t;if(!n&&128===t)return null;if(0===(128&t))return t;var u=127&t;if(u>4)return l.error("length octect is too long");t=0;for(var r=0;r=31?t.error("Multi-octet tag encoding unsupported"):(n||(u|=32),u|=f.tagClassByName[e||"universal"]<<6)}var o=l("inherits"),a=l("buffer").Buffer,s=l("../../asn1"),c=s.base,f=s.constants.der;n.exports=t,t.prototype.encode=function(l,n){return this.tree._encode(l,n).join()},o(u,c.Node),u.prototype._encodeComposite=function(l,n,e,t){var u=i(l,n,e,this.reporter);if(t.length<128){var r=new a(2);return r[0]=u,r[1]=t.length,this._createEncoderBuffer([r,t])}for(var o=1,s=t.length;s>=256;s>>=8)o++;var r=new a(2+o);r[0]=u,r[1]=128|o;for(var s=1+o,c=t.length;c>0;s--,c>>=8)r[s]=255&c;return this._createEncoderBuffer([r,t])},u.prototype._encodeStr=function(l,n){if("bitstr"===n)return this._createEncoderBuffer([0|l.unused,l.data]);if("bmpstr"===n){for(var e=new a(2*l.length),t=0;t=40)return this.reporter.error("Second objid identifier OOB");l.splice(0,2,40*l[0]+l[1])}for(var u=0,t=0;t=128;r>>=7)u++}for(var i=new a(u),o=i.length-1,t=l.length-1;t>=0;t--){var r=l[t];for(i[o--]=127&r;(r>>=7)>0;)i[o--]=128|127&r}return this._createEncoderBuffer(i)},u.prototype._encodeTime=function(l,n){var e,t=new Date(l);return"gentime"===n?e=[r(t.getFullYear()),r(t.getUTCMonth()+1),r(t.getUTCDate()),r(t.getUTCHours()),r(t.getUTCMinutes()),r(t.getUTCSeconds()),"Z"].join(""):"utctime"===n?e=[r(t.getFullYear()%100),r(t.getUTCMonth()+1),r(t.getUTCDate()),r(t.getUTCHours()),r(t.getUTCMinutes()),r(t.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+n+" time is not supported yet"),this._encodeStr(e,"octstr")},u.prototype._encodeNull=function(){return this._createEncoderBuffer("")},u.prototype._encodeInt=function(l,n){if("string"==typeof l){if(!n)return this.reporter.error("String int or enum given, but no values map");if(!n.hasOwnProperty(l))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(l));l=n[l]}if("number"!=typeof l&&!a.isBuffer(l)){var e=l.toArray();!l.sign&&128&e[0]&&e.unshift(0),l=new a(e)}if(a.isBuffer(l)){var t=l.length;0===l.length&&t++;var u=new a(t);return l.copy(u),0===l.length&&(u[0]=0),this._createEncoderBuffer(u)}if(l<128)return this._createEncoderBuffer(l);if(l<256)return this._createEncoderBuffer([0,l]);for(var t=1,r=l;r>=256;r>>=8)t++;for(var u=new Array(t),r=u.length-1;r>=0;r--)u[r]=255&l,l>>=8;return 128&u[0]&&u.unshift(0),this._createEncoderBuffer(new a(u))},u.prototype._encodeBool=function(l){return this._createEncoderBuffer(l?255:0)},u.prototype._use=function(l,n){return"function"==typeof l&&(l=l(n)),l._getEncoder("der").tree},u.prototype._skipDefault=function(l,n,e){var t,u=this._baseState;if(null===u["default"])return!1;var r=l.join();if(void 0===u.defaultBuffer&&(u.defaultBuffer=this._encodeValue(u["default"],n,e).join()),r.length!==u.defaultBuffer.length)return!1;for(t=0;t0)throw new Error("Invalid string. Length must be a multiple of 4");var e=l.indexOf("=");e===-1&&(e=n);var t=e===n?0:4-e%4;return[e,t]}function u(l){var n=t(l),e=n[0],u=n[1];return 3*(e+u)/4-u}function r(l,n,e){return 3*(n+e)/4-e}function i(l){for(var n,e=t(l),u=e[0],i=e[1],o=new h(r(l,u,i)),a=0,s=i>0?u-4:u,c=0;c>16&255,o[a++]=n>>8&255,o[a++]=255&n;return 2===i&&(n=f[l.charCodeAt(c)]<<2|f[l.charCodeAt(c+1)]>>4,o[a++]=255&n),1===i&&(n=f[l.charCodeAt(c)]<<10|f[l.charCodeAt(c+1)]<<4|f[l.charCodeAt(c+2)]>>2,o[a++]=n>>8&255,o[a++]=255&n),o}function o(l){return c[l>>18&63]+c[l>>12&63]+c[l>>6&63]+c[63&l]}function a(l,n,e){for(var t,u=[],r=n;ro?o:i+r));return 1===t?(n=l[e-1],u.push(c[n>>2]+c[n<<4&63]+"==")):2===t&&(n=(l[e-2]<<8)+l[e-1],u.push(c[n>>10]+c[n>>4&63]+c[n<<2&63]+"=")),u.join("")}e.byteLength=u,e.toByteArray=i,e.fromByteArray=s;for(var c=[],f=[],h="undefined"!=typeof Uint8Array?Uint8Array:Array,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,b=d.length;p=49&&i<=54?i-49+10:i>=17&&i<=22?i-17+10:15&i}return t}function o(l,n,e,t){for(var u=0,r=Math.min(l.length,e),i=n;i=49?o-49+10:o>=17?o-17+10:o}return u}function a(l){for(var n=new Array(l.bitLength()),e=0;e>>u}return n}function s(l,n,e){e.negative=n.negative^l.negative;var t=l.length+n.length|0;e.length=t,t=t-1|0;var u=0|l.words[0],r=0|n.words[0],i=u*r,o=67108863&i,a=i/67108864|0;e.words[0]=o;for(var s=1;s>>26,f=67108863&a,h=Math.min(s,n.length-1),d=Math.max(0,s-l.length+1);d<=h;d++){var p=s-d|0;u=0|l.words[p],r=0|n.words[d],i=u*r+f,c+=i/67108864|0,f=67108863&i}e.words[s]=0|f,a=0|c}return 0!==a?e.words[s]=0|a:e.length--,e.strip()}function c(l,n,e){e.negative=n.negative^l.negative,e.length=l.length+n.length;for(var t=0,u=0,r=0;r>>26)|0,u+=i>>>26,i&=67108863}e.words[r]=o,t=i,i=u}return 0!==t?e.words[r]=t:e.length--,e.strip()}function f(l,n,e){var t=new h;return t.mulp(l,n,e)}function h(l,n){this.x=l,this.y=n}function d(l,n){this.name=l,this.p=new r(n,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function p(){d.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){d.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){d.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){d.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function m(l){if("string"==typeof l){var n=r._prime(l);this.m=n.p,this.prime=n}else t(l.gtn(1),"modulus must be greater than 1"),this.m=l,this.prime=null}function y(l){m.call(this,l),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}"object"==typeof n?n.exports=r:e.BN=r,r.BN=r,r.wordSize=26;var g;try{g=l("buffer").Buffer}catch(w){}r.isBN=function(l){return l instanceof r||null!==l&&"object"==typeof l&&l.constructor.wordSize===r.wordSize&&Array.isArray(l.words)},r.max=function(l,n){return l.cmp(n)>0?l:n},r.min=function(l,n){return l.cmp(n)<0?l:n},r.prototype._init=function(l,n,e){if("number"==typeof l)return this._initNumber(l,n,e);if("object"==typeof l)return this._initArray(l,n,e);"hex"===n&&(n=16),t(n===(0|n)&&n>=2&&n<=36),l=l.toString().replace(/\s+/g,"");var u=0;"-"===l[0]&&u++,16===n?this._parseHex(l,u):this._parseBase(l,n,u),"-"===l[0]&&(this.negative=1),this.strip(),"le"===e&&this._initArray(this.toArray(),n,e)},r.prototype._initNumber=function(l,n,e){l<0&&(this.negative=1,l=-l),l<67108864?(this.words=[67108863&l],this.length=1):l<4503599627370496?(this.words=[67108863&l,l/67108864&67108863],this.length=2):(t(l<9007199254740992),this.words=[67108863&l,l/67108864&67108863,1],this.length=3),"le"===e&&this._initArray(this.toArray(),n,e)},r.prototype._initArray=function(l,n,e){if(t("number"==typeof l.length),l.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(l.length/3),this.words=new Array(this.length);for(var u=0;u=0;u-=3)i=l[u]|l[u-1]<<8|l[u-2]<<16,this.words[r]|=i<>>26-o&67108863,o+=24,o>=26&&(o-=26,r++);else if("le"===e)for(u=0,r=0;u>>26-o&67108863,o+=24,o>=26&&(o-=26,r++);return this.strip()},r.prototype._parseHex=function(l,n){this.length=Math.ceil((l.length-n)/6),this.words=new Array(this.length);for(var e=0;e=n;e-=6)u=i(l,e,e+6),this.words[t]|=u<>>26-r&4194303,r+=24,r>=26&&(r-=26,t++);e+6!==n&&(u=i(l,n,e+6),this.words[t]|=u<>>26-r&4194303),this.strip()},r.prototype._parseBase=function(l,n,e){this.words=[0],this.length=1;for(var t=0,u=1;u<=67108863;u*=n)t++;t--,u=u/n|0;for(var r=l.length-e,i=r%t,a=Math.min(r,r-i)+e,s=0,c=e;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},r.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},r.prototype.inspect=function(){return(this.red?""};var k=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],S=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],E=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];r.prototype.toString=function(l,n){l=l||10,n=0|n||1;var e;if(16===l||"hex"===l){e="";for(var u=0,r=0,i=0;i>>24-u&16777215,e=0!==r||i!==this.length-1?k[6-a.length]+a+e:a+e,u+=2,u>=26&&(u-=26,i--)}for(0!==r&&(e=r.toString(16)+e);e.length%n!==0;)e="0"+e;return 0!==this.negative&&(e="-"+e),e}if(l===(0|l)&&l>=2&&l<=36){var s=S[l],c=E[l];e="";var f=this.clone();for(f.negative=0;!f.isZero();){var h=f.modn(c).toString(l);f=f.idivn(c),e=f.isZero()?h+e:k[s-h.length]+h+e}for(this.isZero()&&(e="0"+e);e.length%n!==0;)e="0"+e;return 0!==this.negative&&(e="-"+e),e}t(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var l=this.words[0];return 2===this.length?l+=67108864*this.words[1]:3===this.length&&1===this.words[2]?l+=4503599627370496+67108864*this.words[1]:this.length>2&&t(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-l:l},r.prototype.toJSON=function(){return this.toString(16)},r.prototype.toBuffer=function(l,n){return t("undefined"!=typeof g),this.toArrayLike(g,l,n)},r.prototype.toArray=function(l,n){return this.toArrayLike(Array,l,n)},r.prototype.toArrayLike=function(l,n,e){var u=this.byteLength(),r=e||Math.max(1,u);t(u<=r,"byte array longer than desired length"),t(r>0,"Requested array length <= 0"),this.strip();var i,o,a="le"===n,s=new l(r),c=this.clone();if(a){for(o=0;!c.isZero();o++)i=c.andln(255),c.iushrn(8),s[o]=i;for(;o=4096&&(e+=13,n>>>=13),n>=64&&(e+=7,n>>>=7),n>=8&&(e+=4,n>>>=4),n>=2&&(e+=2,n>>>=2),e+n},r.prototype._zeroBits=function(l){if(0===l)return 26;var n=l,e=0;return 0===(8191&n)&&(e+=13,n>>>=13),0===(127&n)&&(e+=7,n>>>=7),0===(15&n)&&(e+=4,n>>>=4),0===(3&n)&&(e+=2,n>>>=2),0===(1&n)&&e++,e},r.prototype.bitLength=function(){var l=this.words[this.length-1],n=this._countBits(l);return 26*(this.length-1)+n},r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var l=0,n=0;nl.length?this.clone().ior(l):l.clone().ior(this)},r.prototype.uor=function(l){return this.length>l.length?this.clone().iuor(l):l.clone().iuor(this)},r.prototype.iuand=function(l){var n;n=this.length>l.length?l:this;for(var e=0;el.length?this.clone().iand(l):l.clone().iand(this)},r.prototype.uand=function(l){return this.length>l.length?this.clone().iuand(l):l.clone().iuand(this)},r.prototype.iuxor=function(l){var n,e;this.length>l.length?(n=this,e=l):(n=l,e=this);for(var t=0;tl.length?this.clone().ixor(l):l.clone().ixor(this)},r.prototype.uxor=function(l){return this.length>l.length?this.clone().iuxor(l):l.clone().iuxor(this)},r.prototype.inotn=function(l){t("number"==typeof l&&l>=0);var n=0|Math.ceil(l/26),e=l%26;this._expand(n),e>0&&n--;for(var u=0;u0&&(this.words[u]=~this.words[u]&67108863>>26-e),this.strip()},r.prototype.notn=function(l){return this.clone().inotn(l)},r.prototype.setn=function(l,n){t("number"==typeof l&&l>=0);var e=l/26|0,u=l%26;return this._expand(e+1),n?this.words[e]=this.words[e]|1<l.length?(e=this,t=l):(e=l,t=this);for(var u=0,r=0;r>>26;for(;0!==u&&r>>26;if(this.length=e.length,0!==u)this.words[this.length]=u,this.length++;else if(e!==this)for(;rl.length?this.clone().iadd(l):l.clone().iadd(this)},r.prototype.isub=function(l){if(0!==l.negative){l.negative=0;var n=this.iadd(l);return l.negative=1,n._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(l),this.negative=1,this._normSign();var e=this.cmp(l);if(0===e)return this.negative=0,this.length=1,this.words[0]=0,this;var t,u;e>0?(t=this,u=l):(t=l,u=this);for(var r=0,i=0;i>26,this.words[i]=67108863&n;for(;0!==r&&i>26,this.words[i]=67108863&n;if(0===r&&i>>13,d=0|i[1],p=8191&d,b=d>>>13,v=0|i[2],_=8191&v,m=v>>>13,y=0|i[3],g=8191&y,w=y>>>13,k=0|i[4],S=8191&k,E=k>>>13,I=0|i[5],C=8191&I,j=I>>>13,M=0|i[6],A=8191&M,x=M>>>13,T=0|i[7],R=8191&T,O=T>>>13,P=0|i[8],N=8191&P,B=P>>>13,U=0|i[9],D=8191&U,L=U>>>13,F=0|o[0],q=8191&F,z=F>>>13,V=0|o[1],H=8191&V,K=V>>>13,W=0|o[2],Y=8191&W,G=W>>>13,Z=0|o[3],X=8191&Z,J=Z>>>13,$=0|o[4],Q=8191&$,ll=$>>>13,nl=0|o[5],el=8191&nl,tl=nl>>>13,ul=0|o[6],rl=8191&ul,il=ul>>>13,ol=0|o[7],al=8191&ol,sl=ol>>>13,cl=0|o[8],fl=8191&cl,hl=cl>>>13,dl=0|o[9],pl=8191&dl,bl=dl>>>13;e.negative=l.negative^n.negative,e.length=19,t=Math.imul(f,q),u=Math.imul(f,z),u=u+Math.imul(h,q)|0,r=Math.imul(h,z);var vl=(s+t|0)+((8191&u)<<13)|0;s=(r+(u>>>13)|0)+(vl>>>26)|0,vl&=67108863,t=Math.imul(p,q),u=Math.imul(p,z),u=u+Math.imul(b,q)|0,r=Math.imul(b,z),t=t+Math.imul(f,H)|0,u=u+Math.imul(f,K)|0,u=u+Math.imul(h,H)|0,r=r+Math.imul(h,K)|0;var _l=(s+t|0)+((8191&u)<<13)|0;s=(r+(u>>>13)|0)+(_l>>>26)|0,_l&=67108863,t=Math.imul(_,q),u=Math.imul(_,z),u=u+Math.imul(m,q)|0,r=Math.imul(m,z),t=t+Math.imul(p,H)|0,u=u+Math.imul(p,K)|0,u=u+Math.imul(b,H)|0,r=r+Math.imul(b,K)|0,t=t+Math.imul(f,Y)|0,u=u+Math.imul(f,G)|0,u=u+Math.imul(h,Y)|0,r=r+Math.imul(h,G)|0;var ml=(s+t|0)+((8191&u)<<13)|0;s=(r+(u>>>13)|0)+(ml>>>26)|0,ml&=67108863,t=Math.imul(g,q),u=Math.imul(g,z),u=u+Math.imul(w,q)|0,r=Math.imul(w,z),t=t+Math.imul(_,H)|0,u=u+Math.imul(_,K)|0,u=u+Math.imul(m,H)|0,r=r+Math.imul(m,K)|0,t=t+Math.imul(p,Y)|0,u=u+Math.imul(p,G)|0,u=u+Math.imul(b,Y)|0,r=r+Math.imul(b,G)|0,t=t+Math.imul(f,X)|0,u=u+Math.imul(f,J)|0,u=u+Math.imul(h,X)|0,r=r+Math.imul(h,J)|0;var yl=(s+t|0)+((8191&u)<<13)|0;s=(r+(u>>>13)|0)+(yl>>>26)|0,yl&=67108863,t=Math.imul(S,q),u=Math.imul(S,z),u=u+Math.imul(E,q)|0,r=Math.imul(E,z),t=t+Math.imul(g,H)|0,u=u+Math.imul(g,K)|0,u=u+Math.imul(w,H)|0,r=r+Math.imul(w,K)|0,t=t+Math.imul(_,Y)|0,u=u+Math.imul(_,G)|0,u=u+Math.imul(m,Y)|0,r=r+Math.imul(m,G)|0,t=t+Math.imul(p,X)|0,u=u+Math.imul(p,J)|0,u=u+Math.imul(b,X)|0,r=r+Math.imul(b,J)|0,t=t+Math.imul(f,Q)|0,u=u+Math.imul(f,ll)|0,u=u+Math.imul(h,Q)|0,r=r+Math.imul(h,ll)|0;var gl=(s+t|0)+((8191&u)<<13)|0;s=(r+(u>>>13)|0)+(gl>>>26)|0,gl&=67108863,t=Math.imul(C,q),u=Math.imul(C,z),u=u+Math.imul(j,q)|0,r=Math.imul(j,z),t=t+Math.imul(S,H)|0,u=u+Math.imul(S,K)|0,u=u+Math.imul(E,H)|0,r=r+Math.imul(E,K)|0,t=t+Math.imul(g,Y)|0,u=u+Math.imul(g,G)|0,u=u+Math.imul(w,Y)|0,r=r+Math.imul(w,G)|0,t=t+Math.imul(_,X)|0,u=u+Math.imul(_,J)|0,u=u+Math.imul(m,X)|0,r=r+Math.imul(m,J)|0,t=t+Math.imul(p,Q)|0,u=u+Math.imul(p,ll)|0,u=u+Math.imul(b,Q)|0,r=r+Math.imul(b,ll)|0,t=t+Math.imul(f,el)|0,u=u+Math.imul(f,tl)|0,u=u+Math.imul(h,el)|0,r=r+Math.imul(h,tl)|0;var wl=(s+t|0)+((8191&u)<<13)|0;s=(r+(u>>>13)|0)+(wl>>>26)|0,wl&=67108863,t=Math.imul(A,q),u=Math.imul(A,z),u=u+Math.imul(x,q)|0,r=Math.imul(x,z),t=t+Math.imul(C,H)|0,u=u+Math.imul(C,K)|0,u=u+Math.imul(j,H)|0,r=r+Math.imul(j,K)|0,t=t+Math.imul(S,Y)|0,u=u+Math.imul(S,G)|0,u=u+Math.imul(E,Y)|0,r=r+Math.imul(E,G)|0,t=t+Math.imul(g,X)|0,u=u+Math.imul(g,J)|0,u=u+Math.imul(w,X)|0,r=r+Math.imul(w,J)|0,t=t+Math.imul(_,Q)|0,u=u+Math.imul(_,ll)|0,u=u+Math.imul(m,Q)|0,r=r+Math.imul(m,ll)|0,t=t+Math.imul(p,el)|0,u=u+Math.imul(p,tl)|0,u=u+Math.imul(b,el)|0,r=r+Math.imul(b,tl)|0,t=t+Math.imul(f,rl)|0,u=u+Math.imul(f,il)|0,u=u+Math.imul(h,rl)|0,r=r+Math.imul(h,il)|0;var kl=(s+t|0)+((8191&u)<<13)|0;s=(r+(u>>>13)|0)+(kl>>>26)|0,kl&=67108863,t=Math.imul(R,q),u=Math.imul(R,z),u=u+Math.imul(O,q)|0,r=Math.imul(O,z),t=t+Math.imul(A,H)|0,u=u+Math.imul(A,K)|0,u=u+Math.imul(x,H)|0,r=r+Math.imul(x,K)|0,t=t+Math.imul(C,Y)|0,u=u+Math.imul(C,G)|0,u=u+Math.imul(j,Y)|0,r=r+Math.imul(j,G)|0,t=t+Math.imul(S,X)|0,u=u+Math.imul(S,J)|0,u=u+Math.imul(E,X)|0,r=r+Math.imul(E,J)|0,t=t+Math.imul(g,Q)|0,u=u+Math.imul(g,ll)|0,u=u+Math.imul(w,Q)|0,r=r+Math.imul(w,ll)|0,t=t+Math.imul(_,el)|0,u=u+Math.imul(_,tl)|0,u=u+Math.imul(m,el)|0,r=r+Math.imul(m,tl)|0,t=t+Math.imul(p,rl)|0,u=u+Math.imul(p,il)|0,u=u+Math.imul(b,rl)|0,r=r+Math.imul(b,il)|0,t=t+Math.imul(f,al)|0,u=u+Math.imul(f,sl)|0,u=u+Math.imul(h,al)|0,r=r+Math.imul(h,sl)|0;var Sl=(s+t|0)+((8191&u)<<13)|0;s=(r+(u>>>13)|0)+(Sl>>>26)|0,Sl&=67108863,t=Math.imul(N,q),u=Math.imul(N,z),u=u+Math.imul(B,q)|0,r=Math.imul(B,z),t=t+Math.imul(R,H)|0,u=u+Math.imul(R,K)|0,u=u+Math.imul(O,H)|0,r=r+Math.imul(O,K)|0,t=t+Math.imul(A,Y)|0,u=u+Math.imul(A,G)|0,u=u+Math.imul(x,Y)|0,r=r+Math.imul(x,G)|0,t=t+Math.imul(C,X)|0,u=u+Math.imul(C,J)|0,u=u+Math.imul(j,X)|0,r=r+Math.imul(j,J)|0,t=t+Math.imul(S,Q)|0,u=u+Math.imul(S,ll)|0,u=u+Math.imul(E,Q)|0,r=r+Math.imul(E,ll)|0,t=t+Math.imul(g,el)|0,u=u+Math.imul(g,tl)|0,u=u+Math.imul(w,el)|0,r=r+Math.imul(w,tl)|0,t=t+Math.imul(_,rl)|0,u=u+Math.imul(_,il)|0,u=u+Math.imul(m,rl)|0,r=r+Math.imul(m,il)|0,t=t+Math.imul(p,al)|0,u=u+Math.imul(p,sl)|0,u=u+Math.imul(b,al)|0,r=r+Math.imul(b,sl)|0,t=t+Math.imul(f,fl)|0,u=u+Math.imul(f,hl)|0,u=u+Math.imul(h,fl)|0,r=r+Math.imul(h,hl)|0;var El=(s+t|0)+((8191&u)<<13)|0;s=(r+(u>>>13)|0)+(El>>>26)|0,El&=67108863,t=Math.imul(D,q),u=Math.imul(D,z),u=u+Math.imul(L,q)|0,r=Math.imul(L,z),t=t+Math.imul(N,H)|0,u=u+Math.imul(N,K)|0,u=u+Math.imul(B,H)|0,r=r+Math.imul(B,K)|0,t=t+Math.imul(R,Y)|0,u=u+Math.imul(R,G)|0,u=u+Math.imul(O,Y)|0,r=r+Math.imul(O,G)|0,t=t+Math.imul(A,X)|0,u=u+Math.imul(A,J)|0,u=u+Math.imul(x,X)|0,r=r+Math.imul(x,J)|0,t=t+Math.imul(C,Q)|0,u=u+Math.imul(C,ll)|0,u=u+Math.imul(j,Q)|0,r=r+Math.imul(j,ll)|0,t=t+Math.imul(S,el)|0,u=u+Math.imul(S,tl)|0,u=u+Math.imul(E,el)|0,r=r+Math.imul(E,tl)|0,t=t+Math.imul(g,rl)|0,u=u+Math.imul(g,il)|0,u=u+Math.imul(w,rl)|0,r=r+Math.imul(w,il)|0,t=t+Math.imul(_,al)|0,u=u+Math.imul(_,sl)|0,u=u+Math.imul(m,al)|0,r=r+Math.imul(m,sl)|0,t=t+Math.imul(p,fl)|0,u=u+Math.imul(p,hl)|0,u=u+Math.imul(b,fl)|0,r=r+Math.imul(b,hl)|0,t=t+Math.imul(f,pl)|0,u=u+Math.imul(f,bl)|0,u=u+Math.imul(h,pl)|0,r=r+Math.imul(h,bl)|0;var Il=(s+t|0)+((8191&u)<<13)|0;s=(r+(u>>>13)|0)+(Il>>>26)|0,Il&=67108863,t=Math.imul(D,H),u=Math.imul(D,K),u=u+Math.imul(L,H)|0,r=Math.imul(L,K),t=t+Math.imul(N,Y)|0,u=u+Math.imul(N,G)|0,u=u+Math.imul(B,Y)|0,r=r+Math.imul(B,G)|0,t=t+Math.imul(R,X)|0,u=u+Math.imul(R,J)|0,u=u+Math.imul(O,X)|0,r=r+Math.imul(O,J)|0,t=t+Math.imul(A,Q)|0,u=u+Math.imul(A,ll)|0,u=u+Math.imul(x,Q)|0,r=r+Math.imul(x,ll)|0,t=t+Math.imul(C,el)|0,u=u+Math.imul(C,tl)|0,u=u+Math.imul(j,el)|0,r=r+Math.imul(j,tl)|0,t=t+Math.imul(S,rl)|0,u=u+Math.imul(S,il)|0,u=u+Math.imul(E,rl)|0,r=r+Math.imul(E,il)|0,t=t+Math.imul(g,al)|0,u=u+Math.imul(g,sl)|0,u=u+Math.imul(w,al)|0,r=r+Math.imul(w,sl)|0,t=t+Math.imul(_,fl)|0,u=u+Math.imul(_,hl)|0,u=u+Math.imul(m,fl)|0,r=r+Math.imul(m,hl)|0,t=t+Math.imul(p,pl)|0,u=u+Math.imul(p,bl)|0,u=u+Math.imul(b,pl)|0,r=r+Math.imul(b,bl)|0;var Cl=(s+t|0)+((8191&u)<<13)|0;s=(r+(u>>>13)|0)+(Cl>>>26)|0,Cl&=67108863,t=Math.imul(D,Y),u=Math.imul(D,G),u=u+Math.imul(L,Y)|0,r=Math.imul(L,G),t=t+Math.imul(N,X)|0,u=u+Math.imul(N,J)|0,u=u+Math.imul(B,X)|0,r=r+Math.imul(B,J)|0,t=t+Math.imul(R,Q)|0,u=u+Math.imul(R,ll)|0,u=u+Math.imul(O,Q)|0,r=r+Math.imul(O,ll)|0,t=t+Math.imul(A,el)|0,u=u+Math.imul(A,tl)|0,u=u+Math.imul(x,el)|0,r=r+Math.imul(x,tl)|0,t=t+Math.imul(C,rl)|0,u=u+Math.imul(C,il)|0,u=u+Math.imul(j,rl)|0,r=r+Math.imul(j,il)|0,t=t+Math.imul(S,al)|0,u=u+Math.imul(S,sl)|0,u=u+Math.imul(E,al)|0,r=r+Math.imul(E,sl)|0,t=t+Math.imul(g,fl)|0,u=u+Math.imul(g,hl)|0,u=u+Math.imul(w,fl)|0,r=r+Math.imul(w,hl)|0,t=t+Math.imul(_,pl)|0,u=u+Math.imul(_,bl)|0,u=u+Math.imul(m,pl)|0,r=r+Math.imul(m,bl)|0;var jl=(s+t|0)+((8191&u)<<13)|0;s=(r+(u>>>13)|0)+(jl>>>26)|0,jl&=67108863,t=Math.imul(D,X),u=Math.imul(D,J),u=u+Math.imul(L,X)|0,r=Math.imul(L,J),t=t+Math.imul(N,Q)|0,u=u+Math.imul(N,ll)|0,u=u+Math.imul(B,Q)|0,r=r+Math.imul(B,ll)|0,t=t+Math.imul(R,el)|0,u=u+Math.imul(R,tl)|0,u=u+Math.imul(O,el)|0,r=r+Math.imul(O,tl)|0,t=t+Math.imul(A,rl)|0,u=u+Math.imul(A,il)|0,u=u+Math.imul(x,rl)|0,r=r+Math.imul(x,il)|0,t=t+Math.imul(C,al)|0,u=u+Math.imul(C,sl)|0,u=u+Math.imul(j,al)|0,r=r+Math.imul(j,sl)|0,t=t+Math.imul(S,fl)|0,u=u+Math.imul(S,hl)|0,u=u+Math.imul(E,fl)|0,r=r+Math.imul(E,hl)|0,t=t+Math.imul(g,pl)|0,u=u+Math.imul(g,bl)|0,u=u+Math.imul(w,pl)|0,r=r+Math.imul(w,bl)|0;var Ml=(s+t|0)+((8191&u)<<13)|0;s=(r+(u>>>13)|0)+(Ml>>>26)|0,Ml&=67108863,t=Math.imul(D,Q),u=Math.imul(D,ll),u=u+Math.imul(L,Q)|0,r=Math.imul(L,ll),t=t+Math.imul(N,el)|0,u=u+Math.imul(N,tl)|0,u=u+Math.imul(B,el)|0,r=r+Math.imul(B,tl)|0,t=t+Math.imul(R,rl)|0,u=u+Math.imul(R,il)|0,u=u+Math.imul(O,rl)|0,r=r+Math.imul(O,il)|0,t=t+Math.imul(A,al)|0,u=u+Math.imul(A,sl)|0,u=u+Math.imul(x,al)|0,r=r+Math.imul(x,sl)|0,t=t+Math.imul(C,fl)|0,u=u+Math.imul(C,hl)|0,u=u+Math.imul(j,fl)|0,r=r+Math.imul(j,hl)|0,t=t+Math.imul(S,pl)|0,u=u+Math.imul(S,bl)|0,u=u+Math.imul(E,pl)|0,r=r+Math.imul(E,bl)|0;var Al=(s+t|0)+((8191&u)<<13)|0;s=(r+(u>>>13)|0)+(Al>>>26)|0,Al&=67108863,t=Math.imul(D,el),u=Math.imul(D,tl),u=u+Math.imul(L,el)|0,r=Math.imul(L,tl),t=t+Math.imul(N,rl)|0,u=u+Math.imul(N,il)|0,u=u+Math.imul(B,rl)|0,r=r+Math.imul(B,il)|0,t=t+Math.imul(R,al)|0,u=u+Math.imul(R,sl)|0,u=u+Math.imul(O,al)|0,r=r+Math.imul(O,sl)|0,t=t+Math.imul(A,fl)|0,u=u+Math.imul(A,hl)|0,u=u+Math.imul(x,fl)|0,r=r+Math.imul(x,hl)|0,t=t+Math.imul(C,pl)|0,u=u+Math.imul(C,bl)|0,u=u+Math.imul(j,pl)|0,r=r+Math.imul(j,bl)|0;var xl=(s+t|0)+((8191&u)<<13)|0;s=(r+(u>>>13)|0)+(xl>>>26)|0,xl&=67108863,t=Math.imul(D,rl),u=Math.imul(D,il),u=u+Math.imul(L,rl)|0,r=Math.imul(L,il),t=t+Math.imul(N,al)|0,u=u+Math.imul(N,sl)|0,u=u+Math.imul(B,al)|0,r=r+Math.imul(B,sl)|0,t=t+Math.imul(R,fl)|0,u=u+Math.imul(R,hl)|0,u=u+Math.imul(O,fl)|0,r=r+Math.imul(O,hl)|0,t=t+Math.imul(A,pl)|0,u=u+Math.imul(A,bl)|0,u=u+Math.imul(x,pl)|0,r=r+Math.imul(x,bl)|0;var Tl=(s+t|0)+((8191&u)<<13)|0;s=(r+(u>>>13)|0)+(Tl>>>26)|0,Tl&=67108863,t=Math.imul(D,al),u=Math.imul(D,sl),u=u+Math.imul(L,al)|0,r=Math.imul(L,sl),t=t+Math.imul(N,fl)|0,u=u+Math.imul(N,hl)|0,u=u+Math.imul(B,fl)|0,r=r+Math.imul(B,hl)|0,t=t+Math.imul(R,pl)|0,u=u+Math.imul(R,bl)|0,u=u+Math.imul(O,pl)|0,r=r+Math.imul(O,bl)|0;var Rl=(s+t|0)+((8191&u)<<13)|0;s=(r+(u>>>13)|0)+(Rl>>>26)|0,Rl&=67108863,t=Math.imul(D,fl),u=Math.imul(D,hl),u=u+Math.imul(L,fl)|0,r=Math.imul(L,hl),t=t+Math.imul(N,pl)|0,u=u+Math.imul(N,bl)|0,u=u+Math.imul(B,pl)|0,r=r+Math.imul(B,bl)|0;var Ol=(s+t|0)+((8191&u)<<13)|0;s=(r+(u>>>13)|0)+(Ol>>>26)|0,Ol&=67108863,t=Math.imul(D,pl),u=Math.imul(D,bl),u=u+Math.imul(L,pl)|0,r=Math.imul(L,bl);var Pl=(s+t|0)+((8191&u)<<13)|0;return s=(r+(u>>>13)|0)+(Pl>>>26)|0,Pl&=67108863,a[0]=vl,a[1]=_l,a[2]=ml,a[3]=yl,a[4]=gl,a[5]=wl,a[6]=kl,a[7]=Sl,a[8]=El,a[9]=Il,a[10]=Cl,a[11]=jl,a[12]=Ml,a[13]=Al,a[14]=xl,a[15]=Tl,a[16]=Rl,a[17]=Ol,a[18]=Pl,0!==s&&(a[19]=s,e.length++),e};Math.imul||(I=s),r.prototype.mulTo=function(l,n){var e,t=this.length+l.length;return e=10===this.length&&10===l.length?I(this,l,n):t<63?s(this,l,n):t<1024?c(this,l,n):f(this,l,n)},h.prototype.makeRBT=function(l){for(var n=new Array(l),e=r.prototype._countBits(l)-1,t=0;t>=1;return t},h.prototype.permute=function(l,n,e,t,u,r){for(var i=0;i>>=1)u++;return 1<>>=13,e[2*i+1]=8191&r,r>>>=13;for(i=2*n;i>=26,n+=u/67108864|0,n+=r>>>26,this.words[e]=67108863&r}return 0!==n&&(this.words[e]=n,this.length++),this},r.prototype.muln=function(l){return this.clone().imuln(l)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(l){var n=a(l);if(0===n.length)return new r(1);for(var e=this,t=0;t=0);var n,e=l%26,u=(l-e)/26,r=67108863>>>26-e<<26-e;if(0!==e){var i=0;for(n=0;n>>26-e}i&&(this.words[n]=i,this.length++)}if(0!==u){for(n=this.length-1;n>=0;n--)this.words[n+u]=this.words[n];for(n=0;n=0);var u;u=n?(n-n%26)/26:0;var r=l%26,i=Math.min((l-r)/26,this.length),o=67108863^67108863>>>r<i)for(this.length-=i,s=0;s=0&&(0!==c||s>=u);s--){var f=0|this.words[s];this.words[s]=c<<26-r|f>>>r,c=f&o}return a&&0!==c&&(a.words[a.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},r.prototype.ishrn=function(l,n,e){return t(0===this.negative),this.iushrn(l,n,e)},r.prototype.shln=function(l){return this.clone().ishln(l)},r.prototype.ushln=function(l){return this.clone().iushln(l)},r.prototype.shrn=function(l){return this.clone().ishrn(l)},r.prototype.ushrn=function(l){return this.clone().iushrn(l)},r.prototype.testn=function(l){t("number"==typeof l&&l>=0);var n=l%26,e=(l-n)/26,u=1<=0);var n=l%26,e=(l-n)/26;if(t(0===this.negative,"imaskn works only with positive numbers"),this.length<=e)return this;if(0!==n&&e++,this.length=Math.min(e,this.length),0!==n){var u=67108863^67108863>>>n<=67108864;n++)this.words[n]-=67108864,n===this.length-1?this.words[n+1]=1:this.words[n+1]++;return this.length=Math.max(this.length,n+1),this},r.prototype.isubn=function(l){if(t("number"==typeof l),t(l<67108864),l<0)return this.iaddn(-l);if(0!==this.negative)return this.negative=0,this.iaddn(l),this.negative=1,this;if(this.words[0]-=l,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var n=0;n>26)-(a/67108864|0),this.words[u+e]=67108863&i}for(;u>26,this.words[u+e]=67108863&i;if(0===o)return this.strip();for(t(o===-1),o=0,u=0;u>26,this.words[u]=67108863&i;return this.negative=1,this.strip()},r.prototype._wordDiv=function(l,n){var e=this.length-l.length,t=this.clone(),u=l,i=0|u.words[u.length-1],o=this._countBits(i);e=26-o,0!==e&&(u=u.ushln(e),t.iushln(e),i=0|u.words[u.length-1]);var a,s=t.length-u.length;if("mod"!==n){a=new r(null),a.length=s+1,a.words=new Array(a.length);for(var c=0;c=0;h--){var d=67108864*(0|t.words[u.length+h])+(0|t.words[u.length+h-1]);for(d=Math.min(d/i|0,67108863),t._ishlnsubmul(u,d,h);0!==t.negative;)d--,t.negative=0,t._ishlnsubmul(u,1,h),t.isZero()||(t.negative^=1);a&&(a.words[h]=d)}return a&&a.strip(),t.strip(),"div"!==n&&0!==e&&t.iushrn(e),{div:a||null,mod:t}},r.prototype.divmod=function(l,n,e){if(t(!l.isZero()),this.isZero())return{div:new r(0),mod:new r(0)};var u,i,o;return 0!==this.negative&&0===l.negative?(o=this.neg().divmod(l,n),"mod"!==n&&(u=o.div.neg()),"div"!==n&&(i=o.mod.neg(),e&&0!==i.negative&&i.iadd(l)),{div:u,mod:i}):0===this.negative&&0!==l.negative?(o=this.divmod(l.neg(),n),"mod"!==n&&(u=o.div.neg()),{div:u,mod:o.mod}):0!==(this.negative&l.negative)?(o=this.neg().divmod(l.neg(),n),"div"!==n&&(i=o.mod.neg(),e&&0!==i.negative&&i.isub(l)),{div:o.div,mod:i}):l.length>this.length||this.cmp(l)<0?{div:new r(0),mod:this}:1===l.length?"div"===n?{div:this.divn(l.words[0]),mod:null}:"mod"===n?{div:null,mod:new r(this.modn(l.words[0]))}:{div:this.divn(l.words[0]),mod:new r(this.modn(l.words[0]))}:this._wordDiv(l,n)},r.prototype.div=function(l){return this.divmod(l,"div",!1).div},r.prototype.mod=function(l){return this.divmod(l,"mod",!1).mod},r.prototype.umod=function(l){return this.divmod(l,"mod",!0).mod},r.prototype.divRound=function(l){var n=this.divmod(l);if(n.mod.isZero())return n.div;var e=0!==n.div.negative?n.mod.isub(l):n.mod,t=l.ushrn(1),u=l.andln(1),r=e.cmp(t);return r<0||1===u&&0===r?n.div:0!==n.div.negative?n.div.isubn(1):n.div.iaddn(1)},r.prototype.modn=function(l){t(l<=67108863);for(var n=(1<<26)%l,e=0,u=this.length-1;u>=0;u--)e=(n*e+(0|this.words[u]))%l;return e},r.prototype.idivn=function(l){t(l<=67108863);for(var n=0,e=this.length-1;e>=0;e--){var u=(0|this.words[e])+67108864*n;this.words[e]=u/l|0,n=u%l}return this.strip()},r.prototype.divn=function(l){return this.clone().idivn(l)},r.prototype.egcd=function(l){t(0===l.negative),t(!l.isZero());var n=this,e=l.clone();n=0!==n.negative?n.umod(l):n.clone();for(var u=new r(1),i=new r(0),o=new r(0),a=new r(1),s=0;n.isEven()&&e.isEven();)n.iushrn(1),e.iushrn(1),++s;for(var c=e.clone(),f=n.clone();!n.isZero();){for(var h=0,d=1;0===(n.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(n.iushrn(h);h-- >0;)(u.isOdd()||i.isOdd())&&(u.iadd(c),i.isub(f)),u.iushrn(1),i.iushrn(1);for(var p=0,b=1;0===(e.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(e.iushrn(p);p-- >0;)(o.isOdd()||a.isOdd())&&(o.iadd(c),a.isub(f)),o.iushrn(1),a.iushrn(1);n.cmp(e)>=0?(n.isub(e),u.isub(o),i.isub(a)):(e.isub(n),o.isub(u),a.isub(i))}return{a:o,b:a,gcd:e.iushln(s)}},r.prototype._invmp=function(l){t(0===l.negative),t(!l.isZero());var n=this,e=l.clone();n=0!==n.negative?n.umod(l):n.clone();for(var u=new r(1),i=new r(0),o=e.clone();n.cmpn(1)>0&&e.cmpn(1)>0;){for(var a=0,s=1;0===(n.words[0]&s)&&a<26;++a,s<<=1);if(a>0)for(n.iushrn(a);a-- >0;)u.isOdd()&&u.iadd(o),u.iushrn(1);for(var c=0,f=1;0===(e.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(e.iushrn(c);c-- >0;)i.isOdd()&&i.iadd(o),i.iushrn(1);n.cmp(e)>=0?(n.isub(e),u.isub(i)):(e.isub(n),i.isub(u))}var h;return h=0===n.cmpn(1)?u:i,h.cmpn(0)<0&&h.iadd(l),h},r.prototype.gcd=function(l){if(this.isZero())return l.abs();if(l.isZero())return this.abs();var n=this.clone(),e=l.clone();n.negative=0,e.negative=0;for(var t=0;n.isEven()&&e.isEven();t++)n.iushrn(1),e.iushrn(1);for(;;){for(;n.isEven();)n.iushrn(1);for(;e.isEven();)e.iushrn(1);var u=n.cmp(e);if(u<0){var r=n;n=e,e=r}else if(0===u||0===e.cmpn(1))break;n.isub(e)}return e.iushln(t)},r.prototype.invm=function(l){return this.egcd(l).a.umod(l)},r.prototype.isEven=function(){return 0===(1&this.words[0])},r.prototype.isOdd=function(){return 1===(1&this.words[0])},r.prototype.andln=function(l){return this.words[0]&l},r.prototype.bincn=function(l){t("number"==typeof l);var n=l%26,e=(l-n)/26,u=1<>>26,o&=67108863,this.words[i]=o}return 0!==r&&(this.words[i]=r,this.length++),this},r.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},r.prototype.cmpn=function(l){var n=l<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;this.strip();var e;if(this.length>1)e=1;else{n&&(l=-l),t(l<=67108863,"Number is too big");var u=0|this.words[0];e=u===l?0:ul.length)return 1;if(this.length=0;e--){var t=0|this.words[e],u=0|l.words[e];if(t!==u){tu&&(n=1);break}}return n},r.prototype.gtn=function(l){return 1===this.cmpn(l)},r.prototype.gt=function(l){return 1===this.cmp(l)},r.prototype.gten=function(l){return this.cmpn(l)>=0},r.prototype.gte=function(l){return this.cmp(l)>=0},r.prototype.ltn=function(l){return this.cmpn(l)===-1},r.prototype.lt=function(l){return this.cmp(l)===-1},r.prototype.lten=function(l){return this.cmpn(l)<=0},r.prototype.lte=function(l){return this.cmp(l)<=0},r.prototype.eqn=function(l){return 0===this.cmpn(l)},r.prototype.eq=function(l){return 0===this.cmp(l)},r.red=function(l){return new m(l)},r.prototype.toRed=function(l){return t(!this.red,"Already a number in reduction context"),t(0===this.negative,"red works only with positives"),l.convertTo(this)._forceRed(l)},r.prototype.fromRed=function(){return t(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(l){return this.red=l,this},r.prototype.forceRed=function(l){return t(!this.red,"Already a number in reduction context"),this._forceRed(l)},r.prototype.redAdd=function(l){return t(this.red,"redAdd works only with red numbers"),this.red.add(this,l)},r.prototype.redIAdd=function(l){return t(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,l)},r.prototype.redSub=function(l){return t(this.red,"redSub works only with red numbers"),this.red.sub(this,l)},r.prototype.redISub=function(l){return t(this.red,"redISub works only with red numbers"),this.red.isub(this,l)},r.prototype.redShl=function(l){return t(this.red,"redShl works only with red numbers"),this.red.shl(this,l)},r.prototype.redMul=function(l){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,l),this.red.mul(this,l)},r.prototype.redIMul=function(l){return t(this.red,"redMul works only with red numbers"),this.red._verify2(this,l),this.red.imul(this,l)},r.prototype.redSqr=function(){return t(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return t(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return t(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return t(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return t(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(l){return t(this.red&&!l.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,l)};var C={k256:null,p224:null,p192:null,p25519:null};d.prototype._tmp=function(){var l=new r(null);return l.words=new Array(Math.ceil(this.n/13)),l},d.prototype.ireduce=function(l){var n,e=l;do this.split(e,this.tmp),e=this.imulK(e),e=e.iadd(this.tmp),n=e.bitLength();while(n>this.n);var t=n0?e.isub(this.p):e.strip(),e},d.prototype.split=function(l,n){l.iushrn(this.n,0,n)},d.prototype.imulK=function(l){return l.imul(this.k)},u(p,d),p.prototype.split=function(l,n){for(var e=4194303,t=Math.min(l.length,9),u=0;u>>22,r=i}r>>>=22,l.words[u-10]=r,0===r&&l.length>10?l.length-=10:l.length-=9},p.prototype.imulK=function(l){l.words[l.length]=0,l.words[l.length+1]=0,l.length+=2;for(var n=0,e=0;e>>=26,l.words[e]=u,n=t}return 0!==n&&(l.words[l.length++]=n),l},r._prime=function j(l){if(C[l])return C[l];var j;if("k256"===l)j=new p;else if("p224"===l)j=new b;else if("p192"===l)j=new v;else{if("p25519"!==l)throw new Error("Unknown prime "+l);j=new _}return C[l]=j,j},m.prototype._verify1=function(l){t(0===l.negative,"red works only with positives"),t(l.red,"red works only with red numbers")},m.prototype._verify2=function(l,n){t(0===(l.negative|n.negative),"red works only with positives"),t(l.red&&l.red===n.red,"red works only with red numbers")},m.prototype.imod=function(l){return this.prime?this.prime.ireduce(l)._forceRed(this):l.umod(this.m)._forceRed(this)},m.prototype.neg=function(l){return l.isZero()?l.clone():this.m.sub(l)._forceRed(this)},m.prototype.add=function(l,n){this._verify2(l,n);var e=l.add(n);return e.cmp(this.m)>=0&&e.isub(this.m),e._forceRed(this)},m.prototype.iadd=function(l,n){this._verify2(l,n);var e=l.iadd(n);return e.cmp(this.m)>=0&&e.isub(this.m),e},m.prototype.sub=function(l,n){this._verify2(l,n);var e=l.sub(n);return e.cmpn(0)<0&&e.iadd(this.m),e._forceRed(this)},m.prototype.isub=function(l,n){this._verify2(l,n);var e=l.isub(n);return e.cmpn(0)<0&&e.iadd(this.m),e},m.prototype.shl=function(l,n){return this._verify1(l),this.imod(l.ushln(n))},m.prototype.imul=function(l,n){return this._verify2(l,n),this.imod(l.imul(n))},m.prototype.mul=function(l,n){return this._verify2(l,n),this.imod(l.mul(n))},m.prototype.isqr=function(l){return this.imul(l,l.clone())},m.prototype.sqr=function(l){return this.mul(l,l)},m.prototype.sqrt=function(l){if(l.isZero())return l.clone();var n=this.m.andln(3);if(t(n%2===1),3===n){var e=this.m.add(new r(1)).iushrn(2);return this.pow(l,e)}for(var u=this.m.subn(1),i=0;!u.isZero()&&0===u.andln(1);)i++,u.iushrn(1);t(!u.isZero());var o=new r(1).toRed(this),a=o.redNeg(),s=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new r(2*c*c).toRed(this);0!==this.pow(c,s).cmp(a);)c.redIAdd(a);for(var f=this.pow(c,u),h=this.pow(l,u.addn(1).iushrn(1)),d=this.pow(l,u),p=i;0!==d.cmp(o);){for(var b=d,v=0;0!==b.cmp(o);v++)b=b.redSqr();t(v=0;u--){for(var c=n.words[u],f=s-1;f>=0;f--){var h=c>>f&1;i!==t[0]&&(i=this.sqr(i)),0!==h||0!==o?(o<<=1,o|=h,a++,(a===e||0===u&&0===f)&&(i=this.mul(i,t[o]),a=0,o=0)):a=0}s=26}return i},m.prototype.convertTo=function(l){var n=l.umod(this.m);return n===l?n.clone():n},m.prototype.convertFrom=function(l){var n=l.clone();return n.red=null,n},r.mont=function(l){return new y(l)},u(y,m),y.prototype.convertTo=function(l){return this.imod(l.ushln(this.shift))},y.prototype.convertFrom=function(l){var n=this.imod(l.mul(this.rinv));return n.red=null,n},y.prototype.imul=function(l,n){if(l.isZero()||n.isZero())return l.words[0]=0,l.length=1,l;var e=l.imul(n),t=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=e.isub(t).iushrn(this.shift),r=u;return u.cmp(this.m)>=0?r=u.isub(this.m):u.cmpn(0)<0&&(r=u.iadd(this.m)),r._forceRed(this)},y.prototype.mul=function(l,n){if(l.isZero()||n.isZero())return new r(0)._forceRed(this);var e=l.mul(n),t=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=e.isub(t).iushrn(this.shift),i=u;return u.cmp(this.m)>=0?i=u.isub(this.m):u.cmpn(0)<0&&(i=u.iadd(this.m)),i._forceRed(this)},y.prototype.invm=function(l){var n=this.imod(l._invmp(this.m).mul(this.r2));return n._forceRed(this)}}("undefined"==typeof n||n,this)},{buffer:46}],45:[function(l,n,e){function t(l){this.rand=l}var u;if(n.exports=function(l){return u||(u=new t(null)),u.generate(l)},n.exports.Rand=t,t.prototype.generate=function(l){return this._rand(l)},t.prototype._rand=function(l){if(this.rand.getBytes)return this.rand.getBytes(l);for(var n=new Uint8Array(l),e=0;e>>24]^c[p>>>16&255]^f[b>>>8&255]^h[255&v]^n[_++],i=s[p>>>24]^c[b>>>16&255]^f[v>>>8&255]^h[255&d]^n[_++],o=s[b>>>24]^c[v>>>16&255]^f[d>>>8&255]^h[255&p]^n[_++],a=s[v>>>24]^c[d>>>16&255]^f[p>>>8&255]^h[255&b]^n[_++],d=r,p=i,b=o,v=a;return r=(t[d>>>24]<<24|t[p>>>16&255]<<16|t[b>>>8&255]<<8|t[255&v])^n[_++],i=(t[p>>>24]<<24|t[b>>>16&255]<<16|t[v>>>8&255]<<8|t[255&d])^n[_++],o=(t[b>>>24]<<24|t[v>>>16&255]<<16|t[d>>>8&255]<<8|t[255&p])^n[_++],a=(t[v>>>24]<<24|t[d>>>16&255]<<16|t[p>>>8&255]<<8|t[255&b])^n[_++],r>>>=0,i>>>=0,o>>>=0,a>>>=0,[r,i,o,a]}function i(l){this._key=t(l),this._reset()}var o=l("safe-buffer").Buffer,a=[0,1,2,4,8,16,32,64,128,27,54],s=function(){for(var l=new Array(256),n=0;n<256;n++)n<128?l[n]=n<<1:l[n]=n<<1^283;for(var e=[],t=[],u=[[],[],[],[]],r=[[],[],[],[]],i=0,o=0,a=0;a<256;++a){var s=o^o<<1^o<<2^o<<3^o<<4;s=s>>>8^255&s^99,e[i]=s,t[s]=i;var c=l[i],f=l[c],h=l[f],d=257*l[s]^16843008*s;u[0][i]=d<<24|d>>>8,u[1][i]=d<<16|d>>>16,u[2][i]=d<<8|d>>>24,u[3][i]=d,d=16843009*h^65537*f^257*c^16843008*i,r[0][s]=d<<24|d>>>8,r[1][s]=d<<16|d>>>16,r[2][s]=d<<8|d>>>24,r[3][s]=d,0===i?i=o=1:(i=c^l[l[l[h^c]]],o^=l[l[o]])}return{SBOX:e,INV_SBOX:t,SUB_MIX:u,INV_SUB_MIX:r}}();i.blockSize=16,i.keySize=32,i.prototype.blockSize=i.blockSize,i.prototype.keySize=i.keySize,i.prototype._reset=function(){for(var l=this._key,n=l.length,e=n+6,t=4*(e+1),u=[],r=0;r>>24,i=s.SBOX[i>>>24]<<24|s.SBOX[i>>>16&255]<<16|s.SBOX[i>>>8&255]<<8|s.SBOX[255&i],i^=a[r/n|0]<<24):n>6&&r%n===4&&(i=s.SBOX[i>>>24]<<24|s.SBOX[i>>>16&255]<<16|s.SBOX[i>>>8&255]<<8|s.SBOX[255&i]),u[r]=u[r-n]^i}for(var o=[],c=0;c>>24]]^s.INV_SUB_MIX[1][s.SBOX[h>>>16&255]]^s.INV_SUB_MIX[2][s.SBOX[h>>>8&255]]^s.INV_SUB_MIX[3][s.SBOX[255&h]]}this._nRounds=e,this._keySchedule=u,this._invKeySchedule=o},i.prototype.encryptBlockRaw=function(l){return l=t(l),r(l,this._keySchedule,s.SUB_MIX,s.SBOX,this._nRounds)},i.prototype.encryptBlock=function(l){var n=this.encryptBlockRaw(l),e=o.allocUnsafe(16);return e.writeUInt32BE(n[0],0),e.writeUInt32BE(n[1],4),e.writeUInt32BE(n[2],8),e.writeUInt32BE(n[3],12),e},i.prototype.decryptBlock=function(l){l=t(l);var n=l[1];l[1]=l[3],l[3]=n;var e=r(l,this._invKeySchedule,s.INV_SUB_MIX,s.INV_SBOX,this._nRounds),u=o.allocUnsafe(16);return u.writeUInt32BE(e[0],0),u.writeUInt32BE(e[3],4),u.writeUInt32BE(e[2],8),u.writeUInt32BE(e[1],12),u},i.prototype.scrub=function(){u(this._keySchedule),u(this._invKeySchedule),u(this._key)},n.exports.AES=i},{"safe-buffer":307}],48:[function(l,n,e){function t(l,n){var e=0;l.length!==n.length&&e++;for(var t=Math.min(l.length,n.length),u=0;u16)throw new Error("unable to decrypt data");for(var e=-1;++e16)return n=this.cache.slice(0,16),this.cache=this.cache.slice(16),n}else if(this.cache.length>=16)return n=this.cache.slice(0,16),this.cache=this.cache.slice(16),n;return null},u.prototype.flush=function(){if(this.cache.length)return this.cache},e.createDecipher=o,e.createDecipheriv=i},{"./aes":47,"./authCipher":48,"./modes":60,"./streamCipher":63,"cipher-base":77,evp_bytestokey:246,inherits:263,"safe-buffer":307}],51:[function(l,n,e){function t(l,n,e){f.call(this),this._cache=new u,this._cipher=new h.AES(n),this._prev=s.from(e),this._mode=l,this._autopadding=!0}function u(){this.cache=s.allocUnsafe(0)}function r(l,n,e){var u=o[l.toLowerCase()];if(!u)throw new TypeError("invalid suite type");if("string"==typeof n&&(n=s.from(n)),n.length!==u.key/8)throw new TypeError("invalid key length "+n.length);if("string"==typeof e&&(e=s.from(e)),"GCM"!==u.mode&&e.length!==u.iv)throw new TypeError("invalid iv length "+e.length);return"stream"===u.type?new c(u.module,n,e):"auth"===u.type?new a(u.module,n,e):new t(u.module,n,e)}function i(l,n){var e=o[l.toLowerCase()];if(!e)throw new TypeError("invalid suite type");var t=d(n,!1,e.key,e.iv);return r(l,t.key,t.iv)}var o=l("./modes"),a=l("./authCipher"),s=l("safe-buffer").Buffer,c=l("./streamCipher"),f=l("cipher-base"),h=l("./aes"),d=l("evp_bytestokey"),p=l("inherits");p(t,f),t.prototype._update=function(l){this._cache.add(l);for(var n,e,t=[];n=this._cache.get();)e=this._mode.encrypt(this,n),t.push(e);return s.concat(t)};var b=s.alloc(16,16);t.prototype._final=function(){var l=this._cache.flush();if(this._autopadding)return l=this._mode.encrypt(this,l),this._cipher.scrub(),l;if(!l.equals(b))throw this._cipher.scrub(),new Error("data not multiple of block length")},t.prototype.setAutoPadding=function(l){return this._autopadding=!!l,this},u.prototype.add=function(l){this.cache=s.concat([this.cache,l])},u.prototype.get=function(){if(this.cache.length>15){var l=this.cache.slice(0,16);return this.cache=this.cache.slice(16),l}return null},u.prototype.flush=function(){for(var l=16-this.cache.length,n=s.allocUnsafe(l),e=-1;++e>>0,0),n.writeUInt32BE(l[1]>>>0,4),n.writeUInt32BE(l[2]>>>0,8),n.writeUInt32BE(l[3]>>>0,12),n}function r(l){this.h=l,this.state=i.alloc(16,0),this.cache=i.allocUnsafe(0)}var i=l("safe-buffer").Buffer,o=i.alloc(16,0);r.prototype.ghash=function(l){for(var n=-1;++n0;l--)r[l]=r[l]>>>1|(1&r[l-1])<<31;r[0]=r[0]>>>1,e&&(r[0]=r[0]^225<<24)}this.state=u(i)},r.prototype.update=function(l){this.cache=i.concat([this.cache,l]);for(var n;this.cache.length>=16;)n=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(n)},r.prototype["final"]=function(l,n){return this.cache.length&&this.ghash(i.concat([this.cache,o],16)),this.ghash(u([0,l,0,n])),this.state},n.exports=r},{"safe-buffer":307}],53:[function(l,n,e){function t(l){for(var n,e=l.length;e--;){if(n=l.readUInt8(e),255!==n){n++,l.writeUInt8(n,e);break}l.writeUInt8(0,e)}}n.exports=t},{}],54:[function(l,n,e){var t=l("buffer-xor");e.encrypt=function(l,n){var e=t(n,l._prev);return l._prev=l._cipher.encryptBlock(e),l._prev},e.decrypt=function(l,n){var e=l._prev;l._prev=n;var u=l._cipher.decryptBlock(n);return t(u,e)}},{"buffer-xor":75}],55:[function(l,n,e){function t(l,n,e){var t=n.length,i=r(n,l._cache);return l._cache=l._cache.slice(t),l._prev=u.concat([l._prev,e?n:i]),i}var u=l("safe-buffer").Buffer,r=l("buffer-xor");e.encrypt=function(l,n,e){for(var r,i=u.allocUnsafe(0);n.length;){if(0===l._cache.length&&(l._cache=l._cipher.encryptBlock(l._prev),l._prev=u.allocUnsafe(0)),!(l._cache.length<=n.length)){i=u.concat([i,t(l,n,e)]);break}r=l._cache.length,i=u.concat([i,t(l,n.slice(0,r),e)]),n=n.slice(r)}return i}},{"buffer-xor":75,"safe-buffer":307}],56:[function(l,n,e){function t(l,n,e){for(var t,r,i,o=-1,a=8,s=0;++o>o%8,l._prev=u(l._prev,e?r:i);return s}function u(l,n){var e=l.length,t=-1,u=r.allocUnsafe(l.length);for(l=r.concat([l,r.from([n])]);++t>7;return u}var r=l("safe-buffer").Buffer;e.encrypt=function(l,n,e){for(var u=n.length,i=r.allocUnsafe(u),o=-1;++o=0||!e.umod(l.prime1)||!e.umod(l.prime2);)e=new i(o(n));return e}var i=l("bn.js"),o=l("randombytes");n.exports=u,u.getr=r}).call(this,l("buffer").Buffer)},{"bn.js":44,buffer:76,randombytes:290}],68:[function(l,n,e){n.exports=l("./browser/algorithms.json")},{"./browser/algorithms.json":69}],69:[function(l,n,e){n.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}},{}],70:[function(l,n,e){n.exports={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}},{}],71:[function(l,n,e){(function(e){function t(l){a.Writable.call(this);var n=h[l];if(!n)throw new Error("Unknown message digest");this._hashType=n.hash,this._hash=o(n.hash),this._tag=n.id,this._signType=n.sign}function u(l){a.Writable.call(this);var n=h[l];if(!n)throw new Error("Unknown message digest");this._hash=o(n.hash),this._tag=n.id,this._signType=n.sign}function r(l){return new t(l)}function i(l){return new u(l)}var o=l("create-hash"),a=l("stream"),s=l("inherits"),c=l("./sign"),f=l("./verify"),h=l("./algorithms.json");Object.keys(h).forEach(function(l){h[l].id=new e(h[l].id,"hex"),h[l.toLowerCase()]=h[l]}),s(t,a.Writable),t.prototype._write=function(l,n,e){this._hash.update(l),e()},t.prototype.update=function(l,n){return"string"==typeof l&&(l=new e(l,n)),this._hash.update(l),this},t.prototype.sign=function(l,n){this.end();var e=this._hash.digest(),t=c(e,l,this._hashType,this._signType,this._tag);return n?t.toString(n):t},s(u,a.Writable),u.prototype._write=function(l,n,e){this._hash.update(l),e()},u.prototype.update=function(l,n){return"string"==typeof l&&(l=new e(l,n)),this._hash.update(l),this},u.prototype.verify=function(l,n,t){"string"==typeof n&&(n=new e(n,t)),this.end();var u=this._hash.digest();return f(n,u,l,this._signType,this._tag)},n.exports={Sign:r,Verify:i,createSign:r,createVerify:i}}).call(this,l("buffer").Buffer)},{"./algorithms.json":69,"./sign":72,"./verify":73,buffer:76,"create-hash":214,inherits:263,stream:316}],72:[function(l,n,e){(function(e){function t(l,n,t,i,o){var a=v(n);if(a.curve){if("ecdsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");return u(l,a)}if("dsa"===a.type){if("dsa"!==i)throw new Error("wrong private key type");return r(l,a,t)}if("rsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");l=e.concat([o,l]);for(var s=a.modulus.byteLength(),c=[0,1];l.length+c.length+10&&e.ishrn(t),e}function s(l,n){l=a(l,n),l=l.mod(n);var t=new e(l.toArray());if(t.length=n)throw new Error("invalid sig")}var o=l("bn.js"),a=l("elliptic").ec,s=l("parse-asn1"),c=l("./curves.json");n.exports=t}).call(this,l("buffer").Buffer)},{"./curves.json":70,"bn.js":44,buffer:76,elliptic:229,"parse-asn1":275}],74:[function(l,n,e){arguments[4][46][0].apply(e,arguments)},{dup:46}],75:[function(l,n,e){(function(l){n.exports=function(n,e){for(var t=Math.min(n.length,e.length),u=new l(t),r=0;r=u())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u().toString(16)+" bytes");return 0|l}function v(l){return+l!=l&&(l=0),i.alloc(+l)}function _(l,n){if(i.isBuffer(l))return l.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(l)||l instanceof ArrayBuffer))return l.byteLength;"string"!=typeof l&&(l=""+l);var e=l.length;if(0===e)return 0;for(var t=!1;;)switch(n){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return K(l).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return G(l).length;default:if(t)return K(l).length;n=(""+n).toLowerCase(),t=!0}}function m(l,n,e){var t=!1;if((void 0===n||n<0)&&(n=0),n>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if(e>>>=0,n>>>=0,e<=n)return"";for(l||(l="utf8");;)switch(l){case"hex":return O(this,n,e);case"utf8":case"utf-8":return A(this,n,e);case"ascii":return T(this,n,e);case"latin1":case"binary":return R(this,n,e);case"base64":return M(this,n,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,n,e);default:if(t)throw new TypeError("Unknown encoding: "+l);l=(l+"").toLowerCase(),t=!0}}function y(l,n,e){var t=l[n];l[n]=l[e],l[e]=t}function g(l,n,e,t,u){if(0===l.length)return-1;if("string"==typeof e?(t=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=u?0:l.length-1),e<0&&(e=l.length+e),e>=l.length){if(u)return-1;e=l.length-1}else if(e<0){if(!u)return-1;e=0}if("string"==typeof n&&(n=i.from(n,t)),i.isBuffer(n))return 0===n.length?-1:w(l,n,e,t,u);if("number"==typeof n)return n=255&n,i.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?u?Uint8Array.prototype.indexOf.call(l,n,e):Uint8Array.prototype.lastIndexOf.call(l,n,e):w(l,[n],e,t,u);throw new TypeError("val must be string, number or Buffer")}function w(l,n,e,t,u){function r(l,n){return 1===i?l[n]:l.readUInt16BE(n*i)}var i=1,o=l.length,a=n.length;if(void 0!==t&&(t=String(t).toLowerCase(),"ucs2"===t||"ucs-2"===t||"utf16le"===t||"utf-16le"===t)){if(l.length<2||n.length<2)return-1;i=2,o/=2,a/=2,e/=2}var s;if(u){var c=-1;for(s=e;so&&(e=o-a),s=e;s>=0;s--){for(var f=!0,h=0;hu&&(t=u)):t=u;var r=n.length;if(r%2!==0)throw new TypeError("Invalid hex string");t>r/2&&(t=r/2);for(var i=0;i239?4:r>223?3:r>191?2:1;if(u+o<=e){var a,s,c,f;switch(o){case 1:r<128&&(i=r);break;case 2:a=l[u+1],128===(192&a)&&(f=(31&r)<<6|63&a,f>127&&(i=f));break;case 3:a=l[u+1],s=l[u+2],128===(192&a)&&128===(192&s)&&(f=(15&r)<<12|(63&a)<<6|63&s,f>2047&&(f<55296||f>57343)&&(i=f));break;case 4:a=l[u+1],s=l[u+2],c=l[u+3],128===(192&a)&&128===(192&s)&&128===(192&c)&&(f=(15&r)<<18|(63&a)<<12|(63&s)<<6|63&c,f>65535&&f<1114112&&(i=f))}}null===i?(i=65533,o=1):i>65535&&(i-=65536,t.push(i>>>10&1023|55296),i=56320|1023&i),t.push(i),u+=o}return x(t)}function x(l){var n=l.length;if(n<=ll)return String.fromCharCode.apply(String,l);for(var e="",t=0;tt)&&(e=t);for(var u="",r=n;re)throw new RangeError("Trying to access beyond buffer length")}function B(l,n,e,t,u,r){if(!i.isBuffer(l))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>u||nl.length)throw new RangeError("Index out of range")}function U(l,n,e,t){n<0&&(n=65535+n+1);for(var u=0,r=Math.min(l.length-e,2);u>>8*(t?u:1-u)}function D(l,n,e,t){n<0&&(n=4294967295+n+1);for(var u=0,r=Math.min(l.length-e,4);u>>8*(t?u:3-u)&255}function L(l,n,e,t,u,r){if(e+t>l.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function F(l,n,e,t,u){return u||L(l,n,e,4,3.4028234663852886e38,-3.4028234663852886e38),$.write(l,n,e,t,23,4),e+4}function q(l,n,e,t,u){return u||L(l,n,e,8,1.7976931348623157e308,-1.7976931348623157e308),$.write(l,n,e,t,52,8),e+8}function z(l){if(l=V(l).replace(nl,""),l.length<2)return"";for(;l.length%4!==0;)l+="=";return l}function V(l){return l.trim?l.trim():l.replace(/^\s+|\s+$/g,"")}function H(l){return l<16?"0"+l.toString(16):l.toString(16)}function K(l,n){n=n||1/0;for(var e,t=l.length,u=null,r=[],i=0;i55295&&e<57344){if(!u){if(e>56319){(n-=3)>-1&&r.push(239,191,189);continue}if(i+1===t){(n-=3)>-1&&r.push(239,191,189);continue}u=e;continue}if(e<56320){(n-=3)>-1&&r.push(239,191,189),u=e;continue}e=(u-55296<<10|e-56320)+65536}else u&&(n-=3)>-1&&r.push(239,191,189);if(u=null,e<128){if((n-=1)<0)break;r.push(e)}else if(e<2048){if((n-=2)<0)break;r.push(e>>6|192,63&e|128)}else if(e<65536){if((n-=3)<0)break;r.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((n-=4)<0)break;r.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return r}function W(l){for(var n=[],e=0;e>8,u=e%256,r.push(u),r.push(t);return r}function G(l){return J.toByteArray(z(l))}function Z(l,n,e,t){for(var u=0;u=n.length||u>=l.length);++u)n[u+e]=l[u];return u}function X(l){return l!==l}var J=l("base64-js"),$=l("ieee754"),Q=l("isarray");e.Buffer=i,e.SlowBuffer=v,e.INSPECT_MAX_BYTES=50,i.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:t(),e.kMaxLength=u(),i.poolSize=8192,i._augment=function(l){return l.__proto__=i.prototype,l},i.from=function(l,n,e){return o(null,l,n,e)},i.TYPED_ARRAY_SUPPORT&&(i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0})),i.alloc=function(l,n,e){return s(null,l,n,e)},i.allocUnsafe=function(l){return c(null,l)},i.allocUnsafeSlow=function(l){return c(null,l)},i.isBuffer=function(l){return!(null==l||!l._isBuffer)},i.compare=function(l,n){if(!i.isBuffer(l)||!i.isBuffer(n))throw new TypeError("Arguments must be Buffers");if(l===n)return 0;for(var e=l.length,t=n.length,u=0,r=Math.min(e,t);u0&&(l=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(l+=" ... ")),""},i.prototype.compare=function(l,n,e,t,u){if(!i.isBuffer(l))throw new TypeError("Argument must be a Buffer");if(void 0===n&&(n=0),void 0===e&&(e=l?l.length:0),void 0===t&&(t=0),void 0===u&&(u=this.length),n<0||e>l.length||t<0||u>this.length)throw new RangeError("out of range index");if(t>=u&&n>=e)return 0;if(t>=u)return-1;if(n>=e)return 1;if(n>>>=0,e>>>=0,t>>>=0,u>>>=0,this===l)return 0;for(var r=u-t,o=e-n,a=Math.min(r,o),s=this.slice(t,u),c=l.slice(n,e),f=0;fu)&&(e=u),l.length>0&&(e<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");t||(t="utf8");for(var r=!1;;)switch(t){case"hex":return k(this,l,n,e);case"utf8":case"utf-8":return S(this,l,n,e);case"ascii":return E(this,l,n,e);case"latin1":case"binary":return I(this,l,n,e);case"base64":return C(this,l,n,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,l,n,e);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(""+t).toLowerCase(),r=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ll=4096;i.prototype.slice=function(l,n){var e=this.length;l=~~l,n=void 0===n?e:~~n,l<0?(l+=e,l<0&&(l=0)):l>e&&(l=e),n<0?(n+=e,n<0&&(n=0)):n>e&&(n=e),n0&&(u*=256);)t+=this[l+--n]*u;return t},i.prototype.readUInt8=function(l,n){return n||N(l,1,this.length),this[l]},i.prototype.readUInt16LE=function(l,n){return n||N(l,2,this.length),this[l]|this[l+1]<<8},i.prototype.readUInt16BE=function(l,n){return n||N(l,2,this.length),this[l]<<8|this[l+1]},i.prototype.readUInt32LE=function(l,n){return n||N(l,4,this.length),(this[l]|this[l+1]<<8|this[l+2]<<16)+16777216*this[l+3]},i.prototype.readUInt32BE=function(l,n){return n||N(l,4,this.length),16777216*this[l]+(this[l+1]<<16|this[l+2]<<8|this[l+3])},i.prototype.readIntLE=function(l,n,e){l=0|l,n=0|n,e||N(l,n,this.length);for(var t=this[l],u=1,r=0;++r=u&&(t-=Math.pow(2,8*n)),t},i.prototype.readIntBE=function(l,n,e){l=0|l,n=0|n,e||N(l,n,this.length);for(var t=n,u=1,r=this[l+--t];t>0&&(u*=256);)r+=this[l+--t]*u;return u*=128,r>=u&&(r-=Math.pow(2,8*n)),r},i.prototype.readInt8=function(l,n){return n||N(l,1,this.length),128&this[l]?(255-this[l]+1)*-1:this[l]},i.prototype.readInt16LE=function(l,n){n||N(l,2,this.length);var e=this[l]|this[l+1]<<8;return 32768&e?4294901760|e:e},i.prototype.readInt16BE=function(l,n){n||N(l,2,this.length);var e=this[l+1]|this[l]<<8;return 32768&e?4294901760|e:e},i.prototype.readInt32LE=function(l,n){return n||N(l,4,this.length),this[l]|this[l+1]<<8|this[l+2]<<16|this[l+3]<<24},i.prototype.readInt32BE=function(l,n){return n||N(l,4,this.length),this[l]<<24|this[l+1]<<16|this[l+2]<<8|this[l+3]},i.prototype.readFloatLE=function(l,n){return n||N(l,4,this.length),$.read(this,l,!0,23,4)},i.prototype.readFloatBE=function(l,n){return n||N(l,4,this.length),$.read(this,l,!1,23,4)},i.prototype.readDoubleLE=function(l,n){return n||N(l,8,this.length),$.read(this,l,!0,52,8)},i.prototype.readDoubleBE=function(l,n){return n||N(l,8,this.length),$.read(this,l,!1,52,8)},i.prototype.writeUIntLE=function(l,n,e,t){if(l=+l,n=0|n,e=0|e,!t){var u=Math.pow(2,8*e)-1;B(this,l,n,e,u,0)}var r=1,i=0;for(this[n]=255&l;++i=0&&(i*=256);)this[n+r]=l/i&255;return n+e},i.prototype.writeUInt8=function(l,n,e){return l=+l,n=0|n,e||B(this,l,n,1,255,0),i.TYPED_ARRAY_SUPPORT||(l=Math.floor(l)),this[n]=255&l,n+1},i.prototype.writeUInt16LE=function(l,n,e){return l=+l,n=0|n,e||B(this,l,n,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[n]=255&l,this[n+1]=l>>>8):U(this,l,n,!0),n+2},i.prototype.writeUInt16BE=function(l,n,e){return l=+l,n=0|n,e||B(this,l,n,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[n]=l>>>8,this[n+1]=255&l):U(this,l,n,!1),n+2},i.prototype.writeUInt32LE=function(l,n,e){return l=+l,n=0|n,e||B(this,l,n,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[n+3]=l>>>24,this[n+2]=l>>>16,this[n+1]=l>>>8,this[n]=255&l):D(this,l,n,!0),n+4},i.prototype.writeUInt32BE=function(l,n,e){return l=+l,n=0|n,e||B(this,l,n,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[n]=l>>>24,this[n+1]=l>>>16,this[n+2]=l>>>8,this[n+3]=255&l):D(this,l,n,!1),n+4},i.prototype.writeIntLE=function(l,n,e,t){if(l=+l,n=0|n,!t){var u=Math.pow(2,8*e-1);B(this,l,n,e,u-1,-u)}var r=0,i=1,o=0;for(this[n]=255&l;++r>0)-o&255;return n+e},i.prototype.writeIntBE=function(l,n,e,t){if(l=+l,n=0|n,!t){var u=Math.pow(2,8*e-1);B(this,l,n,e,u-1,-u)}var r=e-1,i=1,o=0;for(this[n+r]=255&l;--r>=0&&(i*=256);)l<0&&0===o&&0!==this[n+r+1]&&(o=1),this[n+r]=(l/i>>0)-o&255;return n+e},i.prototype.writeInt8=function(l,n,e){return l=+l,n=0|n,e||B(this,l,n,1,127,-128),i.TYPED_ARRAY_SUPPORT||(l=Math.floor(l)),l<0&&(l=255+l+1),this[n]=255&l,n+1},i.prototype.writeInt16LE=function(l,n,e){return l=+l,n=0|n,e||B(this,l,n,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[n]=255&l,this[n+1]=l>>>8):U(this,l,n,!0),n+2},i.prototype.writeInt16BE=function(l,n,e){return l=+l,n=0|n,e||B(this,l,n,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[n]=l>>>8,this[n+1]=255&l):U(this,l,n,!1),n+2},i.prototype.writeInt32LE=function(l,n,e){return l=+l,n=0|n,e||B(this,l,n,4,2147483647,-2147483648),i.TYPED_ARRAY_SUPPORT?(this[n]=255&l,this[n+1]=l>>>8,this[n+2]=l>>>16,this[n+3]=l>>>24):D(this,l,n,!0),n+4},i.prototype.writeInt32BE=function(l,n,e){return l=+l,n=0|n,e||B(this,l,n,4,2147483647,-2147483648),l<0&&(l=4294967295+l+1),i.TYPED_ARRAY_SUPPORT?(this[n]=l>>>24,this[n+1]=l>>>16,this[n+2]=l>>>8,this[n+3]=255&l):D(this,l,n,!1),n+4},i.prototype.writeFloatLE=function(l,n,e){return F(this,l,n,!0,e)},i.prototype.writeFloatBE=function(l,n,e){return F(this,l,n,!1,e)},i.prototype.writeDoubleLE=function(l,n,e){return q(this,l,n,!0,e)},i.prototype.writeDoubleBE=function(l,n,e){return q(this,l,n,!1,e)},i.prototype.copy=function(l,n,e,t){if(e||(e=0),t||0===t||(t=this.length),n>=l.length&&(n=l.length),n||(n=0),t>0&&t=this.length)throw new RangeError("sourceStart out of bounds");if(t<0)throw new RangeError("sourceEnd out of bounds");t>this.length&&(t=this.length),l.length-n=0;--u)l[u+n]=this[u+e];else if(r<1e3||!i.TYPED_ARRAY_SUPPORT)for(u=0;u>>=0,e=void 0===e?this.length:e>>>0,l||(l=0);var r;if("number"==typeof l)for(r=n;rc;)if(o=a[c++],o!=o)return!0}else for(;s>c;c++)if((l||c in a)&&a[c]===e)return l||c||0;return!l&&-1}}},{"./_to-absolute-index":171,"./_to-iobject":173,"./_to-length":174}],103:[function(l,n,e){var t=l("./_ctx"),u=l("./_iobject"),r=l("./_to-object"),i=l("./_to-length"),o=l("./_array-species-create");n.exports=function(l,n){var e=1==l,a=2==l,s=3==l,c=4==l,f=6==l,h=5==l||f,d=n||o;return function(n,o,p){for(var b,v,_=r(n),m=u(_),y=t(o,p,3),g=i(m.length),w=0,k=e?d(n,g):a?d(n,0):void 0;g>w;w++)if((h||w in m)&&(b=m[w],v=y(b,w,_),l))if(e)k[w]=v;else if(v)switch(l){case 3:return!0;case 5:return b;case 6:return w;case 2:k.push(b)}else if(c)return!1;return f?-1:s||c?c:k}}},{"./_array-species-create":105,"./_ctx":113,"./_iobject":128,"./_to-length":174,"./_to-object":175}],104:[function(l,n,e){var t=l("./_is-object"),u=l("./_is-array"),r=l("./_wks")("species");n.exports=function(l){var n;return u(l)&&(n=l.constructor,"function"!=typeof n||n!==Array&&!u(n.prototype)||(n=void 0),t(n)&&(n=n[r],null===n&&(n=void 0))),void 0===n?Array:n}},{"./_is-array":130,"./_is-object":132,"./_wks":182}],105:[function(l,n,e){var t=l("./_array-species-constructor");n.exports=function(l,n){return new(t(l))(n)}},{"./_array-species-constructor":104}],106:[function(l,n,e){var t=l("./_cof"),u=l("./_wks")("toStringTag"),r="Arguments"==t(function(){return arguments}()),i=function(l,n){try{return l[n]}catch(e){}};n.exports=function(l){var n,e,o;return void 0===l?"Undefined":null===l?"Null":"string"==typeof(e=i(n=Object(l),u))?e:r?t(n):"Object"==(o=t(n))&&"function"==typeof n.callee?"Arguments":o}},{"./_cof":107,"./_wks":182}],107:[function(l,n,e){var t={}.toString;n.exports=function(l){return t.call(l).slice(8,-1)}},{}],108:[function(l,n,e){"use strict";var t=l("./_object-dp").f,u=l("./_object-create"),r=l("./_redefine-all"),i=l("./_ctx"),o=l("./_an-instance"),a=l("./_for-of"),s=l("./_iter-define"),c=l("./_iter-step"),f=l("./_set-species"),h=l("./_descriptors"),d=l("./_meta").fastKey,p=l("./_validate-collection"),b=h?"_s":"size",v=function(l,n){var e,t=d(n);if("F"!==t)return l._i[t];for(e=l._f;e;e=e.n)if(e.k==n)return e};n.exports={getConstructor:function(l,n,e,s){var c=l(function(l,t){o(l,c,n,"_i"),l._t=n,l._i=u(null),l._f=void 0,l._l=void 0,l[b]=0,void 0!=t&&a(t,e,l[s],l)});return r(c.prototype,{clear:function(){for(var l=p(this,n),e=l._i,t=l._f;t;t=t.n)t.r=!0,t.p&&(t.p=t.p.n=void 0),delete e[t.i];l._f=l._l=void 0,l[b]=0},"delete":function(l){var e=p(this,n),t=v(e,l);if(t){var u=t.n,r=t.p;delete e._i[t.i],t.r=!0,r&&(r.n=u),u&&(u.p=r),e._f==t&&(e._f=u),e._l==t&&(e._l=r),e[b]--}return!!t},forEach:function(l){p(this,n);for(var e,t=i(l,arguments.length>1?arguments[1]:void 0,3);e=e?e.n:this._f;)for(t(e.v,e.k,this);e&&e.r;)e=e.p},has:function(l){return!!v(p(this,n),l)}}),h&&t(c.prototype,"size",{get:function(){return p(this,n)[b]}}),c},def:function(l,n,e){var t,u,r=v(l,n);return r?r.v=e:(l._l=r={i:u=d(n,!0),k:n,v:e,p:t=l._l,n:void 0,r:!1},l._f||(l._f=r),t&&(t.n=r),l[b]++,"F"!==u&&(l._i[u]=r)),l},getEntry:v,setStrong:function(l,n,e){s(l,n,function(l,e){this._t=p(l,n),this._k=e,this._l=void 0},function(){for(var l=this,n=l._k,e=l._l;e&&e.r;)e=e.p;return l._t&&(l._l=e=e?e.n:l._t._f)?"keys"==n?c(0,e.k):"values"==n?c(0,e.v):c(0,[e.k,e.v]):(l._t=void 0,c(1))},e?"entries":"values",!e,!0),f(n)}}},{"./_an-instance":99,"./_ctx":113,"./_descriptors":115,"./_for-of":121,"./_iter-define":135,"./_iter-step":137,"./_meta":140,"./_object-create":144,"./_object-dp":145,"./_redefine-all":159,"./_set-species":164,"./_validate-collection":179}],109:[function(l,n,e){var t=l("./_classof"),u=l("./_array-from-iterable");n.exports=function(l){return function(){if(t(this)!=l)throw TypeError(l+"#toJSON isn't generic");return u(this)}}},{"./_array-from-iterable":101,"./_classof":106}],110:[function(l,n,e){"use strict";var t=l("./_global"),u=l("./_export"),r=l("./_meta"),i=l("./_fails"),o=l("./_hide"),a=l("./_redefine-all"),s=l("./_for-of"),c=l("./_an-instance"),f=l("./_is-object"),h=l("./_set-to-string-tag"),d=l("./_object-dp").f,p=l("./_array-methods")(0),b=l("./_descriptors");n.exports=function(l,n,e,v,_,m){var y=t[l],g=y,w=_?"set":"add",k=g&&g.prototype,S={};return b&&"function"==typeof g&&(m||k.forEach&&!i(function(){(new g).entries().next()}))?(g=n(function(n,e){c(n,g,l,"_c"),n._c=new y,void 0!=e&&s(e,_,n[w],n)}),p("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(l){var n="add"==l||"set"==l;l in k&&(!m||"clear"!=l)&&o(g.prototype,l,function(e,t){if(c(this,g,l),!n&&m&&!f(e))return"get"==l&&void 0;var u=this._c[l](0===e?0:e,t);return n?this:u})}),m||d(g.prototype,"size",{get:function(){return this._c.size}})):(g=v.getConstructor(n,l,_,w),a(g.prototype,e),r.NEED=!0),h(g,l),S[l]=g,u(u.G+u.W+u.F,S),m||v.setStrong(g,l,_),g}},{"./_an-instance":99,"./_array-methods":103,"./_descriptors":115,"./_export":119,"./_fails":120,"./_for-of":121,"./_global":122,"./_hide":124,"./_is-object":132,"./_meta":140,"./_object-dp":145,"./_redefine-all":159,"./_set-to-string-tag":165}],111:[function(l,n,e){var t=n.exports={version:"2.5.7"};"number"==typeof __e&&(__e=t)},{}],112:[function(l,n,e){"use strict";var t=l("./_object-dp"),u=l("./_property-desc");n.exports=function(l,n,e){n in l?t.f(l,n,u(0,e)):l[n]=e}},{"./_object-dp":145,"./_property-desc":158}],113:[function(l,n,e){var t=l("./_a-function");n.exports=function(l,n,e){if(t(l),void 0===n)return l;switch(e){case 1:return function(e){return l.call(n,e)};case 2:return function(e,t){return l.call(n,e,t)};case 3:return function(e,t,u){return l.call(n,e,t,u)}}return function(){return l.apply(n,arguments)}}},{"./_a-function":97}],114:[function(l,n,e){n.exports=function(l){if(void 0==l)throw TypeError("Can't call method on "+l);return l}},{}],115:[function(l,n,e){n.exports=!l("./_fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{"./_fails":120}],116:[function(l,n,e){var t=l("./_is-object"),u=l("./_global").document,r=t(u)&&t(u.createElement);n.exports=function(l){return r?u.createElement(l):{}}},{"./_global":122,"./_is-object":132}],117:[function(l,n,e){n.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],118:[function(l,n,e){var t=l("./_object-keys"),u=l("./_object-gops"),r=l("./_object-pie");n.exports=function(l){var n=t(l),e=u.f;if(e)for(var i,o=e(l),a=r.f,s=0;o.length>s;)a.call(l,i=o[s++])&&n.push(i);return n}},{"./_object-gops":150,"./_object-keys":153,"./_object-pie":154}],119:[function(l,n,e){var t=l("./_global"),u=l("./_core"),r=l("./_ctx"),i=l("./_hide"),o=l("./_has"),a="prototype",s=function(l,n,e){var c,f,h,d=l&s.F,p=l&s.G,b=l&s.S,v=l&s.P,_=l&s.B,m=l&s.W,y=p?u:u[n]||(u[n]={}),g=y[a],w=p?t:b?t[n]:(t[n]||{})[a];p&&(e=n);for(c in e)f=!d&&w&&void 0!==w[c],f&&o(y,c)||(h=f?w[c]:e[c],y[c]=p&&"function"!=typeof w[c]?e[c]:_&&f?r(h,t):m&&w[c]==h?function(l){var n=function(n,e,t){if(this instanceof l){switch(arguments.length){case 0:return new l;case 1:return new l(n);case 2:return new l(n,e)}return new l(n,e,t)}return l.apply(this,arguments)};return n[a]=l[a],n}(h):v&&"function"==typeof h?r(Function.call,h):h,v&&((y.virtual||(y.virtual={}))[c]=h,l&s.R&&g&&!g[c]&&i(g,c,h)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,n.exports=s},{"./_core":111,"./_ctx":113,"./_global":122,"./_has":123,"./_hide":124}],120:[function(l,n,e){n.exports=function(l){try{return!!l()}catch(n){return!0}}},{}],121:[function(l,n,e){var t=l("./_ctx"),u=l("./_iter-call"),r=l("./_is-array-iter"),i=l("./_an-object"),o=l("./_to-length"),a=l("./core.get-iterator-method"),s={},c={},e=n.exports=function(l,n,e,f,h){var d,p,b,v,_=h?function(){return l}:a(l),m=t(e,f,n?2:1),y=0;if("function"!=typeof _)throw TypeError(l+" is not iterable!");if(r(_)){for(d=o(l.length);d>y;y++)if(v=n?m(i(p=l[y])[0],p[1]):m(l[y]),v===s||v===c)return v}else for(b=_.call(l);!(p=b.next()).done;)if(v=u(b,m,p.value,n),v===s||v===c)return v};e.BREAK=s,e.RETURN=c},{"./_an-object":100,"./_ctx":113,"./_is-array-iter":129,"./_iter-call":133,"./_to-length":174,"./core.get-iterator-method":183}],122:[function(l,n,e){var t=n.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)},{}],123:[function(l,n,e){var t={}.hasOwnProperty;n.exports=function(l,n){return t.call(l,n)}},{}],124:[function(l,n,e){var t=l("./_object-dp"),u=l("./_property-desc");n.exports=l("./_descriptors")?function(l,n,e){return t.f(l,n,u(1,e))}:function(l,n,e){return l[n]=e,l}},{"./_descriptors":115,"./_object-dp":145,"./_property-desc":158}],125:[function(l,n,e){var t=l("./_global").document;n.exports=t&&t.documentElement},{"./_global":122}],126:[function(l,n,e){n.exports=!l("./_descriptors")&&!l("./_fails")(function(){return 7!=Object.defineProperty(l("./_dom-create")("div"),"a",{get:function(){return 7}}).a})},{"./_descriptors":115,"./_dom-create":116,"./_fails":120}],127:[function(l,n,e){n.exports=function(l,n,e){var t=void 0===e;switch(n.length){case 0:return t?l():l.call(e);case 1:return t?l(n[0]):l.call(e,n[0]);case 2:return t?l(n[0],n[1]):l.call(e,n[0],n[1]);case 3:return t?l(n[0],n[1],n[2]):l.call(e,n[0],n[1],n[2]);case 4:return t?l(n[0],n[1],n[2],n[3]):l.call(e,n[0],n[1],n[2],n[3])}return l.apply(e,n)}},{}],128:[function(l,n,e){var t=l("./_cof");n.exports=Object("z").propertyIsEnumerable(0)?Object:function(l){return"String"==t(l)?l.split(""):Object(l)}},{"./_cof":107}],129:[function(l,n,e){var t=l("./_iterators"),u=l("./_wks")("iterator"),r=Array.prototype;n.exports=function(l){return void 0!==l&&(t.Array===l||r[u]===l)}},{"./_iterators":138,"./_wks":182}],130:[function(l,n,e){var t=l("./_cof");n.exports=Array.isArray||function(l){return"Array"==t(l)}},{"./_cof":107}],131:[function(l,n,e){var t=l("./_is-object"),u=Math.floor;n.exports=function(l){return!t(l)&&isFinite(l)&&u(l)===l}},{"./_is-object":132}],132:[function(l,n,e){n.exports=function(l){return"object"==typeof l?null!==l:"function"==typeof l}},{}],133:[function(l,n,e){var t=l("./_an-object");n.exports=function(l,n,e,u){try{return u?n(t(e)[0],e[1]):n(e)}catch(r){var i=l["return"];throw void 0!==i&&t(i.call(l)),r}}},{"./_an-object":100}],134:[function(l,n,e){"use strict";var t=l("./_object-create"),u=l("./_property-desc"),r=l("./_set-to-string-tag"),i={};l("./_hide")(i,l("./_wks")("iterator"),function(){return this}),n.exports=function(l,n,e){l.prototype=t(i,{next:u(1,e)}),r(l,n+" Iterator")}},{"./_hide":124,"./_object-create":144,"./_property-desc":158,"./_set-to-string-tag":165,"./_wks":182}],135:[function(l,n,e){"use strict";var t=l("./_library"),u=l("./_export"),r=l("./_redefine"),i=l("./_hide"),o=l("./_iterators"),a=l("./_iter-create"),s=l("./_set-to-string-tag"),c=l("./_object-gpo"),f=l("./_wks")("iterator"),h=!([].keys&&"next"in[].keys()),d="@@iterator",p="keys",b="values",v=function(){return this};n.exports=function(l,n,e,_,m,y,g){a(e,n,_);var w,k,S,E=function(l){if(!h&&l in M)return M[l];switch(l){case p:return function(){return new e(this,l)};case b:return function(){return new e(this,l)}}return function(){return new e(this,l)}},I=n+" Iterator",C=m==b,j=!1,M=l.prototype,A=M[f]||M[d]||m&&M[m],x=A||E(m),T=m?C?E("entries"):x:void 0,R="Array"==n?M.entries||A:A;if(R&&(S=c(R.call(new l)),S!==Object.prototype&&S.next&&(s(S,I,!0),t||"function"==typeof S[f]||i(S,f,v))),C&&A&&A.name!==b&&(j=!0,x=function(){return A.call(this)}),t&&!g||!h&&!j&&M[f]||i(M,f,x),o[n]=x,o[I]=v,m)if(w={values:C?x:E(b),keys:y?x:E(p),entries:T},g)for(k in w)k in M||r(M,k,w[k]);else u(u.P+u.F*(h||j),n,w);return w}},{"./_export":119,"./_hide":124,"./_iter-create":134,"./_iterators":138,"./_library":139,"./_object-gpo":151,"./_redefine":160,"./_set-to-string-tag":165,"./_wks":182}],136:[function(l,n,e){var t=l("./_wks")("iterator"),u=!1;try{var r=[7][t]();r["return"]=function(){u=!0},Array.from(r,function(){throw 2})}catch(i){}n.exports=function(l,n){if(!n&&!u)return!1;var e=!1;try{var r=[7],i=r[t]();i.next=function(){return{done:e=!0}},r[t]=function(){return i},l(r)}catch(o){}return e}},{"./_wks":182}],137:[function(l,n,e){n.exports=function(l,n){return{value:n,done:!!l}}},{}],138:[function(l,n,e){n.exports={}},{}],139:[function(l,n,e){n.exports=!0},{}],140:[function(l,n,e){var t=l("./_uid")("meta"),u=l("./_is-object"),r=l("./_has"),i=l("./_object-dp").f,o=0,a=Object.isExtensible||function(){return!0},s=!l("./_fails")(function(){return a(Object.preventExtensions({}))}),c=function(l){i(l,t,{value:{i:"O"+ ++o,w:{}}})},f=function(l,n){if(!u(l))return"symbol"==typeof l?l:("string"==typeof l?"S":"P")+l;if(!r(l,t)){if(!a(l))return"F";if(!n)return"E";c(l)}return l[t].i},h=function(l,n){if(!r(l,t)){if(!a(l))return!0;if(!n)return!1;c(l)}return l[t].w},d=function(l){return s&&p.NEED&&a(l)&&!r(l,t)&&c(l),l},p=n.exports={KEY:t,NEED:!1,fastKey:f,getWeak:h,onFreeze:d}},{"./_fails":120,"./_has":123,"./_is-object":132,"./_object-dp":145,"./_uid":177}],141:[function(l,n,e){var t=l("./_global"),u=l("./_task").set,r=t.MutationObserver||t.WebKitMutationObserver,i=t.process,o=t.Promise,a="process"==l("./_cof")(i);n.exports=function(){var l,n,e,s=function(){var t,u;for(a&&(t=i.domain)&&t.exit();l;){u=l.fn,l=l.next;try{u()}catch(r){throw l?e():n=void 0,r}}n=void 0,t&&t.enter()};if(a)e=function(){i.nextTick(s)};else if(!r||t.navigator&&t.navigator.standalone)if(o&&o.resolve){var c=o.resolve(void 0);e=function(){c.then(s)}}else e=function(){u.call(t,s)};else{var f=!0,h=document.createTextNode("");new r(s).observe(h,{characterData:!0}),e=function(){h.data=f=!f}}return function(t){var u={fn:t,next:void 0};n&&(n.next=u),l||(l=u,e()),n=u}}},{"./_cof":107,"./_global":122,"./_task":170}],142:[function(l,n,e){"use strict";function t(l){var n,e;this.promise=new l(function(l,t){if(void 0!==n||void 0!==e)throw TypeError("Bad Promise constructor");n=l,e=t}),this.resolve=u(n),this.reject=u(e)}var u=l("./_a-function");n.exports.f=function(l){return new t(l)}},{"./_a-function":97}],143:[function(l,n,e){"use strict";var t=l("./_object-keys"),u=l("./_object-gops"),r=l("./_object-pie"),i=l("./_to-object"),o=l("./_iobject"),a=Object.assign;n.exports=!a||l("./_fails")(function(){var l={},n={},e=Symbol(),t="abcdefghijklmnopqrst";return l[e]=7,t.split("").forEach(function(l){n[l]=l}),7!=a({},l)[e]||Object.keys(a({},n)).join("")!=t})?function(l,n){for(var e=i(l),a=arguments.length,s=1,c=u.f,f=r.f;a>s;)for(var h,d=o(arguments[s++]),p=c?t(d).concat(c(d)):t(d),b=p.length,v=0;b>v;)f.call(d,h=p[v++])&&(e[h]=d[h]);return e}:a},{"./_fails":120,"./_iobject":128,"./_object-gops":150,"./_object-keys":153,"./_object-pie":154,"./_to-object":175}],144:[function(l,n,e){var t=l("./_an-object"),u=l("./_object-dps"),r=l("./_enum-bug-keys"),i=l("./_shared-key")("IE_PROTO"),o=function(){},a="prototype",s=function(){var n,e=l("./_dom-create")("iframe"),t=r.length,u="<",i=">";for(e.style.display="none",l("./_html").appendChild(e),e.src="javascript:",n=e.contentWindow.document,n.open(),n.write(u+"script"+i+"document.F=Object"+u+"/script"+i),n.close(),s=n.F;t--;)delete s[a][r[t]];return s()};n.exports=Object.create||function(l,n){var e;return null!==l?(o[a]=t(l),e=new o,o[a]=null,e[i]=l):e=s(),void 0===n?e:u(e,n)}},{"./_an-object":100,"./_dom-create":116,"./_enum-bug-keys":117,"./_html":125,"./_object-dps":146,"./_shared-key":166}],145:[function(l,n,e){var t=l("./_an-object"),u=l("./_ie8-dom-define"),r=l("./_to-primitive"),i=Object.defineProperty;e.f=l("./_descriptors")?Object.defineProperty:function(l,n,e){if(t(l),n=r(n,!0),t(e),u)try{return i(l,n,e)}catch(o){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(l[n]=e.value),l}},{"./_an-object":100,"./_descriptors":115,"./_ie8-dom-define":126,"./_to-primitive":176}],146:[function(l,n,e){var t=l("./_object-dp"),u=l("./_an-object"),r=l("./_object-keys");n.exports=l("./_descriptors")?Object.defineProperties:function(l,n){u(l);for(var e,i=r(n),o=i.length,a=0;o>a;)t.f(l,e=i[a++],n[e]);return l}},{"./_an-object":100,"./_descriptors":115,"./_object-dp":145,"./_object-keys":153}],147:[function(l,n,e){var t=l("./_object-pie"),u=l("./_property-desc"),r=l("./_to-iobject"),i=l("./_to-primitive"),o=l("./_has"),a=l("./_ie8-dom-define"),s=Object.getOwnPropertyDescriptor;e.f=l("./_descriptors")?s:function(l,n){if(l=r(l),n=i(n,!0),a)try{return s(l,n)}catch(e){}if(o(l,n))return u(!t.f.call(l,n),l[n])}},{"./_descriptors":115,"./_has":123,"./_ie8-dom-define":126,"./_object-pie":154,"./_property-desc":158,"./_to-iobject":173,"./_to-primitive":176}],148:[function(l,n,e){var t=l("./_to-iobject"),u=l("./_object-gopn").f,r={}.toString,i="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],o=function(l){try{return u(l)}catch(n){return i.slice()}};n.exports.f=function(l){return i&&"[object Window]"==r.call(l)?o(l):u(t(l))}},{"./_object-gopn":149,"./_to-iobject":173}],149:[function(l,n,e){var t=l("./_object-keys-internal"),u=l("./_enum-bug-keys").concat("length","prototype");e.f=Object.getOwnPropertyNames||function(l){return t(l,u)}},{"./_enum-bug-keys":117,"./_object-keys-internal":152}],150:[function(l,n,e){e.f=Object.getOwnPropertySymbols},{}],151:[function(l,n,e){var t=l("./_has"),u=l("./_to-object"),r=l("./_shared-key")("IE_PROTO"),i=Object.prototype;n.exports=Object.getPrototypeOf||function(l){return l=u(l),t(l,r)?l[r]:"function"==typeof l.constructor&&l instanceof l.constructor?l.constructor.prototype:l instanceof Object?i:null}},{"./_has":123,"./_shared-key":166,"./_to-object":175}],152:[function(l,n,e){var t=l("./_has"),u=l("./_to-iobject"),r=l("./_array-includes")(!1),i=l("./_shared-key")("IE_PROTO");n.exports=function(l,n){var e,o=u(l),a=0,s=[];for(e in o)e!=i&&t(o,e)&&s.push(e);for(;n.length>a;)t(o,e=n[a++])&&(~r(s,e)||s.push(e));return s}},{"./_array-includes":102,"./_has":123,"./_shared-key":166,"./_to-iobject":173}],153:[function(l,n,e){var t=l("./_object-keys-internal"),u=l("./_enum-bug-keys");n.exports=Object.keys||function(l){return t(l,u)}},{"./_enum-bug-keys":117,"./_object-keys-internal":152}],154:[function(l,n,e){e.f={}.propertyIsEnumerable},{}],155:[function(l,n,e){var t=l("./_export"),u=l("./_core"),r=l("./_fails");n.exports=function(l,n){var e=(u.Object||{})[l]||Object[l],i={};i[l]=n(e),t(t.S+t.F*r(function(){e(1)}),"Object",i)}},{"./_core":111,"./_export":119,"./_fails":120}],156:[function(l,n,e){n.exports=function(l){try{return{e:!1,v:l()}}catch(n){return{e:!0,v:n}}}},{}],157:[function(l,n,e){var t=l("./_an-object"),u=l("./_is-object"),r=l("./_new-promise-capability");n.exports=function(l,n){if(t(l),u(n)&&n.constructor===l)return n;var e=r.f(l),i=e.resolve;return i(n),e.promise}},{"./_an-object":100,"./_is-object":132,"./_new-promise-capability":142}],158:[function(l,n,e){n.exports=function(l,n){return{enumerable:!(1&l),configurable:!(2&l),writable:!(4&l),value:n}}},{}],159:[function(l,n,e){var t=l("./_hide");n.exports=function(l,n,e){for(var u in n)e&&l[u]?l[u]=n[u]:t(l,u,n[u]);return l}},{"./_hide":124}],160:[function(l,n,e){n.exports=l("./_hide")},{"./_hide":124}],161:[function(l,n,e){"use strict";var t=l("./_export"),u=l("./_a-function"),r=l("./_ctx"),i=l("./_for-of");n.exports=function(l){t(t.S,l,{from:function(l){var n,e,t,o,a=arguments[1];return u(this),n=void 0!==a,n&&u(a),void 0==l?new this:(e=[],n?(t=0,o=r(a,arguments[2],2),i(l,!1,function(l){e.push(o(l,t++))})):i(l,!1,e.push,e),new this(e))}})}},{"./_a-function":97,"./_ctx":113,"./_export":119,"./_for-of":121}],162:[function(l,n,e){"use strict";var t=l("./_export");n.exports=function(l){t(t.S,l,{of:function(){for(var l=arguments.length,n=new Array(l);l--;)n[l]=arguments[l];return new this(n)}})}},{"./_export":119}],163:[function(l,n,e){var t=l("./_is-object"),u=l("./_an-object"),r=function(l,n){if(u(l),!t(n)&&null!==n)throw TypeError(n+": can't set as prototype!")};n.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(n,e,t){try{t=l("./_ctx")(Function.call,l("./_object-gopd").f(Object.prototype,"__proto__").set,2),t(n,[]),e=!(n instanceof Array)}catch(u){e=!0}return function(l,n){return r(l,n),e?l.__proto__=n:t(l,n),l}}({},!1):void 0),check:r}},{"./_an-object":100,"./_ctx":113,"./_is-object":132,"./_object-gopd":147}],164:[function(l,n,e){"use strict";var t=l("./_global"),u=l("./_core"),r=l("./_object-dp"),i=l("./_descriptors"),o=l("./_wks")("species");n.exports=function(l){var n="function"==typeof u[l]?u[l]:t[l];i&&n&&!n[o]&&r.f(n,o,{configurable:!0,get:function(){return this}})}},{"./_core":111,"./_descriptors":115,"./_global":122,"./_object-dp":145,"./_wks":182}],165:[function(l,n,e){var t=l("./_object-dp").f,u=l("./_has"),r=l("./_wks")("toStringTag");n.exports=function(l,n,e){l&&!u(l=e?l:l.prototype,r)&&t(l,r,{configurable:!0,value:n})}},{"./_has":123,"./_object-dp":145,"./_wks":182}],166:[function(l,n,e){var t=l("./_shared")("keys"),u=l("./_uid");n.exports=function(l){return t[l]||(t[l]=u(l))}},{"./_shared":167,"./_uid":177}],167:[function(l,n,e){var t=l("./_core"),u=l("./_global"),r="__core-js_shared__",i=u[r]||(u[r]={});(n.exports=function(l,n){return i[l]||(i[l]=void 0!==n?n:{})})("versions",[]).push({version:t.version,mode:l("./_library")?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},{"./_core":111,"./_global":122,"./_library":139}],168:[function(l,n,e){var t=l("./_an-object"),u=l("./_a-function"),r=l("./_wks")("species");n.exports=function(l,n){var e,i=t(l).constructor;return void 0===i||void 0==(e=t(i)[r])?n:u(e)}},{"./_a-function":97,"./_an-object":100,"./_wks":182}],169:[function(l,n,e){var t=l("./_to-integer"),u=l("./_defined");n.exports=function(l){return function(n,e){var r,i,o=String(u(n)),a=t(e),s=o.length;return a<0||a>=s?l?"":void 0:(r=o.charCodeAt(a),r<55296||r>56319||a+1===s||(i=o.charCodeAt(a+1))<56320||i>57343?l?o.charAt(a):r:l?o.slice(a,a+2):(r-55296<<10)+(i-56320)+65536)}}},{"./_defined":114,"./_to-integer":172}],170:[function(l,n,e){var t,u,r,i=l("./_ctx"),o=l("./_invoke"),a=l("./_html"),s=l("./_dom-create"),c=l("./_global"),f=c.process,h=c.setImmediate,d=c.clearImmediate,p=c.MessageChannel,b=c.Dispatch,v=0,_={},m="onreadystatechange",y=function(){var l=+this;if(_.hasOwnProperty(l)){var n=_[l];delete _[l],n()}},g=function(l){y.call(l.data)};h&&d||(h=function(l){for(var n=[],e=1;arguments.length>e;)n.push(arguments[e++]);return _[++v]=function(){o("function"==typeof l?l:Function(l),n)},t(v),v},d=function(l){delete _[l]},"process"==l("./_cof")(f)?t=function(l){f.nextTick(i(y,l,1))}:b&&b.now?t=function(l){b.now(i(y,l,1))}:p?(u=new p,r=u.port2,u.port1.onmessage=g,t=i(r.postMessage,r,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(t=function(l){c.postMessage(l+"","*")},c.addEventListener("message",g,!1)):t=m in s("script")?function(l){a.appendChild(s("script"))[m]=function(){a.removeChild(this),y.call(l)}}:function(l){setTimeout(i(y,l,1),0)}),n.exports={set:h,clear:d}},{"./_cof":107,"./_ctx":113,"./_dom-create":116,"./_global":122,"./_html":125,"./_invoke":127}],171:[function(l,n,e){var t=l("./_to-integer"),u=Math.max,r=Math.min;n.exports=function(l,n){return l=t(l),l<0?u(l+n,0):r(l,n)}},{"./_to-integer":172}],172:[function(l,n,e){var t=Math.ceil,u=Math.floor;n.exports=function(l){return isNaN(l=+l)?0:(l>0?u:t)(l)}},{}],173:[function(l,n,e){var t=l("./_iobject"),u=l("./_defined");n.exports=function(l){return t(u(l))}},{"./_defined":114,"./_iobject":128}],174:[function(l,n,e){var t=l("./_to-integer"),u=Math.min;n.exports=function(l){return l>0?u(t(l),9007199254740991):0}},{"./_to-integer":172}],175:[function(l,n,e){var t=l("./_defined");n.exports=function(l){return Object(t(l))}},{"./_defined":114}],176:[function(l,n,e){var t=l("./_is-object");n.exports=function(l,n){if(!t(l))return l;var e,u;if(n&&"function"==typeof(e=l.toString)&&!t(u=e.call(l)))return u;if("function"==typeof(e=l.valueOf)&&!t(u=e.call(l)))return u;if(!n&&"function"==typeof(e=l.toString)&&!t(u=e.call(l)))return u;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":132}],177:[function(l,n,e){var t=0,u=Math.random();n.exports=function(l){return"Symbol(".concat(void 0===l?"":l,")_",(++t+u).toString(36))}},{}],178:[function(l,n,e){var t=l("./_global"),u=t.navigator;n.exports=u&&u.userAgent||""},{"./_global":122}],179:[function(l,n,e){var t=l("./_is-object");n.exports=function(l,n){if(!t(l)||l._t!==n)throw TypeError("Incompatible receiver, "+n+" required!");return l}},{"./_is-object":132}],180:[function(l,n,e){var t=l("./_global"),u=l("./_core"),r=l("./_library"),i=l("./_wks-ext"),o=l("./_object-dp").f;n.exports=function(l){var n=u.Symbol||(u.Symbol=r?{}:t.Symbol||{});"_"==l.charAt(0)||l in n||o(n,l,{value:i.f(l)})}},{"./_core":111,"./_global":122,"./_library":139,"./_object-dp":145,"./_wks-ext":181}],181:[function(l,n,e){e.f=l("./_wks")},{"./_wks":182}],182:[function(l,n,e){var t=l("./_shared")("wks"),u=l("./_uid"),r=l("./_global").Symbol,i="function"==typeof r,o=n.exports=function(l){return t[l]||(t[l]=i&&r[l]||(i?r:u)("Symbol."+l))};o.store=t},{"./_global":122,"./_shared":167,"./_uid":177}],183:[function(l,n,e){var t=l("./_classof"),u=l("./_wks")("iterator"),r=l("./_iterators");n.exports=l("./_core").getIteratorMethod=function(l){if(void 0!=l)return l[u]||l["@@iterator"]||r[t(l)]}},{"./_classof":106,"./_core":111,"./_iterators":138,"./_wks":182}],184:[function(l,n,e){var t=l("./_an-object"),u=l("./core.get-iterator-method");n.exports=l("./_core").getIterator=function(l){var n=u(l);if("function"!=typeof n)throw TypeError(l+" is not iterable!");return t(n.call(l))}},{"./_an-object":100,"./_core":111,"./core.get-iterator-method":183}],185:[function(l,n,e){var t=l("./_classof"),u=l("./_wks")("iterator"),r=l("./_iterators");n.exports=l("./_core").isIterable=function(l){var n=Object(l);return void 0!==n[u]||"@@iterator"in n||r.hasOwnProperty(t(n))}},{"./_classof":106,"./_core":111,"./_iterators":138,"./_wks":182}],186:[function(l,n,e){"use strict";var t=l("./_ctx"),u=l("./_export"),r=l("./_to-object"),i=l("./_iter-call"),o=l("./_is-array-iter"),a=l("./_to-length"),s=l("./_create-property"),c=l("./core.get-iterator-method");u(u.S+u.F*!l("./_iter-detect")(function(l){Array.from(l)}),"Array",{from:function(l){var n,e,u,f,h=r(l),d="function"==typeof this?this:Array,p=arguments.length,b=p>1?arguments[1]:void 0,v=void 0!==b,_=0,m=c(h);if(v&&(b=t(b,p>2?arguments[2]:void 0,2)),void 0==m||d==Array&&o(m))for(n=a(h.length),e=new d(n);n>_;_++)s(e,_,v?b(h[_],_):h[_]);else for(f=m.call(h),e=new d;!(u=f.next()).done;_++)s(e,_,v?i(f,b,[u.value,_],!0):u.value);return e.length=_,e}})},{"./_create-property":112,"./_ctx":113,"./_export":119,"./_is-array-iter":129,"./_iter-call":133,"./_iter-detect":136,"./_to-length":174,"./_to-object":175,"./core.get-iterator-method":183}],187:[function(l,n,e){"use strict";var t=l("./_add-to-unscopables"),u=l("./_iter-step"),r=l("./_iterators"),i=l("./_to-iobject");n.exports=l("./_iter-define")(Array,"Array",function(l,n){this._t=i(l),this._i=0,this._k=n},function(){var l=this._t,n=this._k,e=this._i++;return!l||e>=l.length?(this._t=void 0,u(1)):"keys"==n?u(0,e):"values"==n?u(0,l[e]):u(0,[e,l[e]])},"values"),r.Arguments=r.Array,t("keys"),t("values"),t("entries")},{"./_add-to-unscopables":98,"./_iter-define":135,"./_iter-step":137,"./_iterators":138,"./_to-iobject":173}],188:[function(l,n,e){var t=l("./_export");t(t.S,"Number",{isInteger:l("./_is-integer")})},{"./_export":119,"./_is-integer":131}],189:[function(l,n,e){var t=l("./_export");t(t.S,"Number",{isNaN:function(l){return l!=l}})},{"./_export":119}],190:[function(l,n,e){var t=l("./_export");t(t.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},{"./_export":119}],191:[function(l,n,e){var t=l("./_export");t(t.S+t.F,"Object",{assign:l("./_object-assign")})},{"./_export":119,"./_object-assign":143}],192:[function(l,n,e){var t=l("./_export");t(t.S,"Object",{create:l("./_object-create")})},{"./_export":119,"./_object-create":144}],193:[function(l,n,e){var t=l("./_export");t(t.S+t.F*!l("./_descriptors"),"Object",{defineProperty:l("./_object-dp").f})},{"./_descriptors":115,"./_export":119,"./_object-dp":145}],194:[function(l,n,e){var t=l("./_is-object"),u=l("./_meta").onFreeze;l("./_object-sap")("freeze",function(l){return function(n){return l&&t(n)?l(u(n)):n}})},{"./_is-object":132,"./_meta":140,"./_object-sap":155}],195:[function(l,n,e){var t=l("./_to-iobject"),u=l("./_object-gopd").f;l("./_object-sap")("getOwnPropertyDescriptor",function(){return function(l,n){return u(t(l),n)}}); },{"./_object-gopd":147,"./_object-sap":155,"./_to-iobject":173}],196:[function(l,n,e){var t=l("./_to-object"),u=l("./_object-gpo");l("./_object-sap")("getPrototypeOf",function(){return function(l){return u(t(l))}})},{"./_object-gpo":151,"./_object-sap":155,"./_to-object":175}],197:[function(l,n,e){var t=l("./_to-object"),u=l("./_object-keys");l("./_object-sap")("keys",function(){return function(l){return u(t(l))}})},{"./_object-keys":153,"./_object-sap":155,"./_to-object":175}],198:[function(l,n,e){var t=l("./_export");t(t.S,"Object",{setPrototypeOf:l("./_set-proto").set})},{"./_export":119,"./_set-proto":163}],199:[function(l,n,e){arguments[4][46][0].apply(e,arguments)},{dup:46}],200:[function(l,n,e){"use strict";var t,u,r,i,o=l("./_library"),a=l("./_global"),s=l("./_ctx"),c=l("./_classof"),f=l("./_export"),h=l("./_is-object"),d=l("./_a-function"),p=l("./_an-instance"),b=l("./_for-of"),v=l("./_species-constructor"),_=l("./_task").set,m=l("./_microtask")(),y=l("./_new-promise-capability"),g=l("./_perform"),w=l("./_user-agent"),k=l("./_promise-resolve"),S="Promise",E=a.TypeError,I=a.process,C=I&&I.versions,j=C&&C.v8||"",M=a[S],A="process"==c(I),x=function(){},T=u=y.f,R=!!function(){try{var n=M.resolve(1),e=(n.constructor={})[l("./_wks")("species")]=function(l){l(x,x)};return(A||"function"==typeof PromiseRejectionEvent)&&n.then(x)instanceof e&&0!==j.indexOf("6.6")&&w.indexOf("Chrome/66")===-1}catch(t){}}(),O=function(l){var n;return!(!h(l)||"function"!=typeof(n=l.then))&&n},P=function(l,n){if(!l._n){l._n=!0;var e=l._c;m(function(){for(var t=l._v,u=1==l._s,r=0,i=function(n){var e,r,i,o=u?n.ok:n.fail,a=n.resolve,s=n.reject,c=n.domain;try{o?(u||(2==l._h&&U(l),l._h=1),o===!0?e=t:(c&&c.enter(),e=o(t),c&&(c.exit(),i=!0)),e===n.promise?s(E("Promise-chain cycle")):(r=O(e))?r.call(e,a,s):a(e)):s(t)}catch(f){c&&!i&&c.exit(),s(f)}};e.length>r;)i(e[r++]);l._c=[],l._n=!1,n&&!l._h&&N(l)})}},N=function(l){_.call(a,function(){var n,e,t,u=l._v,r=B(l);if(r&&(n=g(function(){A?I.emit("unhandledRejection",u,l):(e=a.onunhandledrejection)?e({promise:l,reason:u}):(t=a.console)&&t.error&&t.error("Unhandled promise rejection",u)}),l._h=A||B(l)?2:1),l._a=void 0,r&&n.e)throw n.v})},B=function(l){return 1!==l._h&&0===(l._a||l._c).length},U=function(l){_.call(a,function(){var n;A?I.emit("rejectionHandled",l):(n=a.onrejectionhandled)&&n({promise:l,reason:l._v})})},D=function(l){var n=this;n._d||(n._d=!0,n=n._w||n,n._v=l,n._s=2,n._a||(n._a=n._c.slice()),P(n,!0))},L=function(l){var n,e=this;if(!e._d){e._d=!0,e=e._w||e;try{if(e===l)throw E("Promise can't be resolved itself");(n=O(l))?m(function(){var t={_w:e,_d:!1};try{n.call(l,s(L,t,1),s(D,t,1))}catch(u){D.call(t,u)}}):(e._v=l,e._s=1,P(e,!1))}catch(t){D.call({_w:e,_d:!1},t)}}};R||(M=function(l){p(this,M,S,"_h"),d(l),t.call(this);try{l(s(L,this,1),s(D,this,1))}catch(n){D.call(this,n)}},t=function(l){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},t.prototype=l("./_redefine-all")(M.prototype,{then:function(l,n){var e=T(v(this,M));return e.ok="function"!=typeof l||l,e.fail="function"==typeof n&&n,e.domain=A?I.domain:void 0,this._c.push(e),this._a&&this._a.push(e),this._s&&P(this,!1),e.promise},"catch":function(l){return this.then(void 0,l)}}),r=function(){var l=new t;this.promise=l,this.resolve=s(L,l,1),this.reject=s(D,l,1)},y.f=T=function(l){return l===M||l===i?new r(l):u(l)}),f(f.G+f.W+f.F*!R,{Promise:M}),l("./_set-to-string-tag")(M,S),l("./_set-species")(S),i=l("./_core")[S],f(f.S+f.F*!R,S,{reject:function(l){var n=T(this),e=n.reject;return e(l),n.promise}}),f(f.S+f.F*(o||!R),S,{resolve:function(l){return k(o&&this===i?M:this,l)}}),f(f.S+f.F*!(R&&l("./_iter-detect")(function(l){M.all(l)["catch"](x)})),S,{all:function(l){var n=this,e=T(n),t=e.resolve,u=e.reject,r=g(function(){var e=[],r=0,i=1;b(l,!1,function(l){var o=r++,a=!1;e.push(void 0),i++,n.resolve(l).then(function(l){a||(a=!0,e[o]=l,--i||t(e))},u)}),--i||t(e)});return r.e&&u(r.v),e.promise},race:function(l){var n=this,e=T(n),t=e.reject,u=g(function(){b(l,!1,function(l){n.resolve(l).then(e.resolve,t)})});return u.e&&t(u.v),e.promise}})},{"./_a-function":97,"./_an-instance":99,"./_classof":106,"./_core":111,"./_ctx":113,"./_export":119,"./_for-of":121,"./_global":122,"./_is-object":132,"./_iter-detect":136,"./_library":139,"./_microtask":141,"./_new-promise-capability":142,"./_perform":156,"./_promise-resolve":157,"./_redefine-all":159,"./_set-species":164,"./_set-to-string-tag":165,"./_species-constructor":168,"./_task":170,"./_user-agent":178,"./_wks":182}],201:[function(l,n,e){"use strict";var t=l("./_collection-strong"),u=l("./_validate-collection"),r="Set";n.exports=l("./_collection")(r,function(l){return function(){return l(this,arguments.length>0?arguments[0]:void 0)}},{add:function(l){return t.def(u(this,r),l=0===l?0:l,l)}},t)},{"./_collection":110,"./_collection-strong":108,"./_validate-collection":179}],202:[function(l,n,e){"use strict";var t=l("./_string-at")(!0);l("./_iter-define")(String,"String",function(l){this._t=String(l),this._i=0},function(){var l,n=this._t,e=this._i;return e>=n.length?{value:void 0,done:!0}:(l=t(n,e),this._i+=l.length,{value:l,done:!1})})},{"./_iter-define":135,"./_string-at":169}],203:[function(l,n,e){"use strict";var t=l("./_global"),u=l("./_has"),r=l("./_descriptors"),i=l("./_export"),o=l("./_redefine"),a=l("./_meta").KEY,s=l("./_fails"),c=l("./_shared"),f=l("./_set-to-string-tag"),h=l("./_uid"),d=l("./_wks"),p=l("./_wks-ext"),b=l("./_wks-define"),v=l("./_enum-keys"),_=l("./_is-array"),m=l("./_an-object"),y=l("./_is-object"),g=l("./_to-iobject"),w=l("./_to-primitive"),k=l("./_property-desc"),S=l("./_object-create"),E=l("./_object-gopn-ext"),I=l("./_object-gopd"),C=l("./_object-dp"),j=l("./_object-keys"),M=I.f,A=C.f,x=E.f,T=t.Symbol,R=t.JSON,O=R&&R.stringify,P="prototype",N=d("_hidden"),B=d("toPrimitive"),U={}.propertyIsEnumerable,D=c("symbol-registry"),L=c("symbols"),F=c("op-symbols"),q=Object[P],z="function"==typeof T,V=t.QObject,H=!V||!V[P]||!V[P].findChild,K=r&&s(function(){return 7!=S(A({},"a",{get:function(){return A(this,"a",{value:7}).a}})).a})?function(l,n,e){var t=M(q,n);t&&delete q[n],A(l,n,e),t&&l!==q&&A(q,n,t)}:A,W=function(l){var n=L[l]=S(T[P]);return n._k=l,n},Y=z&&"symbol"==typeof T.iterator?function(l){return"symbol"==typeof l}:function(l){return l instanceof T},G=function(l,n,e){return l===q&&G(F,n,e),m(l),n=w(n,!0),m(e),u(L,n)?(e.enumerable?(u(l,N)&&l[N][n]&&(l[N][n]=!1),e=S(e,{enumerable:k(0,!1)})):(u(l,N)||A(l,N,k(1,{})),l[N][n]=!0),K(l,n,e)):A(l,n,e)},Z=function(l,n){m(l);for(var e,t=v(n=g(n)),u=0,r=t.length;r>u;)G(l,e=t[u++],n[e]);return l},X=function(l,n){return void 0===n?S(l):Z(S(l),n)},J=function(l){var n=U.call(this,l=w(l,!0));return!(this===q&&u(L,l)&&!u(F,l))&&(!(n||!u(this,l)||!u(L,l)||u(this,N)&&this[N][l])||n)},$=function(l,n){if(l=g(l),n=w(n,!0),l!==q||!u(L,n)||u(F,n)){var e=M(l,n);return!e||!u(L,n)||u(l,N)&&l[N][n]||(e.enumerable=!0),e}},Q=function(l){for(var n,e=x(g(l)),t=[],r=0;e.length>r;)u(L,n=e[r++])||n==N||n==a||t.push(n);return t},ll=function(l){for(var n,e=l===q,t=x(e?F:g(l)),r=[],i=0;t.length>i;)!u(L,n=t[i++])||e&&!u(q,n)||r.push(L[n]);return r};z||(T=function(){if(this instanceof T)throw TypeError("Symbol is not a constructor!");var l=h(arguments.length>0?arguments[0]:void 0),n=function(e){this===q&&n.call(F,e),u(this,N)&&u(this[N],l)&&(this[N][l]=!1),K(this,l,k(1,e))};return r&&H&&K(q,l,{configurable:!0,set:n}),W(l)},o(T[P],"toString",function(){return this._k}),I.f=$,C.f=G,l("./_object-gopn").f=E.f=Q,l("./_object-pie").f=J,l("./_object-gops").f=ll,r&&!l("./_library")&&o(q,"propertyIsEnumerable",J,!0),p.f=function(l){return W(d(l))}),i(i.G+i.W+i.F*!z,{Symbol:T});for(var nl="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),el=0;nl.length>el;)d(nl[el++]);for(var tl=j(d.store),ul=0;tl.length>ul;)b(tl[ul++]);i(i.S+i.F*!z,"Symbol",{"for":function(l){return u(D,l+="")?D[l]:D[l]=T(l)},keyFor:function(l){if(!Y(l))throw TypeError(l+" is not a symbol!");for(var n in D)if(D[n]===l)return n},useSetter:function(){H=!0},useSimple:function(){H=!1}}),i(i.S+i.F*!z,"Object",{create:X,defineProperty:G,defineProperties:Z,getOwnPropertyDescriptor:$,getOwnPropertyNames:Q,getOwnPropertySymbols:ll}),R&&i(i.S+i.F*(!z||s(function(){var l=T();return"[null]"!=O([l])||"{}"!=O({a:l})||"{}"!=O(Object(l))})),"JSON",{stringify:function(l){for(var n,e,t=[l],u=1;arguments.length>u;)t.push(arguments[u++]);if(e=n=t[1],(y(n)||void 0!==l)&&!Y(l))return _(n)||(n=function(l,n){if("function"==typeof e&&(n=e.call(this,l,n)),!Y(n))return n}),t[1]=n,O.apply(R,t)}}),T[P][B]||l("./_hide")(T[P],B,T[P].valueOf),f(T,"Symbol"),f(Math,"Math",!0),f(t.JSON,"JSON",!0)},{"./_an-object":100,"./_descriptors":115,"./_enum-keys":118,"./_export":119,"./_fails":120,"./_global":122,"./_has":123,"./_hide":124,"./_is-array":130,"./_is-object":132,"./_library":139,"./_meta":140,"./_object-create":144,"./_object-dp":145,"./_object-gopd":147,"./_object-gopn":149,"./_object-gopn-ext":148,"./_object-gops":150,"./_object-keys":153,"./_object-pie":154,"./_property-desc":158,"./_redefine":160,"./_set-to-string-tag":165,"./_shared":167,"./_to-iobject":173,"./_to-primitive":176,"./_uid":177,"./_wks":182,"./_wks-define":180,"./_wks-ext":181}],204:[function(l,n,e){"use strict";var t=l("./_export"),u=l("./_core"),r=l("./_global"),i=l("./_species-constructor"),o=l("./_promise-resolve");t(t.P+t.R,"Promise",{"finally":function(l){var n=i(this,u.Promise||r.Promise),e="function"==typeof l;return this.then(e?function(e){return o(n,l()).then(function(){return e})}:l,e?function(e){return o(n,l()).then(function(){throw e})}:l)}})},{"./_core":111,"./_export":119,"./_global":122,"./_promise-resolve":157,"./_species-constructor":168}],205:[function(l,n,e){"use strict";var t=l("./_export"),u=l("./_new-promise-capability"),r=l("./_perform");t(t.S,"Promise",{"try":function(l){var n=u.f(this),e=r(l);return(e.e?n.reject:n.resolve)(e.v),n.promise}})},{"./_export":119,"./_new-promise-capability":142,"./_perform":156}],206:[function(l,n,e){l("./_set-collection-from")("Set")},{"./_set-collection-from":161}],207:[function(l,n,e){l("./_set-collection-of")("Set")},{"./_set-collection-of":162}],208:[function(l,n,e){var t=l("./_export");t(t.P+t.R,"Set",{toJSON:l("./_collection-to-json")("Set")})},{"./_collection-to-json":109,"./_export":119}],209:[function(l,n,e){l("./_wks-define")("asyncIterator")},{"./_wks-define":180}],210:[function(l,n,e){l("./_wks-define")("observable")},{"./_wks-define":180}],211:[function(l,n,e){l("./es6.array.iterator");for(var t=l("./_global"),u=l("./_hide"),r=l("./_iterators"),i=l("./_wks")("toStringTag"),o="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),a=0;ae){var t="rmd160"===l?new s:c(l);n=t.update(n).digest()}else n.lengtha?n=l(n):n.length0;t--)n+=this._buffer(l,n),e+=this._flushBuffer(u,e);return n+=this._buffer(l,n),u},t.prototype["final"]=function(l){var n;l&&(n=this.update(l));var e;return e="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),n?n.concat(e):e},t.prototype._pad=function(l,n){if(0===n)return!1;for(;n>>1];e=a.r28shl(e,i),t=a.r28shl(t,i),a.pc2(e,t,l.keys,u)}},u.prototype._update=function(l,n,e,t){var u=this._desState,r=a.readUInt32BE(l,n),i=a.readUInt32BE(l,n+4);a.ip(r,i,u.tmp,0),r=u.tmp[0],i=u.tmp[1],"encrypt"===this.type?this._encrypt(u,r,i,u.tmp,0):this._decrypt(u,r,i,u.tmp,0),r=u.tmp[0],i=u.tmp[1],a.writeUInt32BE(e,r,t),a.writeUInt32BE(e,i,t+4)},u.prototype._pad=function(l,n){for(var e=l.length-n,t=n;t>>0,r=d}a.rip(i,r,t,u)},u.prototype._decrypt=function(l,n,e,t,u){for(var r=e,i=n,o=l.keys.length-2;o>=0;o-=2){var s=l.keys[o],c=l.keys[o+1];a.expand(r,l.tmp,0),s^=l.tmp[0],c^=l.tmp[1];var f=a.substitute(s,c),h=a.permute(f),d=r;r=(i^h)>>>0,i=d}a.rip(r,i,t,u)}},{"../des":219,inherits:263,"minimalistic-assert":268}],223:[function(l,n,e){"use strict";function t(l,n){r.equal(n.length,24,"Invalid key length");var e=n.slice(0,8),t=n.slice(8,16),u=n.slice(16,24);"encrypt"===l?this.ciphers=[s.create({type:"encrypt",key:e}),s.create({type:"decrypt",key:t}),s.create({type:"encrypt",key:u})]:this.ciphers=[s.create({type:"decrypt",key:u}),s.create({type:"encrypt",key:t}),s.create({type:"decrypt",key:e})]}function u(l){a.call(this,l);var n=new t(this.type,this.options.key);this._edeState=n}var r=l("minimalistic-assert"),i=l("inherits"),o=l("../des"),a=o.Cipher,s=o.DES;i(u,a),n.exports=u,u.create=function(l){return new u(l)},u.prototype._update=function(l,n,e,t){var u=this._edeState;u.ciphers[0]._update(l,n,e,t),u.ciphers[1]._update(e,t,e,t),u.ciphers[2]._update(e,t,e,t)},u.prototype._pad=s.prototype._pad,u.prototype._unpad=s.prototype._unpad},{"../des":219,inherits:263,"minimalistic-assert":268}],224:[function(l,n,e){"use strict";e.readUInt32BE=function(l,n){var e=l[0+n]<<24|l[1+n]<<16|l[2+n]<<8|l[3+n];return e>>>0},e.writeUInt32BE=function(l,n,e){l[0+e]=n>>>24,l[1+e]=n>>>16&255,l[2+e]=n>>>8&255,l[3+e]=255&n},e.ip=function(l,n,e,t){for(var u=0,r=0,i=6;i>=0;i-=2){for(var o=0;o<=24;o+=8)u<<=1,u|=n>>>o+i&1;for(var o=0;o<=24;o+=8)u<<=1,u|=l>>>o+i&1}for(var i=6;i>=0;i-=2){for(var o=1;o<=25;o+=8)r<<=1,r|=n>>>o+i&1;for(var o=1;o<=25;o+=8)r<<=1,r|=l>>>o+i&1}e[t+0]=u>>>0,e[t+1]=r>>>0},e.rip=function(l,n,e,t){for(var u=0,r=0,i=0;i<4;i++)for(var o=24;o>=0;o-=8)u<<=1,u|=n>>>o+i&1,u<<=1,u|=l>>>o+i&1;for(var i=4;i<8;i++)for(var o=24;o>=0;o-=8)r<<=1,r|=n>>>o+i&1,r<<=1,r|=l>>>o+i&1;e[t+0]=u>>>0,e[t+1]=r>>>0},e.pc1=function(l,n,e,t){for(var u=0,r=0,i=7;i>=5;i--){for(var o=0;o<=24;o+=8)u<<=1,u|=n>>o+i&1;for(var o=0;o<=24;o+=8)u<<=1,u|=l>>o+i&1}for(var o=0;o<=24;o+=8)u<<=1,u|=n>>o+i&1;for(var i=1;i<=3;i++){for(var o=0;o<=24;o+=8)r<<=1,r|=n>>o+i&1;for(var o=0;o<=24;o+=8)r<<=1,r|=l>>o+i&1}for(var o=0;o<=24;o+=8)r<<=1,r|=l>>o+i&1;e[t+0]=u>>>0,e[t+1]=r>>>0},e.r28shl=function(l,n){return l<>>28-n};var t=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];e.pc2=function(l,n,e,u){for(var r=0,i=0,o=t.length>>>1,a=0;a>>t[a]&1;for(var a=o;a>>t[a]&1;e[u+0]=r>>>0,e[u+1]=i>>>0},e.expand=function(l,n,e){var t=0,u=0;t=(1&l)<<5|l>>>27;for(var r=23;r>=15;r-=4)t<<=6,t|=l>>>r&63;for(var r=11;r>=3;r-=4)u|=l>>>r&63,u<<=6;u|=(31&l)<<1|l>>>31,n[e+0]=t>>>0,n[e+1]=u>>>0};var u=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];e.substitute=function(l,n){for(var e=0,t=0;t<4;t++){var r=l>>>18-6*t&63,i=u[64*t+r];e<<=4,e|=i}for(var t=0;t<4;t++){var r=n>>>18-6*t&63,i=u[256+64*t+r];e<<=4,e|=i}return e>>>0};var r=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];e.permute=function(l){for(var n=0,e=0;e>>r[e]&1;return n>>>0},e.padSplit=function(l,n,e){for(var t=l.toString(2);t.lengthl;)e.ishrn(1);if(e.isEven()&&e.iadd(h),e.testn(1)||e.iadd(d),n.cmp(d)){if(!n.cmp(p))for(;e.mod(b).cmp(v);)e.iadd(m)}else for(;e.mod(s).cmp(_);)e.iadd(m);if(t=e.shrn(1),u(t)&&u(e)&&r(t)&&r(e)&&f.test(t)&&f.test(e))return e}}var o=l("randombytes");n.exports=i,i.simpleSieve=u,i.fermatTest=r;var a=l("bn.js"),s=new a(24),c=l("miller-rabin"),f=new c,h=new a(1),d=new a(2),p=new a(5),b=(new a(16),new a(8),new a(10)),v=new a(3),_=(new a(7),new a(11)),m=new a(4),y=(new a(12),null)},{"bn.js":44,"miller-rabin":267,randombytes:290}],228:[function(l,n,e){n.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff" },modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},{}],229:[function(l,n,e){"use strict";var t=e;t.version=l("../package.json").version,t.utils=l("./elliptic/utils"),t.rand=l("brorand"),t.curve=l("./elliptic/curve"),t.curves=l("./elliptic/curves"),t.ec=l("./elliptic/ec"),t.eddsa=l("./elliptic/eddsa")},{"../package.json":244,"./elliptic/curve":232,"./elliptic/curves":235,"./elliptic/ec":236,"./elliptic/eddsa":239,"./elliptic/utils":243,brorand:45}],230:[function(l,n,e){"use strict";function t(l,n){this.type=l,this.p=new r(n.p,16),this.red=n.prime?r.red(n.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=n.n&&new r(n.n,16),this.g=n.g&&this.pointFromJSON(n.g,n.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);var e=this.n&&this.p.div(this.n);!e||e.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function u(l,n){this.curve=l,this.type=n,this.precomputed=null}var r=l("bn.js"),i=l("../../elliptic"),o=i.utils,a=o.getNAF,s=o.getJSF,c=o.assert;n.exports=t,t.prototype.point=function(){throw new Error("Not implemented")},t.prototype.validate=function(){throw new Error("Not implemented")},t.prototype._fixedNafMul=function(l,n){c(l.precomputed);var e=l._getDoubles(),t=a(n,1),u=(1<=i;n--)o=(o<<1)+t[n];r.push(o)}for(var s=this.jpoint(null,null,null),f=this.jpoint(null,null,null),h=u;h>0;h--){for(var i=0;i=0;o--){for(var n=0;o>=0&&0===r[o];o--)n++;if(o>=0&&n++,i=i.dblp(n),o<0)break;var s=r[o];c(0!==s),i="affine"===l.type?s>0?i.mixedAdd(u[s-1>>1]):i.mixedAdd(u[-s-1>>1].neg()):s>0?i.add(u[s-1>>1]):i.add(u[-s-1>>1].neg())}return"affine"===l.type?i.toP():i},t.prototype._wnafMulAdd=function(l,n,e,t,u){for(var r=this._wnafT1,i=this._wnafT2,o=this._wnafT3,c=0,f=0;f=1;f-=2){var p=f-1,b=f;if(1===r[p]&&1===r[b]){var v=[n[p],null,null,n[b]];0===n[p].y.cmp(n[b].y)?(v[1]=n[p].add(n[b]),v[2]=n[p].toJ().mixedAdd(n[b].neg())):0===n[p].y.cmp(n[b].y.redNeg())?(v[1]=n[p].toJ().mixedAdd(n[b]),v[2]=n[p].add(n[b].neg())):(v[1]=n[p].toJ().mixedAdd(n[b]),v[2]=n[p].toJ().mixedAdd(n[b].neg()));var _=[-3,-1,-5,-7,0,7,5,1,3],m=s(e[p],e[b]);c=Math.max(m[0].length,c),o[p]=new Array(c),o[b]=new Array(c);for(var y=0;y=0;f--){for(var E=0;f>=0;){for(var I=!0,y=0;y=0&&E++,k=k.dblp(E),f<0)break;for(var y=0;y0?h=i[y][C-1>>1]:C<0&&(h=i[y][-C-1>>1].neg()),k="affine"===h.type?k.mixedAdd(h):k.add(h))}}for(var f=0;f=Math.ceil((l.bitLength()+1)/n.step)},u.prototype._getDoubles=function(l,n){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var e=[this],t=this,u=0;u":""},u.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&0===this.y.cmp(this.z)},u.prototype._extDbl=function(){var l=this.x.redSqr(),n=this.y.redSqr(),e=this.z.redSqr();e=e.redIAdd(e);var t=this.curve._mulA(l),u=this.x.redAdd(this.y).redSqr().redISub(l).redISub(n),r=t.redAdd(n),i=r.redSub(e),o=t.redSub(n),a=u.redMul(i),s=r.redMul(o),c=u.redMul(o),f=i.redMul(r);return this.curve.point(a,s,f,c)},u.prototype._projDbl=function(){var l,n,e,t=this.x.redAdd(this.y).redSqr(),u=this.x.redSqr(),r=this.y.redSqr();if(this.curve.twisted){var i=this.curve._mulA(u),o=i.redAdd(r);if(this.zOne)l=t.redSub(u).redSub(r).redMul(o.redSub(this.curve.two)),n=o.redMul(i.redSub(r)),e=o.redSqr().redSub(o).redSub(o);else{var a=this.z.redSqr(),s=o.redSub(a).redISub(a);l=t.redSub(u).redISub(r).redMul(s),n=o.redMul(i.redSub(r)),e=o.redMul(s)}}else{var i=u.redAdd(r),a=this.curve._mulC(this.c.redMul(this.z)).redSqr(),s=i.redSub(a).redSub(a);l=this.curve._mulC(t.redISub(i)).redMul(s),n=this.curve._mulC(i).redMul(u.redISub(r)),e=i.redMul(s)}return this.curve.point(l,n,e)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},u.prototype._extAdd=function(l){var n=this.y.redSub(this.x).redMul(l.y.redSub(l.x)),e=this.y.redAdd(this.x).redMul(l.y.redAdd(l.x)),t=this.t.redMul(this.curve.dd).redMul(l.t),u=this.z.redMul(l.z.redAdd(l.z)),r=e.redSub(n),i=u.redSub(t),o=u.redAdd(t),a=e.redAdd(n),s=r.redMul(i),c=o.redMul(a),f=r.redMul(a),h=i.redMul(o);return this.curve.point(s,c,h,f)},u.prototype._projAdd=function(l){var n,e,t=this.z.redMul(l.z),u=t.redSqr(),r=this.x.redMul(l.x),i=this.y.redMul(l.y),o=this.curve.d.redMul(r).redMul(i),a=u.redSub(o),s=u.redAdd(o),c=this.x.redAdd(this.y).redMul(l.x.redAdd(l.y)).redISub(r).redISub(i),f=t.redMul(a).redMul(c);return this.curve.twisted?(n=t.redMul(s).redMul(i.redSub(this.curve._mulA(r))),e=a.redMul(s)):(n=t.redMul(s).redMul(i.redSub(r)),e=this.curve._mulC(a).redMul(s)),this.curve.point(f,n,e)},u.prototype.add=function(l){return this.isInfinity()?l:l.isInfinity()?this:this.curve.extended?this._extAdd(l):this._projAdd(l)},u.prototype.mul=function(l){return this._hasDoubles(l)?this.curve._fixedNafMul(this,l):this.curve._wnafMul(this,l)},u.prototype.mulAdd=function(l,n,e){return this.curve._wnafMulAdd(1,[this,n],[l,e],2,!1)},u.prototype.jmulAdd=function(l,n,e){return this.curve._wnafMulAdd(1,[this,n],[l,e],2,!0)},u.prototype.normalize=function(){if(this.zOne)return this;var l=this.z.redInvm();return this.x=this.x.redMul(l),this.y=this.y.redMul(l),this.t&&(this.t=this.t.redMul(l)),this.z=this.curve.one,this.zOne=!0,this},u.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()},u.prototype.getY=function(){return this.normalize(),this.y.fromRed()},u.prototype.eq=function(l){return this===l||0===this.getX().cmp(l.getX())&&0===this.getY().cmp(l.getY())},u.prototype.eqXToP=function(l){var n=l.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(n))return!0;for(var e=l.clone(),t=this.curve.redN.redMul(this.z);;){if(e.iadd(this.curve.n),e.cmp(this.curve.p)>=0)return!1;if(n.redIAdd(t),0===this.x.cmp(n))return!0}return!1},u.prototype.toP=u.prototype.normalize,u.prototype.mixedAdd=u.prototype.add},{"../../elliptic":229,"../curve":232,"bn.js":44,inherits:263}],232:[function(l,n,e){"use strict";var t=e;t.base=l("./base"),t["short"]=l("./short"),t.mont=l("./mont"),t.edwards=l("./edwards")},{"./base":230,"./edwards":231,"./mont":233,"./short":234}],233:[function(l,n,e){"use strict";function t(l){a.call(this,"mont",l),this.a=new i(l.a,16).toRed(this.red),this.b=new i(l.b,16).toRed(this.red),this.i4=new i(4).toRed(this.red).redInvm(),this.two=new i(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(l,n,e){a.BasePoint.call(this,l,"projective"),null===n&&null===e?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new i(n,16),this.z=new i(e,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}var r=l("../curve"),i=l("bn.js"),o=l("inherits"),a=r.base,s=l("../../elliptic"),c=s.utils;o(t,a),n.exports=t,t.prototype.validate=function(l){var n=l.normalize().x,e=n.redSqr(),t=e.redMul(n).redAdd(e.redMul(this.a)).redAdd(n),u=t.redSqrt();return 0===u.redSqr().cmp(t)},o(u,a.BasePoint),t.prototype.decodePoint=function(l,n){return this.point(c.toArray(l,n),1)},t.prototype.point=function(l,n){return new u(this,l,n)},t.prototype.pointFromJSON=function(l){return u.fromJSON(this,l)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(l,n){return new u(l,n[0],n[1]||l.one)},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var l=this.x.redAdd(this.z),n=l.redSqr(),e=this.x.redSub(this.z),t=e.redSqr(),u=n.redSub(t),r=n.redMul(t),i=u.redMul(t.redAdd(this.curve.a24.redMul(u)));return this.curve.point(r,i)},u.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(l,n){var e=this.x.redAdd(this.z),t=this.x.redSub(this.z),u=l.x.redAdd(l.z),r=l.x.redSub(l.z),i=r.redMul(e),o=u.redMul(t),a=n.z.redMul(i.redAdd(o).redSqr()),s=n.x.redMul(i.redISub(o).redSqr());return this.curve.point(a,s)},u.prototype.mul=function(l){for(var n=l.clone(),e=this,t=this.curve.point(null,null),u=this,r=[];0!==n.cmpn(0);n.iushrn(1))r.push(n.andln(1));for(var i=r.length-1;i>=0;i--)0===r[i]?(e=e.diffAdd(t,u),t=t.dbl()):(t=e.diffAdd(t,u),e=e.dbl());return t},u.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.eq=function(l){return 0===this.getX().cmp(l.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../../elliptic":229,"../curve":232,"bn.js":44,inherits:263}],234:[function(l,n,e){"use strict";function t(l){c.call(this,"short",l),this.a=new a(l.a,16).toRed(this.red),this.b=new a(l.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(l),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function u(l,n,e,t){c.BasePoint.call(this,l,"affine"),null===n&&null===e?(this.x=null,this.y=null,this.inf=!0):(this.x=new a(n,16),this.y=new a(e,16),t&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function r(l,n,e,t){c.BasePoint.call(this,l,"jacobian"),null===n&&null===e&&null===t?(this.x=this.curve.one,this.y=this.curve.one,this.z=new a(0)):(this.x=new a(n,16),this.y=new a(e,16),this.z=new a(t,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}var i=l("../curve"),o=l("../../elliptic"),a=l("bn.js"),s=l("inherits"),c=i.base,f=o.utils.assert;s(t,c),n.exports=t,t.prototype._getEndomorphism=function(l){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var n,e;if(l.beta)n=new a(l.beta,16).toRed(this.red);else{var t=this._getEndoRoots(this.p);n=t[0].cmp(t[1])<0?t[0]:t[1],n=n.toRed(this.red)}if(l.lambda)e=new a(l.lambda,16);else{var u=this._getEndoRoots(this.n);0===this.g.mul(u[0]).x.cmp(this.g.x.redMul(n))?e=u[0]:(e=u[1],f(0===this.g.mul(e).x.cmp(this.g.x.redMul(n))))}var r;return r=l.basis?l.basis.map(function(l){return{a:new a(l.a,16),b:new a(l.b,16)}}):this._getEndoBasis(e),{beta:n,lambda:e,basis:r}}},t.prototype._getEndoRoots=function(l){var n=l===this.p?this.red:a.mont(l),e=new a(2).toRed(n).redInvm(),t=e.redNeg(),u=new a(3).toRed(n).redNeg().redSqrt().redMul(e),r=t.redAdd(u).fromRed(),i=t.redSub(u).fromRed();return[r,i]},t.prototype._getEndoBasis=function(l){for(var n,e,t,u,r,i,o,s,c,f=this.n.ushrn(Math.floor(this.n.bitLength()/2)),h=l,d=this.n.clone(),p=new a(1),b=new a(0),v=new a(0),_=new a(1),m=0;0!==h.cmpn(0);){var y=d.div(h);s=d.sub(y.mul(h)),c=v.sub(y.mul(p));var g=_.sub(y.mul(b));if(!t&&s.cmp(f)<0)n=o.neg(),e=p,t=s.neg(),u=c;else if(t&&2===++m)break;o=s,d=h,h=s,v=p,p=c,_=b,b=g}r=s.neg(),i=c;var w=t.sqr().add(u.sqr()),k=r.sqr().add(i.sqr());return k.cmp(w)>=0&&(r=n,i=e),t.negative&&(t=t.neg(),u=u.neg()),r.negative&&(r=r.neg(),i=i.neg()),[{a:t,b:u},{a:r,b:i}]},t.prototype._endoSplit=function(l){var n=this.endo.basis,e=n[0],t=n[1],u=t.b.mul(l).divRound(this.n),r=e.b.neg().mul(l).divRound(this.n),i=u.mul(e.a),o=r.mul(t.a),a=u.mul(e.b),s=r.mul(t.b),c=l.sub(i).sub(o),f=a.add(s).neg();return{k1:c,k2:f}},t.prototype.pointFromX=function(l,n){l=new a(l,16),l.red||(l=l.toRed(this.red));var e=l.redSqr().redMul(l).redIAdd(l.redMul(this.a)).redIAdd(this.b),t=e.redSqrt();if(0!==t.redSqr().redSub(e).cmp(this.zero))throw new Error("invalid point");var u=t.fromRed().isOdd();return(n&&!u||!n&&u)&&(t=t.redNeg()),this.point(l,t)},t.prototype.validate=function(l){if(l.inf)return!0;var n=l.x,e=l.y,t=this.a.redMul(n),u=n.redSqr().redMul(n).redIAdd(t).redIAdd(this.b);return 0===e.redSqr().redISub(u).cmpn(0)},t.prototype._endoWnafMulAdd=function(l,n,e){for(var t=this._endoWnafT1,u=this._endoWnafT2,r=0;r":""},u.prototype.isInfinity=function(){return this.inf},u.prototype.add=function(l){if(this.inf)return l;if(l.inf)return this;if(this.eq(l))return this.dbl();if(this.neg().eq(l))return this.curve.point(null,null);if(0===this.x.cmp(l.x))return this.curve.point(null,null);var n=this.y.redSub(l.y);0!==n.cmpn(0)&&(n=n.redMul(this.x.redSub(l.x).redInvm()));var e=n.redSqr().redISub(this.x).redISub(l.x),t=n.redMul(this.x.redSub(e)).redISub(this.y);return this.curve.point(e,t)},u.prototype.dbl=function(){if(this.inf)return this;var l=this.y.redAdd(this.y);if(0===l.cmpn(0))return this.curve.point(null,null);var n=this.curve.a,e=this.x.redSqr(),t=l.redInvm(),u=e.redAdd(e).redIAdd(e).redIAdd(n).redMul(t),r=u.redSqr().redISub(this.x.redAdd(this.x)),i=u.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,i)},u.prototype.getX=function(){return this.x.fromRed()},u.prototype.getY=function(){return this.y.fromRed()},u.prototype.mul=function(l){return l=new a(l,16),this._hasDoubles(l)?this.curve._fixedNafMul(this,l):this.curve.endo?this.curve._endoWnafMulAdd([this],[l]):this.curve._wnafMul(this,l)},u.prototype.mulAdd=function(l,n,e){var t=[this,n],u=[l,e];return this.curve.endo?this.curve._endoWnafMulAdd(t,u):this.curve._wnafMulAdd(1,t,u,2)},u.prototype.jmulAdd=function(l,n,e){var t=[this,n],u=[l,e];return this.curve.endo?this.curve._endoWnafMulAdd(t,u,!0):this.curve._wnafMulAdd(1,t,u,2,!0)},u.prototype.eq=function(l){return this===l||this.inf===l.inf&&(this.inf||0===this.x.cmp(l.x)&&0===this.y.cmp(l.y))},u.prototype.neg=function(l){if(this.inf)return this;var n=this.curve.point(this.x,this.y.redNeg());if(l&&this.precomputed){var e=this.precomputed,t=function(l){return l.neg()};n.precomputed={naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(t)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(t)}}}return n},u.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var l=this.curve.jpoint(this.x,this.y,this.curve.one);return l},s(r,c.BasePoint),t.prototype.jpoint=function(l,n,e){return new r(this,l,n,e)},r.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var l=this.z.redInvm(),n=l.redSqr(),e=this.x.redMul(n),t=this.y.redMul(n).redMul(l);return this.curve.point(e,t)},r.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},r.prototype.add=function(l){if(this.isInfinity())return l;if(l.isInfinity())return this;var n=l.z.redSqr(),e=this.z.redSqr(),t=this.x.redMul(n),u=l.x.redMul(e),r=this.y.redMul(n.redMul(l.z)),i=l.y.redMul(e.redMul(this.z)),o=t.redSub(u),a=r.redSub(i);if(0===o.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var s=o.redSqr(),c=s.redMul(o),f=t.redMul(s),h=a.redSqr().redIAdd(c).redISub(f).redISub(f),d=a.redMul(f.redISub(h)).redISub(r.redMul(c)),p=this.z.redMul(l.z).redMul(o);return this.curve.jpoint(h,d,p)},r.prototype.mixedAdd=function(l){if(this.isInfinity())return l.toJ();if(l.isInfinity())return this;var n=this.z.redSqr(),e=this.x,t=l.x.redMul(n),u=this.y,r=l.y.redMul(n).redMul(this.z),i=e.redSub(t),o=u.redSub(r);if(0===i.cmpn(0))return 0!==o.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var a=i.redSqr(),s=a.redMul(i),c=e.redMul(a),f=o.redSqr().redIAdd(s).redISub(c).redISub(c),h=o.redMul(c.redISub(f)).redISub(u.redMul(s)),d=this.z.redMul(i);return this.curve.jpoint(f,h,d)},r.prototype.dblp=function(l){if(0===l)return this;if(this.isInfinity())return this;if(!l)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var n=this,e=0;e=0)return!1;if(e.redIAdd(u),0===this.x.cmp(e))return!0}return!1},r.prototype.inspect=function(){return this.isInfinity()?"":""},r.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../../elliptic":229,"../curve":232,"bn.js":44,inherits:263}],235:[function(l,n,e){"use strict";function t(l){"short"===l.type?this.curve=new o.curve["short"](l):"edwards"===l.type?this.curve=new o.curve.edwards(l):this.curve=new o.curve.mont(l),this.g=this.curve.g,this.n=this.curve.n,this.hash=l.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function u(l,n){Object.defineProperty(r,l,{configurable:!0,enumerable:!0,get:function(){var e=new t(n);return Object.defineProperty(r,l,{configurable:!0,enumerable:!0,value:e}),e}})}var r=e,i=l("hash.js"),o=l("../elliptic"),a=o.utils.assert;r.PresetCurve=t,u("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:i.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),u("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:i.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),u("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:i.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),u("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:i.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),u("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:i.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),u("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:i.sha256,gRed:!1,g:["9"]}),u("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:i.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var s;try{s=l("./precomputed/secp256k1")}catch(c){s=void 0}u("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:i.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",s]})},{"../elliptic":229,"./precomputed/secp256k1":242,"hash.js":248}],236:[function(l,n,e){"use strict";function t(l){return this instanceof t?("string"==typeof l&&(a(i.curves.hasOwnProperty(l),"Unknown curve "+l),l=i.curves[l]),l instanceof i.curves.PresetCurve&&(l={curve:l}),this.curve=l.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=l.curve.g,this.g.precompute(l.curve.n.bitLength()+1),void(this.hash=l.hash||l.curve.hash)):new t(l)}var u=l("bn.js"),r=l("hmac-drbg"),i=l("../../elliptic"),o=i.utils,a=o.assert,s=l("./key"),c=l("./signature");n.exports=t,t.prototype.keyPair=function(l){return new s(this,l)},t.prototype.keyFromPrivate=function(l,n){return s.fromPrivate(this,l,n)},t.prototype.keyFromPublic=function(l,n){return s.fromPublic(this,l,n)},t.prototype.genKeyPair=function(l){l||(l={});for(var n=new r({hash:this.hash,pers:l.pers,persEnc:l.persEnc||"utf8",entropy:l.entropy||i.rand(this.hash.hmacStrength),entropyEnc:l.entropy&&l.entropyEnc||"utf8",nonce:this.n.toArray()}),e=this.n.byteLength(),t=this.n.sub(new u(2));;){var o=new u(n.generate(e));if(!(o.cmp(t)>0))return o.iaddn(1),this.keyFromPrivate(o)}},t.prototype._truncateToN=function(l,n){var e=8*l.byteLength()-this.n.bitLength();return e>0&&(l=l.ushrn(e)),!n&&l.cmp(this.n)>=0?l.sub(this.n):l},t.prototype.sign=function(l,n,e,t){"object"==typeof e&&(t=e,e=null),t||(t={}),n=this.keyFromPrivate(n,e),l=this._truncateToN(new u(l,16));for(var i=this.n.byteLength(),o=n.getPrivate().toArray("be",i),a=l.toArray("be",i),s=new r({hash:this.hash,entropy:o,nonce:a,pers:t.pers,persEnc:t.persEnc||"utf8"}),f=this.n.sub(new u(1)),h=0;!0;h++){var d=t.k?t.k(h):new u(s.generate(this.n.byteLength()));if(d=this._truncateToN(d,!0),!(d.cmpn(1)<=0||d.cmp(f)>=0)){var p=this.g.mul(d);if(!p.isInfinity()){var b=p.getX(),v=b.umod(this.n);if(0!==v.cmpn(0)){var _=d.invm(this.n).mul(v.mul(n.getPrivate()).iadd(l));if(_=_.umod(this.n),0!==_.cmpn(0)){var m=(p.getY().isOdd()?1:0)|(0!==b.cmp(v)?2:0);return t.canonical&&_.cmp(this.nh)>0&&(_=this.n.sub(_),m^=1),new c({r:v,s:_,recoveryParam:m})}}}}}},t.prototype.verify=function(l,n,e,t){l=this._truncateToN(new u(l,16)),e=this.keyFromPublic(e,t),n=new c(n,"hex");var r=n.r,i=n.s;if(r.cmpn(1)<0||r.cmp(this.n)>=0)return!1;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;var o=i.invm(this.n),a=o.mul(l).umod(this.n),s=o.mul(r).umod(this.n);if(!this.curve._maxwellTrick){var f=this.g.mulAdd(a,e.getPublic(),s);return!f.isInfinity()&&0===f.getX().umod(this.n).cmp(r)}var f=this.g.jmulAdd(a,e.getPublic(),s);return!f.isInfinity()&&f.eqXToP(r)},t.prototype.recoverPubKey=function(l,n,e,t){a((3&e)===e,"The recovery param is more than two bits"),n=new c(n,t);var r=this.n,i=new u(l),o=n.r,s=n.s,f=1&e,h=e>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&h)throw new Error("Unable to find sencond key candinate");o=h?this.curve.pointFromX(o.add(this.curve.n),f):this.curve.pointFromX(o,f);var d=n.r.invm(r),p=r.sub(i).mul(d).umod(r),b=s.mul(d).umod(r);return this.g.mulAdd(p,o,b)},t.prototype.getKeyRecoveryParam=function(l,n,e,t){if(n=new c(n,t),null!==n.recoveryParam)return n.recoveryParam;for(var u=0;u<4;u++){var r;try{r=this.recoverPubKey(l,n,u)}catch(l){continue}if(r.eq(e))return u}throw new Error("Unable to find valid recovery factor")}},{"../../elliptic":229,"./key":237,"./signature":238,"bn.js":44,"hmac-drbg":260}],237:[function(l,n,e){"use strict";function t(l,n){this.ec=l,this.priv=null,this.pub=null,n.priv&&this._importPrivate(n.priv,n.privEnc),n.pub&&this._importPublic(n.pub,n.pubEnc)}var u=l("bn.js"),r=l("../../elliptic"),i=r.utils,o=i.assert;n.exports=t,t.fromPublic=function(l,n,e){return n instanceof t?n:new t(l,{pub:n,pubEnc:e})},t.fromPrivate=function(l,n,e){return n instanceof t?n:new t(l,{priv:n,privEnc:e})},t.prototype.validate=function(){var l=this.getPublic();return l.isInfinity()?{result:!1,reason:"Invalid public key"}:l.validate()?l.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},t.prototype.getPublic=function(l,n){return"string"==typeof l&&(n=l,l=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),n?this.pub.encode(n,l):this.pub},t.prototype.getPrivate=function(l){return"hex"===l?this.priv.toString(16,2):this.priv},t.prototype._importPrivate=function(l,n){this.priv=new u(l,n||16),this.priv=this.priv.umod(this.ec.curve.n)},t.prototype._importPublic=function(l,n){return l.x||l.y?("mont"===this.ec.curve.type?o(l.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||o(l.x&&l.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(l.x,l.y))):void(this.pub=this.ec.curve.decodePoint(l,n))},t.prototype.derive=function(l){return l.mul(this.priv).getX()},t.prototype.sign=function(l,n,e){return this.ec.sign(l,this,n,e)},t.prototype.verify=function(l,n){return this.ec.verify(l,n,this)},t.prototype.inspect=function(){return""}},{"../../elliptic":229,"bn.js":44}],238:[function(l,n,e){"use strict";function t(l,n){return l instanceof t?l:void(this._importDER(l,n)||(f(l.r&&l.s,"Signature without r or s"),this.r=new a(l.r,16),this.s=new a(l.s,16),void 0===l.recoveryParam?this.recoveryParam=null:this.recoveryParam=l.recoveryParam))}function u(){this.place=0}function r(l,n){var e=l[n.place++];if(!(128&e))return e;for(var t=15&e,u=0,r=0,i=n.place;r>>3);for(l.push(128|e);--e;)l.push(n>>>(e<<3)&255);l.push(n)}var a=l("bn.js"),s=l("../../elliptic"),c=s.utils,f=c.assert;n.exports=t,t.prototype._importDER=function(l,n){l=c.toArray(l,n);var e=new u;if(48!==l[e.place++])return!1;var t=r(l,e);if(t+e.place!==l.length)return!1;if(2!==l[e.place++])return!1;var i=r(l,e),o=l.slice(e.place,i+e.place);if(e.place+=i,2!==l[e.place++])return!1;var s=r(l,e);if(l.length!==s+e.place)return!1;var f=l.slice(e.place,s+e.place);return 0===o[0]&&128&o[1]&&(o=o.slice(1)),0===f[0]&&128&f[1]&&(f=f.slice(1)),this.r=new a(o),this.s=new a(f),this.recoveryParam=null,!0},t.prototype.toDER=function(l){var n=this.r.toArray(),e=this.s.toArray();for(128&n[0]&&(n=[0].concat(n)),128&e[0]&&(e=[0].concat(e)),n=i(n),e=i(e);!(e[0]||128&e[1]);)e=e.slice(1);var t=[2];o(t,n.length),t=t.concat(n),t.push(2),o(t,e.length);var u=t.concat(e),r=[48];return o(r,u.length),r=r.concat(u),c.encode(r,l)}},{"../../elliptic":229,"bn.js":44}],239:[function(l,n,e){"use strict";function t(l){if(o("ed25519"===l,"only tested with ed25519 so far"),!(this instanceof t))return new t(l);var l=r.curves[l].curve;this.curve=l,this.g=l.g,this.g.precompute(l.n.bitLength()+1),this.pointClass=l.point().constructor,this.encodingLength=Math.ceil(l.n.bitLength()/8),this.hash=u.sha512}var u=l("hash.js"),r=l("../../elliptic"),i=r.utils,o=i.assert,a=i.parseBytes,s=l("./key"),c=l("./signature");n.exports=t,t.prototype.sign=function(l,n){l=a(l);var e=this.keyFromSecret(n),t=this.hashInt(e.messagePrefix(),l),u=this.g.mul(t),r=this.encodePoint(u),i=this.hashInt(r,e.pubBytes(),l).mul(e.priv()),o=t.add(i).umod(this.curve.n);return this.makeSignature({R:u,S:o,Rencoded:r})},t.prototype.verify=function(l,n,e){l=a(l),n=this.makeSignature(n);var t=this.keyFromPublic(e),u=this.hashInt(n.Rencoded(),t.pubBytes(),l),r=this.g.mul(n.S()),i=n.R().add(t.pub().mul(u));return i.eq(r)},t.prototype.hashInt=function(){for(var l=this.hash(),n=0;n=0;){var r;if(u.isOdd()){var i=u.andln(t-1);r=i>(t>>1)-1?(t>>1)-i:i,u.isubn(r)}else r=0;e.push(r);for(var o=0!==u.cmpn(0)&&0===u.andln(t-1)?n+1:1,a=1;a0||n.cmpn(-u)>0;){var r=l.andln(3)+t&3,i=n.andln(3)+u&3;3===r&&(r=-1),3===i&&(i=-1);var o;if(0===(1&r))o=0;else{var a=l.andln(7)+t&7;o=3!==a&&5!==a||2!==i?r:-r}e[0].push(o);var s;if(0===(1&i))s=0;else{var a=n.andln(7)+u&7;s=3!==a&&5!==a||2!==r?i:-i}e[1].push(s),2*t===o+1&&(t=1-t),2*u===s+1&&(u=1-u),l.iushrn(1),n.iushrn(1)}return e}function r(l,n,e){var t="_"+n;l.prototype[n]=function(){return void 0!==this[t]?this[t]:this[t]=e.call(this)}}function i(l){return"string"==typeof l?a.toArray(l,"hex"):l}function o(l){return new s(l,"hex","le")}var a=e,s=l("bn.js"),c=l("minimalistic-assert"),f=l("minimalistic-crypto-utils");a.assert=c,a.toArray=f.toArray,a.zero2=f.zero2,a.toHex=f.toHex,a.encode=f.encode,a.getNAF=t,a.getJSF=u,a.cachedProperty=r,a.parseBytes=i,a.intFromLE=o},{"bn.js":44,"minimalistic-assert":268,"minimalistic-crypto-utils":269}],244:[function(l,n,e){n.exports={_args:[["elliptic@6.4.0","/mnt/teamcity/work/b68e720cc0397b39"]],_development:!0,_from:"elliptic@6.4.0",_id:"elliptic@6.4.0",_inBundle:!1,_integrity:"sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=",_location:"/elliptic",_phantomChildren:{},_requested:{type:"version",registry:!0,raw:"elliptic@6.4.0",name:"elliptic",escapedName:"elliptic",rawSpec:"6.4.0",saveSpec:null,fetchSpec:"6.4.0"},_requiredBy:["/browserify-sign","/create-ecdh"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz",_spec:"6.4.0",_where:"/mnt/teamcity/work/b68e720cc0397b39",author:{name:"Fedor Indutny",email:"fedor@indutny.com"},bugs:{url:"https://github.com/indutny/elliptic/issues"},dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"},description:"EC cryptography",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},files:["lib"],homepage:"https://github.com/indutny/elliptic",keywords:["EC","Elliptic","curve","Cryptography"],license:"MIT",main:"lib/elliptic.js",name:"elliptic",repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",test:"npm run lint && npm run unit",unit:"istanbul test _mocha --reporter=spec test/index.js",version:"grunt dist && git add dist/"},version:"6.4.0"}},{}],245:[function(l,n,e){function t(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function u(l){return"function"==typeof l}function r(l){return"number"==typeof l}function i(l){return"object"==typeof l&&null!==l}function o(l){return void 0===l}n.exports=t,t.EventEmitter=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.prototype.setMaxListeners=function(l){if(!r(l)||l<0||isNaN(l))throw TypeError("n must be a positive number");return this._maxListeners=l,this},t.prototype.emit=function(l){var n,e,t,r,a,s;if(this._events||(this._events={}),"error"===l&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if(n=arguments[1],n instanceof Error)throw n;var c=new Error('Uncaught, unspecified "error" event. ('+n+")");throw c.context=n,c}if(e=this._events[l],o(e))return!1;if(u(e))switch(arguments.length){case 1:e.call(this);break;case 2:e.call(this,arguments[1]);break;case 3:e.call(this,arguments[1],arguments[2]);break;default:r=Array.prototype.slice.call(arguments,1),e.apply(this,r)}else if(i(e))for(r=Array.prototype.slice.call(arguments,1),s=e.slice(),t=s.length,a=0;a0&&this._events[l].length>e&&(this._events[l].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[l].length),"function"==typeof console.trace&&console.trace())),this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(l,n){function e(){this.removeListener(l,e),t||(t=!0,n.apply(this,arguments))}if(!u(n))throw TypeError("listener must be a function");var t=!1;return e.listener=n,this.on(l,e),this},t.prototype.removeListener=function(l,n){var e,t,r,o;if(!u(n))throw TypeError("listener must be a function");if(!this._events||!this._events[l])return this;if(e=this._events[l],r=e.length,t=-1,e===n||u(e.listener)&&e.listener===n)delete this._events[l],this._events.removeListener&&this.emit("removeListener",l,n);else if(i(e)){for(o=r;o-- >0;)if(e[o]===n||e[o].listener&&e[o].listener===n){t=o;break}if(t<0)return this;1===e.length?(e.length=0,delete this._events[l]):e.splice(t,1),this._events.removeListener&&this.emit("removeListener",l,n)}return this},t.prototype.removeAllListeners=function(l){var n,e;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[l]&&delete this._events[l],this;if(0===arguments.length){for(n in this._events)"removeListener"!==n&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events={},this}if(e=this._events[l],u(e))this.removeListener(l,e);else if(e)for(;e.length;)this.removeListener(l,e[e.length-1]);return delete this._events[l],this},t.prototype.listeners=function(l){var n;return n=this._events&&this._events[l]?u(this._events[l])?[this._events[l]]:this._events[l].slice():[]},t.prototype.listenerCount=function(l){if(this._events){var n=this._events[l];if(u(n))return 1;if(n)return n.length}return 0},t.listenerCount=function(l,n){return l.listenerCount(n)}},{}],246:[function(l,n,e){function t(l,n,e,t){if(u.isBuffer(l)||(l=u.from(l,"binary")),n&&(u.isBuffer(n)||(n=u.from(n,"binary")),8!==n.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var i=e/8,o=u.alloc(i),a=u.alloc(t||0),s=u.alloc(0);i>0||t>0;){var c=new r;c.update(s),c.update(l),n&&c.update(n),s=c.digest();var f=0;if(i>0){var h=o.length-i;f=Math.min(i,s.length),s.copy(o,h,0,f),i-=f}if(f0){var d=a.length-t,p=Math.min(t,s.length-f);s.copy(a,d,f,f+p),t-=p}}return s.fill(0),{key:o,iv:a}}var u=l("safe-buffer").Buffer,r=l("md5.js");n.exports=t},{"md5.js":266,"safe-buffer":307}],247:[function(l,n,e){"use strict";function t(l,n){if(!r.isBuffer(l)&&"string"!=typeof l)throw new TypeError(n+" must be a string or a buffer")}function u(l){i.call(this),this._block=r.allocUnsafe(l),this._blockSize=l,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}var r=l("safe-buffer").Buffer,i=l("stream").Transform,o=l("inherits");o(u,i),u.prototype._transform=function(l,n,e){var t=null;try{this.update(l,n)}catch(u){t=u}e(t)},u.prototype._flush=function(l){var n=null;try{this.push(this.digest())}catch(e){n=e}l(n)},u.prototype.update=function(l,n){if(t(l,"Data"),this._finalized)throw new Error("Digest already called");r.isBuffer(l)||(l=r.from(l,n));for(var e=this._block,u=0;this._blockOffset+l.length-u>=this._blockSize;){for(var i=this._blockOffset;i0;++o)this._length[o]+=a,a=this._length[o]/4294967296|0,a>0&&(this._length[o]-=4294967296*a);return this},u.prototype._update=function(){throw new Error("_update is not implemented")},u.prototype.digest=function(l){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var n=this._digest();void 0!==l&&(n=n.toString(l)),this._block.fill(0),this._blockOffset=0;for(var e=0;e<4;++e)this._length[e]=0;return n},u.prototype._digest=function(){throw new Error("_digest is not implemented")},n.exports=u},{inherits:263,"safe-buffer":307,stream:316}],248:[function(l,n,e){var t=e;t.utils=l("./hash/utils"),t.common=l("./hash/common"),t.sha=l("./hash/sha"),t.ripemd=l("./hash/ripemd"),t.hmac=l("./hash/hmac"),t.sha1=t.sha.sha1,t.sha256=t.sha.sha256,t.sha224=t.sha.sha224,t.sha384=t.sha.sha384,t.sha512=t.sha.sha512,t.ripemd160=t.ripemd.ripemd160},{"./hash/common":249,"./hash/hmac":250,"./hash/ripemd":251,"./hash/sha":252,"./hash/utils":259}],249:[function(l,n,e){"use strict";function t(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}var u=l("./utils"),r=l("minimalistic-assert");e.BlockHash=t,t.prototype.update=function(l,n){if(l=u.toArray(l,n),this.pending?this.pending=this.pending.concat(l):this.pending=l,this.pendingTotal+=l.length,this.pending.length>=this._delta8){l=this.pending;var e=l.length%this._delta8;this.pending=l.slice(l.length-e,l.length),0===this.pending.length&&(this.pending=null),l=u.join32(l,0,l.length-e,this.endian);for(var t=0;t>>24&255,t[u++]=l>>>16&255,t[u++]=l>>>8&255,t[u++]=255&l}else for(t[u++]=255&l,t[u++]=l>>>8&255,t[u++]=l>>>16&255,t[u++]=l>>>24&255,t[u++]=0,t[u++]=0,t[u++]=0,t[u++]=0,r=8;rthis.blockSize&&(l=(new this.Hash).update(l).digest()),r(l.length<=this.blockSize);for(var n=l.length;n>>3}function c(l){return h(l,17)^h(l,19)^l>>>10}var f=l("../utils"),h=f.rotr32;e.ft_1=t,e.ch32=u,e.maj32=r,e.p32=i,e.s0_256=o,e.s1_256=a,e.g0_256=s,e.g1_256=c},{"../utils":259}],259:[function(l,n,e){"use strict";function t(l,n){if(Array.isArray(l))return l.slice();if(!l)return[];var e=[];if("string"==typeof l)if(n){if("hex"===n)for(l=l.replace(/[^a-z0-9]+/gi,""),l.length%2!==0&&(l="0"+l),t=0;t>8,i=255&u;r?e.push(r,i):e.push(i)}else for(t=0;t>>24|l>>>8&65280|l<<8&16711680|(255&l)<<24;return n>>>0}function i(l,n){for(var e="",t=0;t>>0}return r}function c(l,n){for(var e=new Array(4*l.length),t=0,u=0;t>>24,e[u+1]=r>>>16&255,e[u+2]=r>>>8&255,e[u+3]=255&r):(e[u+3]=r>>>24,e[u+2]=r>>>16&255,e[u+1]=r>>>8&255,e[u]=255&r)}return e}function f(l,n){return l>>>n|l<<32-n}function h(l,n){return l<>>32-n}function d(l,n){return l+n>>>0}function p(l,n,e){return l+n+e>>>0}function b(l,n,e,t){return l+n+e+t>>>0}function v(l,n,e,t,u){return l+n+e+t+u>>>0}function _(l,n,e,t){var u=l[n],r=l[n+1],i=t+r>>>0,o=(i>>0,l[n+1]=i}function m(l,n,e,t){var u=n+t>>>0,r=(u>>0}function y(l,n,e,t){var u=n+t;return u>>>0}function g(l,n,e,t,u,r,i,o){var a=0,s=n;s=s+t>>>0,a+=s>>0,a+=s>>0,a+=s>>0}function w(l,n,e,t,u,r,i,o){var a=n+t+r+o;return a>>>0}function k(l,n,e,t,u,r,i,o,a,s){var c=0,f=n;f=f+t>>>0,c+=f>>0,c+=f>>0,c+=f>>0,c+=f>>0}function S(l,n,e,t,u,r,i,o,a,s){var c=n+t+r+o+s;return c>>>0}function E(l,n,e){var t=n<<32-e|l>>>e;return t>>>0}function I(l,n,e){var t=l<<32-e|n>>>e;return t>>>0}function C(l,n,e){return l>>>e}function j(l,n,e){var t=l<<32-e|n>>>e;return t>>>0}var M=l("minimalistic-assert"),A=l("inherits");e.inherits=A,e.toArray=t,e.toHex=u,e.htonl=r,e.toHex32=i,e.zero2=o,e.zero8=a,e.join32=s,e.split32=c,e.rotr32=f,e.rotl32=h,e.sum32=d,e.sum32_3=p,e.sum32_4=b,e.sum32_5=v,e.sum64=_,e.sum64_hi=m,e.sum64_lo=y,e.sum64_4_hi=g,e.sum64_4_lo=w,e.sum64_5_hi=k,e.sum64_5_lo=S,e.rotr64_hi=E,e.rotr64_lo=I,e.shr64_hi=C,e.shr64_lo=j},{inherits:263,"minimalistic-assert":268}],260:[function(l,n,e){"use strict";function t(l){if(!(this instanceof t))return new t(l);this.hash=l.hash,this.predResist=!!l.predResist,this.outLen=this.hash.outSize,this.minEntropy=l.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var n=r.toArray(l.entropy,l.entropyEnc||"hex"),e=r.toArray(l.nonce,l.nonceEnc||"hex"),u=r.toArray(l.pers,l.persEnc||"hex");i(n.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(n,e,u)}var u=l("hash.js"),r=l("minimalistic-crypto-utils"),i=l("minimalistic-assert");n.exports=t,t.prototype._init=function(l,n,e){var t=l.concat(n).concat(e);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var u=0;u=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(l.concat(e||[])),this._reseed=1},t.prototype.generate=function(l,n,e,t){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof n&&(t=e,e=n,n=null),e&&(e=r.toArray(e,t||"hex"),this._update(e));for(var u=[];u.length>1,c=-7,f=e?u-1:0,h=e?-1:1,d=l[n+f];for(f+=h,r=d&(1<<-c)-1,d>>=-c,c+=o;c>0;r=256*r+l[n+f],f+=h,c-=8);for(i=r&(1<<-c)-1,r>>=-c,c+=t;c>0;i=256*i+l[n+f],f+=h,c-=8);if(0===r)r=1-s;else{if(r===a)return i?NaN:(d?-1:1)*(1/0);i+=Math.pow(2,t),r-=s}return(d?-1:1)*i*Math.pow(2,r-t)},e.write=function(l,n,e,t,u,r){var i,o,a,s=8*r-u-1,c=(1<>1,h=23===u?Math.pow(2,-24)-Math.pow(2,-77):0,d=t?0:r-1,p=t?1:-1,b=n<0||0===n&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(o=isNaN(n)?1:0,i=c):(i=Math.floor(Math.log(n)/Math.LN2),n*(a=Math.pow(2,-i))<1&&(i--,a*=2),n+=i+f>=1?h/a:h*Math.pow(2,1-f),n*a>=2&&(i++,a/=2),i+f>=c?(o=0,i=c):i+f>=1?(o=(n*a-1)*Math.pow(2,u),i+=f):(o=n*Math.pow(2,f-1)*Math.pow(2,u),i=0));u>=8;l[e+d]=255&o,d+=p,o/=256,u-=8);for(i=i<0;l[e+d]=255&i,d+=p,i/=256,s-=8);l[e+d-p]|=128*b}},{}],262:[function(l,n,e){var t=[].indexOf;n.exports=function(l,n){if(t)return l.indexOf(n);for(var e=0;e>>32-n}function r(l,n,e,t,r,i,o){return u(l+(n&e|~n&t)+r+i|0,o)+n|0}function i(l,n,e,t,r,i,o){return u(l+(n&t|e&~t)+r+i|0,o)+n|0}function o(l,n,e,t,r,i,o){return u(l+(n^e^t)+r+i|0,o)+n|0}function a(l,n,e,t,r,i,o){return u(l+(e^(n|~t))+r+i|0,o)+n|0}var s=l("inherits"),c=l("hash-base"),f=new Array(16);s(t,c),t.prototype._update=function(){for(var l=f,n=0;n<16;++n)l[n]=this._block.readInt32LE(4*n);var e=this._a,t=this._b,u=this._c,s=this._d;e=r(e,t,u,s,l[0],3614090360,7),s=r(s,e,t,u,l[1],3905402710,12),u=r(u,s,e,t,l[2],606105819,17),t=r(t,u,s,e,l[3],3250441966,22),e=r(e,t,u,s,l[4],4118548399,7),s=r(s,e,t,u,l[5],1200080426,12),u=r(u,s,e,t,l[6],2821735955,17),t=r(t,u,s,e,l[7],4249261313,22),e=r(e,t,u,s,l[8],1770035416,7),s=r(s,e,t,u,l[9],2336552879,12),u=r(u,s,e,t,l[10],4294925233,17),t=r(t,u,s,e,l[11],2304563134,22),e=r(e,t,u,s,l[12],1804603682,7),s=r(s,e,t,u,l[13],4254626195,12),u=r(u,s,e,t,l[14],2792965006,17),t=r(t,u,s,e,l[15],1236535329,22),e=i(e,t,u,s,l[1],4129170786,5),s=i(s,e,t,u,l[6],3225465664,9),u=i(u,s,e,t,l[11],643717713,14),t=i(t,u,s,e,l[0],3921069994,20),e=i(e,t,u,s,l[5],3593408605,5),s=i(s,e,t,u,l[10],38016083,9),u=i(u,s,e,t,l[15],3634488961,14),t=i(t,u,s,e,l[4],3889429448,20),e=i(e,t,u,s,l[9],568446438,5),s=i(s,e,t,u,l[14],3275163606,9),u=i(u,s,e,t,l[3],4107603335,14),t=i(t,u,s,e,l[8],1163531501,20),e=i(e,t,u,s,l[13],2850285829,5),s=i(s,e,t,u,l[2],4243563512,9),u=i(u,s,e,t,l[7],1735328473,14),t=i(t,u,s,e,l[12],2368359562,20),e=o(e,t,u,s,l[5],4294588738,4),s=o(s,e,t,u,l[8],2272392833,11),u=o(u,s,e,t,l[11],1839030562,16),t=o(t,u,s,e,l[14],4259657740,23),e=o(e,t,u,s,l[1],2763975236,4),s=o(s,e,t,u,l[4],1272893353,11),u=o(u,s,e,t,l[7],4139469664,16),t=o(t,u,s,e,l[10],3200236656,23),e=o(e,t,u,s,l[13],681279174,4),s=o(s,e,t,u,l[0],3936430074,11),u=o(u,s,e,t,l[3],3572445317,16),t=o(t,u,s,e,l[6],76029189,23),e=o(e,t,u,s,l[9],3654602809,4),s=o(s,e,t,u,l[12],3873151461,11),u=o(u,s,e,t,l[15],530742520,16),t=o(t,u,s,e,l[2],3299628645,23),e=a(e,t,u,s,l[0],4096336452,6),s=a(s,e,t,u,l[7],1126891415,10),u=a(u,s,e,t,l[14],2878612391,15),t=a(t,u,s,e,l[5],4237533241,21),e=a(e,t,u,s,l[12],1700485571,6),s=a(s,e,t,u,l[3],2399980690,10),u=a(u,s,e,t,l[10],4293915773,15),t=a(t,u,s,e,l[1],2240044497,21),e=a(e,t,u,s,l[8],1873313359,6),s=a(s,e,t,u,l[15],4264355552,10),u=a(u,s,e,t,l[6],2734768916,15),t=a(t,u,s,e,l[13],1309151649,21),e=a(e,t,u,s,l[4],4149444226,6),s=a(s,e,t,u,l[11],3174756917,10),u=a(u,s,e,t,l[2],718787259,15),t=a(t,u,s,e,l[9],3951481745,21),this._a=this._a+e|0,this._b=this._b+t|0,this._c=this._c+u|0,this._d=this._d+s|0},t.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64), this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var l=new e(16);return l.writeInt32LE(this._a,0),l.writeInt32LE(this._b,4),l.writeInt32LE(this._c,8),l.writeInt32LE(this._d,12),l},n.exports=t}).call(this,l("buffer").Buffer)},{buffer:76,"hash-base":247,inherits:263}],267:[function(l,n,e){function t(l){this.rand=l||new r.Rand}var u=l("bn.js"),r=l("brorand");n.exports=t,t.create=function(l){return new t(l)},t.prototype._randbelow=function(l){var n=l.bitLength(),e=Math.ceil(n/8);do var t=new u(this.rand.generate(e));while(t.cmp(l)>=0);return t},t.prototype._randrange=function(l,n){var e=n.sub(l);return l.add(this._randbelow(e))},t.prototype.test=function(l,n,e){var t=l.bitLength(),r=u.mont(l),i=new u(1).toRed(r);n||(n=Math.max(1,t/48|0));for(var o=l.subn(1),a=0;!o.testn(a);a++);for(var s=l.shrn(a),c=o.toRed(r),f=!0;n>0;n--){var h=this._randrange(new u(2),o);e&&e(h);var d=h.toRed(r).redPow(s);if(0!==d.cmp(i)&&0!==d.cmp(c)){for(var p=1;p0;n--){var c=this._randrange(new u(2),i),f=l.gcd(c);if(0!==f.cmpn(1))return f;var h=c.toRed(t).redPow(a);if(0!==h.cmp(r)&&0!==h.cmp(s)){for(var d=1;d>8,i=255&u;r?e.push(r,i):e.push(i)}return e}function u(l){return 1===l.length?"0"+l:l}function r(l){for(var n="",e=0;e=0;t--){var u=l[t];"."===u?l.splice(t,1):".."===u?(l.splice(t,1),e++):e&&(l.splice(t,1),e--)}if(n)for(;e--;e)l.unshift("..");return l}function t(l,n){if(l.filter)return l.filter(n);for(var e=[],t=0;t=-1&&!u;r--){var i=r>=0?arguments[r]:l.cwd();if("string"!=typeof i)throw new TypeError("Arguments to path.resolve must be strings");i&&(e=i+"/"+e,u="/"===i.charAt(0))}return e=n(t(e.split("/"),function(l){return!!l}),!u).join("/"),(u?"/":"")+e||"."},e.normalize=function(l){var u=e.isAbsolute(l),r="/"===i(l,-1);return l=n(t(l.split("/"),function(l){return!!l}),!u).join("/"),l||u||(l="."),l&&r&&(l+="/"),(u?"/":"")+l},e.isAbsolute=function(l){return"/"===l.charAt(0)},e.join=function(){var l=Array.prototype.slice.call(arguments,0);return e.normalize(t(l,function(l,n){if("string"!=typeof l)throw new TypeError("Arguments to path.join must be strings");return l}).join("/"))},e.relative=function(l,n){function t(l){for(var n=0;n=0&&""===l[e];e--);return n>e?[]:l.slice(n,e-n+1)}l=e.resolve(l).substr(1),n=e.resolve(n).substr(1);for(var u=t(l.split("/")),r=t(n.split("/")),i=Math.min(u.length,r.length),o=i,a=0;a=6?"utf-8":"binary"}n.exports=e}).call(this,l("_process"))},{_process:283}],280:[function(l,n,e){(function(l){function e(n,e){if("string"!=typeof n&&!l.isBuffer(n))throw new TypeError(e+" must be a buffer or string")}var t=Math.pow(2,30)-1;n.exports=function(l,n,u,r){if(e(l,"Password"),e(n,"Salt"),"number"!=typeof u)throw new TypeError("Iterations not a number");if(u<0)throw new TypeError("Bad iterations");if("number"!=typeof r)throw new TypeError("Key length not a number");if(r<0||r>t||r!==r)throw new TypeError("Bad key length")}}).call(this,{isBuffer:l("../../is-buffer/index.js")})},{"../../is-buffer/index.js":264}],281:[function(l,n,e){function t(l,n,e){var t=u(l),r="sha512"===l||"sha384"===l?128:64;n.length>r?n=t(n):n.length1)for(var e=1;e=n.length){r++;break}var i=n.slice(2,u-1);n.slice(u-1,u);if(("0002"!==t.toString("hex")&&!e||"0001"!==t.toString("hex")&&e)&&r++,i.length<8&&r++,r)throw new Error("decryption error");return n.slice(u)}function r(l,n){l=new e(l),n=new e(n);var t=0,u=l.length;l.length!==n.length&&(t++,u=Math.min(l.length,n.length));for(var r=-1;++rf||new s(n).cmp(a.modulus)>=0)throw new Error("decryption error");var d;d=r?h(new s(n),a):c(n,a);var p=new e(f-d.length);if(p.fill(0),d=e.concat([p,d],f),4===o)return t(a,d);if(1===o)return u(a,d,r);if(3===o)return d;throw new Error("unknown padding")}}).call(this,l("buffer").Buffer)},{"./mgf":285,"./withPublic":288,"./xor":289,"bn.js":44,"browserify-rsa":67,buffer:76,"create-hash":214,"parse-asn1":275}],287:[function(l,n,e){(function(e){function t(l,n){var t=l.modulus.byteLength(),u=n.length,r=a("sha1").update(new e("")).digest(),i=r.length,h=2*i;if(u>t-h-2)throw new Error("message too long");var d=new e(t-u-h-2);d.fill(0);var p=t-i-1,b=o(i),v=c(e.concat([r,d,new e([1]),n],p),s(b,p)),_=c(b,s(v,i));return new f(e.concat([new e([0]),_,v],t))}function u(l,n,t){var u=n.length,i=l.modulus.byteLength();if(u>i-11)throw new Error("message too long");var o;return t?(o=new e(i-u-3),o.fill(255)):o=r(i-u-3),new f(e.concat([new e([0,t?1:2]),o,new e([0]),n],i))}function r(l,n){for(var t,u=new e(l),r=0,i=o(2*l),a=0;r=0)throw new Error("data too long for modulus")}return e?d(o,a):h(o,a)}}).call(this,l("buffer").Buffer)},{"./mgf":285,"./withPublic":288,"./xor":289,"bn.js":44,"browserify-rsa":67,buffer:76,"create-hash":214,"parse-asn1":275,randombytes:290}],288:[function(l,n,e){(function(e){function t(l,n){return new e(l.toRed(u.mont(n.modulus)).redPow(new u(n.publicExponent)).fromRed().toArray())}var u=l("bn.js");n.exports=t}).call(this,l("buffer").Buffer)},{"bn.js":44,buffer:76}],289:[function(l,n,e){n.exports=function(l,n){for(var e=l.length,t=-1;++t65536)throw new Error("requested too many random bytes");var u=new t.Uint8Array(l);l>0&&o.getRandomValues(u);var r=i.from(u.buffer);return"function"==typeof n?e.nextTick(function(){n(null,r)}):r}var i=l("safe-buffer").Buffer,o=t.crypto||t.msCrypto;o&&o.getRandomValues?n.exports=r:n.exports=u}).call(this,l("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:283,"safe-buffer":307}],291:[function(l,n,e){(function(n,t){"use strict";function u(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}function r(l,n){if("number"!=typeof l||l!==l)throw new TypeError("offset must be a number");if(l>b||l<0)throw new TypeError("offset must be a uint32");if(l>d||l>n)throw new RangeError("offset out of range")}function i(l,n,e){if("number"!=typeof l||l!==l)throw new TypeError("size must be a number");if(l>b||l<0)throw new TypeError("size must be a uint32");if(l+n>e||l>d)throw new RangeError("buffer too small")}function o(l,n,e,u){if(!(h.isBuffer(l)||l instanceof t.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof n)u=n,n=0,e=l.length;else if("function"==typeof e)u=e,e=l.length-n;else if("function"!=typeof u)throw new TypeError('"cb" argument must be a function');return r(n,l.length),i(e,n,l.length),a(l,n,e,u)}function a(l,e,t,u){if(n.browser){var r=l.buffer,i=new Uint8Array(r,e,t);return p.getRandomValues(i),u?void n.nextTick(function(){u(null,l)}):l}if(u)return void f(t,function(n,t){return n?u(n):(t.copy(l,e),void u(null,l))});var o=f(t);return o.copy(l,e),l}function s(l,n,e){if("undefined"==typeof n&&(n=0),!(h.isBuffer(l)||l instanceof t.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return r(n,l.length),void 0===e&&(e=l.length-n),i(e,n,l.length),a(l,n,e)}var c=l("safe-buffer"),f=l("randombytes"),h=c.Buffer,d=c.kMaxLength,p=t.crypto||t.msCrypto,b=Math.pow(2,32)-1;p&&p.getRandomValues||!n.browser?(e.randomFill=o,e.randomFillSync=s):(e.randomFill=u,e.randomFillSync=u)}).call(this,l("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:283,randombytes:290,"safe-buffer":307}],292:[function(l,n,e){n.exports=l("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":293}],293:[function(l,n,e){"use strict";function t(l){return this instanceof t?(s.call(this,l),c.call(this,l),l&&l.readable===!1&&(this.readable=!1),l&&l.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,l&&l.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",u)):new t(l)}function u(){this.allowHalfOpen||this._writableState.ended||i.nextTick(r,this)}function r(l){l.end()}var i=l("process-nextick-args"),o=Object.keys||function(l){var n=[];for(var e in l)n.push(e);return n};n.exports=t;var a=l("core-util-is");a.inherits=l("inherits");var s=l("./_stream_readable"),c=l("./_stream_writable");a.inherits(t,s);for(var f=o(c.prototype),h=0;h0?("string"==typeof n||i.objectMode||Object.getPrototypeOf(n)===U.prototype||(n=u(n)),t?i.endEmitted?l.emit("error",new Error("stream.unshift() after end event")):c(l,i,n,!0):i.ended?l.emit("error",new Error("stream.push() after EOF")):(i.reading=!1,i.decoder&&!e?(n=i.decoder.write(n),i.objectMode||0!==n.length?c(l,i,n,!1):m(l,i)):c(l,i,n,!1))):t||(i.reading=!1)}return h(i)}function c(l,n,e,t){n.flowing&&0===n.length&&!n.sync?(l.emit("data",e),l.read(0)):(n.length+=n.objectMode?1:e.length,t?n.buffer.unshift(e):n.buffer.push(e),n.needReadable&&v(l)),m(l,n)}function f(l,n){var e;return r(n)||"string"==typeof n||void 0===n||l.objectMode||(e=new TypeError("Invalid non-string/buffer chunk")),e}function h(l){return!l.ended&&(l.needReadable||l.length=W?l=W:(l--,l|=l>>>1,l|=l>>>2,l|=l>>>4,l|=l>>>8,l|=l>>>16,l++),l}function p(l,n){return l<=0||0===n.length&&n.ended?0:n.objectMode?1:l!==l?n.flowing&&n.length?n.buffer.head.data.length:n.length:(l>n.highWaterMark&&(n.highWaterMark=d(l)),l<=n.length?l:n.ended?n.length:(n.needReadable=!0,0))}function b(l,n){if(!n.ended){if(n.decoder){var e=n.decoder.end();e&&e.length&&(n.buffer.push(e),n.length+=n.objectMode?1:e.length)}n.ended=!0,v(l)}}function v(l){var n=l._readableState;n.needReadable=!1,n.emittedReadable||(q("emitReadable",n.flowing),n.emittedReadable=!0,n.sync?R.nextTick(_,l):_(l))}function _(l){q("emit readable"),l.emit("readable"),E(l)}function m(l,n){n.readingMore||(n.readingMore=!0,R.nextTick(y,l,n))}function y(l,n){for(var e=n.length;!n.reading&&!n.flowing&&!n.ended&&n.length=n.length?(e=n.decoder?n.buffer.join(""):1===n.buffer.length?n.buffer.head.data:n.buffer.concat(n.length),n.buffer.clear()):e=C(l,n.buffer,n.decoder),e}function C(l,n,e){var t;return lr.length?r.length:l;if(u+=i===r.length?r:r.slice(0,l),l-=i,0===l){i===r.length?(++t,e.next?n.head=e.next:n.head=n.tail=null):(n.head=e,e.data=r.slice(i));break}++t}return n.length-=t,u}function M(l,n){var e=U.allocUnsafe(l),t=n.head,u=1;for(t.data.copy(e),l-=t.data.length;t=t.next;){var r=t.data,i=l>r.length?r.length:l;if(r.copy(e,e.length-l,0,i),l-=i,0===l){i===r.length?(++u,t.next?n.head=t.next:n.head=n.tail=null):(n.head=t,t.data=r.slice(i));break}++u}return n.length-=u,e}function A(l){var n=l._readableState;if(n.length>0)throw new Error('"endReadable()" called on non-empty stream');n.endEmitted||(n.ended=!0,R.nextTick(x,n,l)); }function x(l,n){l.endEmitted||0!==l.length||(l.endEmitted=!0,n.readable=!1,n.emit("end"))}function T(l,n){for(var e=0,t=l.length;e=n.highWaterMark||n.ended))return q("read: emitReadable",n.length,n.ended),0===n.length&&n.ended?A(this):v(this),null;if(l=p(l,n),0===l&&n.ended)return 0===n.length&&A(this),null;var t=n.needReadable;q("need readable",t),(0===n.length||n.length-l0?I(l,n):null,null===u?(n.needReadable=!0,l=0):n.length-=l,0===n.length&&(n.ended||(n.needReadable=!0),e!==l&&n.ended&&A(this)),null!==u&&this.emit("data",u),u},a.prototype._read=function(l){this.emit("error",new Error("_read() is not implemented"))},a.prototype.pipe=function(l,n){function t(l,n){q("onunpipe"),l===h&&n&&n.hasUnpiped===!1&&(n.hasUnpiped=!0,r())}function u(){q("onend"),l.end()}function r(){q("cleanup"),l.removeListener("close",s),l.removeListener("finish",c),l.removeListener("drain",v),l.removeListener("error",a),l.removeListener("unpipe",t),h.removeListener("end",u),h.removeListener("end",f),h.removeListener("data",o),_=!0,!d.awaitDrain||l._writableState&&!l._writableState.needDrain||v()}function o(n){q("ondata"),m=!1;var e=l.write(n);!1!==e||m||((1===d.pipesCount&&d.pipes===l||d.pipesCount>1&&T(d.pipes,l)!==-1)&&!_&&(q("false write response, pause",h._readableState.awaitDrain),h._readableState.awaitDrain++,m=!0),h.pause())}function a(n){q("onerror",n),f(),l.removeListener("error",a),0===N(l,"error")&&l.emit("error",n)}function s(){l.removeListener("finish",c),f()}function c(){q("onfinish"),l.removeListener("close",s),f()}function f(){q("unpipe"),h.unpipe(l)}var h=this,d=this._readableState;switch(d.pipesCount){case 0:d.pipes=l;break;case 1:d.pipes=[d.pipes,l];break;default:d.pipes.push(l)}d.pipesCount+=1,q("pipe count=%d opts=%j",d.pipesCount,n);var p=(!n||n.end!==!1)&&l!==e.stdout&&l!==e.stderr,b=p?u:f;d.endEmitted?R.nextTick(b):h.once("end",b),l.on("unpipe",t);var v=g(h);l.on("drain",v);var _=!1,m=!1;return h.on("data",o),i(l,"error",a),l.once("close",s),l.once("finish",c),l.emit("pipe",h),d.flowing||(q("pipe resume"),h.resume()),l},a.prototype.unpipe=function(l){var n=this._readableState,e={hasUnpiped:!1};if(0===n.pipesCount)return this;if(1===n.pipesCount)return l&&l!==n.pipes?this:(l||(l=n.pipes),n.pipes=null,n.pipesCount=0,n.flowing=!1,l&&l.emit("unpipe",this,e),this);if(!l){var t=n.pipes,u=n.pipesCount;n.pipes=null,n.pipesCount=0,n.flowing=!1;for(var r=0;r-1?u:M.nextTick;c.WritableState=s;var T=l("core-util-is");T.inherits=l("inherits");var R={deprecate:l("util-deprecate")},O=l("./internal/streams/stream"),P=l("safe-buffer").Buffer,N=t.Uint8Array||function(){},B=l("./internal/streams/destroy");T.inherits(c,O),s.prototype.getBuffer=function(){for(var l=this.bufferedRequest,n=[];l;)n.push(l),l=l.next;return n},function(){try{Object.defineProperty(s.prototype,"buffer",{get:R.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(l){}}();var U;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(U=Function.prototype[Symbol.hasInstance],Object.defineProperty(c,Symbol.hasInstance,{value:function(l){return!!U.call(this,l)||this===c&&(l&&l._writableState instanceof s)}})):U=function(l){return l instanceof this},c.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},c.prototype.write=function(l,n,e){var t=this._writableState,u=!1,r=!t.objectMode&&o(l);return r&&!P.isBuffer(l)&&(l=i(l)),"function"==typeof n&&(e=n,n=null),r?n="buffer":n||(n=t.defaultEncoding),"function"!=typeof e&&(e=a),t.ended?f(this,e):(r||h(this,t,l,e))&&(t.pendingcb++,u=p(this,t,r,l,n,e)),u},c.prototype.cork=function(){var l=this._writableState;l.corked++},c.prototype.uncork=function(){var l=this._writableState;l.corked&&(l.corked--,l.writing||l.corked||l.finished||l.bufferProcessing||!l.bufferedRequest||w(this,l))},c.prototype.setDefaultEncoding=function(l){if("string"==typeof l&&(l=l.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((l+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+l);return this._writableState.defaultEncoding=l,this},Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),c.prototype._write=function(l,n,e){e(new Error("_write() is not implemented"))},c.prototype._writev=null,c.prototype.end=function(l,n,e){var t=this._writableState;"function"==typeof l?(e=l,l=null,n=null):"function"==typeof n&&(e=n,n=null),null!==l&&void 0!==l&&this.write(l,n),t.corked&&(t.corked=1,this.uncork()),t.ending||t.finished||C(this,t,e)},Object.defineProperty(c.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(l){this._writableState&&(this._writableState.destroyed=l)}}),c.prototype.destroy=B.destroy,c.prototype._undestroy=B.undestroy,c.prototype._destroy=function(l,n){this.end(),n(l)}}).call(this,l("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},l("timers").setImmediate)},{"./_stream_duplex":293,"./internal/streams/destroy":299,"./internal/streams/stream":300,_process:283,"core-util-is":212,inherits:263,"process-nextick-args":282,"safe-buffer":307,timers:318,"util-deprecate":320}],298:[function(l,n,e){"use strict";function t(l,n){if(!(l instanceof n))throw new TypeError("Cannot call a class as a function")}function u(l,n,e){l.copy(n,e)}var r=l("safe-buffer").Buffer,i=l("util");n.exports=function(){function l(){t(this,l),this.head=null,this.tail=null,this.length=0}return l.prototype.push=function(l){var n={data:l,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},l.prototype.unshift=function(l){var n={data:l,next:this.head};0===this.length&&(this.tail=n),this.head=n,++this.length},l.prototype.shift=function(){if(0!==this.length){var l=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,l}},l.prototype.clear=function(){this.head=this.tail=null,this.length=0},l.prototype.join=function(l){if(0===this.length)return"";for(var n=this.head,e=""+n.data;n=n.next;)e+=l+n.data;return e},l.prototype.concat=function(l){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var n=r.allocUnsafe(l>>>0),e=this.head,t=0;e;)u(e.data,n,t),t+=e.data.length,e=e.next;return n},l}(),i&&i.inspect&&i.inspect.custom&&(n.exports.prototype[i.inspect.custom]=function(){var l=i.inspect({length:this.length});return this.constructor.name+" "+l})},{"safe-buffer":307,util:46}],299:[function(l,n,e){"use strict";function t(l,n){var e=this,t=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return t||u?(n?n(l):!l||this._writableState&&this._writableState.errorEmitted||i.nextTick(r,this,l),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(l||null,function(l){!n&&l?(i.nextTick(r,e,l),e._writableState&&(e._writableState.errorEmitted=!0)):n&&n(l)}),this)}function u(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function r(l,n){l.emit("error",n)}var i=l("process-nextick-args");n.exports={destroy:t,undestroy:u}},{"process-nextick-args":282}],300:[function(l,n,e){n.exports=l("events").EventEmitter},{events:245}],301:[function(l,n,e){"use strict";function t(l){if(!l)return"utf8";for(var n;;)switch(l){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return l;default:if(n)return;l=(""+l).toLowerCase(),n=!0}}function u(l){var n=t(l);if("string"!=typeof n&&(m.isEncoding===y||!y(l)))throw new Error("Unknown encoding: "+l);return n||l}function r(l){this.encoding=u(l);var n;switch(this.encoding){case"utf16le":this.text=h,this.end=d,n=4;break;case"utf8":this.fillLast=s,n=4;break;case"base64":this.text=p,this.end=b,n=3;break;default:return this.write=v,void(this.end=_)}this.lastNeed=0,this.lastTotal=0,this.lastChar=m.allocUnsafe(n)}function i(l){return l<=127?0:l>>5===6?2:l>>4===14?3:l>>3===30?4:l>>6===2?-1:-2}function o(l,n,e){var t=n.length-1;if(t=0?(u>0&&(l.lastNeed=u-1),u):--t=0?(u>0&&(l.lastNeed=u-2),u):--t=0?(u>0&&(2===u?u=0:l.lastNeed=u-3),u):0))}function a(l,n,e){if(128!==(192&n[0]))return l.lastNeed=0,"�";if(l.lastNeed>1&&n.length>1){if(128!==(192&n[1]))return l.lastNeed=1,"�";if(l.lastNeed>2&&n.length>2&&128!==(192&n[2]))return l.lastNeed=2,"�"}}function s(l){var n=this.lastTotal-this.lastNeed,e=a(this,l,n);return void 0!==e?e:this.lastNeed<=l.length?(l.copy(this.lastChar,n,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(l.copy(this.lastChar,n,0,l.length),void(this.lastNeed-=l.length))}function c(l,n){var e=o(this,l,n);if(!this.lastNeed)return l.toString("utf8",n);this.lastTotal=e;var t=l.length-(e-this.lastNeed);return l.copy(this.lastChar,0,t),l.toString("utf8",n,t)}function f(l){var n=l&&l.length?this.write(l):"";return this.lastNeed?n+"�":n}function h(l,n){if((l.length-n)%2===0){var e=l.toString("utf16le",n);if(e){var t=e.charCodeAt(e.length-1);if(t>=55296&&t<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=l[l.length-2],this.lastChar[1]=l[l.length-1],e.slice(0,-1)}return e}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=l[l.length-1],l.toString("utf16le",n,l.length-1)}function d(l){var n=l&&l.length?this.write(l):"";if(this.lastNeed){var e=this.lastTotal-this.lastNeed;return n+this.lastChar.toString("utf16le",0,e)}return n}function p(l,n){var e=(l.length-n)%3;return 0===e?l.toString("base64",n):(this.lastNeed=3-e,this.lastTotal=3,1===e?this.lastChar[0]=l[l.length-1]:(this.lastChar[0]=l[l.length-2],this.lastChar[1]=l[l.length-1]),l.toString("base64",n,l.length-e))}function b(l){var n=l&&l.length?this.write(l):"";return this.lastNeed?n+this.lastChar.toString("base64",0,3-this.lastNeed):n}function v(l){return l.toString(this.encoding)}function _(l){return l&&l.length?this.write(l):""}var m=l("safe-buffer").Buffer,y=m.isEncoding||function(l){switch(l=""+l,l&&l.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};e.StringDecoder=r,r.prototype.write=function(l){if(0===l.length)return"";var n,e;if(this.lastNeed){if(n=this.fillLast(l),void 0===n)return"";e=this.lastNeed,this.lastNeed=0}else e=0;return e>>32-n}function r(l,n,e,t,r,i,o,a){return u(l+(n^e^t)+i+o|0,a)+r|0}function i(l,n,e,t,r,i,o,a){return u(l+(n&e|~n&t)+i+o|0,a)+r|0}function o(l,n,e,t,r,i,o,a){return u(l+((n|~e)^t)+i+o|0,a)+r|0}function a(l,n,e,t,r,i,o,a){return u(l+(n&t|e&~t)+i+o|0,a)+r|0}function s(l,n,e,t,r,i,o,a){return u(l+(n^(e|~t))+i+o|0,a)+r|0}var c=l("buffer").Buffer,f=l("inherits"),h=l("hash-base"),d=new Array(16),p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],b=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],v=[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],_=[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],m=[0,1518500249,1859775393,2400959708,2840853838],y=[1352829926,1548603684,1836072691,2053994217,0];f(t,h),t.prototype._update=function(){for(var l=d,n=0;n<16;++n)l[n]=this._block.readInt32LE(4*n);for(var e=0|this._a,t=0|this._b,c=0|this._c,f=0|this._d,h=0|this._e,g=0|this._a,w=0|this._b,k=0|this._c,S=0|this._d,E=0|this._e,I=0;I<80;I+=1){var C,j;I<16?(C=r(e,t,c,f,h,l[p[I]],m[0],v[I]),j=s(g,w,k,S,E,l[b[I]],y[0],_[I])):I<32?(C=i(e,t,c,f,h,l[p[I]],m[1],v[I]),j=a(g,w,k,S,E,l[b[I]],y[1],_[I])):I<48?(C=o(e,t,c,f,h,l[p[I]],m[2],v[I]),j=o(g,w,k,S,E,l[b[I]],y[2],_[I])):I<64?(C=a(e,t,c,f,h,l[p[I]],m[3],v[I]),j=i(g,w,k,S,E,l[b[I]],y[3],_[I])):(C=s(e,t,c,f,h,l[p[I]],m[4],v[I]),j=r(g,w,k,S,E,l[b[I]],y[4],_[I])),e=h,h=f,f=u(c,10),c=t,t=C,g=E,E=S,S=u(k,10),k=w,w=j}var M=this._b+c+S|0;this._b=this._c+f+E|0,this._c=this._d+h+g|0,this._d=this._e+e+w|0,this._e=this._a+t+k|0,this._a=M},t.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var l=c.alloc?c.alloc(20):new c(20);return l.writeInt32LE(this._a,0),l.writeInt32LE(this._b,4),l.writeInt32LE(this._c,8),l.writeInt32LE(this._d,12),l.writeInt32LE(this._e,16),l},n.exports=t},{buffer:76,"hash-base":247,inherits:263}],307:[function(l,n,e){function t(l,n){for(var e in l)n[e]=l[e]}function u(l,n,e){return i(l,n,e)}var r=l("buffer"),i=r.Buffer;i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?n.exports=r:(t(r,e),e.Buffer=u),t(i,u),u.from=function(l,n,e){if("number"==typeof l)throw new TypeError("Argument must not be a number");return i(l,n,e)},u.alloc=function(l,n,e){if("number"!=typeof l)throw new TypeError("Argument must be a number");var t=i(l);return void 0!==n?"string"==typeof e?t.fill(n,e):t.fill(n):t.fill(0),t},u.allocUnsafe=function(l){if("number"!=typeof l)throw new TypeError("Argument must be a number");return i(l)},u.allocUnsafeSlow=function(l){if("number"!=typeof l)throw new TypeError("Argument must be a number");return r.SlowBuffer(l)}},{buffer:76}],308:[function(l,n,e){function t(l,n){this._block=u.alloc(l),this._finalSize=n,this._blockSize=l,this._len=0}var u=l("safe-buffer").Buffer;t.prototype.update=function(l,n){"string"==typeof l&&(n=n||"utf8",l=u.from(l,n));for(var e=this._block,t=this._blockSize,r=l.length,i=this._len,o=0;o=this._finalSize&&(this._update(this._block),this._block.fill(0));var e=8*this._len;if(e<=4294967295)this._block.writeUInt32BE(e,this._blockSize-4);else{var t=(4294967295&e)>>>0,u=(e-t)/4294967296;this._block.writeUInt32BE(u,this._blockSize-8),this._block.writeUInt32BE(t,this._blockSize-4)}this._update(this._block);var r=this._hash();return l?r.toString(l):r},t.prototype._update=function(){throw new Error("_update must be implemented by subclass")},n.exports=t},{"safe-buffer":307}],309:[function(l,n,e){var e=n.exports=function(l){l=l.toLowerCase();var n=e[l];if(!n)throw new Error(l+" is not supported (we accept pull requests)");return new n};e.sha=l("./sha"),e.sha1=l("./sha1"),e.sha224=l("./sha224"),e.sha256=l("./sha256"),e.sha384=l("./sha384"),e.sha512=l("./sha512")},{"./sha":310,"./sha1":311,"./sha224":312,"./sha256":313,"./sha384":314,"./sha512":315}],310:[function(l,n,e){function t(){this.init(),this._w=f,a.call(this,64,56)}function u(l){return l<<5|l>>>27}function r(l){return l<<30|l>>>2}function i(l,n,e,t){return 0===l?n&e|~n&t:2===l?n&e|n&t|e&t:n^e^t}var o=l("inherits"),a=l("./hash"),s=l("safe-buffer").Buffer,c=[1518500249,1859775393,-1894007588,-899497514],f=new Array(80);o(t,a),t.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},t.prototype._update=function(l){for(var n=this._w,e=0|this._a,t=0|this._b,o=0|this._c,a=0|this._d,s=0|this._e,f=0;f<16;++f)n[f]=l.readInt32BE(4*f);for(;f<80;++f)n[f]=n[f-3]^n[f-8]^n[f-14]^n[f-16];for(var h=0;h<80;++h){var d=~~(h/20),p=u(e)+i(d,t,o,a)+s+n[h]+c[d]|0;s=a,a=o,o=r(t),t=e,e=p}this._a=e+this._a|0,this._b=t+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=s+this._e|0},t.prototype._hash=function(){var l=s.allocUnsafe(20);return l.writeInt32BE(0|this._a,0),l.writeInt32BE(0|this._b,4),l.writeInt32BE(0|this._c,8),l.writeInt32BE(0|this._d,12),l.writeInt32BE(0|this._e,16),l},n.exports=t},{"./hash":308,inherits:263,"safe-buffer":307}],311:[function(l,n,e){function t(){this.init(),this._w=h,s.call(this,64,56)}function u(l){return l<<1|l>>>31}function r(l){return l<<5|l>>>27}function i(l){return l<<30|l>>>2}function o(l,n,e,t){return 0===l?n&e|~n&t:2===l?n&e|n&t|e&t:n^e^t}var a=l("inherits"),s=l("./hash"),c=l("safe-buffer").Buffer,f=[1518500249,1859775393,-1894007588,-899497514],h=new Array(80);a(t,s),t.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},t.prototype._update=function(l){for(var n=this._w,e=0|this._a,t=0|this._b,a=0|this._c,s=0|this._d,c=0|this._e,h=0;h<16;++h)n[h]=l.readInt32BE(4*h);for(;h<80;++h)n[h]=u(n[h-3]^n[h-8]^n[h-14]^n[h-16]);for(var d=0;d<80;++d){var p=~~(d/20),b=r(e)+o(p,t,a,s)+c+n[d]+f[p]|0;c=s,s=a,a=i(t),t=e,e=b}this._a=e+this._a|0,this._b=t+this._b|0,this._c=a+this._c|0,this._d=s+this._d|0,this._e=c+this._e|0},t.prototype._hash=function(){var l=c.allocUnsafe(20);return l.writeInt32BE(0|this._a,0),l.writeInt32BE(0|this._b,4),l.writeInt32BE(0|this._c,8),l.writeInt32BE(0|this._d,12),l.writeInt32BE(0|this._e,16),l},n.exports=t},{"./hash":308,inherits:263,"safe-buffer":307}],312:[function(l,n,e){function t(){this.init(),this._w=a,i.call(this,64,56)}var u=l("inherits"),r=l("./sha256"),i=l("./hash"),o=l("safe-buffer").Buffer,a=new Array(64);u(t,r),t.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},t.prototype._hash=function(){var l=o.allocUnsafe(28);return l.writeInt32BE(this._a,0),l.writeInt32BE(this._b,4),l.writeInt32BE(this._c,8),l.writeInt32BE(this._d,12),l.writeInt32BE(this._e,16),l.writeInt32BE(this._f,20),l.writeInt32BE(this._g,24),l},n.exports=t},{"./hash":308,"./sha256":313,inherits:263,"safe-buffer":307}],313:[function(l,n,e){function t(){this.init(),this._w=p,f.call(this,64,56)}function u(l,n,e){return e^l&(n^e)}function r(l,n,e){return l&n|e&(l|n)}function i(l){return(l>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10)}function o(l){return(l>>>6|l<<26)^(l>>>11|l<<21)^(l>>>25|l<<7)}function a(l){return(l>>>7|l<<25)^(l>>>18|l<<14)^l>>>3}function s(l){return(l>>>17|l<<15)^(l>>>19|l<<13)^l>>>10}var c=l("inherits"),f=l("./hash"),h=l("safe-buffer").Buffer,d=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],p=new Array(64);c(t,f),t.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},t.prototype._update=function(l){for(var n=this._w,e=0|this._a,t=0|this._b,c=0|this._c,f=0|this._d,h=0|this._e,p=0|this._f,b=0|this._g,v=0|this._h,_=0;_<16;++_)n[_]=l.readInt32BE(4*_); for(;_<64;++_)n[_]=s(n[_-2])+n[_-7]+a(n[_-15])+n[_-16]|0;for(var m=0;m<64;++m){var y=v+o(h)+u(h,p,b)+d[m]+n[m]|0,g=i(e)+r(e,t,c)|0;v=b,b=p,p=h,h=f+y|0,f=c,c=t,t=e,e=y+g|0}this._a=e+this._a|0,this._b=t+this._b|0,this._c=c+this._c|0,this._d=f+this._d|0,this._e=h+this._e|0,this._f=p+this._f|0,this._g=b+this._g|0,this._h=v+this._h|0},t.prototype._hash=function(){var l=h.allocUnsafe(32);return l.writeInt32BE(this._a,0),l.writeInt32BE(this._b,4),l.writeInt32BE(this._c,8),l.writeInt32BE(this._d,12),l.writeInt32BE(this._e,16),l.writeInt32BE(this._f,20),l.writeInt32BE(this._g,24),l.writeInt32BE(this._h,28),l},n.exports=t},{"./hash":308,inherits:263,"safe-buffer":307}],314:[function(l,n,e){function t(){this.init(),this._w=a,i.call(this,128,112)}var u=l("inherits"),r=l("./sha512"),i=l("./hash"),o=l("safe-buffer").Buffer,a=new Array(160);u(t,r),t.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},t.prototype._hash=function(){function l(l,e,t){n.writeInt32BE(l,t),n.writeInt32BE(e,t+4)}var n=o.allocUnsafe(48);return l(this._ah,this._al,0),l(this._bh,this._bl,8),l(this._ch,this._cl,16),l(this._dh,this._dl,24),l(this._eh,this._el,32),l(this._fh,this._fl,40),n},n.exports=t},{"./hash":308,"./sha512":315,inherits:263,"safe-buffer":307}],315:[function(l,n,e){function t(){this.init(),this._w=_,p.call(this,128,112)}function u(l,n,e){return e^l&(n^e)}function r(l,n,e){return l&n|e&(l|n)}function i(l,n){return(l>>>28|n<<4)^(n>>>2|l<<30)^(n>>>7|l<<25)}function o(l,n){return(l>>>14|n<<18)^(l>>>18|n<<14)^(n>>>9|l<<23)}function a(l,n){return(l>>>1|n<<31)^(l>>>8|n<<24)^l>>>7}function s(l,n){return(l>>>1|n<<31)^(l>>>8|n<<24)^(l>>>7|n<<25)}function c(l,n){return(l>>>19|n<<13)^(n>>>29|l<<3)^l>>>6}function f(l,n){return(l>>>19|n<<13)^(n>>>29|l<<3)^(l>>>6|n<<26)}function h(l,n){return l>>>0>>0?1:0}var d=l("inherits"),p=l("./hash"),b=l("safe-buffer").Buffer,v=[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],_=new Array(160);d(t,p),t.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},t.prototype._update=function(l){for(var n=this._w,e=0|this._ah,t=0|this._bh,d=0|this._ch,p=0|this._dh,b=0|this._eh,_=0|this._fh,m=0|this._gh,y=0|this._hh,g=0|this._al,w=0|this._bl,k=0|this._cl,S=0|this._dl,E=0|this._el,I=0|this._fl,C=0|this._gl,j=0|this._hl,M=0;M<32;M+=2)n[M]=l.readInt32BE(4*M),n[M+1]=l.readInt32BE(4*M+4);for(;M<160;M+=2){var A=n[M-30],x=n[M-30+1],T=a(A,x),R=s(x,A);A=n[M-4],x=n[M-4+1];var O=c(A,x),P=f(x,A),N=n[M-14],B=n[M-14+1],U=n[M-32],D=n[M-32+1],L=R+B|0,F=T+N+h(L,R)|0;L=L+P|0,F=F+O+h(L,P)|0,L=L+D|0,F=F+U+h(L,D)|0,n[M]=F,n[M+1]=L}for(var q=0;q<160;q+=2){F=n[q],L=n[q+1];var z=r(e,t,d),V=r(g,w,k),H=i(e,g),K=i(g,e),W=o(b,E),Y=o(E,b),G=v[q],Z=v[q+1],X=u(b,_,m),J=u(E,I,C),$=j+Y|0,Q=y+W+h($,j)|0;$=$+J|0,Q=Q+X+h($,J)|0,$=$+Z|0,Q=Q+G+h($,Z)|0,$=$+L|0,Q=Q+F+h($,L)|0;var ll=K+V|0,nl=H+z+h(ll,K)|0;y=m,j=C,m=_,C=I,_=b,I=E,E=S+$|0,b=p+Q+h(E,S)|0,p=d,S=k,d=t,k=w,t=e,w=g,g=$+ll|0,e=Q+nl+h(g,$)|0}this._al=this._al+g|0,this._bl=this._bl+w|0,this._cl=this._cl+k|0,this._dl=this._dl+S|0,this._el=this._el+E|0,this._fl=this._fl+I|0,this._gl=this._gl+C|0,this._hl=this._hl+j|0,this._ah=this._ah+e+h(this._al,g)|0,this._bh=this._bh+t+h(this._bl,w)|0,this._ch=this._ch+d+h(this._cl,k)|0,this._dh=this._dh+p+h(this._dl,S)|0,this._eh=this._eh+b+h(this._el,E)|0,this._fh=this._fh+_+h(this._fl,I)|0,this._gh=this._gh+m+h(this._gl,C)|0,this._hh=this._hh+y+h(this._hl,j)|0},t.prototype._hash=function(){function l(l,e,t){n.writeInt32BE(l,t),n.writeInt32BE(e,t+4)}var n=b.allocUnsafe(64);return l(this._ah,this._al,0),l(this._bh,this._bl,8),l(this._ch,this._cl,16),l(this._dh,this._dl,24),l(this._eh,this._el,32),l(this._fh,this._fl,40),l(this._gh,this._gl,48),l(this._hh,this._hl,56),n},n.exports=t},{"./hash":308,inherits:263,"safe-buffer":307}],316:[function(l,n,e){function t(){u.call(this)}n.exports=t;var u=l("events").EventEmitter,r=l("inherits");r(t,u),t.Readable=l("readable-stream/readable.js"),t.Writable=l("readable-stream/writable.js"),t.Duplex=l("readable-stream/duplex.js"),t.Transform=l("readable-stream/transform.js"),t.PassThrough=l("readable-stream/passthrough.js"),t.Stream=t,t.prototype.pipe=function(l,n){function e(n){l.writable&&!1===l.write(n)&&s.pause&&s.pause()}function t(){s.readable&&s.resume&&s.resume()}function r(){c||(c=!0,l.end())}function i(){c||(c=!0,"function"==typeof l.destroy&&l.destroy())}function o(l){if(a(),0===u.listenerCount(this,"error"))throw l}function a(){s.removeListener("data",e),l.removeListener("drain",t),s.removeListener("end",r),s.removeListener("close",i),s.removeListener("error",o),l.removeListener("error",o),s.removeListener("end",a),s.removeListener("close",a),l.removeListener("close",a)}var s=this;s.on("data",e),l.on("drain",t),l._isStdio||n&&n.end===!1||(s.on("end",r),s.on("close",i));var c=!1;return s.on("error",o),l.on("error",o),s.on("end",a),s.on("close",a),l.on("close",a),l.emit("pipe",s),l}},{events:245,inherits:263,"readable-stream/duplex.js":292,"readable-stream/passthrough.js":302,"readable-stream/readable.js":303,"readable-stream/transform.js":304,"readable-stream/writable.js":305}],317:[function(l,n,e){function t(l){if(l&&!a(l))throw new Error("Unknown encoding: "+l)}function u(l){return l.toString(this.encoding)}function r(l){this.charReceived=l.length%2,this.charLength=this.charReceived?2:0}function i(l){this.charReceived=l.length%3,this.charLength=this.charReceived?3:0}var o=l("buffer").Buffer,a=o.isEncoding||function(l){switch(l&&l.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},s=e.StringDecoder=function(l){switch(this.encoding=(l||"utf8").toLowerCase().replace(/[-_]/,""),t(l),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=r;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=i;break;default:return void(this.write=u)}this.charBuffer=new o(6),this.charReceived=0,this.charLength=0};s.prototype.write=function(l){for(var n="";this.charLength;){var e=l.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:l.length;if(l.copy(this.charBuffer,this.charReceived,0,e),this.charReceived+=e,this.charReceived=55296&&t<=56319)){if(this.charReceived=this.charLength=0,0===l.length)return n;break}this.charLength+=this.surrogateSize,n=""}this.detectIncompleteChar(l);var u=l.length;this.charLength&&(l.copy(this.charBuffer,0,l.length-this.charReceived,u),u-=this.charReceived),n+=l.toString(this.encoding,0,u);var u=n.length-1,t=n.charCodeAt(u);if(t>=55296&&t<=56319){var r=this.surrogateSize;return this.charLength+=r,this.charReceived+=r,this.charBuffer.copy(this.charBuffer,r,0,r),l.copy(this.charBuffer,0,0,r),n.substring(0,u)}return n},s.prototype.detectIncompleteChar=function(l){for(var n=l.length>=3?3:l.length;n>0;n--){var e=l[l.length-n];if(1==n&&e>>5==6){this.charLength=2;break}if(n<=2&&e>>4==14){this.charLength=3;break}if(n<=3&&e>>3==30){this.charLength=4;break}}this.charReceived=n},s.prototype.end=function(l){var n="";if(l&&l.length&&(n=this.write(l)),this.charReceived){var e=this.charReceived,t=this.charBuffer,u=this.encoding;n+=t.slice(0,e).toString(u)}return n}},{buffer:76}],318:[function(l,n,e){(function(n,t){function u(l,n){this._id=l,this._clearFn=n}var r=l("process/browser.js").nextTick,i=Function.prototype.apply,o=Array.prototype.slice,a={},s=0;e.setTimeout=function(){return new u(i.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new u(i.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(l){l.close()},u.prototype.unref=u.prototype.ref=function(){},u.prototype.close=function(){this._clearFn.call(window,this._id)},e.enroll=function(l,n){clearTimeout(l._idleTimeoutId),l._idleTimeout=n},e.unenroll=function(l){clearTimeout(l._idleTimeoutId),l._idleTimeout=-1},e._unrefActive=e.active=function(l){clearTimeout(l._idleTimeoutId);var n=l._idleTimeout;n>=0&&(l._idleTimeoutId=setTimeout(function(){l._onTimeout&&l._onTimeout()},n))},e.setImmediate="function"==typeof n?n:function(l){var n=s++,t=!(arguments.length<2)&&o.call(arguments,1);return a[n]=!0,r(function(){a[n]&&(t?l.apply(null,t):l.call(null),e.clearImmediate(n))}),n},e.clearImmediate="function"==typeof t?t:function(l){delete a[l]}}).call(this,l("timers").setImmediate,l("timers").clearImmediate)},{"process/browser.js":283,timers:318}],319:[function(l,n,e){!function(l,t){"object"==typeof e&&"undefined"!=typeof n?t(e):"function"==typeof define&&define.amd?define(["exports"],t):t(l.URI=l.URI||{})}(this,function(l){"use strict";function n(){for(var l=arguments.length,n=Array(l),e=0;e1){n[0]=n[0].slice(0,-1);for(var t=n.length-1,u=1;u1&&(t=e[0]+"@",l=e[1]),l=l.replace(H,".");var u=l.split("."),r=s(u,n).join(".");return t+r}function f(l){for(var n=[],e=0,t=l.length;e=55296&&u<=56319&&e>6|192).toString(16).toUpperCase()+"%"+(63&n|128).toString(16).toUpperCase():"%"+(n>>12|224).toString(16).toUpperCase()+"%"+(n>>6&63|128).toString(16).toUpperCase()+"%"+(63&n|128).toString(16).toUpperCase()}function d(l){for(var n="",e=0,t=l.length;e=194&&u<224){if(t-e>=6){var r=parseInt(l.substr(e+4,2),16);n+=String.fromCharCode((31&u)<<6|63&r)}else n+=l.substr(e,6);e+=6}else if(u>=224){if(t-e>=9){var i=parseInt(l.substr(e+4,2),16),o=parseInt(l.substr(e+7,2),16);n+=String.fromCharCode((15&u)<<12|(63&i)<<6|63&o)}else n+=l.substr(e,9);e+=9}else n+=l.substr(e,3),e+=3}return n}function p(l,n){function e(l){var e=d(l);return e.match(n.UNRESERVED)?e:l}return l.scheme&&(l.scheme=String(l.scheme).replace(n.PCT_ENCODED,e).toLowerCase().replace(n.NOT_SCHEME,"")),void 0!==l.userinfo&&(l.userinfo=String(l.userinfo).replace(n.PCT_ENCODED,e).replace(n.NOT_USERINFO,h).replace(n.PCT_ENCODED,u)),void 0!==l.host&&(l.host=String(l.host).replace(n.PCT_ENCODED,e).toLowerCase().replace(n.NOT_HOST,h).replace(n.PCT_ENCODED,u)),void 0!==l.path&&(l.path=String(l.path).replace(n.PCT_ENCODED,e).replace(l.scheme?n.NOT_PATH:n.NOT_PATH_NOSCHEME,h).replace(n.PCT_ENCODED,u)),void 0!==l.query&&(l.query=String(l.query).replace(n.PCT_ENCODED,e).replace(n.NOT_QUERY,h).replace(n.PCT_ENCODED,u)),void 0!==l.fragment&&(l.fragment=String(l.fragment).replace(n.PCT_ENCODED,e).replace(n.NOT_FRAGMENT,h).replace(n.PCT_ENCODED,u)),l}function b(l){return l.replace(/^0*(.*)/,"$1")||"0"}function v(l,n){var e=l.match(n.IPV4ADDRESS)||[],t=T(e,2),u=t[1];return u?u.split(".").map(b).join("."):l}function _(l,n){var e=l.match(n.IPV6ADDRESS)||[],t=T(e,3),u=t[1],r=t[2];if(u){for(var i=u.toLowerCase().split("::").reverse(),o=T(i,2),a=o[0],s=o[1],c=s?s.split(":").map(b):[],f=a.split(":").map(b),h=n.IPV4ADDRESS.test(f[f.length-1]),d=h?7:8,p=f.length-d,_=Array(d),m=0;m1){var k=_.slice(0,g.index),S=_.slice(g.index+g.length);w=k.join(":")+"::"+S.join(":")}else w=_.join(":");return r&&(w+="%"+r),w}return l}function m(l){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e={},t=n.iri!==!1?x:A;"suffix"===n.reference&&(l=(n.scheme?n.scheme+":":"")+"//"+l);var u=l.match(rl);if(u){il?(e.scheme=u[1],e.userinfo=u[3],e.host=u[4],e.port=parseInt(u[5],10),e.path=u[6]||"",e.query=u[7],e.fragment=u[8],isNaN(e.port)&&(e.port=u[5])):(e.scheme=u[1]||void 0,e.userinfo=l.indexOf("@")!==-1?u[3]:void 0,e.host=l.indexOf("//")!==-1?u[4]:void 0,e.port=parseInt(u[5],10),e.path=u[6]||"",e.query=l.indexOf("?")!==-1?u[7]:void 0,e.fragment=l.indexOf("#")!==-1?u[8]:void 0,isNaN(e.port)&&(e.port=l.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?u[4]:void 0)),e.host&&(e.host=_(v(e.host,t),t)),void 0!==e.scheme||void 0!==e.userinfo||void 0!==e.host||void 0!==e.port||e.path||void 0!==e.query?void 0===e.scheme?e.reference="relative":void 0===e.fragment?e.reference="absolute":e.reference="uri":e.reference="same-document",n.reference&&"suffix"!==n.reference&&n.reference!==e.reference&&(e.error=e.error||"URI is not a "+n.reference+" reference.");var r=ul[(n.scheme||e.scheme||"").toLowerCase()];if(n.unicodeSupport||r&&r.unicodeSupport)p(e,t);else{if(e.host&&(n.domainHost||r&&r.domainHost))try{e.host=tl.toASCII(e.host.replace(t.PCT_ENCODED,d).toLowerCase())}catch(i){e.error=e.error||"Host's domain name can not be converted to ASCII via punycode: "+i}p(e,A)}r&&r.parse&&r.parse(e,n)}else e.error=e.error||"URI can not be parsed.";return e}function y(l,n){var e=n.iri!==!1?x:A,t=[];return void 0!==l.userinfo&&(t.push(l.userinfo),t.push("@")),void 0!==l.host&&t.push(_(v(String(l.host),e),e).replace(e.IPV6ADDRESS,function(l,n,e){return"["+n+(e?"%25"+e:"")+"]"})),"number"==typeof l.port&&(t.push(":"),t.push(l.port.toString(10))),t.length?t.join(""):void 0}function g(l){for(var n=[];l.length;)if(l.match(ol))l=l.replace(ol,"");else if(l.match(al))l=l.replace(al,"/");else if(l.match(sl))l=l.replace(sl,"/"),n.pop();else if("."===l||".."===l)l="";else{var e=l.match(cl);if(!e)throw new Error("Unexpected dot segment condition");var t=e[0];l=l.slice(t.length),n.push(t)}return n.join("")}function w(l){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=n.iri?x:A,t=[],u=ul[(n.scheme||l.scheme||"").toLowerCase()];if(u&&u.serialize&&u.serialize(l,n),l.host)if(e.IPV6ADDRESS.test(l.host));else if(n.domainHost||u&&u.domainHost)try{l.host=n.iri?tl.toUnicode(l.host):tl.toASCII(l.host.replace(e.PCT_ENCODED,d).toLowerCase())}catch(r){l.error=l.error||"Host's domain name can not be converted to "+(n.iri?"Unicode":"ASCII")+" via punycode: "+r}p(l,e),"suffix"!==n.reference&&l.scheme&&(t.push(l.scheme),t.push(":"));var i=y(l,n);if(void 0!==i&&("suffix"!==n.reference&&t.push("//"),t.push(i),l.path&&"/"!==l.path.charAt(0)&&t.push("/")),void 0!==l.path){var o=l.path;n.absolutePath||u&&u.absolutePath||(o=g(o)),void 0===i&&(o=o.replace(/^\/\//,"/%2F")),t.push(o)}return void 0!==l.query&&(t.push("?"),t.push(l.query)),void 0!==l.fragment&&(t.push("#"),t.push(l.fragment)),t.join("")}function k(l,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},t=arguments[3],u={};return t||(l=m(w(l,e),e),n=m(w(n,e),e)),e=e||{},!e.tolerant&&n.scheme?(u.scheme=n.scheme,u.userinfo=n.userinfo,u.host=n.host,u.port=n.port,u.path=g(n.path||""),u.query=n.query):(void 0!==n.userinfo||void 0!==n.host||void 0!==n.port?(u.userinfo=n.userinfo,u.host=n.host,u.port=n.port,u.path=g(n.path||""),u.query=n.query):(n.path?("/"===n.path.charAt(0)?u.path=g(n.path):(void 0===l.userinfo&&void 0===l.host&&void 0===l.port||l.path?l.path?u.path=l.path.slice(0,l.path.lastIndexOf("/")+1)+n.path:u.path=n.path:u.path="/"+n.path,u.path=g(u.path)),u.query=n.query):(u.path=l.path,void 0!==n.query?u.query=n.query:u.query=l.query),u.userinfo=l.userinfo,u.host=l.host,u.port=l.port),u.scheme=l.scheme),u.fragment=n.fragment,u}function S(l,n,e){var t=i({scheme:"null"},e);return w(k(m(l,t),m(n,t),t,!0),t)}function E(l,n){return"string"==typeof l?l=w(m(l,n),n):"object"===t(l)&&(l=m(w(l,n),n)),l}function I(l,n,e){return"string"==typeof l?l=w(m(l,e),e):"object"===t(l)&&(l=w(l,e)),"string"==typeof n?n=w(m(n,e),e):"object"===t(n)&&(n=w(n,e)),l===n}function C(l,n){return l&&l.toString().replace(n&&n.iri?x.ESCAPE:A.ESCAPE,h)}function j(l,n){return l&&l.toString().replace(n&&n.iri?x.PCT_ENCODED:A.PCT_ENCODED,d)}function M(l){var n=d(l);return n.match(kl)?n:l}var A=o(!1),x=o(!0),T=function(){function l(l,n){var e=[],t=!0,u=!1,r=void 0;try{for(var i,o=l[Symbol.iterator]();!(t=(i=o.next()).done)&&(e.push(i.value),!n||e.length!==n);t=!0);}catch(a){u=!0,r=a}finally{try{!t&&o["return"]&&o["return"]()}finally{if(u)throw r}}return e}return function(n,e){if(Array.isArray(n))return n;if(Symbol.iterator in Object(n))return l(n,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),R=function(l){if(Array.isArray(l)){for(var n=0,e=Array(l.length);n= 0x80 (not a basic code point)","invalid-input":"Invalid input"},W=P-N,Y=Math.floor,G=String.fromCharCode,Z=function(l){return String.fromCodePoint.apply(String,R(l))},X=function(l){return l-48<10?l-22:l-65<26?l-65:l-97<26?l-97:P},J=function(l,n){return l+22+75*(l<26)-((0!=n)<<5)},$=function(l,n,e){var t=0;for(l=e?Y(l/D):l>>1,l+=Y(l/n);l>W*B>>1;t+=P)l=Y(l/W);return Y(t+(W+1)*l/(l+U))},Q=function(l){var n=[],e=l.length,t=0,u=F,r=L,i=l.lastIndexOf(q);i<0&&(i=0);for(var o=0;o=128&&a("not-basic"),n.push(l.charCodeAt(o));for(var s=i>0?i+1:0;s=e&&a("invalid-input");var d=X(l.charCodeAt(s++));(d>=P||d>Y((O-t)/f))&&a("overflow"),t+=d*f;var p=h<=r?N:h>=r+B?B:h-r;if(dY(O/b)&&a("overflow"),f*=b}var v=n.length+1;r=$(t-c,v,0==c),Y(t/v)>O-u&&a("overflow"),u+=Y(t/v),t%=v,n.splice(t++,0,u)}return String.fromCodePoint.apply(String,n)},ll=function(l){var n=[];l=f(l);var e=l.length,t=F,u=0,r=L,i=!0,o=!1,s=void 0;try{for(var c,h=l[Symbol.iterator]();!(i=(c=h.next()).done);i=!0){var d=c.value;d<128&&n.push(G(d))}}catch(p){o=!0,s=p}finally{try{!i&&h["return"]&&h["return"]()}finally{if(o)throw s}}var b=n.length,v=b;for(b&&n.push(q);v=t&&S<_&&(_=S)}}catch(p){y=!0,g=p}finally{try{!m&&k["return"]&&k["return"]()}finally{if(y)throw g}}var E=v+1;_-t>Y((O-u)/E)&&a("overflow"),u+=(_-t)*E,t=_;var I=!0,C=!1,j=void 0;try{for(var M,A=l[Symbol.iterator]();!(I=(M=A.next()).done);I=!0){var x=M.value;if(xO&&a("overflow"),x==t){for(var T=u,R=P;;R+=P){var U=R<=r?N:R>=r+B?B:R-r;if(TA-Z\\x5E-\\x7E]",gl=n(yl,'[\\"\\\\]'),wl="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",kl=new RegExp(bl,"g"),Sl=new RegExp(_l,"g"),El=new RegExp(n("[^]",ml,"[\\.]",'[\\"]',gl),"g"),Il=new RegExp(n("[^]",bl,wl),"g"),Cl=Il,jl={scheme:"mailto",parse:function(l,n){var e=l,t=e.to=e.path?e.path.split(","):[];if(e.path=void 0,e.query){for(var u=!1,r={},i=e.query.split("&"),o=0,a=i.length;o57343)u.push(r);else if(56320<=r&&r<=57343)u.push(65533);else if(55296<=r&&r<=56319)if(t===e-1)u.push(65533);else{var i=l.charCodeAt(t+1);if(56320<=i&&i<=57343){var o=1023&r,a=1023&i;u.push(65536+(o<<10)+a),t+=1}else u.push(65533)}t+=1}return u}function r(l){for(var n="",e=0;e>10)+55296,(1023&t)+56320))}return n}function i(l){this.tokens=[].slice.call(l)}function o(l,n){if(l)throw TypeError("Decoder error");return n||65533}function a(l){throw TypeError("The code point "+l+" could not be encoded.")}function s(){}function c(){}function f(l){return l=String(l).trim().toLowerCase(),Object.prototype.hasOwnProperty.call(K,l)?K[l]:null}function h(l,n){return n?n[l]||null:null}function d(l,n){var e=n.indexOf(l);return e===-1?null:e}function p(n){if(!("encoding-indexes"in l))throw Error("Indexes missing. Did you forget to include encoding-indexes.js?");return l["encoding-indexes"][n]}function b(l){if(l>39419&&l<189e3||l>1237575)return null;var n,e=0,t=0,u=p("gb18030");for(n=0;n>6*t)+u];t>0;){var i=e>>6*(t-1);r.push(128|63&i),t-=1}return r}}function S(l,e){var t=e.fatal;this.handler=function(e,u){if(u===z)return V;if(n(u,0,127))return u;var r=l[u-128];return null===r?o(t):r}}function E(l,e){e.fatal;this.handler=function(e,t){if(t===z)return V;if(n(t,0,127))return t;var u=d(t,l);return null===u&&a(t),u+128}}function I(l){var e=l.fatal,t=0,u=0,r=0;this.handler=function(l,i){if(i===z&&0===t&&0===u&&0===r)return V;i!==z||0===t&&0===u&&0===r||(t=0,u=0,r=0,o(e));var a;if(0!==r){a=null,n(i,48,57)&&(a=b(10*(126*(10*(t-129)+(u-48))+(r-129))+i-48));var s=[u,r,i];return t=0,u=0,r=0,null===a?(l.prepend(s),o(e)):a}if(0!==u)return n(i,129,254)?(r=i,null):(l.prepend([u,i]),t=0,u=0,o(e));if(0!==t){if(n(i,48,57))return u=i,null;var c=t,f=null;t=0;var d=i<127?64:65;return(n(i,64,126)||n(i,128,254))&&(f=190*(c-129)+(i-d)),a=null===f?null:h(f,p("gb18030")),null===a&&n(i,0,127)&&l.prepend(i),null===a?o(e):a}return n(i,0,127)?i:128===i?8364:n(i,129,254)?(t=i,null):o(e)}}function C(l,t){l.fatal;this.handler=function(l,u){if(u===z)return V;if(n(u,0,127))return u;if(t&&8364===u)return 128;var r=d(u,p("gb18030"));if(null!==r){var i=e(r,190)+129,o=r%190,s=o<63?64:65;return[i,o+s]}if(t)return a(u);r=v(u);var c=e(e(e(r,10),126),10);r-=10*c*126*10;var f=e(e(r,10),126);r-=10*f*126;var h=e(r,10),b=r-10*h;return[c+129,f+48,h+129,b+48]}}function j(l){var e=l.fatal,t=0;this.handler=function(l,u){if(u===z&&0!==t)return t=0,o(e);if(u===z&&0===t)return V;if(0!==t){var r=t,i=null;t=0;var a=u<127?64:98;switch((n(u,64,126)||n(u,161,254))&&(i=157*(r-129)+(u-a)),i){case 1133:return[202,772];case 1135:return[202,780];case 1164:return[234,772];case 1166:return[234,780]}var s=null===i?null:h(i,p("big5"));return null===s&&n(u,0,127)&&l.prepend(u),null===s?o(e):s}return n(u,0,127)?u:n(u,129,254)?(t=u,null):o(e)}}function M(l){l.fatal;this.handler=function(l,t){if(t===z)return V;if(n(t,0,127))return t;var u=m(t,p("big5"));if(null===u)return a(t);var r=e(u,157)+129;if(r<161)return a(t);var i=u%157,o=i<63?64:98;return[r,i+o]}}function A(l){var e=l.fatal,t=!1,u=0;this.handler=function(l,r){if(r===z&&0!==u)return u=0,o(e);if(r===z&&0===u)return V;if(142===u&&n(r,161,223))return u=0,65377+r-161;if(143===u&&n(r,161,254))return t=!0,u=r,null;if(0!==u){var i=u;u=0;var a=null;return n(i,161,254)&&n(r,161,254)&&(a=h(94*(i-161)+(r-161),p(t?"jis0212":"jis0208"))),t=!1,n(r,161,254)||l.prepend(r),null===a?o(e):a}return n(r,0,127)?r:142===r||143===r||n(r,161,254)?(u=r,null):o(e)}}function x(l){l.fatal;this.handler=function(l,t){if(t===z)return V;if(n(t,0,127))return t;if(165===t)return 92;if(8254===t)return 126;if(n(t,65377,65439))return[142,t-65377+161];8226===t&&(t=65293);var u=d(t,p("jis0208"));if(null===u)return a(t);var r=e(u,94)+161,i=u%94+161;return[r,i]}}function T(l){var e=l.fatal,t={ASCII:0,Roman:1,Katakana:2,LeadByte:3,TrailByte:4,EscapeStart:5,Escape:6},u=t.ASCII,r=t.ASCII,i=0,a=!1;this.handler=function(l,s){switch(u){default:case t.ASCII:return 27===s?(u=t.EscapeStart,null):n(s,0,127)&&14!==s&&15!==s&&27!==s?(a=!1,s):s===z?V:(a=!1,o(e));case t.Roman:return 27===s?(u=t.EscapeStart,null):92===s?(a=!1,165):126===s?(a=!1,8254):n(s,0,127)&&14!==s&&15!==s&&27!==s&&92!==s&&126!==s?(a=!1,s):s===z?V:(a=!1,o(e));case t.Katakana:return 27===s?(u=t.EscapeStart,null):n(s,33,95)?(a=!1,65377+s-33):s===z?V:(a=!1,o(e));case t.LeadByte:return 27===s?(u=t.EscapeStart,null):n(s,33,126)?(a=!1,i=s,u=t.TrailByte,null):s===z?V:(a=!1,o(e));case t.TrailByte:if(27===s)return u=t.EscapeStart,o(e);if(n(s,33,126)){u=t.LeadByte;var c=94*(i-33)+s-33,f=h(c,p("jis0208"));return null===f?o(e):f}return s===z?(u=t.LeadByte,l.prepend(s),o(e)):(u=t.LeadByte,o(e));case t.EscapeStart:return 36===s||40===s?(i=s,u=t.Escape,null):(l.prepend(s),a=!1,u=r,o(e));case t.Escape:var d=i;i=0;var b=null;if(40===d&&66===s&&(b=t.ASCII),40===d&&74===s&&(b=t.Roman),40===d&&73===s&&(b=t.Katakana),36!==d||64!==s&&66!==s||(b=t.LeadByte),null!==b){u=u=b;var v=a;return a=!0,v?o(e):null}return l.prepend([d,s]),a=!1,u=r,o(e)}}}function R(l){var t=(l.fatal,{ASCII:0,Roman:1,jis0208:2}),u=t.ASCII;this.handler=function(l,r){if(r===z&&u!==t.ASCII)return l.prepend(r),[27,40,66];if(r===z&&u===t.ASCII)return V;if(u===t.ASCII&&n(r,0,127))return r;if(u===t.Roman&&n(r,0,127)&&92!==r&&126!==r){if(n(r,0,127))return r;if(165===r)return 92;if(8254===r)return 126}if(n(r,0,127)&&u!==t.ASCII)return l.prepend(r),u=t.ASCII,[27,40,66];if((165===r||8254===r)&&u!==t.Roman)return l.prepend(r),u=t.Roman,[27,40,74];8226===r&&(r=65293);var i=d(r,p("jis0208"));if(null===i)return a(r);if(u!==t.jis0208)return l.prepend(r),u=t.jis0208,[27,36,66];var o=e(i,94)+33,s=i%94+33;return[o,s]}}function O(l){var e=l.fatal,t=0;this.handler=function(l,u){if(u===z&&0!==t)return t=0,o(e);if(u===z&&0===t)return V;if(0!==t){var r=t,i=null;t=0;var a=u<127?64:65,s=r<160?129:193;(n(u,64,126)||n(u,128,252))&&(i=188*(r-s)+u-a);var c=null===i?null:h(i,p("jis0208"));return null===c&&null!==i&&n(i,8836,10528)?57344+i-8836:(null===c&&n(u,0,127)&&l.prepend(u),null===c?o(e):c)}return n(u,0,128)?u:n(u,161,223)?65377+u-161:n(u,129,159)||n(u,224,252)?(t=u,null):o(e)}}function P(l){l.fatal;this.handler=function(l,t){if(t===z)return V;if(n(t,0,128))return t;if(165===t)return 92;if(8254===t)return 126;if(n(t,65377,65439))return t-65377+161;8226===t&&(t=65293);var u=_(t);if(null===u)return a(t);var r=e(u,188),i=r<31?129:193,o=u%188,s=o<63?64:65;return[r+i,o+s]}}function N(l){var e=l.fatal,t=0;this.handler=function(l,u){if(u===z&&0!==t)return t=0,o(e);if(u===z&&0===t)return V;if(0!==t){var r=t,i=null;t=0,n(u,65,254)&&(i=190*(r-129)+(u-65));var a=null===i?null:h(i,p("euc-kr"));return null===i&&n(u,0,127)&&l.prepend(u),null===a?o(e):a}return n(u,0,127)?u:n(u,129,254)?(t=u,null):o(e)}}function B(l){l.fatal;this.handler=function(l,t){if(t===z)return V;if(n(t,0,127))return t;var u=d(t,p("euc-kr"));if(null===u)return a(t);var r=e(u,190)+129,i=u%190+65;return[r,i]}}function U(l,n){var e=l>>8,t=255&l;return n?[e,t]:[t,e]}function D(l,e){var t=e.fatal,u=null,r=null;this.handler=function(e,i){if(i===z&&(null!==u||null!==r))return o(t);if(i===z&&null===u&&null===r)return V;if(null===u)return u=i,null;var a;if(a=l?(u<<8)+i:(i<<8)+u,u=null,null!==r){var s=r;return r=null,n(a,56320,57343)?65536+1024*(s-55296)+(a-56320):(e.prepend(U(a,l)),o(t))}return n(a,55296,56319)?(r=a,null):n(a,56320,57343)?o(t):a}}function L(l,e){e.fatal;this.handler=function(e,t){if(t===z)return V;if(n(t,0,65535))return U(t,l);var u=U((t-65536>>10)+55296,l),r=U((t-65536&1023)+56320,l);return u.concat(r)}}function F(l){l.fatal;this.handler=function(l,e){return e===z?V:n(e,0,127)?e:63360+e-128}}function q(l){l.fatal;this.handler=function(l,e){return e===z?V:n(e,0,127)?e:n(e,63360,63487)?e-63360+128:a(e)}}var z=-1;i.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():z},prepend:function(l){if(Array.isArray(l))for(var n=l;n.length;)this.tokens.unshift(n.pop());else this.tokens.unshift(l)},push:function(l){if(Array.isArray(l))for(var n=l;n.length;)this.tokens.push(n.shift());else this.tokens.push(l)}};var V=-1;s.prototype={handler:function(l,n){}},c.prototype={handler:function(l,n){}};var H=[{encodings:[{labels:["unicode-1-1-utf-8","utf-8","utf8"],name:"utf-8"}],heading:"The Encoding"},{encodings:[{labels:["866","cp866","csibm866","ibm866"],name:"ibm866"},{labels:["csisolatin2","iso-8859-2","iso-ir-101","iso8859-2","iso88592","iso_8859-2","iso_8859-2:1987","l2","latin2"],name:"iso-8859-2"},{labels:["csisolatin3","iso-8859-3","iso-ir-109","iso8859-3","iso88593","iso_8859-3","iso_8859-3:1988","l3","latin3"],name:"iso-8859-3"},{labels:["csisolatin4","iso-8859-4","iso-ir-110","iso8859-4","iso88594","iso_8859-4","iso_8859-4:1988","l4","latin4"],name:"iso-8859-4"},{labels:["csisolatincyrillic","cyrillic","iso-8859-5","iso-ir-144","iso8859-5","iso88595","iso_8859-5","iso_8859-5:1988"],name:"iso-8859-5"},{labels:["arabic","asmo-708","csiso88596e","csiso88596i","csisolatinarabic","ecma-114","iso-8859-6","iso-8859-6-e","iso-8859-6-i","iso-ir-127","iso8859-6","iso88596","iso_8859-6","iso_8859-6:1987"],name:"iso-8859-6"},{labels:["csisolatingreek","ecma-118","elot_928","greek","greek8","iso-8859-7","iso-ir-126","iso8859-7","iso88597","iso_8859-7","iso_8859-7:1987","sun_eu_greek"],name:"iso-8859-7"},{labels:["csiso88598e","csisolatinhebrew","hebrew","iso-8859-8","iso-8859-8-e","iso-ir-138","iso8859-8","iso88598","iso_8859-8","iso_8859-8:1988","visual"],name:"iso-8859-8"},{labels:["csiso88598i","iso-8859-8-i","logical"],name:"iso-8859-8-i"},{labels:["csisolatin6","iso-8859-10","iso-ir-157","iso8859-10","iso885910","l6","latin6"],name:"iso-8859-10"},{labels:["iso-8859-13","iso8859-13","iso885913"],name:"iso-8859-13"},{labels:["iso-8859-14","iso8859-14","iso885914"],name:"iso-8859-14"},{labels:["csisolatin9","iso-8859-15","iso8859-15","iso885915","iso_8859-15","l9"],name:"iso-8859-15"},{labels:["iso-8859-16"],name:"iso-8859-16"},{labels:["cskoi8r","koi","koi8","koi8-r","koi8_r"],name:"koi8-r"},{labels:["koi8-ru","koi8-u"],name:"koi8-u"},{labels:["csmacintosh","mac","macintosh","x-mac-roman"],name:"macintosh"},{labels:["dos-874","iso-8859-11","iso8859-11","iso885911","tis-620","windows-874"],name:"windows-874"},{labels:["cp1250","windows-1250","x-cp1250"],name:"windows-1250"},{labels:["cp1251","windows-1251","x-cp1251"],name:"windows-1251"},{labels:["ansi_x3.4-1968","ascii","cp1252","cp819","csisolatin1","ibm819","iso-8859-1","iso-ir-100","iso8859-1","iso88591","iso_8859-1","iso_8859-1:1987","l1","latin1","us-ascii","windows-1252","x-cp1252"],name:"windows-1252"},{labels:["cp1253","windows-1253","x-cp1253"],name:"windows-1253"},{labels:["cp1254","csisolatin5","iso-8859-9","iso-ir-148","iso8859-9","iso88599","iso_8859-9","iso_8859-9:1989","l5","latin5","windows-1254","x-cp1254"],name:"windows-1254"},{labels:["cp1255","windows-1255","x-cp1255"],name:"windows-1255"},{labels:["cp1256","windows-1256","x-cp1256"],name:"windows-1256"},{labels:["cp1257","windows-1257","x-cp1257"],name:"windows-1257"},{labels:["cp1258","windows-1258","x-cp1258"],name:"windows-1258"},{labels:["x-mac-cyrillic","x-mac-ukrainian"],name:"x-mac-cyrillic"}],heading:"Legacy single-byte encodings"},{encodings:[{labels:["chinese","csgb2312","csiso58gb231280","gb2312","gb_2312","gb_2312-80","gbk","iso-ir-58","x-gbk"],name:"gbk"},{labels:["gb18030"],name:"gb18030"}],heading:"Legacy multi-byte Chinese (simplified) encodings"},{encodings:[{labels:["big5","big5-hkscs","cn-big5","csbig5","x-x-big5"],name:"big5"}],heading:"Legacy multi-byte Chinese (traditional) encodings"},{encodings:[{labels:["cseucpkdfmtjapanese","euc-jp","x-euc-jp"],name:"euc-jp"},{labels:["csiso2022jp","iso-2022-jp"],name:"iso-2022-jp"},{labels:["csshiftjis","ms932","ms_kanji","shift-jis","shift_jis","sjis","windows-31j","x-sjis"],name:"shift_jis"}],heading:"Legacy multi-byte Japanese encodings"},{encodings:[{labels:["cseuckr","csksc56011987","euc-kr","iso-ir-149","korean","ks_c_5601-1987","ks_c_5601-1989","ksc5601","ksc_5601","windows-949"],name:"euc-kr"}],heading:"Legacy multi-byte Korean encodings"},{encodings:[{labels:["csiso2022kr","hz-gb-2312","iso-2022-cn","iso-2022-cn-ext","iso-2022-kr"],name:"replacement"},{labels:["utf-16be"],name:"utf-16be"},{labels:["utf-16","utf-16le"],name:"utf-16le"},{labels:["x-user-defined"],name:"x-user-defined"}],heading:"Legacy miscellaneous encodings"}],K={};H.forEach(function(l){l.encodings.forEach(function(l){l.labels.forEach(function(n){K[n]=l})})});var W={},Y={},G="utf-8";y.prototype={decode:function(l,n){var e;e="object"==typeof l&&l instanceof ArrayBuffer?new Uint8Array(l):"object"==typeof l&&"buffer"in l&&l.buffer instanceof ArrayBuffer?new Uint8Array(l.buffer,l.byteOffset,l.byteLength):new Uint8Array(0),n=t(n),this._streaming||(this._decoder=Y[this._encoding.name]({fatal:this._fatal}),this._BOMseen=!1),this._streaming=Boolean(n.stream);for(var u,o=new i(e),a=[];!o.endOfStream()&&(u=this._decoder.handler(o,o.read()),u!==V);)null!==u&&(Array.isArray(u)?a.push.apply(a,u):a.push(u));if(!this._streaming){do{if(u=this._decoder.handler(o,o.read()),u===V)break;null!==u&&(Array.isArray(u)?a.push.apply(a,u):a.push(u))}while(!o.endOfStream());this._decoder=null}return a.length&&(["utf-8","utf-16le","utf-16be"].indexOf(this.encoding)===-1||this._ignoreBOM||this._BOMseen||(65279===a[0]?(this._BOMseen=!0, a.shift()):this._BOMseen=!0)),r(a)}},g.prototype={encode:function(l,n){l=l?String(l):"",n=t(n),this._streaming||(this._encoder=W[this._encoding.name](this._options)),this._streaming=Boolean(n.stream);for(var e,r=[],o=new i(u(l));!o.endOfStream()&&(e=this._encoder.handler(o,o.read()),e!==V);)Array.isArray(e)?r.push.apply(r,e):r.push(e);if(!this._streaming){for(;;){if(e=this._encoder.handler(o,o.read()),e===V)break;Array.isArray(e)?r.push.apply(r,e):r.push(e)}this._encoder=null}return new Uint8Array(r)}},W["utf-8"]=function(l){return new k(l)},Y["utf-8"]=function(l){return new w(l)},function(){"encoding-indexes"in l&&H.forEach(function(l){"Legacy single-byte encodings"===l.heading&&l.encodings.forEach(function(l){var n=l.name,e=p(n);Y[n]=function(l){return new S(e,l)},W[n]=function(l){return new E(e,l)}})})}(),Y.gbk=function(l){return new I(l)},W.gbk=function(l){return new C(l,(!0))},W.gb18030=function(l){return new C(l)},Y.gb18030=function(l){return new I(l)},W.big5=function(l){return new M(l)},Y.big5=function(l){return new j(l)},W["euc-jp"]=function(l){return new x(l)},Y["euc-jp"]=function(l){return new A(l)},W["iso-2022-jp"]=function(l){return new R(l)},Y["iso-2022-jp"]=function(l){return new T(l)},W.shift_jis=function(l){return new P(l)},Y.shift_jis=function(l){return new O(l)},W["euc-kr"]=function(l){return new B(l)},Y["euc-kr"]=function(l){return new N(l)},W["utf-16be"]=function(l){return new L((!0),l)},Y["utf-16be"]=function(l){return new D((!0),l)},W["utf-16le"]=function(l){return new L((!1),l)},Y["utf-16le"]=function(l){return new D((!1),l)},W["x-user-defined"]=function(l){return new q(l)},Y["x-user-defined"]=function(l){return new F(l)},l.TextEncoder||(l.TextEncoder=g),l.TextDecoder||(l.TextDecoder=y)}(this)},{"./encoding-indexes.js":323}],325:[function(l,n,e){"use strict";function t(l){if(l&&l.__esModule)return l;var n={};if(null!=l)for(var e in l)Object.prototype.hasOwnProperty.call(l,e)&&(n[e]=l[e]);return n["default"]=l,n}Object.defineProperty(e,"__esModule",{value:!0}),e.v1=void 0;var u=l("./v1/index"),r=t(u);e.v1=r,e["default"]=r},{"./v1/index":329}],326:[function(l,n,e){"use strict";function t(l){return l&&l.__esModule?l:{"default":l}}function u(l){l.maxConnectionLifetime=r(l.maxConnectionLifetime,N),l.maxConnectionPoolSize=r(l.maxConnectionPoolSize,O.DEFAULT_MAX_SIZE),l.connectionAcquisitionTimeout=r(l.connectionAcquisitionTimeout,O.DEFAULT_ACQUISITION_TIMEOUT)}function r(l,n){var e=parseInt(l,10);return e>0||0===e?e:e<0?o["default"]:n}Object.defineProperty(e,"__esModule",{value:!0}),e.WRITE=e.READ=e.Driver=void 0;var i=l("babel-runtime/core-js/number/max-safe-integer"),o=t(i),a=l("babel-runtime/core-js/object/get-prototype-of"),s=t(a),c=l("babel-runtime/helpers/possibleConstructorReturn"),f=t(c),h=l("babel-runtime/helpers/get"),d=t(h),p=l("babel-runtime/helpers/inherits"),b=t(p),v=l("babel-runtime/helpers/classCallCheck"),_=t(v),m=l("babel-runtime/helpers/createClass"),y=t(m),g=l("./session"),w=t(g),k=l("./internal/pool"),S=t(k),E=l("./internal/connector"),I=l("./internal/stream-observer"),C=t(I),j=l("./error"),M=l("./internal/connection-providers"),A=l("./internal/bookmark"),x=t(A),T=l("./internal/connectivity-verifier"),R=t(T),O=l("./internal/pool-config"),P=t(O),N=36e5,B="READ",U="WRITE",D=function(){function l(n,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};(0,_["default"])(this,l),u(r),this._hostPort=n,this._userAgent=e,this._openSessions={},this._sessionIdGenerator=0,this._token=t,this._config=r,this._pool=new S["default"](this._createConnection.bind(this),this._destroyConnection.bind(this),this._validateConnection.bind(this),P["default"].fromDriverConfig(r)),this._connectionProvider=null,this._onCompleted=null}return(0,y["default"])(l,[{key:"_createConnection",value:function(l,n){var e=this._sessionIdGenerator++,t=(0,E.connect)(l,this._config,this._connectionErrorCode()),u=new L(this,t);return t.initialize(this._userAgent,this._token,u),t._id=e,t._release=function(){return n(l,t)},this._openSessions[e]=t,t}},{key:"_validateConnection",value:function(l){if(!l.isOpen())return!1;var n=this._config.maxConnectionLifetime,e=Date.now()-l.creationTimestamp;return e<=n}},{key:"_destroyConnection",value:function(l){delete this._openSessions[l._id],l.close()}},{key:"session",value:function(n,e){var t=l._validateSessionMode(n),u=this._getOrCreateConnectionProvider(),r=new x["default"](e);return this._createSession(t,u,r,this._config)}},{key:"_createConnectionProvider",value:function(l,n,e){return new M.DirectConnectionProvider(l,n,e)}},{key:"_createSession",value:function(l,n,e,t){return new w["default"](l,n,e,t)}},{key:"_connectionErrorCode",value:function(){return j.SERVICE_UNAVAILABLE}},{key:"_getOrCreateConnectionProvider",value:function(){if(!this._connectionProvider){var l=this._driverOnErrorCallback.bind(this);this._connectionProvider=this._createConnectionProvider(this._hostPort,this._pool,l)}return this._connectionProvider}},{key:"_driverOnErrorCallback",value:function(l){var n=this.onError;n&&l.code===j.SERVICE_UNAVAILABLE&&n(l)}},{key:"close",value:function(){for(var l in this._openSessions)this._openSessions.hasOwnProperty(l)&&this._openSessions[l].close(),this._pool.purgeAll()}},{key:"onCompleted",get:function(){return this._onCompleted},set:function(l){if(this._onCompleted=l,this._onCompleted){var n=this._getOrCreateConnectionProvider(),e=new R["default"](n,this._onCompleted);e.verify()}}}],[{key:"_validateSessionMode",value:function(l){var n=l||U;if(n!==B&&n!==U)throw(0,j.newError)("Illegal session mode "+n);return n}}]),l}(),L=function(l){function n(l,e){(0,_["default"])(this,n);var t=(0,f["default"])(this,(n.__proto__||(0,s["default"])(n)).call(this));return t._driver=l,t._conn=e,t._hasFailed=!1,t}return(0,b["default"])(n,l),(0,y["default"])(n,[{key:"onError",value:function(l){this._hasFailed||((0,d["default"])(n.prototype.__proto__||(0,s["default"])(n.prototype),"onError",this).call(this,l),this._driver.onError&&this._driver.onError(l),this._hasFailed=!0)}}]),n}(C["default"]);e.Driver=D,e.READ=B,e.WRITE=U,e["default"]=D},{"./error":327,"./internal/bookmark":331,"./internal/connection-providers":338,"./internal/connectivity-verifier":339,"./internal/connector":340,"./internal/pool":354,"./internal/pool-config":353,"./internal/stream-observer":361,"./session":371,"babel-runtime/core-js/number/max-safe-integer":21,"babel-runtime/core-js/object/get-prototype-of":27,"babel-runtime/helpers/classCallCheck":34,"babel-runtime/helpers/createClass":35,"babel-runtime/helpers/get":37,"babel-runtime/helpers/inherits":38,"babel-runtime/helpers/possibleConstructorReturn":39}],327:[function(l,n,e){"use strict";function t(l){return l&&l.__esModule?l:{"default":l}}function u(l){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"N/A";return new v(l,n)}Object.defineProperty(e,"__esModule",{value:!0}),e.PROTOCOL_ERROR=e.SESSION_EXPIRED=e.SERVICE_UNAVAILABLE=e.Neo4jError=e.newError=void 0;var r=l("babel-runtime/core-js/object/get-prototype-of"),i=t(r),o=l("babel-runtime/helpers/classCallCheck"),a=t(o),s=l("babel-runtime/helpers/possibleConstructorReturn"),c=t(s),f=l("babel-runtime/helpers/inherits"),h=t(f),d="ServiceUnavailable",p="SessionExpired",b="ProtocolError",v=function(l){function n(l){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"N/A";(0,a["default"])(this,n);var t=(0,c["default"])(this,(n.__proto__||(0,i["default"])(n)).call(this,l));return t.message=l,t.code=e,t.name="Neo4jError",t}return(0,h["default"])(n,l),n}(Error);e.newError=u,e.Neo4jError=v,e.SERVICE_UNAVAILABLE=d,e.SESSION_EXPIRED=p,e.PROTOCOL_ERROR=b},{"babel-runtime/core-js/object/get-prototype-of":27,"babel-runtime/helpers/classCallCheck":34,"babel-runtime/helpers/inherits":38,"babel-runtime/helpers/possibleConstructorReturn":39}],328:[function(l,n,e){"use strict";function t(l){return l&&l.__esModule?l:{"default":l}}Object.defineProperty(e,"__esModule",{value:!0}),e.PathSegment=e.Path=e.UnboundRelationship=e.Relationship=e.Node=void 0;var u=l("babel-runtime/core-js/json/stringify"),r=t(u),i=l("babel-runtime/core-js/object/keys"),o=t(i),a=l("babel-runtime/helpers/classCallCheck"),s=t(a),c=l("babel-runtime/helpers/createClass"),f=t(c),h=l("./integer"),d=(t(h),function(){function l(n,e,t){(0,s["default"])(this,l),this.identity=n,this.labels=e,this.properties=t}return(0,f["default"])(l,[{key:"toString",value:function(){for(var l="("+this.identity,n=0;n0){l+=" {";for(var t=0;t0&&(l+=","),l+=e[t]+":"+(0,r["default"])(this.properties[e[t]]);l+="}"}return l+=")"}}]),l}()),p=function(){function l(n,e,t,u,r){(0,s["default"])(this,l),this.identity=n,this.start=e,this.end=t,this.type=u,this.properties=r}return(0,f["default"])(l,[{key:"toString",value:function(){var l="("+this.start+")-[:"+this.type,n=(0,o["default"])(this.properties);if(n.length>0){l+=" {";for(var e=0;e0&&(l+=","),l+=n[e]+":"+(0,r["default"])(this.properties[n[e]]);l+="}"}return l+="]->("+this.end+")"}}]),l}(),b=function(){function l(n,e,t){(0,s["default"])(this,l),this.identity=n,this.type=e,this.properties=t}return(0,f["default"])(l,[{key:"bind",value:function(l,n){return new p(this.identity,l,n,this.type,this.properties)}},{key:"toString",value:function(){var l="-[:"+this.type,n=(0,o["default"])(this.properties);if(n.length>0){l+=" {";for(var e=0;e0&&(l+=","),l+=n[e]+":"+(0,r["default"])(this.properties[n[e]]);l+="}"}return l+="]->"}}]),l}(),v=function m(l,n,e){(0,s["default"])(this,m),this.start=l,this.relationship=n,this.end=e},_=function y(l,n,e){(0,s["default"])(this,y),this.start=l,this.end=n,this.segments=e,this.length=e.length};e.Node=d,e.Relationship=p,e.UnboundRelationship=b,e.Path=_,e.PathSegment=v},{"./integer":330,"babel-runtime/core-js/json/stringify":18,"babel-runtime/core-js/object/keys":28,"babel-runtime/helpers/classCallCheck":34,"babel-runtime/helpers/createClass":35}],329:[function(l,n,e){"use strict";function t(l){return l&&l.__esModule?l:{"default":l}}function u(l,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,y.assertString)(l,"Bolt URL");var t=w["default"].parseDatabaseUrl(l);if("bolt+routing"===t.scheme)return new v["default"](t.hostAndPort,t.query,j,n,e);if("bolt"===t.scheme){if(!(0,y.isEmptyObjectOrNull)(t.query))throw new Error("Parameters are not supported with scheme 'bolt'. Given URL: '"+l+"'");return new p.Driver(t.hostAndPort,j,n,e)}if("http"===t.scheme||"https"===t.scheme)return new S["default"](t,j,n,e);throw new Error("Unknown scheme: "+t.scheme)}Object.defineProperty(e,"__esModule",{value:!0}),e.temporal=e.spatial=e.error=e.session=e.types=e.auth=e.Neo4jError=e.integer=e.isDateTime=e.isLocalDateTime=e.isDate=e.isTime=e.isLocalTime=e.isDuration=e.isPoint=e.isInt=e["int"]=e.driver=void 0;var r=l("./integer"),i=l("./graph-types"),o=l("./error"),a=l("./result"),s=t(a),c=l("./result-summary"),f=t(c),h=l("./record"),d=t(h),p=l("./driver"),b=l("./routing-driver"),v=t(b),_=l("../version"),m=t(_),y=l("./internal/util"),g=l("./internal/url-util"),w=t(g),k=l("./internal/http/http-driver"),S=t(k),E=l("./spatial-types"),I=l("./temporal-types"),C={basic:function(l,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return e?{scheme:"basic",principal:l,credentials:n,realm:e}:{scheme:"basic",principal:l,credentials:n}},kerberos:function(l){return{scheme:"kerberos",principal:"",credentials:l}},custom:function(l,n,e,t){var u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;return u?{scheme:t,principal:l,credentials:n,realm:e,parameters:u}:{scheme:t,principal:l,credentials:n,realm:e}}},j="neo4j-javascript/"+m["default"],M={Node:i.Node,Relationship:i.Relationship,UnboundRelationship:i.UnboundRelationship,PathSegment:i.PathSegment,Path:i.Path,Result:s["default"],ResultSummary:f["default"],Record:d["default"],Point:E.Point,Date:I.Date,DateTime:I.DateTime,Duration:I.Duration,LocalDateTime:I.LocalDateTime,LocalTime:I.LocalTime,Time:I.Time},A={READ:p.READ,WRITE:p.WRITE},x={SERVICE_UNAVAILABLE:o.SERVICE_UNAVAILABLE,SESSION_EXPIRED:o.SESSION_EXPIRED,PROTOCOL_ERROR:o.PROTOCOL_ERROR},T={toNumber:r.toNumber,toString:r.toString,inSafeRange:r.inSafeRange},R={isPoint:E.isPoint},O={isDuration:I.isDuration,isLocalTime:I.isLocalTime,isTime:I.isTime,isDate:I.isDate,isLocalDateTime:I.isLocalDateTime,isDateTime:I.isDateTime},P={driver:u,"int":r["int"],isInt:r.isInt,isPoint:E.isPoint,isDuration:I.isDuration,isLocalTime:I.isLocalTime,isTime:I.isTime,isDate:I.isDate,isLocalDateTime:I.isLocalDateTime,isDateTime:I.isDateTime,integer:T,Neo4jError:o.Neo4jError,auth:C,types:M,session:A,error:x,spatial:R,temporal:O};e.driver=u,e["int"]=r["int"],e.isInt=r.isInt,e.isPoint=E.isPoint,e.isDuration=I.isDuration,e.isLocalTime=I.isLocalTime,e.isTime=I.isTime,e.isDate=I.isDate,e.isLocalDateTime=I.isLocalDateTime,e.isDateTime=I.isDateTime,e.integer=T,e.Neo4jError=o.Neo4jError,e.auth=C,e.types=M,e.session=A,e.error=x,e.spatial=R,e.temporal=O,e["default"]=P},{"../version":375,"./driver":326,"./error":327,"./graph-types":328,"./integer":330,"./internal/http/http-driver":343,"./internal/url-util":364,"./internal/util":366,"./record":367,"./result":369,"./result-summary":368,"./routing-driver":370,"./spatial-types":372,"./temporal-types":373}],330:[function(l,n,e){"use strict";function t(l){return l&&l.__esModule?l:{"default":l}}Object.defineProperty(e,"__esModule",{value:!0}),e.toString=e.toNumber=e.inSafeRange=e.isInt=e["int"]=void 0;var u=l("babel-runtime/helpers/classCallCheck"),r=t(u),i=l("babel-runtime/helpers/createClass"),o=t(i),a=l("./error"),s=function(){function l(n,e){(0,r["default"])(this,l),this.low=0|n,this.high=0|e}return(0,o["default"])(l,[{key:"inSafeRange",value:function(){return this.greaterThanOrEqual(l.MIN_SAFE_VALUE)&&this.lessThanOrEqual(l.MAX_SAFE_VALUE)}},{key:"toInt",value:function(){return this.low}},{key:"toNumber",value:function(){return this.high*h+(this.low>>>0)}},{key:"toNumberOrInfinity",value:function(){return this.lessThan(l.MIN_SAFE_VALUE)?Number.NEGATIVE_INFINITY:this.greaterThan(l.MAX_SAFE_VALUE)?Number.POSITIVE_INFINITY:this.toNumber()}},{key:"toString",value:function(n){if(n=n||10,n<2||36>>0,s=a.toString(n);if(e=o,e.isZero())return s+i;for(;s.length<6;)s="0"+s;i=""+s+i}}},{key:"getHighBits",value:function(){return this.high}},{key:"getLowBits",value:function(){return this.low}},{key:"getNumBitsAbs",value:function(){if(this.isNegative())return this.equals(l.MIN_VALUE)?64:this.negate().getNumBitsAbs();for(var n=0!=this.high?this.high:this.low,e=31;e>0&&0==(n&1<=0}},{key:"isOdd",value:function(){return 1===(1&this.low)}},{key:"isEven",value:function(){return 0===(1&this.low)}},{key:"equals",value:function(n){return l.isInteger(n)||(n=l.fromValue(n)),this.high===n.high&&this.low===n.low}},{key:"notEquals",value:function(l){return!this.equals(l)}},{key:"lessThan",value:function(l){return this.compare(l)<0}},{key:"lessThanOrEqual",value:function(l){return this.compare(l)<=0}},{key:"greaterThan",value:function(l){return this.compare(l)>0}},{key:"greaterThanOrEqual",value:function(l){return this.compare(l)>=0}},{key:"compare",value:function(n){if(l.isInteger(n)||(n=l.fromValue(n)),this.equals(n))return 0;var e=this.isNegative(),t=n.isNegative();return e&&!t?-1:!e&&t?1:this.subtract(n).isNegative()?-1:1}},{key:"negate",value:function(){return this.equals(l.MIN_VALUE)?l.MIN_VALUE:this.not().add(l.ONE)}},{key:"add",value:function(n){l.isInteger(n)||(n=l.fromValue(n));var e=this.high>>>16,t=65535&this.high,u=this.low>>>16,r=65535&this.low,i=n.high>>>16,o=65535&n.high,a=n.low>>>16,s=65535&n.low,c=0,f=0,h=0,d=0;return d+=r+s,h+=d>>>16,d&=65535,h+=u+a,f+=h>>>16,h&=65535,f+=t+o,c+=f>>>16,f&=65535,c+=e+i,c&=65535,l.fromBits(h<<16|d,c<<16|f)}},{key:"subtract",value:function(n){return l.isInteger(n)||(n=l.fromValue(n)),this.add(n.negate())}},{key:"multiply",value:function(n){if(this.isZero())return l.ZERO;if(l.isInteger(n)||(n=l.fromValue(n)),n.isZero())return l.ZERO;if(this.equals(l.MIN_VALUE))return n.isOdd()?l.MIN_VALUE:l.ZERO;if(n.equals(l.MIN_VALUE))return this.isOdd()?l.MIN_VALUE:l.ZERO;if(this.isNegative())return n.isNegative()?this.negate().multiply(n.negate()):this.negate().multiply(n).negate();if(n.isNegative())return this.multiply(n.negate()).negate();if(this.lessThan(b)&&n.lessThan(b))return l.fromNumber(this.toNumber()*n.toNumber());var e=this.high>>>16,t=65535&this.high,u=this.low>>>16,r=65535&this.low,i=n.high>>>16,o=65535&n.high,a=n.low>>>16,s=65535&n.low,c=0,f=0,h=0,d=0;return d+=r*s,h+=d>>>16,d&=65535,h+=u*s,f+=h>>>16,h&=65535,h+=r*a,f+=h>>>16,h&=65535,f+=t*s,c+=f>>>16,f&=65535,f+=u*a,c+=f>>>16,f&=65535,f+=r*o,c+=f>>>16,f&=65535,c+=e*s+t*a+u*o+r*i,c&=65535,l.fromBits(h<<16|d,c<<16|f)}},{key:"div",value:function(n){if(l.isInteger(n)||(n=l.fromValue(n)),n.isZero())throw(0,a.newError)("division by zero");if(this.isZero())return l.ZERO;var e,t,u;if(this.equals(l.MIN_VALUE)){if(n.equals(l.ONE)||n.equals(l.NEG_ONE))return l.MIN_VALUE;if(n.equals(l.MIN_VALUE))return l.ONE;var r=this.shiftRight(1);return e=r.div(n).shiftLeft(1),e.equals(l.ZERO)?n.isNegative()?l.ONE:l.NEG_ONE:(t=this.subtract(n.multiply(e)),u=e.add(t.div(n)))}if(n.equals(l.MIN_VALUE))return l.ZERO;if(this.isNegative())return n.isNegative()?this.negate().div(n.negate()):this.negate().div(n).negate();if(n.isNegative())return this.div(n.negate()).negate();for(u=l.ZERO,t=this;t.greaterThanOrEqual(n);){e=Math.max(1,Math.floor(t.toNumber()/n.toNumber()));for(var i=Math.ceil(Math.log(e)/Math.LN2),o=i<=48?1:Math.pow(2,i-48),s=l.fromNumber(e),c=s.multiply(n);c.isNegative()||c.greaterThan(t);)e-=o,s=l.fromNumber(e),c=s.multiply(n);s.isZero()&&(s=l.ONE),u=u.add(s),t=t.subtract(c)}return u}},{key:"modulo",value:function(n){return l.isInteger(n)||(n=l.fromValue(n)),this.subtract(this.div(n).multiply(n))}},{key:"not",value:function(){return l.fromBits(~this.low,~this.high)}},{key:"and",value:function(n){return l.isInteger(n)||(n=l.fromValue(n)),l.fromBits(this.low&n.low,this.high&n.high)}},{key:"or",value:function(n){return l.isInteger(n)||(n=l.fromValue(n)),l.fromBits(this.low|n.low,this.high|n.high)}},{key:"xor",value:function(n){return l.isInteger(n)||(n=l.fromValue(n)),l.fromBits(this.low^n.low,this.high^n.high)}},{key:"shiftLeft",value:function(n){return l.isInteger(n)&&(n=n.toInt()),0===(n&=63)?this:n<32?l.fromBits(this.low<>>32-n):l.fromBits(0,this.low<>>n|this.high<<32-n,this.high>>n):l.fromBits(this.high>>n-32,this.high>=0?0:-1)}}]),l}();s.__isInteger__,Object.defineProperty(s.prototype,"__isInteger__",{value:!0,enumerable:!1,configurable:!1}),s.isInteger=function(l){return(l&&l.__isInteger__)===!0};var c={};s.fromInt=function(l){var n,e;return l=0|l,-128<=l&&l<128&&(e=c[l])?e:(n=new s(l,l<0?-1:0,(!1)),-128<=l&&l<128&&(c[l]=n),n)},s.fromNumber=function(l){return isNaN(l)||!isFinite(l)?s.ZERO:l<=-p?s.MIN_VALUE:l+1>=p?s.MAX_VALUE:l<0?s.fromNumber(-l).negate():new s(l%h|0,l/h|0)},s.fromBits=function(l,n){return new s(l,n)},s.fromString=function(l,n){if(0===l.length)throw(0,a.newError)("number format error: empty string");if("NaN"===l||"Infinity"===l||"+Infinity"===l||"-Infinity"===l)return s.ZERO;if(n=n||10,n<2||360)throw(0,a.newError)('number format error: interior "-" character: '+l);if(0===e)return s.fromString(l.substring(1),n).negate();for(var t=s.fromNumber(Math.pow(n,8)),u=s.ZERO,r=0;re&&(n=u,e=r)}return n}function o(l){if(l&&0===l.indexOf(m)){var n=parseInt(l.substring(m.length));return n?n:y}return y}Object.defineProperty(e,"__esModule",{value:!0});var a=l("babel-runtime/helpers/defineProperty"),s=u(a),c=l("babel-runtime/helpers/classCallCheck"),f=u(c),h=l("babel-runtime/helpers/createClass"),d=u(h),p=l("./util"),b=t(p),v="bookmark",_="bookmarks",m="neo4j:bookmark:v1:tx",y=-1,g=function(){function l(n){(0,f["default"])(this,l),this._values=r(n),this._maxValue=i(this._values)}return(0,d["default"])(l,[{key:"isEmpty",value:function(){return null===this._maxValue}},{key:"maxBookmarkAsString",value:function(){return this._maxValue}},{key:"asBeginTransactionParameters",value:function(){var l;return this.isEmpty()?{}:(l={},(0,s["default"])(l,v,this._maxValue),(0,s["default"])(l,_,this._values),l)}}]),l}();e["default"]=g},{"./util":366,"babel-runtime/helpers/classCallCheck":34,"babel-runtime/helpers/createClass":35,"babel-runtime/helpers/defineProperty":36}],332:[function(l,n,e){"use strict";function t(l){return l&&l.__esModule?l:{"default":l}}function u(l){return"number"==typeof l&&"function"==typeof m.Buffer.alloc?m.Buffer.alloc(l):new m.Buffer(l)}function r(l){return new E(l)}Object.defineProperty(e,"__esModule",{value:!0}),e.alloc=e.NodeBuffer=e.CombinedBuffer=e.SliceBuffer=e.HeapBuffer=e.BaseBuffer=void 0;var i=l("babel-runtime/helpers/get"),o=t(i),a=l("babel-runtime/core-js/object/get-prototype-of"),s=t(a),c=l("babel-runtime/helpers/possibleConstructorReturn"),f=t(c),h=l("babel-runtime/helpers/inherits"),d=t(h),p=l("babel-runtime/helpers/classCallCheck"),b=t(p),v=l("babel-runtime/helpers/createClass"),_=t(v),m=l("buffer"),y=function(){function l(n){(0,b["default"])(this,l),this.position=0,this.length=n}return(0,_["default"])(l,[{key:"getInt16",value:function(l){return this.getInt8(l)<<8|this.getUInt8(l+1)}},{key:"getUInt16",value:function(l){return this.getUInt8(l)<<8|this.getUInt8(l+1)}},{key:"getInt32",value:function(l){return this.getInt8(l)<<24|this.getUInt8(l+1)<<16|this.getUInt8(l+2)<<8|this.getUInt8(l+3)}},{key:"getUInt32",value:function(l){return this.getUInt8(l)<<24|this.getUInt8(l+1)<<16|this.getUInt8(l+2)<<8|this.getUInt8(l+3)}},{key:"getInt64",value:function(l){return this.getInt8(l)<<56|this.getUInt8(l+1)<<48|this.getUInt8(l+2)<<40|this.getUInt8(l+3)<<32|this.getUInt8(l+4)<<24|this.getUInt8(l+5)<<16|this.getUInt8(l+6)<<8|this.getUInt8(l+7)}},{key:"getSlice",value:function(l,n){return new w(l,n,this)}},{key:"putInt16",value:function(l,n){this.putInt8(l,n>>8),this.putUInt8(l+1,255&n)}},{key:"putUInt16",value:function(l,n){this.putUInt8(l,n>>8&255),this.putUInt8(l+1,255&n)}},{key:"putInt32",value:function(l,n){this.putInt8(l,n>>24),this.putUInt8(l+1,n>>16&255),this.putUInt8(l+2,n>>8&255),this.putUInt8(l+3,255&n)}},{key:"putUInt32",value:function(l,n){this.putUInt8(l,n>>24&255),this.putUInt8(l+1,n>>16&255),this.putUInt8(l+2,n>>8&255),this.putUInt8(l+3,255&n)}},{key:"putInt64",value:function(l,n){this.putInt8(l,n>>48),this.putUInt8(l+1,n>>42&255),this.putUInt8(l+2,n>>36&255),this.putUInt8(l+3,n>>30&255),this.putUInt8(l+4,n>>24&255),this.putUInt8(l+5,n>>16&255),this.putUInt8(l+6,n>>8&255),this.putUInt8(l+7,255&n)}},{key:"putBytes",value:function(l,n){for(var e=0,t=n.remaining();e0}},{key:"reset",value:function(){this.position=0}},{key:"toString",value:function(){return this.constructor.name+"( position="+this.position+" )\n "+this.toHex()}},{key:"toHex",value:function(){for(var l="",n=0;n=e.length))return e.getUInt8(l);l-=e.length}}},{key:"getInt8",value:function(l){for(var n=0;n=e.length))return e.getInt8(l);l-=e.length}}},{key:"getFloat64",value:function(l){for(var n=r(8),e=0;e<8;e++)n.putUInt8(e,this.getUInt8(l+e));return n.getFloat64(0)}}]),n}(y),S=function(l){function n(l){(0,b["default"])(this,n);var e=l instanceof m.Buffer?l:u(l),t=(0,f["default"])(this,(n.__proto__||(0,s["default"])(n)).call(this,e.length));return t._buffer=e,t}return(0,d["default"])(n,l),(0,_["default"])(n,[{key:"getUInt8",value:function(l){return this._buffer.readUInt8(l)}},{key:"getInt8",value:function(l){return this._buffer.readInt8(l)}},{key:"getFloat64",value:function(l){return this._buffer.readDoubleBE(l)}},{key:"putUInt8",value:function(l,n){this._buffer.writeUInt8(n,l)}},{key:"putInt8",value:function(l,n){this._buffer.writeInt8(n,l)}},{key:"putFloat64",value:function(l,n){this._buffer.writeDoubleBE(n,l)}},{key:"putBytes",value:function(l,e){if(e instanceof n){var t=Math.min(e.length-e.position,this.length-l);e._buffer.copy(this._buffer,l,e.position,e.position+t),e.position+=t}else(0,o["default"])(n.prototype.__proto__||(0,s["default"])(n.prototype),"putBytes",this).call(this,l,e)}},{key:"getSlice",value:function(l,e){return new n(this._buffer.slice(l,l+e))}}]),n}(y),E=g;try{l.resolve("buffer"),E=S}catch(I){}e.BaseBuffer=y,e.HeapBuffer=g,e.SliceBuffer=w,e.CombinedBuffer=k,e.NodeBuffer=S,e.alloc=r},{"babel-runtime/core-js/object/get-prototype-of":27,"babel-runtime/helpers/classCallCheck":34,"babel-runtime/helpers/createClass":35,"babel-runtime/helpers/get":37,"babel-runtime/helpers/inherits":38,"babel-runtime/helpers/possibleConstructorReturn":39,buffer:76}],333:[function(l,n,e){"use strict";function t(l){return l&&l.__esModule?l:{"default":l}}function u(l){var n=null==l.encrypted;return n?(0,h["default"])("trust_all_certificates"):l.encrypted}function r(l){return l.trust?l.trust:(0,h["default"])("trust_all_certificates")?"TRUST_ALL_CERTIFICATES":"TRUST_CUSTOM_CA_SIGNED_CERTIFICATES"}function i(l){return l.trustedCertificates||[]}function o(l){return l.knownHosts||null}function a(l){var n=parseInt(l.connectionTimeout,10);return 0===n?null:n&&n<0?null:n?n:p}Object.defineProperty(e,"__esModule",{value:!0});var s=l("babel-runtime/helpers/classCallCheck"),c=t(s),f=l("./features"),h=t(f),d=l("../error"),p=5e3,b=function v(l,n,e){(0,c["default"])(this,v),this.url=l,this.encrypted=u(n),this.trust=r(n),this.trustedCertificates=i(n),this.knownHostsPath=o(n),this.connectionErrorCode=e||d.SERVICE_UNAVAILABLE,this.connectionTimeout=a(n)};e["default"]=b},{"../error":327,"./features":341,"babel-runtime/helpers/classCallCheck":34}],334:[function(l,n,e){"use strict";function t(l){return l&&l.__esModule?l:{ "default":l}}function u(){var n=l,e=n("process");return e.env["win32"==e.platform?"USERPROFILE":"HOME"]}function r(l){try{m["default"].mkdirSync(l)}catch(n){if("ENOENT"===n.code)return r(g["default"].dirname(l)),void r(l);if("EEXIST"===n.code)return;throw n}}function i(n,e,t){try{m["default"].accessSync(e)}catch(u){return t(null)}var r=!1;l("readline").createInterface({input:m["default"].createReadStream(e)}).on("line",function(l){!r&&l.startsWith(n)&&(r=!0,t(l.split(" ")[1]))}).on("close",function(){r||t(null)})}function o(l,n,e,t){if(C[l])return t(null);C[l]=1;try{m["default"].accessSync(n)}catch(u){r(g["default"].dirname(n))}m["default"].appendFile(n,l+" "+e+w.EOL,"utf8",function(n){return delete C[l],n&&console.log(n),t(n)})}function a(l,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){return null};if(l.encrypted===!1||l.encrypted===S.ENCRYPTION_OFF){var t=p["default"].connect(l.url.port,l.url.host,n);return t.on("error",e),t}return j[l.trust]?j[l.trust](l,n,e):void e((0,E.newError)("Unknown trust strategy: "+l.trust+". Please use either trust:'TRUST_CUSTOM_CA_SIGNED_CERTIFICATES' or trust:'TRUST_ALL_CERTIFICATES' in your driver configuration. Alternatively, you can disable encryption by setting `encrypted:\""+S.ENCRYPTION_OFF+'"`. There is no mechanism to use encryption without trust verification, because this incurs the overhead of encryption without improving security. If the driver does not verify that the peer it is connected to is really Neo4j, it is very easy for an attacker to bypass the encryption by pretending to be Neo4j.'))}Object.defineProperty(e,"__esModule",{value:!0});var s=l("babel-runtime/helpers/classCallCheck"),c=t(s),f=l("babel-runtime/helpers/createClass"),h=t(f),d=l("net"),p=t(d),b=l("tls"),v=t(b),_=l("fs"),m=t(_),y=l("path"),g=t(y),w=l("os"),k=l("./buf"),S=l("./util"),E=l("./../error"),I=0,C={},j={TRUST_SIGNED_CERTIFICATES:function(l,n,e){return console.warn("`TRUST_SIGNED_CERTIFICATES` has been deprecated as option and will be removed in a future version of the driver. Please use `TRUST_CUSTOM_CA_SIGNED_CERTIFICATES` instead."),j.TRUST_CUSTOM_CA_SIGNED_CERTIFICATES(l,n,e)},TRUST_CUSTOM_CA_SIGNED_CERTIFICATES:function(l,n,e){if(!l.trustedCertificates||0===l.trustedCertificates.length)return void e((0,E.newError)('You are using TRUST_CUSTOM_CA_SIGNED_CERTIFICATES as the method to verify trust for encrypted connections, but have not configured any trustedCertificates. You must specify the path to at least one trusted X.509 certificate for this to work. Two other alternatives is to use TRUST_ALL_CERTIFICATES or to disable encryption by setting encrypted="'+S.ENCRYPTION_OFF+'"in your driver configuration.'));var t={ca:l.trustedCertificates.map(function(l){return m["default"].readFileSync(l)}),rejectUnauthorized:!1},u=v["default"].connect(l.url.port,l.url.host,t,function(){u.authorized?n():e((0,E.newError)("Server certificate is not trusted. If you trust the database you are connecting to, add the signing certificate, or the server certificate, to the list of certificates trusted by this driver using `neo4j.v1.driver(.., { trustedCertificates:['path/to/certificate.crt']}). This is a security measure to protect against man-in-the-middle attacks. If you are just trying Neo4j out and are not concerned about encryption, simply disable it using `encrypted=\""+S.ENCRYPTION_OFF+'"` in the driver options. Socket responded with: '+u.authorizationError))});return u.on("error",e),u},TRUST_SYSTEM_CA_SIGNED_CERTIFICATES:function(l,n,e){var t={rejectUnauthorized:!1},u=v["default"].connect(l.url.port,l.url.host,t,function(){u.authorized?n():e((0,E.newError)("Server certificate is not trusted. If you trust the database you are connecting to, use TRUST_CUSTOM_CA_SIGNED_CERTIFICATES and add the signing certificate, or the server certificate, to the list of certificates trusted by this driver using `neo4j.v1.driver(.., { trustedCertificates:['path/to/certificate.crt']}). This is a security measure to protect against man-in-the-middle attacks. If you are just trying Neo4j out and are not concerned about encryption, simply disable it using `encrypted=\""+S.ENCRYPTION_OFF+'"` in the driver options. Socket responded with: '+u.authorizationError))});return u.on("error",e),u},TRUST_ON_FIRST_USE:function(n,e,t){console.warn("`TRUST_ON_FIRST_USE` has been deprecated as option and will be removed in a future version of the driver. Please use `TRUST_ALL_CERTIFICATES` instead.");var r={rejectUnauthorized:!1},a=v["default"].connect(n.url.port,n.url.host,r,function(){var r=a.getPeerCertificate(!0);if(!r.raw)return void t((0,E.newError)('You are using a version of NodeJS that does not support trust-on-first use encryption. You can either upgrade NodeJS to a newer version, use `trust:TRUST_CUSTOM_CA_SIGNED_CERTIFICATES` in your driver config instead, or disable encryption using `encrypted:"'+S.ENCRYPTION_OFF+'"`.'));var s=l("crypto").createHash("sha512").update(r.raw).digest("hex"),c=n.knownHostsPath||g["default"].join(u(),".neo4j","known_hosts"),f=n.url.hostAndPort;i(f,c,function(l){l===s?e():null==l?o(f,c,s,function(l){return l?t(l):e()}):t((0,E.newError)("Database encryption certificate has changed, and no longer matches the certificate stored for "+f+" in `"+c+"`. As a security precaution, this driver will not automatically trust the new certificate, because doing so would allow an attacker to pretend to be the Neo4j instance we want to connect to. The certificate provided by the server looks like: "+r+". If you trust that this certificate is valid, simply remove the line starting with "+f+" in `"+c+'`, and the driver will update the file with the new certificate. You can configure which file the driver should use to store this information by setting `knownHosts` to another path in your driver configuration - and you can disable encryption there as well using `encrypted:"'+S.ENCRYPTION_OFF+'"`.'))})});return a.on("error",t),a},TRUST_ALL_CERTIFICATES:function(l,n,e){var t={rejectUnauthorized:!1},u=v["default"].connect(l.url.port,l.url.host,t,function(){var l=u.getPeerCertificate();(0,S.isEmptyObjectOrNull)(l)?e((0,E.newError)('Secure connection was successful but server did not return any valid certificates. Such connection can not be trusted. If you are just trying Neo4j out and are not concerned about encryption, simply disable it using `encrypted="'+S.ENCRYPTION_OFF+'"` in the driver options. Socket responded with: '+u.authorizationError)):n()});return u.on("error",e),u}},M=function(){function l(n){(0,c["default"])(this,l);var e=this;this.id=I++,this.available=!0,this._pending=[],this._open=!0,this._error=null,this._handleConnectionError=this._handleConnectionError.bind(this),this._handleConnectionTerminated=this._handleConnectionTerminated.bind(this),this._connectionErrorCode=n.connectionErrorCode,this._encrypted=n.encrypted,this._conn=a(n,function(){if(e._open){e._conn.on("data",function(l){e.onmessage&&e.onmessage(new k.NodeBuffer(l))}),e._conn.on("error",e._handleConnectionError),e._conn.on("end",e._handleConnectionTerminated);var l=e._pending;e._pending=null;for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:function(){return null};this._open=!1,this._conn?(this._conn.end(),this._conn.removeListener("end",this._handleConnectionTerminated),this._conn.on("end",l)):l()}}]),l}(),A={channel:M,available:!0};try{l.resolve("net")}catch(x){A={available:!1}}e["default"]=A},{"./../error":327,"./buf":332,"./util":366,"babel-runtime/helpers/classCallCheck":34,"babel-runtime/helpers/createClass":35,crypto:218,fs:74,net:74,os:270,path:276,readline:74,tls:74}],335:[function(l,n,e){"use strict";function t(l){return l&&l.__esModule?l:{"default":l}}function u(l,n){var e=l+"://"+n.hostAndPort;try{return new WebSocket(e)}catch(t){if(r(t,n)){var u=o(l,n);return new WebSocket(u)}throw t}}function r(l,n){return"SyntaxError"===l.name&&i(n)}function i(l){var n=l.hostAndPort;return"["===n.charAt(0)&&n.indexOf("]")!==-1}function o(l,n){var e=n.host.replace(new RegExp(":","g"),"-"),t=e.replace("%","s"),u=t+".ipv6-literal.net";return l+"://"+u+":"+n.port}Object.defineProperty(e,"__esModule",{value:!0});var a=l("babel-runtime/helpers/classCallCheck"),s=t(a),c=l("babel-runtime/helpers/createClass"),f=t(c),h=l("./buf"),d=l("./../error"),p=l("./util"),b=function(){function l(n){(0,s["default"])(this,l),this._open=!0,this._pending=[],this._error=null,this._handleConnectionError=this._handleConnectionError.bind(this),this._config=n;var e="ws";if(n.encrypted===!0||n.encrypted===p.ENCRYPTION_ON){if(n.trust&&"TRUST_CUSTOM_CA_SIGNED_CERTIFICATES"!==n.trust)return void(this._error=(0,d.newError)("The browser version of this driver only supports one trust strategy, 'TRUST_CUSTOM_CA_SIGNED_CERTIFICATES'. "+n.trust+' is not supported. Please either use TRUST_CUSTOM_CA_SIGNED_CERTIFICATES or disable encryption by setting `encrypted:"'+p.ENCRYPTION_OFF+'"` in the driver configuration.'));e="wss"}this._ws=u(e,n.url),this._ws.binaryType="arraybuffer";var t=this;this._ws.onclose=function(l){l.wasClean||t._handleConnectionError()},this._ws.onopen=function(){t._clearConnectionTimeout();var l=t._pending;t._pending=null;for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:function(){return null};this._open=!1,this._clearConnectionTimeout(),this._ws.close(),this._ws.onclose=l}},{key:"_setupConnectionTimeout",value:function(){var l=this,n=this._config.connectionTimeout;if(n){var e=this._ws;return setTimeout(function(){e.readyState!==WebSocket.OPEN&&(l._connectionTimeoutFired=!0,e.close())},n)}return null}},{key:"_clearConnectionTimeout",value:function(){var l=this._connectionTimeoutId;(l||0===l)&&(this._connectionTimeoutFired=!1,this._connectionTimeoutId=null,clearTimeout(l))}}]),l}(),v="undefined"!=typeof WebSocket,_={channel:b,available:v};e["default"]=_},{"./../error":327,"./buf":332,"./util":366,"babel-runtime/helpers/classCallCheck":34,"babel-runtime/helpers/createClass":35}],336:[function(l,n,e){"use strict";function t(l){return l&&l.__esModule?l:{"default":l}}Object.defineProperty(e,"__esModule",{value:!0}),e.Dechunker=e.Chunker=void 0;var u=l("babel-runtime/core-js/object/get-prototype-of"),r=t(u),i=l("babel-runtime/helpers/classCallCheck"),o=t(i),a=l("babel-runtime/helpers/createClass"),s=t(a),c=l("babel-runtime/helpers/possibleConstructorReturn"),f=t(c),h=l("babel-runtime/helpers/inherits"),d=t(h),p=l("./buf"),b=2,v=0,_=1400,m=function(l){function n(l,e){(0,o["default"])(this,n);var t=(0,f["default"])(this,(n.__proto__||(0,r["default"])(n)).call(this,0));return t._bufferSize=e||_,t._ch=l,t._buffer=(0,p.alloc)(t._bufferSize),t._currentChunkStart=0,t._chunkOpen=!1,t}return(0,d["default"])(n,l),(0,s["default"])(n,[{key:"putUInt8",value:function(l,n){this._ensure(1),this._buffer.writeUInt8(n)}},{key:"putInt8",value:function(l,n){this._ensure(1),this._buffer.writeInt8(n)}},{key:"putFloat64",value:function(l,n){this._ensure(8),this._buffer.writeFloat64(n)}},{key:"putBytes",value:function(l,n){for(;n.remaining()>0;)this._ensure(1),this._buffer.remaining()>n.remaining()?this._buffer.writeBytes(n):this._buffer.writeBytes(n.readSlice(this._buffer.remaining()));return this}},{key:"flush",value:function(){if(this._buffer.position>0){this._closeChunkIfOpen();var l=this._buffer;this._buffer=null,this._ch.write(l.getSlice(0,l.position)),this._buffer=(0,p.alloc)(this._bufferSize),this._chunkOpen=!1}return this}},{key:"messageBoundary",value:function(){this._closeChunkIfOpen(),this._buffer.remaining()=2?this._onHeader(l.readUInt16()):(this._partialChunkHeader=l.readUInt8()<<8,this.IN_HEADER)}},{key:"IN_HEADER",value:function(l){return this._onHeader(65535&(this._partialChunkHeader|l.readUInt8()))}},{key:"IN_CHUNK",value:function(l){return this._chunkSize<=l.remaining()?(this._currentMessage.push(l.readSlice(this._chunkSize)),this.AWAITING_CHUNK):(this._chunkSize-=l.remaining(),this._currentMessage.push(l.readSlice(l.remaining())),this.IN_CHUNK)}},{key:"CLOSED",value:function(l){}},{key:"_onHeader",value:function(l){if(0==l){var n=void 0;return n=1==this._currentMessage.length?this._currentMessage[0]:new p.CombinedBuffer(this._currentMessage),this._currentMessage=[],this.onmessage(n),this.AWAITING_CHUNK}return this._chunkSize=l,this.IN_CHUNK}},{key:"write",value:function(l){for(;l.hasRemaining();)this._state=this._state(l)}}]),l}();e.Chunker=m,e.Dechunker=y},{"./buf":332,"babel-runtime/core-js/object/get-prototype-of":27,"babel-runtime/helpers/classCallCheck":34,"babel-runtime/helpers/createClass":35,"babel-runtime/helpers/inherits":38,"babel-runtime/helpers/possibleConstructorReturn":39}],337:[function(l,n,e){"use strict";function t(l){return l&&l.__esModule?l:{"default":l}}function u(l){}Object.defineProperty(e,"__esModule",{value:!0}),e.EMPTY_CONNECTION_HOLDER=void 0;var r=l("babel-runtime/core-js/object/get-prototype-of"),i=t(r),o=l("babel-runtime/helpers/possibleConstructorReturn"),a=t(o),s=l("babel-runtime/helpers/inherits"),c=t(s),f=l("babel-runtime/core-js/promise"),h=t(f),d=l("babel-runtime/helpers/classCallCheck"),p=t(d),b=l("babel-runtime/helpers/createClass"),v=t(b),_=l("../error"),m=function(){function l(n,e){(0,p["default"])(this,l),this._mode=n,this._connectionProvider=e,this._referenceCount=0,this._connectionPromise=h["default"].resolve(null)}return(0,v["default"])(l,[{key:"initializeConnection",value:function(){0===this._referenceCount&&(this._connectionPromise=this._connectionProvider.acquireConnection(this._mode)),this._referenceCount++}},{key:"getConnection",value:function(l){return this._connectionPromise.then(function(n){return l.resolveConnection(n),n.initializationCompleted()})}},{key:"releaseConnection",value:function(){return 0===this._referenceCount?this._connectionPromise:(this._referenceCount--,0===this._referenceCount?this._releaseConnection():this._connectionPromise)}},{key:"close",value:function(){return 0===this._referenceCount?this._connectionPromise:(this._referenceCount=0,this._releaseConnection())}},{key:"_releaseConnection",value:function(){return this._connectionPromise=this._connectionPromise.then(function(l){return l?l.resetAndFlush()["catch"](u).then(function(){return l._release()}):h["default"].resolve()})["catch"](u),this._connectionPromise}}]),l}();e["default"]=m;var y=function(l){function n(){return(0,p["default"])(this,n),(0,a["default"])(this,(n.__proto__||(0,i["default"])(n)).apply(this,arguments))}return(0,c["default"])(n,l),(0,v["default"])(n,[{key:"initializeConnection",value:function(){}},{key:"getConnection",value:function(l){return h["default"].reject((0,_.newError)("This connection holder does not serve connections"))}},{key:"releaseConnection",value:function(){return h["default"].resolve()}},{key:"close",value:function(){return h["default"].resolve()}}]),n}(m);e.EMPTY_CONNECTION_HOLDER=new y},{"../error":327,"babel-runtime/core-js/object/get-prototype-of":27,"babel-runtime/core-js/promise":30,"babel-runtime/helpers/classCallCheck":34,"babel-runtime/helpers/createClass":35,"babel-runtime/helpers/inherits":38,"babel-runtime/helpers/possibleConstructorReturn":39}],338:[function(l,n,e){"use strict";function t(l){return l&&l.__esModule?l:{"default":l}}Object.defineProperty(e,"__esModule",{value:!0}),e.SingleConnectionProvider=e.LoadBalancer=e.DirectConnectionProvider=void 0;var u=l("babel-runtime/core-js/promise"),r=t(u),i=l("babel-runtime/core-js/object/get-prototype-of"),o=t(i),a=l("babel-runtime/helpers/possibleConstructorReturn"),s=t(a),c=l("babel-runtime/helpers/inherits"),f=t(c),h=l("babel-runtime/helpers/classCallCheck"),d=t(h),p=l("babel-runtime/helpers/createClass"),b=t(p),v=l("../error"),_=l("../driver"),m=l("../session"),y=t(m),g=l("./routing-table"),w=t(g),k=l("./rediscovery"),S=t(k),E=l("./features"),I=t(E),C=l("./host-name-resolvers"),j=l("./routing-util"),M=t(j),A=function(){function l(){(0,d["default"])(this,l)}return(0,b["default"])(l,[{key:"acquireConnection",value:function(l){throw new Error("Abstract function")}},{key:"_withAdditionalOnErrorCallback",value:function(l,n){return l["catch"](function(l){n(l)}),l}}]),l}(),x=(e.DirectConnectionProvider=function(l){function n(l,e,t){(0,d["default"])(this,n);var u=(0,s["default"])(this,(n.__proto__||(0,o["default"])(n)).call(this));return u._hostPort=l,u._connectionPool=e,u._driverOnErrorCallback=t,u}return(0,f["default"])(n,l),(0,b["default"])(n,[{key:"acquireConnection",value:function(l){var n=this._connectionPool.acquire(this._hostPort);return this._withAdditionalOnErrorCallback(n,this._driverOnErrorCallback)}}]),n}(A),e.LoadBalancer=function(l){function n(l,e,t,u,r){(0,d["default"])(this,n);var i=(0,s["default"])(this,(n.__proto__||(0,o["default"])(n)).call(this));return i._seedRouter=l,i._routingTable=new w["default"]([i._seedRouter]),i._rediscovery=new S["default"](new M["default"](e)),i._connectionPool=t,i._driverOnErrorCallback=r,i._hostNameResolver=n._createHostNameResolver(),i._loadBalancingStrategy=u,i._useSeedRouter=!1,i}return(0,f["default"])(n,l),(0,b["default"])(n,[{key:"acquireConnection",value:function(l){var n=this,e=this._freshRoutingTable(l).then(function(e){if(l===_.READ){var t=n._loadBalancingStrategy.selectReader(e.readers);return n._acquireConnectionToServer(t,"read")}if(l===_.WRITE){var u=n._loadBalancingStrategy.selectWriter(e.writers);return n._acquireConnectionToServer(u,"write")}throw(0,v.newError)("Illegal mode "+l)});return this._withAdditionalOnErrorCallback(e,this._driverOnErrorCallback)}},{key:"forget",value:function(l){this._routingTable.forget(l),this._connectionPool.purge(l)}},{key:"forgetWriter",value:function(l){this._routingTable.forgetWriter(l)}},{key:"_acquireConnectionToServer",value:function(l,n){return l?this._connectionPool.acquire(l):r["default"].reject((0,v.newError)("Failed to obtain connection towards "+n+" server. Known routing table is: "+this._routingTable,v.SESSION_EXPIRED))}},{key:"_freshRoutingTable",value:function(l){var n=this._routingTable;return n.isStaleFor(l)?this._refreshRoutingTable(n):r["default"].resolve(n)}},{key:"_refreshRoutingTable",value:function(l){var n=l.routers;return this._useSeedRouter?this._fetchRoutingTableFromSeedRouterFallbackToKnownRouters(n,l):this._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter(n,l)}},{key:"_fetchRoutingTableFromSeedRouterFallbackToKnownRouters",value:function(l,n){var e=this,t=[];return this._fetchRoutingTableUsingSeedRouter(t,this._seedRouter).then(function(t){return t?(e._useSeedRouter=!1,t):e._fetchRoutingTableUsingKnownRouters(l,n)}).then(function(l){return e._applyRoutingTableIfPossible(l),l})}},{key:"_fetchRoutingTableFromKnownRoutersFallbackToSeedRouter",value:function(l,n){var e=this;return this._fetchRoutingTableUsingKnownRouters(l,n).then(function(n){return n?n:e._fetchRoutingTableUsingSeedRouter(l,e._seedRouter)}).then(function(l){return e._applyRoutingTableIfPossible(l),l})}},{key:"_fetchRoutingTableUsingKnownRouters",value:function(l,e){return this._fetchRoutingTable(l,e).then(function(t){if(t)return t;var u=l.length-1;return n._forgetRouter(e,l,u),null})}},{key:"_fetchRoutingTableUsingSeedRouter",value:function(l,n){var e=this;return this._hostNameResolver.resolve(n).then(function(n){var t=n.filter(function(n){return l.indexOf(n)<0});return e._fetchRoutingTable(t,null)})}},{key:"_fetchRoutingTable",value:function(l,e){var t=this;return l.reduce(function(u,r,i){return u.then(function(u){if(u)return u;var o=i-1;return n._forgetRouter(e,l,o),t._createSessionForRediscovery(r).then(function(l){return t._rediscovery.lookupRoutingTableOnRouter(l,r)})})},r["default"].resolve(null))}},{key:"_createSessionForRediscovery",value:function(l){return this._connectionPool.acquire(l).then(function(l){var n=l.initializationCompleted(),e=new x(n);return new y["default"](_.READ,e)})}},{key:"_applyRoutingTableIfPossible",value:function(l){if(!l)throw(0,v.newError)("Could not perform discovery. No routing servers available. Known routing table: "+this._routingTable,v.SERVICE_UNAVAILABLE);0===l.writers.length&&(this._useSeedRouter=!0),this._updateRoutingTable(l)}},{key:"_updateRoutingTable",value:function(l){var n=this,e=this._routingTable,t=e.serversDiff(l);t.forEach(function(l){return n._connectionPool.purge(l)}),this._routingTable=l}}],[{key:"_forgetRouter",value:function(l,n,e){var t=n[e];l&&t&&l.forgetRouter(t)}},{key:"_createHostNameResolver",value:function(){return(0,I["default"])("dns_lookup")?new C.DnsHostNameResolver:new C.DummyHostNameResolver}}]),n}(A),e.SingleConnectionProvider=function(l){function n(l){(0,d["default"])(this,n);var e=(0,s["default"])(this,(n.__proto__||(0,o["default"])(n)).call(this));return e._connectionPromise=l,e}return(0,f["default"])(n,l),(0,b["default"])(n,[{key:"acquireConnection",value:function(l){var n=this._connectionPromise;return this._connectionPromise=null,n}}]),n}(A))},{"../driver":326,"../error":327,"../session":371,"./features":341,"./host-name-resolvers":342,"./rediscovery":355,"./routing-table":358,"./routing-util":359,"babel-runtime/core-js/object/get-prototype-of":27,"babel-runtime/core-js/promise":30,"babel-runtime/helpers/classCallCheck":34,"babel-runtime/helpers/createClass":35,"babel-runtime/helpers/inherits":38,"babel-runtime/helpers/possibleConstructorReturn":39}],339:[function(l,n,e){"use strict";function t(l){return l&&l.__esModule?l:{"default":l}}function u(l){var n=new h["default"](d.READ,l);n.initializeConnection();var e=new b["default"],t=n.getConnection(e);return t.then(function(l){return n.close().then(function(){return l.server})})["catch"](function(l){return n.close()["catch"](function(l){}).then(function(){return i["default"].reject(l)})})}Object.defineProperty(e,"__esModule",{value:!0});var r=l("babel-runtime/core-js/promise"),i=t(r),o=l("babel-runtime/helpers/classCallCheck"),a=t(o),s=l("babel-runtime/helpers/createClass"),c=t(s),f=l("./connection-holder"),h=t(f),d=l("../driver"),p=l("./stream-observer"),b=t(p),v=function(){function l(n,e){(0,a["default"])(this,l),this._connectionProvider=n,this._successCallback=e}return(0,c["default"])(l,[{key:"verify",value:function(){var l=this;u(this._connectionProvider).then(function(n){l._successCallback&&l._successCallback(n)})["catch"](function(l){})}}]),l}();e["default"]=v},{"../driver":326,"./connection-holder":337,"./stream-observer":361,"babel-runtime/core-js/promise":30,"babel-runtime/helpers/classCallCheck":34,"babel-runtime/helpers/createClass":35}],340:[function(l,n,e){"use strict";function t(l){return l&&l.__esModule?l:{"default":l}}function u(l,n){if(z){for(var e=2;e1&&void 0!==arguments[1]?arguments[1]:{},e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,t=n.channel||x,u=j["default"].parseDatabaseUrl(l),r=new I["default"](u,n,e);return new H(new t(r),u.hostAndPort,n.disableLosslessIntegers)}Object.defineProperty(e,"__esModule",{value:!0}),e.Connection=e.connect=void 0;var o=l("babel-runtime/core-js/promise"),a=t(o),s=l("babel-runtime/helpers/classCallCheck"),c=t(s),f=l("babel-runtime/helpers/createClass"),h=t(f),d=l("babel-runtime/core-js/json/stringify"),p=t(d),b=l("./ch-websocket"),v=t(b),_=l("./ch-node"),m=t(_),y=l("./chunking"),g=l("./packstream-util"),w=t(g),k=l("./buf"),S=l("./../error"),E=l("./ch-config"),I=t(E),C=l("./url-util"),j=t(C),M=l("./stream-observer"),A=(t(M),l("./server-version")),x=void 0;if(m["default"].available)x=m["default"].channel;else{if(!v["default"].available)throw(0,S.newError)("Fatal: No compatible transport available. Need to run on a platform with the WebSocket API.");x=v["default"].channel}var T=1,R=14,O=15,P=16,N=47,B=63,U=112,D=113,L=126,F=127,q=1616949271,z=!1,V={onNext:r,onCompleted:r,onError:r},H=function(){function l(n,e){var t=this,u=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(0,c["default"])(this,l),this.hostPort=e,this.server={address:e},this.creationTimestamp=Date.now(),this._disableLosslessIntegers=u,this._pendingObservers=[],this._currentObserver=void 0,this._ch=n,this._dechunker=new y.Dechunker,this._chunker=new y.Chunker(n),this._packer=w["default"].createLatestPacker(this._chunker),this._unpacker=w["default"].createLatestUnpacker(u),this._ackFailureMuted=!1,this._currentFailure=null,this._state=new K(this),this._isBroken=!1,this._ch.onmessage=function(l){var n=l.readInt32();1==n||2==n?t._initializeProtocol(n,l):1213486160==n?t._handleFatalError((0,S.newError)("Server responded HTTP. Make sure you are not trying to connect to the http endpoint (HTTP defaults to port 7474 whereas BOLT defaults to port 7687)")):t._handleFatalError((0,S.newError)("Unknown Bolt protocol version: "+n))},this._ch.onerror=this._handleFatalError.bind(this),this._ch._error&&this._handleFatalError(this._ch._error),this._dechunker.onmessage=function(l){t._handleMessage(t._unpacker.unpack(l))};var r=(0,k.alloc)(20);r.writeInt32(q),r.writeInt32(2),r.writeInt32(1),r.writeInt32(0),r.writeInt32(0),r.reset(),this._ch.write(r)}return(0,h["default"])(l,[{key:"_initializeProtocol",value:function(l,n){var e=this;this._packer=w["default"].createPackerForProtocolVersion(l,this._chunker),this._unpacker=w["default"].createUnpackerForProtocolVersion(l,this._disableLosslessIntegers),this._ch.onmessage=function(l){return e._dechunker.write(l)},n.hasRemaining()&&this._dechunker.write(n.readSlice(n.remaining()))}},{key:"_handleFatalError",value:function(l){for(this._isBroken=!0,this._error=l,this._currentObserver&&this._currentObserver.onError&&this._currentObserver.onError(l);this._pendingObservers.length>0;){var n=this._pendingObservers.shift();n&&n.onError&&n.onError(l)}}},{key:"_handleMessage",value:function(l){if(!this._isBroken){var n=l.fields[0];switch(l.signature){case D:u("S","RECORD",l),this._currentObserver.onNext(n);break;case U:u("S","SUCCESS",l);try{this._currentObserver.onCompleted(n)}finally{this._updateCurrentObserver()}break;case F:u("S","FAILURE",l);try{this._currentFailure=(0,S.newError)(n.message,n.code),this._currentObserver.onError(this._currentFailure)}finally{this._updateCurrentObserver(),this._ackFailureIfNeeded()}break;case L:u("S","IGNORED",l);try{this._currentFailure&&this._currentObserver.onError?this._currentObserver.onError(this._currentFailure):this._currentObserver.onError&&this._currentObserver.onError((0,S.newError)("Ignored either because of an error or RESET"))}finally{this._updateCurrentObserver()}break;default:this._handleFatalError((0,S.newError)("Unknown Bolt protocol message: "+l))}}}},{key:"initialize",value:function(l,n,e){var t=this;u("C","INIT",l,n);var r=this._state.wrap(e),i=this._queueObserver(r);i&&(this._packer.packStruct(T,[this._packable(l),this._packable(n)],function(l){return t._handleFatalError(l)}),this._chunker.messageBoundary(),this.sync())}},{key:"run",value:function(l,n,e){var t=this;u("C","RUN",l,n);var r=this._queueObserver(e);r&&(this._packer.packStruct(P,[this._packable(l),this._packable(n)],function(l){return t._handleFatalError(l)}),this._chunker.messageBoundary())}},{key:"pullAll",value:function(l){var n=this;u("C","PULL_ALL");var e=this._queueObserver(l);e&&(this._packer.packStruct(B,[],function(l){return n._handleFatalError(l)}),this._chunker.messageBoundary())}},{key:"discardAll",value:function(l){var n=this;u("C","DISCARD_ALL");var e=this._queueObserver(l);e&&(this._packer.packStruct(N,[],function(l){return n._handleFatalError(l)}),this._chunker.messageBoundary())}},{key:"resetAndFlush",value:function(){var l=this;return u("C","RESET"),this._ackFailureMuted=!0,new a["default"](function(n,e){var t={onNext:function(n){var t=l._handleProtocolError("Received RECORD as a response for RESET: "+(0,p["default"])(n));e(t)},onError:function(n){if(l._isBroken)e(n);else{var t=l._handleProtocolError("Received FAILURE as a response for RESET: "+n);e(t)}},onCompleted:function(){l._ackFailureMuted=!1,n()}},u=l._queueObserver(t);u&&(l._packer.packStruct(O,[],function(n){return l._handleFatalError(n)}),l._chunker.messageBoundary(),l.sync())})}},{key:"_ackFailureIfNeeded",value:function(){var l=this;if(!this._ackFailureMuted){u("C","ACK_FAILURE");var n={onNext:function(n){l._handleProtocolError("Received RECORD as a response for ACK_FAILURE: "+(0,p["default"])(n))},onError:function(n){l._isBroken||l._ackFailureMuted?l._currentFailure=null:l._handleProtocolError("Received FAILURE as a response for ACK_FAILURE: "+n)},onCompleted:function(){l._currentFailure=null}},e=this._queueObserver(n);e&&(this._packer.packStruct(R,[],function(n){return l._handleFatalError(n)}),this._chunker.messageBoundary(),this.sync())}}},{key:"_queueObserver",value:function(l){return this._isBroken?(l&&l.onError&&l.onError(this._error),!1):(l=l||V, l.onCompleted=l.onCompleted||r,l.onError=l.onError||r,l.onNext=l.onNext||r,void 0===this._currentObserver?this._currentObserver=l:this._pendingObservers.push(l),!0)}},{key:"initializationCompleted",value:function(){return this._state.initializationCompleted()}},{key:"_updateCurrentObserver",value:function(){this._currentObserver=this._pendingObservers.shift()}},{key:"sync",value:function(){this._chunker.flush()}},{key:"isOpen",value:function(){return!this._isBroken&&this._ch._open}},{key:"isEncrypted",value:function(){return this._ch.isEncrypted()}},{key:"close",value:function(l){this._ch.close(l)}},{key:"_packable",value:function(l){var n=this;return this._packer.packable(l,function(l){return n._handleFatalError(l)})}},{key:"_markInitialized",value:function(l){var n=l?l.server:null;if(!this.server.version){this.server.version=n;var e=A.ServerVersion.fromString(n);e.compareTo(A.VERSION_3_2_0)<0&&this._packer.disableByteArrays()}}},{key:"_handleProtocolError",value:function(l){this._ackFailureMuted=!1,this._currentFailure=null,this._updateCurrentObserver();var n=(0,S.newError)(l,S.PROTOCOL_ERROR);return this._handleFatalError(n),n}}]),l}(),K=function(){function l(n){var e=this;(0,c["default"])(this,l),this._connection=n,this._initRequested=!1,this._initError=null,this._resolveInitPromise=null,this._rejectInitPromise=null,this._initPromise=new a["default"](function(l,n){e._resolveInitPromise=l,e._rejectInitPromise=n})}return(0,h["default"])(l,[{key:"wrap",value:function(l){var n=this;return{onNext:function(n){l&&l.onNext&&l.onNext(n)},onError:function(e){n._processFailure(e),n._connection._updateCurrentObserver();try{l&&l.onError&&l.onError(e)}finally{n._connection._handleFatalError(e)}},onCompleted:function(e){n._connection._markInitialized(e),n._resolveInitPromise(n._connection),l&&l.onCompleted&&l.onCompleted(e)}}}},{key:"initializationCompleted",value:function(){if(this._initRequested=!0,this._initError){var l=this._initError;this._initError=null,this._rejectInitPromise(l)}return this._initPromise}},{key:"_processFailure",value:function(l){this._initRequested?this._rejectInitPromise(l):this._initError=l}}]),l}();e.connect=i,e.Connection=H},{"./../error":327,"./buf":332,"./ch-config":333,"./ch-node":334,"./ch-websocket":335,"./chunking":336,"./packstream-util":350,"./server-version":360,"./stream-observer":361,"./url-util":364,"babel-runtime/core-js/json/stringify":18,"babel-runtime/core-js/promise":30,"babel-runtime/helpers/classCallCheck":34,"babel-runtime/helpers/createClass":35}],341:[function(l,n,e){"use strict";function t(l){return u[l]&&u[l]()}Object.defineProperty(e,"__esModule",{value:!0});var u={trust_on_first_use:function(){try{var n=l("tls").TLSSocket.prototype.getPeerCertificate,e=n.length;return e>=1}catch(t){return!1}},trust_all_certificates:function(){try{l("tls").TLSSocket.prototype.getPeerCertificate;return!0}catch(n){return!1}},dns_lookup:function(){try{var n=l("dns").lookup;return!(!n||"function"!=typeof n)}catch(e){return!1}}};e["default"]=t},{dns:74,tls:74}],342:[function(l,n,e){"use strict";function t(l){return l&&l.__esModule?l:{"default":l}}function u(l){return o["default"].resolve([l])}function r(l,n){var e=l.address,t=l.family;return n?6===t?y["default"].formatIPv6Address(e,n):y["default"].formatIPv4Address(e,n):e}Object.defineProperty(e,"__esModule",{value:!0}),e.DnsHostNameResolver=e.DummyHostNameResolver=void 0;var i=l("babel-runtime/core-js/promise"),o=t(i),a=l("babel-runtime/core-js/object/get-prototype-of"),s=t(a),c=l("babel-runtime/helpers/possibleConstructorReturn"),f=t(c),h=l("babel-runtime/helpers/inherits"),d=t(h),p=l("babel-runtime/helpers/classCallCheck"),b=t(p),v=l("babel-runtime/helpers/createClass"),_=t(v),m=l("./url-util"),y=t(m),g=function(){function l(){(0,b["default"])(this,l)}return(0,_["default"])(l,[{key:"resolve",value:function(){throw new Error("Abstract function")}}]),l}();e.DummyHostNameResolver=function(l){function n(){return(0,b["default"])(this,n),(0,f["default"])(this,(n.__proto__||(0,s["default"])(n)).apply(this,arguments))}return(0,d["default"])(n,l),(0,_["default"])(n,[{key:"resolve",value:function(l){return u(l)}}]),n}(g),e.DnsHostNameResolver=function(n){function e(){(0,b["default"])(this,e);var n=(0,f["default"])(this,(e.__proto__||(0,s["default"])(e)).call(this));return n._dns=l("dns"),n}return(0,d["default"])(e,n),(0,_["default"])(e,[{key:"resolve",value:function(l){var n=this,e=y["default"].parseDatabaseUrl(l);return new o["default"](function(t){n._dns.lookup(e.host,{all:!0},function(n,i){if(n)t(u(l));else{var o=i.map(function(l){return r(l,e.port)});t(o)}})})}}]),e}(g)},{"./url-util":364,"babel-runtime/core-js/object/get-prototype-of":27,"babel-runtime/core-js/promise":30,"babel-runtime/helpers/classCallCheck":34,"babel-runtime/helpers/createClass":35,"babel-runtime/helpers/inherits":38,"babel-runtime/helpers/possibleConstructorReturn":39,dns:74}],343:[function(l,n,e){"use strict";function t(l){return l&&l.__esModule?l:{"default":l}}Object.defineProperty(e,"__esModule",{value:!0});var u=l("babel-runtime/core-js/object/get-prototype-of"),r=t(u),i=l("babel-runtime/helpers/classCallCheck"),o=t(i),a=l("babel-runtime/helpers/createClass"),s=t(a),c=l("babel-runtime/helpers/possibleConstructorReturn"),f=t(c),h=l("babel-runtime/helpers/inherits"),d=t(h),p=l("../../driver"),b=t(p),v=l("./http-session"),_=t(v),m=l("./http-session-tracker"),y=t(m),g=function(l){function n(l,e,t,u){(0,o["default"])(this,n);var i=(0,f["default"])(this,(n.__proto__||(0,r["default"])(n)).call(this,l,e,t,u));return i._sessionTracker=new y["default"],i}return(0,d["default"])(n,l),(0,s["default"])(n,[{key:"session",value:function(){return new _["default"](this._hostPort,this._token,this._config,this._sessionTracker)}},{key:"close",value:function(){return this._sessionTracker.close()}}]),n}(b["default"]);e["default"]=g},{"../../driver":326,"./http-session":347,"./http-session-tracker":346,"babel-runtime/core-js/object/get-prototype-of":27,"babel-runtime/helpers/classCallCheck":34,"babel-runtime/helpers/createClass":35,"babel-runtime/helpers/inherits":38,"babel-runtime/helpers/possibleConstructorReturn":39}],344:[function(l,n,e){"use strict";function t(l){return l&&l.__esModule?l:{"default":l}}function u(l,n,e,t){try{var u={method:l,headers:r(t),body:e};return new _["default"](function(l,e){fetch(n,u).then(function(l){return l.json()}).then(function(n){return l(n)})["catch"](function(l){return e(new C.Neo4jError(l.message,C.SERVICE_UNAVAILABLE))})})}catch(i){return _["default"].reject(i)}}function r(l){var n=new Headers;return n.append("Accept","application/json; charset=UTF-8"),n.append("Content-Type","application/json"),n.append("Authorization","Basic "+btoa(l.principal+":"+l.credentials)),n}function i(l,n,e,t){try{return o(l,n,e)}catch(u){return t.onError(u),null}}function o(l,n,e){var t=e.encodeStatementParameters(n);return(0,b["default"])({statements:[{statement:l,parameters:t,resultDataContents:["row","graph"],includeStats:!0}]})}function a(l,n,e){if(l)try{s(l,n,e)}catch(t){e.onError(t)}}function s(l,n,e){var t=n.extractError(l);if(t)e.onError(t);else{var u=n.extractRecordMetadata(l);e.onCompleted(u);var r=n.extractRawRecords(l);r.forEach(function(l){return e.onNext(l)});var i=n.extractStatementMetadata(l);e.onCompleted(i)}}function c(l){return d(l,"/db/data/transaction")}function f(l,n){return h(l,n)+"/commit"}function h(l,n){return c(l)+"/"+n}function d(l,n){return l.scheme+"://"+l.host+":"+l.port+n}Object.defineProperty(e,"__esModule",{value:!0});var p=l("babel-runtime/core-js/json/stringify"),b=t(p),v=l("babel-runtime/core-js/promise"),_=t(v),m=l("babel-runtime/helpers/classCallCheck"),y=t(m),g=l("babel-runtime/helpers/createClass"),w=t(g),k=l("../stream-observer"),S=t(k),E=l("./http-response-converter"),I=t(E),C=l("../../error"),j=function(){function l(n,e){(0,y["default"])(this,l),this._url=n,this._authToken=e,this._converter=new I["default"]}return(0,w["default"])(l,[{key:"beginTransaction",value:function(){var l=this,n=c(this._url);return u("POST",n,null,this._authToken).then(function(n){var e=l._converter.extractError(n);if(e)throw e;return l._converter.extractTransactionId(n)})}},{key:"commitTransaction",value:function(l){var n=this,e=f(this._url,l);return u("POST",e,null,this._authToken).then(function(l){var e=n._converter.extractError(l);if(e)throw e})}},{key:"rollbackTransaction",value:function(l){var n=this,e=h(this._url,l);return u("DELETE",e,null,this._authToken).then(function(l){var e=n._converter.extractError(l);if(e)throw e})}},{key:"runQuery",value:function(l,n,e){var t=this,r=new S["default"],o=h(this._url,l),s=i(n,e,this._converter,r);return s?u("POST",o,s,this._authToken).then(function(l){a(l,t._converter,r)})["catch"](function(l){r.onError(l)}).then(function(){return r}):_["default"].resolve(r)}}]),l}();e["default"]=j},{"../../error":327,"../stream-observer":361,"./http-response-converter":345,"babel-runtime/core-js/json/stringify":18,"babel-runtime/core-js/promise":30,"babel-runtime/helpers/classCallCheck":34,"babel-runtime/helpers/createClass":35}],345:[function(l,n,e){"use strict";function t(l){return l&&l.__esModule?l:{"default":l}}function u(l){return l&&"object"===("undefined"==typeof l?"undefined":(0,j["default"])(l))?(0,A["default"])(l).reduce(function(n,e){return n[e]=r(l[e]),n},{}):l}function r(l){if(l instanceof U.Node)throw new D.Neo4jError("It is not allowed to pass nodes in query parameters",D.PROTOCOL_ERROR);if(l instanceof U.Relationship)throw new D.Neo4jError("It is not allowed to pass relationships in query parameters",D.PROTOCOL_ERROR);if(l instanceof U.Path)throw new D.Neo4jError("It is not allowed to pass paths in query parameters",D.PROTOCOL_ERROR);if((0,L.isPoint)(l))throw i("points");if((0,F.isDate)(l))throw i("dates");if((0,F.isDateTime)(l))throw i("date-time");if((0,F.isDuration)(l))throw i("durations");if((0,F.isLocalDateTime)(l))throw i("local date-time");if((0,F.isLocalTime)(l))throw i("local time");if((0,F.isTime)(l))throw i("time");return(0,B.isInt)(l)?l.toNumber():Array.isArray(l)?l.map(function(l){return r(l)}):"object"===("undefined"==typeof l?"undefined":(0,j["default"])(l))?u(l):l}function i(l){return new D.Neo4jError("It is not allowed to pass "+l+" in query parameters when using HTTP endpoint. "+("Please consider using Cypher functions to create "+l+" so that query parameters are plain objects."),D.PROTOCOL_ERROR)}function o(l){var n=l.results;if(n){var e=n[0];if(e)return e}return null}function a(l){var n=l.row,e=s(l),t=c(l);return n?n.map(function(n,u){return f(u,l,e,t)}):[]}function s(l){var n=l.graph;if(n){var e=n.nodes;if(e)return e.reduce(function(l,n){var e=m(n.id),t=n.labels,u=_(n.properties);return l[n.id]=new U.Node(e,t,u),l},{})}return{}}function c(l){var n=l.graph;if(n){var e=n.relationships;if(e)return e.reduce(function(l,n){var e=m(n.id),t=m(n.startNode),u=m(n.endNode),r=n.type,i=_(n.properties);return l[n.id]=new U.Relationship(e,t,u,r,i),l},{})}return{}}function f(l,n,e,t){var u=n.row?n.row[l]:null,r=n.meta?n.meta[l]:null;return r?h(u,r,e,t):_(u)}function h(l,n,e,t){return y(n)?e[n.id]:g(n)?t[n.id]:S(n)?d(n,e,t):w(n)?b(l):l}function d(l,n,e){for(var t=null,u=null,r=[],i=0;i1&&void 0!==arguments[1]?arguments[1]:{},t=(0,E.validateStatementAndParameters)(l,e),i=t.query,o=t.params;return this._requestRunner.beginTransaction().then(function(l){n._ongoingTransactionIds.push(l);var e=n._requestRunner.runQuery(l,i,o);return e.then(function(e){return e.hasFailed()?u(l,e,n._requestRunner):r(l,e,n._requestRunner)}).then(function(e){return n._ongoingTransactionIds=n._ongoingTransactionIds.filter(function(n){return n!==l}),new x["default"](e,i,o,n._serverInfoSupplier,M.EMPTY_CONNECTION_HOLDER)})})}},{key:"beginTransaction",value:function(){a()}},{key:"readTransaction",value:function(){a()}},{key:"writeTransaction",value:function(){a()}},{key:"lastBookmark",value:function(){throw new I.Neo4jError("Experimental HTTP driver does not support bookmarks and routing")}},{key:"close",value:function(){var l=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return null},e=this._ongoingTransactionIds.map(function(n){return i(n,l._requestRunner)});c["default"].all(e).then(function(){l._sessionTracker.sessionClosed(l),n()})}}]),n}(S["default"]);e["default"]=T},{"../../driver":326,"../../error":327,"../../result":369,"../../session":371,"../connection-holder":337,"../util":366,"./http-request-runner":344,"babel-runtime/core-js/object/get-prototype-of":27,"babel-runtime/core-js/promise":30,"babel-runtime/helpers/classCallCheck":34,"babel-runtime/helpers/createClass":35,"babel-runtime/helpers/inherits":38,"babel-runtime/helpers/possibleConstructorReturn":39}],348:[function(l,n,e){"use strict";function t(l){return l&&l.__esModule?l:{"default":l}}Object.defineProperty(e,"__esModule",{value:!0}),e.LEAST_CONNECTED_STRATEGY_NAME=void 0;var u=l("babel-runtime/core-js/number/max-safe-integer"),r=t(u),i=l("babel-runtime/core-js/object/get-prototype-of"),o=t(i),a=l("babel-runtime/helpers/classCallCheck"),s=t(a),c=l("babel-runtime/helpers/createClass"),f=t(c),h=l("babel-runtime/helpers/possibleConstructorReturn"),d=t(h),p=l("babel-runtime/helpers/inherits"),b=t(p),v=l("./round-robin-array-index"),_=t(v),m=l("./load-balancing-strategy"),y=t(m),g=(e.LEAST_CONNECTED_STRATEGY_NAME="least_connected",function(l){function n(l){(0,s["default"])(this,n);var e=(0,d["default"])(this,(n.__proto__||(0,o["default"])(n)).call(this));return e._readersIndex=new _["default"],e._writersIndex=new _["default"],e._connectionPool=l,e}return(0,b["default"])(n,l),(0,f["default"])(n,[{key:"selectReader",value:function(l){return this._select(l,this._readersIndex)}},{key:"selectWriter",value:function(l){return this._select(l,this._writersIndex)}},{key:"_select",value:function(l,n){var e=l.length;if(0===e)return null;var t=n.next(e),u=t,i=null,o=r["default"];do{var a=l[u],s=this._connectionPool.activeResourceCount(a);s0&&(l+=", "),l+=this.fields[n];return"Structure("+this.signature+", ["+this.fields+"])"}}]),l}(),ul=function(){function l(n){(0,p["default"])(this,l),this._ch=n,this._byteArraysSupported=!0}return(0,v["default"])(l,[{key:"packable",value:function(l,n){var e=this;if(null===l)return function(){return e._ch.writeUInt8(j)};if(l===!0)return function(){return e._ch.writeUInt8(x)};if(l===!1)return function(){return e._ch.writeUInt8(A)};if("number"==typeof l)return function(){return e.packFloat(l)};if("string"==typeof l)return function(){return e.packString(l,n)};if((0,y.isInt)(l))return function(){return e.packInteger(l)};if(l instanceof Int8Array)return function(){return e.packBytes(l,n)};if(l instanceof Array)return function(){e.packListHeader(l.length,n);for(var t=0;t>0),this._ch.writeUInt8(t%256),this._ch.writeBytes(e)):t<4294967296?(this._ch.writeUInt8(U),this._ch.writeUInt8((t/16777216>>0)%256),this._ch.writeUInt8((t/65536>>0)%256),this._ch.writeUInt8((t/256>>0)%256),this._ch.writeUInt8(t%256),this._ch.writeBytes(e)):n((0,w.newError)("UTF-8 strings of size "+t+" are not supported"))}},{key:"packListHeader",value:function(l,n){l<16?this._ch.writeUInt8(E|l):l<256?(this._ch.writeUInt8(D),this._ch.writeUInt8(l)):l<65536?(this._ch.writeUInt8(L),this._ch.writeUInt8((l/256>>0)%256),this._ch.writeUInt8(l%256)):l<4294967296?(this._ch.writeUInt8(F),this._ch.writeUInt8((l/16777216>>0)%256),this._ch.writeUInt8((l/65536>>0)%256),this._ch.writeUInt8((l/256>>0)%256),this._ch.writeUInt8(l%256)):n((0,w.newError)("Lists of size "+l+" are not supported"))}},{key:"packBytes",value:function(l,n){if(this._byteArraysSupported){this.packBytesHeader(l.length,n);for(var e=0;e>0)%256),this._ch.writeUInt8(l%256)):l<4294967296?(this._ch.writeUInt8(V),this._ch.writeUInt8((l/16777216>>0)%256),this._ch.writeUInt8((l/65536>>0)%256),this._ch.writeUInt8((l/256>>0)%256),this._ch.writeUInt8(l%256)):n((0,w.newError)("Byte arrays of size "+l+" are not supported"))}},{key:"packMapHeader",value:function(l,n){l<16?this._ch.writeUInt8(I|l):l<256?(this._ch.writeUInt8(H),this._ch.writeUInt8(l)):l<65536?(this._ch.writeUInt8(K),this._ch.writeUInt8(l/256>>0),this._ch.writeUInt8(l%256)):l<4294967296?(this._ch.writeUInt8(W),this._ch.writeUInt8((l/16777216>>0)%256),this._ch.writeUInt8((l/65536>>0)%256),this._ch.writeUInt8((l/256>>0)%256),this._ch.writeUInt8(l%256)):n((0,w.newError)("Maps of size "+l+" are not supported"))}},{key:"packStructHeader",value:function(l,n,e){l<16?(this._ch.writeUInt8(C|l),this._ch.writeUInt8(n)):l<256?(this._ch.writeUInt8(Y),this._ch.writeUInt8(l),this._ch.writeUInt8(n)):l<65536?(this._ch.writeUInt8(G),this._ch.writeUInt8(l/256>>0),this._ch.writeUInt8(l%256)):e((0,w.newError)("Structures of size "+l+" are not supported"))}},{key:"disableByteArrays",value:function(){this._byteArraysSupported=!1}},{key:"_nonPackableValue",value:function(l,n){return n&&n((0,w.newError)(l,w.PROTOCOL_ERROR)),function(){}}}]),l}(),rl=function(){function l(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];(0,p["default"])(this,l),this._disableLosslessIntegers=n}return(0,v["default"])(l,[{key:"unpack",value:function(l){var n=l.readUInt8(),e=240&n,t=15&n;if(n==j)return null;var u=this._unpackBoolean(n);if(null!==u)return u;var r=this._unpackNumberOrInteger(n,l);if(null!==r)return this._disableLosslessIntegers&&(0,y.isInt)(r)?r.toNumberOrInfinity():r;var i=this._unpackString(n,e,t,l);if(null!==i)return i;var o=this._unpackList(n,e,t,l);if(null!==o)return o;var a=this._unpackByteArray(n,l);if(null!==a)return a;var s=this._unpackMap(n,e,t,l);if(null!==s)return s;var c=this._unpackStruct(n,e,t,l);if(null!==c)return c;throw(0,w.newError)("Unknown packed value with marker "+n.toString(16))}},{key:"unpackInteger",value:function(l){var n=l.readUInt8(),e=this._unpackInteger(n,l);if(null==e)throw(0,w.newError)("Unable to unpack integer value with marker "+n.toString(16));return e}},{key:"_unpackBoolean",value:function(l){return l==x||l!=A&&null}},{key:"_unpackNumberOrInteger",value:function(l,n){return l==M?n.readFloat64():this._unpackInteger(l,n)}},{key:"_unpackInteger",value:function(l,n){if(l>=0&&l<128)return(0,y["int"])(l);if(l>=240&&l<256)return(0,y["int"])(l-256);if(l==T)return(0,y["int"])(n.readInt8());if(l==R)return(0,y["int"])(n.readInt16());if(l==O){var e=n.readInt32();return(0,y["int"])(e)}if(l==P){var t=n.readInt32(),u=n.readInt32();return new g["default"](u,t)}return null}},{key:"_unpackString",value:function(l,n,e,t){return n==S?m["default"].decode(t,e):l==N?m["default"].decode(t,t.readUInt8()):l==B?m["default"].decode(t,t.readUInt16()):l==U?m["default"].decode(t,t.readUInt32()):null}},{key:"_unpackList",value:function(l,n,e,t){return n==E?this._unpackListWithSize(e,t):l==D?this._unpackListWithSize(t.readUInt8(),t):l==L?this._unpackListWithSize(t.readUInt16(),t):l==F?this._unpackListWithSize(t.readUInt32(),t):null}},{key:"_unpackListWithSize",value:function(l,n){for(var e=[],t=0;t0?(c=t[s-1],c instanceof k.UnboundRelationship&&(t[s-1]=c=c.bind(i.identity,a.identity))):(c=t[-s-1],c instanceof k.UnboundRelationship&&(t[-s-1]=c=c.bind(a.identity,i.identity))),r.push(new k.PathSegment(i,c,a)),i=a}return new k.Path(e[0],e[e.length-1],r)}},{key:"_unpackUnknownStruct",value:function(l,n,e){for(var t=new tl(l,[]),u=0;u0&&void 0!==arguments[0]&&arguments[0];return(0,O["default"])(this,n),(0,U["default"])(this,(n.__proto__||(0,T["default"])(n)).call(this,l))}return(0,q["default"])(n,l),(0,N["default"])(n,[{key:"_unpackUnknownStruct",value:function(l,e,t){return l==G?a(this,e,t):l==X?s(this,e,t):l==$?f(this,e,t):l==ll?d(this,e,t,this._disableLosslessIntegers):l==el?b(this,e,t,this._disableLosslessIntegers):l==ul?_(this,e,t,this._disableLosslessIntegers):l==il?y(this,e,t,this._disableLosslessIntegers):l==al?k(this,e,t,this._disableLosslessIntegers):l==cl?E(this,e,t,this._disableLosslessIntegers):(0,L["default"])(n.prototype.__proto__||(0,T["default"])(n.prototype),"_unpackUnknownStruct",this).call(this,l,e,t,this._disableLosslessIntegers)}}]),n}(V.Unpacker)},{"../integer":330,"../internal/temporal-util":362,"../spatial-types":372,"../temporal-types":373,"./packstream-v1":351,"babel-runtime/core-js/object/create":23,"babel-runtime/core-js/object/freeze":25,"babel-runtime/core-js/object/get-prototype-of":27,"babel-runtime/helpers/classCallCheck":34,"babel-runtime/helpers/createClass":35,"babel-runtime/helpers/get":37,"babel-runtime/helpers/inherits":38,"babel-runtime/helpers/possibleConstructorReturn":39}],353:[function(l,n,e){"use strict";function t(l){return l&&l.__esModule?l:{"default":l}}function u(l,n){return 0===l||l?l:n}function r(l){return 0===l||l}Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_ACQUISITION_TIMEOUT=e.DEFAULT_MAX_SIZE=void 0;var i=l("babel-runtime/helpers/classCallCheck"),o=t(i),a=l("babel-runtime/helpers/createClass"),s=t(a),c=100,f=6e4,h=function(){function l(n,e){(0,o["default"])(this,l),this.maxSize=u(n,c),this.acquisitionTimeout=u(e,f)}return(0,s["default"])(l,null,[{key:"defaultConfig",value:function(){return new l(c,f)}},{key:"fromDriverConfig",value:function(n){var e=r(n.connectionPoolSize),t=r(n.maxConnectionPoolSize),u=void 0;t?u=n.maxConnectionPoolSize:e?(console.warn('WARNING: neo4j-driver setting "connectionPoolSize" is deprecated, please use "maxConnectionPoolSize" instead'),u=n.connectionPoolSize):u=c;var i=r(n.connectionAcquisitionTimeout),o=i?n.connectionAcquisitionTimeout:f;return new l(u,o)}}]),l}();e["default"]=h,e.DEFAULT_MAX_SIZE=c,e.DEFAULT_ACQUISITION_TIMEOUT=f},{"babel-runtime/helpers/classCallCheck":34,"babel-runtime/helpers/createClass":35}],354:[function(l,n,e){"use strict";function t(l){return l&&l.__esModule?l:{"default":l}}function u(l,n){var e=n[l]||0;n[l]=e+1}function r(l,n){var e=n[l]||0,t=e-1;t>0?n[l]=t:delete n[l]}Object.defineProperty(e,"__esModule",{value:!0});var i=l("babel-runtime/core-js/object/keys"),o=t(i),a=l("babel-runtime/core-js/promise"),s=t(a),c=l("babel-runtime/helpers/classCallCheck"),f=t(c),h=l("babel-runtime/helpers/createClass"),d=t(h),p=l("./pool-config"),b=t(p),v=l("../error"),_=function(){function l(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){return!0},u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:b["default"].defaultConfig();(0,f["default"])(this,l),this._create=n,this._destroy=e,this._validate=t,this._maxSize=u.maxSize,this._acquisitionTimeout=u.acquisitionTimeout,this._pools={},this._acquireRequests={},this._activeResourceCounts={},this._release=this._release.bind(this)}return(0,d["default"])(l,[{key:"acquire",value:function(l){var n=this,e=this._acquire(l);if(e)return u(l,this._activeResourceCounts),s["default"].resolve(e);var t=this._acquireRequests,r=t[l];return r||(t[l]=[]),new s["default"](function(e,u){var r=void 0,i=setTimeout(function(){t[l]=t[l].filter(function(l){return l!==r}),u((0,v.newError)("Connection acquisition timed out in "+n._acquisitionTimeout+" ms."))},n._acquisitionTimeout);r=new m(e,i),t[l].push(r)})}},{key:"purge",value:function(l){for(var n=this._pools[l]||[];n.length;){var e=n.pop();this._destroy(e)}delete this._pools[l]}},{key:"purgeAll",value:function(){var l=this;(0,o["default"])(this._pools).forEach(function(n){return l.purge(n)})}},{key:"has",value:function(l){return l in this._pools}},{key:"activeResourceCount",value:function(l){return this._activeResourceCounts[l]||0}},{key:"_acquire",value:function(l){var n=this._pools[l];for(n||(n=[],this._pools[l]=n);n.length;){var e=n.pop();if(this._validate(e))return e;this._destroy(e)}return this._maxSize&&this.activeResourceCount(l)>=this._maxSize?null:this._create(l,this._release)}},{key:"_release",value:function(l,n){var e=this._pools[l];e&&this._validate(n)?e.push(n):this._destroy(n),r(l,this._activeResourceCounts);var t=this._acquireRequests[l];if(t){var i=t[0];if(i){var o=this._acquire(l);o&&(u(l,this._activeResourceCounts),t.shift(),i.resolve(o))}else delete this._acquireRequests[l]}}}]),l}(),m=function(){function l(n,e){(0,f["default"])(this,l),this._resolve=n,this._timeoutId=e}return(0,d["default"])(l,[{key:"resolve",value:function(l){clearTimeout(this._timeoutId),this._resolve(l)}}]),l}();e["default"]=_},{"../error":327,"./pool-config":353,"babel-runtime/core-js/object/keys":28,"babel-runtime/core-js/promise":30,"babel-runtime/helpers/classCallCheck":34,"babel-runtime/helpers/createClass":35}],355:[function(l,n,e){"use strict";function t(l){return l&&l.__esModule?l:{"default":l}}Object.defineProperty(e,"__esModule",{value:!0});var u=l("babel-runtime/core-js/json/stringify"),r=t(u),i=l("babel-runtime/helpers/classCallCheck"),o=t(i),a=l("babel-runtime/helpers/createClass"),s=t(a),c=l("./routing-table"),f=t(c),h=l("../error"),d=function(){function l(n){(0,o["default"])(this,l),this._routingUtil=n}return(0,s["default"])(l,[{key:"lookupRoutingTableOnRouter",value:function(n,e){var t=this;return this._routingUtil.callRoutingProcedure(n,e).then(function(n){if(null===n)return null;if(1!==n.length)throw(0,h.newError)('Illegal response from router "'+e+'". Received '+n.length+" records but expected only one.\n"+(0,r["default"])(n),h.PROTOCOL_ERROR);var u=n[0],i=t._routingUtil.parseTtl(u,e),o=t._routingUtil.parseServers(u,e),a=o.routers,s=o.readers,c=o.writers;return l._assertNonEmpty(a,"routers",e),l._assertNonEmpty(s,"readers",e),new f["default"](a,s,c,i)})}}],[{key:"_assertNonEmpty",value:function(l,n,e){if(0===l.length)throw(0,h.newError)("Received no "+n+" from router "+e,h.PROTOCOL_ERROR)}}]),l}();e["default"]=d},{"../error":327,"./routing-table":358,"babel-runtime/core-js/json/stringify":18,"babel-runtime/helpers/classCallCheck":34,"babel-runtime/helpers/createClass":35}],356:[function(l,n,e){"use strict";function t(l){return l&&l.__esModule?l:{"default":l}}Object.defineProperty(e,"__esModule",{value:!0});var u=l("babel-runtime/core-js/number/max-safe-integer"),r=t(u),i=l("babel-runtime/helpers/classCallCheck"),o=t(i),a=l("babel-runtime/helpers/createClass"),s=t(a),c=function(){function l(n){(0,o["default"])(this,l),this._offset=n||0}return(0,s["default"])(l,[{key:"next",value:function(l){if(0===l)return-1;var n=this._offset;return this._offset+=1,this._offset===r["default"]&&(this._offset=0),n%l}}]),l}();e["default"]=c},{"babel-runtime/core-js/number/max-safe-integer":21,"babel-runtime/helpers/classCallCheck":34,"babel-runtime/helpers/createClass":35}],357:[function(l,n,e){"use strict";function t(l){return l&&l.__esModule?l:{"default":l}}Object.defineProperty(e,"__esModule",{value:!0}),e.ROUND_ROBIN_STRATEGY_NAME=void 0;var u=l("babel-runtime/core-js/object/get-prototype-of"),r=t(u),i=l("babel-runtime/helpers/classCallCheck"),o=t(i),a=l("babel-runtime/helpers/createClass"),s=t(a),c=l("babel-runtime/helpers/possibleConstructorReturn"),f=t(c),h=l("babel-runtime/helpers/inherits"),d=t(h),p=l("./round-robin-array-index"),b=t(p),v=l("./load-balancing-strategy"),_=t(v),m=(e.ROUND_ROBIN_STRATEGY_NAME="round_robin",function(l){function n(){(0,o["default"])(this,n);var l=(0,f["default"])(this,(n.__proto__||(0,r["default"])(n)).call(this));return l._readersIndex=new b["default"],l._writersIndex=new b["default"],l}return(0,d["default"])(n,l),(0,s["default"])(n,[{key:"selectReader",value:function(l){return this._select(l,this._readersIndex)}},{key:"selectWriter",value:function(l){return this._select(l,this._writersIndex)}},{key:"_select",value:function(l,n){var e=l.length;if(0===e)return null;var t=n.next(e);return l[t]}}]),n}(_["default"]));e["default"]=m},{"./load-balancing-strategy":349,"./round-robin-array-index":356,"babel-runtime/core-js/object/get-prototype-of":27,"babel-runtime/helpers/classCallCheck":34,"babel-runtime/helpers/createClass":35,"babel-runtime/helpers/inherits":38,"babel-runtime/helpers/possibleConstructorReturn":39}],358:[function(l,n,e){"use strict";function t(l){return l&&l.__esModule?l:{"default":l}}function u(l,n){return l.filter(function(l){return l!==n})}Object.defineProperty(e,"__esModule",{value:!0});var r=l("babel-runtime/helpers/toConsumableArray"),i=t(r),o=l("babel-runtime/core-js/array/from"),a=t(o),s=l("babel-runtime/core-js/set"),c=t(s),f=l("babel-runtime/helpers/classCallCheck"),h=t(f),d=l("babel-runtime/helpers/createClass"),p=t(d),b=l("../integer"),v=l("../driver"),_=1,m=function(){function l(n,e,t,u){(0,h["default"])(this,l),this.routers=n||[],this.readers=e||[],this.writers=t||[],this.expirationTime=u||(0,b["int"])(0)}return(0,p["default"])(l,[{key:"forget",value:function(l){this.readers=u(this.readers,l),this.writers=u(this.writers,l)}},{key:"forgetRouter",value:function(l){this.routers=u(this.routers,l)}},{key:"forgetWriter",value:function(l){this.writers=u(this.writers,l)}},{key:"serversDiff",value:function(l){var n=new c["default"](this._allServers()),e=l._allServers();return e.forEach(function(l){return n["delete"](l)}),(0,a["default"])(n)}},{key:"isStaleFor",value:function(l){return this.expirationTime.lessThan(Date.now())||this.routers.length<_||l===v.READ&&0===this.readers.length||l===v.WRITE&&0===this.writers.length}},{key:"_allServers",value:function(){return[].concat((0,i["default"])(this.routers),(0,i["default"])(this.readers),(0,i["default"])(this.writers))}},{key:"toString",value:function(){return"RoutingTable["+("expirationTime="+this.expirationTime+", ")+("routers=["+this.routers+"], ")+("readers=["+this.readers+"], ")+("writers=["+this.writers+"]]")}}]),l}();e["default"]=m},{"../driver":326,"../integer":330,"babel-runtime/core-js/array/from":15,"babel-runtime/core-js/set":31,"babel-runtime/helpers/classCallCheck":34,"babel-runtime/helpers/createClass":35,"babel-runtime/helpers/toConsumableArray":41}],359:[function(l,n,e){"use strict";function t(l){return l&&l.__esModule?l:{"default":l}}function u(l){if(!Array.isArray(l))throw new TypeError("Array expected but got: "+l);return(0,i["default"])(l)}Object.defineProperty(e,"__esModule",{value:!0});var r=l("babel-runtime/core-js/array/from"),i=t(r),o=l("babel-runtime/helpers/defineProperty"),a=t(o),s=l("babel-runtime/core-js/json/stringify"),c=t(s),f=l("babel-runtime/helpers/classCallCheck"),h=t(f),d=l("babel-runtime/helpers/createClass"),p=t(d),b=l("../error"),v=l("../integer"),_=t(v),m=l("./server-version"),y="CALL dbms.cluster.routing.getServers",g="context",w="CALL dbms.cluster.routing.getRoutingTable({"+g+"})",k="Neo.ClientError.Procedure.ProcedureNotFound",S="Neo.ClientError.Security.Unauthorized",E=function(){function l(n){(0,h["default"])(this,l),this._routingContext=n}return(0,p["default"])(l,[{key:"callRoutingProcedure",value:function(l,n){return this._callAvailableRoutingProcedure(l).then(function(n){return l.close(),n.records})["catch"](function(l){if(l.code===k)throw(0,b.newError)("Server at "+n+" can't perform routing. Make sure you are connecting to a causal cluster",b.SERVICE_UNAVAILABLE);if(l.code===S)throw l;return null})}},{key:"parseTtl",value:function(l,n){try{var e=(0,v["int"])(Date.now()),t=l.get("ttl").multiply(1e3).add(e);return t.lessThan(e)?_["default"].MAX_VALUE:t}catch(u){throw(0,b.newError)("Unable to parse TTL entry from router "+n+" from record:\n"+(0,c["default"])(l),b.PROTOCOL_ERROR)}}},{key:"parseServers",value:function(l,n){try{var e=l.get("servers"),t=[],r=[],i=[];return e.forEach(function(l){var n=l.role,e=l.addresses;if("ROUTE"===n)t=u(e);else if("WRITE"===n)i=u(e);else{if("READ"!==n)throw(0,b.newError)('Unknown server role "'+n+'"',b.PROTOCOL_ERROR);r=u(e)}}),{routers:t,readers:r,writers:i}}catch(o){throw(0,b.newError)("Unable to parse servers entry from router "+n+" from record:\n"+(0,c["default"])(l),b.PROTOCOL_ERROR)}}},{key:"_callAvailableRoutingProcedure",value:function(l){var n=this;return l._run(null,null,function(l,e){var t=l.server.version,u=m.ServerVersion.fromString(t);if(u.compareTo(m.VERSION_3_2_0)>=0){var r=(0,a["default"])({},g,n._routingContext);l.run(w,r,e)}else l.run(y,{},e)})}}]),l}();e["default"]=E},{"../error":327,"../integer":330,"./server-version":360,"babel-runtime/core-js/array/from":15,"babel-runtime/core-js/json/stringify":18,"babel-runtime/helpers/classCallCheck":34,"babel-runtime/helpers/createClass":35,"babel-runtime/helpers/defineProperty":36}],360:[function(l,n,e){"use strict";function t(l){return l&&l.__esModule?l:{"default":l}}function u(l,n){var e=parseInt(l,10);if(!e&&0!==e)throw new Error("Unparsable number "+n+": '"+l+"'");return e}function r(l,n){return l0&&void 0!==arguments[0]?arguments[0]:function(l){return l};(0,o["default"])(this,l),this._fieldKeys=null,this._fieldLookup=null,this._queuedRecords=[],this._tail=null,this._error=null,this._hasFailed=!1,this._errorTransformer=n,this._observer=null,this._conn=null,this._meta={}}return(0,s["default"])(l,[{key:"onNext",value:function(l){var n=new f["default"](this._fieldKeys,l,this._fieldLookup);this._observer?this._observer.onNext(n):this._queuedRecords.push(n)}},{key:"onCompleted",value:function(l){if(null===this._fieldKeys){if(this._fieldKeys=[],this._fieldLookup={},l.fields&&l.fields.length>0){this._fieldKeys=l.fields;for(var n=0;n0)for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:void 0;l=(0,U["int"])(l);var e=l.isNegative();e&&(l=l.negate());var t=l.toString();if(n)for(;t.length=this._minNumber&&l<=this._maxNumber}},{key:"toString",value:function(){return"["+this._minNumber+", "+this._maxNumber+"]"}}]),l}(),z=new q((-999999999),999999999),V=new q(1,12),H=new q(1,31),K=new q(0,23),W=new q(0,59),Y=new q(0,59),G=new q(0,999999999),Z=60,X=60,J=X*Z,$=1e9,Q=1e6,ll=$*X,nl=ll*Z,el=719528,tl=146097,ul=86400},{"../error":327,"../integer":330,"../temporal-types":373,"./util":366,"babel-runtime/helpers/classCallCheck":34,"babel-runtime/helpers/createClass":35}],363:[function(l,n,e){"use strict";function t(l){return l&&l.__esModule?l:{"default":l}}function u(l,n){return l||0===l?l:n}Object.defineProperty(e,"__esModule",{value:!0});var r=l("babel-runtime/core-js/promise"),i=t(r),o=l("babel-runtime/helpers/classCallCheck"),a=t(o),s=l("babel-runtime/helpers/createClass"),c=t(s),f=l("../error"),h=3e4,d=1e3,p=2,b=.2,v=function(){function l(n,e,t,r){(0,a["default"])(this,l),this._maxRetryTimeMs=u(n,h),this._initialRetryDelayMs=u(e,d),this._multiplier=u(t,p),this._jitterFactor=u(r,b),this._inFlightTimeoutIds=[],this._verifyAfterConstruction()}return(0,c["default"])(l,[{key:"execute",value:function(l,n){var e=this;return new i["default"](function(t,u){e._executeTransactionInsidePromise(l,n,t,u)})["catch"](function(t){var u=Date.now(),r=e._initialRetryDelayMs;return e._retryTransactionPromise(l,n,t,u,r)})}},{key:"close",value:function(){this._inFlightTimeoutIds.forEach(function(l){return clearTimeout(l)}),this._inFlightTimeoutIds=[]}},{key:"_retryTransactionPromise",value:function(n,e,t,u,r){var o=this,a=Date.now()-u;return a>this._maxRetryTimeMs||!l._canRetryOn(t)?i["default"].reject(t):new i["default"](function(l,t){var u=o._computeDelayWithJitter(r),i=setTimeout(function(){o._inFlightTimeoutIds=o._inFlightTimeoutIds.filter(function(l){return l!==i}),o._executeTransactionInsidePromise(n,e,l,t)},u);o._inFlightTimeoutIds.push(i)})["catch"](function(l){var t=r*o._multiplier;return o._retryTransactionPromise(n,e,l,u,t)})}},{key:"_executeTransactionInsidePromise",value:function(l,n,e,t){var u=this,r=void 0;try{r=l()}catch(i){return void t(i)}var o=this._safeExecuteTransactionWork(r,n);o.then(function(l){return u._handleTransactionWorkSuccess(l,r,e,t)})["catch"](function(l){return u._handleTransactionWorkFailure(l,r,t)})}},{key:"_safeExecuteTransactionWork",value:function(l,n){try{var e=n(l);return i["default"].resolve(e)}catch(t){return i["default"].reject(t)}}},{key:"_handleTransactionWorkSuccess",value:function(l,n,e,t){n.isOpen()?n.commit().then(function(){e(l)})["catch"](function(l){t(l)}):e(l)}},{key:"_handleTransactionWorkFailure",value:function(l,n,e){n.isOpen()?n.rollback()["catch"](function(l){}).then(function(){return e(l)}):e(l)}},{key:"_computeDelayWithJitter",value:function(l){var n=l*this._jitterFactor,e=l-n,t=l+n;return Math.random()*(t-e)+e}},{key:"_verifyAfterConstruction",value:function(){if(this._maxRetryTimeMs<0)throw(0,f.newError)("Max retry time should be >= 0: "+this._maxRetryTimeMs);if(this._initialRetryDelayMs<0)throw(0,f.newError)("Initial retry delay should >= 0: "+this._initialRetryDelayMs);if(this._multiplier<1)throw(0,f.newError)("Multiplier should be >= 1.0: "+this._multiplier);if(this._jitterFactor<0||this._jitterFactor>1)throw(0,f.newError)("Jitter factor should be in [0.0, 1.0]: "+this._jitterFactor)}}],[{key:"_canRetryOn",value:function(l){return l&&l.code&&(l.code===f.SERVICE_UNAVAILABLE||l.code===f.SESSION_EXPIRED||this._isTransientError(l))}},{key:"_isTransientError", value:function(l){var n=l.code;return n.indexOf("TransientError")>=0&&("Neo.TransientError.Transaction.Terminated"!==n&&"Neo.TransientError.Transaction.LockClientStopped"!==n)}}]),l}();e["default"]=v},{"../error":327,"babel-runtime/core-js/promise":30,"babel-runtime/helpers/classCallCheck":34,"babel-runtime/helpers/createClass":35}],364:[function(l,n,e){"use strict";function t(l){return l&&l.__esModule?l:{"default":l}}function u(l){(0,g.assertString)(l,"URL");var n=r(l),e=(0,y.parse)(n.url),t=n.schemeMissing?null:i(e.scheme),u=o(e.host),c=d(u),f=a(e.port,t),h=c+":"+f,p=s(e.query,l);return new E(t,u,f,h,p)}function r(l){return l=l.trim(),l.indexOf("://")===-1?{schemeMissing:!0,url:"none://"+l}:{schemeMissing:!1,url:l}}function i(l){return l?(l=l.trim(),":"===l.charAt(l.length-1)&&(l=l.substring(0,l.length-1)),l):null}function o(l,n){if(!l)throw new Error("Unable to extract host from "+n);return l.trim()}function a(l,n){var e=parseInt(l,10);return 0===e||e?e:v(n)}function s(l,n){var e=c(l),t={};return e&&e.split("&").forEach(function(l){var e=l.split("=");if(2!==e.length)throw new Error("Invalid parameters: '"+e+"' in URL '"+n+"'.");var u=f(e[0],"key",n),r=f(e[1],"value",n);if(t[u])throw new Error("Duplicated query parameters with key '"+u+"' in URL '"+n+"'");t[u]=r}),t}function c(l){return l=(l||"").trim(),l&&"?"===l.charAt(0)&&(l=l.substring(1,l.length)),l}function f(l,n,e){if(l=(l||"").trim(),!l)throw new Error("Illegal empty "+n+" in URL query '"+e+"'");return l}function h(l){var n="["===l.charAt(0),e="]"===l.charAt(l.length-1);if(n||e){if(n&&e)return l;throw new Error("Illegal IPv6 address "+l)}return"["+l+"]"}function d(l){if(!l)throw new Error("Illegal host "+l);var n=l.indexOf(":")>=0;return n?h(l):l}function p(l,n){return l+":"+n}function b(l,n){var e=h(l);return e+":"+n}function v(l){return"http"===l?k:"https"===l?S:w}Object.defineProperty(e,"__esModule",{value:!0});var _=l("babel-runtime/helpers/classCallCheck"),m=t(_),y=l("uri-js"),g=l("./util"),w=7687,k=7474,S=7473,E=function I(l,n,e,t,u){(0,m["default"])(this,I),this.scheme=l,this.host=n,this.port=e,this.hostAndPort=t,this.query=u};e["default"]={parseDatabaseUrl:u,defaultPortForScheme:v,formatIPv4Address:p,formatIPv6Address:b}},{"./util":366,"babel-runtime/helpers/classCallCheck":34,"uri-js":319}],365:[function(l,n,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=l("./buf"),u=l("string_decoder"),r=l("./../error"),i={};try{l.resolve("buffer");var o=new u.StringDecoder("utf8"),a=l("buffer"),s="function"==typeof a.Buffer.from?function(l){return a.Buffer.from(l,"utf8")}:function(l){return new a.Buffer(l,"utf8")};i={encode:function(l){return new t.NodeBuffer(s(l))},decode:function(l,n){if(l instanceof t.NodeBuffer){var e=l.position,u=e+n;return l.position=Math.min(u,l.length),l._buffer.toString("utf8",e,u)}if(l instanceof t.CombinedBuffer){var i=p(l,n,function(l){return o.write(l._buffer)},function(){return o.end()});return i}throw(0,r.newError)("Don't know how to decode strings from `"+l+"`.")}}}catch(c){var f=l("../../external/text-encoding/index"),h=new f.TextEncoder("utf-8"),d=new f.TextDecoder("utf-8");i={encode:function(l){return new t.HeapBuffer(h.encode(l).buffer)},decode:function(l,n){if(l instanceof t.HeapBuffer)return d.decode(l.readView(Math.min(n,l.length-l.position)));for(var e=(0,t.alloc)(n),u=0;u=n.length)return r-=n.length,"";n._updatePos(r-n.position);var t=Math.min(n.length-r,u),i=n.readSlice(t);return n._updatePos(t),u=Math.max(u-i.length,0),r=0,l+e(i)},"");return i+t()};e["default"]=i},{"../../external/text-encoding/index":322,"./../error":327,"./buf":332,buffer:76,string_decoder:317}],366:[function(l,n,e){"use strict";function t(l){return l&&l.__esModule?l:{"default":l}}function u(l){if(null===l)return!0;if(!r(l))return!1;for(var n in l)if(l.hasOwnProperty(n))return!1;return!0}function r(l){return"object"===("undefined"==typeof l?"undefined":(0,y["default"])(l))&&!Array.isArray(l)&&null!==l}function i(l,n){var e=l,t=n||{};return"object"===("undefined"==typeof l?"undefined":(0,y["default"])(l))&&l.text&&(e=l.text,t=l.parameters||{}),f(e),h(t),{query:e,params:t}}function o(l,n){if(!d(l))throw new TypeError(n+" expected to be string but was: "+(0,_["default"])(l));return l}function a(l,n){if("number"!=typeof l)throw new TypeError(n+" expected to be a number but was: "+(0,_["default"])(l));return l}function s(l,n){if("number"!=typeof l&&!(0,g.isInt)(l))throw new TypeError(n+" expected to be either a number or an Integer object but was: "+(0,_["default"])(l));return l}function c(l,n){if("[object Date]"!==Object.prototype.toString.call(l))throw new TypeError(n+" expected to be a standard JavaScript Date but was: "+(0,_["default"])(l));if((0,b["default"])(l.getTime()))throw new TypeError(n+" expected to be valid JavaScript Date but its time was NaN: "+(0,_["default"])(l));return l}function f(l){if(o(l,"Cypher statement"),0===l.trim().length)throw new TypeError("Cypher statement is expected to be a non-empty string.")}function h(l){if(!r(l)){var n=l.constructor?" "+l.constructor.name:"";throw new TypeError("Query parameters are expected to either be undefined/null or an object, given:"+n+" "+l)}}function d(l){return"[object String]"===Object.prototype.toString.call(l)}Object.defineProperty(e,"__esModule",{value:!0}),e.ENCRYPTION_OFF=e.ENCRYPTION_ON=e.validateStatementAndParameters=e.assertValidDate=e.assertNumberOrInteger=e.assertNumber=e.assertString=e.isString=e.isEmptyObjectOrNull=void 0;var p=l("babel-runtime/core-js/number/is-nan"),b=t(p),v=l("babel-runtime/core-js/json/stringify"),_=t(v),m=l("babel-runtime/helpers/typeof"),y=t(m),g=l("../integer"),w="ENCRYPTION_ON",k="ENCRYPTION_OFF";e.isEmptyObjectOrNull=u,e.isString=d,e.assertString=o,e.assertNumber=a,e.assertNumberOrInteger=s,e.assertValidDate=c,e.validateStatementAndParameters=i,e.ENCRYPTION_ON=w,e.ENCRYPTION_OFF=k},{"../integer":330,"babel-runtime/core-js/json/stringify":18,"babel-runtime/core-js/number/is-nan":20,"babel-runtime/helpers/typeof":42}],367:[function(l,n,e){"use strict";function t(l){return l&&l.__esModule?l:{"default":l}}function u(l){var n={};return l.forEach(function(l,e){n[l]=e}),n}Object.defineProperty(e,"__esModule",{value:!0});var r=l("babel-runtime/helpers/classCallCheck"),i=t(r),o=l("babel-runtime/helpers/createClass"),a=t(o),s=l("./error"),c=function(){function l(n,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;(0,i["default"])(this,l),this.keys=n,this.length=n.length,this._fields=e,this._fieldLookup=t||u(n)}return(0,a["default"])(l,[{key:"forEach",value:function(l){for(var n=0;nthis._fields.length-1||n<0)throw(0,s.newError)("This record has no field with index '"+n+"'. Remember that indexes start at `0`, and make sure your statement returns records in the shape you meant it to.");return this._fields[n]}},{key:"has",value:function(l){return"number"==typeof l?l>=0&&l0}},{key:"nodesCreated",value:function(){return this._stats.nodesCreated}},{key:"nodesDeleted",value:function(){return this._stats.nodesDeleted}},{key:"relationshipsCreated",value:function(){return this._stats.relationshipsCreated}},{key:"relationshipsDeleted",value:function(){return this._stats.relationshipsDeleted}},{key:"propertiesSet",value:function(){return this._stats.propertiesSet}},{key:"labelsAdded",value:function(){return this._stats.labelsAdded}},{key:"labelsRemoved",value:function(){return this._stats.labelsRemoved}},{key:"indexesAdded",value:function(){return this._stats.indexesAdded}},{key:"indexesRemoved",value:function(){return this._stats.indexesRemoved}},{key:"constraintsAdded",value:function(){return this._stats.constraintsAdded}},{key:"constraintsRemoved",value:function(){return this._stats.constraintsRemoved}}]),l}(),b=function(){function l(n){(0,o["default"])(this,l),this.code=n.code,this.title=n.title,this.description=n.description,this.severity=n.severity,this.position=l._constructPosition(n.position)}return(0,s["default"])(l,null,[{key:"_constructPosition",value:function(l){return l?{offset:l.offset.toInt(),line:l.line.toInt(),column:l.column.toInt()}:{}}}]),l}(),v=function g(l){(0,o["default"])(this,g),l&&(this.address=l.address,this.version=l.version)},_={READ_ONLY:"r",READ_WRITE:"rw",WRITE_ONLY:"w",SCHEMA_WRITE:"s"};e.statementType=_,e["default"]=f},{"./integer":330,"babel-runtime/core-js/object/keys":28,"babel-runtime/helpers/classCallCheck":34,"babel-runtime/helpers/createClass":35}],369:[function(l,n,e){"use strict";function t(l){return l&&l.__esModule?l:{"default":l}}function u(){var l=new Error("");return l.stack?l.stack.replace(/^Error(\n\r)*/,""):null}function r(l,n){n&&(l.stack=l.toString()+"\n"+n)}Object.defineProperty(e,"__esModule",{value:!0});var i=l("babel-runtime/core-js/promise"),o=t(i),a=l("babel-runtime/helpers/classCallCheck"),s=t(a),c=l("babel-runtime/helpers/createClass"),f=t(c),h=l("./result-summary"),d=t(h),p=l("./internal/connection-holder"),b=function(l){console.log("Uncaught error when processing result: "+l)},v=function(l){},_=function(){function l(n,e,t,r,i){(0,s["default"])(this,l),this._stack=u(),this._streamObserver=n,this._p=null,this._statement=e,this._parameters=t||{},this._metaSupplier=r||function(){return{}},this._connectionHolder=i||p.EMPTY_CONNECTION_HOLDER}return(0,f["default"])(l,[{key:"_createPromise",value:function(){if(!this._p){var l=this;this._p=new o["default"](function(n,e){var t=[],u={onNext:function(l){t.push(l)},onCompleted:function(l){n({records:t,summary:l})},onError:function(l){e(l)}};l.subscribe(u)})}}},{key:"then",value:function(l,n){return this._createPromise(),this._p.then(l,n)}},{key:"catch",value:function(l){return this._createPromise(),this._p["catch"](l)}},{key:"subscribe",value:function(l){var n=this,e=this,t=l.onCompleted||v,u=function(u){var r=e._metaSupplier();for(var i in r)r.hasOwnProperty(i)&&(u[i]=r[i]);var o=new d["default"](n._statement,n._parameters,u);e._connectionHolder.releaseConnection().then(function(){t.call(l,o)})};l.onCompleted=u;var i=l.onError||b,o=function(t){e._connectionHolder.releaseConnection().then(function(){r(t,n._stack),i.call(l,t)})};l.onError=o,this._streamObserver.subscribe(l)}}]),l}();e["default"]=_},{"./internal/connection-holder":337,"./result-summary":368,"babel-runtime/core-js/promise":30,"babel-runtime/helpers/classCallCheck":34,"babel-runtime/helpers/createClass":35}],370:[function(l,n,e){"use strict";function t(l){return l&&l.__esModule?l:{"default":l}}function u(l){if("TRUST_ON_FIRST_USE"===l.trust)throw(0,g.newError)("The chosen trust mode is not compatible with a routing driver");return l}function r(l){return"Neo.ClientError.Cluster.NotALeader"===l.code||"Neo.ClientError.General.ForbiddenOnReadOnlyDatabase"===l.code}function i(l){return"Neo.TransientError.General.DatabaseUnavailable"===l.code}Object.defineProperty(e,"__esModule",{value:!0});var o=l("babel-runtime/core-js/object/get-prototype-of"),a=t(o),s=l("babel-runtime/helpers/classCallCheck"),c=t(s),f=l("babel-runtime/helpers/createClass"),h=t(f),d=l("babel-runtime/helpers/possibleConstructorReturn"),p=t(d),b=l("babel-runtime/helpers/inherits"),v=t(b),_=l("./session"),m=t(_),y=l("./driver"),g=l("./error"),w=l("./internal/connection-providers"),k=l("./internal/least-connected-load-balancing-strategy"),S=t(k),E=l("./internal/round-robin-load-balancing-strategy"),I=t(E),C=function(l){function n(l,e,t){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};(0,c["default"])(this,n);var o=(0,p["default"])(this,(n.__proto__||(0,a["default"])(n)).call(this,l,t,r,u(i)));return o._routingContext=e,o}return(0,v["default"])(n,l),(0,h["default"])(n,[{key:"_createConnectionProvider",value:function(l,e,t){var u=n._createLoadBalancingStrategy(this._config,e);return new w.LoadBalancer(l,this._routingContext,e,u,t)}},{key:"_createSession",value:function(l,n,e,t){var u=this;return new j(l,n,e,t,function(l,n){if(!n)return l;var e=n.hostPort;return l.code===g.SESSION_EXPIRED||i(l)?(u._connectionProvider.forget(e),l):r(l)?(u._connectionProvider.forgetWriter(e),(0,g.newError)("No longer possible to write to server at "+e,g.SESSION_EXPIRED)):l})}},{key:"_connectionErrorCode",value:function(){return g.SESSION_EXPIRED}}],[{key:"_createLoadBalancingStrategy",value:function(l,n){var e=l.loadBalancingStrategy;if(e&&e!==k.LEAST_CONNECTED_STRATEGY_NAME){if(e===E.ROUND_ROBIN_STRATEGY_NAME)return new I["default"];throw(0,g.newError)("Unknown load balancing strategy: "+e)}return new S["default"](n)}}]),n}(y.Driver),j=function(l){function n(l,e,t,u,r){(0,c["default"])(this,n);var i=(0,p["default"])(this,(n.__proto__||(0,a["default"])(n)).call(this,l,e,t,u));return i._onFailedConnection=r,i}return(0,v["default"])(n,l),(0,h["default"])(n,[{key:"_onRunFailure",value:function(){return this._onFailedConnection}}]),n}(m["default"]);e["default"]=C},{"./driver":326,"./error":327,"./internal/connection-providers":338,"./internal/least-connected-load-balancing-strategy":348,"./internal/round-robin-load-balancing-strategy":357,"./session":371,"babel-runtime/core-js/object/get-prototype-of":27,"babel-runtime/helpers/classCallCheck":34,"babel-runtime/helpers/createClass":35,"babel-runtime/helpers/inherits":38,"babel-runtime/helpers/possibleConstructorReturn":39}],371:[function(l,n,e){"use strict";function t(l){return l&&l.__esModule?l:{"default":l}}function u(l){var n=l&&l.maxTransactionRetryTime?l.maxTransactionRetryTime:null;return new k["default"](n)}Object.defineProperty(e,"__esModule",{value:!0});var r=l("babel-runtime/helpers/classCallCheck"),i=t(r),o=l("babel-runtime/helpers/createClass"),a=t(o),s=l("./internal/stream-observer"),c=t(s),f=l("./result"),h=t(f),d=l("./transaction"),p=t(d),b=l("./error"),v=l("./internal/util"),_=l("./internal/connection-holder"),m=t(_),y=l("./driver"),g=t(y),w=l("./internal/transaction-executor"),k=t(w),S=l("./internal/bookmark"),E=t(S),I=function(){function l(n,e,t,r){(0,i["default"])(this,l),this._mode=n,this._readConnectionHolder=new m["default"](y.READ,e),this._writeConnectionHolder=new m["default"](y.WRITE,e),this._open=!0,this._hasTx=!1,this._lastBookmark=t,this._transactionExecutor=u(r)}return(0,a["default"])(l,[{key:"run",value:function(l){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=(0,v.validateStatementAndParameters)(l,n),t=e.query,u=e.params;return this._run(t,u,function(l,n){return l.run(t,u,n)})}},{key:"_run",value:function(l,n,e){var t=new c["default"](this._onRunFailure()),u=this._connectionHolderWithMode(this._mode);return this._hasTx?t.onError((0,b.newError)("Statements cannot be run directly on a session with an open transaction; either run from within the transaction or use a different session.")):(u.initializeConnection(),u.getConnection(t).then(function(l){e(l,t),l.pullAll(t),l.sync()})["catch"](function(l){return t.onError(l)})),new h["default"](t,l,n,function(){return t.serverMetadata()},u)}},{key:"beginTransaction",value:function(l){return this._updateBookmark(new E["default"](l)),this._beginTransaction(this._mode)}},{key:"_beginTransaction",value:function(l){var n=this;if(this._hasTx)throw(0,b.newError)("You cannot begin a transaction on a session with an open transaction; either run from within the transaction or use a different session.");var e=g["default"]._validateSessionMode(l),t=this._connectionHolderWithMode(e);return t.initializeConnection(),this._hasTx=!0,new p["default"](t,function(){n._hasTx=!1},this._onRunFailure(),this._lastBookmark,this._updateBookmark.bind(this))}},{key:"lastBookmark",value:function(){return this._lastBookmark.maxBookmarkAsString()}},{key:"readTransaction",value:function(l){return this._runTransaction(y.READ,l)}},{key:"writeTransaction",value:function(l){return this._runTransaction(y.WRITE,l)}},{key:"_runTransaction",value:function(l,n){var e=this;return this._transactionExecutor.execute(function(){return e._beginTransaction(l)},n)}},{key:"_updateBookmark",value:function(l){l&&!l.isEmpty()&&(this._lastBookmark=l)}},{key:"close",value:function(){var l=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return null};this._open?(this._open=!1,this._transactionExecutor.close(),this._readConnectionHolder.close().then(function(){l._writeConnectionHolder.close().then(function(){n()})})):n()}},{key:"_onRunFailure",value:function(){return function(l){return l}}},{key:"_connectionHolderWithMode",value:function(l){if(l===y.READ)return this._readConnectionHolder;if(l===y.WRITE)return this._writeConnectionHolder;throw(0,b.newError)("Unknown access mode: "+l)}}]),l}();e["default"]=I},{"./driver":326,"./error":327,"./internal/bookmark":331,"./internal/connection-holder":337,"./internal/stream-observer":361,"./internal/transaction-executor":363,"./internal/util":366,"./result":369,"./transaction":374,"babel-runtime/helpers/classCallCheck":34,"babel-runtime/helpers/createClass":35}],372:[function(l,n,e){"use strict";function t(l){return l&&l.__esModule?l:{"default":l}}function u(l){return(0,s["default"])(l)?l+".0":l.toString()}function r(l){return(l&&l[_])===!0}Object.defineProperty(e,"__esModule",{value:!0}),e.Point=void 0;var i=l("babel-runtime/core-js/object/define-property"),o=t(i),a=l("babel-runtime/core-js/number/is-integer"),s=t(a),c=l("babel-runtime/core-js/object/freeze"),f=t(c),h=l("babel-runtime/helpers/classCallCheck"),d=t(h),p=l("babel-runtime/helpers/createClass"),b=t(p);e.isPoint=r;var v=l("./internal/util"),_="__isPoint__",m=e.Point=function(){function l(n,e,t,u){(0,d["default"])(this,l),this.srid=(0,v.assertNumberOrInteger)(n,"SRID"),this.x=(0,v.assertNumber)(e,"X coordinate"),this.y=(0,v.assertNumber)(t,"Y coordinate"),this.z=null===u||void 0===u?u:(0,v.assertNumber)(u,"Z coordinate"),(0,f["default"])(this)}return(0,b["default"])(l,[{key:"toString",value:function(){return this.z||0===this.z?"Point{srid="+u(this.srid)+", x="+u(this.x)+", y="+u(this.y)+", z="+u(this.z)+"}":"Point{srid="+u(this.srid)+", x="+u(this.x)+", y="+u(this.y)+"}"}}]),l}();(0,o["default"])(m.prototype,_,{value:!0,enumerable:!1,configurable:!1})},{"./internal/util":366,"babel-runtime/core-js/number/is-integer":19,"babel-runtime/core-js/object/define-property":24,"babel-runtime/core-js/object/freeze":25,"babel-runtime/helpers/classCallCheck":34,"babel-runtime/helpers/createClass":35}],373:[function(l,n,e){"use strict";function t(l){if(l&&l.__esModule)return l;var n={};if(null!=l)for(var e in l)Object.prototype.hasOwnProperty.call(l,e)&&(n[e]=l[e]);return n["default"]=l,n}function u(l){return l&&l.__esModule?l:{"default":l}}function r(l){return f(l,x)}function i(l){return f(l,T)}function o(l){return f(l,R)}function a(l){return f(l,O)}function s(l){return f(l,P)}function c(l){return f(l,N)}function f(l,n){return(l&&l[n])===!0}function h(l,n,e,t,u,r,i){return C.dateToIsoString(l,n,e)+"T"+C.timeToIsoString(t,u,r,i)}function d(l,n){var e=l||0===l,t=n&&""!==n;if(e&&!t)return(0,j.assertNumberOrInteger)(l,"Time zone offset in seconds"),[l,null];if(!e&&t)return(0,j.assertString)(n,"Time zone ID"),[null,n];throw e&&t?(0,M.newError)("Unable to create DateTime with both time zone offset and id. Please specify either of them. Given offset: "+l+" and id: "+n):(0,M.newError)("Unable to create DateTime without either time zone offset or id. Please specify either of them. Given offset: "+l+" and id: "+n)}function p(l,n){(0,j.assertValidDate)(l,"Standard date"),null!==n&&void 0!==n&&(0,j.assertNumberOrInteger)(n,"Nanosecond")}Object.defineProperty(e,"__esModule",{value:!0}),e.DateTime=e.LocalDateTime=e.Date=e.Time=e.LocalTime=e.Duration=void 0;var b=l("babel-runtime/helpers/slicedToArray"),v=u(b),_=l("babel-runtime/core-js/object/define-property"),m=u(_),y=l("babel-runtime/core-js/object/freeze"),g=u(y),w=l("babel-runtime/helpers/classCallCheck"),k=u(w),S=l("babel-runtime/helpers/createClass"),E=u(S);e.isDuration=r,e.isLocalTime=i,e.isTime=o,e.isDate=a,e.isLocalDateTime=s,e.isDateTime=c;var I=l("./internal/temporal-util"),C=t(I),j=l("./internal/util"),M=l("./error"),A={value:!0,enumerable:!1,configurable:!1},x="__isDuration__",T="__isLocalTime__",R="__isTime__",O="__isDate__",P="__isLocalDateTime__",N="__isDateTime__",B=e.Duration=function(){function l(n,e,t,u){(0,k["default"])(this,l),this.months=(0,j.assertNumberOrInteger)(n,"Months"),this.days=(0,j.assertNumberOrInteger)(e,"Days"),(0,j.assertNumberOrInteger)(t,"Seconds"),(0,j.assertNumberOrInteger)(u,"Nanoseconds"),this.seconds=C.normalizeSecondsForDuration(t,u),this.nanoseconds=C.normalizeNanosecondsForDuration(u),(0,g["default"])(this)}return(0,E["default"])(l,[{key:"toString",value:function(){return C.durationToIsoString(this.months,this.days,this.seconds,this.nanoseconds)}}]),l}();(0,m["default"])(B.prototype,x,A);var U=e.LocalTime=function(){function l(n,e,t,u){(0,k["default"])(this,l),this.hour=C.assertValidHour(n),this.minute=C.assertValidMinute(e),this.second=C.assertValidSecond(t),this.nanosecond=C.assertValidNanosecond(u),(0,g["default"])(this)}return(0,E["default"])(l,[{key:"toString",value:function(){return C.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)}}],[{key:"fromStandardDate",value:function(n,e){return p(n,e),new l(n.getHours(),n.getMinutes(),n.getSeconds(),C.totalNanoseconds(n,e))}}]),l}();(0,m["default"])(U.prototype,T,A);var D=e.Time=function(){function l(n,e,t,u,r){(0,k["default"])(this,l),this.hour=C.assertValidHour(n),this.minute=C.assertValidMinute(e),this.second=C.assertValidSecond(t),this.nanosecond=C.assertValidNanosecond(u),this.timeZoneOffsetSeconds=(0,j.assertNumberOrInteger)(r,"Time zone offset in seconds"),(0,g["default"])(this)}return(0,E["default"])(l,[{key:"toString",value:function(){return C.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)+C.timeZoneOffsetToIsoString(this.timeZoneOffsetSeconds)}}],[{key:"fromStandardDate",value:function(n,e){return p(n,e),new l(n.getHours(),n.getMinutes(),n.getSeconds(),C.totalNanoseconds(n,e),C.timeZoneOffsetInSeconds(n))}}]),l}();(0,m["default"])(D.prototype,R,A);var L=e.Date=function(){function l(n,e,t){(0,k["default"])(this,l),this.year=C.assertValidYear(n),this.month=C.assertValidMonth(e),this.day=C.assertValidDay(t),(0,g["default"])(this)}return(0,E["default"])(l,[{key:"toString",value:function(){return C.dateToIsoString(this.year,this.month,this.day)}}],[{key:"fromStandardDate",value:function(n){return p(n,null),new l(n.getFullYear(),n.getMonth()+1,n.getDate())}}]),l}();(0,m["default"])(L.prototype,O,A);var F=e.LocalDateTime=function(){function l(n,e,t,u,r,i,o){(0,k["default"])(this,l),this.year=C.assertValidYear(n),this.month=C.assertValidMonth(e),this.day=C.assertValidDay(t),this.hour=C.assertValidHour(u),this.minute=C.assertValidMinute(r),this.second=C.assertValidSecond(i),this.nanosecond=C.assertValidNanosecond(o),(0,g["default"])(this)}return(0,E["default"])(l,[{key:"toString",value:function(){return h(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)}}],[{key:"fromStandardDate",value:function(n,e){return p(n,e),new l(n.getFullYear(),n.getMonth()+1,n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),C.totalNanoseconds(n,e))}}]),l}();(0,m["default"])(F.prototype,P,A);var q=e.DateTime=function(){function l(n,e,t,u,r,i,o,a,s){(0,k["default"])(this,l),this.year=C.assertValidYear(n),this.month=C.assertValidMonth(e),this.day=C.assertValidDay(t),this.hour=C.assertValidHour(u),this.minute=C.assertValidMinute(r),this.second=C.assertValidSecond(i),this.nanosecond=C.assertValidNanosecond(o);var c=d(a,s),f=(0,v["default"])(c,2),h=f[0],p=f[1];this.timeZoneOffsetSeconds=h,this.timeZoneId=p,(0,g["default"])(this)}return(0,E["default"])(l,[{key:"toString",value:function(){var l=h(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond),n=this.timeZoneId?"["+this.timeZoneId+"]":C.timeZoneOffsetToIsoString(this.timeZoneOffsetSeconds);return l+n}}],[{key:"fromStandardDate",value:function(n,e){return p(n,e),new l(n.getFullYear(),n.getMonth()+1,n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),C.totalNanoseconds(n,e),C.timeZoneOffsetInSeconds(n),null)}}]),l}();(0,m["default"])(q.prototype,N,A)},{"./error":327,"./internal/temporal-util":362,"./internal/util":366,"babel-runtime/core-js/object/define-property":24,"babel-runtime/core-js/object/freeze":25,"babel-runtime/helpers/classCallCheck":34,"babel-runtime/helpers/createClass":35,"babel-runtime/helpers/slicedToArray":40}],374:[function(l,n,e){"use strict";function t(l){return l&&l.__esModule?l:{"default":l}}function u(l,n,e){return n.getConnection(e).then(function(n){n.run(l,{},e),n.pullAll(e),n.sync()})["catch"](function(l){return e.onError(l)}),new I["default"](e,l,{},o,n)}function r(l,n,e,t){return new I["default"](l,n,e,t,j.EMPTY_CONNECTION_HOLDER)}function i(l,n,e){return new I["default"](l,n,e,o,j.EMPTY_CONNECTION_HOLDER)}function o(){return{}}Object.defineProperty(e,"__esModule",{value:!0});var a=l("babel-runtime/core-js/object/get-prototype-of"),s=t(a),c=l("babel-runtime/helpers/possibleConstructorReturn"),f=t(c),h=l("babel-runtime/helpers/get"),d=t(h),p=l("babel-runtime/helpers/inherits"),b=t(p),v=l("babel-runtime/core-js/promise"),_=t(v),m=l("babel-runtime/helpers/classCallCheck"),y=t(m),g=l("babel-runtime/helpers/createClass"),w=t(g),k=l("./internal/stream-observer"),S=t(k),E=l("./result"),I=t(E),C=l("./internal/util"),j=l("./internal/connection-holder"),M=l("./internal/bookmark"),A=t(M),x=function(){function l(n,e,t,u,r){(0,y["default"])(this,l),this._connectionHolder=n;var i=new T(this);this._connectionHolder.getConnection(i).then(function(l){l.run("BEGIN",u.asBeginTransactionParameters(),i),l.pullAll(i)})["catch"](function(l){return i.onError(l)}),this._state=R.ACTIVE,this._onClose=e,this._errorTransformer=t,this._onBookmark=r}return(0,w["default"])(l,[{key:"run",value:function(l,n){var e=(0,C.validateStatementAndParameters)(l,n),t=e.query,u=e.params;return this._state.run(this._connectionHolder,new T(this),t,u)}},{key:"commit",value:function(){var l=this._state.commit(this._connectionHolder,new T(this));return this._state=l.state,this._onClose(),l.result}},{key:"rollback",value:function(){var l=this._state.rollback(this._connectionHolder,new T(this));return this._state=l.state,this._onClose(),l.result}},{key:"isOpen",value:function(){return this._state==R.ACTIVE}},{key:"_onError",value:function(){var l=this;return this.isOpen()?this.rollback()["catch"](function(l){}).then(function(){l._state=R.FAILED}):(this._state=R.FAILED,this._onClose(),_["default"].resolve())}}]),l}(),T=function(l){function n(l){(0,y["default"])(this,n);var e=(0,f["default"])(this,(n.__proto__||(0,s["default"])(n)).call(this,l._errorTransformer||function(l){return l}));return e._tx=l,e._hasFailed=!1,e}return(0,b["default"])(n,l),(0,w["default"])(n,[{key:"onError",value:function(l){var e=this;this._hasFailed||this._tx._onError().then(function(){(0,d["default"])(n.prototype.__proto__||(0,s["default"])(n.prototype),"onError",e).call(e,l),e._hasFailed=!0})}},{key:"onCompleted",value:function(l){(0,d["default"])(n.prototype.__proto__||(0,s["default"])(n.prototype),"onCompleted",this).call(this,l);var e=new A["default"](l.bookmark);this._tx._onBookmark(e)}}]),n}(S["default"]),R={ACTIVE:{commit:function(l,n){return{result:u("COMMIT",l,n),state:R.SUCCEEDED}},rollback:function(l,n){return{result:u("ROLLBACK",l,n),state:R.ROLLED_BACK}},run:function(l,n,e,t){return l.getConnection(n).then(function(l){l.run(e,t||{},n),l.pullAll(n),l.sync()})["catch"](function(l){return n.onError(l)}),r(n,e,t,function(){return n.serverMetadata()})}},FAILED:{commit:function(l,n){return n.onError({error:"Cannot commit statements in this transaction, because previous statements in the transaction has failed and the transaction has been rolled back. Please start a new transaction to run another statement."}),{result:i(n,"COMMIT",{}),state:R.FAILED}},rollback:function(l,n){return n.onError({error:"Cannot rollback transaction, because previous statements in the transaction has failed and the transaction has already been rolled back."}),{result:i(n,"ROLLBACK",{}),state:R.FAILED}},run:function(l,n,e,t){return n.onError({error:"Cannot run statement, because previous statements in the transaction has failed and the transaction has already been rolled back."}),i(n,e,t)}},SUCCEEDED:{commit:function(l,n){return n.onError({error:"Cannot commit statements in this transaction, because commit has already been successfully called on the transaction and transaction has been closed. Please start a new transaction to run another statement."}),{result:i(n,"COMMIT",{}),state:R.SUCCEEDED}},rollback:function(l,n){return n.onError({error:"Cannot rollback transaction, because transaction has already been successfully closed."}),{result:i(n,"ROLLBACK",{}),state:R.SUCCEEDED}},run:function(l,n,e,t){return n.onError({error:"Cannot run statement, because transaction has already been successfully closed."}),i(n,e,t)}},ROLLED_BACK:{commit:function(l,n){return n.onError({error:"Cannot commit this transaction, because it has already been rolled back."}),{result:i(n,"COMMIT",{}),state:R.ROLLED_BACK}},rollback:function(l,n){return n.onError({ error:"Cannot rollback transaction, because transaction has already been rolled back."}),{result:i(n,"ROLLBACK",{}),state:R.ROLLED_BACK}},run:function(l,n,e,t){return n.onError({error:"Cannot run statement, because transaction has already been rolled back."}),i(n,e,t)}}};e["default"]=x},{"./internal/bookmark":331,"./internal/connection-holder":337,"./internal/stream-observer":361,"./internal/util":366,"./result":369,"babel-runtime/core-js/object/get-prototype-of":27,"babel-runtime/core-js/promise":30,"babel-runtime/helpers/classCallCheck":34,"babel-runtime/helpers/createClass":35,"babel-runtime/helpers/get":37,"babel-runtime/helpers/inherits":38,"babel-runtime/helpers/possibleConstructorReturn":39}],375:[function(l,n,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e["default"]="1.6.3"},{}]},{},[325])(325)});