-
Notifications
You must be signed in to change notification settings - Fork 0
/
algosdk.min.js
1 lines (1 loc) · 199 KB
/
algosdk.min.js
1
(function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"==typeof window?"undefined"==typeof global?"undefined"==typeof self?this:self:global:window,t.algosdk=e()}})(function(){var t=Math.pow,o=Math.min,r=Number.isSafeInteger,a=Math.abs,s=Math.floor,d=String.fromCharCode,p;return function(){function s(l,e,r){function t(d,n){if(!e[d]){if(!l[d]){var i="function"==typeof require&&require;if(!n&&i)return i(d,!0);if(o)return o(d,!0);var c=new Error("Cannot find module '"+d+"'");throw c.code="MODULE_NOT_FOUND",c}var a=e[d]={exports:{}};l[d][0].call(a.exports,function(e){var o=l[d][1][e];return t(o||e)},a,a.exports,s,l,e,r)}return e[d].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)t(r[a]);return t}return s}()({1:[function(e,o,n){!function(r,e){"object"==typeof n&&"object"==typeof o?o.exports=e():"function"==typeof p&&p.amd?p([],e):"object"==typeof n?n.MessagePack=e():r.MessagePack=e()}(this,function(){return function(o){function a(t){if(e[t])return e[t].exports;var r=e[t]={i:t,l:!1,exports:{}};return o[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}var e={};return a.m=o,a.c=e,a.d=function(o,e,t){a.o(o,e)||Object.defineProperty(o,e,{enumerable:!0,get:t})},a.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(o,r){if(1&r&&(o=a(o)),8&r)return o;if(4&r&&"object"==typeof o&&o&&o.__esModule)return o;var t=Object.create(null);if(a.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:o}),2&r&&"string"!=typeof o)for(var n in o)a.d(t,n,function(e){return o[e]}.bind(null,n));return t},a.n=function(o){var e=o&&o.__esModule?function(){return o.default}:function(){return o};return a.d(e,"a",e),e},a.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},a.p="",a(a.s=0)}([function(u,e,t){"use strict";function y(a){for(var e=a.length,t=0,s=0,l;s<e;)if(l=a.charCodeAt(s++),0==(4294967168&l))t++;else if(0==(4294965248&l))t+=2;else{if(55296<=l&&56319>=l&&s<e){var c=a.charCodeAt(s);56320==(64512&c)&&(++s,l=((1023&l)<<10)+(1023&c)+65536)}t+=0==(4294901760&l)?3:4}return t}function w(i,e,t){for(var r=e,p=r+t,o=[],s="",u;r<p;){if(u=i[r++],0==(128&u))o.push(u);else if(192==(224&u)){var g=63&i[r++];o.push((31&u)<<6|g)}else if(224==(240&u)){g=63&i[r++];var y=63&i[r++];o.push((31&u)<<12|g<<6|y)}else if(240==(248&u)){var m=(7&u)<<18|(g=63&i[r++])<<12|(y=63&i[r++])<<6|63&i[r++];65535<m&&(m-=65536,o.push(55296|1023&m>>>10),m=56320|1023&m),o.push(m)}else o.push(u);65536<=o.length-4&&(s+=d.apply(String,ie(o)),o.length=0)}return 0<o.length&&(s+=d.apply(String,ie(o))),s}function c(o,e,t){var r=s(t/4294967296);o.setUint32(e,r),o.setUint32(e+4,t)}function p(o,e){return 4294967296*o.getInt32(e)+o.getUint32(e+4)}function T(o){var e=o.sec,t=o.nsec;if(0<=e&&0<=t&&17179869183>=e){if(0===t&&4294967295>=e){var r=new Uint8Array(4);return(a=new DataView(r.buffer)).setUint32(0,e),r}return r=new Uint8Array(8),(a=new DataView(r.buffer)).setUint32(0,t<<2|3&e/4294967296),a.setUint32(4,4294967295&e),r}var a;return r=new Uint8Array(12),(a=new DataView(r.buffer)).setUint32(0,t),c(a,4,e),r}function v(o){var e=o.getTime(),t=s(e/1e3),r=1e6*(e-1e3*t),a=s(r/1e9);return{sec:t+a,nsec:r-1e9*a}}function g(t){return t instanceof Date?T(v(t)):null}function z(o){var e=new DataView(o.buffer,o.byteOffset,o.byteLength);switch(o.byteLength){case 4:return{sec:e.getUint32(0),nsec:0};case 8:var t=e.getUint32(0);return{sec:4294967296*(3&t)+e.getUint32(4),nsec:t>>>2};case 12:return{sec:p(e,4),nsec:e.getUint32(0)};default:throw new Error("Unrecognized data size for timestamp: "+o.length);}}function m(o){var e=z(o);return new Date(1e3*e.sec+e.nsec/1e6)}function U(t){return t instanceof Uint8Array?t:ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t instanceof ArrayBuffer?new Uint8Array(t):Uint8Array.from(t)}function E(l,e,t){var r=l.length,n=2*r,i=x.malloc(n);!function(a,e,t,r){for(var n=new DataView(x.memory.buffer,a,e),s=0;s<r;s++)n.setUint16(2*s,t.charCodeAt(s))}(i,n,l,r);var o=x.malloc(5+4*r);try{var s=x.utf8EncodeUint16Array(o,i,r);return e.set(new Uint8Array(x.memory.buffer,o,s),t),s}finally{x.free(i),x.free(o)}}function L(l,e,t){var r=x.malloc(t),s=x.malloc(2*t),a,c,p;try{a=r,c=l.subarray(e,e+t),p=t,new Uint8Array(x.memory.buffer,a,p).set(c);var u=x.utf8DecodeToUint16Array(s,r,t);return function(o){if(o.length<=65536)return d.apply(String,o);for(var e="",a=0,s;a<o.length;a++)s=o.subarray(65536*a,65536*(a+1)),e+=d.apply(String,s);return e}(new Uint16Array(x.memory.buffer,s,u))}finally{x.free(r),x.free(s)}}function I(o,e){void 0===e&&(e=B);var a=new k(e.extensionCodec,e.maxDepth,e.initialBufferSize,e.sortKeys,e.forceFloat32);return a.encode(o,1),a.getUint8Array()}function P(t){return(0>t?"-":"")+"0x"+a(t).toString(16).padStart(2,"0")}function j(o,e){void 0===e&&(e=Z);var a=new Y(e.extensionCodec,e.maxStrLength,e.maxBinLength,e.maxArrayLength,e.maxMapLength,e.maxExtLength);return a.setBuffer(o),a.decodeSingleSync()}function M(t){return null==t[Symbol.asyncIterator]?function(a){return re(this,arguments,function(){var e,s,l,c;return $(this,function(t){switch(t.label){case 0:e=a.getReader(),t.label=1;case 1:t.trys.push([1,,9,10]),t.label=2;case 2:return[4,te(e.read())];case 3:return s=t.sent(),l=s.done,c=s.value,l?[4,te(void 0)]:[3,5];case 4:return[2,t.sent()];case 5:return[4,te(c)];case 6:return[4,t.sent()];case 7:return t.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2];}})})}(t):t}function F(o,e){return void 0===e&&(e=Z),ne(this,void 0,void 0,function(){var t;return oe(this,function(r){return t=M(o),[2,new Y(e.extensionCodec,e.maxStrLength,e.maxBinLength,e.maxArrayLength,e.maxMapLength,e.maxExtLength).decodeSingleAsync(t)]})})}function W(o,e){void 0===e&&(e=Z);var a=M(o);return new Y(e.extensionCodec,e.maxStrLength,e.maxBinLength,e.maxArrayLength,e.maxMapLength,e.maxExtLength).decodeArrayStream(a)}function ee(o,e){void 0===e&&(e=Z);var a=M(o);return new Y(e.extensionCodec,e.maxStrLength,e.maxBinLength,e.maxArrayLength,e.maxMapLength,e.maxExtLength).decodeStream(a)}t.r(e);var ae=function(a,e){var l="function"==typeof Symbol&&a[Symbol.iterator];if(!l)return a;var c=l.call(a),o=[],s,d;try{for(;(void 0===e||0<e--)&&!(s=c.next()).done;)o.push(s.value)}catch(t){d={error:t}}finally{try{s&&!s.done&&(l=c.return)&&l.call(c)}finally{if(d)throw d.error}}return o},ie=function(){for(var o=[],r=0;r<arguments.length;r++)o=o.concat(ae(arguments[r]));return o},le="undefined"!=typeof TextEncoder&&"undefined"!=typeof TextDecoder,o=le?new TextEncoder:void 0,n=o&&o.encodeInto?function(a,e,t){o.encodeInto(a,e.subarray(t))}:function(a,e,t){e.set(o.encode(a),t)},i=le?new TextDecoder:null,h=function(o,e){this.type=o,this.data=e},l={type:-1,encode:g,decode:m},f=function(){function t(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(l)}return t.prototype.register=function(o){var e=o.type,t=o.encode,r=o.decode;if(0<=e)this.encoders[e]=t,this.decoders[e]=r;else{var a=1+e;this.builtInEncoders[a]=t,this.builtInDecoders[a]=r}},t.prototype.tryToEncode=function(o){for(var e=0;e<this.builtInEncoders.length;e++)if(null!=(a=this.builtInEncoders[e])&&null!=(s=a(o)))return new h(-1-e,s);for(e=0;e<this.encoders.length;e++){var a,s;if(null!=(a=this.encoders[e])&&null!=(s=a(o)))return new h(e,s)}return o instanceof h?o:null},t.prototype.decode=function(o,e){var t=0>e?this.builtInDecoders[-1-e]:this.decoders[e];return t?t(o,e):new h(e,o)},t.defaultCodec=new t,t}(),x=null,S=!!x,A=function(o){var a="function"==typeof Symbol&&Symbol.iterator,t=a&&o[a],r=0;if(t)return t.call(o);if(o&&"number"==typeof o.length)return{next:function(){return o&&r>=o.length&&(o=void 0),{value:o&&o[r++],done:!o}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")},k=function(){function t(o,a,s,l,c){void 0===o&&(o=f.defaultCodec),void 0===a&&(a=100),void 0===s&&(s=2048),void 0===l&&(l=!1),void 0===c&&(c=!1),this.extensionCodec=o,this.maxDepth=a,this.initialBufferSize=s,this.sortKeys=l,this.forceFloat32=c,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}return t.prototype.encode=function(o,e){if(e>this.maxDepth)throw new Error("Too deep objects in depth "+e);null==o?this.encodeNil():"boolean"==typeof o?this.encodeBoolean(o):"number"==typeof o?this.encodeNumber(o):"string"==typeof o?this.encodeString(o):this.encodeObject(o,e)},t.prototype.getUint8Array=function(){return this.bytes.subarray(0,this.pos)},t.prototype.ensureBufferSizeToWrite=function(o){var e=this.pos+o;this.view.byteLength<e&&this.resizeBuffer(2*e)},t.prototype.resizeBuffer=function(o){var e=new ArrayBuffer(o),t=new Uint8Array(e),r=new DataView(e);t.set(this.bytes),this.view=r,this.bytes=t},t.prototype.encodeNil=function(){this.writeU8(192)},t.prototype.encodeBoolean=function(t){!1===t?this.writeU8(194):this.writeU8(195)},t.prototype.encodeNumber=function(t){r(t)?0<=t?128>t?this.writeU8(t):256>t?(this.writeU8(204),this.writeU8(t)):65536>t?(this.writeU8(205),this.writeU16(t)):4294967296>t?(this.writeU8(206),this.writeU32(t)):(this.writeU8(207),this.writeU64(t)):-32<=t?this.writeU8(224|t+32):-128<=t?(this.writeU8(208),this.writeI8(t)):-32768<=t?(this.writeU8(209),this.writeI16(t)):-2147483648<=t?(this.writeU8(210),this.writeI32(t)):(this.writeU8(211),this.writeI64(t)):this.forceFloat32?(this.writeU8(202),this.writeF32(t)):(this.writeU8(203),this.writeF64(t))},t.prototype.writeStringHeader=function(t){if(32>t)this.writeU8(160+t);else if(256>t)this.writeU8(217),this.writeU8(t);else if(65536>t)this.writeU8(218),this.writeU16(t);else{if(!(4294967296>t))throw new Error("Too long string: "+t+" bytes in UTF-8");this.writeU8(219),this.writeU32(t)}},t.prototype.encodeString=function(o){var e=o.length;if(le&&200<e){var t=y(o);this.ensureBufferSizeToWrite(5+t),this.writeStringHeader(t),n(o,this.bytes,this.pos),this.pos+=t}else{if(S&&1024<e){this.ensureBufferSizeToWrite(5+4*e);var a=E(o,this.bytes,this.pos);return void(this.pos+=a)}t=y(o),this.ensureBufferSizeToWrite(5+t),this.writeStringHeader(t),function(l,e,t){for(var r=l.length,n=t,c=0,d;c<r;)if(d=l.charCodeAt(c++),0!=(4294967168&d)){if(0==(4294965248&d))e[n++]=192|31&d>>6;else{if(55296<=d&&56319>=d&&c<r){var p=l.charCodeAt(c);56320==(64512&p)&&(++c,d=((1023&d)<<10)+(1023&p)+65536)}0==(4294901760&d)?(e[n++]=224|15&d>>12,e[n++]=128|63&d>>6):(e[n++]=240|7&d>>18,e[n++]=128|63&d>>12,e[n++]=128|63&d>>6)}e[n++]=128|63&d}else e[n++]=d}(o,this.bytes,this.pos),this.pos+=t}},t.prototype.encodeObject=function(o,e){var t=this.extensionCodec.tryToEncode(o);if(null!=t)this.encodeExtension(t);else if(Array.isArray(o))this.encodeArray(o,e);else if(ArrayBuffer.isView(o))this.encodeBinary(o);else{if("object"!=typeof o)throw new Error("Unrecognized object: "+Object.prototype.toString.apply(o));this.encodeMap(o,e)}},t.prototype.encodeBinary=function(o){var e=o.byteLength;if(256>e)this.writeU8(196),this.writeU8(e);else if(65536>e)this.writeU8(197),this.writeU16(e);else{if(!(4294967296>e))throw new Error("Too large binary: "+e);this.writeU8(198),this.writeU32(e)}var t=U(o);this.writeU8a(t)},t.prototype.encodeArray=function(l,e){var t=l.length,i,c;if(16>t)this.writeU8(144+t);else if(65536>t)this.writeU8(220),this.writeU16(t);else{if(!(4294967296>t))throw new Error("Too large array: "+t);this.writeU8(221),this.writeU32(t)}try{for(var d=A(l),o=d.next(),p;!o.done;o=d.next())p=o.value,this.encode(p,e+1)}catch(t){i={error:t}}finally{try{o&&!o.done&&(c=d.return)&&c.call(d)}finally{if(i)throw i.error}}},t.prototype.encodeMap=function(a,e){var t=Object.keys(a);this.sortKeys&&t.sort();var r=t.length;if(16>r)this.writeU8(128+r);else if(65536>r)this.writeU8(222),this.writeU16(r);else{if(!(4294967296>r))throw new Error("Too large map object: "+r);this.writeU8(223),this.writeU32(r)}for(var n=0,s;n<r;n++)s=t[n],this.encodeString(s),this.encode(a[s],e+1)},t.prototype.encodeExtension=function(o){var e=o.data.length;if(1===e)this.writeU8(212);else if(2===e)this.writeU8(213);else if(4===e)this.writeU8(214);else if(8===e)this.writeU8(215);else if(16===e)this.writeU8(216);else if(256>e)this.writeU8(199),this.writeU8(e);else if(65536>e)this.writeU8(200),this.writeU16(e);else{if(!(4294967296>e))throw new Error("Too large extension object: "+e);this.writeU8(201),this.writeU32(e)}this.writeI8(o.type),this.writeU8a(o.data)},t.prototype.writeU8=function(t){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,t),this.pos++},t.prototype.writeU8a=function(o){var e=o.length;this.ensureBufferSizeToWrite(e),this.bytes.set(o,this.pos),this.pos+=e},t.prototype.writeI8=function(t){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,t),this.pos++},t.prototype.writeU16=function(t){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,t),this.pos+=2},t.prototype.writeI16=function(t){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,t),this.pos+=2},t.prototype.writeU32=function(t){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,t),this.pos+=4},t.prototype.writeI32=function(t){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,t),this.pos+=4},t.prototype.writeF32=function(t){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,t),this.pos+=4},t.prototype.writeF64=function(t){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,t),this.pos+=8},t.prototype.writeU64=function(t){this.ensureBufferSizeToWrite(8),function(o,e,t){o.setUint32(e,t/4294967296),o.setUint32(e+4,t)}(this.view,this.pos,t),this.pos+=8},t.prototype.writeI64=function(t){this.ensureBufferSizeToWrite(8),c(this.view,this.pos,t),this.pos+=8},t}(),B={},D=function(){function t(o,a){void 0===o&&(o=16),void 0===a&&(a=16),this.maxKeyLength=o,this.maxLengthPerKey=a,this.caches=[];for(var n=0;n<this.maxKeyLength;n++)this.caches.push([])}return t.prototype.canBeCached=function(t){return 0<t&&t<=this.maxKeyLength},t.prototype.get=function(l,e,t){var r=this.caches[t-1],n=r.length;e:for(var i=0;i<n;i++){for(var c=r[i],s=c.bytes,a=0;a<t;a++)if(s[a]!==l[e+a])continue e;return c.value}return null},t.prototype.store=function(o,e){var t=this.caches[o.length-1],r={bytes:o,value:e};t.length>=this.maxLengthPerKey?t[0|Math.random()*t.length]=r:t.push(r)},t.prototype.decode=function(a,e,t){var r=this.get(a,e,t);if(r)return r;var n=w(a,e,t),s=Uint8Array.prototype.slice.call(a,e,e+t);return this.store(s,n),n},t}(),C=function(l,e,o,t){return new(o||(o=Promise))(function(r,n){function i(o){try{a(t.next(o))}catch(t){n(t)}}function s(o){try{a(t.throw(o))}catch(t){n(t)}}function a(a){var n;a.done?r(a.value):(n=a.value,n instanceof o?n:new o(function(t){t(n)})).then(i,s)}a((t=t.apply(l,e||[])).next())})},O=function(l,e){function t(t){return function(o){return function(t){if(c)throw new TypeError("Generator is already executing.");for(;a;)try{if(c=1,d&&(p=2&t[0]?d.return:t[0]?d.throw||((p=d.return)&&p.call(d),0):d.next)&&!(p=p.call(d,t[1])).done)return p;switch(d=0,p&&(t=[2&t[0],p.value]),t[0]){case 0:case 1:p=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,d=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!(p=0<(p=a.trys).length&&p[p.length-1])&&(6===t[0]||2===t[0])){a=0;continue}if(3===t[0]&&(!p||t[1]>p[0]&&t[1]<p[3])){a.label=t[1];break}if(6===t[0]&&a.label<p[1]){a.label=p[1],p=t;break}if(p&&a.label<p[2]){a.label=p[2],a.ops.push(t);break}p[2]&&a.ops.pop(),a.trys.pop();continue;}t=e.call(l,a)}catch(o){t=[6,o],d=0}finally{c=p=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,o])}}var a={label:0,sent:function(){if(1&p[0])throw p[1];return p[1]},trys:[],ops:[]},c,d,p,u;return u={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u},K=function(o){function a(e){s[e]=o[e]&&function(r){return new Promise(function(t,a){(function(o,e,a,t){Promise.resolve(t).then(function(e){o({value:e,done:a})},e)})(t,a,(r=o[e](r)).done,r.value)})}}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=o[Symbol.asyncIterator],s;return n?n.call(o):(o="function"==typeof __values?__values(o):o[Symbol.iterator](),s={},a("next"),a("throw"),a("return"),s[Symbol.asyncIterator]=function(){return this},s)},V=function(t){return this instanceof V?(this.v=t,this):new V(t)},N=function(l,e,t){function r(a){c[a]&&(o[a]=function(e){return new Promise(function(t,o){1<i.push([a,e,t,o])||s(a,e)})})}function s(o,e){try{(t=c[o](e)).value instanceof V?Promise.resolve(t.value.v).then(a,d):p(i[0][2],t)}catch(t){p(i[0][3],t)}var t}function a(t){s("next",t)}function d(t){s("throw",t)}function p(o,e){o(e),i.shift(),i.length&&s(i[0][0],i[0][1])}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c=t.apply(l,e||[]),i=[],o;return o={},r("next"),r("throw"),r("return"),o[Symbol.asyncIterator]=function(){return this},o},R=-1,H=new DataView(new ArrayBuffer(0)),G=new Uint8Array(H.buffer),X=function(){try{H.getInt8(0)}catch(t){return t.constructor}throw new Error("never reached")}(),q=new X("Insufficient data"),J=4294967295,Q=new D,Y=function(){function t(a,l,c,d,p,u,h){void 0===a&&(a=f.defaultCodec),void 0===l&&(l=J),void 0===c&&(c=J),void 0===d&&(d=J),void 0===p&&(p=J),void 0===u&&(u=J),void 0===h&&(h=Q),this.extensionCodec=a,this.maxStrLength=l,this.maxBinLength=c,this.maxArrayLength=d,this.maxMapLength=p,this.maxExtLength=u,this.cachedKeyDecoder=h,this.totalPos=0,this.pos=0,this.view=H,this.bytes=G,this.headByte=R,this.stack=[]}return t.prototype.setBuffer=function(t){this.bytes=U(t),this.view=function(o){if(o instanceof ArrayBuffer)return new DataView(o);var e=U(o);return new DataView(e.buffer,e.byteOffset,e.byteLength)}(this.bytes),this.pos=0},t.prototype.appendBuffer=function(o){if(this.headByte!==R||this.hasRemaining()){var e=this.bytes.subarray(this.pos),t=U(o),r=new Uint8Array(e.length+t.length);r.set(e),r.set(t,e.length),this.setBuffer(r)}else this.setBuffer(o)},t.prototype.hasRemaining=function(t){return void 0===t&&(t=1),this.view.byteLength-this.pos>=t},t.prototype.createNoExtraBytesError=function(o){var e=this.view,t=this.pos;return new RangeError("Extra "+(e.byteLength-t)+" byte(s) found at buffer["+o+"]")},t.prototype.decodeSingleSync=function(){var t=this.decodeSync();if(this.hasRemaining())throw this.createNoExtraBytesError(this.pos);return t},t.prototype.decodeSingleAsync=function(d){var e,g,y,m;return C(this,void 0,void 0,function(){var t,r,n,i,w,x,v,k;return O(this,function(o){switch(o.label){case 0:t=!1,o.label=1;case 1:o.trys.push([1,6,7,12]),e=K(d),o.label=2;case 2:return[4,e.next()];case 3:if((g=o.sent()).done)return[3,5];if(n=g.value,t)throw this.createNoExtraBytesError(this.totalPos);this.appendBuffer(n);try{r=this.decodeSync(),t=!0}catch(t){if(!(t instanceof X))throw t}this.totalPos+=this.pos,o.label=4;case 4:return[3,2];case 5:return[3,12];case 6:return i=o.sent(),y={error:i},[3,12];case 7:return o.trys.push([7,,10,11]),g&&!g.done&&(m=e.return)?[4,m.call(e)]:[3,9];case 8:o.sent(),o.label=9;case 9:return[3,11];case 10:if(y)throw y.error;return[7];case 11:return[7];case 12:if(t){if(this.hasRemaining())throw this.createNoExtraBytesError(this.totalPos);return[2,r]}throw x=(w=this).headByte,v=w.pos,k=w.totalPos,new RangeError("Insufficient data in parcing "+P(x)+" at "+k+" ("+v+" in the current buffer)");}})})},t.prototype.decodeArrayStream=function(t){return this.decodeMultiAsync(t,!0)},t.prototype.decodeStream=function(t){return this.decodeMultiAsync(t,!1)},t.prototype.decodeMultiAsync=function(l,e){return N(this,arguments,function(){var t,d,p,g,y,m,w,x,v;return O(this,function(o){switch(o.label){case 0:t=e,d=-1,o.label=1;case 1:o.trys.push([1,13,14,19]),p=K(l),o.label=2;case 2:return[4,V(p.next())];case 3:if((g=o.sent()).done)return[3,12];if(y=g.value,e&&0===d)throw this.createNoExtraBytesError(this.totalPos);this.appendBuffer(y),t&&(d=this.readArraySize(),t=!1,this.complete()),o.label=4;case 4:o.trys.push([4,9,,10]),o.label=5;case 5:return[4,V(this.decodeSync())];case 6:return[4,o.sent()];case 7:return o.sent(),0==--d?[3,8]:[3,5];case 8:return[3,10];case 9:if(!((m=o.sent())instanceof X))throw m;return[3,10];case 10:this.totalPos+=this.pos,o.label=11;case 11:return[3,2];case 12:return[3,19];case 13:return w=o.sent(),x={error:w},[3,19];case 14:return o.trys.push([14,,17,18]),g&&!g.done&&(v=p.return)?[4,V(v.call(p))]:[3,16];case 15:o.sent(),o.label=16;case 16:return[3,18];case 17:if(x)throw x.error;return[7];case 18:return[7];case 19:return[2];}})})},t.prototype.decodeSync=function(){e:for(;;){var a=this.readHeadByte(),e=void 0;if(224<=a)e=a-256;else if(192>a){if(128>a)e=a;else if(144>a){if(0!=(c=a-128)){this.pushMapState(c),this.complete();continue e}e={}}else if(160>a){if(0!=(c=a-144)){this.pushArrayState(c),this.complete();continue e}e=[]}else{var l=a-160;e=this.decodeUtf8String(l,0)}}else if(192===a)e=null;else if(194===a)e=!1;else if(195===a)e=!0;else if(202===a)e=this.readF32();else if(203===a)e=this.readF64();else if(204===a)e=this.readU8();else if(205===a)e=this.readU16();else if(206===a)e=this.readU32();else if(207===a)e=this.readU64();else if(208===a)e=this.readI8();else if(209===a)e=this.readI16();else if(210===a)e=this.readI32();else if(211===a)e=this.readI64();else if(217===a)l=this.lookU8(),e=this.decodeUtf8String(l,1);else if(218===a)l=this.lookU16(),e=this.decodeUtf8String(l,2);else if(219===a)l=this.lookU32(),e=this.decodeUtf8String(l,4);else if(220===a){if(0!==(c=this.readU16())){this.pushArrayState(c),this.complete();continue e}e=[]}else if(221===a){if(0!==(c=this.readU32())){this.pushArrayState(c),this.complete();continue e}e=[]}else if(222===a){if(0!==(c=this.readU16())){this.pushMapState(c),this.complete();continue e}e={}}else if(223===a){if(0!==(c=this.readU32())){this.pushMapState(c),this.complete();continue e}e={}}else if(196===a){var c=this.lookU8();e=this.decodeBinary(c,1)}else if(197===a)c=this.lookU16(),e=this.decodeBinary(c,2);else if(198===a)c=this.lookU32(),e=this.decodeBinary(c,4);else if(212===a)e=this.decodeExtension(1,0);else if(213===a)e=this.decodeExtension(2,0);else if(214===a)e=this.decodeExtension(4,0);else if(215===a)e=this.decodeExtension(8,0);else if(216===a)e=this.decodeExtension(16,0);else if(199===a)c=this.lookU8(),e=this.decodeExtension(c,1);else if(200===a)c=this.lookU16(),e=this.decodeExtension(c,2);else{if(201!==a)throw new Error("Unrecognized type byte: "+P(a));c=this.lookU32(),e=this.decodeExtension(c,4)}this.complete();for(var d=this.stack,i;0<d.length;)if(i=d[d.length-1],0===i.type){if(i.array[i.position]=e,i.position++,i.position!==i.size)continue e;d.pop(),e=i.array}else{if(1===i.type){if(p=void 0,"string"!=(p=typeof e)&&"number"!==p)throw new Error("The type of key must be string or number but "+typeof e);i.key=e,i.type=2;continue e}if(2===i.type){if(i.map[i.key]=e,i.readCount++,i.readCount!==i.size){i.key=null,i.type=1;continue e}d.pop(),e=i.map}}return e}var p},t.prototype.readHeadByte=function(){return this.headByte===R&&(this.headByte=this.readU8()),this.headByte},t.prototype.complete=function(){this.headByte=R},t.prototype.readArraySize=function(){var t=this.readHeadByte();switch(t){case 220:return this.readU16();case 221:return this.readU32();default:if(160>t)return t-144;throw new Error("Unrecognized array type byte: "+P(t));}},t.prototype.pushMapState=function(t){if(t>this.maxMapLength)throw new Error("Max length exceeded: map length ("+t+") > maxMapLengthLength ("+this.maxMapLength+")");this.stack.push({type:1,size:t,key:null,readCount:0,map:{}})},t.prototype.pushArrayState=function(t){if(t>this.maxArrayLength)throw new Error("Max length exceeded: array length ("+t+") > maxArrayLength ("+this.maxArrayLength+")");this.stack.push({type:0,size:t,array:Array(t),position:0})},t.prototype.decodeUtf8String=function(o,e){if(o>this.maxStrLength)throw new Error("Max length exceeded: UTF-8 byte length ("+o+") > maxStrLength ("+this.maxStrLength+")");if(this.bytes.byteLength<this.pos+e+o)throw q;var t=this.pos+e,a;return a=this.cachedKeyDecoder&&this.stateIsMapKey()&&this.cachedKeyDecoder.canBeCached(o)?this.cachedKeyDecoder.decode(this.bytes,t,o):le&&200<o?function(o,e,t){var r=o.subarray(e,e+t);return i.decode(r)}(this.bytes,t,o):w(this.bytes,t,o),this.pos+=e+o,a},t.prototype.stateIsMapKey=function(){return 0<this.stack.length&&1===this.stack[this.stack.length-1].type},t.prototype.decodeBinary=function(o,e){if(o>this.maxBinLength)throw new Error("Max length exceeded: bin length ("+o+") > maxBinLength ("+this.maxBinLength+")");if(!this.hasRemaining(o+e))throw q;var t=this.pos+e,r=this.bytes.subarray(t,t+o);return this.pos+=e+o,r},t.prototype.decodeExtension=function(o,e){if(o>this.maxExtLength)throw new Error("Max length exceeded: ext length ("+o+") > maxExtLength ("+this.maxExtLength+")");var t=this.view.getInt8(this.pos+e),r=this.decodeBinary(o,e+1);return this.extensionCodec.decode(r,t)},t.prototype.lookU8=function(){return this.view.getUint8(this.pos)},t.prototype.lookU16=function(){return this.view.getUint16(this.pos)},t.prototype.lookU32=function(){return this.view.getUint32(this.pos)},t.prototype.readU8=function(){var t=this.view.getUint8(this.pos);return this.pos++,t},t.prototype.readI8=function(){var t=this.view.getInt8(this.pos);return this.pos++,t},t.prototype.readU16=function(){var t=this.view.getUint16(this.pos);return this.pos+=2,t},t.prototype.readI16=function(){var t=this.view.getInt16(this.pos);return this.pos+=2,t},t.prototype.readU32=function(){var t=this.view.getUint32(this.pos);return this.pos+=4,t},t.prototype.readI32=function(){var t=this.view.getInt32(this.pos);return this.pos+=4,t},t.prototype.readU64=function(){var o=(r=this.view,a=this.pos,4294967296*r.getUint32(a)+r.getUint32(a+4)),r,a;return this.pos+=8,o},t.prototype.readI64=function(){var t=p(this.view,this.pos);return this.pos+=8,t},t.prototype.readF32=function(){var t=this.view.getFloat32(this.pos);return this.pos+=4,t},t.prototype.readF64=function(){var t=this.view.getFloat64(this.pos);return this.pos+=8,t},t}(),Z={},$=function(l,e){function t(t){return function(o){return function(t){if(c)throw new TypeError("Generator is already executing.");for(;a;)try{if(c=1,d&&(p=2&t[0]?d.return:t[0]?d.throw||((p=d.return)&&p.call(d),0):d.next)&&!(p=p.call(d,t[1])).done)return p;switch(d=0,p&&(t=[2&t[0],p.value]),t[0]){case 0:case 1:p=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,d=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!(p=0<(p=a.trys).length&&p[p.length-1])&&(6===t[0]||2===t[0])){a=0;continue}if(3===t[0]&&(!p||t[1]>p[0]&&t[1]<p[3])){a.label=t[1];break}if(6===t[0]&&a.label<p[1]){a.label=p[1],p=t;break}if(p&&a.label<p[2]){a.label=p[2],a.ops.push(t);break}p[2]&&a.ops.pop(),a.trys.pop();continue;}t=e.call(l,a)}catch(o){t=[6,o],d=0}finally{c=p=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,o])}}var a={label:0,sent:function(){if(1&p[0])throw p[1];return p[1]},trys:[],ops:[]},c,d,p,u;return u={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u},te=function(t){return this instanceof te?(this.v=t,this):new te(t)},re=function(l,e,t){function r(a){c[a]&&(o[a]=function(e){return new Promise(function(t,o){1<i.push([a,e,t,o])||s(a,e)})})}function s(o,e){try{(t=c[o](e)).value instanceof te?Promise.resolve(t.value.v).then(a,d):p(i[0][2],t)}catch(t){p(i[0][3],t)}var t}function a(t){s("next",t)}function d(t){s("throw",t)}function p(o,e){o(e),i.shift(),i.length&&s(i[0][0],i[0][1])}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c=t.apply(l,e||[]),i=[],o;return o={},r("next"),r("throw"),r("return"),o[Symbol.asyncIterator]=function(){return this},o},ne=function(l,e,o,t){return new(o||(o=Promise))(function(r,n){function i(o){try{a(t.next(o))}catch(t){n(t)}}function s(o){try{a(t.throw(o))}catch(t){n(t)}}function a(a){var n;a.done?r(a.value):(n=a.value,n instanceof o?n:new o(function(t){t(n)})).then(i,s)}a((t=t.apply(l,e||[])).next())})},oe=function(l,e){function t(t){return function(o){return function(t){if(c)throw new TypeError("Generator is already executing.");for(;a;)try{if(c=1,d&&(p=2&t[0]?d.return:t[0]?d.throw||((p=d.return)&&p.call(d),0):d.next)&&!(p=p.call(d,t[1])).done)return p;switch(d=0,p&&(t=[2&t[0],p.value]),t[0]){case 0:case 1:p=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,d=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!(p=0<(p=a.trys).length&&p[p.length-1])&&(6===t[0]||2===t[0])){a=0;continue}if(3===t[0]&&(!p||t[1]>p[0]&&t[1]<p[3])){a.label=t[1];break}if(6===t[0]&&a.label<p[1]){a.label=p[1],p=t;break}if(p&&a.label<p[2]){a.label=p[2],a.ops.push(t);break}p[2]&&a.ops.pop(),a.trys.pop();continue;}t=e.call(l,a)}catch(o){t=[6,o],d=0}finally{c=p=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,o])}}var a={label:0,sent:function(){if(1&p[0])throw p[1];return p[1]},trys:[],ops:[]},c,d,p,u;return u={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u};t.d(e,"encode",function(){return I}),t.d(e,"decode",function(){return j}),t.d(e,"decodeAsync",function(){return F}),t.d(e,"decodeArrayStream",function(){return W}),t.d(e,"decodeStream",function(){return ee}),t.d(e,"Decoder",function(){return Y}),t.d(e,"Encoder",function(){return k}),t.d(e,"ExtensionCodec",function(){return f}),t.d(e,"ExtData",function(){return h}),t.d(e,"EXT_TIMESTAMP",function(){return-1}),t.d(e,"encodeDateToTimeSpec",function(){return v}),t.d(e,"encodeTimeSpecToTimestamp",function(){return T}),t.d(e,"decodeTimestampToTimeSpec",function(){return z}),t.d(e,"encodeTimestampExtension",function(){return g}),t.d(e,"decodeTimestampExtension",function(){return m}),t.d(e,"__WASM_AVAILABLE",function(){return S})}])})},{}],2:[function(e,t,r){(function(r){'use strict';function a(e,t){if(e===t)return 0;for(var r=e.length,a=t.length,n=0,s=o(r,a);n<s;++n)if(e[n]!==t[n]){r=e[n],a=t[n];break}return r<a?-1:a<r?1:0}function n(e){return r.Buffer&&"function"==typeof r.Buffer.isBuffer?r.Buffer.isBuffer(e):!!(null!=e&&e._isBuffer)}function s(e){return Object.prototype.toString.call(e)}function i(e){return!n(e)&&!("function"!=typeof r.ArrayBuffer)&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(!!(e instanceof DataView)||!!(e.buffer&&e.buffer instanceof ArrayBuffer)))}function l(e){if(S.isFunction(e)){if(U)return e.name;var t=e.toString(),o=t.match(I);return o&&o[1]}}function c(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function d(e){if(U||!S.isFunction(e))return S.inspect(e);var t=l(e),o=t?": "+t:"";return"[Function"+o+"]"}function p(e){return c(d(e.actual),128)+" "+e.operator+" "+c(d(e.expected),128)}function u(e,t,o,r,a){throw new B.AssertionError({message:o,actual:e,expected:t,operator:r,stackStartFunction:a})}function h(e,t){e||u(e,!0,t,"==",B.ok)}function g(e,t,o,r){if(e===t)return!0;if(n(e)&&n(t))return 0===a(e,t);if(S.isDate(e)&&S.isDate(t))return e.getTime()===t.getTime();if(S.isRegExp(e)&&S.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if((null===e||"object"!=typeof e)&&(null===t||"object"!=typeof t))return o?e===t:e==t;if(i(e)&&i(t)&&s(e)===s(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===a(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(n(e)!==n(t))return!1;r=r||{actual:[],expected:[]};var l=r.actual.indexOf(e);return-1!==l&&l===r.expected.indexOf(t)||(r.actual.push(e),r.expected.push(t),y(e,t,o,r))}function f(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function y(e,t,o,r){if(null===e||e===void 0||null===t||t===void 0)return!1;if(S.isPrimitive(e)||S.isPrimitive(t))return e===t;if(o&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var n=f(e),s=f(t);if(n&&!s||!n&&s)return!1;if(n)return e=E.call(e),t=E.call(t),g(e,t,o);var l=R(e),c=R(t),d,p;if(l.length!==c.length)return!1;for(l.sort(),c.sort(),p=l.length-1;0<=p;p--)if(l[p]!==c[p])return!1;for(p=l.length-1;0<=p;p--)if(d=l[p],!g(e[d],t[d],o,r))return!1;return!0}function m(e,t,o){g(e,t,!0)&&u(e,t,o,"notDeepStrictEqual",m)}function w(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(t){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function x(e){var t;try{e()}catch(o){t=o}return t}function v(e,t,o,r){var a;if("function"!=typeof t)throw new TypeError("\"block\" argument must be a function");"string"==typeof o&&(r=o,o=null),a=x(t),r=(o&&o.name?" ("+o.name+").":".")+(r?" "+r:"."),e&&!a&&u(a,o,"Missing expected exception"+r);var n="string"==typeof r,s=!e&&S.isError(a),i=!e&&a&&!o;if((s&&n&&w(a,o)||i)&&u(a,o,"Got unwanted exception"+r),e&&a&&o&&!w(a,o)||!e&&a)throw a}function k(e,t){e||u(e,!0,t,"==",k)}var A=e("object-assign"),S=e("util/"),T=Object.prototype.hasOwnProperty,E=Array.prototype.slice,U=function(){return"foo"===function(){}.name}(),B=t.exports=h,I=/\s*function\s+([^\(\s]*)\s*/;B.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=p(this),this.generatedMessage=!0);var t=e.stackStartFunction||u;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var o=new Error;if(o.stack){var r=o.stack,a=l(t),n=r.indexOf("\n"+a);if(0<=n){var s=r.indexOf("\n",n+1);r=r.substring(s+1)}this.stack=r}}},S.inherits(B.AssertionError,Error),B.fail=u,B.ok=h,B.equal=function(e,t,o){e!=t&&u(e,t,o,"==",B.equal)},B.notEqual=function(e,t,o){e==t&&u(e,t,o,"!=",B.notEqual)},B.deepEqual=function(e,t,o){g(e,t,!1)||u(e,t,o,"deepEqual",B.deepEqual)},B.deepStrictEqual=function(e,t,o){g(e,t,!0)||u(e,t,o,"deepStrictEqual",B.deepStrictEqual)},B.notDeepEqual=function(e,t,o){g(e,t,!1)&&u(e,t,o,"notDeepEqual",B.notDeepEqual)},B.notDeepStrictEqual=m,B.strictEqual=function(e,t,o){e!==t&&u(e,t,o,"===",B.strictEqual)},B.notStrictEqual=function(e,t,o){e===t&&u(e,t,o,"!==",B.notStrictEqual)},B.throws=function(e,t,o){v(!0,e,t,o)},B.doesNotThrow=function(e,t,o){v(!1,e,t,o)},B.ifError=function(e){if(e)throw e},B.strict=A(k,B,{equal:B.strictEqual,deepEqual:B.deepStrictEqual,notEqual:B.notStrictEqual,notDeepEqual:B.notDeepStrictEqual}),B.strict.strict=B.strict;var R=Object.keys||function(e){var t=[];for(var o in e)T.call(e,o)&&t.push(o);return t}}).call(this,"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global)},{"object-assign":13,"util/":5}],3:[function(e,t,o){t.exports="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var o=function(){};o.prototype=t.prototype,e.prototype=new o,e.prototype.constructor=e}},{}],4:[function(e,t,o){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],5:[function(e,t,o){(function(t,r){function a(e,t){var r={seen:[],stylize:s};return 3<=arguments.length&&(r.depth=arguments[2]),4<=arguments.length&&(r.colors=arguments[3]),f(t)?r.showHidden=t:t&&o._extend(r,t),x(r.showHidden)&&(r.showHidden=!1),x(r.depth)&&(r.depth=2),x(r.colors)&&(r.colors=!1),x(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=n),l(r,e,r.depth)}function n(e,t){var o=a.styles[t];return o?"\x1B["+a.colors[o][0]+"m"+e+"\x1B["+a.colors[o][1]+"m":e}function s(e,t){return e}function i(e){var t={};return e.forEach(function(e,o){t[e]=!0}),t}function l(e,t,r){if(e.customInspect&&t&&T(t.inspect)&&t.inspect!==o.inspect&&!(t.constructor&&t.constructor.prototype===t)){var a=t.inspect(r,e);return w(a)||(a=l(e,a,r)),a}var s=c(e,t);if(s)return s;var f=Object.keys(t),y=i(f);if(e.showHidden&&(f=Object.getOwnPropertyNames(t)),S(t)&&(0<=f.indexOf("message")||0<=f.indexOf("description")))return d(t);if(0===f.length){if(T(t)){var m=t.name?": "+t.name:"";return e.stylize("[Function"+m+"]","special")}if(v(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(A(t))return e.stylize(Date.prototype.toString.call(t),"date");if(S(t))return d(t)}var x="",k=!1,E=["{","}"];if(g(t)&&(k=!0,E=["[","]"]),T(t)){var U=t.name?": "+t.name:"";x=" [Function"+U+"]"}if(v(t)&&(x=" "+RegExp.prototype.toString.call(t)),A(t)&&(x=" "+Date.prototype.toUTCString.call(t)),S(t)&&(x=" "+d(t)),0===f.length&&(!k||0==t.length))return E[0]+x+E[1];if(0>r)return v(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var n;return n=k?p(e,t,r,y,f):f.map(function(o){return u(e,t,r,y,o,k)}),e.seen.pop(),h(n,x,E)}function c(e,t){if(x(t))return e.stylize("undefined","undefined");if(w(t)){var o="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,"\"")+"'";return e.stylize(o,"string")}return m(t)?e.stylize(""+t,"number"):f(t)?e.stylize(""+t,"boolean"):y(t)?e.stylize("null","null"):void 0}function d(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,o,r,a){for(var n=[],s=0,c=t.length;s<c;++s)I(t,s+"")?n.push(u(e,t,o,r,s+"",!0)):n.push("");return a.forEach(function(a){a.match(/^\d+$/)||n.push(u(e,t,o,r,a,!0))}),n}function u(e,t,o,r,a,n){var s,i,c;if(c=Object.getOwnPropertyDescriptor(t,a)||{value:t[a]},c.get?c.set?i=e.stylize("[Getter/Setter]","special"):i=e.stylize("[Getter]","special"):c.set&&(i=e.stylize("[Setter]","special")),I(r,a)||(s="["+a+"]"),i||(0>e.seen.indexOf(c.value)?(i=y(o)?l(e,c.value,null):l(e,c.value,o-1),-1<i.indexOf("\n")&&(n?i=i.split("\n").map(function(e){return" "+e}).join("\n").substr(2):i="\n"+i.split("\n").map(function(e){return" "+e}).join("\n"))):i=e.stylize("[Circular]","special")),x(s)){if(n&&a.match(/^\d+$/))return i;s=JSON.stringify(""+a),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,"\"").replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+i}function h(e,t,o){var r=0,a=e.reduce(function(e,t){return r++,0<=t.indexOf("\n")&&r++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return 60<a?o[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+o[1]:o[0]+t+" "+e.join(", ")+" "+o[1]}function g(e){return Array.isArray(e)}function f(e){return"boolean"==typeof e}function y(e){return null===e}function m(e){return"number"==typeof e}function w(e){return"string"==typeof e}function x(e){return void 0===e}function v(e){return k(e)&&"[object RegExp]"===E(e)}function k(e){return"object"==typeof e&&null!==e}function A(e){return k(e)&&"[object Date]"===E(e)}function S(t){return k(t)&&("[object Error]"===E(t)||t instanceof Error)}function T(e){return"function"==typeof e}function E(e){return Object.prototype.toString.call(e)}function U(e){return 10>e?"0"+e.toString(10):e.toString(10)}function B(){var e=new Date,t=[U(e.getHours()),U(e.getMinutes()),U(e.getSeconds())].join(":");return[e.getDate(),C[e.getMonth()],t].join(" ")}function I(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var R=/%[sdj%]/g;o.format=function(e){if(!w(e)){for(var t=[],o=0;o<arguments.length;o++)t.push(a(arguments[o]));return t.join(" ")}for(var o=1,r=arguments,n=r.length,s=(e+"").replace(R,function(e){if("%%"===e)return"%";if(o>=n)return e;switch(e){case"%s":return r[o++]+"";case"%d":return+r[o++];case"%j":try{return JSON.stringify(r[o++])}catch(e){return"[Circular]"}default:return e;}}),l=r[o];o<n;l=r[++o])s+=y(l)||!k(l)?" "+l:" "+a(l);return s},o.deprecate=function(e,a){function n(){if(!s){if(t.throwDeprecation)throw new Error(a);else t.traceDeprecation?console.trace(a):console.error(a);s=!0}return e.apply(this,arguments)}if(x(r.process))return function(){return o.deprecate(e,a).apply(this,arguments)};if(!0===t.noDeprecation)return e;var s=!1;return n};var z={},D;o.debuglog=function(e){if(x(D)&&(D=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!z[e])if(new RegExp("\\b"+e+"\\b","i").test(D)){var r=t.pid;z[e]=function(){var t=o.format.apply(o,arguments);console.error("%s %d: %s",e,r,t)}}else z[e]=function(){};return z[e]},o.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},o.isArray=g,o.isBoolean=f,o.isNull=y,o.isNullOrUndefined=function(e){return null==e},o.isNumber=m,o.isString=w,o.isSymbol=function(e){return"symbol"==typeof e},o.isUndefined=x,o.isRegExp=v,o.isObject=k,o.isDate=A,o.isError=S,o.isFunction=T,o.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e},o.isBuffer=e("./support/isBuffer");var C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];o.log=function(){console.log("%s - %s",B(),o.format.apply(o,arguments))},o.inherits=e("inherits"),o._extend=function(e,t){if(!t||!k(t))return e;for(var o=Object.keys(t),r=o.length;r--;)e[o[r]]=t[o[r]];return e}}).call(this,e("_process"),"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global)},{"./support/isBuffer":4,_process:14,inherits:3}],6:[function(e,t,o){'use strict';function r(e){var t=e.length;if(0<t%4)throw new Error("Invalid string. Length must be a multiple of 4");var o=e.indexOf("=");-1===o&&(o=t);var r=o===t?0:4-o%4;return[o,r]}function a(e,t,o){return 3*(t+o)/4-o}function n(e){for(var t=r(e),o=t[0],n=t[1],s=new u(a(e,o,n)),l=0,c=0<n?o-4:o,d=0,h;d<c;d+=4)h=p[e.charCodeAt(d)]<<18|p[e.charCodeAt(d+1)]<<12|p[e.charCodeAt(d+2)]<<6|p[e.charCodeAt(d+3)],s[l++]=255&h>>16,s[l++]=255&h>>8,s[l++]=255&h;return 2===n&&(h=p[e.charCodeAt(d)]<<2|p[e.charCodeAt(d+1)]>>4,s[l++]=255&h),1===n&&(h=p[e.charCodeAt(d)]<<10|p[e.charCodeAt(d+1)]<<4|p[e.charCodeAt(d+2)]>>2,s[l++]=255&h>>8,s[l++]=255&h),s}function s(e){return d[63&e>>18]+d[63&e>>12]+d[63&e>>6]+d[63&e]}function l(e,t,o){for(var r=[],a=t,n;a<o;a+=3)n=(16711680&e[a]<<16)+(65280&e[a+1]<<8)+(255&e[a+2]),r.push(s(n));return r.join("")}function c(e){for(var t=e.length,o=t%3,r=[],a=16383,n=0,s=t-o,c;n<s;n+=a)r.push(l(e,n,n+a>s?s:n+a));return 1===o?(c=e[t-1],r.push(d[c>>2]+d[63&c<<4]+"==")):2===o&&(c=(e[t-2]<<8)+e[t-1],r.push(d[c>>10]+d[63&c>>4]+d[63&c<<2]+"=")),r.join("")}o.byteLength=function(e){var t=r(e),o=t[0],a=t[1];return 3*(o+a)/4-a},o.toByteArray=n,o.fromByteArray=c;for(var d=[],p=[],u="undefined"==typeof Uint8Array?Array:Uint8Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",g=0,f=h.length;g<f;++g)d[g]=h[g],p[h.charCodeAt(g)]=g;p[45]=62,p[95]=63},{}],7:[function(e,t,o){},{}],8:[function(e,r,a){(function(r){'use strict';function n(e){if(2147483647<e)throw new RangeError("The value \""+e+"\" is invalid for option \"size\"");var t=new Uint8Array(e);return Object.setPrototypeOf(t,r.prototype),t}function r(e,t,o){if("number"==typeof e){if("string"==typeof t)throw new TypeError("The \"string\" argument must be of type string. Received type number");return c(e)}return s(e,t,o)}function s(e,t,o){if("string"==typeof e)return p(e,t);if(ArrayBuffer.isView(e))return u(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Y(e,ArrayBuffer)||e&&Y(e.buffer,ArrayBuffer))return h(e,t,o);if("number"==typeof e)throw new TypeError("The \"value\" argument must not be of type number. Received type number");var a=e.valueOf&&e.valueOf();if(null!=a&&a!==e)return r.from(a,t,o);var n=g(e);if(n)return n;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return r.from(e[Symbol.toPrimitive]("string"),t,o);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function i(e){if("number"!=typeof e)throw new TypeError("\"size\" argument must be of type number");else if(0>e)throw new RangeError("The value \""+e+"\" is invalid for option \"size\"")}function l(e,t,o){return i(e),0>=e?n(e):void 0===t?n(e):"string"==typeof o?n(e).fill(t,o):n(e).fill(t)}function c(e){return i(e),n(0>e?0:0|f(e))}function p(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!r.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var o=0|m(e,t),a=n(o),s=a.write(e,t);return s!==o&&(a=a.slice(0,s)),a}function u(e){for(var t=0>e.length?0:0|f(e.length),o=n(t),r=0;r<t;r+=1)o[r]=255&e[r];return o}function h(e,t,o){if(0>t||e.byteLength<t)throw new RangeError("\"offset\" is outside of buffer bounds");if(e.byteLength<t+(o||0))throw new RangeError("\"length\" is outside of buffer bounds");var a;return a=void 0===t&&void 0===o?new Uint8Array(e):void 0===o?new Uint8Array(e,t):new Uint8Array(e,t,o),Object.setPrototypeOf(a,r.prototype),a}function g(e){if(r.isBuffer(e)){var t=0|f(e.length),o=n(t);return 0===o.length?o:(e.copy(o,0,0,t),o)}return void 0===e.length?"Buffer"===e.type&&Array.isArray(e.data)?u(e.data):void 0:"number"!=typeof e.length||X(e.length)?n(0):u(e)}function f(e){if(e>=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647 .toString(16)+" bytes");return 0|e}function y(e){return+e!=e&&(e=0),r.alloc(+e)}function m(e,t){if(r.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Y(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError("The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type "+typeof e);var o=e.length,a=2<arguments.length&&!0===arguments[2];if(!a&&0===o)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return o;case"utf8":case"utf-8":return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*o;case"hex":return o>>>1;case"base64":return V(e).length;default:if(n)return a?-1:G(e).length;t=(""+t).toLowerCase(),n=!0;}}function w(e,t,o){var r=!1;if((void 0===t||0>t)&&(t=0),t>this.length)return"";if((void 0===o||o>this.length)&&(o=this.length),0>=o)return"";if(o>>>=0,t>>>=0,o<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return L(this,t,o);case"utf8":case"utf-8":return R(this,t,o);case"ascii":return D(this,t,o);case"latin1":case"binary":return C(this,t,o);case"base64":return I(this,t,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,o);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0;}}function x(e,t,o){var r=e[t];e[t]=e[o],e[o]=r}function v(e,t,o,a,n){if(0===e.length)return-1;if("string"==typeof o?(a=o,o=0):2147483647<o?o=2147483647:-2147483648>o&&(o=-2147483648),o=+o,X(o)&&(o=n?0:e.length-1),0>o&&(o=e.length+o),o>=e.length){if(n)return-1;o=e.length-1}else if(0>o)if(n)o=0;else return-1;if("string"==typeof t&&(t=r.from(t,a)),r.isBuffer(t))return 0===t.length?-1:k(e,t,o,a,n);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,o):Uint8Array.prototype.lastIndexOf.call(e,t,o):k(e,[t],o,a,n);throw new TypeError("val must be string, number or Buffer")}function k(e,t,o,r,a){function n(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}var s=1,l=e.length,c=t.length;if(void 0!==r&&(r=(r+"").toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(2>e.length||2>t.length)return-1;s=2,l/=2,c/=2,o/=2}var d;if(a){var p=-1;for(d=o;d<l;d++)if(n(e,d)!==n(t,-1===p?0:d-p))-1!==p&&(d-=d-p),p=-1;else if(-1===p&&(p=d),d-p+1===c)return p*s}else for(o+c>l&&(o=l-c),d=o;0<=d;d--){for(var u=!0,h=0;h<c;h++)if(n(e,d+h)!==n(t,h)){u=!1;break}if(u)return d}return-1}function A(e,t,o,r){o=+o||0;var a=e.length-o;r?(r=+r,r>a&&(r=a)):r=a;var n=t.length;r>n/2&&(r=n/2);for(var s=0,l;s<r;++s){if(l=parseInt(t.substr(2*s,2),16),X(l))return s;e[o+s]=l}return s}function S(e,t,o,r){return W(G(t,e.length-o),e,o,r)}function T(e,t,o,r){return W(q(t),e,o,r)}function E(e,t,o,r){return T(e,t,o,r)}function U(e,t,o,r){return W(V(t),e,o,r)}function B(e,t,o,r){return W(F(t,e.length-o),e,o,r)}function I(e,t,o){return 0===t&&o===e.length?J.fromByteArray(e):J.fromByteArray(e.slice(t,o))}function R(e,t,r){r=o(e.length,r);for(var a=[],n=t;n<r;){var s=e[n],l=null,c=239<s?4:223<s?3:191<s?2:1;if(n+c<=r){var d,p,u,h;1===c?128>s&&(l=s):2===c?(d=e[n+1],128==(192&d)&&(h=(31&s)<<6|63&d,127<h&&(l=h))):3===c?(d=e[n+1],p=e[n+2],128==(192&d)&&128==(192&p)&&(h=(15&s)<<12|(63&d)<<6|63&p,2047<h&&(55296>h||57343<h)&&(l=h))):4===c?(d=e[n+1],p=e[n+2],u=e[n+3],128==(192&d)&&128==(192&p)&&128==(192&u)&&(h=(15&s)<<18|(63&d)<<12|(63&p)<<6|63&u,65535<h&&1114112>h&&(l=h))):void 0}null===l?(l=65533,c=1):65535<l&&(l-=65536,a.push(55296|1023&l>>>10),l=56320|1023&l),a.push(l),n+=c}return z(a)}function z(e){var t=e.length;if(t<=4096)return d.apply(String,e);for(var o="",r=0;r<t;)o+=d.apply(String,e.slice(r,r+=4096));return o}function D(e,t,r){var a="";r=o(e.length,r);for(var n=t;n<r;++n)a+=d(127&e[n]);return a}function C(e,t,r){var a="";r=o(e.length,r);for(var n=t;n<r;++n)a+=d(e[n]);return a}function L(e,t,o){var r=e.length;(!t||0>t)&&(t=0),(!o||0>o||o>r)&&(o=r);for(var a="",n=t;n<o;++n)a+=ee[e[n]];return a}function O(e,t,o){for(var r=e.slice(t,o),a="",n=0;n<r.length;n+=2)a+=d(r[n]+256*r[n+1]);return a}function N(e,t,o){if(0!=e%1||0>e)throw new RangeError("offset is not uint");if(e+t>o)throw new RangeError("Trying to access beyond buffer length")}function P(e,t,o,a,n,s){if(!r.isBuffer(e))throw new TypeError("\"buffer\" argument must be a Buffer instance");if(t>n||t<s)throw new RangeError("\"value\" argument is out of bounds");if(o+a>e.length)throw new RangeError("Index out of range")}function j(e,t,o,r,a,n){if(o+r>e.length)throw new RangeError("Index out of range");if(0>o)throw new RangeError("Index out of range")}function M(e,t,o,r,a){return t=+t,o>>>=0,a||j(e,t,o,4,34028234663852886e22,-34028234663852886e22),Q.write(e,t,o,r,23,4),o+4}function K(e,t,o,r,a){return t=+t,o>>>=0,a||j(e,t,o,8,17976931348623157e292,-17976931348623157e292),Q.write(e,t,o,r,52,8),o+8}function H(e){if(e=e.split("=")[0],e=e.trim().replace($,""),2>e.length)return"";for(;0!=e.length%4;)e+="=";return e}function G(e,t){t=t||1/0;for(var o=e.length,r=null,a=[],n=0,s;n<o;++n){if(s=e.charCodeAt(n),55295<s&&57344>s){if(!r){if(56319<s){-1<(t-=3)&&a.push(239,191,189);continue}else if(n+1===o){-1<(t-=3)&&a.push(239,191,189);continue}r=s;continue}if(56320>s){-1<(t-=3)&&a.push(239,191,189),r=s;continue}s=(r-55296<<10|s-56320)+65536}else r&&-1<(t-=3)&&a.push(239,191,189);if(r=null,128>s){if(0>(t-=1))break;a.push(s)}else if(2048>s){if(0>(t-=2))break;a.push(192|s>>6,128|63&s)}else if(65536>s){if(0>(t-=3))break;a.push(224|s>>12,128|63&s>>6,128|63&s)}else if(1114112>s){if(0>(t-=4))break;a.push(240|s>>18,128|63&s>>12,128|63&s>>6,128|63&s)}else throw new Error("Invalid code point")}return a}function q(e){for(var t=[],o=0;o<e.length;++o)t.push(255&e.charCodeAt(o));return t}function F(e,t){for(var o=[],r=0,a,n,s;r<e.length&&!(0>(t-=2));++r)a=e.charCodeAt(r),n=a>>8,s=a%256,o.push(s),o.push(n);return o}function V(e){return J.toByteArray(H(e))}function W(e,t,o,r){for(var a=0;a<r&&!(a+o>=t.length||a>=e.length);++a)t[a+o]=e[a];return a}function Y(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function X(e){return e!==e}var J=e("base64-js"),Q=e("ieee754"),Z="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;a.Buffer=r,a.SlowBuffer=y,a.INSPECT_MAX_BYTES=50;a.kMaxLength=2147483647,r.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(t){return!1}}(),r.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(r.prototype,"parent",{enumerable:!0,get:function(){return r.isBuffer(this)?this.buffer:void 0}}),Object.defineProperty(r.prototype,"offset",{enumerable:!0,get:function(){return r.isBuffer(this)?this.byteOffset:void 0}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&r[Symbol.species]===r&&Object.defineProperty(r,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),r.poolSize=8192,r.from=function(e,t,o){return s(e,t,o)},Object.setPrototypeOf(r.prototype,Uint8Array.prototype),Object.setPrototypeOf(r,Uint8Array),r.alloc=function(e,t,o){return l(e,t,o)},r.allocUnsafe=function(e){return c(e)},r.allocUnsafeSlow=function(e){return c(e)},r.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==r.prototype},r.compare=function(e,t){if(Y(e,Uint8Array)&&(e=r.from(e,e.offset,e.byteLength)),Y(t,Uint8Array)&&(t=r.from(t,t.offset,t.byteLength)),!r.isBuffer(e)||!r.isBuffer(t))throw new TypeError("The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array");if(e===t)return 0;for(var n=e.length,s=t.length,l=0,c=o(n,s);l<c;++l)if(e[l]!==t[l]){n=e[l],s=t[l];break}return n<s?-1:s<n?1:0},r.isEncoding=function(e){switch((e+"").toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1;}},r.concat=function(e,t){if(!Array.isArray(e))throw new TypeError("\"list\" argument must be an Array of Buffers");if(0===e.length)return r.alloc(0);var o;if(t===void 0)for(t=0,o=0;o<e.length;++o)t+=e[o].length;var a=r.allocUnsafe(t),n=0;for(o=0;o<e.length;++o){var s=e[o];if(Y(s,Uint8Array)&&(s=r.from(s)),!r.isBuffer(s))throw new TypeError("\"list\" argument must be an Array of Buffers");s.copy(a,n),n+=s.length}return a},r.byteLength=m,r.prototype._isBuffer=!0,r.prototype.swap16=function(){var e=this.length;if(0!=e%2)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)x(this,t,t+1);return this},r.prototype.swap32=function(){var e=this.length;if(0!=e%4)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)x(this,t,t+3),x(this,t+1,t+2);return this},r.prototype.swap64=function(){var e=this.length;if(0!=e%8)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)x(this,t,t+7),x(this,t+1,t+6),x(this,t+2,t+5),x(this,t+3,t+4);return this},r.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?R(this,0,e):w.apply(this,arguments)},r.prototype.toLocaleString=r.prototype.toString,r.prototype.equals=function(e){if(!r.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===r.compare(this,e)},r.prototype.inspect=function(){var e="",t=a.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},Z&&(r.prototype[Z]=r.prototype.inspect),r.prototype.compare=function(e,t,a,n,s){if(Y(e,Uint8Array)&&(e=r.from(e,e.offset,e.byteLength)),!r.isBuffer(e))throw new TypeError("The \"target\" argument must be one of type Buffer or Uint8Array. Received type "+typeof e);if(void 0===t&&(t=0),void 0===a&&(a=e?e.length:0),void 0===n&&(n=0),void 0===s&&(s=this.length),0>t||a>e.length||0>n||s>this.length)throw new RangeError("out of range index");if(n>=s&&t>=a)return 0;if(n>=s)return-1;if(t>=a)return 1;if(t>>>=0,a>>>=0,n>>>=0,s>>>=0,this===e)return 0;for(var l=s-n,c=a-t,d=o(l,c),p=this.slice(n,s),u=e.slice(t,a),h=0;h<d;++h)if(p[h]!==u[h]){l=p[h],c=u[h];break}return l<c?-1:c<l?1:0},r.prototype.includes=function(e,t,o){return-1!==this.indexOf(e,t,o)},r.prototype.indexOf=function(e,t,o){return v(this,e,t,o,!0)},r.prototype.lastIndexOf=function(e,t,o){return v(this,e,t,o,!1)},r.prototype.write=function(e,t,o,r){if(void 0===t)r="utf8",o=this.length,t=0;else if(void 0===o&&"string"==typeof t)r=t,o=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(o)?(o>>>=0,void 0===r&&(r="utf8")):(r=o,o=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var a=this.length-t;if((void 0===o||o>a)&&(o=a),0<e.length&&(0>o||0>t)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var n=!1;;)switch(r){case"hex":return A(this,e,t,o);case"utf8":case"utf-8":return S(this,e,t,o);case"ascii":return T(this,e,t,o);case"latin1":case"binary":return E(this,e,t,o);case"base64":return U(this,e,t,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,e,t,o);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),n=!0;}},r.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};r.prototype.slice=function(e,t){var o=this.length;e=~~e,t=void 0===t?o:~~t,0>e?(e+=o,0>e&&(e=0)):e>o&&(e=o),0>t?(t+=o,0>t&&(t=0)):t>o&&(t=o),t<e&&(t=e);var a=this.subarray(e,t);return Object.setPrototypeOf(a,r.prototype),a},r.prototype.readUIntLE=function(e,t,o){e>>>=0,t>>>=0,o||N(e,t,this.length);for(var r=this[e],a=1,n=0;++n<t&&(a*=256);)r+=this[e+n]*a;return r},r.prototype.readUIntBE=function(e,t,o){e>>>=0,t>>>=0,o||N(e,t,this.length);for(var r=this[e+--t],a=1;0<t&&(a*=256);)r+=this[e+--t]*a;return r},r.prototype.readUInt8=function(e,t){return e>>>=0,t||N(e,1,this.length),this[e]},r.prototype.readUInt16LE=function(e,t){return e>>>=0,t||N(e,2,this.length),this[e]|this[e+1]<<8},r.prototype.readUInt16BE=function(e,t){return e>>>=0,t||N(e,2,this.length),this[e]<<8|this[e+1]},r.prototype.readUInt32LE=function(e,t){return e>>>=0,t||N(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},r.prototype.readUInt32BE=function(e,t){return e>>>=0,t||N(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},r.prototype.readIntLE=function(e,o,r){e>>>=0,o>>>=0,r||N(e,o,this.length);for(var a=this[e],n=1,s=0;++s<o&&(n*=256);)a+=this[e+s]*n;return n*=128,a>=n&&(a-=t(2,8*o)),a},r.prototype.readIntBE=function(e,o,r){e>>>=0,o>>>=0,r||N(e,o,this.length);for(var a=o,n=1,s=this[e+--a];0<a&&(n*=256);)s+=this[e+--a]*n;return n*=128,s>=n&&(s-=t(2,8*o)),s},r.prototype.readInt8=function(e,t){return e>>>=0,t||N(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},r.prototype.readInt16LE=function(e,t){e>>>=0,t||N(e,2,this.length);var o=this[e]|this[e+1]<<8;return 32768&o?4294901760|o:o},r.prototype.readInt16BE=function(e,t){e>>>=0,t||N(e,2,this.length);var o=this[e+1]|this[e]<<8;return 32768&o?4294901760|o:o},r.prototype.readInt32LE=function(e,t){return e>>>=0,t||N(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},r.prototype.readInt32BE=function(e,t){return e>>>=0,t||N(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},r.prototype.readFloatLE=function(e,t){return e>>>=0,t||N(e,4,this.length),Q.read(this,e,!0,23,4)},r.prototype.readFloatBE=function(e,t){return e>>>=0,t||N(e,4,this.length),Q.read(this,e,!1,23,4)},r.prototype.readDoubleLE=function(e,t){return e>>>=0,t||N(e,8,this.length),Q.read(this,e,!0,52,8)},r.prototype.readDoubleBE=function(e,t){return e>>>=0,t||N(e,8,this.length),Q.read(this,e,!1,52,8)},r.prototype.writeUIntLE=function(e,o,r,a){if(e=+e,o>>>=0,r>>>=0,!a){var n=t(2,8*r)-1;P(this,e,o,r,n,0)}var s=1,l=0;for(this[o]=255&e;++l<r&&(s*=256);)this[o+l]=255&e/s;return o+r},r.prototype.writeUIntBE=function(e,o,r,a){if(e=+e,o>>>=0,r>>>=0,!a){var n=t(2,8*r)-1;P(this,e,o,r,n,0)}var s=r-1,l=1;for(this[o+s]=255&e;0<=--s&&(l*=256);)this[o+s]=255&e/l;return o+r},r.prototype.writeUInt8=function(e,t,o){return e=+e,t>>>=0,o||P(this,e,t,1,255,0),this[t]=255&e,t+1},r.prototype.writeUInt16LE=function(e,t,o){return e=+e,t>>>=0,o||P(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},r.prototype.writeUInt16BE=function(e,t,o){return e=+e,t>>>=0,o||P(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},r.prototype.writeUInt32LE=function(e,t,o){return e=+e,t>>>=0,o||P(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},r.prototype.writeUInt32BE=function(e,t,o){return e=+e,t>>>=0,o||P(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},r.prototype.writeIntLE=function(e,o,r,a){if(e=+e,o>>>=0,!a){var n=t(2,8*r-1);P(this,e,o,r,n-1,-n)}var s=0,l=1,c=0;for(this[o]=255&e;++s<r&&(l*=256);)0>e&&0===c&&0!==this[o+s-1]&&(c=1),this[o+s]=255&(e/l>>0)-c;return o+r},r.prototype.writeIntBE=function(e,o,r,a){if(e=+e,o>>>=0,!a){var n=t(2,8*r-1);P(this,e,o,r,n-1,-n)}var s=r-1,l=1,c=0;for(this[o+s]=255&e;0<=--s&&(l*=256);)0>e&&0===c&&0!==this[o+s+1]&&(c=1),this[o+s]=255&(e/l>>0)-c;return o+r},r.prototype.writeInt8=function(e,t,o){return e=+e,t>>>=0,o||P(this,e,t,1,127,-128),0>e&&(e=255+e+1),this[t]=255&e,t+1},r.prototype.writeInt16LE=function(e,t,o){return e=+e,t>>>=0,o||P(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},r.prototype.writeInt16BE=function(e,t,o){return e=+e,t>>>=0,o||P(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},r.prototype.writeInt32LE=function(e,t,o){return e=+e,t>>>=0,o||P(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},r.prototype.writeInt32BE=function(e,t,o){return e=+e,t>>>=0,o||P(this,e,t,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},r.prototype.writeFloatLE=function(e,t,o){return M(this,e,t,!0,o)},r.prototype.writeFloatBE=function(e,t,o){return M(this,e,t,!1,o)},r.prototype.writeDoubleLE=function(e,t,o){return K(this,e,t,!0,o)},r.prototype.writeDoubleBE=function(e,t,o){return K(this,e,t,!1,o)},r.prototype.copy=function(e,t,o,a){if(!r.isBuffer(e))throw new TypeError("argument should be a Buffer");if(o||(o=0),a||0===a||(a=this.length),t>=e.length&&(t=e.length),t||(t=0),0<a&&a<o&&(a=o),a===o)return 0;if(0===e.length||0===this.length)return 0;if(0>t)throw new RangeError("targetStart out of bounds");if(0>o||o>=this.length)throw new RangeError("Index out of range");if(0>a)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),e.length-t<a-o&&(a=e.length-t+o);var n=a-o;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,o,a);else if(this===e&&o<t&&t<a)for(var s=n-1;0<=s;--s)e[s+t]=this[s+o];else Uint8Array.prototype.set.call(e,this.subarray(o,a),t);return n},r.prototype.fill=function(e,t,o,a){if("string"==typeof e){if("string"==typeof t?(a=t,t=0,o=this.length):"string"==typeof o&&(a=o,o=this.length),void 0!==a&&"string"!=typeof a)throw new TypeError("encoding must be a string");if("string"==typeof a&&!r.isEncoding(a))throw new TypeError("Unknown encoding: "+a);if(1===e.length){var n=e.charCodeAt(0);("utf8"===a&&128>n||"latin1"===a)&&(e=n)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=+e);if(0>t||this.length<t||this.length<o)throw new RangeError("Out of range index");if(o<=t)return this;t>>>=0,o=o===void 0?this.length:o>>>0,e||(e=0);var s;if("number"==typeof e)for(s=t;s<o;++s)this[s]=e;else{var l=r.isBuffer(e)?e:r.from(e,a),c=l.length;if(0===c)throw new TypeError("The value \""+e+"\" is invalid for argument \"value\"");for(s=0;s<o-t;++s)this[s+t]=l[s%c]}return this};var $=/[^+/0-9A-Za-z-_]/g,ee=function(){for(var e="0123456789abcdef",t=Array(256),o=0,r;16>o;++o){r=16*o;for(var a=0;16>a;++a)t[r+a]=e[o]+e[a]}return t}()}).call(this,e("buffer").Buffer)},{"base64-js":6,buffer:8,ieee754:11}],9:[function(e,t,o){function r(e){if(e)return a(e)}function a(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}"undefined"!=typeof t&&(t.exports=r);r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function o(){this.off(e,o),t.apply(this,arguments)}return o.fn=t,this.on(e,o),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var o=this._callbacks["$"+e];if(!o)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var r=0,a;r<o.length;r++)if(a=o[r],a===t||a.fn===t){o.splice(r,1);break}return this},r.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),o=this._callbacks["$"+e];if(o){o=o.slice(0);for(var r=0,a=o.length;r<a;++r)o[r].apply(this,t)}return this},r.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},r.prototype.hasListeners=function(e){return!!this.listeners(e).length}},{}],10:[function(e,t,o){(function(e,o){(function(){'use strict';var r="object"==typeof window?window:{},a=!r.HI_BASE32_NO_NODE_JS&&"object"==typeof e&&e.versions&&e.versions.node;a&&(r=o);var n=!r.HI_BASE32_NO_COMMON_JS&&"object"==typeof t&&t.exports,s="function"==typeof p&&p.amd,l=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","2","3","4","5","6","7"],c={A:0,B:1,C:2,D:3,E:4,F:5,G:6,H:7,I:8,J:9,K:10,L:11,M:12,N:13,O:14,P:15,Q:16,R:17,S:18,T:19,U:20,V:21,W:22,X:23,Y:24,Z:25,2:26,3:27,4:28,5:29,6:30,7:31},u=[0,0,0,0,0,0,0,0],h=function(e,t){10<t.length&&(t="..."+t.substr(-10));var o=new Error("Decoded data is not valid UTF-8. Maybe try base32.decode.asBytes()? Partial data after reading "+e+" bytes: "+t+" <-");throw o.position=e,o},g=function(e){for(var t="",o=e.length,r=0,a=0,n,s;r<o;){if(n=e[r++],127>=n){t+=d(n);continue}else 191<n&&223>=n?(s=31&n,a=1):239>=n?(s=15&n,a=2):247>=n?(s=7&n,a=3):h(r,t);for(var l=0;l<a;++l)n=e[r++],(128>n||191<n)&&h(r,t),s<<=6,s+=63&n;55296<=s&&57343>=s&&h(r,t),1114111<s&&h(r,t),65535>=s?t+=d(s):(s-=65536,t+=d((s>>10)+55296),t+=d((1023&s)+56320))}return t},f=function(e){if(!/^[A-Z2-7=]+$/.test(e))throw new Error("Invalid base32 characters");e=e.replace(/=/g,"");for(var t=[],o=0,r=e.length,a=0,n=r>>3<<3,s,l,d,p,u,h,g,f;a<n;)s=c[e.charAt(a++)],l=c[e.charAt(a++)],d=c[e.charAt(a++)],p=c[e.charAt(a++)],u=c[e.charAt(a++)],h=c[e.charAt(a++)],g=c[e.charAt(a++)],f=c[e.charAt(a++)],t[o++]=255&(s<<3|l>>>2),t[o++]=255&(l<<6|d<<1|p>>>4),t[o++]=255&(p<<4|u>>>1),t[o++]=255&(u<<7|h<<2|g>>>3),t[o++]=255&(g<<5|f);var y=r-n;return 2==y?(s=c[e.charAt(a++)],l=c[e.charAt(a++)],t[o++]=255&(s<<3|l>>>2)):4===y?(s=c[e.charAt(a++)],l=c[e.charAt(a++)],d=c[e.charAt(a++)],p=c[e.charAt(a++)],t[o++]=255&(s<<3|l>>>2),t[o++]=255&(l<<6|d<<1|p>>>4)):5===y?(s=c[e.charAt(a++)],l=c[e.charAt(a++)],d=c[e.charAt(a++)],p=c[e.charAt(a++)],u=c[e.charAt(a++)],t[o++]=255&(s<<3|l>>>2),t[o++]=255&(l<<6|d<<1|p>>>4),t[o++]=255&(p<<4|u>>>1)):7===y&&(s=c[e.charAt(a++)],l=c[e.charAt(a++)],d=c[e.charAt(a++)],p=c[e.charAt(a++)],u=c[e.charAt(a++)],h=c[e.charAt(a++)],g=c[e.charAt(a++)],t[o++]=255&(s<<3|l>>>2),t[o++]=255&(l<<6|d<<1|p>>>4),t[o++]=255&(p<<4|u>>>1),t[o++]=255&(u<<7|h<<2|g>>>3)),t},y=function(e){for(var t="",o=e.length,r=0,a=5*parseInt(o/5),n,s,c,d,p;r<a;)n=e.charCodeAt(r++),s=e.charCodeAt(r++),c=e.charCodeAt(r++),d=e.charCodeAt(r++),p=e.charCodeAt(r++),t+=l[n>>>3]+l[31&(n<<2|s>>>6)]+l[31&s>>>1]+l[31&(s<<4|c>>>4)]+l[31&(c<<1|d>>>7)]+l[31&d>>>2]+l[31&(d<<3|p>>>5)]+l[31&p];var u=o-a;return 1==u?(n=e.charCodeAt(r),t+=l[n>>>3]+l[31&n<<2]+"======"):2===u?(n=e.charCodeAt(r++),s=e.charCodeAt(r),t+=l[n>>>3]+l[31&(n<<2|s>>>6)]+l[31&s>>>1]+l[31&s<<4]+"===="):3===u?(n=e.charCodeAt(r++),s=e.charCodeAt(r++),c=e.charCodeAt(r),t+=l[n>>>3]+l[31&(n<<2|s>>>6)]+l[31&s>>>1]+l[31&(s<<4|c>>>4)]+l[31&c<<1]+"==="):4===u&&(n=e.charCodeAt(r++),s=e.charCodeAt(r++),c=e.charCodeAt(r++),d=e.charCodeAt(r),t+=l[n>>>3]+l[31&(n<<2|s>>>6)]+l[31&s>>>1]+l[31&(s<<4|c>>>4)]+l[31&(c<<1|d>>>7)]+l[31&d>>>2]+l[31&d<<3]+"="),t},m=function(e){var t=!1,o="",r=0,a=0,n=0,s=e.length,c,d,p,h,g,f,y;do{for(u[0]=u[5],u[1]=u[6],u[2]=u[7],y=a;r<s&&5>y;++r)f=e.charCodeAt(r),128>f?u[y++]=f:2048>f?(u[y++]=192|f>>6,u[y++]=128|63&f):55296>f||57344<=f?(u[y++]=224|f>>12,u[y++]=128|63&f>>6,u[y++]=128|63&f):(f=65536+((1023&f)<<10|1023&e.charCodeAt(++r)),u[y++]=240|f>>18,u[y++]=128|63&f>>12,u[y++]=128|63&f>>6,u[y++]=128|63&f);n+=y-a,a=y-5,r===s&&++r,r>s&&6>y&&(t=!0),c=u[0],4<y?(d=u[1],p=u[2],h=u[3],g=u[4],o+=l[c>>>3]+l[31&(c<<2|d>>>6)]+l[31&d>>>1]+l[31&(d<<4|p>>>4)]+l[31&(p<<1|h>>>7)]+l[31&h>>>2]+l[31&(h<<3|g>>>5)]+l[31&g]):1===y?o+=l[c>>>3]+l[31&c<<2]+"======":2===y?(d=u[1],o+=l[c>>>3]+l[31&(c<<2|d>>>6)]+l[31&d>>>1]+l[31&d<<4]+"===="):3===y?(d=u[1],p=u[2],o+=l[c>>>3]+l[31&(c<<2|d>>>6)]+l[31&d>>>1]+l[31&(d<<4|p>>>4)]+l[31&p<<1]+"==="):(d=u[1],p=u[2],h=u[3],o+=l[c>>>3]+l[31&(c<<2|d>>>6)]+l[31&d>>>1]+l[31&(d<<4|p>>>4)]+l[31&(p<<1|h>>>7)]+l[31&h>>>2]+l[31&h<<3]+"=")}while(!t);return o},w=function(e){for(var t="",o=e.length,r=0,a=5*parseInt(o/5),n,s,c,d,p;r<a;)n=e[r++],s=e[r++],c=e[r++],d=e[r++],p=e[r++],t+=l[n>>>3]+l[31&(n<<2|s>>>6)]+l[31&s>>>1]+l[31&(s<<4|c>>>4)]+l[31&(c<<1|d>>>7)]+l[31&d>>>2]+l[31&(d<<3|p>>>5)]+l[31&p];var u=o-a;return 1==u?(n=e[r],t+=l[n>>>3]+l[31&n<<2]+"======"):2===u?(n=e[r++],s=e[r],t+=l[n>>>3]+l[31&(n<<2|s>>>6)]+l[31&s>>>1]+l[31&s<<4]+"===="):3===u?(n=e[r++],s=e[r++],c=e[r],t+=l[n>>>3]+l[31&(n<<2|s>>>6)]+l[31&s>>>1]+l[31&(s<<4|c>>>4)]+l[31&c<<1]+"==="):4===u&&(n=e[r++],s=e[r++],c=e[r++],d=e[r],t+=l[n>>>3]+l[31&(n<<2|s>>>6)]+l[31&s>>>1]+l[31&(s<<4|c>>>4)]+l[31&(c<<1|d>>>7)]+l[31&d>>>2]+l[31&d<<3]+"="),t},x=function(e,t){if(!t)return g(f(e));if(!/^[A-Z2-7=]+$/.test(e))throw new Error("Invalid base32 characters");var o="",r=e.indexOf("="),a,n,s,l,p,u,h,y;-1===r&&(r=e.length);for(var m=0,w=r>>3<<3;m<w;)a=c[e.charAt(m++)],n=c[e.charAt(m++)],s=c[e.charAt(m++)],l=c[e.charAt(m++)],p=c[e.charAt(m++)],u=c[e.charAt(m++)],h=c[e.charAt(m++)],y=c[e.charAt(m++)],o+=d(255&(a<<3|n>>>2))+d(255&(n<<6|s<<1|l>>>4))+d(255&(l<<4|p>>>1))+d(255&(p<<7|u<<2|h>>>3))+d(255&(h<<5|y));var x=r-w;return 2==x?(a=c[e.charAt(m++)],n=c[e.charAt(m++)],o+=d(255&(a<<3|n>>>2))):4===x?(a=c[e.charAt(m++)],n=c[e.charAt(m++)],s=c[e.charAt(m++)],l=c[e.charAt(m++)],o+=d(255&(a<<3|n>>>2))+d(255&(n<<6|s<<1|l>>>4))):5===x?(a=c[e.charAt(m++)],n=c[e.charAt(m++)],s=c[e.charAt(m++)],l=c[e.charAt(m++)],p=c[e.charAt(m++)],o+=d(255&(a<<3|n>>>2))+d(255&(n<<6|s<<1|l>>>4))+d(255&(l<<4|p>>>1))):7===x&&(a=c[e.charAt(m++)],n=c[e.charAt(m++)],s=c[e.charAt(m++)],l=c[e.charAt(m++)],p=c[e.charAt(m++)],u=c[e.charAt(m++)],h=c[e.charAt(m++)],o+=d(255&(a<<3|n>>>2))+d(255&(n<<6|s<<1|l>>>4))+d(255&(l<<4|p>>>1))+d(255&(p<<7|u<<2|h>>>3))),o},v={encode:function(e,t){var o="string"!=typeof e;return o&&e.constructor===ArrayBuffer&&(e=new Uint8Array(e)),o?w(e):t?y(e):m(e)},decode:x};x.asBytes=f,n?t.exports=v:(r.base32=v,s&&p(function(){return v}))})()}).call(this,e("_process"),"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global)},{_process:14}],11:[function(e,o,r){r.read=function(o,r,a,n,l){var c=8*l-n-1,p=(1<<c)-1,u=p>>1,h=-7,g=a?l-1:0,f=a?-1:1,d=o[r+g],y,w;for(g+=f,y=d&(1<<-h)-1,d>>=-h,h+=c;0<h;y=256*y+o[r+g],g+=f,h-=8);for(w=y&(1<<-h)-1,y>>=-h,h+=n;0<h;w=256*w+o[r+g],g+=f,h-=8);if(0===y)y=1-u;else{if(y===p)return w?NaN:(d?-1:1)*(1/0);w+=t(2,n),y-=u}return(d?-1:1)*w*t(2,y-n)},r.write=function(o,r,n,l,p,u){var h=Math.LN2,g=Math.log,f=8*u-p-1,y=(1<<f)-1,w=y>>1,x=23===p?t(2,-24)-t(2,-77):0,v=l?0:u-1,k=l?1:-1,d=0>r||0===r&&0>1/r?1:0,A,S,T;for(r=a(r),isNaN(r)||r===1/0?(S=isNaN(r)?1:0,A=y):(A=s(g(r)/h),1>r*(T=t(2,-A))&&(A--,T*=2),r+=1<=A+w?x/T:x*t(2,1-w),2<=r*T&&(A++,T/=2),A+w>=y?(S=0,A=y):1<=A+w?(S=(r*T-1)*t(2,p),A+=w):(S=r*t(2,w-1)*t(2,p),A=0));8<=p;o[n+v]=255&S,v+=k,S/=256,p-=8);for(A=A<<p|S,f+=p;0<f;o[n+v]=255&A,v+=k,A/=256,f-=8);o[n+v-k]|=128*d}},{}],12:[function(e,t,o){(function(e,o){(function(){'use strict';function r(e,t){t?(w[0]=w[1]=w[2]=w[3]=w[4]=w[5]=w[6]=w[7]=w[8]=w[9]=w[10]=w[11]=w[12]=w[13]=w[14]=w[15]=w[16]=w[17]=w[18]=w[19]=w[20]=w[21]=w[22]=w[23]=w[24]=w[25]=w[26]=w[27]=w[28]=w[29]=w[30]=w[31]=w[32]=0,this.blocks=w):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],384==e?(this.h0h=3418070365,this.h0l=3238371032,this.h1h=1654270250,this.h1l=914150663,this.h2h=2438529370,this.h2l=812702999,this.h3h=355462360,this.h3l=4144912697,this.h4h=1731405415,this.h4l=4290775857,this.h5h=2394180231,this.h5l=1750603025,this.h6h=3675008525,this.h6l=1694076839,this.h7h=1203062813,this.h7l=3204075428):256==e?(this.h0h=573645204,this.h0l=4230739756,this.h1h=2673172387,this.h1l=3360449730,this.h2h=596883563,this.h2l=1867755857,this.h3h=2520282905,this.h3l=1497426621,this.h4h=2519219938,this.h4l=2827943907,this.h5h=3193839141,this.h5l=1401305490,this.h6h=721525244,this.h6l=746961066,this.h7h=246885852,this.h7l=2177182882):224==e?(this.h0h=2352822216,this.h0l=424955298,this.h1h=1944164710,this.h1l=2312950998,this.h2h=502970286,this.h2l=855612546,this.h3h=1738396948,this.h3l=1479516111,this.h4h=258812777,this.h4l=2077511080,this.h5h=2011393907,this.h5l=79989058,this.h6h=1067287976,this.h6l=1780299464,this.h7h=286451373,this.h7l=2446758561):(this.h0h=1779033703,this.h0l=4089235720,this.h1h=3144134277,this.h1l=2227873595,this.h2h=1013904242,this.h2l=4271175723,this.h3h=2773480762,this.h3l=1595750129,this.h4h=1359893119,this.h4l=2917565137,this.h5h=2600822924,this.h5l=725511199,this.h6h=528734635,this.h6l=4215389547,this.h7h=1541459225,this.h7l=327033209),this.bits=e,this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1}function a(e,t,o){var a=typeof e,n;if("string"!=a){if(!("object"===a))throw new Error("input is invalid type");else if(null===e)throw new Error("input is invalid type");else if(u&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!u||!ArrayBuffer.isView(e)))throw new Error("input is invalid type");n=!0}var s=e.length;if(!n){for(var l=[],s=e.length,c=0,d=0,p;d<s;++d)p=e.charCodeAt(d),128>p?l[c++]=p:2048>p?(l[c++]=192|p>>6,l[c++]=128|63&p):55296>p||57344<=p?(l[c++]=224|p>>12,l[c++]=128|63&p>>6,l[c++]=128|63&p):(p=65536+((1023&p)<<10|1023&e.charCodeAt(++d)),l[c++]=240|p>>18,l[c++]=128|63&p>>12,l[c++]=128|63&p>>6,l[c++]=128|63&p);e=l}128<e.length&&(e=new r(t,!0).update(e).array());for(var h=[],g=[],d=0,f;128>d;++d)f=e[d]||0,h[d]=92^f,g[d]=54^f;r.call(this,t,o),this.update(g),this.oKeyPad=h,this.inner=!0,this.sharedMemory=o}var n="object"==typeof window,s=n?window:{};s.JS_SHA512_NO_WINDOW&&(n=!1);var i=!n&&"object"==typeof self,l=!s.JS_SHA512_NO_NODE_JS&&"object"==typeof e&&e.versions&&e.versions.node;l?s=o:i&&(s=self);var c=!s.JS_SHA512_NO_COMMON_JS&&"object"==typeof t&&t.exports,d="function"==typeof p&&p.amd,u=!s.JS_SHA512_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,h=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],g=[-2147483648,8388608,32768,128],f=[24,16,8,0],y=[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],m=["hex","array","digest","arrayBuffer"],w=[];(s.JS_SHA512_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),u&&(s.JS_SHA512_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});var x=function(e,t){return function(o){return new r(t,!0).update(o)[e]()}},v=function(e){var t=x("hex",e);t.create=function(){return new r(e)},t.update=function(e){return t.create().update(e)};for(var o=0,a;o<m.length;++o)a=m[o],t[a]=x(a,e);return t},k=function(e,t){return function(o,r){return new a(o,t,!0).update(r)[e]()}},A=function(e){var t=k("hex",e);t.create=function(t){return new a(t,e)},t.update=function(e,o){return t.create(e).update(o)};for(var o=0,r;o<m.length;++o)r=m[o],t[r]=k(r,e);return t};r.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t=typeof e,o;if("string"!=t){if("object"!==t)throw new Error("input is invalid type");else if(null===e)throw new Error("input is invalid type");else if(u&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!u||!ArrayBuffer.isView(e)))throw new Error("input is invalid type");o=!0}for(var r=0,a=e.length,n=this.blocks,s,l;r<a;){if(this.hashed&&(this.hashed=!1,n[0]=this.block,n[1]=n[2]=n[3]=n[4]=n[5]=n[6]=n[7]=n[8]=n[9]=n[10]=n[11]=n[12]=n[13]=n[14]=n[15]=n[16]=n[17]=n[18]=n[19]=n[20]=n[21]=n[22]=n[23]=n[24]=n[25]=n[26]=n[27]=n[28]=n[29]=n[30]=n[31]=n[32]=0),o)for(l=this.start;r<a&&128>l;++r)n[l>>2]|=e[r]<<f[3&l++];else for(l=this.start;r<a&&128>l;++r)s=e.charCodeAt(r),128>s?n[l>>2]|=s<<f[3&l++]:2048>s?(n[l>>2]|=(192|s>>6)<<f[3&l++],n[l>>2]|=(128|63&s)<<f[3&l++]):55296>s||57344<=s?(n[l>>2]|=(224|s>>12)<<f[3&l++],n[l>>2]|=(128|63&s>>6)<<f[3&l++],n[l>>2]|=(128|63&s)<<f[3&l++]):(s=65536+((1023&s)<<10|1023&e.charCodeAt(++r)),n[l>>2]|=(240|s>>18)<<f[3&l++],n[l>>2]|=(128|63&s>>12)<<f[3&l++],n[l>>2]|=(128|63&s>>6)<<f[3&l++],n[l>>2]|=(128|63&s)<<f[3&l++]);this.lastByteIndex=l,this.bytes+=l-this.start,128<=l?(this.block=n[32],this.start=l-128,this.hash(),this.hashed=!0):this.start=l}return 4294967295<this.bytes&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes%=4294967296),this},r.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[32]=this.block,e[t>>2]|=g[3&t],this.block=e[32],112<=t&&(!this.hashed&&this.hash(),e[0]=this.block,e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=e[16]=e[17]=e[18]=e[19]=e[20]=e[21]=e[22]=e[23]=e[24]=e[25]=e[26]=e[27]=e[28]=e[29]=e[30]=e[31]=e[32]=0),e[30]=this.hBytes<<3|this.bytes>>>29,e[31]=this.bytes<<3,this.hash()}},r.prototype.hash=function(){var e=this.h0h,t=this.h0l,o=this.h1h,r=this.h1l,a=this.h2h,n=this.h2l,s=this.h3h,i=this.h3l,l=this.h4h,c=this.h4l,d=this.h5h,p=this.h5l,u=this.h6h,h=this.h6l,g=this.h7h,f=this.h7l,m=this.blocks,w,x,v,k,A,S,T,E,U,B,I,R,z,D,C,L,O,N,P,M,K,H,G,q,F;for(w=32;160>w;w+=2)M=m[w-30],K=m[w-29],x=(M>>>1|K<<31)^(M>>>8|K<<24)^M>>>7,v=(K>>>1|M<<31)^(K>>>8|M<<24)^(K>>>7|M<<25),M=m[w-4],K=m[w-3],k=(M>>>19|K<<13)^(K>>>29|M<<3)^M>>>6,A=(K>>>19|M<<13)^(M>>>29|K<<3)^(K>>>6|M<<26),M=m[w-32],K=m[w-31],H=m[w-14],G=m[w-13],S=(65535&G)+(65535&K)+(65535&v)+(65535&A),T=(G>>>16)+(K>>>16)+(v>>>16)+(A>>>16)+(S>>>16),E=(65535&H)+(65535&M)+(65535&x)+(65535&k)+(T>>>16),U=(H>>>16)+(M>>>16)+(x>>>16)+(k>>>16)+(E>>>16),m[w]=U<<16|65535&E,m[w+1]=T<<16|65535&S;var V=e,W=t,Y=o,X=r,J=a,Q=n,Z=s,$=i,ee=l,te=c,oe=d,re=p,ae=u,ne=h,se=g,ie=f;for(L=Y&J,O=X&Q,w=0;160>w;w+=8)x=(V>>>28|W<<4)^(W>>>2|V<<30)^(W>>>7|V<<25),v=(W>>>28|V<<4)^(V>>>2|W<<30)^(V>>>7|W<<25),k=(ee>>>14|te<<18)^(ee>>>18|te<<14)^(te>>>9|ee<<23),A=(te>>>14|ee<<18)^(te>>>18|ee<<14)^(ee>>>9|te<<23),B=V&Y,I=W&X,N=B^V&J^L,P=I^W&Q^O,q=ee&oe^~ee&ae,F=te&re^~te&ne,M=m[w],K=m[w+1],H=y[w],G=y[w+1],S=(65535&G)+(65535&K)+(65535&F)+(65535&A)+(65535&ie),T=(G>>>16)+(K>>>16)+(F>>>16)+(A>>>16)+(ie>>>16)+(S>>>16),E=(65535&H)+(65535&M)+(65535&q)+(65535&k)+(65535&se)+(T>>>16),U=(H>>>16)+(M>>>16)+(q>>>16)+(k>>>16)+(se>>>16)+(E>>>16),M=U<<16|65535&E,K=T<<16|65535&S,S=(65535&P)+(65535&v),T=(P>>>16)+(v>>>16)+(S>>>16),E=(65535&N)+(65535&x)+(T>>>16),U=(N>>>16)+(x>>>16)+(E>>>16),H=U<<16|65535&E,G=T<<16|65535&S,S=(65535&$)+(65535&K),T=($>>>16)+(K>>>16)+(S>>>16),E=(65535&Z)+(65535&M)+(T>>>16),U=(Z>>>16)+(M>>>16)+(E>>>16),se=U<<16|65535&E,ie=T<<16|65535&S,S=(65535&G)+(65535&K),T=(G>>>16)+(K>>>16)+(S>>>16),E=(65535&H)+(65535&M)+(T>>>16),U=(H>>>16)+(M>>>16)+(E>>>16),Z=U<<16|65535&E,$=T<<16|65535&S,x=(Z>>>28|$<<4)^($>>>2|Z<<30)^($>>>7|Z<<25),v=($>>>28|Z<<4)^(Z>>>2|$<<30)^(Z>>>7|$<<25),k=(se>>>14|ie<<18)^(se>>>18|ie<<14)^(ie>>>9|se<<23),A=(ie>>>14|se<<18)^(ie>>>18|se<<14)^(se>>>9|ie<<23),R=Z&V,z=$&W,N=R^Z&Y^B,P=z^$&X^I,q=se&ee^~se&oe,F=ie&te^~ie&re,M=m[w+2],K=m[w+3],H=y[w+2],G=y[w+3],S=(65535&G)+(65535&K)+(65535&F)+(65535&A)+(65535&ne),T=(G>>>16)+(K>>>16)+(F>>>16)+(A>>>16)+(ne>>>16)+(S>>>16),E=(65535&H)+(65535&M)+(65535&q)+(65535&k)+(65535&ae)+(T>>>16),U=(H>>>16)+(M>>>16)+(q>>>16)+(k>>>16)+(ae>>>16)+(E>>>16),M=U<<16|65535&E,K=T<<16|65535&S,S=(65535&P)+(65535&v),T=(P>>>16)+(v>>>16)+(S>>>16),E=(65535&N)+(65535&x)+(T>>>16),U=(N>>>16)+(x>>>16)+(E>>>16),H=U<<16|65535&E,G=T<<16|65535&S,S=(65535&Q)+(65535&K),T=(Q>>>16)+(K>>>16)+(S>>>16),E=(65535&J)+(65535&M)+(T>>>16),U=(J>>>16)+(M>>>16)+(E>>>16),ae=U<<16|65535&E,ne=T<<16|65535&S,S=(65535&G)+(65535&K),T=(G>>>16)+(K>>>16)+(S>>>16),E=(65535&H)+(65535&M)+(T>>>16),U=(H>>>16)+(M>>>16)+(E>>>16),J=U<<16|65535&E,Q=T<<16|65535&S,x=(J>>>28|Q<<4)^(Q>>>2|J<<30)^(Q>>>7|J<<25),v=(Q>>>28|J<<4)^(J>>>2|Q<<30)^(J>>>7|Q<<25),k=(ae>>>14|ne<<18)^(ae>>>18|ne<<14)^(ne>>>9|ae<<23),A=(ne>>>14|ae<<18)^(ne>>>18|ae<<14)^(ae>>>9|ne<<23),D=J&Z,C=Q&$,N=D^J&V^R,P=C^Q&W^z,q=ae&se^~ae&ee,F=ne&ie^~ne&te,M=m[w+4],K=m[w+5],H=y[w+4],G=y[w+5],S=(65535&G)+(65535&K)+(65535&F)+(65535&A)+(65535&re),T=(G>>>16)+(K>>>16)+(F>>>16)+(A>>>16)+(re>>>16)+(S>>>16),E=(65535&H)+(65535&M)+(65535&q)+(65535&k)+(65535&oe)+(T>>>16),U=(H>>>16)+(M>>>16)+(q>>>16)+(k>>>16)+(oe>>>16)+(E>>>16),M=U<<16|65535&E,K=T<<16|65535&S,S=(65535&P)+(65535&v),T=(P>>>16)+(v>>>16)+(S>>>16),E=(65535&N)+(65535&x)+(T>>>16),U=(N>>>16)+(x>>>16)+(E>>>16),H=U<<16|65535&E,G=T<<16|65535&S,S=(65535&X)+(65535&K),T=(X>>>16)+(K>>>16)+(S>>>16),E=(65535&Y)+(65535&M)+(T>>>16),U=(Y>>>16)+(M>>>16)+(E>>>16),oe=U<<16|65535&E,re=T<<16|65535&S,S=(65535&G)+(65535&K),T=(G>>>16)+(K>>>16)+(S>>>16),E=(65535&H)+(65535&M)+(T>>>16),U=(H>>>16)+(M>>>16)+(E>>>16),Y=U<<16|65535&E,X=T<<16|65535&S,x=(Y>>>28|X<<4)^(X>>>2|Y<<30)^(X>>>7|Y<<25),v=(X>>>28|Y<<4)^(Y>>>2|X<<30)^(Y>>>7|X<<25),k=(oe>>>14|re<<18)^(oe>>>18|re<<14)^(re>>>9|oe<<23),A=(re>>>14|oe<<18)^(re>>>18|oe<<14)^(oe>>>9|re<<23),L=Y&J,O=X&Q,N=L^Y&Z^D,P=O^X&$^C,q=oe&ae^~oe&se,F=re&ne^~re&ie,M=m[w+6],K=m[w+7],H=y[w+6],G=y[w+7],S=(65535&G)+(65535&K)+(65535&F)+(65535&A)+(65535&te),T=(G>>>16)+(K>>>16)+(F>>>16)+(A>>>16)+(te>>>16)+(S>>>16),E=(65535&H)+(65535&M)+(65535&q)+(65535&k)+(65535&ee)+(T>>>16),U=(H>>>16)+(M>>>16)+(q>>>16)+(k>>>16)+(ee>>>16)+(E>>>16),M=U<<16|65535&E,K=T<<16|65535&S,S=(65535&P)+(65535&v),T=(P>>>16)+(v>>>16)+(S>>>16),E=(65535&N)+(65535&x)+(T>>>16),U=(N>>>16)+(x>>>16)+(E>>>16),H=U<<16|65535&E,G=T<<16|65535&S,S=(65535&W)+(65535&K),T=(W>>>16)+(K>>>16)+(S>>>16),E=(65535&V)+(65535&M)+(T>>>16),U=(V>>>16)+(M>>>16)+(E>>>16),ee=U<<16|65535&E,te=T<<16|65535&S,S=(65535&G)+(65535&K),T=(G>>>16)+(K>>>16)+(S>>>16),E=(65535&H)+(65535&M)+(T>>>16),U=(H>>>16)+(M>>>16)+(E>>>16),V=U<<16|65535&E,W=T<<16|65535&S;S=(65535&t)+(65535&W),T=(t>>>16)+(W>>>16)+(S>>>16),E=(65535&e)+(65535&V)+(T>>>16),U=(e>>>16)+(V>>>16)+(E>>>16),this.h0h=U<<16|65535&E,this.h0l=T<<16|65535&S,S=(65535&r)+(65535&X),T=(r>>>16)+(X>>>16)+(S>>>16),E=(65535&o)+(65535&Y)+(T>>>16),U=(o>>>16)+(Y>>>16)+(E>>>16),this.h1h=U<<16|65535&E,this.h1l=T<<16|65535&S,S=(65535&n)+(65535&Q),T=(n>>>16)+(Q>>>16)+(S>>>16),E=(65535&a)+(65535&J)+(T>>>16),U=(a>>>16)+(J>>>16)+(E>>>16),this.h2h=U<<16|65535&E,this.h2l=T<<16|65535&S,S=(65535&i)+(65535&$),T=(i>>>16)+($>>>16)+(S>>>16),E=(65535&s)+(65535&Z)+(T>>>16),U=(s>>>16)+(Z>>>16)+(E>>>16),this.h3h=U<<16|65535&E,this.h3l=T<<16|65535&S,S=(65535&c)+(65535&te),T=(c>>>16)+(te>>>16)+(S>>>16),E=(65535&l)+(65535&ee)+(T>>>16),U=(l>>>16)+(ee>>>16)+(E>>>16),this.h4h=U<<16|65535&E,this.h4l=T<<16|65535&S,S=(65535&p)+(65535&re),T=(p>>>16)+(re>>>16)+(S>>>16),E=(65535&d)+(65535&oe)+(T>>>16),U=(d>>>16)+(oe>>>16)+(E>>>16),this.h5h=U<<16|65535&E,this.h5l=T<<16|65535&S,S=(65535&h)+(65535&ne),T=(h>>>16)+(ne>>>16)+(S>>>16),E=(65535&u)+(65535&ae)+(T>>>16),U=(u>>>16)+(ae>>>16)+(E>>>16),this.h6h=U<<16|65535&E,this.h6l=T<<16|65535&S,S=(65535&f)+(65535&ie),T=(f>>>16)+(ie>>>16)+(S>>>16),E=(65535&g)+(65535&se)+(T>>>16),U=(g>>>16)+(se>>>16)+(E>>>16),this.h7h=U<<16|65535&E,this.h7l=T<<16|65535&S},r.prototype.hex=function(){this.finalize();var e=this.h0h,t=this.h0l,o=this.h1h,r=this.h1l,a=this.h2h,n=this.h2l,s=this.h3h,i=this.h3l,l=this.h4h,c=this.h4l,d=this.h5h,p=this.h5l,u=this.h6h,g=this.h6l,f=this.h7h,y=this.h7l,m=this.bits,w=h[15&e>>28]+h[15&e>>24]+h[15&e>>20]+h[15&e>>16]+h[15&e>>12]+h[15&e>>8]+h[15&e>>4]+h[15&e]+h[15&t>>28]+h[15&t>>24]+h[15&t>>20]+h[15&t>>16]+h[15&t>>12]+h[15&t>>8]+h[15&t>>4]+h[15&t]+h[15&o>>28]+h[15&o>>24]+h[15&o>>20]+h[15&o>>16]+h[15&o>>12]+h[15&o>>8]+h[15&o>>4]+h[15&o]+h[15&r>>28]+h[15&r>>24]+h[15&r>>20]+h[15&r>>16]+h[15&r>>12]+h[15&r>>8]+h[15&r>>4]+h[15&r]+h[15&a>>28]+h[15&a>>24]+h[15&a>>20]+h[15&a>>16]+h[15&a>>12]+h[15&a>>8]+h[15&a>>4]+h[15&a]+h[15&n>>28]+h[15&n>>24]+h[15&n>>20]+h[15&n>>16]+h[15&n>>12]+h[15&n>>8]+h[15&n>>4]+h[15&n]+h[15&s>>28]+h[15&s>>24]+h[15&s>>20]+h[15&s>>16]+h[15&s>>12]+h[15&s>>8]+h[15&s>>4]+h[15&s];return 256<=m&&(w+=h[15&i>>28]+h[15&i>>24]+h[15&i>>20]+h[15&i>>16]+h[15&i>>12]+h[15&i>>8]+h[15&i>>4]+h[15&i]),384<=m&&(w+=h[15&l>>28]+h[15&l>>24]+h[15&l>>20]+h[15&l>>16]+h[15&l>>12]+h[15&l>>8]+h[15&l>>4]+h[15&l]+h[15&c>>28]+h[15&c>>24]+h[15&c>>20]+h[15&c>>16]+h[15&c>>12]+h[15&c>>8]+h[15&c>>4]+h[15&c]+h[15&d>>28]+h[15&d>>24]+h[15&d>>20]+h[15&d>>16]+h[15&d>>12]+h[15&d>>8]+h[15&d>>4]+h[15&d]+h[15&p>>28]+h[15&p>>24]+h[15&p>>20]+h[15&p>>16]+h[15&p>>12]+h[15&p>>8]+h[15&p>>4]+h[15&p]),512==m&&(w+=h[15&u>>28]+h[15&u>>24]+h[15&u>>20]+h[15&u>>16]+h[15&u>>12]+h[15&u>>8]+h[15&u>>4]+h[15&u]+h[15&g>>28]+h[15&g>>24]+h[15&g>>20]+h[15&g>>16]+h[15&g>>12]+h[15&g>>8]+h[15&g>>4]+h[15&g]+h[15&f>>28]+h[15&f>>24]+h[15&f>>20]+h[15&f>>16]+h[15&f>>12]+h[15&f>>8]+h[15&f>>4]+h[15&f]+h[15&y>>28]+h[15&y>>24]+h[15&y>>20]+h[15&y>>16]+h[15&y>>12]+h[15&y>>8]+h[15&y>>4]+h[15&y]),w},r.prototype.toString=r.prototype.hex,r.prototype.digest=function(){this.finalize();var e=this.h0h,t=this.h0l,o=this.h1h,r=this.h1l,a=this.h2h,n=this.h2l,s=this.h3h,i=this.h3l,l=this.h4h,c=this.h4l,d=this.h5h,p=this.h5l,u=this.h6h,h=this.h6l,g=this.h7h,f=this.h7l,y=this.bits,m=[255&e>>24,255&e>>16,255&e>>8,255&e,255&t>>24,255&t>>16,255&t>>8,255&t,255&o>>24,255&o>>16,255&o>>8,255&o,255&r>>24,255&r>>16,255&r>>8,255&r,255&a>>24,255&a>>16,255&a>>8,255&a,255&n>>24,255&n>>16,255&n>>8,255&n,255&s>>24,255&s>>16,255&s>>8,255&s];return 256<=y&&m.push(255&i>>24,255&i>>16,255&i>>8,255&i),384<=y&&m.push(255&l>>24,255&l>>16,255&l>>8,255&l,255&c>>24,255&c>>16,255&c>>8,255&c,255&d>>24,255&d>>16,255&d>>8,255&d,255&p>>24,255&p>>16,255&p>>8,255&p),512==y&&m.push(255&u>>24,255&u>>16,255&u>>8,255&u,255&h>>24,255&h>>16,255&h>>8,255&h,255&g>>24,255&g>>16,255&g>>8,255&g,255&f>>24,255&f>>16,255&f>>8,255&f),m},r.prototype.array=r.prototype.digest,r.prototype.arrayBuffer=function(){this.finalize();var e=this.bits,t=new ArrayBuffer(e/8),o=new DataView(t);return o.setUint32(0,this.h0h),o.setUint32(4,this.h0l),o.setUint32(8,this.h1h),o.setUint32(12,this.h1l),o.setUint32(16,this.h2h),o.setUint32(20,this.h2l),o.setUint32(24,this.h3h),256<=e&&o.setUint32(28,this.h3l),384<=e&&(o.setUint32(32,this.h4h),o.setUint32(36,this.h4l),o.setUint32(40,this.h5h),o.setUint32(44,this.h5l)),512==e&&(o.setUint32(48,this.h6h),o.setUint32(52,this.h6l),o.setUint32(56,this.h7h),o.setUint32(60,this.h7l)),t},r.prototype.clone=function(){var e=new r(this.bits,!1);return this.copyTo(e),e},r.prototype.copyTo=function(e){var t=0,o=["h0h","h0l","h1h","h1l","h2h","h2l","h3h","h3l","h4h","h4l","h5h","h5l","h6h","h6l","h7h","h7l","start","bytes","hBytes","finalized","hashed","lastByteIndex"];for(t=0;t<o.length;++t)e[o[t]]=this[o[t]];for(t=0;t<this.blocks.length;++t)e.blocks[t]=this.blocks[t]},a.prototype=new r,a.prototype.finalize=function(){if(r.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();r.call(this,this.bits,this.sharedMemory),this.update(this.oKeyPad),this.update(e),r.prototype.finalize.call(this)}},a.prototype.clone=function(){var e=new a([],this.bits,!1);this.copyTo(e),e.inner=this.inner;for(var t=0;t<this.oKeyPad.length;++t)e.oKeyPad[t]=this.oKeyPad[t];return e};var S=v(512);S.sha512=S,S.sha384=v(384),S.sha512_256=v(256),S.sha512_224=v(224),S.sha512.hmac=A(512),S.sha384.hmac=A(384),S.sha512_256.hmac=A(256),S.sha512_224.hmac=A(224),c?t.exports=S:(s.sha512=S.sha512,s.sha384=S.sha384,s.sha512_256=S.sha512_256,s.sha512_224=S.sha512_224,d&&p(function(){return S}))})()}).call(this,e("_process"),"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global)},{_process:14}],13:[function(e,t,o){'use strict';function r(e){if(null===e||e===void 0)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var a=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},o=0;10>o;o++)t["_"+d(o)]=o;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var a={};return["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t"].forEach(function(e){a[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},a)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var o=r(e),l=1,c,d;l<arguments.length;l++){for(var p in c=Object(arguments[l]),c)n.call(c,p)&&(o[p]=c[p]);if(a){d=a(c);for(var u=0;u<d.length;u++)s.call(c,d[u])&&(o[d[u]]=c[d[u]])}}return o}},{}],14:[function(e,t,o){function r(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function n(t){if(u===setTimeout)return setTimeout(t,0);if((u===r||!u)&&setTimeout)return u=setTimeout,setTimeout(t,0);try{return u(t,0)}catch(o){try{return u.call(null,t,0)}catch(o){return u.call(this,t,0)}}}function s(t){if(h===clearTimeout)return clearTimeout(t);if((h===a||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(t);try{return h(t)}catch(o){try{return h.call(null,t)}catch(o){return h.call(this,t)}}}function i(){f&&m&&(f=!1,m.length?g=m.concat(g):y=-1,g.length&&l())}function l(){if(!f){var e=n(i);f=!0;for(var t=g.length;t;){for(m=g,g=[];++y<t;)m&&m[y].run();y=-1,t=g.length}m=null,f=!1,s(e)}}function c(e,t){this.fun=e,this.array=t}function d(){}var p=t.exports={},u,h;(function(){try{u="function"==typeof setTimeout?setTimeout:r}catch(t){u=r}try{h="function"==typeof clearTimeout?clearTimeout:a}catch(t){h=a}})();var g=[],f=!1,y=-1,m;p.nextTick=function(e){var t=Array(arguments.length-1);if(1<arguments.length)for(var o=1;o<arguments.length;o++)t[o-1]=arguments[o];g.push(new c(e,t)),1!==g.length||f||n(l)},c.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=d,p.addListener=d,p.once=d,p.off=d,p.removeListener=d,p.removeAllListeners=d,p.emit=d,p.prependListener=d,p.prependOnceListener=d,p.listeners=function(e){return[]},p.binding=function(e){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(e){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},{}],15:[function(e,t,o){function r(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert"].forEach(e=>{r.prototype[e]=function(...t){return this._defaults.push({fn:e,args:t}),this}}),r.prototype._setDefaults=function(e){this._defaults.forEach(t=>{e[t.fn].apply(e,t.args)})},t.exports=r},{}],16:[function(e,t,o){function r(){}function a(e){if(!f(e))return e;const t=[];for(const o in e)n(t,o,e[o]);return t.join("&")}function n(e,t,o){if(!(null!=o))null===o&&e.push(encodeURIComponent(t));else if(Array.isArray(o))o.forEach(o=>{n(e,t,o)});else if(f(o))for(const r in o)n(e,`${t}[${r}]`,o[r]);else e.push(encodeURIComponent(t)+"="+encodeURIComponent(o))}function s(e){const t={},o=e.split("&");let r,a;for(let n=0,s=o.length;n<s;++n)r=o[n],a=r.indexOf("="),-1==a?t[decodeURIComponent(r)]="":t[decodeURIComponent(r.slice(0,a))]=decodeURIComponent(r.slice(a+1));return t}function i(e){const t=e.split(/\r?\n/),o={};let r,a,n,s;for(let l=0,i=t.length;l<i;++l)(a=t[l],r=a.indexOf(":"),-1!==r)&&(n=a.slice(0,r).toLowerCase(),s=x(a.slice(r+1)),o[n]=s);return o}function l(e){return /[\/+]json($|[^-\w])/.test(e)}function c(e){this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!=this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||"undefined"==typeof this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;let t=this.xhr.status;1223===t&&(t=204),this._setStatusProperties(t),this.header=this.headers=i(this.xhr.getAllResponseHeaders()),this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),this.body=null===this.text&&e._responseType?this.xhr.response:"HEAD"==this.req.method?null:this._parseBody(this.text?this.text:this.xhr.response)}function d(e,t){const o=this;this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",()=>{let t=null,r=null;try{r=new c(o)}catch(r){return t=new Error("Parser is unable to parse the response"),t.parse=!0,t.original=r,o.xhr?(t.rawResponse="undefined"==typeof o.xhr.responseType?o.xhr.responseText:o.xhr.response,t.status=o.xhr.status?o.xhr.status:null,t.statusCode=t.status):(t.rawResponse=null,t.status=null),o.callback(t)}o.emit("response",r);let a;try{o._isResponseOK(r)||(a=new Error(r.statusText||"Unsuccessful HTTP response"))}catch(e){a=e}a?(a.original=t,a.response=r,a.status=r.status,o.callback(a,r)):o.callback(null,r)})}function p(e,t,o){const r=w("DELETE",e);return"function"==typeof t&&(o=t,t=null),t&&r.send(t),o&&r.end(o),r}let u;"undefined"==typeof window?"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),u=this):u=self:u=window;const h=e("component-emitter"),g=e("./request-base"),f=e("./is-object"),y=e("./response-base"),m=e("./agent-base");const w=o=t.exports=function(e,t){return"function"==typeof t?new o.Request("GET",e).end(t):1==arguments.length?new o.Request("GET",e):new o.Request(e,t)};o.Request=d,w.getXHR=()=>{if(u.XMLHttpRequest&&(!u.location||"file:"!=u.location.protocol||!u.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(t){}throw Error("Browser-only version of superagent could not find XHR")};const x=e=>e.trim();w.serializeObject=a,w.parseString=s,w.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},w.serialize={"application/x-www-form-urlencoded":a,"application/json":JSON.stringify},w.parse={"application/x-www-form-urlencoded":s,"application/json":JSON.parse},y(c.prototype),c.prototype._parseBody=function(e){let t=w.parse[this.type];return this.req._parser?this.req._parser(this,e):(!t&&l(this.type)&&(t=w.parse["application/json"]),t&&e&&(e.length||e instanceof Object)?t(e):null)},c.prototype.toError=function(){const e=this.req,t=e.method,o=e.url,r=`cannot ${t} ${o} (${this.status})`,a=new Error(r);return a.status=this.status,a.method=t,a.url=o,a},w.Response=c,h(d.prototype),g(d.prototype),d.prototype.type=function(e){return this.set("Content-Type",w.types[e]||e),this},d.prototype.accept=function(e){return this.set("Accept",w.types[e]||e),this},d.prototype.auth=function(e,t,o){1===arguments.length&&(t=""),"object"==typeof t&&null!==t&&(o=t,t=""),o||(o={type:"function"==typeof btoa?"basic":"auto"});return this._auth(e,t,o,e=>{if("function"==typeof btoa)return btoa(e);throw new Error("Cannot use basic auth, btoa is not a function")})},d.prototype.query=function(e){return"string"!=typeof e&&(e=a(e)),e&&this._query.push(e),this},d.prototype.attach=function(e,t,o){if(t){if(this._data)throw Error("superagent can't mix .send() and .attach()");this._getFormData().append(e,t,o||t.name)}return this},d.prototype._getFormData=function(){return this._formData||(this._formData=new u.FormData),this._formData},d.prototype.callback=function(e,t){if(this._shouldRetry(e,t))return this._retry();const o=this._callback;this.clearTimeout(),e&&(this._maxRetries&&(e.retries=this._retries-1),this.emit("error",e)),o(e,t)},d.prototype.crossDomainError=function(){const e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},d.prototype.buffer=d.prototype.ca=d.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},d.prototype.pipe=d.prototype.write=()=>{throw Error("Streaming is not supported in browser version of superagent")},d.prototype._isHost=function(e){return e&&"object"==typeof e&&!Array.isArray(e)&&"[object Object]"!==Object.prototype.toString.call(e)},d.prototype.end=function(e){this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=e||r,this._finalizeQueryString(),this._end()},d.prototype._end=function(){if(this._aborted)return this.callback(Error("The request has been aborted even before .end() was called"));const t=this,o=this.xhr=w.getXHR();let r=this._formData||this._data;this._setTimeouts(),o.onreadystatechange=()=>{const e=o.readyState;if(2<=e&&t._responseTimeoutTimer&&clearTimeout(t._responseTimeoutTimer),4!=e)return;let r;try{r=o.status}catch(t){r=0}return r?void t.emit("end"):t.timedout||t._aborted?void 0:t.crossDomainError()};const a=(o,r)=>{0<r.total&&(r.percent=100*(r.loaded/r.total)),r.direction=o,t.emit("progress",r)};if(this.hasListeners("progress"))try{o.onprogress=a.bind(null,"download"),o.upload&&(o.upload.onprogress=a.bind(null,"upload"))}catch(t){}try{this.username&&this.password?o.open(this.method,this.url,!0,this.username,this.password):o.open(this.method,this.url,!0)}catch(e){return this.callback(e)}if(this._withCredentials&&(o.withCredentials=!0),!this._formData&&"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof r&&!this._isHost(r)){const e=this._header["content-type"];let t=this._serializer||w.serialize[e?e.split(";")[0]:""];!t&&l(e)&&(t=w.serialize["application/json"]),t&&(r=t(r))}for(const e in this.header)null!=this.header[e]&&this.header.hasOwnProperty(e)&&o.setRequestHeader(e,this.header[e]);this._responseType&&(o.responseType=this._responseType),this.emit("request",this),o.send("undefined"==typeof r?null:r)},w.agent=()=>new m,["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach(e=>{m.prototype[e.toLowerCase()]=function(t,o){const r=new w.Request(e,t);return this._setDefaults(r),o&&r.end(o),r}}),m.prototype.del=m.prototype["delete"],w.get=(e,t,o)=>{const r=w("GET",e);return"function"==typeof t&&(o=t,t=null),t&&r.query(t),o&&r.end(o),r},w.head=(e,t,o)=>{const r=w("HEAD",e);return"function"==typeof t&&(o=t,t=null),t&&r.query(t),o&&r.end(o),r},w.options=(e,t,o)=>{const r=w("OPTIONS",e);return"function"==typeof t&&(o=t,t=null),t&&r.send(t),o&&r.end(o),r},w.del=p,w["delete"]=p,w.patch=(e,t,o)=>{const r=w("PATCH",e);return"function"==typeof t&&(o=t,t=null),t&&r.send(t),o&&r.end(o),r},w.post=(e,t,o)=>{const r=w("POST",e);return"function"==typeof t&&(o=t,t=null),t&&r.send(t),o&&r.end(o),r},w.put=(e,t,o)=>{const r=w("PUT",e);return"function"==typeof t&&(o=t,t=null),t&&r.send(t),o&&r.end(o),r}},{"./agent-base":15,"./is-object":17,"./request-base":18,"./response-base":19,"component-emitter":9}],17:[function(e,t,o){'use strict';t.exports=function(e){return null!==e&&"object"==typeof e}},{}],18:[function(e,t,o){'use strict';function r(e){if(e)return a(e)}function a(e){for(const t in r.prototype)e[t]=r.prototype[t];return e}const n=e("./is-object");t.exports=r,r.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,this},r.prototype.parse=function(e){return this._parser=e,this},r.prototype.responseType=function(e){return this._responseType=e,this},r.prototype.serialize=function(e){return this._serializer=e,this},r.prototype.timeout=function(e){if(!e||"object"!=typeof e)return this._timeout=e,this._responseTimeout=0,this;for(const t in e)"deadline"==t?this._timeout=e.deadline:"response"===t?this._responseTimeout=e.response:console.warn("Unknown timeout option",t);return this},r.prototype.retry=function(e,t){return(0===arguments.length||!0===e)&&(e=1),0>=e&&(e=0),this._maxRetries=e,this._retries=0,this._retryCallback=t,this};const s=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];r.prototype._shouldRetry=function(e,t){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{const o=this._retryCallback(e,t);if(!0===o)return!0;if(!1===o)return!1}catch(t){console.error(t)}if(t&&t.status&&500<=t.status&&501!=t.status)return!0;if(e){if(e.code&&~s.indexOf(e.code))return!0;if(e.timeout&&"ECONNABORTED"==e.code)return!0;if(e.crossDomain)return!0}return!1},r.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},r.prototype.then=function(e,t){if(!this._fullfilledPromise){const e=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise((t,o)=>{e.on("error",o),e.on("abort",()=>{const e=new Error("Aborted");e.code="ABORTED",e.status=this.status,e.method=this.method,e.url=this.url,o(e)}),e.end((e,r)=>{e?o(e):t(r)})})}return this._fullfilledPromise.then(e,t)},r.prototype["catch"]=function(e){return this.then(void 0,e)},r.prototype.use=function(e){return e(this),this},r.prototype.ok=function(e){if("function"!=typeof e)throw Error("Callback required");return this._okCallback=e,this},r.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):200<=e.status&&300>e.status)},r.prototype.get=function(e){return this._header[e.toLowerCase()]},r.prototype.getHeader=r.prototype.get,r.prototype.set=function(e,t){if(n(e)){for(const t in e)this.set(t,e[t]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},r.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},r.prototype.field=function(e,t){if(null===e||void 0===e)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(n(e)){for(const t in e)this.field(t,e[t]);return this}if(Array.isArray(t)){for(const o in t)this.field(e,t[o]);return this}if(null===t||void 0===t)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof t&&(t=""+t),this._getFormData().append(e,t),this},r.prototype.abort=function(){return this._aborted?this:(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort"),this)},r.prototype._auth=function(e,t,o,r){switch(o.type){case"basic":this.set("Authorization",`Basic ${r(`${e}:${t}`)}`);break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization",`Bearer ${e}`);}return this},r.prototype.withCredentials=function(e){return null==e&&(e=!0),this._withCredentials=e,this},r.prototype.redirects=function(e){return this._maxRedirects=e,this},r.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw TypeError("Invalid argument");return this._maxResponseSize=e,this},r.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},r.prototype.send=function(e){const t=n(e);let o=this._header["content-type"];if(this._formData)throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");if(t&&!this._data)Array.isArray(e)?this._data=[]:!this._isHost(e)&&(this._data={});else if(e&&this._data&&this._isHost(this._data))throw Error("Can't merge these send calls");if(t&&n(this._data))for(const t in e)this._data[t]=e[t];else"string"==typeof e?(o||this.type("form"),o=this._header["content-type"],this._data="application/x-www-form-urlencoded"==o?this._data?`${this._data}&${e}`:e:(this._data||"")+e):this._data=e;return!t||this._isHost(e)?this:(o||this.type("json"),this)},r.prototype.sortQuery=function(e){return this._sort="undefined"==typeof e||e,this},r.prototype._finalizeQueryString=function(){const e=this._query.join("&");if(e&&(this.url+=(0<=this.url.indexOf("?")?"&":"?")+e),this._query.length=0,this._sort){const e=this.url.indexOf("?");if(0<=e){const t=this.url.substring(e+1).split("&");"function"==typeof this._sort?t.sort(this._sort):t.sort(),this.url=this.url.substring(0,e)+"?"+t.join("&")}}},r.prototype._appendQueryString=()=>{console.trace("Unsupported")},r.prototype._timeoutError=function(e,t,o){if(!this._aborted){const r=new Error(`${e+t}ms exceeded`);r.timeout=t,r.code="ECONNABORTED",r.errno=o,this.timedout=!0,this.abort(),this.callback(r)}},r.prototype._setTimeouts=function(){const e=this;this._timeout&&!this._timer&&(this._timer=setTimeout(()=>{e._timeoutError("Timeout of ",e._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(()=>{e._timeoutError("Response timeout of ",e._responseTimeout,"ETIMEDOUT")},this._responseTimeout))}},{"./is-object":17}],19:[function(e,t,o){'use strict';function r(e){if(e)return a(e)}function a(e){for(const t in r.prototype)e[t]=r.prototype[t];return e}const n=e("./utils");t.exports=r,r.prototype.get=function(e){return this.header[e.toLowerCase()]},r.prototype._setHeaderProperties=function(e){const t=e["content-type"]||"";this.type=n.type(t);const o=n.params(t);for(const t in o)this[t]=o[t];this.links={};try{e.link&&(this.links=n.parseLinks(e.link))}catch(e){}},r.prototype._setStatusProperties=function(e){const t=0|e/100;this.status=this.statusCode=e,this.statusType=t,this.info=1==t,this.ok=2==t,this.redirect=3==t,this.clientError=4==t,this.serverError=5==t,this.error=!(4!=t&&5!=t)&&this.toError(),this.created=201==e,this.accepted=202==e,this.noContent=204==e,this.badRequest=400==e,this.unauthorized=401==e,this.notAcceptable=406==e,this.forbidden=403==e,this.notFound=404==e,this.unprocessableEntity=422==e}},{"./utils":20}],20:[function(e,t,o){'use strict';o.type=e=>e.split(/ *; */).shift(),o.params=e=>e.split(/ *; */).reduce((e,t)=>{const o=t.split(/ *= */),r=o.shift(),a=o.shift();return r&&a&&(e[r]=a),e},{}),o.parseLinks=e=>e.split(/ *, */).reduce((e,t)=>{const o=t.split(/ *; */),r=o[0].slice(1,-1),a=o[1].split(/ *= */)[1].slice(1,-1);return e[a]=r,e},{}),o.cleanHeader=(e,t)=>(delete e["content-type"],delete e["content-length"],delete e["transfer-encoding"],delete e.host,t&&(delete e.authorization,delete e.cookie),e)},{}],21:[function(e,t,r){(function(t){'use strict';function r(e,t,o,r){e[t]=255&o>>24,e[t+1]=255&o>>16,e[t+2]=255&o>>8,e[t+3]=255&o,e[t+4]=255&r>>24,e[t+5]=255&r>>16,e[t+6]=255&r>>8,e[t+7]=255&r}function a(e,t,o,r,a){var n=0,s;for(s=0;s<a;s++)n|=e[t+s]^o[r+s];return(1&n-1>>>8)-1}function i(e,t,o,r){return a(e,t,o,r,16)}function l(e,t,o,r){return a(e,t,o,r,32)}function d(e,t,o,r){for(var a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,n=255&o[0]|(255&o[1])<<8|(255&o[2])<<16|(255&o[3])<<24,s=255&o[4]|(255&o[5])<<8|(255&o[6])<<16|(255&o[7])<<24,l=255&o[8]|(255&o[9])<<8|(255&o[10])<<16|(255&o[11])<<24,c=255&o[12]|(255&o[13])<<8|(255&o[14])<<16|(255&o[15])<<24,d=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,p=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,h=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,g=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,f=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,y=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,m=255&o[16]|(255&o[17])<<8|(255&o[18])<<16|(255&o[19])<<24,w=255&o[20]|(255&o[21])<<8|(255&o[22])<<16|(255&o[23])<<24,x=255&o[24]|(255&o[25])<<8|(255&o[26])<<16|(255&o[27])<<24,v=255&o[28]|(255&o[29])<<8|(255&o[30])<<16|(255&o[31])<<24,k=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,A=a,S=n,T=s,E=l,U=c,B=d,I=p,R=h,z=g,D=f,C=y,L=m,O=w,N=x,P=v,j=k,M=0,K;20>M;M+=2)K=0|A+O,U^=K<<7|K>>>25,K=0|U+A,z^=K<<9|K>>>23,K=0|z+U,O^=K<<13|K>>>19,K=0|O+z,A^=K<<18|K>>>14,K=0|B+S,D^=K<<7|K>>>25,K=0|D+B,N^=K<<9|K>>>23,K=0|N+D,S^=K<<13|K>>>19,K=0|S+N,B^=K<<18|K>>>14,K=0|C+I,P^=K<<7|K>>>25,K=0|P+C,T^=K<<9|K>>>23,K=0|T+P,I^=K<<13|K>>>19,K=0|I+T,C^=K<<18|K>>>14,K=0|j+L,E^=K<<7|K>>>25,K=0|E+j,R^=K<<9|K>>>23,K=0|R+E,L^=K<<13|K>>>19,K=0|L+R,j^=K<<18|K>>>14,K=0|A+E,S^=K<<7|K>>>25,K=0|S+A,T^=K<<9|K>>>23,K=0|T+S,E^=K<<13|K>>>19,K=0|E+T,A^=K<<18|K>>>14,K=0|B+U,I^=K<<7|K>>>25,K=0|I+B,R^=K<<9|K>>>23,K=0|R+I,U^=K<<13|K>>>19,K=0|U+R,B^=K<<18|K>>>14,K=0|C+D,L^=K<<7|K>>>25,K=0|L+C,z^=K<<9|K>>>23,K=0|z+L,D^=K<<13|K>>>19,K=0|D+z,C^=K<<18|K>>>14,K=0|j+P,O^=K<<7|K>>>25,K=0|O+j,N^=K<<9|K>>>23,K=0|N+O,P^=K<<13|K>>>19,K=0|P+N,j^=K<<18|K>>>14;A=0|A+a,S=0|S+n,T=0|T+s,E=0|E+l,U=0|U+c,B=0|B+d,I=0|I+p,R=0|R+h,z=0|z+g,D=0|D+f,C=0|C+y,L=0|L+m,O=0|O+w,N=0|N+x,P=0|P+v,j=0|j+k,e[0]=255&A>>>0,e[1]=255&A>>>8,e[2]=255&A>>>16,e[3]=255&A>>>24,e[4]=255&S>>>0,e[5]=255&S>>>8,e[6]=255&S>>>16,e[7]=255&S>>>24,e[8]=255&T>>>0,e[9]=255&T>>>8,e[10]=255&T>>>16,e[11]=255&T>>>24,e[12]=255&E>>>0,e[13]=255&E>>>8,e[14]=255&E>>>16,e[15]=255&E>>>24,e[16]=255&U>>>0,e[17]=255&U>>>8,e[18]=255&U>>>16,e[19]=255&U>>>24,e[20]=255&B>>>0,e[21]=255&B>>>8,e[22]=255&B>>>16,e[23]=255&B>>>24,e[24]=255&I>>>0,e[25]=255&I>>>8,e[26]=255&I>>>16,e[27]=255&I>>>24,e[28]=255&R>>>0,e[29]=255&R>>>8,e[30]=255&R>>>16,e[31]=255&R>>>24,e[32]=255&z>>>0,e[33]=255&z>>>8,e[34]=255&z>>>16,e[35]=255&z>>>24,e[36]=255&D>>>0,e[37]=255&D>>>8,e[38]=255&D>>>16,e[39]=255&D>>>24,e[40]=255&C>>>0,e[41]=255&C>>>8,e[42]=255&C>>>16,e[43]=255&C>>>24,e[44]=255&L>>>0,e[45]=255&L>>>8,e[46]=255&L>>>16,e[47]=255&L>>>24,e[48]=255&O>>>0,e[49]=255&O>>>8,e[50]=255&O>>>16,e[51]=255&O>>>24,e[52]=255&N>>>0,e[53]=255&N>>>8,e[54]=255&N>>>16,e[55]=255&N>>>24,e[56]=255&P>>>0,e[57]=255&P>>>8,e[58]=255&P>>>16,e[59]=255&P>>>24,e[60]=255&j>>>0,e[61]=255&j>>>8,e[62]=255&j>>>16,e[63]=255&j>>>24}function p(e,t,o,r){for(var a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,n=255&o[0]|(255&o[1])<<8|(255&o[2])<<16|(255&o[3])<<24,s=255&o[4]|(255&o[5])<<8|(255&o[6])<<16|(255&o[7])<<24,l=255&o[8]|(255&o[9])<<8|(255&o[10])<<16|(255&o[11])<<24,c=255&o[12]|(255&o[13])<<8|(255&o[14])<<16|(255&o[15])<<24,d=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,p=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,h=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,g=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,f=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,y=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,m=255&o[16]|(255&o[17])<<8|(255&o[18])<<16|(255&o[19])<<24,w=255&o[20]|(255&o[21])<<8|(255&o[22])<<16|(255&o[23])<<24,x=255&o[24]|(255&o[25])<<8|(255&o[26])<<16|(255&o[27])<<24,v=255&o[28]|(255&o[29])<<8|(255&o[30])<<16|(255&o[31])<<24,k=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,A=a,S=n,T=s,E=l,U=c,B=d,I=p,R=h,z=g,D=f,C=y,L=m,O=w,N=x,P=v,j=k,M=0,K;20>M;M+=2)K=0|A+O,U^=K<<7|K>>>25,K=0|U+A,z^=K<<9|K>>>23,K=0|z+U,O^=K<<13|K>>>19,K=0|O+z,A^=K<<18|K>>>14,K=0|B+S,D^=K<<7|K>>>25,K=0|D+B,N^=K<<9|K>>>23,K=0|N+D,S^=K<<13|K>>>19,K=0|S+N,B^=K<<18|K>>>14,K=0|C+I,P^=K<<7|K>>>25,K=0|P+C,T^=K<<9|K>>>23,K=0|T+P,I^=K<<13|K>>>19,K=0|I+T,C^=K<<18|K>>>14,K=0|j+L,E^=K<<7|K>>>25,K=0|E+j,R^=K<<9|K>>>23,K=0|R+E,L^=K<<13|K>>>19,K=0|L+R,j^=K<<18|K>>>14,K=0|A+E,S^=K<<7|K>>>25,K=0|S+A,T^=K<<9|K>>>23,K=0|T+S,E^=K<<13|K>>>19,K=0|E+T,A^=K<<18|K>>>14,K=0|B+U,I^=K<<7|K>>>25,K=0|I+B,R^=K<<9|K>>>23,K=0|R+I,U^=K<<13|K>>>19,K=0|U+R,B^=K<<18|K>>>14,K=0|C+D,L^=K<<7|K>>>25,K=0|L+C,z^=K<<9|K>>>23,K=0|z+L,D^=K<<13|K>>>19,K=0|D+z,C^=K<<18|K>>>14,K=0|j+P,O^=K<<7|K>>>25,K=0|O+j,N^=K<<9|K>>>23,K=0|N+O,P^=K<<13|K>>>19,K=0|P+N,j^=K<<18|K>>>14;e[0]=255&A>>>0,e[1]=255&A>>>8,e[2]=255&A>>>16,e[3]=255&A>>>24,e[4]=255&B>>>0,e[5]=255&B>>>8,e[6]=255&B>>>16,e[7]=255&B>>>24,e[8]=255&C>>>0,e[9]=255&C>>>8,e[10]=255&C>>>16,e[11]=255&C>>>24,e[12]=255&j>>>0,e[13]=255&j>>>8,e[14]=255&j>>>16,e[15]=255&j>>>24,e[16]=255&I>>>0,e[17]=255&I>>>8,e[18]=255&I>>>16,e[19]=255&I>>>24,e[20]=255&R>>>0,e[21]=255&R>>>8,e[22]=255&R>>>16,e[23]=255&R>>>24,e[24]=255&z>>>0,e[25]=255&z>>>8,e[26]=255&z>>>16,e[27]=255&z>>>24,e[28]=255&D>>>0,e[29]=255&D>>>8,e[30]=255&D>>>16,e[31]=255&D>>>24}function u(e,t,o,r){d(e,t,o,r)}function h(e,t,o,r){p(e,t,o,r)}function g(e,t,o,r,a,s,n){var l=new Uint8Array(16),c=new Uint8Array(64),d,p;for(p=0;16>p;p++)l[p]=0;for(p=0;8>p;p++)l[p]=s[p];for(;64<=a;){for(u(c,l,n,I),p=0;64>p;p++)e[t+p]=o[r+p]^c[p];for(d=1,p=8;16>p;p++)d=0|d+(255&l[p]),l[p]=255&d,d>>>=8;a-=64,t+=64,r+=64}if(0<a)for(u(c,l,n,I),p=0;p<a;p++)e[t+p]=o[r+p]^c[p];return 0}function f(e,t,o,r,a){var n=new Uint8Array(16),s=new Uint8Array(64),l,c;for(c=0;16>c;c++)n[c]=0;for(c=0;8>c;c++)n[c]=r[c];for(;64<=o;){for(u(s,n,a,I),c=0;64>c;c++)e[t+c]=s[c];for(l=1,c=8;16>c;c++)l=0|l+(255&n[c]),n[c]=255&l,l>>>=8;o-=64,t+=64}if(0<o)for(u(s,n,a,I),c=0;c<o;c++)e[t+c]=s[c];return 0}function y(e,t,o,r,a){var n=new Uint8Array(32);h(n,r,a,I);for(var s=new Uint8Array(8),l=0;8>l;l++)s[l]=r[l+16];return f(e,t,o,s,n)}function w(e,t,o,r,a,l,n){var c=new Uint8Array(32);h(c,l,n,I);for(var s=new Uint8Array(8),d=0;8>d;d++)s[d]=l[d+16];return g(e,t,o,r,a,s,c)}function v(e,t,o,r,a,n){var i=new me(n);return i.update(o,r,a),i.finish(e,t),0}function T(e,t,o,r,a,n){var s=new Uint8Array(16);return v(s,0,o,r,a,n),i(e,t,s,0)}function E(e,t,o,r,a){var n;if(32>o)return-1;for(w(e,0,t,0,o,r,a),v(e,16,e,32,o-32,e),n=0;16>n;n++)e[n]=0;return 0}function U(e,t,o,r,a){var n=new Uint8Array(32),s;if(32>o)return-1;if(y(n,0,32,r,a),0!==T(t,16,t,32,o-32,n))return-1;for(w(e,0,t,0,o,r,a),s=0;32>s;s++)e[s]=0;return 0}function B(e,t){var o;for(o=0;16>o;o++)e[o]=0|t[o]}function R(e){var t=1,o,r;for(o=0;16>o;o++)r=e[o]+t+65535,t=s(r/65536),e[o]=r-65536*t;e[0]+=t-1+37*(t-1)}function C(e,o,r){for(var a=0,n;16>a;a++)n=~(r-1)&(e[a]^o[a]),e[a]^=n,o[a]^=n}function O(e,o){var r=de(),a=de(),t,n,s;for(t=0;16>t;t++)a[t]=o[t];for(R(a),R(a),R(a),n=0;2>n;n++){for(r[0]=a[0]-65517,t=1;15>t;t++)r[t]=a[t]-65535-(1&r[t-1]>>16),r[t-1]&=65535;r[15]=a[15]-32767-(1&r[14]>>16),s=1&r[15]>>16,r[14]&=65535,C(a,r,1-s)}for(t=0;16>t;t++)e[2*t]=255&a[t],e[2*t+1]=a[t]>>8}function N(e,t){var o=new Uint8Array(32),r=new Uint8Array(32);return O(o,e),O(r,t),l(o,0,r,0)}function P(e){var t=new Uint8Array(32);return O(t,e),1&t[0]}function j(e,t){var o;for(o=0;16>o;o++)e[o]=t[2*o]+(t[2*o+1]<<8);e[15]&=32767}function H(e,t,o){for(var r=0;16>r;r++)e[r]=t[r]+o[r]}function n(e,t,o){for(var r=0;16>r;r++)e[r]=t[r]-o[r]}function m(e,t,o){var r=0,a=0,n=0,i=0,l=0,d=0,p=0,u=0,h=0,g=0,f=0,y=0,m=0,w=0,x=0,k=0,A=0,S=0,T=0,E=0,U=0,B=0,I=0,R=0,z=0,D=0,C=0,L=0,O=0,N=0,P=0,j=o[0],M=o[1],K=o[2],H=o[3],G=o[4],q=o[5],F=o[6],V=o[7],W=o[8],Y=o[9],X=o[10],J=o[11],Q=o[12],Z=o[13],$=o[14],ee=o[15],te,oe;te=t[0],r+=te*j,a+=te*M,n+=te*K,i+=te*H,l+=te*G,d+=te*q,p+=te*F,u+=te*V,h+=te*W,g+=te*Y,f+=te*X,y+=te*J,m+=te*Q,w+=te*Z,x+=te*$,k+=te*ee,te=t[1],a+=te*j,n+=te*M,i+=te*K,l+=te*H,d+=te*G,p+=te*q,u+=te*F,h+=te*V,g+=te*W,f+=te*Y,y+=te*X,m+=te*J,w+=te*Q,x+=te*Z,k+=te*$,A+=te*ee,te=t[2],n+=te*j,i+=te*M,l+=te*K,d+=te*H,p+=te*G,u+=te*q,h+=te*F,g+=te*V,f+=te*W,y+=te*Y,m+=te*X,w+=te*J,x+=te*Q,k+=te*Z,A+=te*$,S+=te*ee,te=t[3],i+=te*j,l+=te*M,d+=te*K,p+=te*H,u+=te*G,h+=te*q,g+=te*F,f+=te*V,y+=te*W,m+=te*Y,w+=te*X,x+=te*J,k+=te*Q,A+=te*Z,S+=te*$,T+=te*ee,te=t[4],l+=te*j,d+=te*M,p+=te*K,u+=te*H,h+=te*G,g+=te*q,f+=te*F,y+=te*V,m+=te*W,w+=te*Y,x+=te*X,k+=te*J,A+=te*Q,S+=te*Z,T+=te*$,E+=te*ee,te=t[5],d+=te*j,p+=te*M,u+=te*K,h+=te*H,g+=te*G,f+=te*q,y+=te*F,m+=te*V,w+=te*W,x+=te*Y,k+=te*X,A+=te*J,S+=te*Q,T+=te*Z,E+=te*$,U+=te*ee,te=t[6],p+=te*j,u+=te*M,h+=te*K,g+=te*H,f+=te*G,y+=te*q,m+=te*F,w+=te*V,x+=te*W,k+=te*Y,A+=te*X,S+=te*J,T+=te*Q,E+=te*Z,U+=te*$,B+=te*ee,te=t[7],u+=te*j,h+=te*M,g+=te*K,f+=te*H,y+=te*G,m+=te*q,w+=te*F,x+=te*V,k+=te*W,A+=te*Y,S+=te*X,T+=te*J,E+=te*Q,U+=te*Z,B+=te*$,I+=te*ee,te=t[8],h+=te*j,g+=te*M,f+=te*K,y+=te*H,m+=te*G,w+=te*q,x+=te*F,k+=te*V,A+=te*W,S+=te*Y,T+=te*X,E+=te*J,U+=te*Q,B+=te*Z,I+=te*$,R+=te*ee,te=t[9],g+=te*j,f+=te*M,y+=te*K,m+=te*H,w+=te*G,x+=te*q,k+=te*F,A+=te*V,S+=te*W,T+=te*Y,E+=te*X,U+=te*J,B+=te*Q,I+=te*Z,R+=te*$,z+=te*ee,te=t[10],f+=te*j,y+=te*M,m+=te*K,w+=te*H,x+=te*G,k+=te*q,A+=te*F,S+=te*V,T+=te*W,E+=te*Y,U+=te*X,B+=te*J,I+=te*Q,R+=te*Z,z+=te*$,D+=te*ee,te=t[11],y+=te*j,m+=te*M,w+=te*K,x+=te*H,k+=te*G,A+=te*q,S+=te*F,T+=te*V,E+=te*W,U+=te*Y,B+=te*X,I+=te*J,R+=te*Q,z+=te*Z,D+=te*$,C+=te*ee,te=t[12],m+=te*j,w+=te*M,x+=te*K,k+=te*H,A+=te*G,S+=te*q,T+=te*F,E+=te*V,U+=te*W,B+=te*Y,I+=te*X,R+=te*J,z+=te*Q,D+=te*Z,C+=te*$,L+=te*ee,te=t[13],w+=te*j,x+=te*M,k+=te*K,A+=te*H,S+=te*G,T+=te*q,E+=te*F,U+=te*V,B+=te*W,I+=te*Y,R+=te*X,z+=te*J,D+=te*Q,C+=te*Z,L+=te*$,O+=te*ee,te=t[14],x+=te*j,k+=te*M,A+=te*K,S+=te*H,T+=te*G,E+=te*q,U+=te*F,B+=te*V,I+=te*W,R+=te*Y,z+=te*X,D+=te*J,C+=te*Q,L+=te*Z,O+=te*$,N+=te*ee,te=t[15],k+=te*j,A+=te*M,S+=te*K,T+=te*H,E+=te*G,U+=te*q,B+=te*F,I+=te*V,R+=te*W,z+=te*Y,D+=te*X,C+=te*J,L+=te*Q,O+=te*Z,N+=te*$,P+=te*ee,r+=38*A,a+=38*S,n+=38*T,i+=38*E,l+=38*U,d+=38*B,p+=38*I,u+=38*R,h+=38*z,g+=38*D,f+=38*C,y+=38*L,m+=38*O,w+=38*N,x+=38*P,oe=1,te=r+oe+65535,oe=s(te/65536),r=te-65536*oe,te=a+oe+65535,oe=s(te/65536),a=te-65536*oe,te=n+oe+65535,oe=s(te/65536),n=te-65536*oe,te=i+oe+65535,oe=s(te/65536),i=te-65536*oe,te=l+oe+65535,oe=s(te/65536),l=te-65536*oe,te=d+oe+65535,oe=s(te/65536),d=te-65536*oe,te=p+oe+65535,oe=s(te/65536),p=te-65536*oe,te=u+oe+65535,oe=s(te/65536),u=te-65536*oe,te=h+oe+65535,oe=s(te/65536),h=te-65536*oe,te=g+oe+65535,oe=s(te/65536),g=te-65536*oe,te=f+oe+65535,oe=s(te/65536),f=te-65536*oe,te=y+oe+65535,oe=s(te/65536),y=te-65536*oe,te=m+oe+65535,oe=s(te/65536),m=te-65536*oe,te=w+oe+65535,oe=s(te/65536),w=te-65536*oe,te=x+oe+65535,oe=s(te/65536),x=te-65536*oe,te=k+oe+65535,oe=s(te/65536),k=te-65536*oe,r+=oe-1+37*(oe-1),oe=1,te=r+oe+65535,oe=s(te/65536),r=te-65536*oe,te=a+oe+65535,oe=s(te/65536),a=te-65536*oe,te=n+oe+65535,oe=s(te/65536),n=te-65536*oe,te=i+oe+65535,oe=s(te/65536),i=te-65536*oe,te=l+oe+65535,oe=s(te/65536),l=te-65536*oe,te=d+oe+65535,oe=s(te/65536),d=te-65536*oe,te=p+oe+65535,oe=s(te/65536),p=te-65536*oe,te=u+oe+65535,oe=s(te/65536),u=te-65536*oe,te=h+oe+65535,oe=s(te/65536),h=te-65536*oe,te=g+oe+65535,oe=s(te/65536),g=te-65536*oe,te=f+oe+65535,oe=s(te/65536),f=te-65536*oe,te=y+oe+65535,oe=s(te/65536),y=te-65536*oe,te=m+oe+65535,oe=s(te/65536),m=te-65536*oe,te=w+oe+65535,oe=s(te/65536),w=te-65536*oe,te=x+oe+65535,oe=s(te/65536),x=te-65536*oe,te=k+oe+65535,oe=s(te/65536),k=te-65536*oe,r+=oe-1+37*(oe-1),e[0]=r,e[1]=a,e[2]=n,e[3]=i,e[4]=l,e[5]=d,e[6]=p,e[7]=u,e[8]=h,e[9]=g,e[10]=f,e[11]=y,e[12]=m,e[13]=w,e[14]=x,e[15]=k}function k(e,t){m(e,t,t)}function A(e,t){var o=de(),r;for(r=0;16>r;r++)o[r]=t[r];for(r=253;0<=r;r--)k(o,o),2!==r&&4!==r&&m(o,o,t);for(r=0;16>r;r++)e[r]=o[r]}function S(e,t){var o=de(),r;for(r=0;16>r;r++)o[r]=t[r];for(r=250;0<=r;r--)k(o,o),1!==r&&m(o,o,t);for(r=0;16>r;r++)e[r]=o[r]}function z(t,o,s){var l=new Uint8Array(32),p=new Float64Array(80),u=de(),a=de(),h=de(),c=de(),d=de(),e=de(),g,f;for(f=0;31>f;f++)l[f]=o[f];for(l[31]=64|127&o[31],l[0]&=248,j(p,s),f=0;16>f;f++)a[f]=p[f],c[f]=u[f]=h[f]=0;for(u[0]=c[0]=1,f=254;0<=f;--f)g=1&l[f>>>3]>>>(7&f),C(u,a,g),C(h,c,g),H(d,u,h),n(u,u,h),H(h,a,c),n(a,a,c),k(c,d),k(e,u),m(u,h,u),m(h,a,d),H(d,u,h),n(u,u,h),k(a,u),n(h,c,e),m(u,h,ge),H(u,u,c),m(h,h,u),m(u,c,e),m(c,a,p),k(a,d),C(u,a,g),C(h,c,g);for(f=0;16>f;f++)p[f+16]=u[f],p[f+32]=h[f],p[f+48]=a[f],p[f+64]=c[f];var y=p.subarray(32),w=p.subarray(16);return A(y,y),m(w,w,y),O(t,w),0}function M(e,t){return z(e,t,x)}function G(e,t){return c(t,32),M(e,t)}function q(e,t,o){var r=new Uint8Array(32);return z(r,o,t),h(e,pe,r,I)}function F(e,t,o,r){for(var s=new Int32Array(16),p=new Int32Array(16),u=e[0],g=e[1],f=e[2],y=e[3],m=e[4],w=e[5],x=e[6],v=e[7],k=t[0],A=t[1],S=t[2],T=t[3],E=t[4],U=t[5],B=t[6],I=t[7],R=0,z,D,C,L,O,N,P,M,K,H,G,q,F,V,W,Y,X,J,Q,Z,$,ee,te,oe,re,ae;128<=r;){for(Q=0;16>Q;Q++)Z=8*Q+R,s[Q]=o[Z+0]<<24|o[Z+1]<<16|o[Z+2]<<8|o[Z+3],p[Q]=o[Z+4]<<24|o[Z+5]<<16|o[Z+6]<<8|o[Z+7];for(Q=0;80>Q;Q++)if(z=u,D=g,C=f,L=y,O=m,N=w,P=x,M=v,K=k,H=A,G=S,q=T,F=E,V=U,W=B,Y=I,$=v,ee=I,te=65535&ee,oe=ee>>>16,re=65535&$,ae=$>>>16,$=(m>>>14|E<<18)^(m>>>18|E<<14)^(E>>>9|m<<23),ee=(E>>>14|m<<18)^(E>>>18|m<<14)^(m>>>9|E<<23),te+=65535&ee,oe+=ee>>>16,re+=65535&$,ae+=$>>>16,$=m&w^~m&x,ee=E&U^~E&B,te+=65535&ee,oe+=ee>>>16,re+=65535&$,ae+=$>>>16,$=we[2*Q],ee=we[2*Q+1],te+=65535&ee,oe+=ee>>>16,re+=65535&$,ae+=$>>>16,$=s[Q%16],ee=p[Q%16],te+=65535&ee,oe+=ee>>>16,re+=65535&$,ae+=$>>>16,oe+=te>>>16,re+=oe>>>16,ae+=re>>>16,X=65535&re|ae<<16,J=65535&te|oe<<16,$=X,ee=J,te=65535&ee,oe=ee>>>16,re=65535&$,ae=$>>>16,$=(u>>>28|k<<4)^(k>>>2|u<<30)^(k>>>7|u<<25),ee=(k>>>28|u<<4)^(u>>>2|k<<30)^(u>>>7|k<<25),te+=65535&ee,oe+=ee>>>16,re+=65535&$,ae+=$>>>16,$=u&g^u&f^g&f,ee=k&A^k&S^A&S,te+=65535&ee,oe+=ee>>>16,re+=65535&$,ae+=$>>>16,oe+=te>>>16,re+=oe>>>16,ae+=re>>>16,M=65535&re|ae<<16,Y=65535&te|oe<<16,$=L,ee=q,te=65535&ee,oe=ee>>>16,re=65535&$,ae=$>>>16,$=X,ee=J,te+=65535&ee,oe+=ee>>>16,re+=65535&$,ae+=$>>>16,oe+=te>>>16,re+=oe>>>16,ae+=re>>>16,L=65535&re|ae<<16,q=65535&te|oe<<16,g=z,f=D,y=C,m=L,w=O,x=N,v=P,u=M,A=K,S=H,T=G,E=q,U=F,B=V,I=W,k=Y,15==Q%16)for(Z=0;16>Z;Z++)$=s[Z],ee=p[Z],te=65535&ee,oe=ee>>>16,re=65535&$,ae=$>>>16,$=s[(Z+9)%16],ee=p[(Z+9)%16],te+=65535&ee,oe+=ee>>>16,re+=65535&$,ae+=$>>>16,X=s[(Z+1)%16],J=p[(Z+1)%16],$=(X>>>1|J<<31)^(X>>>8|J<<24)^X>>>7,ee=(J>>>1|X<<31)^(J>>>8|X<<24)^(J>>>7|X<<25),te+=65535&ee,oe+=ee>>>16,re+=65535&$,ae+=$>>>16,X=s[(Z+14)%16],J=p[(Z+14)%16],$=(X>>>19|J<<13)^(J>>>29|X<<3)^X>>>6,ee=(J>>>19|X<<13)^(X>>>29|J<<3)^(J>>>6|X<<26),te+=65535&ee,oe+=ee>>>16,re+=65535&$,ae+=$>>>16,oe+=te>>>16,re+=oe>>>16,ae+=re>>>16,s[Z]=65535&re|ae<<16,p[Z]=65535&te|oe<<16;$=u,ee=k,te=65535&ee,oe=ee>>>16,re=65535&$,ae=$>>>16,$=e[0],ee=t[0],te+=65535&ee,oe+=ee>>>16,re+=65535&$,ae+=$>>>16,oe+=te>>>16,re+=oe>>>16,ae+=re>>>16,e[0]=u=65535&re|ae<<16,t[0]=k=65535&te|oe<<16,$=g,ee=A,te=65535&ee,oe=ee>>>16,re=65535&$,ae=$>>>16,$=e[1],ee=t[1],te+=65535&ee,oe+=ee>>>16,re+=65535&$,ae+=$>>>16,oe+=te>>>16,re+=oe>>>16,ae+=re>>>16,e[1]=g=65535&re|ae<<16,t[1]=A=65535&te|oe<<16,$=f,ee=S,te=65535&ee,oe=ee>>>16,re=65535&$,ae=$>>>16,$=e[2],ee=t[2],te+=65535&ee,oe+=ee>>>16,re+=65535&$,ae+=$>>>16,oe+=te>>>16,re+=oe>>>16,ae+=re>>>16,e[2]=f=65535&re|ae<<16,t[2]=S=65535&te|oe<<16,$=y,ee=T,te=65535&ee,oe=ee>>>16,re=65535&$,ae=$>>>16,$=e[3],ee=t[3],te+=65535&ee,oe+=ee>>>16,re+=65535&$,ae+=$>>>16,oe+=te>>>16,re+=oe>>>16,ae+=re>>>16,e[3]=y=65535&re|ae<<16,t[3]=T=65535&te|oe<<16,$=m,ee=E,te=65535&ee,oe=ee>>>16,re=65535&$,ae=$>>>16,$=e[4],ee=t[4],te+=65535&ee,oe+=ee>>>16,re+=65535&$,ae+=$>>>16,oe+=te>>>16,re+=oe>>>16,ae+=re>>>16,e[4]=m=65535&re|ae<<16,t[4]=E=65535&te|oe<<16,$=w,ee=U,te=65535&ee,oe=ee>>>16,re=65535&$,ae=$>>>16,$=e[5],ee=t[5],te+=65535&ee,oe+=ee>>>16,re+=65535&$,ae+=$>>>16,oe+=te>>>16,re+=oe>>>16,ae+=re>>>16,e[5]=w=65535&re|ae<<16,t[5]=U=65535&te|oe<<16,$=x,ee=B,te=65535&ee,oe=ee>>>16,re=65535&$,ae=$>>>16,$=e[6],ee=t[6],te+=65535&ee,oe+=ee>>>16,re+=65535&$,ae+=$>>>16,oe+=te>>>16,re+=oe>>>16,ae+=re>>>16,e[6]=x=65535&re|ae<<16,t[6]=B=65535&te|oe<<16,$=v,ee=I,te=65535&ee,oe=ee>>>16,re=65535&$,ae=$>>>16,$=e[7],ee=t[7],te+=65535&ee,oe+=ee>>>16,re+=65535&$,ae+=$>>>16,oe+=te>>>16,re+=oe>>>16,ae+=re>>>16,e[7]=v=65535&re|ae<<16,t[7]=I=65535&te|oe<<16,R+=128,r-=128}return r}function V(e,t,o){var a=new Int32Array(8),s=new Int32Array(8),l=new Uint8Array(256),c=o,d;for(a[0]=1779033703,a[1]=3144134277,a[2]=1013904242,a[3]=2773480762,a[4]=1359893119,a[5]=2600822924,a[6]=528734635,a[7]=1541459225,s[0]=4089235720,s[1]=2227873595,s[2]=4271175723,s[3]=1595750129,s[4]=2917565137,s[5]=725511199,s[6]=4215389547,s[7]=327033209,F(a,s,t,o),o%=128,d=0;d<o;d++)l[d]=t[c-o+d];for(l[o]=128,o=256-128*(112>o?1:0),l[o-9]=0,r(l,o-8,0|c/536870912,c<<3),F(a,s,l,o),d=0;8>d;d++)r(e,8*d,a[d],s[d]);return 0}function W(o,r){var s=de(),a=de(),i=de(),l=de(),c=de(),e=de(),d=de(),p=de(),u=de();n(s,o[1],o[0]),n(u,r[1],r[0]),m(s,s,u),H(a,o[0],o[1]),H(u,r[0],r[1]),m(a,a,u),m(i,o[3],r[3]),m(i,i,D),m(l,o[2],r[2]),H(l,l,l),n(c,a,s),n(e,l,i),H(d,l,i),H(p,a,s),m(o[0],c,e),m(o[1],p,d),m(o[2],d,e),m(o[3],c,p)}function J(e,t,o){var r;for(r=0;4>r;r++)C(e[r],t[r],o)}function Q(e,t){var o=de(),r=de(),a=de();A(a,t[2]),m(o,t[0],a),m(r,t[1],a),O(e,r),e[31]^=P(o)<<7}function Z(e,t,o){var r,a;for(B(e[0],ue),B(e[1],he),B(e[2],he),B(e[3],ue),a=255;0<=a;--a)r=1&o[0|a/8]>>(7&a),J(e,t,r),W(t,e),W(e,e),J(e,t,r)}function $(e,t){var o=[de(),de(),de(),de()];B(o[0],ye),B(o[1],X),B(o[2],he),m(o[3],ye,X),Z(e,o,t)}function ee(e,t,o){var r=new Uint8Array(64),a=[de(),de(),de(),de()],n;for(o||c(t,32),V(r,t,32),r[0]&=248,r[31]&=127,r[31]|=64,$(a,r),Q(e,a),n=0;32>n;n++)t[n+32]=e[n];return 0}function te(e,t){var o,r,a,n;for(r=63;32<=r;--r){for(o=0,a=r-32,n=r-12;a<n;++a)t[a]+=o-16*t[r]*K[a-(r-32)],o=t[a]+128>>8,t[a]-=256*o;t[a]+=o,t[r]=0}for(o=0,a=0;32>a;a++)t[a]+=o-(t[31]>>4)*K[a],o=t[a]>>8,t[a]&=255;for(a=0;32>a;a++)t[a]-=o*K[a];for(r=0;32>r;r++)t[r+1]+=t[r]>>8,e[r]=255&t[r]}function oe(e){var t=new Float64Array(64),o;for(o=0;64>o;o++)t[o]=e[o];for(o=0;64>o;o++)e[o]=0;te(e,t)}function re(e,t,o,a){var n=new Uint8Array(64),s=new Uint8Array(64),l=new Uint8Array(64),r=new Float64Array(64),c=[de(),de(),de(),de()],d,p;V(n,a,32),n[0]&=248,n[31]&=127,n[31]|=64;for(d=0;d<o;d++)e[64+d]=t[d];for(d=0;32>d;d++)e[32+d]=n[32+d];for(V(l,e.subarray(32),o+32),oe(l),$(c,l),Q(e,c),d=32;64>d;d++)e[d]=a[d];for(V(s,e,o+64),oe(s),d=0;64>d;d++)r[d]=0;for(d=0;32>d;d++)r[d]=l[d];for(d=0;32>d;d++)for(p=0;32>p;p++)r[d+p]+=s[d]*n[p];return te(e.subarray(32),r),o+64}function ae(e,o){var r=de(),t=de(),a=de(),s=de(),i=de(),l=de(),c=de();return(B(e[2],he),j(e[1],o),k(a,e[1]),m(s,a,fe),n(a,a,e[2]),H(s,e[2],s),k(i,s),k(l,i),m(c,l,i),m(r,c,a),m(r,r,s),S(r,r),m(r,r,a),m(r,r,s),m(r,r,s),m(e[0],r,s),k(t,e[0]),m(t,t,s),N(t,a)&&m(e[0],e[0],Y),k(t,e[0]),m(t,t,s),N(t,a))?-1:(P(e[0])===o[31]>>7&&n(e[0],ue,e[0]),m(e[3],e[0],e[1]),0)}function ne(e,o,r,a){var s=new Uint8Array(32),t=new Uint8Array(64),c=[de(),de(),de(),de()],d=[de(),de(),de(),de()],p,u;if(u=-1,64>r)return-1;if(ae(d,a))return-1;for(p=0;p<r;p++)e[p]=o[p];for(p=0;32>p;p++)e[p+32]=a[p];if(V(t,e,r),oe(t),Z(c,d,t),$(d,o.subarray(32)),W(c,d),Q(s,c),r-=64,l(o,0,s,0)){for(p=0;p<r;p++)e[p]=0;return-1}for(p=0;p<r;p++)e[p]=o[p+64];return u=r,u}function se(e,t){if(e.length!==32)throw new Error("bad key size");if(24!==t.length)throw new Error("bad nonce size")}function ie(e,t){if(e.length!==32)throw new Error("bad public key size");if(32!==t.length)throw new Error("bad secret key size")}function le(){for(var e=0;e<arguments.length;e++)if(!(arguments[e]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function ce(e){for(var t=0;t<e.length;t++)e[t]=0}var de=function(e){var t=new Float64Array(16),o;if(e)for(o=0;o<e.length;o++)t[o]=e[o];return t},c=function(){throw new Error("no PRNG")},pe=new Uint8Array(16),x=new Uint8Array(32);x[0]=9;var ue=de(),he=de([1]),ge=de([56129,1]),fe=de([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),D=de([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),ye=de([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),X=de([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),Y=de([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]),I=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]),me=function(e){this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0;var t,o,r,a,n,s,i,l;t=255&e[0]|(255&e[1])<<8,this.r[0]=8191&t,o=255&e[2]|(255&e[3])<<8,this.r[1]=8191&(t>>>13|o<<3),r=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(o>>>10|r<<6),a=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(r>>>7|a<<9),n=255&e[8]|(255&e[9])<<8,this.r[4]=255&(a>>>4|n<<12),this.r[5]=8190&n>>>1,s=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(n>>>14|s<<2),i=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(s>>>11|i<<5),l=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(i>>>8|l<<8),this.r[9]=127&l>>>5,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};me.prototype.blocks=function(e,t,o){for(var r=this.fin?0:2048,a=this.h[0],n=this.h[1],s=this.h[2],i=this.h[3],l=this.h[4],d=this.h[5],p=this.h[6],u=this.h[7],h=this.h[8],g=this.h[9],f=this.r[0],y=this.r[1],m=this.r[2],w=this.r[3],x=this.r[4],v=this.r[5],k=this.r[6],A=this.r[7],S=this.r[8],T=this.r[9],E,U,B,I,R,z,D,C,L,O,N,P,j,M,K,H,G,q,F;16<=o;)E=255&e[t+0]|(255&e[t+1])<<8,a+=8191&E,U=255&e[t+2]|(255&e[t+3])<<8,n+=8191&(E>>>13|U<<3),B=255&e[t+4]|(255&e[t+5])<<8,s+=8191&(U>>>10|B<<6),I=255&e[t+6]|(255&e[t+7])<<8,i+=8191&(B>>>7|I<<9),R=255&e[t+8]|(255&e[t+9])<<8,l+=8191&(I>>>4|R<<12),d+=8191&R>>>1,z=255&e[t+10]|(255&e[t+11])<<8,p+=8191&(R>>>14|z<<2),D=255&e[t+12]|(255&e[t+13])<<8,u+=8191&(z>>>11|D<<5),C=255&e[t+14]|(255&e[t+15])<<8,h+=8191&(D>>>8|C<<8),g+=C>>>5|r,L=0,O=L,O+=a*f,O+=n*(5*T),O+=s*(5*S),O+=i*(5*A),O+=l*(5*k),L=O>>>13,O&=8191,O+=d*(5*v),O+=p*(5*x),O+=u*(5*w),O+=h*(5*m),O+=g*(5*y),L+=O>>>13,O&=8191,N=L,N+=a*y,N+=n*f,N+=s*(5*T),N+=i*(5*S),N+=l*(5*A),L=N>>>13,N&=8191,N+=d*(5*k),N+=p*(5*v),N+=u*(5*x),N+=h*(5*w),N+=g*(5*m),L+=N>>>13,N&=8191,P=L,P+=a*m,P+=n*y,P+=s*f,P+=i*(5*T),P+=l*(5*S),L=P>>>13,P&=8191,P+=d*(5*A),P+=p*(5*k),P+=u*(5*v),P+=h*(5*x),P+=g*(5*w),L+=P>>>13,P&=8191,j=L,j+=a*w,j+=n*m,j+=s*y,j+=i*f,j+=l*(5*T),L=j>>>13,j&=8191,j+=d*(5*S),j+=p*(5*A),j+=u*(5*k),j+=h*(5*v),j+=g*(5*x),L+=j>>>13,j&=8191,M=L,M+=a*x,M+=n*w,M+=s*m,M+=i*y,M+=l*f,L=M>>>13,M&=8191,M+=d*(5*T),M+=p*(5*S),M+=u*(5*A),M+=h*(5*k),M+=g*(5*v),L+=M>>>13,M&=8191,K=L,K+=a*v,K+=n*x,K+=s*w,K+=i*m,K+=l*y,L=K>>>13,K&=8191,K+=d*f,K+=p*(5*T),K+=u*(5*S),K+=h*(5*A),K+=g*(5*k),L+=K>>>13,K&=8191,H=L,H+=a*k,H+=n*v,H+=s*x,H+=i*w,H+=l*m,L=H>>>13,H&=8191,H+=d*y,H+=p*f,H+=u*(5*T),H+=h*(5*S),H+=g*(5*A),L+=H>>>13,H&=8191,G=L,G+=a*A,G+=n*k,G+=s*v,G+=i*x,G+=l*w,L=G>>>13,G&=8191,G+=d*m,G+=p*y,G+=u*f,G+=h*(5*T),G+=g*(5*S),L+=G>>>13,G&=8191,q=L,q+=a*S,q+=n*A,q+=s*k,q+=i*v,q+=l*x,L=q>>>13,q&=8191,q+=d*w,q+=p*m,q+=u*y,q+=h*f,q+=g*(5*T),L+=q>>>13,q&=8191,F=L,F+=a*T,F+=n*S,F+=s*A,F+=i*k,F+=l*v,L=F>>>13,F&=8191,F+=d*x,F+=p*w,F+=u*m,F+=h*y,F+=g*f,L+=F>>>13,F&=8191,L=0|(L<<2)+L,L=0|L+O,O=8191&L,L>>>=13,N+=L,a=O,n=N,s=P,i=j,l=M,d=K,p=H,u=G,h=q,g=F,t+=16,o-=16;this.h[0]=a,this.h[1]=n,this.h[2]=s,this.h[3]=i,this.h[4]=l,this.h[5]=d,this.h[6]=p,this.h[7]=u,this.h[8]=h,this.h[9]=g},me.prototype.finish=function(e,t){var o=new Uint16Array(10),r,a,n,s;if(this.leftover){for(s=this.leftover,this.buffer[s++]=1;16>s;s++)this.buffer[s]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,s=2;10>s;s++)this.h[s]+=r,r=this.h[s]>>>13,this.h[s]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,o[0]=this.h[0]+5,r=o[0]>>>13,o[0]&=8191,s=1;10>s;s++)o[s]=this.h[s]+r,r=o[s]>>>13,o[s]&=8191;for(o[9]-=8192,a=(1^r)-1,s=0;10>s;s++)o[s]&=a;for(a=~a,s=0;10>s;s++)this.h[s]=this.h[s]&a|o[s];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),n=this.h[0]+this.pad[0],this.h[0]=65535&n,s=1;8>s;s++)n=0|(0|this.h[s]+this.pad[s])+(n>>>16),this.h[s]=65535&n;e[t+0]=255&this.h[0]>>>0,e[t+1]=255&this.h[0]>>>8,e[t+2]=255&this.h[1]>>>0,e[t+3]=255&this.h[1]>>>8,e[t+4]=255&this.h[2]>>>0,e[t+5]=255&this.h[2]>>>8,e[t+6]=255&this.h[3]>>>0,e[t+7]=255&this.h[3]>>>8,e[t+8]=255&this.h[4]>>>0,e[t+9]=255&this.h[4]>>>8,e[t+10]=255&this.h[5]>>>0,e[t+11]=255&this.h[5]>>>8,e[t+12]=255&this.h[6]>>>0,e[t+13]=255&this.h[6]>>>8,e[t+14]=255&this.h[7]>>>0,e[t+15]=255&this.h[7]>>>8},me.prototype.update=function(e,t,o){var r,a;if(this.leftover){for(a=16-this.leftover,a>o&&(a=o),r=0;r<a;r++)this.buffer[this.leftover+r]=e[t+r];if(o-=a,t+=a,this.leftover+=a,16>this.leftover)return;this.blocks(this.buffer,0,16),this.leftover=0}if(16<=o&&(a=o-o%16,this.blocks(e,t,a),t+=a,o-=a),o){for(r=0;r<o;r++)this.buffer[this.leftover+r]=e[t+r];this.leftover+=o}};var be=E,we=[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],K=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),L=32,xe=24,ve=32,_e=16,ke=32,Ae=32,Se=32,Te=32,Ee=32,Ue=xe,Be=64,Ie=32,Re=64,ze=32,De=64;t.lowlevel={crypto_core_hsalsa20:h,crypto_stream_xor:w,crypto_stream:y,crypto_stream_salsa20_xor:g,crypto_stream_salsa20:f,crypto_onetimeauth:v,crypto_onetimeauth_verify:T,crypto_verify_16:i,crypto_verify_32:l,crypto_secretbox:E,crypto_secretbox_open:U,crypto_scalarmult:z,crypto_scalarmult_base:M,crypto_box_beforenm:q,crypto_box_afternm:be,crypto_box:function(e,t,o,r,a,n){var s=new Uint8Array(32);return q(s,a,n),be(e,t,o,r,s)},crypto_box_open:function(e,t,o,r,a,n){var s=new Uint8Array(32);return q(s,a,n),U(e,t,o,r,s)},crypto_box_keypair:G,crypto_hash:V,crypto_sign:re,crypto_sign_keypair:ee,crypto_sign_open:ne,crypto_secretbox_KEYBYTES:L,crypto_secretbox_NONCEBYTES:xe,crypto_secretbox_ZEROBYTES:ve,crypto_secretbox_BOXZEROBYTES:_e,crypto_scalarmult_BYTES:ke,crypto_scalarmult_SCALARBYTES:Ae,crypto_box_PUBLICKEYBYTES:Se,crypto_box_SECRETKEYBYTES:Te,crypto_box_BEFORENMBYTES:Ee,crypto_box_NONCEBYTES:Ue,crypto_box_ZEROBYTES:ve,crypto_box_BOXZEROBYTES:_e,crypto_sign_BYTES:Be,crypto_sign_PUBLICKEYBYTES:Ie,crypto_sign_SECRETKEYBYTES:Re,crypto_sign_SEEDBYTES:ze,crypto_hash_BYTES:De},t.randomBytes=function(e){var t=new Uint8Array(e);return c(t,e),t},t.secretbox=function(e,t,o){le(e,t,o),se(o,t);for(var r=new Uint8Array(ve+e.length),a=new Uint8Array(r.length),n=0;n<e.length;n++)r[n+ve]=e[n];return E(a,r,r.length,t,o),a.subarray(_e)},t.secretbox.open=function(e,t,o){le(e,t,o),se(o,t);for(var r=new Uint8Array(_e+e.length),a=new Uint8Array(r.length),n=0;n<e.length;n++)r[n+_e]=e[n];return 32>r.length?null:0===U(a,r,r.length,t,o)?a.subarray(ve):null},t.secretbox.keyLength=L,t.secretbox.nonceLength=xe,t.secretbox.overheadLength=_e,t.scalarMult=function(e,t){if(le(e,t),e.length!==Ae)throw new Error("bad n size");if(t.length!==ke)throw new Error("bad p size");var o=new Uint8Array(ke);return z(o,e,t),o},t.scalarMult.base=function(e){if(le(e),e.length!==Ae)throw new Error("bad n size");var t=new Uint8Array(ke);return M(t,e),t},t.scalarMult.scalarLength=Ae,t.scalarMult.groupElementLength=ke,t.box=function(e,o,r,a){var n=t.box.before(r,a);return t.secretbox(e,o,n)},t.box.before=function(e,t){le(e,t),ie(e,t);var o=new Uint8Array(Ee);return q(o,e,t),o},t.box.after=t.secretbox,t.box.open=function(e,o,r,a){var n=t.box.before(r,a);return t.secretbox.open(e,o,n)},t.box.open.after=t.secretbox.open,t.box.keyPair=function(){var e=new Uint8Array(Se),t=new Uint8Array(Te);return G(e,t),{publicKey:e,secretKey:t}},t.box.keyPair.fromSecretKey=function(e){if(le(e),e.length!==Te)throw new Error("bad secret key size");var t=new Uint8Array(Se);return M(t,e),{publicKey:t,secretKey:new Uint8Array(e)}},t.box.publicKeyLength=Se,t.box.secretKeyLength=Te,t.box.sharedKeyLength=Ee,t.box.nonceLength=Ue,t.box.overheadLength=t.secretbox.overheadLength,t.sign=function(e,t){if(le(e,t),t.length!==Re)throw new Error("bad secret key size");var o=new Uint8Array(Be+e.length);return re(o,e,e.length,t),o},t.sign.open=function(e,t){if(le(e,t),t.length!==Ie)throw new Error("bad public key size");var o=new Uint8Array(e.length),r=ne(o,e,e.length,t);if(0>r)return null;for(var a=new Uint8Array(r),n=0;n<a.length;n++)a[n]=o[n];return a},t.sign.detached=function(e,o){for(var r=t.sign(e,o),a=new Uint8Array(Be),n=0;n<a.length;n++)a[n]=r[n];return a},t.sign.detached.verify=function(e,t,o){if(le(e,t,o),t.length!==Be)throw new Error("bad signature size");if(o.length!==Ie)throw new Error("bad public key size");var r=new Uint8Array(Be+e.length),a=new Uint8Array(Be+e.length),n;for(n=0;n<Be;n++)r[n]=t[n];for(n=0;n<e.length;n++)r[n+Be]=e[n];return 0<=ne(a,r,r.length,o)},t.sign.keyPair=function(){var e=new Uint8Array(Ie),t=new Uint8Array(Re);return ee(e,t),{publicKey:e,secretKey:t}},t.sign.keyPair.fromSecretKey=function(e){if(le(e),e.length!==Re)throw new Error("bad secret key size");for(var t=new Uint8Array(Ie),o=0;o<t.length;o++)t[o]=e[32+o];return{publicKey:t,secretKey:new Uint8Array(e)}},t.sign.keyPair.fromSeed=function(e){if(le(e),e.length!==ze)throw new Error("bad seed size");for(var t=new Uint8Array(Ie),o=new Uint8Array(Re),r=0;32>r;r++)o[r]=e[r];return ee(t,o,!0),{publicKey:t,secretKey:o}},t.sign.publicKeyLength=Ie,t.sign.secretKeyLength=Re,t.sign.seedLength=ze,t.sign.signatureLength=Be,t.hash=function(e){le(e);var t=new Uint8Array(De);return V(t,e,e.length),t},t.hash.hashLength=De,t.verify=function(e,t){return le(e,t),0!==e.length&&0!==t.length&&e.length===t.length&&0===a(e,0,t,0,e.length)},t.setPRNG=function(e){c=e},function(){var r="undefined"==typeof self?null:self.crypto||self.msCrypto;if(r&&r.getRandomValues){t.setPRNG(function(e,t){var a=new Uint8Array(t),n;for(n=0;n<t;n+=65536)r.getRandomValues(a.subarray(n,n+o(t-n,65536)));for(n=0;n<t;n++)e[n]=a[n];ce(a)})}else"undefined"!=typeof e&&(r=e("crypto"),r&&r.randomBytes&&t.setPRNG(function(e,t){var o=r.randomBytes(t),a;for(a=0;a<t;a++)e[a]=o[a];ce(o)}))}()})("undefined"!=typeof t&&t.exports?t.exports:self.nacl=self.nacl||{})},{crypto:7}],22:[function(e,t,o){(function(o){const a=e("./encoding/address"),n=e("./encoding/encoding"),s=e("./nacl/naclWrappers"),i=e("./utils/utils");t.exports={Bid:class{constructor({bidderKey:e,bidAmount:t,maxPrice:n,bidID:s,auctionKey:i,auctionID:l}){if(this.name="Bid",this.tag=o.from([97,66]),e=a.decode(e),i=a.decode(i),!r(t)||0>t)throw Error("Bid amount must be positive and 2^53-1");if(!r(s)||0>s)throw Error("BidID must be positive and 2^53-1");if(!r(l)||0>l)throw Error("auctionID must be positive");Object.assign(this,{bidderKey:e,auctionKey:i,bidAmount:t,maxPrice:n,bidID:s,auctionID:l})}get_obj_for_encoding(){return{bidder:o.from(this.bidderKey.publicKey),cur:this.bidAmount,price:this.maxPrice,id:this.bidID,auc:o.from(this.auctionKey.publicKey),aid:this.auctionID}}signBid(e){const t=n.encode(this.get_obj_for_encoding()),r=o.from(i.concatArrays(this.tag,t)),a=s.sign(r,e);let l={sig:o.from(a),bid:this.get_obj_for_encoding()};return new Uint8Array(n.encode({t:"b",b:l}))}}}}).call(this,e("buffer").Buffer)},{"./encoding/address":26,"./encoding/encoding":27,"./nacl/naclWrappers":35,"./utils/utils":37,buffer:8}],23:[function(e,t,o){(function(r){const a=e("./client");t.exports={Algod:function(e="",t="http://r2.algorand.network",o=4180,n={}){var i=Number.isInteger;function s(e){return void 0===e.noteb64||null===e.noteb64||(e.note=r.from(e.noteb64,"base64")),e}let l=e;"string"==typeof l&&(l={"X-Algo-API-Token":l});let d=new a.HTTPClient(l,t,o,n);this.status=async function(e={}){let t=await d.get("/v1/status",{},e);return t.body},this.healthCheck=async function(e={}){let t=await d.get("/health",{},e);return t.body},this.statusAfterBlock=async function(e,t={}){if(!i(e))throw Error("roundNumber should be an integer");let o=await d.get("/v1/status/wait-for-block-after/"+e,{},t);return o.body},this.pendingTransactions=async function(e,t={}){if(!i(e))throw Error("maxTxns should be an integer");let o=await d.get("/v1/transactions/pending",{max:e},t);if(200===o.statusCode&&o.body.truncatedTxns.transactions!==void 0)for(let e=0;e<o.body.truncatedTxns.transactions.length;e++)o.body.truncatedTxns.transactions[e]=s(o.body.truncatedTxns.transactions[e]);return o.body},this.versions=async function(e={}){let t=await d.get("/versions",{},e);return t.body},this.ledgerSupply=async function(e={}){let t=await d.get("/v1/ledger/supply",{},e);return t.body},this.transactionByAddress=async function(e,t=null,o=null,r=null,a={}){if(null!==t&&!i(t))throw Error("first round should be an integer");if(null!==o&&!i(o))throw Error("last round should be an integer");let n=await d.get("/v1/account/"+e+"/transactions",{firstRound:t,lastRound:o,max:r},a);if(200===n.statusCode&&n.body.transactions!==void 0)for(let e=0;e<n.body.transactions.length;e++)n.body.transactions[e]=s(n.body.transactions[e]);return n.body},this.transactionByAddressAndDate=async function(e,t,o,r=null,a={}){let n=await d.get("/v1/account/"+e+"/transactions",{fromDate:t,toDate:o,max:r},a);if(200===n.statusCode&&n.body.transactions!==void 0)for(let e=0;e<n.body.transactions.length;e++)n.body.transactions[e]=s(n.body.transactions[e]);return n.body},this.transactionById=async function(e,t={}){let o=await d.get("/v1/transaction/"+e,{},t);return 200===o.statusCode&&(o.body=s(o.body)),o.body},this.transactionInformation=async function(e,t,o={}){let r=await d.get("/v1/account/"+e+"/transaction/"+t,{},o);return 200===r.statusCode&&(r.body=s(r.body)),r.body},this.pendingTransactionInformation=async function(e,t={}){let o=await d.get("/v1/transactions/pending/"+e,{},t);return 200===o.statusCode&&(o.body=s(o.body)),o.body},this.accountInformation=async function(e,t={}){let o=await d.get("/v1/account/"+e,{},t);return o.body},this.assetInformation=async function(e,t={}){let o=await d.get("/v1/asset/"+e,{},t);return o.body},this.suggestedFee=async function(e={}){let t=await d.get("/v1/transactions/fee",{},e);return t.body},this.sendRawTransaction=async function(e,t={}){let o=await d.post("/v1/transactions",r.from(e),t);return o.body},this.sendRawTransactions=async function(e,t={}){const o=Array.prototype.concat(...e.map(e=>Array.from(e)));let a=await d.post("/v1/transactions",r.from(o),t);return a.body},this.getTransactionParams=async function(e={}){let t=await d.get("/v1/transactions/params",{},e);return t.body},this.block=async function(e,t={}){if(!i(e))throw Error("roundNumber should be an integer");let o=await d.get("/v1/block/"+e,{},t);if(200===o.statusCode&&o.body.txns.transactions!==void 0)for(let e=0;e<o.body.txns.transactions.length;e++)o.body.txns.transactions[e]=s(o.body.txns.transactions[e]);return o.body}}}}).call(this,e("buffer").Buffer)},{"./client":24,buffer:8}],24:[function(e,t,o){function r(e){for(let t in e)e.hasOwnProperty(t)&&(e[t]&&0!==e[t].length||delete e[t]);return e}var a=e("superagent");t.exports={HTTPClient:function(e,t,o,n={}){""!==o&&(t+=":"+o.toString()),this.address=t,this.token=e,this.defaultHeaders=n,this.get=async function(e,t,o={}){try{return await a.get(this.address+e).set(this.token).set(this.defaultHeaders).set(o).set("Accept","application/json").query(r(t))}catch(t){throw t}},this.post=async function(e,t,o={}){try{return await a.post(this.address+e).set(this.token).set(this.defaultHeaders).set(o).send(t)}catch(t){throw t.response}},this.delete=async function(e,t,o={}){try{return await a.delete(this.address+e).set(this.token).set(this.defaultHeaders).set(o).send(t)}catch(t){throw t.response}}}}},{superagent:16}],25:[function(e,t,o){(function(o){function r(e,t="http://127.0.0.1",r=7833){let s=new a.HTTPClient({"X-KMD-API-Token":e},t,r);this.versions=async function(){let e=await s.get("/versions");return e.body},this.listWallets=async function(){let e=await s.get("/v1/wallets");return e.body},this.createWallet=async function(e,t,r="",a="sqlite"){let n={wallet_name:e,wallet_driver_name:a,wallet_password:t,master_derivation_key:o.from(r).toString("base64")},i=await s.post("/v1/wallet",n);return i.body},this.initWalletHandle=async function(e,t){let o=await s.post("/v1/wallet/init",{wallet_id:e,wallet_password:t});return o.body},this.releaseWalletHandle=async function(e){let t=await s.post("/v1/wallet/release",{wallet_handle_token:e});return t.body},this.renewWalletHandle=async function(e){let t=await s.post("/v1/wallet/renew",{wallet_handle_token:e});return t.body},this.renameWallet=async function(e,t,o){let r=await s.post("/v1/wallet/rename",{wallet_id:e,wallet_password:t,wallet_name:o});return r.body},this.getWallet=async function(e){let t=await s.post("/v1/wallet/info",{wallet_handle_token:e});return t.body},this.exportMasterDerivationKey=async function(e,t){let r=await s.post("/v1/master-key/export",{wallet_handle_token:e,wallet_password:t});return{master_derivation_key:o.from(r.body.master_derivation_key,"base64")}},this.importKey=async function(e,t){let r={wallet_handle_token:e,private_key:o.from(t).toString("base64")},a=await s.post("/v1/key/import",r);return a.body},this.exportKey=async function(e,t,r){let a=await s.post("/v1/key/export",{wallet_handle_token:e,address:r,wallet_password:t});return{private_key:o.from(a.body.private_key,"base64")}},this.generateKey=async function(e){let t=await s.post("/v1/key",{wallet_handle_token:e,display_mnemonic:!1});return t.body},this.deleteKey=async function(e,t,o){let r=await s.delete("/v1/key",{wallet_handle_token:e,address:o,wallet_password:t});return r.body},this.listKeys=async function(e){let t=await s.post("/v1/key/list",{wallet_handle_token:e});return t.body},this.signTransaction=async function(e,t,r){let a=new n.Transaction(r),i={wallet_handle_token:e,wallet_password:t,transaction:o.from(a.toByte()).toString("base64")},l=await s.post("/v1/transaction/sign",i);return 200===l.statusCode?o.from(l.body.signed_transaction,"base64"):l.body},this.listMultisig=async function(e){let t=await s.post("/v1/multisig/list",{wallet_handle_token:e});return t.body},this.importMultisig=async function(e,t,o,r){let a=await s.post("/v1/multisig/import",{wallet_handle_token:e,multisig_version:t,threshold:o,pks:r});return a.body},this.exportMultisig=async function(e,t){let o=await s.post("/v1/multisig/export",{wallet_handle_token:e,address:t});return o.body},this.signMultisigTransaction=async function(e,t,r,a,i){let l=new n.Transaction(r),c={wallet_handle_token:e,transaction:o.from(l.toByte()).toString("base64"),public_key:o.from(a).toString("base64"),partial_multisig:i,wallet_password:t},d=await s.post("/v1/multisig/sign",c);return d.body},this.deleteMultisig=async function(e,t,o){let r=await s.delete("/v1/multisig",{wallet_handle_token:e,address:o,wallet_password:t});return r.body}}const a=e("./client"),n=e("../transaction");t.exports={Kmd:r},t.exports={Kmd:r}}).call(this,e("buffer").Buffer)},{"../transaction":36,"./client":24,buffer:8}],26:[function(e,t,o){function r(e){if(!("string"==typeof e||e instanceof String))throw g;let t=s.decode.asBytes(e);if(t.length!==d)throw g;let o=new Uint8Array(t.slice(0,32)),r=new Uint8Array(t.slice(l.PUBLIC_KEY_LENGTH,d));return{publicKey:o,checksum:r}}function a(e){let t=l.genericHash(e).slice(l.PUBLIC_KEY_LENGTH-p,l.PUBLIC_KEY_LENGTH),o=s.encode(c.concatArrays(e,t));return o.toString().slice(0,u)}function n({version:e,threshold:t,pks:o}){if(1!==e||255<e||0>e)throw f;if(0===t||0===o.length||t>o.length||255<t)throw y;let r=32;if(32!==l.PUBLIC_KEY_LENGTH)throw w;let a=new Uint8Array(h.length+2+32*o.length);a.set(h,0),a.set([e],h.length),a.set([t],h.length+1);for(var n=0;n<o.length;n++){if(o[n].length!==r)throw m;a.set(o[n],h.length+2+n*r)}return l.genericHash(a)}const s=e("hi-base32"),l=e("../nacl/naclWrappers"),c=e("../utils/utils"),d=36,p=4,u=58,h=new Uint8Array([77,117,108,116,105,115,105,103,65,100,100,114]),g=new Error("address seems to be malformed"),f=new Error("invalid multisig version"),y=new Error("bad multisig threshold"),m=new Error("bad multisig public key - wrong length"),w=new Error("nacl public key length is not 32 bytes");t.exports={isValidAddress:function(e){if("string"!=typeof e)return!1;if(e.length!==u)return!1;let t;try{t=r(e)}catch(t){return!1}let o=l.genericHash(t.publicKey).slice(l.HASH_BYTES_LENGTH-p,l.HASH_BYTES_LENGTH);return c.arrayEqual(o,t.checksum)},decode:r,encode:a,fromMultisigPreImg:n,fromMultisigPreImgAddrs:function({version:e,threshold:t,addrs:o}){const s=o.map(e=>r(e).publicKey);return a(n({version:e,threshold:t,pks:s}))},MALFORMED_ADDRESS_ERROR:g,INVALID_MSIG_VERSION:f,INVALID_MSIG_THRESHOLD:y,INVALID_MSIG_PK:m,UNEXPECTED_PK_LEN:w}},{"../nacl/naclWrappers":35,"../utils/utils":37,"hi-base32":10}],27:[function(e,t,o){function r(e){for(let t in e)if(e.hasOwnProperty(t)&&(!e[t]||0===e[t].length))return!0;return!1}const a=e("@msgpack/msgpack"),n=new Error("The object contains empty or 0 values");t.exports={encode:function(e){if(r(e))throw n;return a.encode(e,{sortKeys:!0})},decode:function(e){return a.decode(e)},ERROR_CONTAINS_EMPTY:n}},{"@msgpack/msgpack":1}],28:[function(e,t,o){t.exports={EvalMaxVersion:1,LogicSigVersion:1,Ops:[{Opcode:0,Name:"err",Cost:1,Size:1,Doc:"Error. Panic immediately. This is primarily a fencepost against accidental zero bytes getting compiled into programs.",Groups:["Flow Control"]},{Opcode:1,Name:"sha256",Args:"B",Returns:"B",Cost:7,Size:1,Doc:"SHA256 hash of value X, yields [32]byte",Groups:["Arithmetic"]},{Opcode:2,Name:"keccak256",Args:"B",Returns:"B",Cost:26,Size:1,Doc:"Keccak256 hash of value X, yields [32]byte",Groups:["Arithmetic"]},{Opcode:3,Name:"sha512_256",Args:"B",Returns:"B",Cost:9,Size:1,Doc:"SHA512_256 hash of value X, yields [32]byte",Groups:["Arithmetic"]},{Opcode:4,Name:"ed25519verify",Args:"BBB",Returns:"U",Cost:1900,Size:1,Doc:"for (data A, signature B, pubkey C) verify the signature of (\"ProgData\" || program_hash || data) against the pubkey => {0 or 1}",DocExtra:"The 32 byte public key is the last element on the stack, preceeded by the 64 byte signature at the second-to-last element on the stack, preceeded by the data which was signed at the third-to-last element on the stack.",Groups:["Arithmetic"]},{Opcode:8,Name:"+",Args:"UU",Returns:"U",Cost:1,Size:1,Doc:"A plus B. Panic on overflow.",Groups:["Arithmetic"]},{Opcode:9,Name:"-",Args:"UU",Returns:"U",Cost:1,Size:1,Doc:"A minus B. Panic if B > A.",Groups:["Arithmetic"]},{Opcode:10,Name:"/",Args:"UU",Returns:"U",Cost:1,Size:1,Doc:"A divided by B. Panic if B == 0.",Groups:["Arithmetic"]},{Opcode:11,Name:"*",Args:"UU",Returns:"U",Cost:1,Size:1,Doc:"A times B. Panic on overflow.",DocExtra:"Overflow is an error condition which halts execution and fails the transaction. Full precision is available from `mulw`.",Groups:["Arithmetic"]},{Opcode:12,Name:"<",Args:"UU",Returns:"U",Cost:1,Size:1,Doc:"A less than B => {0 or 1}",Groups:["Arithmetic"]},{Opcode:13,Name:">",Args:"UU",Returns:"U",Cost:1,Size:1,Doc:"A greater than B => {0 or 1}",Groups:["Arithmetic"]},{Opcode:14,Name:"<=",Args:"UU",Returns:"U",Cost:1,Size:1,Doc:"A less than or equal to B => {0 or 1}",Groups:["Arithmetic"]},{Opcode:15,Name:">=",Args:"UU",Returns:"U",Cost:1,Size:1,Doc:"A greater than or equal to B => {0 or 1}",Groups:["Arithmetic"]},{Opcode:16,Name:"&&",Args:"UU",Returns:"U",Cost:1,Size:1,Doc:"A is not zero and B is not zero => {0 or 1}",Groups:["Arithmetic"]},{Opcode:17,Name:"||",Args:"UU",Returns:"U",Cost:1,Size:1,Doc:"A is not zero or B is not zero => {0 or 1}",Groups:["Arithmetic"]},{Opcode:18,Name:"==",Args:"..",Returns:"U",Cost:1,Size:1,Doc:"A is equal to B => {0 or 1}",Groups:["Arithmetic"]},{Opcode:19,Name:"!=",Args:"..",Returns:"U",Cost:1,Size:1,Doc:"A is not equal to B => {0 or 1}",Groups:["Arithmetic"]},{Opcode:20,Name:"!",Args:"U",Returns:"U",Cost:1,Size:1,Doc:"X == 0 yields 1; else 0",Groups:["Arithmetic"]},{Opcode:21,Name:"len",Args:"B",Returns:"U",Cost:1,Size:1,Doc:"yields length of byte value X",Groups:["Arithmetic"]},{Opcode:22,Name:"itob",Args:"U",Returns:"B",Cost:1,Size:1,Doc:"converts uint64 X to big endian bytes",Groups:["Arithmetic"]},{Opcode:23,Name:"btoi",Args:"B",Returns:"U",Cost:1,Size:1,Doc:"converts bytes X as big endian to uint64",DocExtra:"`btoi` panics if the input is longer than 8 bytes",Groups:["Arithmetic"]},{Opcode:24,Name:"%",Args:"UU",Returns:"U",Cost:1,Size:1,Doc:"A modulo B. Panic if B == 0.",Groups:["Arithmetic"]},{Opcode:25,Name:"|",Args:"UU",Returns:"U",Cost:1,Size:1,Doc:"A bitwise-or B",Groups:["Arithmetic"]},{Opcode:26,Name:"&",Args:"UU",Returns:"U",Cost:1,Size:1,Doc:"A bitwise-and B",Groups:["Arithmetic"]},{Opcode:27,Name:"^",Args:"UU",Returns:"U",Cost:1,Size:1,Doc:"A bitwise-xor B",Groups:["Arithmetic"]},{Opcode:28,Name:"~",Args:"U",Returns:"U",Cost:1,Size:1,Doc:"bitwise invert value X",Groups:["Arithmetic"]},{Opcode:29,Name:"mulw",Args:"UU",Returns:"UU",Cost:1,Size:1,Doc:"A times B out to 128-bit long result as low (top) and high uint64 values on the stack",Groups:["Arithmetic"]},{Opcode:32,Name:"intcblock",Cost:1,Size:0,Doc:"load block of uint64 constants",DocExtra:"`intcblock` loads following program bytes into an array of integer constants in the evaluator. These integer constants can be referred to by `intc` and `intc_*` which will push the value onto the stack. Subsequent calls to `intcblock` reset and replace the integer constants available to the script.",ImmediateNote:"{varuint length} [{varuint value}, ...]",Groups:["Loading Values"]},{Opcode:33,Name:"intc",Returns:"U",Cost:1,Size:2,Doc:"push value from uint64 constants to stack by index into constants",ImmediateNote:"{uint8 int constant index}",Groups:["Loading Values"]},{Opcode:34,Name:"intc_0",Returns:"U",Cost:1,Size:1,Doc:"push constant 0 from intcblock to stack",Groups:["Loading Values"]},{Opcode:35,Name:"intc_1",Returns:"U",Cost:1,Size:1,Doc:"push constant 1 from intcblock to stack",Groups:["Loading Values"]},{Opcode:36,Name:"intc_2",Returns:"U",Cost:1,Size:1,Doc:"push constant 2 from intcblock to stack",Groups:["Loading Values"]},{Opcode:37,Name:"intc_3",Returns:"U",Cost:1,Size:1,Doc:"push constant 3 from intcblock to stack",Groups:["Loading Values"]},{Opcode:38,Name:"bytecblock",Cost:1,Size:0,Doc:"load block of byte-array constants",DocExtra:"`bytecblock` loads the following program bytes into an array of byte string constants in the evaluator. These constants can be referred to by `bytec` and `bytec_*` which will push the value onto the stack. Subsequent calls to `bytecblock` reset and replace the bytes constants available to the script.",ImmediateNote:"{varuint length} [({varuint value length} bytes), ...]",Groups:["Loading Values"]},{Opcode:39,Name:"bytec",Returns:"B",Cost:1,Size:2,Doc:"push bytes constant to stack by index into constants",ImmediateNote:"{uint8 byte constant index}",Groups:["Loading Values"]},{Opcode:40,Name:"bytec_0",Returns:"B",Cost:1,Size:1,Doc:"push constant 0 from bytecblock to stack",Groups:["Loading Values"]},{Opcode:41,Name:"bytec_1",Returns:"B",Cost:1,Size:1,Doc:"push constant 1 from bytecblock to stack",Groups:["Loading Values"]},{Opcode:42,Name:"bytec_2",Returns:"B",Cost:1,Size:1,Doc:"push constant 2 from bytecblock to stack",Groups:["Loading Values"]},{Opcode:43,Name:"bytec_3",Returns:"B",Cost:1,Size:1,Doc:"push constant 3 from bytecblock to stack",Groups:["Loading Values"]},{Opcode:44,Name:"arg",Returns:"B",Cost:1,Size:2,Doc:"push Args[N] value to stack by index",ImmediateNote:"{uint8 arg index N}",Groups:["Loading Values"]},{Opcode:45,Name:"arg_0",Returns:"B",Cost:1,Size:1,Doc:"push Args[0] to stack",Groups:["Loading Values"]},{Opcode:46,Name:"arg_1",Returns:"B",Cost:1,Size:1,Doc:"push Args[1] to stack",Groups:["Loading Values"]},{Opcode:47,Name:"arg_2",Returns:"B",Cost:1,Size:1,Doc:"push Args[2] to stack",Groups:["Loading Values"]},{Opcode:48,Name:"arg_3",Returns:"B",Cost:1,Size:1,Doc:"push Args[3] to stack",Groups:["Loading Values"]},{Opcode:49,Name:"txn",Returns:".",Cost:1,Size:2,ArgEnum:["Sender","Fee","FirstValid","FirstValidTime","LastValid","Note","Lease","Receiver","Amount","CloseRemainderTo","VotePK","SelectionPK","VoteFirst","VoteLast","VoteKeyDilution","Type","TypeEnum","XferAsset","AssetAmount","AssetSender","AssetReceiver","AssetCloseTo","GroupIndex","TxID"],ArgEnumTypes:"BUUUUBBBUBBBUUUBUUUBBBUB",Doc:"push field from current transaction to stack",DocExtra:"FirstValidTime causes the program to fail. The field is reserved for future use.",ImmediateNote:"{uint8 transaction field index}",Groups:["Loading Values"]},{Opcode:50,Name:"global",Returns:".",Cost:1,Size:2,ArgEnum:["MinTxnFee","MinBalance","MaxTxnLife","ZeroAddress","GroupSize"],ArgEnumTypes:"UUUBU",Doc:"push value from globals to stack",ImmediateNote:"{uint8 global field index}",Groups:["Loading Values"]},{Opcode:51,Name:"gtxn",Returns:".",Cost:1,Size:3,ArgEnum:["Sender","Fee","FirstValid","FirstValidTime","LastValid","Note","Lease","Receiver","Amount","CloseRemainderTo","VotePK","SelectionPK","VoteFirst","VoteLast","VoteKeyDilution","Type","TypeEnum","XferAsset","AssetAmount","AssetSender","AssetReceiver","AssetCloseTo","GroupIndex","TxID"],ArgEnumTypes:"BUUUUBBBUBBBUUUBUUUBBBUB",Doc:"push field to the stack from a transaction in the current transaction group",DocExtra:"for notes on transaction fields available, see `txn`. If this transaction is _i_ in the group, `gtxn i field` is equivalent to `txn field`",ImmediateNote:"{uint8 transaction group index}{uint8 transaction field index}",Groups:["Loading Values"]},{Opcode:52,Name:"load",Returns:".",Cost:1,Size:2,Doc:"copy a value from scratch space to the stack",ImmediateNote:"{uint8 position in scratch space to load from}",Groups:["Loading Values"]},{Opcode:53,Name:"store",Args:".",Cost:1,Size:2,Doc:"pop a value from the stack and store to scratch space",ImmediateNote:"{uint8 position in scratch space to store to}",Groups:["Loading Values"]},{Opcode:64,Name:"bnz",Args:"U",Cost:1,Size:3,Doc:"branch if value X is not zero",DocExtra:"The `bnz` instruction opcode 0x40 is followed by two immediate data bytes which are a high byte first and low byte second which together form a 16 bit offset which the instruction may branch to. For a bnz instruction at `pc`, if the last element of the stack is not zero then branch to instruction at `pc + 3 + N`, else proceed to next instruction at `pc + 3`. Branch targets must be well aligned instructions. (e.g. Branching to the second byte of a 2 byte op will be rejected.) Branch offsets are currently limited to forward branches only, 0-0x7fff. A future expansion might make this a signed 16 bit integer allowing for backward branches and looping.",ImmediateNote:"{0..0x7fff forward branch offset, big endian}",Groups:["Flow Control"]},{Opcode:72,Name:"pop",Args:".",Cost:1,Size:1,Doc:"discard value X from stack",Groups:["Flow Control"]},{Opcode:73,Name:"dup",Args:".",Returns:"..",Cost:1,Size:1,Doc:"duplicate last value on stack",Groups:["Flow Control"]}]}},{}],29:[function(e,t,o){function r(e,t){if(!e)throw new Error("empty program");if(null==t&&(t=[]),!Array.isArray(t))throw new Error("invalid arguments");let[o,r]=s(e);if(0>=r)throw new Error("version parsing error");if(o>i.EvalMaxVersion)throw new Error("unsupported version");let p=0,u=e.length;for(let o of t)u+=o.length;if(u>d)throw new Error("program too long");if(!l){l={};for(let e of i.Ops)l[e.Opcode]=e}for(let o=r,s;o<e.length;){if(s=l[e[o]],void 0===s)throw new Error("invalid instruction");p+=s.Cost;let t=s.Size;if(0==t)switch(s.Opcode){case 32:{t=a(e,o);break}case 38:{t=n(e,o);break}default:throw new Error("invalid instruction");}o+=t}if(p>c)throw new Error("program too costly to run");return!0}function a(e,t){let o=1,[r,a]=s(e.slice(t+o));if(0>=a)throw new Error(`could not decode int const block size at pc=${t+o}`);o+=a;for(let n=0;n<r;n++){if(t+o>=e.length)throw new Error("intcblock ran past end of program");if([_,a]=s(e.slice(t+o)),0>=a)throw new Error(`could not decode int const[${n}] block size at pc=${t+o}`);o+=a}return o}function n(e,t){let o=1,[r,a]=s(e.slice(t+o));if(0>=a)throw new Error(`could not decode []byte const block size at pc=${t+o}`);o+=a;for(let a=0;a<r;a++){if(t+o>=e.length)throw new Error("bytecblock ran past end of program");let[r,n]=s(e.slice(t+o));if(0>=n)throw new Error(`could not decode []byte] const[${a}] block size at pc=${t+o}`);if(o+=n,t+o>=e.length)throw new Error("bytecblock ran past end of program");o+=r}return o}function s(e){let t=0,o=0;for(let r=0;r<e.length;r++){if(b=e[r],128>b)return 9<r||9==r&&1<b?[0,-(r+1)]:[t|b<<o,r+1];t+=(127&b)<<o,o+=7}return[0,0]}const i=e("./langspec.json");let l;const c=2e4,d=1e3;t.exports={checkProgram:r,parseUvarint:s,checkIntConstBlock:a,checkByteConstBlock:n}},{"./langspec.json":28}],30:[function(e,t,o){(function(o){const r=e("assert"),a=e("./nacl/naclWrappers"),n=e("./encoding/address"),s=e("./encoding/encoding"),i=e("./logic/logic"),l=e("./multisig"),c=e("./utils/utils");class LogicSig{constructor(e,t){this.tag=o.from("Program"),r(i.checkProgram(e,t)),this.logic=e,this.args=t,this.sig=void 0,this.msig=void 0}get_obj_for_encoding(){let e={l:this.logic};return this.args&&(e.arg=this.args),this.sig?e.sig=this.sig:this.msig&&(e.msig=this.msig),e}static from_obj_for_encoding(e){let t=new LogicSig(e.l,e.arg);return t.sig=e.sig,t.msig=e.msig,t}verify(e){if(this.sig&&this.msig)return!1;try{i.checkProgram(this.logic,this.args)}catch(t){return!1}let t=c.concatArrays(this.tag,this.logic);if(!this.sig&&!this.msig){let o=a.genericHash(t);return c.arrayEqual(o,e)}return this.sig?a.verify(t,this.sig,e):l.verifyMultisig(t,this.msig,e)}address(){let e=c.concatArrays(this.tag,this.logic),t=a.genericHash(e);return n.encode(t)}sign(e,t){if(t===void 0)this.sig=this.signProgram(e);else{let o=t.addrs.map(e=>({pk:n.decode(e).publicKey}));this.msig={v:t.version,thr:t.threshold,subsig:o};let[r,a]=this.singleSignMultisig(e,this.msig);this.msig.subsig[a].s=r}}appendToMultisig(e){if(this.msig===void 0)throw new Error("no multisig present");let[t,o]=this.singleSignMultisig(e,this.msig);this.msig.subsig[o].s=t}signProgram(e){let t=c.concatArrays(this.tag,this.logic);const o=a.sign(t,e);return o}singleSignMultisig(e,t){let o=-1,r=a.keyPairFromSecretKey(e).publicKey;for(let a=0,n;a<t.subsig.length;a++)if(n=t.subsig[a].pk,c.arrayEqual(n,r)){o=a;break}if(-1==o)throw new Error("invalid secret key");let n=this.signProgram(e);return[n,o]}toByte(){return s.encode(this.get_obj_for_encoding())}static fromByte(e){let t=s.decode(e);return LogicSig.from_obj_for_encoding(t)}}t.exports={LogicSig}}).call(this,e("buffer").Buffer)},{"./encoding/address":26,"./encoding/encoding":27,"./logic/logic":29,"./multisig":34,"./nacl/naclWrappers":35,"./utils/utils":37,assert:2,buffer:8}],31:[function(e,t,o){(function(o){function a(e){return p.mergeMultisigTransactions(e)}function n(e){const t=[];for(let o of e){let e=o;o instanceof d.Transaction||(e=new d.Transaction(o)),t.push(e.rawTxID())}const r=new d.TxGroup(t),a=r.toByte(),n=o.from(f.concatArrays(r.tag,a)),i=s.genericHash(n);return o.from(i)}const s=e("./nacl/naclWrappers"),i=e("./encoding/address"),l=e("./mnemonic/mnemonic"),c=e("./encoding/encoding"),d=e("./transaction"),p=e("./multisig"),u=e("./bid"),h=e("./client/algod"),g=e("./client/kmd"),f=e("./utils/utils"),y=e("./logicsig");let m=h.Algod,w=g.Kmd;const x=o.from([77,88]),v=1e6,k=new Error("The transaction sender address and multisig preimage do not match."),A=new Error("Microalgos should be positive and less than 2^53 - 1.");t.exports={isValidAddress:function(e){return i.isValidAddress(e)},generateAccount:function(){let e=s.keyPair(),t=i.encode(e.publicKey);return{addr:t,sk:e.secretKey}},secretKeyToMnemonic:function(e){let t=e.slice(0,s.SEED_BTYES_LENGTH);return l.mnemonicFromSeed(t)},mnemonicToSecretKey:function(e){let t=l.seedFromMnemonic(e),o=s.keyPairFromSeed(t),r=i.encode(o.publicKey);return{addr:r,sk:o.secretKey}},signTransaction:function(e,t){let o=s.keyPairFromSecretKey(t);e.from=i.encode(o.publicKey);let r=new d.Transaction(e);return{txID:r.txID().toString(),blob:r.signTxn(t)}},signBid:function(e,t){let o=new u.Bid(e);return o.signBid(t)},signBytes:function(e,t){let r=o.from(f.concatArrays(x,e)),a=s.sign(r,t);return a},verifyBytes:function(e,t,r){toBeVerified=o.from(f.concatArrays(x,e));let a=i.decode(r).publicKey;return s.verify(toBeVerified,t,a)},encodeObj:function(e){return new Uint8Array(c.encode(e))},decodeObj:function(e){return c.decode(e)},Algod:m,Kmd:w,mnemonicToMasterDerivationKey:function(e){return l.seedFromMnemonic(e)},masterDerivationKeyToMnemonic:function(e){return l.mnemonicFromSeed(e)},appendSignMultisigTransaction:function(e,{version:t,threshold:o,addrs:r},n){const s=r.map(e=>i.decode(e).publicKey);let l=c.decode(e),d=p.MultisigTransaction.from_obj_for_encoding(l.txn),u=d.partialSignTxn({version:t,threshold:o,pks:s},n);return{txID:d.txID().toString(),blob:a([e,u])}},mergeMultisigTransactions:a,signMultisigTransaction:function(e,{version:t,threshold:o,addrs:r},a){let n=i.fromMultisigPreImgAddrs({version:t,threshold:o,addrs:r});if(!e.hasOwnProperty("from"))e.from=n;else if(e.from!==n)throw k;let s=new p.MultisigTransaction(e);const l=r.map(e=>i.decode(e).publicKey);return{txID:s.txID().toString(),blob:s.partialSignTxn({version:t,threshold:o,pks:l},a)}},multisigAddress:function({version:e,threshold:t,addrs:o}){return i.fromMultisigPreImgAddrs({version:e,threshold:t,addrs:o})},ERROR_MULTISIG_BAD_SENDER:k,ERROR_INVALID_MICROALGOS:A,microalgosToAlgos:function(e){if(0>e||!r(e))throw A;return e/v},algosToMicroalgos:function(e){return Math.round(e*v)},computeGroupID:n,assignGroupID:function(e,t=void 0){const o=n(e);let r=[];for(tx of e)t&&i.encode(tx.from.publicKey)!=t||(tx.group=o,r.push(tx));return r},makeLogicSig:function(e,t){return new y.LogicSig(e,t)},signLogicSigTransaction:function(e,t){if(!t.verify(i.decode(e.from).publicKey))throw new Error("invalid signature");let o=new d.Transaction(e),r={lsig:t.get_obj_for_encoding(),txn:o.get_obj_for_encoding()};return{txID:o.txID().toString(),blob:c.encode(r)}},makePaymentTxn:function(e,t,o,r,a,n,s,i,l,c){return new d.Transaction({from:e,to:t,fee:o,amount:r,closeRemainderTo:a,firstRound:n,lastRound:s,note:i,genesisHash:l,genesisID:c,type:"pay"})},makeKeyRegistrationTxn:function(e,t,o,r,a,n,s,i,l,c,p,u){return new d.Transaction({from:e,fee:t,firstRound:o,lastRound:r,note:a,genesisHash:n,voteKey:i,selectionKey:l,voteFirst:c,voteLast:p,voteKeyDilution:u,genesisID:s,type:"keyreg"})},makeAssetCreateTxn:function(e,t,o,r,a,n,s,i,l,c,p,u,h,g,f,y,m,w){return new d.Transaction({from:e,fee:t,firstRound:o,lastRound:r,note:a,genesisHash:n,assetTotal:i,assetDecimals:l,assetDefaultFrozen:c,assetUnitName:f,assetName:y,assetURL:m,assetMetadataHash:w,assetManager:p,assetReserve:u,assetFreeze:h,assetClawback:g,genesisID:s,type:"acfg"})},makeAssetConfigTxn:function(e,t,o,r,a,n,s,i,l,c,p,u,h=!0){if(h&&(l===void 0||c===void 0||p===void 0||u===void 0))throw Error("strict empty address checking was turned on, but at least one empty address was provided");return new d.Transaction({from:e,fee:t,firstRound:o,lastRound:r,genesisHash:n,genesisID:s,assetIndex:i,assetManager:l,assetReserve:c,assetFreeze:p,assetClawback:u,type:"acfg",note:a})},makeAssetDestroyTxn:function(e,t,o,r,a,n,s,i){return new d.Transaction({from:e,fee:t,firstRound:o,lastRound:r,genesisHash:n,genesisID:s,assetIndex:i,type:"acfg",note:a})},makeAssetFreezeTxn:function(e,t,o,r,a,n,s,i,l,c){return new d.Transaction({from:e,fee:t,firstRound:o,lastRound:r,genesisHash:n,type:"afrz",freezeAccount:l,assetIndex:i,freezeState:c,note:a})},makeAssetTransferTxn:function(e,t,o,r,a,n,s,i,l,c,p,u){return new d.Transaction({type:"axfer",from:e,to:t,amount:n,fee:a,firstRound:s,lastRound:i,genesisHash:c,genesisID:p,assetIndex:u,note:l,assetRevocationTarget:r,closeRemainderTo:o})}}}).call(this,e("buffer").Buffer)},{"./bid":22,"./client/algod":23,"./client/kmd":25,"./encoding/address":26,"./encoding/encoding":27,"./logicsig":30,"./mnemonic/mnemonic":32,"./multisig":34,"./nacl/naclWrappers":35,"./transaction":36,"./utils/utils":37,buffer:8}],32:[function(e,t,o){function r(e){const t=l.genericHash(e),o=n(t),r=a(o);return r[0]}function a(e){return e.map(e=>i[e])}function n(e){function t(e){a=e<<n|a,n+=8,11<=n&&(r.push(2047&a),a>>=11,n-=11)}function o(){n&&r.push(a)}let r=[],a=0,n=0;return e.forEach(t),o(),r}function s(e){function t(e){for(a=e<<n|a,n+=11;8<=n;)r.push(255&a),a>>=8,n-=8}function o(){n&&r.push(a)}let r=[],a=0,n=0;return e.forEach(t),o(),new Uint8Array(r)}const i=e("./wordlists/english"),l=e("../nacl/naclWrappers"),c=Error("failed to decode mnemonic"),d=Error("the mnemonic contains a word that is not in the wordlist");t.exports={mnemonicFromSeed:function(e){if(e.length!==l.SEED_BTYES_LENGTH)throw new RangeError("Seed length must be "+l.SEED_BTYES_LENGTH);const t=n(e),o=a(t),s=r(e);return o.join(" ")+" "+s},seedFromMnemonic:function(e){const t=e.split(" "),o=t.slice(0,24);for(let t of o)if(-1===i.indexOf(t))throw d;const a=t[t.length-1],n=o.map(e=>i.indexOf(e));let l=s(n);if(33!==l.length)throw c;if(0!==l[l.length-1])throw c;l=l.slice(0,l.length-1);const p=r(l);if(p===a)return l;throw c},ERROR_FAIL_TO_DECODE_MNEMONIC:c,ERROR_NOT_IN_WORDS_LIST:d}},{"../nacl/naclWrappers":35,"./wordlists/english":33}],33:[function(e,t,o){t.exports=["abandon","ability","able","about","above","absent","absorb","abstract","absurd","abuse","access","accident","account","accuse","achieve","acid","acoustic","acquire","across","act","action","actor","actress","actual","adapt","add","addict","address","adjust","admit","adult","advance","advice","aerobic","affair","afford","afraid","again","age","agent","agree","ahead","aim","air","airport","aisle","alarm","album","alcohol","alert","alien","all","alley","allow","almost","alone","alpha","already","also","alter","always","amateur","amazing","among","amount","amused","analyst","anchor","ancient","anger","angle","angry","animal","ankle","announce","annual","another","answer","antenna","antique","anxiety","any","apart","apology","appear","apple","approve","april","arch","arctic","area","arena","argue","arm","armed","armor","army","around","arrange","arrest","arrive","arrow","art","artefact","artist","artwork","ask","aspect","assault","asset","assist","assume","asthma","athlete","atom","attack","attend","attitude","attract","auction","audit","august","aunt","author","auto","autumn","average","avocado","avoid","awake","aware","away","awesome","awful","awkward","axis","baby","bachelor","bacon","badge","bag","balance","balcony","ball","bamboo","banana","banner","bar","barely","bargain","barrel","base","basic","basket","battle","beach","bean","beauty","because","become","beef","before","begin","behave","behind","believe","below","belt","bench","benefit","best","betray","better","between","beyond","bicycle","bid","bike","bind","biology","bird","birth","bitter","black","blade","blame","blanket","blast","bleak","bless","blind","blood","blossom","blouse","blue","blur","blush","board","boat","body","boil","bomb","bone","bonus","book","boost","border","boring","borrow","boss","bottom","bounce","box","boy","bracket","brain","brand","brass","brave","bread","breeze","brick","bridge","brief","bright","bring","brisk","broccoli","broken","bronze","broom","brother","brown","brush","bubble","buddy","budget","buffalo","build","bulb","bulk","bullet","bundle","bunker","burden","burger","burst","bus","business","busy","butter","buyer","buzz","cabbage","cabin","cable","cactus","cage","cake","call","calm","camera","camp","can","canal","cancel","candy","cannon","canoe","canvas","canyon","capable","capital","captain","car","carbon","card","cargo","carpet","carry","cart","case","cash","casino","castle","casual","cat","catalog","catch","category","cattle","caught","cause","caution","cave","ceiling","celery","cement","census","century","cereal","certain","chair","chalk","champion","change","chaos","chapter","charge","chase","chat","cheap","check","cheese","chef","cherry","chest","chicken","chief","child","chimney","choice","choose","chronic","chuckle","chunk","churn","cigar","cinnamon","circle","citizen","city","civil","claim","clap","clarify","claw","clay","clean","clerk","clever","click","client","cliff","climb","clinic","clip","clock","clog","close","cloth","cloud","clown","club","clump","cluster","clutch","coach","coast","coconut","code","coffee","coil","coin","collect","color","column","combine","come","comfort","comic","common","company","concert","conduct","confirm","congress","connect","consider","control","convince","cook","cool","copper","copy","coral","core","corn","correct","cost","cotton","couch","country","couple","course","cousin","cover","coyote","crack","cradle","craft","cram","crane","crash","crater","crawl","crazy","cream","credit","creek","crew","cricket","crime","crisp","critic","crop","cross","crouch","crowd","crucial","cruel","cruise","crumble","crunch","crush","cry","crystal","cube","culture","cup","cupboard","curious","current","curtain","curve","cushion","custom","cute","cycle","dad","damage","damp","dance","danger","daring","dash","daughter","dawn","day","deal","debate","debris","decade","december","decide","decline","decorate","decrease","deer","defense","define","defy","degree","delay","deliver","demand","demise","denial","dentist","deny","depart","depend","deposit","depth","deputy","derive","describe","desert","design","desk","despair","destroy","detail","detect","develop","device","devote","diagram","dial","diamond","diary","dice","diesel","diet","differ","digital","dignity","dilemma","dinner","dinosaur","direct","dirt","disagree","discover","disease","dish","dismiss","disorder","display","distance","divert","divide","divorce","dizzy","doctor","document","dog","doll","dolphin","domain","donate","donkey","donor","door","dose","double","dove","draft","dragon","drama","drastic","draw","dream","dress","drift","drill","drink","drip","drive","drop","drum","dry","duck","dumb","dune","during","dust","dutch","duty","dwarf","dynamic","eager","eagle","early","earn","earth","easily","east","easy","echo","ecology","economy","edge","edit","educate","effort","egg","eight","either","elbow","elder","electric","elegant","element","elephant","elevator","elite","else","embark","embody","embrace","emerge","emotion","employ","empower","empty","enable","enact","end","endless","endorse","enemy","energy","enforce","engage","engine","enhance","enjoy","enlist","enough","enrich","enroll","ensure","enter","entire","entry","envelope","episode","equal","equip","era","erase","erode","erosion","error","erupt","escape","essay","essence","estate","eternal","ethics","evidence","evil","evoke","evolve","exact","example","excess","exchange","excite","exclude","excuse","execute","exercise","exhaust","exhibit","exile","exist","exit","exotic","expand","expect","expire","explain","expose","express","extend","extra","eye","eyebrow","fabric","face","faculty","fade","faint","faith","fall","false","fame","family","famous","fan","fancy","fantasy","farm","fashion","fat","fatal","father","fatigue","fault","favorite","feature","february","federal","fee","feed","feel","female","fence","festival","fetch","fever","few","fiber","fiction","field","figure","file","film","filter","final","find","fine","finger","finish","fire","firm","first","fiscal","fish","fit","fitness","fix","flag","flame","flash","flat","flavor","flee","flight","flip","float","flock","floor","flower","fluid","flush","fly","foam","focus","fog","foil","fold","follow","food","foot","force","forest","forget","fork","fortune","forum","forward","fossil","foster","found","fox","fragile","frame","frequent","fresh","friend","fringe","frog","front","frost","frown","frozen","fruit","fuel","fun","funny","furnace","fury","future","gadget","gain","galaxy","gallery","game","gap","garage","garbage","garden","garlic","garment","gas","gasp","gate","gather","gauge","gaze","general","genius","genre","gentle","genuine","gesture","ghost","giant","gift","giggle","ginger","giraffe","girl","give","glad","glance","glare","glass","glide","glimpse","globe","gloom","glory","glove","glow","glue","goat","goddess","gold","good","goose","gorilla","gospel","gossip","govern","gown","grab","grace","grain","grant","grape","grass","gravity","great","green","grid","grief","grit","grocery","group","grow","grunt","guard","guess","guide","guilt","guitar","gun","gym","habit","hair","half","hammer","hamster","hand","happy","harbor","hard","harsh","harvest","hat","have","hawk","hazard","head","health","heart","heavy","hedgehog","height","hello","helmet","help","hen","hero","hidden","high","hill","hint","hip","hire","history","hobby","hockey","hold","hole","holiday","hollow","home","honey","hood","hope","horn","horror","horse","hospital","host","hotel","hour","hover","hub","huge","human","humble","humor","hundred","hungry","hunt","hurdle","hurry","hurt","husband","hybrid","ice","icon","idea","identify","idle","ignore","ill","illegal","illness","image","imitate","immense","immune","impact","impose","improve","impulse","inch","include","income","increase","index","indicate","indoor","industry","infant","inflict","inform","inhale","inherit","initial","inject","injury","inmate","inner","innocent","input","inquiry","insane","insect","inside","inspire","install","intact","interest","into","invest","invite","involve","iron","island","isolate","issue","item","ivory","jacket","jaguar","jar","jazz","jealous","jeans","jelly","jewel","job","join","joke","journey","joy","judge","juice","jump","jungle","junior","junk","just","kangaroo","keen","keep","ketchup","key","kick","kid","kidney","kind","kingdom","kiss","kit","kitchen","kite","kitten","kiwi","knee","knife","knock","know","lab","label","labor","ladder","lady","lake","lamp","language","laptop","large","later","latin","laugh","laundry","lava","law","lawn","lawsuit","layer","lazy","leader","leaf","learn","leave","lecture","left","leg","legal","legend","leisure","lemon","lend","length","lens","leopard","lesson","letter","level","liar","liberty","library","license","life","lift","light","like","limb","limit","link","lion","liquid","list","little","live","lizard","load","loan","lobster","local","lock","logic","lonely","long","loop","lottery","loud","lounge","love","loyal","lucky","luggage","lumber","lunar","lunch","luxury","lyrics","machine","mad","magic","magnet","maid","mail","main","major","make","mammal","man","manage","mandate","mango","mansion","manual","maple","marble","march","margin","marine","market","marriage","mask","mass","master","match","material","math","matrix","matter","maximum","maze","meadow","mean","measure","meat","mechanic","medal","media","melody","melt","member","memory","mention","menu","mercy","merge","merit","merry","mesh","message","metal","method","middle","midnight","milk","million","mimic","mind","minimum","minor","minute","miracle","mirror","misery","miss","mistake","mix","mixed","mixture","mobile","model","modify","mom","moment","monitor","monkey","monster","month","moon","moral","more","morning","mosquito","mother","motion","motor","mountain","mouse","move","movie","much","muffin","mule","multiply","muscle","museum","mushroom","music","must","mutual","myself","mystery","myth","naive","name","napkin","narrow","nasty","nation","nature","near","neck","need","negative","neglect","neither","nephew","nerve","nest","net","network","neutral","never","news","next","nice","night","noble","noise","nominee","noodle","normal","north","nose","notable","note","nothing","notice","novel","now","nuclear","number","nurse","nut","oak","obey","object","oblige","obscure","observe","obtain","obvious","occur","ocean","october","odor","off","offer","office","often","oil","okay","old","olive","olympic","omit","once","one","onion","online","only","open","opera","opinion","oppose","option","orange","orbit","orchard","order","ordinary","organ","orient","original","orphan","ostrich","other","outdoor","outer","output","outside","oval","oven","over","own","owner","oxygen","oyster","ozone","pact","paddle","page","pair","palace","palm","panda","panel","panic","panther","paper","parade","parent","park","parrot","party","pass","patch","path","patient","patrol","pattern","pause","pave","payment","peace","peanut","pear","peasant","pelican","pen","penalty","pencil","people","pepper","perfect","permit","person","pet","phone","photo","phrase","physical","piano","picnic","picture","piece","pig","pigeon","pill","pilot","pink","pioneer","pipe","pistol","pitch","pizza","place","planet","plastic","plate","play","please","pledge","pluck","plug","plunge","poem","poet","point","polar","pole","police","pond","pony","pool","popular","portion","position","possible","post","potato","pottery","poverty","powder","power","practice","praise","predict","prefer","prepare","present","pretty","prevent","price","pride","primary","print","priority","prison","private","prize","problem","process","produce","profit","program","project","promote","proof","property","prosper","protect","proud","provide","public","pudding","pull","pulp","pulse","pumpkin","punch","pupil","puppy","purchase","purity","purpose","purse","push","put","puzzle","pyramid","quality","quantum","quarter","question","quick","quit","quiz","quote","rabbit","raccoon","race","rack","radar","radio","rail","rain","raise","rally","ramp","ranch","random","range","rapid","rare","rate","rather","raven","raw","razor","ready","real","reason","rebel","rebuild","recall","receive","recipe","record","recycle","reduce","reflect","reform","refuse","region","regret","regular","reject","relax","release","relief","rely","remain","remember","remind","remove","render","renew","rent","reopen","repair","repeat","replace","report","require","rescue","resemble","resist","resource","response","result","retire","retreat","return","reunion","reveal","review","reward","rhythm","rib","ribbon","rice","rich","ride","ridge","rifle","right","rigid","ring","riot","ripple","risk","ritual","rival","river","road","roast","robot","robust","rocket","romance","roof","rookie","room","rose","rotate","rough","round","route","royal","rubber","rude","rug","rule","run","runway","rural","sad","saddle","sadness","safe","sail","salad","salmon","salon","salt","salute","same","sample","sand","satisfy","satoshi","sauce","sausage","save","say","scale","scan","scare","scatter","scene","scheme","school","science","scissors","scorpion","scout","scrap","screen","script","scrub","sea","search","season","seat","second","secret","section","security","seed","seek","segment","select","sell","seminar","senior","sense","sentence","series","service","session","settle","setup","seven","shadow","shaft","shallow","share","shed","shell","sheriff","shield","shift","shine","ship","shiver","shock","shoe","shoot","shop","short","shoulder","shove","shrimp","shrug","shuffle","shy","sibling","sick","side","siege","sight","sign","silent","silk","silly","silver","similar","simple","since","sing","siren","sister","situate","six","size","skate","sketch","ski","skill","skin","skirt","skull","slab","slam","sleep","slender","slice","slide","slight","slim","slogan","slot","slow","slush","small","smart","smile","smoke","smooth","snack","snake","snap","sniff","snow","soap","soccer","social","sock","soda","soft","solar","soldier","solid","solution","solve","someone","song","soon","sorry","sort","soul","sound","soup","source","south","space","spare","spatial","spawn","speak","special","speed","spell","spend","sphere","spice","spider","spike","spin","spirit","split","spoil","sponsor","spoon","sport","spot","spray","spread","spring","spy","square","squeeze","squirrel","stable","stadium","staff","stage","stairs","stamp","stand","start","state","stay","steak","steel","stem","step","stereo","stick","still","sting","stock","stomach","stone","stool","story","stove","strategy","street","strike","strong","struggle","student","stuff","stumble","style","subject","submit","subway","success","such","sudden","suffer","sugar","suggest","suit","summer","sun","sunny","sunset","super","supply","supreme","sure","surface","surge","surprise","surround","survey","suspect","sustain","swallow","swamp","swap","swarm","swear","sweet","swift","swim","swing","switch","sword","symbol","symptom","syrup","system","table","tackle","tag","tail","talent","talk","tank","tape","target","task","taste","tattoo","taxi","teach","team","tell","ten","tenant","tennis","tent","term","test","text","thank","that","theme","then","theory","there","they","thing","this","thought","three","thrive","throw","thumb","thunder","ticket","tide","tiger","tilt","timber","time","tiny","tip","tired","tissue","title","toast","tobacco","today","toddler","toe","together","toilet","token","tomato","tomorrow","tone","tongue","tonight","tool","tooth","top","topic","topple","torch","tornado","tortoise","toss","total","tourist","toward","tower","town","toy","track","trade","traffic","tragic","train","transfer","trap","trash","travel","tray","treat","tree","trend","trial","tribe","trick","trigger","trim","trip","trophy","trouble","truck","true","truly","trumpet","trust","truth","try","tube","tuition","tumble","tuna","tunnel","turkey","turn","turtle","twelve","twenty","twice","twin","twist","two","type","typical","ugly","umbrella","unable","unaware","uncle","uncover","under","undo","unfair","unfold","unhappy","uniform","unique","unit","universe","unknown","unlock","until","unusual","unveil","update","upgrade","uphold","upon","upper","upset","urban","urge","usage","use","used","useful","useless","usual","utility","vacant","vacuum","vague","valid","valley","valve","van","vanish","vapor","various","vast","vault","vehicle","velvet","vendor","venture","venue","verb","verify","version","very","vessel","veteran","viable","vibrant","vicious","victory","video","view","village","vintage","violin","virtual","virus","visa","visit","visual","vital","vivid","vocal","voice","void","volcano","volume","vote","voyage","wage","wagon","wait","walk","wall","walnut","want","warfare","warm","warrior","wash","wasp","waste","water","wave","way","wealth","weapon","wear","weasel","weather","web","wedding","weekend","weird","welcome","west","wet","whale","what","wheat","wheel","when","where","whip","whisper","wide","width","wife","wild","will","win","window","wine","wing","wink","winner","winter","wire","wisdom","wise","wish","witness","wolf","woman","wonder","wood","wool","word","work","world","worry","worth","wrap","wreck","wrestle","wrist","write","wrong","yard","year","yellow","you","young","youth","zebra","zero","zone","zoo"]},{}],34:[function(e,t,o){(function(o){function r(e,{rawSig:t,myPk:r},{version:n,threshold:i,pks:l}){let c=!1,d=l.map(e=>a.bytesEqual(e,r)?(c=!0,{pk:o.from(e),s:t}):{pk:o.from(e)});if(!1==c)throw g;return new Uint8Array(s.encode({msig:{v:n,thr:i,subsig:d},txn:e}))}const a=e("./nacl/naclWrappers"),n=e("./encoding/address"),s=e("./encoding/encoding"),i=e("./transaction"),l=e("./utils/utils"),c=new Error("Not enough multisig transactions to merge. Need at least two"),d=new Error("Cannot merge txs. txIDs differ"),p=new Error("Cannot merge txs. Multisig preimages differ"),u=new Error("Cannot merge txs. subsigs are mismatched."),h=new Error("The transaction from field and multisig preimage do not match."),g=new Error("Key does not exist");class MultisigTransaction extends i.Transaction{get_obj_for_encoding(){return this.hasOwnProperty("objForEncoding")?this.objForEncoding:super.get_obj_for_encoding()}static from_obj_for_encoding(e){if("pay"!==e.type){let t=Object.create(this.prototype);return t.name="Transaction",t.tag=o.from([84,88]),t.objForEncoding=e,t}return super.from_obj_for_encoding(e)}partialSignTxn({version:e,threshold:t,pks:o},s){if(!this.hasOwnProperty("objForEncoding")){let r=n.fromMultisigPreImg({version:e,threshold:t,pks:o});if(n.encode(this.from.publicKey)!==n.encode(r))throw h}let i=a.keyPairFromSecretKey(s).publicKey;return r(this.get_obj_for_encoding(),{rawSig:this.rawSignTxn(s),myPk:i},{version:e,threshold:t,pks:o})}}t.exports={MultisigTransaction,mergeMultisigTransactions:function(e){if(2>e.length)throw c;const t=s.decode(e[0]),r=MultisigTransaction.from_obj_for_encoding(t.txn),a=r.txID().toString(),l=n.encode(t.txn.snd);let h=t.msig.subsig;for(let r=0;r<e.length;r++){let i=s.decode(e[r]),c=MultisigTransaction.from_obj_for_encoding(i.txn);if(c.txID().toString()!==a)throw d;if(i.msig.subsig.length!==t.msig.subsig.length)throw p;let g={version:i.msig.v,threshold:i.msig.thr,pks:i.msig.subsig.map(e=>e.pk)};if(l!==n.encode(n.fromMultisigPreImg(g)))throw p;h=i.msig.subsig.map((e,t)=>{let r=h[t];if(r.s){if(e.s&&0!==o.compare(e.s,r.s))throw u;return{pk:r.pk,s:r.s}}return e.s?{pk:r.pk,s:e.s}:r})}let g={v:t.msig.v,thr:t.msig.thr,subsig:h},f={msig:g,txn:t.txn};return new Uint8Array(s.encode(f))},createMultisigTransaction:r,verifyMultisig:function(e,t,o){const r=t.v,s=t.thr,i=t.subsig;let c=i.map(e=>e.pk);if(t.subsig.length<s)return!1;let d;try{d=n.fromMultisigPreImg({version:r,threshold:s,pks:c})}catch(t){return!1}if(!l.arrayEqual(d,o))return!1;let p=0;for(let r of i)void 0!==r.s&&(p+=1);if(p<s)return!1;let u=0;for(let r of i)void 0!==r.s&&a.verify(e,r.s,r.pk)&&(u+=1);return!(u<s)},ERROR_MULTISIG_MERGE_LESSTHANTWO:c,ERROR_MULTISIG_MERGE_MISMATCH:d,ERROR_MULTISIG_MERGE_WRONG_PREIMAGE:p,ERROR_MULTISIG_MERGE_SIG_MISMATCH:u}}).call(this,e("buffer").Buffer)},{"./encoding/address":26,"./encoding/encoding":27,"./nacl/naclWrappers":35,"./transaction":36,"./utils/utils":37,buffer:8}],35:[function(e,t,o){function r(e){return n.randomBytes(e)}function a(e){return n.sign.keyPair.fromSeed(e)}const n=e("tweetnacl"),s=e("js-sha512");t.exports={genericHash:function(e){return s.sha512_256.array(e)},randomBytes:r,keyPair:function(){let e=r(n.box.secretKeyLength);return a(e)},sign:function(e,t){return n.sign.detached(e,t)},keyPairFromSeed:a,keyPairFromSecretKey:function(e){return n.sign.keyPair.fromSecretKey(e)},bytesEqual:function(e,t){return n.verify(e,t)},verify:function(e,t,o){return n.sign.detached.verify(e,t,o)}},t.exports.PUBLIC_KEY_LENGTH=n.sign.publicKeyLength,t.exports.SECRET_KEY_LENGTH=n.sign.secretKeyLength,t.exports.HASH_BYTES_LENGTH=32,t.exports.SEED_BTYES_LENGTH=32},{"js-sha512":12,tweetnacl:21}],36:[function(e,t,o){(function(o){const a=e("./encoding/address"),n=e("./encoding/encoding"),s=e("./nacl/naclWrappers"),i=e("./utils/utils"),l=e("hi-base32"),c=1e3,d=32,p=16,u=19;t.exports={Transaction:class{constructor({from:e,to:t,fee:n,amount:s,firstRound:i,lastRound:l,note:p,genesisID:h,genesisHash:g,lease:f,closeRemainderTo:y,voteKey:m,selectionKey:w,voteFirst:x,voteLast:v,voteKeyDilution:k,assetIndex:A,assetTotal:S,assetDecimals:T,assetDefaultFrozen:E,assetManager:U,assetReserve:B,assetFreeze:I,assetClawback:R,assetUnitName:z,assetName:D,assetURL:C,assetMetadataHash:L,freezeAccount:O,freezeState:N,assetRevocationTarget:P,type:j="pay",flatFee:M=!1}){if(this.name="Transaction",this.tag=o.from("TX"),e=a.decode(e),void 0!==t&&(t=a.decode(t)),void 0!==y&&(y=a.decode(y)),void 0!==U&&(U=a.decode(U)),void 0!==B&&(B=a.decode(B)),void 0!==I&&(I=a.decode(I)),void 0!==R&&(R=a.decode(R)),void 0!==P&&(P=a.decode(P)),void 0!==O&&(O=a.decode(O)),void 0===g)throw Error("genesis hash must be specified and in a base64 string.");if(g=o.from(g,"base64"),void 0!==s&&(!r(s)||0>s))throw Error("Amount must be a positive number and smaller than 2^53-1");if(!r(n)||0>n)throw Error("fee must be a positive number and smaller than 2^53-1");if(!r(i)||0>i)throw Error("firstRound must be a positive number");if(!r(l)||0>l)throw Error("lastRound must be a positive number");if(void 0!==S&&(!r(S)||0>S))throw Error("Total asset issuance must be a positive number and smaller than 2^53-1");if(void 0!==T&&(!r(T)||0>T||T>u))throw Error("assetDecimals must be a positive number and smaller than "+u.toString());if(void 0!==A&&(!r(A)||0>A))throw Error("Asset index must be a positive number and smaller than 2^53-1");if(void 0===p)p=new Uint8Array(0);else if(p.constructor!==Uint8Array)throw Error("note must be a Uint8Array.");if(void 0!==f){if(f.constructor!==Uint8Array)throw Error("lease must be a Uint8Array.");if(f.length!==d)throw Error("lease must be of length "+d.toString()+".")}else f=new Uint8Array(0);void 0!==m&&(m=o.from(m,"base64")),void 0!==w&&(w=o.from(w,"base64")),Object.assign(this,{from:e,to:t,fee:n,amount:s,firstRound:i,lastRound:l,note:p,genesisID:h,genesisHash:g,lease:f,closeRemainderTo:y,voteKey:m,selectionKey:w,voteFirst:x,voteLast:v,voteKeyDilution:k,assetIndex:A,assetTotal:S,assetDecimals:T,assetDefaultFrozen:E,assetManager:U,assetReserve:B,assetFreeze:I,assetClawback:R,assetUnitName:z,assetName:D,assetURL:C,assetMetadataHash:L,freezeAccount:O,freezeState:N,assetRevocationTarget:P,type:j}),M||(this.fee*=this.estimateSize()),this.fee<c&&(this.fee=c),this.group=void 0}get_obj_for_encoding(){if("pay"==this.type){let e={amt:this.amount,fee:this.fee,fv:this.firstRound,lv:this.lastRound,note:o.from(this.note),rcv:o.from(this.to.publicKey),snd:o.from(this.from.publicKey),type:"pay",gen:this.genesisID,gh:this.genesisHash,lx:o.from(this.lease),grp:this.group};return void 0!==this.closeRemainderTo&&(e.close=o.from(this.closeRemainderTo.publicKey)),e.note.length||delete e.note,e.amt||delete e.amt,e.fee||delete e.fee,e.gen||delete e.gen,void 0===e.grp&&delete e.grp,e.lx.length||delete e.lx,e}if("keyreg"==this.type){let e={fee:this.fee,fv:this.firstRound,lv:this.lastRound,note:o.from(this.note),snd:o.from(this.from.publicKey),type:this.type,gen:this.genesisID,gh:this.genesisHash,lx:o.from(this.lease),grp:this.group,votekey:this.voteKey,selkey:this.selectionKey,votefst:this.voteFirst,votelst:this.voteLast,votekd:this.voteKeyDilution};return e.note.length||delete e.note,e.lx.length||delete e.lx,e.fee||delete e.fee,e.gen||delete e.gen,void 0===e.grp&&delete e.grp,e}if("acfg"==this.type){let e={fee:this.fee,fv:this.firstRound,lv:this.lastRound,note:o.from(this.note),snd:o.from(this.from.publicKey),type:this.type,gen:this.genesisID,gh:this.genesisHash,lx:o.from(this.lease),caid:this.assetIndex,apar:{t:this.assetTotal,df:this.assetDefaultFrozen,dc:this.assetDecimals}};return void 0!==this.assetManager&&(e.apar.m=o.from(this.assetManager.publicKey)),void 0!==this.assetReserve&&(e.apar.r=o.from(this.assetReserve.publicKey)),void 0!==this.assetFreeze&&(e.apar.f=o.from(this.assetFreeze.publicKey)),void 0!==this.assetClawback&&(e.apar.c=o.from(this.assetClawback.publicKey)),void 0!==this.assetName&&(e.apar.an=this.assetName),void 0!==this.assetUnitName&&(e.apar.un=this.assetUnitName),void 0!==this.assetURL&&(e.apar.au=this.assetURL),void 0!==this.assetMetadataHash&&(e.apar.am=o.from(this.assetMetadataHash)),e.note.length||delete e.note,e.lx.length||delete e.lx,e.amt||delete e.amt,e.fee||delete e.fee,e.gen||delete e.gen,e.caid||delete e.caid,e.apar.t||e.apar.un||e.apar.an||e.apar.df||e.apar.m||e.apar.r||e.apar.f||e.apar.c||e.apar.au||e.apar.am||e.apar.dc?(!e.apar.t&&delete e.apar.t,!e.apar.dc&&delete e.apar.dc,!e.apar.un&&delete e.apar.un,!e.apar.an&&delete e.apar.an,!e.apar.df&&delete e.apar.df,!e.apar.m&&delete e.apar.m,!e.apar.r&&delete e.apar.r,!e.apar.f&&delete e.apar.f,!e.apar.c&&delete e.apar.c,!e.apar.au&&delete e.apar.au,!e.apar.am&&delete e.apar.am):delete e.apar,void 0===e.grp&&delete e.grp,e}if("axfer"==this.type){let e={aamt:this.amount,fee:this.fee,fv:this.firstRound,lv:this.lastRound,note:o.from(this.note),snd:o.from(this.from.publicKey),arcv:o.from(this.to.publicKey),type:this.type,gen:this.genesisID,gh:this.genesisHash,lx:o.from(this.lease),xaid:this.assetIndex};return void 0!==this.closeRemainderTo&&(e.aclose=o.from(this.closeRemainderTo.publicKey)),void 0!==this.assetRevocationTarget&&(e.asnd=o.from(this.assetRevocationTarget.publicKey)),e.note.length||delete e.note,e.lx.length||delete e.lx,e.aamt||delete e.aamt,e.amt||delete e.amt,e.fee||delete e.fee,e.gen||delete e.gen,void 0===e.grp&&delete e.grp,e.aclose||delete e.aclose,e.asnd||delete e.asnd,e}if("afrz"==this.type){let e={fee:this.fee,fv:this.firstRound,lv:this.lastRound,note:o.from(this.note),snd:o.from(this.from.publicKey),type:this.type,gen:this.genesisID,gh:this.genesisHash,lx:o.from(this.lease),faid:this.assetIndex,afrz:this.freezeState};return void 0!==this.freezeAccount&&(e.fadd=o.from(this.freezeAccount.publicKey)),e.note.length||delete e.note,e.lx.length||delete e.lx,e.amt||delete e.amt,e.fee||delete e.fee,e.gen||delete e.gen,e.afrz||delete e.afrz,void 0===e.grp&&delete e.grp,e}}static from_obj_for_encoding(e){let t=Object.create(this.prototype);return t.name="Transaction",t.tag=o.from("TX"),t.genesisID=e.gen,t.genesisHash=o.from(e.gh),t.type=e.type,t.fee=e.fee,t.firstRound=e.fv,t.lastRound=e.lv,t.note=new Uint8Array(e.note),t.lease=new Uint8Array(e.lx),t.from=a.decode(a.encode(new Uint8Array(e.snd))),void 0!==e.grp&&(t.group=o.from(e.grp)),"pay"===e.type?(t.amount=e.amt,t.to=a.decode(a.encode(new Uint8Array(e.rcv))),void 0!==e.close&&(t.closeRemainderTo=a.decode(a.encode(e.close)))):"keyreg"===e.type?(t.voteKey=o.from(e.votekey),t.selectionKey=o.from(e.selkey),t.voteKeyDilution=e.votekd,t.voteFirst=e.votefst,t.voteLast=e.votelst):"acfg"===e.type?(void 0!==e.caid&&(t.assetIndex=e.caid),void 0!==e.apar&&(t.assetTotal=e.apar.t,t.assetDefaultFrozen=e.apar.df,void 0!==e.apar.dc&&(t.assetDecimals=e.apar.dc),void 0!==e.apar.m&&(t.assetManager=a.decode(a.encode(new Uint8Array(e.apar.m)))),void 0!==e.apar.r&&(t.assetReserve=a.decode(a.encode(new Uint8Array(e.apar.r)))),void 0!==e.apar.f&&(t.assetFreeze=a.decode(a.encode(new Uint8Array(e.apar.f)))),void 0!==e.apar.c&&(t.assetClawback=a.decode(a.encode(new Uint8Array(e.apar.c)))),void 0!==e.apar.un&&(t.assetUnitName=e.apar.un),void 0!==e.apar.an&&(t.assetName=e.apar.an),void 0!==e.apar.au&&(t.assetURL=e.apar.au),void 0!==e.apar.am&&(t.assetMetadataHash=e.apar.am))):"axfer"===e.type?(void 0!==e.xaid&&(t.assetIndex=e.xaid),void 0!==e.aamt&&(t.amount=e.aamt),void 0!==e.aclose&&(t.closeRemainderTo=a.decode(a.encode(new Uint8Array(e.aclose)))),void 0!==e.asnd&&(t.assetRevocationTarget=a.decode(a.encode(new Uint8Array(e.asnd)))),t.to=a.decode(a.encode(new Uint8Array(e.arcv)))):"afrz"===e.type&&(void 0!==e.afrz&&(t.freezeState=e.afrz),void 0!==e.faid&&(t.assetIndex=e.faid),t.freezeAccount=a.decode(a.encode(new Uint8Array(e.fadd)))),t}estimateSize(){let e=s.keyPair();return this.signTxn(e.secretKey).length}bytesToSign(){let e=this.toByte();return o.from(i.concatArrays(this.tag,e))}toByte(){return n.encode(this.get_obj_for_encoding())}rawSignTxn(e){const t=this.bytesToSign(),r=s.sign(t,e);return o.from(r)}signTxn(e){let t={sig:this.rawSignTxn(e),txn:this.get_obj_for_encoding()};return new Uint8Array(n.encode(t))}rawTxID(){const e=this.toByte(),t=o.from(i.concatArrays(this.tag,e));return o.from(s.genericHash(t))}txID(){const e=this.rawTxID();return l.encode(e).slice(0,52)}addLease(e,t=0){if(e!==void 0){if(e.constructor!==Uint8Array)throw Error("lease must be a Uint8Array.");if(e.length!==d)throw Error("lease must be of length "+d.toString()+".")}else e=new Uint8Array(0);this.lease=e,0!==t&&(this.fee+=37*t)}},TxGroup:class{constructor(e){if(e.length>p){let t=e.length.toString()+" transactions grouped together but max group size is "+p.toString();throw Error(t)}this.name="Transaction group",this.tag=o.from("TG"),this.txGroupHashes=e}get_obj_for_encoding(){const e={txlist:this.txGroupHashes};return e}static from_obj_for_encoding(e){const t=Object.create(this.prototype);t.name="Transaction group",t.tag=o.from("TG"),t.txGroupHashes=[];for(let r of e.txlist)t.txGroupHashes.push(new o.from(r));return t}toByte(){return n.encode(this.get_obj_for_encoding())}}}}).call(this,e("buffer").Buffer)},{"./encoding/address":26,"./encoding/encoding":27,"./nacl/naclWrappers":35,"./utils/utils":37,buffer:8,"hi-base32":10}],37:[function(e,t,o){t.exports={arrayEqual:function(e,t){return!(e.length!==t.length)&&e.every((e,o)=>e===t[o])},concatArrays:function(e,t){let o=new Uint8Array(e.length+t.length);return o.set(e),o.set(t,e.length),o}}},{}]},{},[31])(31)});