From c012397e5913f6a583df641bea5e0e81788d3ccb Mon Sep 17 00:00:00 2001 From: Jason Paulos Date: Wed, 23 Sep 2020 09:42:54 -0400 Subject: [PATCH] 1.7.2 --- CHANGELOG.md | 6 ++++++ dist/algosdk.min.js | 2 +- package-lock.json | 2 +- package.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 637d3af6f..425dbbc73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# 1.7.2 +## Fixed +- Fixed msgpack endpoints returning undefined in browsers (#210 and #215). +- Removed use of class properties (#213). +## Changed +- Remove unneeded dependency js-yaml and changed mock-http-server to a dev dependency (#214 and #212). # 1.7.1 ## Fixed - Fixed set Accept on GET calls diff --git a/dist/algosdk.min.js b/dist/algosdk.min.js index 0e360ebab..ca176bf33 100644 --- a/dist/algosdk.min.js +++ b/dist/algosdk.min.js @@ -1 +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 e=Number.isInteger,t=Math.pow,o=Math.min,a=Number.isSafeInteger,r=Math.abs,s=Math.floor,p=String.fromCharCode,d;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 u=new Error("Cannot find module '"+d+"'");throw u.code="MODULE_NOT_FOUND",u}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=l&&s>>10),m=56320|1023&m),o.push(m)}else o.push(u);65536<=o.length-4&&(s+=p.apply(String,le(o)),o.length=0)}return 0=e){if(0===t&&4294967295>=e){var a=new Uint8Array(4);return(r=new DataView(a.buffer)).setUint32(0,e),a}return a=new Uint8Array(8),(r=new DataView(a.buffer)).setUint32(0,t<<2|3&e/4294967296),r.setUint32(4,4294967295&e),a}var r;return a=new Uint8Array(12),(r=new DataView(a.buffer)).setUint32(0,t),T(r,4,e),a}function v(o){var e=o.getTime(),t=s(e/1e3),a=1e6*(e-1e3*t),r=s(a/1e9);return{sec:t+r,nsec:a-1e9*r}}function g(t){return t instanceof Date?d(v(t)):null}function M(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:z(e,4),nsec:e.getUint32(0)};default:throw new Error("Unrecognized data size for timestamp: "+o.length);}}function m(o){var e=M(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 s=new DataView(x.memory.buffer,a,e),n=0;nt?"-":"")+"0x"+r(t).toString(16).padStart(2,"0")}function F(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 j(t){return null==t[Symbol.asyncIterator]?function(a){return re(this,arguments,function(){var e,s,l,p;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,p=s.value,l?[4,te(void 0)]:[3,5];case 4:return[2,t.sent()];case 5:return[4,te(p)];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 W(o,e){return void 0===e&&(e=Z),ne(this,void 0,void 0,function(){var t;return oe(this,function(a){return t=j(o),[2,new Y(e.extensionCodec,e.maxStrLength,e.maxBinLength,e.maxArrayLength,e.maxMapLength,e.maxExtLength).decodeSingleAsync(t)]})})}function ee(o,e){void 0===e&&(e=Z);var a=j(o);return new Y(e.extensionCodec,e.maxStrLength,e.maxBinLength,e.maxArrayLength,e.maxMapLength,e.maxExtLength).decodeArrayStream(a)}function ae(o,e){void 0===e&&(e=Z);var a=j(o);return new Y(e.extensionCodec,e.maxStrLength,e.maxBinLength,e.maxArrayLength,e.maxMapLength,e.maxExtLength).decodeStream(a)}t.r(e);var ie=function(a,e){var l="function"==typeof Symbol&&a[Symbol.iterator];if(!l)return a;var p=l.call(a),o=[],s,d;try{for(;(void 0===e||0e?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,p){void 0===o&&(o=f.defaultCodec),void 0===a&&(a=100),void 0===s&&(s=2048),void 0===l&&(l=!1),void 0===p&&(p=!1),this.extensionCodec=o,this.maxDepth=a,this.initialBufferSize=s,this.sortKeys=l,this.forceFloat32=p,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.byteLengtht?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(ce&&200>6;else{if(55296<=d&&56319>=d&&p>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,p;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(),u;!o.done;o=d.next())u=o.value,this.encode(u,e+1)}catch(t){i={error:t}}finally{try{o&&!o.done&&(p=d.return)&&p.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 s=0,n;se)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),T(this.view,this.pos,t),this.pos+=8},t}(),B={},C=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 s=0;s=this.maxLengthPerKey?t[0|Math.random()*t.length]=a:t.push(a)},t.prototype.decode=function(a,e,t){var r=this.get(a,e,t);if(r)return r;var s=w(a,e,t),n=Uint8Array.prototype.slice.call(a,e,e+t);return this.store(n,s),s},t}(),D=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(p)throw new TypeError("Generator is already executing.");for(;a;)try{if(p=1,d&&(u=2&t[0]?d.return:t[0]?d.throw||((u=d.return)&&u.call(d),0):d.next)&&!(u=u.call(d,t[1])).done)return u;switch(d=0,u&&(t=[2&t[0],u.value]),t[0]){case 0:case 1:u=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(!(u=0<(u=a.trys).length&&u[u.length-1])&&(6===t[0]||2===t[0])){a=0;continue}if(3===t[0]&&(!u||t[1]>u[0]&&t[1]=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 D(this,void 0,void 0,function(){var t,r,n,i,A,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=(A=this).headByte,v=A.pos,k=A.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,p,d,g,y,m,A,x,v;return O(this,function(o){switch(o.label){case 0:t=e,p=-1,o.label=1;case 1:o.trys.push([1,13,14,19]),d=K(l),o.label=2;case 2:return[4,V(d.next())];case 3:if((g=o.sent()).done)return[3,12];if(y=g.value,e&&0===p)throw this.createNoExtraBytesError(this.totalPos);this.appendBuffer(y),t&&(p=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==--p?[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 A=o.sent(),x={error:A},[3,19];case 14:return o.trys.push([14,,17,18]),g&&!g.done&&(v=d.return)?[4,V(v.call(d))]:[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!=(p=a-128)){this.pushMapState(p),this.complete();continue e}e={}}else if(160>a){if(0!=(p=a-144)){this.pushArrayState(p),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!==(p=this.readU16())){this.pushArrayState(p),this.complete();continue e}e=[]}else if(221===a){if(0!==(p=this.readU32())){this.pushArrayState(p),this.complete();continue e}e=[]}else if(222===a){if(0!==(p=this.readU16())){this.pushMapState(p),this.complete();continue e}e={}}else if(223===a){if(0!==(p=this.readU32())){this.pushMapState(p),this.complete();continue e}e={}}else if(196===a){var p=this.lookU8();e=this.decodeBinary(p,1)}else if(197===a)p=this.lookU16(),e=this.decodeBinary(p,2);else if(198===a)p=this.lookU32(),e=this.decodeBinary(p,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)p=this.lookU8(),e=this.decodeExtension(p,1);else if(200===a)p=this.lookU16(),e=this.decodeExtension(p,2);else{if(201!==a)throw new Error("Unrecognized type byte: "+P(a));p=this.lookU32(),e=this.decodeExtension(p,4)}this.complete();for(var d=this.stack,i;0t)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.byteLengththis.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,a=this.bytes.subarray(t,t+o);return this.pos+=e+o,a},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),a=this.decodeBinary(o,e+1);return this.extensionCodec.decode(a,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=(a=this.view,r=this.pos,4294967296*a.getUint32(r)+a.getUint32(r+4)),a,r;return this.pos+=8,o},t.prototype.readI64=function(){var t=z(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(p)throw new TypeError("Generator is already executing.");for(;a;)try{if(p=1,d&&(u=2&t[0]?d.return:t[0]?d.throw||((u=d.return)&&u.call(d),0):d.next)&&!(u=u.call(d,t[1])).done)return u;switch(d=0,u&&(t=[2&t[0],u.value]),t[0]){case 0:case 1:u=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(!(u=0<(u=a.trys).length&&u[u.length-1])&&(6===t[0]||2===t[0])){a=0;continue}if(3===t[0]&&(!u||t[1]>u[0]&&t[1]u[0]&&t[1]a)return w(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var n;return n=k?u(e,t,a,f,m):m.map(function(o){return g(e,t,a,f,o,k)}),e.seen.pop(),h(n,x,T)}function p(e,t){if(k(t))return e.stylize("undefined","undefined");if(v(t)){var o="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,"\"")+"'";return e.stylize(o,"string")}return x(t)?e.stylize(""+t,"number"):m(t)?e.stylize(""+t,"boolean"):A(t)?e.stylize("null","null"):void 0}function d(e){return"["+Error.prototype.toString.call(e)+"]"}function u(e,t,o,a,r){for(var s=[],n=0,p=t.length;ne.seen.indexOf(p.value)?(i=A(o)?l(e,p.value,null):l(e,p.value,o-1),-1e?"0"+e.toString(10):e.toString(10)}function I(){var e=new Date,t=[C(e.getHours()),C(e.getMinutes()),C(e.getSeconds())].join(":");return[e.getDate(),L[e.getMonth()],t].join(" ")}function D(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var R=/%[sdj%]/g;o.format=function(e){if(!v(e)){for(var t=[],o=0;o=s)return e;switch(e){case"%s":return a[o++]+"";case"%d":return+a[o++];case"%j":try{return JSON.stringify(a[o++])}catch(e){return"[Circular]"}default:return e;}}),l=a[o];o>16,n[l++]=255&h>>8,n[l++]=255&h;return 2===s&&(h=u[e.charCodeAt(d)]<<2|u[e.charCodeAt(d+1)]>>4,n[l++]=255&h),1===s&&(h=u[e.charCodeAt(d)]<<10|u[e.charCodeAt(d+1)]<<4|u[e.charCodeAt(d+2)]>>2,n[l++]=255&h>>8,n[l++]=255&h),n}function n(e){return d[63&e>>18]+d[63&e>>12]+d[63&e>>6]+d[63&e]}function l(e,t,o){for(var a=[],r=t,s;rn?n:s+r));return 1===o?(p=e[t-1],a.push(d[p>>2]+d[63&p<<4]+"==")):2===o&&(p=(e[t-2]<<8)+e[t-1],a.push(d[p>>10]+d[63&p>>4]+d[63&p<<2]+"=")),a.join("")}o.byteLength=function(e){var t=a(e),o=t[0],r=t[1];return 3*(o+r)/4-r},o.toByteArray=s,o.fromByteArray=p;for(var d=[],u=[],g="undefined"==typeof Uint8Array?Array:Uint8Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y=0,m=h.length;ye)throw new RangeError("The value \""+e+"\" is invalid for option \"size\"")}function d(e,t,o){return l(e),0>=e?n(e):void 0===t?n(e):"string"==typeof o?n(e).fill(t,o):n(e).fill(t)}function u(e){return l(e),n(0>e?0:0|f(e))}function g(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!s.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var o=0|x(e,t),a=n(o),r=a.write(e,t);return r!==o&&(a=a.slice(0,r)),a}function h(e){for(var t=0>e.length?0:0|f(e.length),o=n(t),a=0;at||e.byteLength=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647 .toString(16)+" bytes");return 0|e}function A(e){return+e!=e&&(e=0),s.alloc(+e)}function x(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||J(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>>1;case"base64":return Y(e).length;default:if(r)return a?-1:H(e).length;t=(""+t).toLowerCase(),r=!0;}}function v(e,t,o){var a=!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 P(this,t,o);case"utf8":case"utf-8":return R(this,t,o);case"ascii":return O(this,t,o);case"latin1":case"binary":return L(this,t,o);case"base64":return D(this,t,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,o);default:if(a)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),a=!0;}}function k(e,t,o){var a=e[t];e[t]=e[o],e[o]=a}function w(e,t,o,a,r){if(0===e.length)return-1;if("string"==typeof o?(a=o,o=0):2147483647o&&(o=-2147483648),o=+o,Z(o)&&(o=r?0:e.length-1),0>o&&(o=e.length+o),o>=e.length){if(r)return-1;o=e.length-1}else if(0>o)if(r)o=0;else return-1;if("string"==typeof t&&(t=s.from(t,a)),s.isBuffer(t))return 0===t.length?-1:T(e,t,o,a,r);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,o):Uint8Array.prototype.lastIndexOf.call(e,t,o):T(e,[t],o,a,r);throw new TypeError("val must be string, number or Buffer")}function T(e,t,o,a,r){function s(e,t){return 1===n?e[t]:e.readUInt16BE(t*n)}var n=1,l=e.length,p=t.length;if(void 0!==a&&(a=(a+"").toLowerCase(),"ucs2"===a||"ucs-2"===a||"utf16le"===a||"utf-16le"===a)){if(2>e.length||2>t.length)return-1;n=2,l/=2,p/=2,o/=2}var d;if(r){var u=-1;for(d=o;dl&&(o=l-p),d=o;0<=d;d--){for(var g=!0,h=0;hr&&(a=r)):a=r;var s=t.length;a>s/2&&(a=s/2);for(var n=0,l;nn&&(l=n):2===p?(d=e[s+1],128==(192&d)&&(h=(31&n)<<6|63&d,127h||57343h&&(l=h))):void 0}null===l?(l=65533,p=1):65535>>10),l=56320|1023&l),r.push(l),s+=p}return z(r)}function z(e){var t=e.length;if(t<=4096)return p.apply(String,e);for(var o="",a=0;at)&&(t=0),(!o||0>o||o>a)&&(o=a);for(var r="",s=t;se)throw new RangeError("offset is not uint");if(e+t>o)throw new RangeError("Trying to access beyond buffer length")}function K(e,t,o,a,r,n){if(!s.isBuffer(e))throw new TypeError("\"buffer\" argument must be a Buffer instance");if(t>r||te.length)throw new RangeError("Index out of range")}function M(e,t,o,a,r,s){if(o+a>e.length)throw new RangeError("Index out of range");if(0>o)throw new RangeError("Index out of range")}function F(e,t,o,a,r){return t=+t,o>>>=0,r||M(e,t,o,4,34028234663852886e22,-34028234663852886e22),$.write(e,t,o,a,23,4),o+4}function j(e,t,o,a,r){return t=+t,o>>>=0,r||M(e,t,o,8,17976931348623157e292,-17976931348623157e292),$.write(e,t,o,a,52,8),o+8}function G(e){if(e=e.split("=")[0],e=e.trim().replace(te,""),2>e.length)return"";for(;0!=e.length%4;)e+="=";return e}function H(e,t){t=t||1/0;for(var o=e.length,a=null,r=[],s=0,n;sn){if(!a){if(56319n){-1<(t-=3)&&r.push(239,191,189),a=n;continue}n=(a-55296<<10|n-56320)+65536}else a&&-1<(t-=3)&&r.push(239,191,189);if(a=null,128>n){if(0>(t-=1))break;r.push(n)}else if(2048>n){if(0>(t-=2))break;r.push(192|n>>6,128|63&n)}else if(65536>n){if(0>(t-=3))break;r.push(224|n>>12,128|63&n>>6,128|63&n)}else if(1114112>n){if(0>(t-=4))break;r.push(240|n>>18,128|63&n>>12,128|63&n>>6,128|63&n)}else throw new Error("Invalid code point")}return r}function V(e){for(var t=[],o=0;o(t-=2));++a)r=e.charCodeAt(a),s=r>>8,n=r%256,o.push(n),o.push(s);return o}function Y(e){return Q.toByteArray(G(e))}function X(e,t,o,a){for(var r=0;r=t.length||r>=e.length);++r)t[r+o]=e[r];return r}function J(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Z(e){return e!==e}var Q=e("base64-js"),$=e("ieee754"),ee="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=s,r.SlowBuffer=A,r.INSPECT_MAX_BYTES=50;r.kMaxLength=2147483647,s.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}}(),s.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(s.prototype,"parent",{enumerable:!0,get:function(){return s.isBuffer(this)?this.buffer:void 0}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){return s.isBuffer(this)?this.byteOffset:void 0}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),s.poolSize=8192,s.from=function(e,t,o){return i(e,t,o)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(e,t,o){return d(e,t,o)},s.allocUnsafe=function(e){return u(e)},s.allocUnsafeSlow=function(e){return u(e)},s.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==s.prototype},s.compare=function(e,t){if(J(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),J(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError("The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array");if(e===t)return 0;for(var r=e.length,n=t.length,l=0,p=o(r,n);lt&&(e+=" ... "),""},ee&&(s.prototype[ee]=s.prototype.inspect),s.prototype.compare=function(e,t,a,r,n){if(J(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.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===r&&(r=0),void 0===n&&(n=this.length),0>t||a>e.length||0>r||n>this.length)throw new RangeError("out of range index");if(r>=n&&t>=a)return 0;if(r>=n)return-1;if(t>=a)return 1;if(t>>>=0,a>>>=0,r>>>=0,n>>>=0,this===e)return 0;for(var l=n-r,p=a-t,d=o(l,p),u=this.slice(r,n),g=e.slice(t,a),h=0;h>>=0,isFinite(o)?(o>>>=0,void 0===a&&(a="utf8")):(a=o,o=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var r=this.length-t;if((void 0===o||o>r)&&(o=r),0o||0>t)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");for(var s=!1;;)switch(a){case"hex":return S(this,e,t,o);case"utf8":case"utf-8":return B(this,e,t,o);case"ascii":return U(this,e,t,o);case"latin1":case"binary":return E(this,e,t,o);case"base64":return C(this,e,t,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,t,o);default:if(s)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),s=!0;}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};s.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>>=0,t>>>=0,o||q(e,t,this.length);for(var a=this[e],r=1,s=0;++s>>=0,t>>>=0,o||q(e,t,this.length);for(var a=this[e+--t],r=1;0>>=0,t||q(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||q(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||q(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||q(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||q(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,o,a){e>>>=0,o>>>=0,a||q(e,o,this.length);for(var r=this[e],s=1,n=0;++n=s&&(r-=t(2,8*o)),r},s.prototype.readIntBE=function(e,o,a){e>>>=0,o>>>=0,a||q(e,o,this.length);for(var r=o,s=1,n=this[e+--r];0=s&&(n-=t(2,8*o)),n},s.prototype.readInt8=function(e,t){return e>>>=0,t||q(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||q(e,2,this.length);var o=this[e]|this[e+1]<<8;return 32768&o?4294901760|o:o},s.prototype.readInt16BE=function(e,t){e>>>=0,t||q(e,2,this.length);var o=this[e+1]|this[e]<<8;return 32768&o?4294901760|o:o},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||q(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||q(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||q(e,4,this.length),$.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||q(e,4,this.length),$.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||q(e,8,this.length),$.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||q(e,8,this.length),$.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,o,a,r){if(e=+e,o>>>=0,a>>>=0,!r){var s=t(2,8*a)-1;K(this,e,o,a,s,0)}var n=1,l=0;for(this[o]=255&e;++l>>=0,a>>>=0,!r){var s=t(2,8*a)-1;K(this,e,o,a,s,0)}var n=a-1,l=1;for(this[o+n]=255&e;0<=--n&&(l*=256);)this[o+n]=255&e/l;return o+a},s.prototype.writeUInt8=function(e,t,o){return e=+e,t>>>=0,o||K(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,o){return e=+e,t>>>=0,o||K(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUInt16BE=function(e,t,o){return e=+e,t>>>=0,o||K(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUInt32LE=function(e,t,o){return e=+e,t>>>=0,o||K(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},s.prototype.writeUInt32BE=function(e,t,o){return e=+e,t>>>=0,o||K(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},s.prototype.writeIntLE=function(e,o,a,r){if(e=+e,o>>>=0,!r){var s=t(2,8*a-1);K(this,e,o,a,s-1,-s)}var n=0,l=1,p=0;for(this[o]=255&e;++ne&&0===p&&0!==this[o+n-1]&&(p=1),this[o+n]=255&(e/l>>0)-p;return o+a},s.prototype.writeIntBE=function(e,o,a,r){if(e=+e,o>>>=0,!r){var s=t(2,8*a-1);K(this,e,o,a,s-1,-s)}var n=a-1,l=1,p=0;for(this[o+n]=255&e;0<=--n&&(l*=256);)0>e&&0===p&&0!==this[o+n+1]&&(p=1),this[o+n]=255&(e/l>>0)-p;return o+a},s.prototype.writeInt8=function(e,t,o){return e=+e,t>>>=0,o||K(this,e,t,1,127,-128),0>e&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,o){return e=+e,t>>>=0,o||K(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,o){return e=+e,t>>>=0,o||K(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,o){return e=+e,t>>>=0,o||K(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},s.prototype.writeInt32BE=function(e,t,o){return e=+e,t>>>=0,o||K(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},s.prototype.writeFloatLE=function(e,t,o){return F(this,e,t,!0,o)},s.prototype.writeFloatBE=function(e,t,o){return F(this,e,t,!1,o)},s.prototype.writeDoubleLE=function(e,t,o){return j(this,e,t,!0,o)},s.prototype.writeDoubleBE=function(e,t,o){return j(this,e,t,!1,o)},s.prototype.copy=function(e,t,o,a){if(!s.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),0t)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-tr||"latin1"===a)&&(e=r)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=+e);if(0>t||this.length>>=0,o=o===void 0?this.length:o>>>0,e||(e=0);var n;if("number"==typeof e)for(n=t;no;++o){a=16*o;for(var r=0;16>r;++r)t[a+r]=e[o]+e[r]}return t}()}).call(this,e("buffer").Buffer)},{"base64-js":6,buffer:8,ieee754:11}],9:[function(e,t,o){function a(e){if(e)return r(e)}function r(e){for(var t in a.prototype)e[t]=a.prototype[t];return e}"undefined"!=typeof t&&(t.exports=a);a.prototype.on=a.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},a.prototype.once=function(e,t){function o(){this.off(e,o),t.apply(this,arguments)}return o.fn=t,this.on(e,o),this},a.prototype.off=a.prototype.removeListener=a.prototype.removeAllListeners=a.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 a=0,r;a=s){t+=p(s);continue}else 191=s?(n=31&s,r=1):239>=s?(n=15&s,r=2):247>=s?(n=7&s,r=3):h(a,t);for(var l=0;ls||191=n&&h(a,t),1114111=n?t+=p(n):(n-=65536,t+=p((n>>10)+55296),t+=p((1023&n)+56320))}return t},m=function(e){if(!/^[A-Z2-7=]+$/.test(e))throw new Error("Invalid base32 characters");e=e.replace(/=/g,"");for(var t=[],o=0,a=e.length,r=0,s=a>>3<<3,n,l,p,d,g,h,y,m;r>>2),t[o++]=255&(l<<6|p<<1|d>>>4),t[o++]=255&(d<<4|g>>>1),t[o++]=255&(g<<7|h<<2|y>>>3),t[o++]=255&(y<<5|m);var f=a-s;return 2==f?(n=u[e.charAt(r++)],l=u[e.charAt(r++)],t[o++]=255&(n<<3|l>>>2)):4===f?(n=u[e.charAt(r++)],l=u[e.charAt(r++)],p=u[e.charAt(r++)],d=u[e.charAt(r++)],t[o++]=255&(n<<3|l>>>2),t[o++]=255&(l<<6|p<<1|d>>>4)):5===f?(n=u[e.charAt(r++)],l=u[e.charAt(r++)],p=u[e.charAt(r++)],d=u[e.charAt(r++)],g=u[e.charAt(r++)],t[o++]=255&(n<<3|l>>>2),t[o++]=255&(l<<6|p<<1|d>>>4),t[o++]=255&(d<<4|g>>>1)):7===f&&(n=u[e.charAt(r++)],l=u[e.charAt(r++)],p=u[e.charAt(r++)],d=u[e.charAt(r++)],g=u[e.charAt(r++)],h=u[e.charAt(r++)],y=u[e.charAt(r++)],t[o++]=255&(n<<3|l>>>2),t[o++]=255&(l<<6|p<<1|d>>>4),t[o++]=255&(d<<4|g>>>1),t[o++]=255&(g<<7|h<<2|y>>>3)),t},f=function(e){for(var t="",o=e.length,a=0,r=5*parseInt(o/5),s,n,p,d,u;a>>3]+l[31&(s<<2|n>>>6)]+l[31&n>>>1]+l[31&(n<<4|p>>>4)]+l[31&(p<<1|d>>>7)]+l[31&d>>>2]+l[31&(d<<3|u>>>5)]+l[31&u];var g=o-r;return 1==g?(s=e.charCodeAt(a),t+=l[s>>>3]+l[31&s<<2]+"======"):2===g?(s=e.charCodeAt(a++),n=e.charCodeAt(a),t+=l[s>>>3]+l[31&(s<<2|n>>>6)]+l[31&n>>>1]+l[31&n<<4]+"===="):3===g?(s=e.charCodeAt(a++),n=e.charCodeAt(a++),p=e.charCodeAt(a),t+=l[s>>>3]+l[31&(s<<2|n>>>6)]+l[31&n>>>1]+l[31&(n<<4|p>>>4)]+l[31&p<<1]+"==="):4===g&&(s=e.charCodeAt(a++),n=e.charCodeAt(a++),p=e.charCodeAt(a++),d=e.charCodeAt(a),t+=l[s>>>3]+l[31&(s<<2|n>>>6)]+l[31&n>>>1]+l[31&(n<<4|p>>>4)]+l[31&(p<<1|d>>>7)]+l[31&d>>>2]+l[31&d<<3]+"="),t},A=function(e){var t=!1,o="",a=0,r=0,s=0,n=e.length,p,d,u,h,y,m,f;do{for(g[0]=g[5],g[1]=g[6],g[2]=g[7],f=r;af;++a)m=e.charCodeAt(a),128>m?g[f++]=m:2048>m?(g[f++]=192|m>>6,g[f++]=128|63&m):55296>m||57344<=m?(g[f++]=224|m>>12,g[f++]=128|63&m>>6,g[f++]=128|63&m):(m=65536+((1023&m)<<10|1023&e.charCodeAt(++a)),g[f++]=240|m>>18,g[f++]=128|63&m>>12,g[f++]=128|63&m>>6,g[f++]=128|63&m);s+=f-r,r=f-5,a===n&&++a,a>n&&6>f&&(t=!0),p=g[0],4>>3]+l[31&(p<<2|d>>>6)]+l[31&d>>>1]+l[31&(d<<4|u>>>4)]+l[31&(u<<1|h>>>7)]+l[31&h>>>2]+l[31&(h<<3|y>>>5)]+l[31&y]):1===f?o+=l[p>>>3]+l[31&p<<2]+"======":2===f?(d=g[1],o+=l[p>>>3]+l[31&(p<<2|d>>>6)]+l[31&d>>>1]+l[31&d<<4]+"===="):3===f?(d=g[1],u=g[2],o+=l[p>>>3]+l[31&(p<<2|d>>>6)]+l[31&d>>>1]+l[31&(d<<4|u>>>4)]+l[31&u<<1]+"==="):(d=g[1],u=g[2],h=g[3],o+=l[p>>>3]+l[31&(p<<2|d>>>6)]+l[31&d>>>1]+l[31&(d<<4|u>>>4)]+l[31&(u<<1|h>>>7)]+l[31&h>>>2]+l[31&h<<3]+"=")}while(!t);return o},x=function(e){for(var t="",o=e.length,a=0,r=5*parseInt(o/5),s,n,p,d,u;a>>3]+l[31&(s<<2|n>>>6)]+l[31&n>>>1]+l[31&(n<<4|p>>>4)]+l[31&(p<<1|d>>>7)]+l[31&d>>>2]+l[31&(d<<3|u>>>5)]+l[31&u];var g=o-r;return 1==g?(s=e[a],t+=l[s>>>3]+l[31&s<<2]+"======"):2===g?(s=e[a++],n=e[a],t+=l[s>>>3]+l[31&(s<<2|n>>>6)]+l[31&n>>>1]+l[31&n<<4]+"===="):3===g?(s=e[a++],n=e[a++],p=e[a],t+=l[s>>>3]+l[31&(s<<2|n>>>6)]+l[31&n>>>1]+l[31&(n<<4|p>>>4)]+l[31&p<<1]+"==="):4===g&&(s=e[a++],n=e[a++],p=e[a++],d=e[a],t+=l[s>>>3]+l[31&(s<<2|n>>>6)]+l[31&n>>>1]+l[31&(n<<4|p>>>4)]+l[31&(p<<1|d>>>7)]+l[31&d>>>2]+l[31&d<<3]+"="),t},v=function(e,t){if(!t)return y(m(e));if(!/^[A-Z2-7=]+$/.test(e))throw new Error("Invalid base32 characters");var o="",a=e.indexOf("="),r,s,n,l,d,g,h,f;-1===a&&(a=e.length);for(var A=0,x=a>>3<<3;A>>2))+p(255&(s<<6|n<<1|l>>>4))+p(255&(l<<4|d>>>1))+p(255&(d<<7|g<<2|h>>>3))+p(255&(h<<5|f));var v=a-x;return 2==v?(r=u[e.charAt(A++)],s=u[e.charAt(A++)],o+=p(255&(r<<3|s>>>2))):4===v?(r=u[e.charAt(A++)],s=u[e.charAt(A++)],n=u[e.charAt(A++)],l=u[e.charAt(A++)],o+=p(255&(r<<3|s>>>2))+p(255&(s<<6|n<<1|l>>>4))):5===v?(r=u[e.charAt(A++)],s=u[e.charAt(A++)],n=u[e.charAt(A++)],l=u[e.charAt(A++)],d=u[e.charAt(A++)],o+=p(255&(r<<3|s>>>2))+p(255&(s<<6|n<<1|l>>>4))+p(255&(l<<4|d>>>1))):7===v&&(r=u[e.charAt(A++)],s=u[e.charAt(A++)],n=u[e.charAt(A++)],l=u[e.charAt(A++)],d=u[e.charAt(A++)],g=u[e.charAt(A++)],h=u[e.charAt(A++)],o+=p(255&(r<<3|s>>>2))+p(255&(s<<6|n<<1|l>>>4))+p(255&(l<<4|d>>>1))+p(255&(d<<7|g<<2|h>>>3))),o},k={encode:function(e,t){var o="string"!=typeof e;return o&&e.constructor===ArrayBuffer&&(e=new Uint8Array(e)),o?x(e):t?f(e):A(e)},decode:v};v.asBytes=m,s?t.exports=k:(a.base32=k,n&&d(function(){return k}))})()}).call(this,e("_process"),"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global)},{_process:14}],11:[function(e,o,a){a.read=function(o,a,r,n,l){var p=8*l-n-1,u=(1<>1,h=-7,y=r?l-1:0,f=r?-1:1,d=o[a+y],A,x;for(y+=f,A=d&(1<<-h)-1,d>>=-h,h+=p;0>=-h,h+=n;0>1,x=23===p?t(2,-24)-t(2,-77):0,v=l?0:u-1,k=l?1:-1,d=0>a||0===a&&0>1/a?1:0,w,T,S;for(a=r(a),isNaN(a)||a===1/0?(T=isNaN(a)?1:0,w=f):(w=s(h(a)/g),1>a*(S=t(2,-w))&&(w--,S*=2),a+=1<=w+A?x/S:x*t(2,1-A),2<=a*S&&(w++,S/=2),w+A>=f?(T=0,w=f):1<=w+A?(T=(a*S-1)*t(2,p),w+=A):(T=a*t(2,A-1)*t(2,p),w=0));8<=p;o[n+v]=255&T,v+=k,T/=256,p-=8);for(w=w<u?l[p++]=u:2048>u?(l[p++]=192|u>>6,l[p++]=128|63&u):55296>u||57344<=u?(l[p++]=224|u>>12,l[p++]=128|63&u>>6,l[p++]=128|63&u):(u=65536+((1023&u)<<10|1023&e.charCodeAt(++d)),l[p++]=240|u>>18,l[p++]=128|63&u>>12,l[p++]=128|63&u>>6,l[p++]=128|63&u);e=l}128d;++d)m=e[d]||0,h[d]=92^m,y[d]=54^m;a.call(this,t,o),this.update(y),this.oKeyPad=h,this.inner=!0,this.sharedMemory=o}var s="object"==typeof window,n=s?window:{};n.JS_SHA512_NO_WINDOW&&(s=!1);var i=!s&&"object"==typeof self,l=!n.JS_SHA512_NO_NODE_JS&&"object"==typeof e&&e.versions&&e.versions.node;l?n=o:i&&(n=self);var p=!n.JS_SHA512_NO_COMMON_JS&&"object"==typeof t&&t.exports,u="function"==typeof d&&d.amd,g=!n.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"],y=[-2147483648,8388608,32768,128],m=[24,16,8,0],f=[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],A=["hex","array","digest","arrayBuffer"],x=[];(n.JS_SHA512_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),g&&(n.JS_SHA512_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});var v=function(e,t){return function(o){return new a(t,!0).update(o)[e]()}},k=function(e){var t=v("hex",e);t.create=function(){return new a(e)},t.update=function(e){return t.create().update(e)};for(var o=0,r;ol;++a)s[l>>2]|=e[a]<l;++a)n=e.charCodeAt(a),128>n?s[l>>2]|=n<n?(s[l>>2]|=(192|n>>6)<>2]|=(128|63&n)<n||57344<=n?(s[l>>2]|=(224|n>>12)<>2]|=(128|63&n>>6)<>2]|=(128|63&n)<>2]|=(240|n>>18)<>2]|=(128|63&n>>12)<>2]|=(128|63&n>>6)<>2]|=(128|63&n)<>2]|=y[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()}},a.prototype.hash=function(){var e=this.h0h,t=this.h0l,o=this.h1h,a=this.h1l,r=this.h2h,s=this.h2l,n=this.h3h,i=this.h3l,l=this.h4h,p=this.h4l,d=this.h5h,u=this.h5l,g=this.h6h,h=this.h6l,y=this.h7h,m=this.h7l,A=this.blocks,x,v,k,w,T,S,B,U,E,C,I,D,R,z,O,L,P,N,q,K,M,F,G,H,V;for(x=32;160>x;x+=2)K=A[x-30],M=A[x-29],v=(K>>>1|M<<31)^(K>>>8|M<<24)^K>>>7,k=(M>>>1|K<<31)^(M>>>8|K<<24)^(M>>>7|K<<25),K=A[x-4],M=A[x-3],w=(K>>>19|M<<13)^(M>>>29|K<<3)^K>>>6,T=(M>>>19|K<<13)^(K>>>29|M<<3)^(M>>>6|K<<26),K=A[x-32],M=A[x-31],F=A[x-14],G=A[x-13],S=(65535&G)+(65535&M)+(65535&k)+(65535&T),B=(G>>>16)+(M>>>16)+(k>>>16)+(T>>>16)+(S>>>16),U=(65535&F)+(65535&K)+(65535&v)+(65535&w)+(B>>>16),E=(F>>>16)+(K>>>16)+(v>>>16)+(w>>>16)+(U>>>16),A[x]=E<<16|65535&U,A[x+1]=B<<16|65535&S;var W=e,Y=t,X=o,J=a,Z=r,Q=s,$=n,ee=i,te=l,oe=p,ae=d,re=u,se=g,ne=h,ie=y,le=m;for(L=X&Z,P=J&Q,x=0;160>x;x+=8)v=(W>>>28|Y<<4)^(Y>>>2|W<<30)^(Y>>>7|W<<25),k=(Y>>>28|W<<4)^(W>>>2|Y<<30)^(W>>>7|Y<<25),w=(te>>>14|oe<<18)^(te>>>18|oe<<14)^(oe>>>9|te<<23),T=(oe>>>14|te<<18)^(oe>>>18|te<<14)^(te>>>9|oe<<23),C=W&X,I=Y&J,N=C^W&Z^L,q=I^Y&Q^P,H=te&ae^~te&se,V=oe&re^~oe&ne,K=A[x],M=A[x+1],F=f[x],G=f[x+1],S=(65535&G)+(65535&M)+(65535&V)+(65535&T)+(65535&le),B=(G>>>16)+(M>>>16)+(V>>>16)+(T>>>16)+(le>>>16)+(S>>>16),U=(65535&F)+(65535&K)+(65535&H)+(65535&w)+(65535&ie)+(B>>>16),E=(F>>>16)+(K>>>16)+(H>>>16)+(w>>>16)+(ie>>>16)+(U>>>16),K=E<<16|65535&U,M=B<<16|65535&S,S=(65535&q)+(65535&k),B=(q>>>16)+(k>>>16)+(S>>>16),U=(65535&N)+(65535&v)+(B>>>16),E=(N>>>16)+(v>>>16)+(U>>>16),F=E<<16|65535&U,G=B<<16|65535&S,S=(65535&ee)+(65535&M),B=(ee>>>16)+(M>>>16)+(S>>>16),U=(65535&$)+(65535&K)+(B>>>16),E=($>>>16)+(K>>>16)+(U>>>16),ie=E<<16|65535&U,le=B<<16|65535&S,S=(65535&G)+(65535&M),B=(G>>>16)+(M>>>16)+(S>>>16),U=(65535&F)+(65535&K)+(B>>>16),E=(F>>>16)+(K>>>16)+(U>>>16),$=E<<16|65535&U,ee=B<<16|65535&S,v=($>>>28|ee<<4)^(ee>>>2|$<<30)^(ee>>>7|$<<25),k=(ee>>>28|$<<4)^($>>>2|ee<<30)^($>>>7|ee<<25),w=(ie>>>14|le<<18)^(ie>>>18|le<<14)^(le>>>9|ie<<23),T=(le>>>14|ie<<18)^(le>>>18|ie<<14)^(ie>>>9|le<<23),D=$&W,R=ee&Y,N=D^$&X^C,q=R^ee&J^I,H=ie&te^~ie&ae,V=le&oe^~le&re,K=A[x+2],M=A[x+3],F=f[x+2],G=f[x+3],S=(65535&G)+(65535&M)+(65535&V)+(65535&T)+(65535&ne),B=(G>>>16)+(M>>>16)+(V>>>16)+(T>>>16)+(ne>>>16)+(S>>>16),U=(65535&F)+(65535&K)+(65535&H)+(65535&w)+(65535&se)+(B>>>16),E=(F>>>16)+(K>>>16)+(H>>>16)+(w>>>16)+(se>>>16)+(U>>>16),K=E<<16|65535&U,M=B<<16|65535&S,S=(65535&q)+(65535&k),B=(q>>>16)+(k>>>16)+(S>>>16),U=(65535&N)+(65535&v)+(B>>>16),E=(N>>>16)+(v>>>16)+(U>>>16),F=E<<16|65535&U,G=B<<16|65535&S,S=(65535&Q)+(65535&M),B=(Q>>>16)+(M>>>16)+(S>>>16),U=(65535&Z)+(65535&K)+(B>>>16),E=(Z>>>16)+(K>>>16)+(U>>>16),se=E<<16|65535&U,ne=B<<16|65535&S,S=(65535&G)+(65535&M),B=(G>>>16)+(M>>>16)+(S>>>16),U=(65535&F)+(65535&K)+(B>>>16),E=(F>>>16)+(K>>>16)+(U>>>16),Z=E<<16|65535&U,Q=B<<16|65535&S,v=(Z>>>28|Q<<4)^(Q>>>2|Z<<30)^(Q>>>7|Z<<25),k=(Q>>>28|Z<<4)^(Z>>>2|Q<<30)^(Z>>>7|Q<<25),w=(se>>>14|ne<<18)^(se>>>18|ne<<14)^(ne>>>9|se<<23),T=(ne>>>14|se<<18)^(ne>>>18|se<<14)^(se>>>9|ne<<23),z=Z&$,O=Q&ee,N=z^Z&W^D,q=O^Q&Y^R,H=se&ie^~se&te,V=ne&le^~ne&oe,K=A[x+4],M=A[x+5],F=f[x+4],G=f[x+5],S=(65535&G)+(65535&M)+(65535&V)+(65535&T)+(65535&re),B=(G>>>16)+(M>>>16)+(V>>>16)+(T>>>16)+(re>>>16)+(S>>>16),U=(65535&F)+(65535&K)+(65535&H)+(65535&w)+(65535&ae)+(B>>>16),E=(F>>>16)+(K>>>16)+(H>>>16)+(w>>>16)+(ae>>>16)+(U>>>16),K=E<<16|65535&U,M=B<<16|65535&S,S=(65535&q)+(65535&k),B=(q>>>16)+(k>>>16)+(S>>>16),U=(65535&N)+(65535&v)+(B>>>16),E=(N>>>16)+(v>>>16)+(U>>>16),F=E<<16|65535&U,G=B<<16|65535&S,S=(65535&J)+(65535&M),B=(J>>>16)+(M>>>16)+(S>>>16),U=(65535&X)+(65535&K)+(B>>>16),E=(X>>>16)+(K>>>16)+(U>>>16),ae=E<<16|65535&U,re=B<<16|65535&S,S=(65535&G)+(65535&M),B=(G>>>16)+(M>>>16)+(S>>>16),U=(65535&F)+(65535&K)+(B>>>16),E=(F>>>16)+(K>>>16)+(U>>>16),X=E<<16|65535&U,J=B<<16|65535&S,v=(X>>>28|J<<4)^(J>>>2|X<<30)^(J>>>7|X<<25),k=(J>>>28|X<<4)^(X>>>2|J<<30)^(X>>>7|J<<25),w=(ae>>>14|re<<18)^(ae>>>18|re<<14)^(re>>>9|ae<<23),T=(re>>>14|ae<<18)^(re>>>18|ae<<14)^(ae>>>9|re<<23),L=X&Z,P=J&Q,N=L^X&$^z,q=P^J&ee^O,H=ae&se^~ae&ie,V=re&ne^~re&le,K=A[x+6],M=A[x+7],F=f[x+6],G=f[x+7],S=(65535&G)+(65535&M)+(65535&V)+(65535&T)+(65535&oe),B=(G>>>16)+(M>>>16)+(V>>>16)+(T>>>16)+(oe>>>16)+(S>>>16),U=(65535&F)+(65535&K)+(65535&H)+(65535&w)+(65535&te)+(B>>>16),E=(F>>>16)+(K>>>16)+(H>>>16)+(w>>>16)+(te>>>16)+(U>>>16),K=E<<16|65535&U,M=B<<16|65535&S,S=(65535&q)+(65535&k),B=(q>>>16)+(k>>>16)+(S>>>16),U=(65535&N)+(65535&v)+(B>>>16),E=(N>>>16)+(v>>>16)+(U>>>16),F=E<<16|65535&U,G=B<<16|65535&S,S=(65535&Y)+(65535&M),B=(Y>>>16)+(M>>>16)+(S>>>16),U=(65535&W)+(65535&K)+(B>>>16),E=(W>>>16)+(K>>>16)+(U>>>16),te=E<<16|65535&U,oe=B<<16|65535&S,S=(65535&G)+(65535&M),B=(G>>>16)+(M>>>16)+(S>>>16),U=(65535&F)+(65535&K)+(B>>>16),E=(F>>>16)+(K>>>16)+(U>>>16),W=E<<16|65535&U,Y=B<<16|65535&S;S=(65535&t)+(65535&Y),B=(t>>>16)+(Y>>>16)+(S>>>16),U=(65535&e)+(65535&W)+(B>>>16),E=(e>>>16)+(W>>>16)+(U>>>16),this.h0h=E<<16|65535&U,this.h0l=B<<16|65535&S,S=(65535&a)+(65535&J),B=(a>>>16)+(J>>>16)+(S>>>16),U=(65535&o)+(65535&X)+(B>>>16),E=(o>>>16)+(X>>>16)+(U>>>16),this.h1h=E<<16|65535&U,this.h1l=B<<16|65535&S,S=(65535&s)+(65535&Q),B=(s>>>16)+(Q>>>16)+(S>>>16),U=(65535&r)+(65535&Z)+(B>>>16),E=(r>>>16)+(Z>>>16)+(U>>>16),this.h2h=E<<16|65535&U,this.h2l=B<<16|65535&S,S=(65535&i)+(65535&ee),B=(i>>>16)+(ee>>>16)+(S>>>16),U=(65535&n)+(65535&$)+(B>>>16),E=(n>>>16)+($>>>16)+(U>>>16),this.h3h=E<<16|65535&U,this.h3l=B<<16|65535&S,S=(65535&p)+(65535&oe),B=(p>>>16)+(oe>>>16)+(S>>>16),U=(65535&l)+(65535&te)+(B>>>16),E=(l>>>16)+(te>>>16)+(U>>>16),this.h4h=E<<16|65535&U,this.h4l=B<<16|65535&S,S=(65535&u)+(65535&re),B=(u>>>16)+(re>>>16)+(S>>>16),U=(65535&d)+(65535&ae)+(B>>>16),E=(d>>>16)+(ae>>>16)+(U>>>16),this.h5h=E<<16|65535&U,this.h5l=B<<16|65535&S,S=(65535&h)+(65535&ne),B=(h>>>16)+(ne>>>16)+(S>>>16),U=(65535&g)+(65535&se)+(B>>>16),E=(g>>>16)+(se>>>16)+(U>>>16),this.h6h=E<<16|65535&U,this.h6l=B<<16|65535&S,S=(65535&m)+(65535&le),B=(m>>>16)+(le>>>16)+(S>>>16),U=(65535&y)+(65535&ie)+(B>>>16),E=(y>>>16)+(ie>>>16)+(U>>>16),this.h7h=E<<16|65535&U,this.h7l=B<<16|65535&S},a.prototype.hex=function(){this.finalize();var e=this.h0h,t=this.h0l,o=this.h1h,a=this.h1l,r=this.h2h,s=this.h2l,n=this.h3h,i=this.h3l,l=this.h4h,p=this.h4l,d=this.h5h,u=this.h5l,g=this.h6h,y=this.h6l,m=this.h7h,f=this.h7l,A=this.bits,x=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&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&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&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]+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];return 256<=A&&(x+=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<=A&&(x+=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&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]+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&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]),512==A&&(x+=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&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]+h[15&m>>28]+h[15&m>>24]+h[15&m>>20]+h[15&m>>16]+h[15&m>>12]+h[15&m>>8]+h[15&m>>4]+h[15&m]+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]),x},a.prototype.toString=a.prototype.hex,a.prototype.digest=function(){this.finalize();var e=this.h0h,t=this.h0l,o=this.h1h,a=this.h1l,r=this.h2h,s=this.h2l,n=this.h3h,i=this.h3l,l=this.h4h,p=this.h4l,d=this.h5h,u=this.h5l,g=this.h6h,h=this.h6l,y=this.h7h,m=this.h7l,f=this.bits,A=[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&a>>24,255&a>>16,255&a>>8,255&a,255&r>>24,255&r>>16,255&r>>8,255&r,255&s>>24,255&s>>16,255&s>>8,255&s,255&n>>24,255&n>>16,255&n>>8,255&n];return 256<=f&&A.push(255&i>>24,255&i>>16,255&i>>8,255&i),384<=f&&A.push(255&l>>24,255&l>>16,255&l>>8,255&l,255&p>>24,255&p>>16,255&p>>8,255&p,255&d>>24,255&d>>16,255&d>>8,255&d,255&u>>24,255&u>>16,255&u>>8,255&u),512==f&&A.push(255&g>>24,255&g>>16,255&g>>8,255&g,255&h>>24,255&h>>16,255&h>>8,255&h,255&y>>24,255&y>>16,255&y>>8,255&y,255&m>>24,255&m>>16,255&m>>8,255&m),A},a.prototype.array=a.prototype.digest,a.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},a.prototype.clone=function(){var e=new a(this.bits,!1);return this.copyTo(e),e},a.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;to;o++)t["_"+p(o)]=o;var a=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==a.join(""))return!1;var r={};return["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t"].forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var o=a(e),p=1,d,u;p{a.prototype[e]=function(...t){return this._defaults.push({fn:e,args:t}),this}}),a.prototype._setDefaults=function(e){this._defaults.forEach(t=>{e[t.fn].apply(e,t.args)})},t.exports=a},{}],16:[function(e,t,o){function a(){}function r(e){if(!m(e))return e;const t=[];for(const o in e)s(t,o,e[o]);return t.join("&")}function s(e,t,o){if(!(null!=o))null===o&&e.push(encodeURIComponent(t));else if(Array.isArray(o))o.forEach(o=>{s(e,t,o)});else if(m(o))for(const a in o)s(e,`${t}[${a}]`,o[a]);else e.push(encodeURIComponent(t)+"="+encodeURIComponent(o))}function n(e){const t={},o=e.split("&");let a,r;for(let s=0,n=o.length;s{let t=null,a=null;try{a=new p(o)}catch(a){return t=new Error("Parser is unable to parse the response"),t.parse=!0,t.original=a,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",a);let r;try{o._isResponseOK(a)||(r=new Error(a.statusText||"Unsuccessful HTTP response"))}catch(e){r=e}r?(r.original=t,r.response=a,r.status=a.status,o.callback(r,a)):o.callback(null,a)})}function u(e,t,o){const a=x("DELETE",e);return"function"==typeof t&&(o=t,t=null),t&&a.send(t),o&&a.end(o),a}let g;"undefined"==typeof window?"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),g=this):g=self:g=window;const h=e("component-emitter"),y=e("./request-base"),m=e("./is-object"),f=e("./response-base"),A=e("./agent-base");const x=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,x.getXHR=()=>{if(g.XMLHttpRequest&&(!g.location||"file:"!=g.location.protocol||!g.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 v=e=>e.trim();x.serializeObject=r,x.parseString=n,x.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"},x.serialize={"application/x-www-form-urlencoded":r,"application/json":JSON.stringify},x.parse={"application/x-www-form-urlencoded":n,"application/json":JSON.parse},f(p.prototype),p.prototype._parseBody=function(e){let t=x.parse[this.type];return this.req._parser?this.req._parser(this,e):(!t&&l(this.type)&&(t=x.parse["application/json"]),t&&e&&(e.length||e instanceof Object)?t(e):null)},p.prototype.toError=function(){const e=this.req,t=e.method,o=e.url,a=`cannot ${t} ${o} (${this.status})`,r=new Error(a);return r.status=this.status,r.method=t,r.url=o,r},x.Response=p,h(d.prototype),y(d.prototype),d.prototype.type=function(e){return this.set("Content-Type",x.types[e]||e),this},d.prototype.accept=function(e){return this.set("Accept",x.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=r(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 g.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||a,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=x.getXHR();let a=this._formData||this._data;this._setTimeouts(),o.onreadystatechange=()=>{const e=o.readyState;if(2<=e&&t._responseTimeoutTimer&&clearTimeout(t._responseTimeoutTimer),4!=e)return;let a;try{a=o.status}catch(t){a=0}return a?void t.emit("end"):t.timedout||t._aborted?void 0:t.crossDomainError()};const r=(o,a)=>{0new A,["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach(e=>{A.prototype[e.toLowerCase()]=function(t,o){const a=new x.Request(e,t);return this._setDefaults(a),o&&a.end(o),a}}),A.prototype.del=A.prototype["delete"],x.get=(e,t,o)=>{const a=x("GET",e);return"function"==typeof t&&(o=t,t=null),t&&a.query(t),o&&a.end(o),a},x.head=(e,t,o)=>{const a=x("HEAD",e);return"function"==typeof t&&(o=t,t=null),t&&a.query(t),o&&a.end(o),a},x.options=(e,t,o)=>{const a=x("OPTIONS",e);return"function"==typeof t&&(o=t,t=null),t&&a.send(t),o&&a.end(o),a},x.del=u,x["delete"]=u,x.patch=(e,t,o)=>{const a=x("PATCH",e);return"function"==typeof t&&(o=t,t=null),t&&a.send(t),o&&a.end(o),a},x.post=(e,t,o)=>{const a=x("POST",e);return"function"==typeof t&&(o=t,t=null),t&&a.send(t),o&&a.end(o),a},x.put=(e,t,o)=>{const a=x("PUT",e);return"function"==typeof t&&(o=t,t=null),t&&a.send(t),o&&a.end(o),a}},{"./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 a(e){if(e)return r(e)}function r(e){for(const t in a.prototype)e[t]=a.prototype[t];return e}const s=e("./is-object");t.exports=a,a.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,this},a.prototype.parse=function(e){return this._parser=e,this},a.prototype.responseType=function(e){return this._responseType=e,this},a.prototype.serialize=function(e){return this._serializer=e,this},a.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},a.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 n=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];a.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&&~n.indexOf(e.code))return!0;if(e.timeout&&"ECONNABORTED"==e.code)return!0;if(e.crossDomain)return!0}return!1},a.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},a.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,a)=>{e?o(e):t(a)})})}return this._fullfilledPromise.then(e,t)},a.prototype["catch"]=function(e){return this.then(void 0,e)},a.prototype.use=function(e){return e(this),this},a.prototype.ok=function(e){if("function"!=typeof e)throw Error("Callback required");return this._okCallback=e,this},a.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):200<=e.status&&300>e.status)},a.prototype.get=function(e){return this._header[e.toLowerCase()]},a.prototype.getHeader=a.prototype.get,a.prototype.set=function(e,t){if(s(e)){for(const t in e)this.set(t,e[t]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},a.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},a.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(s(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},a.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)},a.prototype._auth=function(e,t,o,a){switch(o.type){case"basic":this.set("Authorization",`Basic ${a(`${e}:${t}`)}`);break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization",`Bearer ${e}`);}return this},a.prototype.withCredentials=function(e){return null==e&&(e=!0),this._withCredentials=e,this},a.prototype.redirects=function(e){return this._maxRedirects=e,this},a.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw TypeError("Invalid argument");return this._maxResponseSize=e,this},a.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},a.prototype.send=function(e){const t=s(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&&s(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)},a.prototype.sortQuery=function(e){return this._sort="undefined"==typeof e||e,this},a.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("&")}}},a.prototype._appendQueryString=()=>{console.trace("Unsupported")},a.prototype._timeoutError=function(e,t,o){if(!this._aborted){const a=new Error(`${e+t}ms exceeded`);a.timeout=t,a.code="ECONNABORTED",a.errno=o,this.timedout=!0,this.abort(),this.callback(a)}},a.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 a(e){if(e)return r(e)}function r(e){for(const t in a.prototype)e[t]=a.prototype[t];return e}const s=e("./utils");t.exports=a,a.prototype.get=function(e){return this.header[e.toLowerCase()]},a.prototype._setHeaderProperties=function(e){const t=e["content-type"]||"";this.type=s.type(t);const o=s.params(t);for(const t in o)this[t]=o[t];this.links={};try{e.link&&(this.links=s.parseLinks(e.link))}catch(e){}},a.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(/ *= */),a=o.shift(),r=o.shift();return a&&r&&(e[a]=r),e},{}),o.parseLinks=e=>e.split(/ *, */).reduce((e,t)=>{const o=t.split(/ *; */),a=o[0].slice(1,-1),r=o[1].split(/ *= */)[1].slice(1,-1);return e[r]=a,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,a){(function(t){'use strict';function a(e,t,o,a){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&a>>24,e[t+5]=255&a>>16,e[t+6]=255&a>>8,e[t+7]=255&a}function r(e,t,o,a,r){var s=0,n;for(n=0;n>>8)-1}function i(e,t,o,a){return r(e,t,o,a,16)}function l(e,t,o,a){return r(e,t,o,a,32)}function p(e,t,o,a){for(var r=255&a[0]|(255&a[1])<<8|(255&a[2])<<16|(255&a[3])<<24,s=255&o[0]|(255&o[1])<<8|(255&o[2])<<16|(255&o[3])<<24,n=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,p=255&o[12]|(255&o[13])<<8|(255&o[14])<<16|(255&o[15])<<24,d=255&a[4]|(255&a[5])<<8|(255&a[6])<<16|(255&a[7])<<24,g=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,y=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,m=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,f=255&a[8]|(255&a[9])<<8|(255&a[10])<<16|(255&a[11])<<24,A=255&o[16]|(255&o[17])<<8|(255&o[18])<<16|(255&o[19])<<24,x=255&o[20]|(255&o[21])<<8|(255&o[22])<<16|(255&o[23])<<24,v=255&o[24]|(255&o[25])<<8|(255&o[26])<<16|(255&o[27])<<24,k=255&o[28]|(255&o[29])<<8|(255&o[30])<<16|(255&o[31])<<24,w=255&a[12]|(255&a[13])<<8|(255&a[14])<<16|(255&a[15])<<24,T=r,S=s,B=n,U=l,E=p,C=d,I=g,D=h,R=y,z=m,O=f,L=A,P=x,N=v,q=k,K=w,M=0,F;20>M;M+=2)F=0|T+P,E^=F<<7|F>>>25,F=0|E+T,R^=F<<9|F>>>23,F=0|R+E,P^=F<<13|F>>>19,F=0|P+R,T^=F<<18|F>>>14,F=0|C+S,z^=F<<7|F>>>25,F=0|z+C,N^=F<<9|F>>>23,F=0|N+z,S^=F<<13|F>>>19,F=0|S+N,C^=F<<18|F>>>14,F=0|O+I,q^=F<<7|F>>>25,F=0|q+O,B^=F<<9|F>>>23,F=0|B+q,I^=F<<13|F>>>19,F=0|I+B,O^=F<<18|F>>>14,F=0|K+L,U^=F<<7|F>>>25,F=0|U+K,D^=F<<9|F>>>23,F=0|D+U,L^=F<<13|F>>>19,F=0|L+D,K^=F<<18|F>>>14,F=0|T+U,S^=F<<7|F>>>25,F=0|S+T,B^=F<<9|F>>>23,F=0|B+S,U^=F<<13|F>>>19,F=0|U+B,T^=F<<18|F>>>14,F=0|C+E,I^=F<<7|F>>>25,F=0|I+C,D^=F<<9|F>>>23,F=0|D+I,E^=F<<13|F>>>19,F=0|E+D,C^=F<<18|F>>>14,F=0|O+z,L^=F<<7|F>>>25,F=0|L+O,R^=F<<9|F>>>23,F=0|R+L,z^=F<<13|F>>>19,F=0|z+R,O^=F<<18|F>>>14,F=0|K+q,P^=F<<7|F>>>25,F=0|P+K,N^=F<<9|F>>>23,F=0|N+P,q^=F<<13|F>>>19,F=0|q+N,K^=F<<18|F>>>14;T=0|T+r,S=0|S+s,B=0|B+n,U=0|U+l,E=0|E+p,C=0|C+d,I=0|I+g,D=0|D+h,R=0|R+y,z=0|z+m,O=0|O+f,L=0|L+A,P=0|P+x,N=0|N+v,q=0|q+k,K=0|K+w,e[0]=255&T>>>0,e[1]=255&T>>>8,e[2]=255&T>>>16,e[3]=255&T>>>24,e[4]=255&S>>>0,e[5]=255&S>>>8,e[6]=255&S>>>16,e[7]=255&S>>>24,e[8]=255&B>>>0,e[9]=255&B>>>8,e[10]=255&B>>>16,e[11]=255&B>>>24,e[12]=255&U>>>0,e[13]=255&U>>>8,e[14]=255&U>>>16,e[15]=255&U>>>24,e[16]=255&E>>>0,e[17]=255&E>>>8,e[18]=255&E>>>16,e[19]=255&E>>>24,e[20]=255&C>>>0,e[21]=255&C>>>8,e[22]=255&C>>>16,e[23]=255&C>>>24,e[24]=255&I>>>0,e[25]=255&I>>>8,e[26]=255&I>>>16,e[27]=255&I>>>24,e[28]=255&D>>>0,e[29]=255&D>>>8,e[30]=255&D>>>16,e[31]=255&D>>>24,e[32]=255&R>>>0,e[33]=255&R>>>8,e[34]=255&R>>>16,e[35]=255&R>>>24,e[36]=255&z>>>0,e[37]=255&z>>>8,e[38]=255&z>>>16,e[39]=255&z>>>24,e[40]=255&O>>>0,e[41]=255&O>>>8,e[42]=255&O>>>16,e[43]=255&O>>>24,e[44]=255&L>>>0,e[45]=255&L>>>8,e[46]=255&L>>>16,e[47]=255&L>>>24,e[48]=255&P>>>0,e[49]=255&P>>>8,e[50]=255&P>>>16,e[51]=255&P>>>24,e[52]=255&N>>>0,e[53]=255&N>>>8,e[54]=255&N>>>16,e[55]=255&N>>>24,e[56]=255&q>>>0,e[57]=255&q>>>8,e[58]=255&q>>>16,e[59]=255&q>>>24,e[60]=255&K>>>0,e[61]=255&K>>>8,e[62]=255&K>>>16,e[63]=255&K>>>24}function d(e,t,o,a){for(var r=255&a[0]|(255&a[1])<<8|(255&a[2])<<16|(255&a[3])<<24,s=255&o[0]|(255&o[1])<<8|(255&o[2])<<16|(255&o[3])<<24,n=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,p=255&o[12]|(255&o[13])<<8|(255&o[14])<<16|(255&o[15])<<24,d=255&a[4]|(255&a[5])<<8|(255&a[6])<<16|(255&a[7])<<24,g=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,y=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,m=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,f=255&a[8]|(255&a[9])<<8|(255&a[10])<<16|(255&a[11])<<24,A=255&o[16]|(255&o[17])<<8|(255&o[18])<<16|(255&o[19])<<24,x=255&o[20]|(255&o[21])<<8|(255&o[22])<<16|(255&o[23])<<24,v=255&o[24]|(255&o[25])<<8|(255&o[26])<<16|(255&o[27])<<24,k=255&o[28]|(255&o[29])<<8|(255&o[30])<<16|(255&o[31])<<24,w=255&a[12]|(255&a[13])<<8|(255&a[14])<<16|(255&a[15])<<24,T=r,S=s,B=n,U=l,E=p,C=d,I=g,D=h,R=y,z=m,O=f,L=A,P=x,N=v,q=k,K=w,M=0,F;20>M;M+=2)F=0|T+P,E^=F<<7|F>>>25,F=0|E+T,R^=F<<9|F>>>23,F=0|R+E,P^=F<<13|F>>>19,F=0|P+R,T^=F<<18|F>>>14,F=0|C+S,z^=F<<7|F>>>25,F=0|z+C,N^=F<<9|F>>>23,F=0|N+z,S^=F<<13|F>>>19,F=0|S+N,C^=F<<18|F>>>14,F=0|O+I,q^=F<<7|F>>>25,F=0|q+O,B^=F<<9|F>>>23,F=0|B+q,I^=F<<13|F>>>19,F=0|I+B,O^=F<<18|F>>>14,F=0|K+L,U^=F<<7|F>>>25,F=0|U+K,D^=F<<9|F>>>23,F=0|D+U,L^=F<<13|F>>>19,F=0|L+D,K^=F<<18|F>>>14,F=0|T+U,S^=F<<7|F>>>25,F=0|S+T,B^=F<<9|F>>>23,F=0|B+S,U^=F<<13|F>>>19,F=0|U+B,T^=F<<18|F>>>14,F=0|C+E,I^=F<<7|F>>>25,F=0|I+C,D^=F<<9|F>>>23,F=0|D+I,E^=F<<13|F>>>19,F=0|E+D,C^=F<<18|F>>>14,F=0|O+z,L^=F<<7|F>>>25,F=0|L+O,R^=F<<9|F>>>23,F=0|R+L,z^=F<<13|F>>>19,F=0|z+R,O^=F<<18|F>>>14,F=0|K+q,P^=F<<7|F>>>25,F=0|P+K,N^=F<<9|F>>>23,F=0|N+P,q^=F<<13|F>>>19,F=0|q+N,K^=F<<18|F>>>14;e[0]=255&T>>>0,e[1]=255&T>>>8,e[2]=255&T>>>16,e[3]=255&T>>>24,e[4]=255&C>>>0,e[5]=255&C>>>8,e[6]=255&C>>>16,e[7]=255&C>>>24,e[8]=255&O>>>0,e[9]=255&O>>>8,e[10]=255&O>>>16,e[11]=255&O>>>24,e[12]=255&K>>>0,e[13]=255&K>>>8,e[14]=255&K>>>16,e[15]=255&K>>>24,e[16]=255&I>>>0,e[17]=255&I>>>8,e[18]=255&I>>>16,e[19]=255&I>>>24,e[20]=255&D>>>0,e[21]=255&D>>>8,e[22]=255&D>>>16,e[23]=255&D>>>24,e[24]=255&R>>>0,e[25]=255&R>>>8,e[26]=255&R>>>16,e[27]=255&R>>>24,e[28]=255&z>>>0,e[29]=255&z>>>8,e[30]=255&z>>>16,e[31]=255&z>>>24}function u(e,t,o,a){p(e,t,o,a)}function g(e,t,o,a){d(e,t,o,a)}function h(e,t,o,a,r,s,n){var l=new Uint8Array(16),p=new Uint8Array(64),d,g;for(g=0;16>g;g++)l[g]=0;for(g=0;8>g;g++)l[g]=s[g];for(;64<=r;){for(u(p,l,n,I),g=0;64>g;g++)e[t+g]=o[a+g]^p[g];for(d=1,g=8;16>g;g++)d=0|d+(255&l[g]),l[g]=255&d,d>>>=8;r-=64,t+=64,a+=64}if(0p;p++)s[p]=0;for(p=0;8>p;p++)s[p]=a[p];for(;64<=o;){for(u(n,s,r,I),p=0;64>p;p++)e[t+p]=n[p];for(l=1,p=8;16>p;p++)l=0|l+(255&s[p]),s[p]=255&l,l>>>=8;o-=64,t+=64}if(0l;l++)s[l]=a[l+16];return y(e,t,o,s,n)}function x(e,t,o,a,r,l,n){var p=new Uint8Array(32);g(p,l,n,I);for(var s=new Uint8Array(8),d=0;8>d;d++)s[d]=l[d+16];return h(e,t,o,a,r,s,p)}function v(e,t,o,a,r,n){var i=new be(n);return i.update(o,a,r),i.finish(e,t),0}function w(e,t,o,a,r,s){var n=new Uint8Array(16);return v(n,0,o,a,r,s),i(e,t,n,0)}function T(e,t,o,a,r){var s;if(32>o)return-1;for(x(e,0,t,0,o,a,r),v(e,16,e,32,o-32,e),s=0;16>s;s++)e[s]=0;return 0}function B(e,t,o,a,r){var s=new Uint8Array(32),n;if(32>o)return-1;if(f(s,0,32,a,r),0!==w(t,16,t,32,o-32,s))return-1;for(x(e,0,t,0,o,a,r),n=0;32>n;n++)e[n]=0;return 0}function U(e,t){var o;for(o=0;16>o;o++)e[o]=0|t[o]}function E(e){var t=1,o,a;for(o=0;16>o;o++)a=e[o]+t+65535,t=s(a/65536),e[o]=a-65536*t;e[0]+=t-1+37*(t-1)}function C(e,o,a){for(var r=0,s;16>r;r++)s=~(a-1)&(e[r]^o[r]),e[r]^=s,o[r]^=s}function R(e,o){var a=pe(),r=pe(),t,s,n;for(t=0;16>t;t++)r[t]=o[t];for(E(r),E(r),E(r),s=0;2>s;s++){for(a[0]=r[0]-65517,t=1;15>t;t++)a[t]=r[t]-65535-(1&a[t-1]>>16),a[t-1]&=65535;a[15]=r[15]-32767-(1&a[14]>>16),n=1&a[15]>>16,a[14]&=65535,C(r,a,1-n)}for(t=0;16>t;t++)e[2*t]=255&r[t],e[2*t+1]=r[t]>>8}function z(e,t){var o=new Uint8Array(32),a=new Uint8Array(32);return R(o,e),R(a,t),l(o,0,a,0)}function O(e){var t=new Uint8Array(32);return R(t,e),1&t[0]}function P(e,t){var o;for(o=0;16>o;o++)e[o]=t[2*o]+(t[2*o+1]<<8);e[15]&=32767}function N(e,t,o){for(var a=0;16>a;a++)e[a]=t[a]+o[a]}function n(e,t,o){for(var a=0;16>a;a++)e[a]=t[a]-o[a]}function m(e,t,o){var a=0,r=0,n=0,i=0,l=0,p=0,d=0,u=0,g=0,h=0,y=0,m=0,f=0,A=0,x=0,k=0,w=0,T=0,S=0,B=0,U=0,E=0,C=0,I=0,D=0,R=0,z=0,O=0,L=0,P=0,N=0,q=o[0],K=o[1],M=o[2],F=o[3],j=o[4],G=o[5],H=o[6],V=o[7],W=o[8],Y=o[9],X=o[10],J=o[11],Z=o[12],Q=o[13],$=o[14],ee=o[15],te,oe;te=t[0],a+=te*q,r+=te*K,n+=te*M,i+=te*F,l+=te*j,p+=te*G,d+=te*H,u+=te*V,g+=te*W,h+=te*Y,y+=te*X,m+=te*J,f+=te*Z,A+=te*Q,x+=te*$,k+=te*ee,te=t[1],r+=te*q,n+=te*K,i+=te*M,l+=te*F,p+=te*j,d+=te*G,u+=te*H,g+=te*V,h+=te*W,y+=te*Y,m+=te*X,f+=te*J,A+=te*Z,x+=te*Q,k+=te*$,w+=te*ee,te=t[2],n+=te*q,i+=te*K,l+=te*M,p+=te*F,d+=te*j,u+=te*G,g+=te*H,h+=te*V,y+=te*W,m+=te*Y,f+=te*X,A+=te*J,x+=te*Z,k+=te*Q,w+=te*$,T+=te*ee,te=t[3],i+=te*q,l+=te*K,p+=te*M,d+=te*F,u+=te*j,g+=te*G,h+=te*H,y+=te*V,m+=te*W,f+=te*Y,A+=te*X,x+=te*J,k+=te*Z,w+=te*Q,T+=te*$,S+=te*ee,te=t[4],l+=te*q,p+=te*K,d+=te*M,u+=te*F,g+=te*j,h+=te*G,y+=te*H,m+=te*V,f+=te*W,A+=te*Y,x+=te*X,k+=te*J,w+=te*Z,T+=te*Q,S+=te*$,B+=te*ee,te=t[5],p+=te*q,d+=te*K,u+=te*M,g+=te*F,h+=te*j,y+=te*G,m+=te*H,f+=te*V,A+=te*W,x+=te*Y,k+=te*X,w+=te*J,T+=te*Z,S+=te*Q,B+=te*$,U+=te*ee,te=t[6],d+=te*q,u+=te*K,g+=te*M,h+=te*F,y+=te*j,m+=te*G,f+=te*H,A+=te*V,x+=te*W,k+=te*Y,w+=te*X,T+=te*J,S+=te*Z,B+=te*Q,U+=te*$,E+=te*ee,te=t[7],u+=te*q,g+=te*K,h+=te*M,y+=te*F,m+=te*j,f+=te*G,A+=te*H,x+=te*V,k+=te*W,w+=te*Y,T+=te*X,S+=te*J,B+=te*Z,U+=te*Q,E+=te*$,C+=te*ee,te=t[8],g+=te*q,h+=te*K,y+=te*M,m+=te*F,f+=te*j,A+=te*G,x+=te*H,k+=te*V,w+=te*W,T+=te*Y,S+=te*X,B+=te*J,U+=te*Z,E+=te*Q,C+=te*$,I+=te*ee,te=t[9],h+=te*q,y+=te*K,m+=te*M,f+=te*F,A+=te*j,x+=te*G,k+=te*H,w+=te*V,T+=te*W,S+=te*Y,B+=te*X,U+=te*J,E+=te*Z,C+=te*Q,I+=te*$,D+=te*ee,te=t[10],y+=te*q,m+=te*K,f+=te*M,A+=te*F,x+=te*j,k+=te*G,w+=te*H,T+=te*V,S+=te*W,B+=te*Y,U+=te*X,E+=te*J,C+=te*Z,I+=te*Q,D+=te*$,R+=te*ee,te=t[11],m+=te*q,f+=te*K,A+=te*M,x+=te*F,k+=te*j,w+=te*G,T+=te*H,S+=te*V,B+=te*W,U+=te*Y,E+=te*X,C+=te*J,I+=te*Z,D+=te*Q,R+=te*$,z+=te*ee,te=t[12],f+=te*q,A+=te*K,x+=te*M,k+=te*F,w+=te*j,T+=te*G,S+=te*H,B+=te*V,U+=te*W,E+=te*Y,C+=te*X,I+=te*J,D+=te*Z,R+=te*Q,z+=te*$,O+=te*ee,te=t[13],A+=te*q,x+=te*K,k+=te*M,w+=te*F,T+=te*j,S+=te*G,B+=te*H,U+=te*V,E+=te*W,C+=te*Y,I+=te*X,D+=te*J,R+=te*Z,z+=te*Q,O+=te*$,L+=te*ee,te=t[14],x+=te*q,k+=te*K,w+=te*M,T+=te*F,S+=te*j,B+=te*G,U+=te*H,E+=te*V,C+=te*W,I+=te*Y,D+=te*X,R+=te*J,z+=te*Z,O+=te*Q,L+=te*$,P+=te*ee,te=t[15],k+=te*q,w+=te*K,T+=te*M,S+=te*F,B+=te*j,U+=te*G,E+=te*H,C+=te*V,I+=te*W,D+=te*Y,R+=te*X,z+=te*J,O+=te*Z,L+=te*Q,P+=te*$,N+=te*ee,a+=38*w,r+=38*T,n+=38*S,i+=38*B,l+=38*U,p+=38*E,d+=38*C,u+=38*I,g+=38*D,h+=38*R,y+=38*z,m+=38*O,f+=38*L,A+=38*P,x+=38*N,oe=1,te=a+oe+65535,oe=s(te/65536),a=te-65536*oe,te=r+oe+65535,oe=s(te/65536),r=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=p+oe+65535,oe=s(te/65536),p=te-65536*oe,te=d+oe+65535,oe=s(te/65536),d=te-65536*oe,te=u+oe+65535,oe=s(te/65536),u=te-65536*oe,te=g+oe+65535,oe=s(te/65536),g=te-65536*oe,te=h+oe+65535,oe=s(te/65536),h=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=f+oe+65535,oe=s(te/65536),f=te-65536*oe,te=A+oe+65535,oe=s(te/65536),A=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,a+=oe-1+37*(oe-1),oe=1,te=a+oe+65535,oe=s(te/65536),a=te-65536*oe,te=r+oe+65535,oe=s(te/65536),r=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=p+oe+65535,oe=s(te/65536),p=te-65536*oe,te=d+oe+65535,oe=s(te/65536),d=te-65536*oe,te=u+oe+65535,oe=s(te/65536),u=te-65536*oe,te=g+oe+65535,oe=s(te/65536),g=te-65536*oe,te=h+oe+65535,oe=s(te/65536),h=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=f+oe+65535,oe=s(te/65536),f=te-65536*oe,te=A+oe+65535,oe=s(te/65536),A=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,a+=oe-1+37*(oe-1),e[0]=a,e[1]=r,e[2]=n,e[3]=i,e[4]=l,e[5]=p,e[6]=d,e[7]=u,e[8]=g,e[9]=h,e[10]=y,e[11]=m,e[12]=f,e[13]=A,e[14]=x,e[15]=k}function A(e,t){m(e,t,t)}function k(e,t){var o=pe(),r;for(r=0;16>r;r++)o[r]=t[r];for(r=253;0<=r;r--)A(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=pe(),r;for(r=0;16>r;r++)o[r]=t[r];for(r=250;0<=r;r--)A(o,o),1!==r&&m(o,o,t);for(r=0;16>r;r++)e[r]=o[r]}function M(t,o,s){var l=new Uint8Array(32),p=new Float64Array(80),u=pe(),a=pe(),g=pe(),h=pe(),d=pe(),e=pe(),y,f;for(f=0;31>f;f++)l[f]=o[f];for(l[31]=64|127&o[31],l[0]&=248,P(p,s),f=0;16>f;f++)a[f]=p[f],h[f]=u[f]=g[f]=0;for(u[0]=h[0]=1,f=254;0<=f;--f)y=1&l[f>>>3]>>>(7&f),C(u,a,y),C(g,h,y),N(d,u,g),n(u,u,g),N(g,a,h),n(a,a,h),A(h,d),A(e,u),m(u,g,u),m(g,a,d),N(d,u,g),n(u,u,g),A(a,u),n(g,h,e),m(u,g,ye),N(u,u,h),m(g,g,u),m(u,h,e),m(h,a,p),A(a,d),C(u,a,y),C(g,h,y);for(f=0;16>f;f++)p[f+16]=u[f],p[f+32]=g[f],p[f+48]=a[f],p[f+64]=h[f];var x=p.subarray(32),v=p.subarray(16);return k(x,x),m(v,v,x),R(t,v),0}function F(e,t){return M(e,t,ue)}function j(e,t){return q(t,32),F(e,t)}function G(e,t,o){var a=new Uint8Array(32);return M(a,o,t),g(e,de,a,I)}function H(e,t,o,r){for(var s=new Int32Array(16),p=new Int32Array(16),u=e[0],g=e[1],y=e[2],m=e[3],f=e[4],A=e[5],x=e[6],v=e[7],k=t[0],w=t[1],T=t[2],S=t[3],B=t[4],U=t[5],E=t[6],C=t[7],I=0,D,R,z,O,L,P,N,q,K,M,F,G,H,V,W,Y,X,J,Z,Q,$,ee,te,oe,ae,re;128<=r;){for(Z=0;16>Z;Z++)Q=8*Z+I,s[Z]=o[Q+0]<<24|o[Q+1]<<16|o[Q+2]<<8|o[Q+3],p[Z]=o[Q+4]<<24|o[Q+5]<<16|o[Q+6]<<8|o[Q+7];for(Z=0;80>Z;Z++)if(D=u,R=g,z=y,O=m,L=f,P=A,N=x,q=v,K=k,M=w,F=T,G=S,H=B,V=U,W=E,Y=C,$=v,ee=C,te=65535&ee,oe=ee>>>16,ae=65535&$,re=$>>>16,$=(f>>>14|B<<18)^(f>>>18|B<<14)^(B>>>9|f<<23),ee=(B>>>14|f<<18)^(B>>>18|f<<14)^(f>>>9|B<<23),te+=65535&ee,oe+=ee>>>16,ae+=65535&$,re+=$>>>16,$=f&A^~f&x,ee=B&U^~B&E,te+=65535&ee,oe+=ee>>>16,ae+=65535&$,re+=$>>>16,$=xe[2*Z],ee=xe[2*Z+1],te+=65535&ee,oe+=ee>>>16,ae+=65535&$,re+=$>>>16,$=s[Z%16],ee=p[Z%16],te+=65535&ee,oe+=ee>>>16,ae+=65535&$,re+=$>>>16,oe+=te>>>16,ae+=oe>>>16,re+=ae>>>16,X=65535&ae|re<<16,J=65535&te|oe<<16,$=X,ee=J,te=65535&ee,oe=ee>>>16,ae=65535&$,re=$>>>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,ae+=65535&$,re+=$>>>16,$=u&g^u&y^g&y,ee=k&w^k&T^w&T,te+=65535&ee,oe+=ee>>>16,ae+=65535&$,re+=$>>>16,oe+=te>>>16,ae+=oe>>>16,re+=ae>>>16,q=65535&ae|re<<16,Y=65535&te|oe<<16,$=O,ee=G,te=65535&ee,oe=ee>>>16,ae=65535&$,re=$>>>16,$=X,ee=J,te+=65535&ee,oe+=ee>>>16,ae+=65535&$,re+=$>>>16,oe+=te>>>16,ae+=oe>>>16,re+=ae>>>16,O=65535&ae|re<<16,G=65535&te|oe<<16,g=D,y=R,m=z,f=O,A=L,x=P,v=N,u=q,w=K,T=M,S=F,B=G,U=H,E=V,C=W,k=Y,15==Z%16)for(Q=0;16>Q;Q++)$=s[Q],ee=p[Q],te=65535&ee,oe=ee>>>16,ae=65535&$,re=$>>>16,$=s[(Q+9)%16],ee=p[(Q+9)%16],te+=65535&ee,oe+=ee>>>16,ae+=65535&$,re+=$>>>16,X=s[(Q+1)%16],J=p[(Q+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,ae+=65535&$,re+=$>>>16,X=s[(Q+14)%16],J=p[(Q+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,ae+=65535&$,re+=$>>>16,oe+=te>>>16,ae+=oe>>>16,re+=ae>>>16,s[Q]=65535&ae|re<<16,p[Q]=65535&te|oe<<16;$=u,ee=k,te=65535&ee,oe=ee>>>16,ae=65535&$,re=$>>>16,$=e[0],ee=t[0],te+=65535&ee,oe+=ee>>>16,ae+=65535&$,re+=$>>>16,oe+=te>>>16,ae+=oe>>>16,re+=ae>>>16,e[0]=u=65535&ae|re<<16,t[0]=k=65535&te|oe<<16,$=g,ee=w,te=65535&ee,oe=ee>>>16,ae=65535&$,re=$>>>16,$=e[1],ee=t[1],te+=65535&ee,oe+=ee>>>16,ae+=65535&$,re+=$>>>16,oe+=te>>>16,ae+=oe>>>16,re+=ae>>>16,e[1]=g=65535&ae|re<<16,t[1]=w=65535&te|oe<<16,$=y,ee=T,te=65535&ee,oe=ee>>>16,ae=65535&$,re=$>>>16,$=e[2],ee=t[2],te+=65535&ee,oe+=ee>>>16,ae+=65535&$,re+=$>>>16,oe+=te>>>16,ae+=oe>>>16,re+=ae>>>16,e[2]=y=65535&ae|re<<16,t[2]=T=65535&te|oe<<16,$=m,ee=S,te=65535&ee,oe=ee>>>16,ae=65535&$,re=$>>>16,$=e[3],ee=t[3],te+=65535&ee,oe+=ee>>>16,ae+=65535&$,re+=$>>>16,oe+=te>>>16,ae+=oe>>>16,re+=ae>>>16,e[3]=m=65535&ae|re<<16,t[3]=S=65535&te|oe<<16,$=f,ee=B,te=65535&ee,oe=ee>>>16,ae=65535&$,re=$>>>16,$=e[4],ee=t[4],te+=65535&ee,oe+=ee>>>16,ae+=65535&$,re+=$>>>16,oe+=te>>>16,ae+=oe>>>16,re+=ae>>>16,e[4]=f=65535&ae|re<<16,t[4]=B=65535&te|oe<<16,$=A,ee=U,te=65535&ee,oe=ee>>>16,ae=65535&$,re=$>>>16,$=e[5],ee=t[5],te+=65535&ee,oe+=ee>>>16,ae+=65535&$,re+=$>>>16,oe+=te>>>16,ae+=oe>>>16,re+=ae>>>16,e[5]=A=65535&ae|re<<16,t[5]=U=65535&te|oe<<16,$=x,ee=E,te=65535&ee,oe=ee>>>16,ae=65535&$,re=$>>>16,$=e[6],ee=t[6],te+=65535&ee,oe+=ee>>>16,ae+=65535&$,re+=$>>>16,oe+=te>>>16,ae+=oe>>>16,re+=ae>>>16,e[6]=x=65535&ae|re<<16,t[6]=E=65535&te|oe<<16,$=v,ee=C,te=65535&ee,oe=ee>>>16,ae=65535&$,re=$>>>16,$=e[7],ee=t[7],te+=65535&ee,oe+=ee>>>16,ae+=65535&$,re+=$>>>16,oe+=te>>>16,ae+=oe>>>16,re+=ae>>>16,e[7]=v=65535&ae|re<<16,t[7]=C=65535&te|oe<<16,I+=128,r-=128}return r}function V(e,t,o){var r=new Int32Array(8),s=new Int32Array(8),l=new Uint8Array(256),p=o,d;for(r[0]=1779033703,r[1]=3144134277,r[2]=1013904242,r[3]=2773480762,r[4]=1359893119,r[5]=2600822924,r[6]=528734635,r[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,H(r,s,t,o),o%=128,d=0;do?1:0),l[o-9]=0,a(l,o-8,0|p/536870912,p<<3),H(r,s,l,o),d=0;8>d;d++)a(e,8*d,r[d],s[d]);return 0}function W(o,r){var s=pe(),a=pe(),i=pe(),l=pe(),p=pe(),e=pe(),d=pe(),u=pe(),g=pe();n(s,o[1],o[0]),n(g,r[1],r[0]),m(s,s,g),N(a,o[0],o[1]),N(g,r[0],r[1]),m(a,a,g),m(i,o[3],r[3]),m(i,i,D),m(l,o[2],r[2]),N(l,l,l),n(p,a,s),n(e,l,i),N(d,l,i),N(u,a,s),m(o[0],p,e),m(o[1],u,d),m(o[2],d,e),m(o[3],p,u)}function J(e,t,o){var a;for(a=0;4>a;a++)C(e[a],t[a],o)}function Z(e,t){var o=pe(),a=pe(),r=pe();k(r,t[2]),m(o,t[0],r),m(a,t[1],r),R(e,a),e[31]^=O(o)<<7}function Q(e,t,o){var a,r;for(U(e[0],ge),U(e[1],he),U(e[2],he),U(e[3],ge),r=255;0<=r;--r)a=1&o[0|r/8]>>(7&r),J(e,t,a),W(t,e),W(e,e),J(e,t,a)}function $(e,t){var o=[pe(),pe(),pe(),pe()];U(o[0],fe),U(o[1],X),U(o[2],he),m(o[3],fe,X),Q(e,o,t)}function ee(e,t,o){var a=new Uint8Array(64),r=[pe(),pe(),pe(),pe()],s;for(o||q(t,32),V(a,t,32),a[0]&=248,a[31]&=127,a[31]|=64,$(r,a),Z(e,r),s=0;32>s;s++)t[s+32]=e[s];return 0}function te(e,t){var o,a,r,s;for(a=63;32<=a;--a){for(o=0,r=a-32,s=a-12;r>8,t[r]-=256*o;t[r]+=o,t[a]=0}for(o=0,r=0;32>r;r++)t[r]+=o-(t[31]>>4)*K[r],o=t[r]>>8,t[r]&=255;for(r=0;32>r;r++)t[r]-=o*K[r];for(a=0;32>a;a++)t[a+1]+=t[a]>>8,e[a]=255&t[a]}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 ae(e,t,o,a){var s=new Uint8Array(64),n=new Uint8Array(64),l=new Uint8Array(64),r=new Float64Array(64),d=[pe(),pe(),pe(),pe()],p,u;V(s,a,32),s[0]&=248,s[31]&=127,s[31]|=64;for(p=0;pp;p++)e[32+p]=s[32+p];for(V(l,e.subarray(32),o+32),oe(l),$(d,l),Z(e,d),p=32;64>p;p++)e[p]=a[p];for(V(n,e,o+64),oe(n),p=0;64>p;p++)r[p]=0;for(p=0;32>p;p++)r[p]=l[p];for(p=0;32>p;p++)for(u=0;32>u;u++)r[p+u]+=n[p]*s[u];return te(e.subarray(32),r),o+64}function re(e,o){var a=pe(),t=pe(),r=pe(),s=pe(),i=pe(),l=pe(),p=pe();return(U(e[2],he),P(e[1],o),A(r,e[1]),m(s,r,me),n(r,r,e[2]),N(s,e[2],s),A(i,s),A(l,i),m(p,l,i),m(a,p,r),m(a,a,s),S(a,a),m(a,a,r),m(a,a,s),m(a,a,s),m(e[0],a,s),A(t,e[0]),m(t,t,s),z(t,r)&&m(e[0],e[0],Y),A(t,e[0]),m(t,t,s),z(t,r))?-1:(O(e[0])===o[31]>>7&&n(e[0],ge,e[0]),m(e[3],e[0],e[1]),0)}function se(e,o,a,r){var s=new Uint8Array(32),t=new Uint8Array(64),d=[pe(),pe(),pe(),pe()],p=[pe(),pe(),pe(),pe()],u,g;if(g=-1,64>a)return-1;if(re(p,r))return-1;for(u=0;uu;u++)e[u+32]=r[u];if(V(t,e,a),oe(t),Q(d,p,t),$(p,o.subarray(32)),W(d,p),Z(s,d),a-=64,l(o,0,s,0)){for(u=0;u>>13|o<<3),a=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(o>>>10|a<<6),r=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(a>>>7|r<<9),s=255&e[8]|(255&e[9])<<8,this.r[4]=255&(r>>>4|s<<12),this.r[5]=8190&s>>>1,n=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(s>>>14|n<<2),i=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(n>>>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};be.prototype.blocks=function(e,t,o){for(var a=this.fin?0:2048,r=this.h[0],s=this.h[1],n=this.h[2],i=this.h[3],l=this.h[4],p=this.h[5],d=this.h[6],u=this.h[7],g=this.h[8],h=this.h[9],y=this.r[0],m=this.r[1],f=this.r[2],A=this.r[3],x=this.r[4],v=this.r[5],k=this.r[6],w=this.r[7],T=this.r[8],S=this.r[9],B,U,E,C,I,D,R,z,O,L,P,N,q,K,M,F,j,G,H;16<=o;)B=255&e[t+0]|(255&e[t+1])<<8,r+=8191&B,U=255&e[t+2]|(255&e[t+3])<<8,s+=8191&(B>>>13|U<<3),E=255&e[t+4]|(255&e[t+5])<<8,n+=8191&(U>>>10|E<<6),C=255&e[t+6]|(255&e[t+7])<<8,i+=8191&(E>>>7|C<<9),I=255&e[t+8]|(255&e[t+9])<<8,l+=8191&(C>>>4|I<<12),p+=8191&I>>>1,D=255&e[t+10]|(255&e[t+11])<<8,d+=8191&(I>>>14|D<<2),R=255&e[t+12]|(255&e[t+13])<<8,u+=8191&(D>>>11|R<<5),z=255&e[t+14]|(255&e[t+15])<<8,g+=8191&(R>>>8|z<<8),h+=z>>>5|a,O=0,L=O,L+=r*y,L+=s*(5*S),L+=n*(5*T),L+=i*(5*w),L+=l*(5*k),O=L>>>13,L&=8191,L+=p*(5*v),L+=d*(5*x),L+=u*(5*A),L+=g*(5*f),L+=h*(5*m),O+=L>>>13,L&=8191,P=O,P+=r*m,P+=s*y,P+=n*(5*S),P+=i*(5*T),P+=l*(5*w),O=P>>>13,P&=8191,P+=p*(5*k),P+=d*(5*v),P+=u*(5*x),P+=g*(5*A),P+=h*(5*f),O+=P>>>13,P&=8191,N=O,N+=r*f,N+=s*m,N+=n*y,N+=i*(5*S),N+=l*(5*T),O=N>>>13,N&=8191,N+=p*(5*w),N+=d*(5*k),N+=u*(5*v),N+=g*(5*x),N+=h*(5*A),O+=N>>>13,N&=8191,q=O,q+=r*A,q+=s*f,q+=n*m,q+=i*y,q+=l*(5*S),O=q>>>13,q&=8191,q+=p*(5*T),q+=d*(5*w),q+=u*(5*k),q+=g*(5*v),q+=h*(5*x),O+=q>>>13,q&=8191,K=O,K+=r*x,K+=s*A,K+=n*f,K+=i*m,K+=l*y,O=K>>>13,K&=8191,K+=p*(5*S),K+=d*(5*T),K+=u*(5*w),K+=g*(5*k),K+=h*(5*v),O+=K>>>13,K&=8191,M=O,M+=r*v,M+=s*x,M+=n*A,M+=i*f,M+=l*m,O=M>>>13,M&=8191,M+=p*y,M+=d*(5*S),M+=u*(5*T),M+=g*(5*w),M+=h*(5*k),O+=M>>>13,M&=8191,F=O,F+=r*k,F+=s*v,F+=n*x,F+=i*A,F+=l*f,O=F>>>13,F&=8191,F+=p*m,F+=d*y,F+=u*(5*S),F+=g*(5*T),F+=h*(5*w),O+=F>>>13,F&=8191,j=O,j+=r*w,j+=s*k,j+=n*v,j+=i*x,j+=l*A,O=j>>>13,j&=8191,j+=p*f,j+=d*m,j+=u*y,j+=g*(5*S),j+=h*(5*T),O+=j>>>13,j&=8191,G=O,G+=r*T,G+=s*w,G+=n*k,G+=i*v,G+=l*x,O=G>>>13,G&=8191,G+=p*A,G+=d*f,G+=u*m,G+=g*y,G+=h*(5*S),O+=G>>>13,G&=8191,H=O,H+=r*S,H+=s*T,H+=n*w,H+=i*k,H+=l*v,O=H>>>13,H&=8191,H+=p*x,H+=d*A,H+=u*f,H+=g*m,H+=h*y,O+=H>>>13,H&=8191,O=0|(O<<2)+O,O=0|O+L,L=8191&O,O>>>=13,P+=O,r=L,s=P,n=N,i=q,l=K,p=M,d=F,u=j,g=G,h=H,t+=16,o-=16;this.h[0]=r,this.h[1]=s,this.h[2]=n,this.h[3]=i,this.h[4]=l,this.h[5]=p,this.h[6]=d,this.h[7]=u,this.h[8]=g,this.h[9]=h},be.prototype.finish=function(e,t){var o=new Uint16Array(10),a,r,s,n;if(this.leftover){for(n=this.leftover,this.buffer[n++]=1;16>n;n++)this.buffer[n]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(a=this.h[1]>>>13,this.h[1]&=8191,n=2;10>n;n++)this.h[n]+=a,a=this.h[n]>>>13,this.h[n]&=8191;for(this.h[0]+=5*a,a=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=a,a=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=a,o[0]=this.h[0]+5,a=o[0]>>>13,o[0]&=8191,n=1;10>n;n++)o[n]=this.h[n]+a,a=o[n]>>>13,o[n]&=8191;for(o[9]-=8192,r=(1^a)-1,n=0;10>n;n++)o[n]&=r;for(r=~r,n=0;10>n;n++)this.h[n]=this.h[n]&r|o[n];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),s=this.h[0]+this.pad[0],this.h[0]=65535&s,n=1;8>n;n++)s=0|(0|this.h[n]+this.pad[n])+(s>>>16),this.h[n]=65535&s;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},be.prototype.update=function(e,t,o){var a,r;if(this.leftover){for(r=16-this.leftover,r>o&&(r=o),a=0;athis.leftover)return;this.blocks(this.buffer,0,16),this.leftover=0}if(16<=o&&(r=o-o%16,this.blocks(e,t,r),t+=r,o-=r),o){for(a=0;aa.length?null:0===B(r,a,a.length,t,o)?r.subarray(ke):null},t.secretbox.keyLength=L,t.secretbox.nonceLength=ve,t.secretbox.overheadLength=we,t.scalarMult=function(e,t){if(le(e,t),e.length!==Te)throw new Error("bad n size");if(t.length!==_e)throw new Error("bad p size");var o=new Uint8Array(_e);return M(o,e,t),o},t.scalarMult.base=function(e){if(le(e),e.length!==Te)throw new Error("bad n size");var t=new Uint8Array(_e);return F(t,e),t},t.scalarMult.scalarLength=Te,t.scalarMult.groupElementLength=_e,t.box=function(e,o,a,r){var s=t.box.before(a,r);return t.secretbox(e,o,s)},t.box.before=function(e,t){le(e,t),ie(e,t);var o=new Uint8Array(Ue);return G(o,e,t),o},t.box.after=t.secretbox,t.box.open=function(e,o,a,r){var s=t.box.before(a,r);return t.secretbox.open(e,o,s)},t.box.open.after=t.secretbox.open,t.box.keyPair=function(){var e=new Uint8Array(Se),t=new Uint8Array(Be);return j(e,t),{publicKey:e,secretKey:t}},t.box.keyPair.fromSecretKey=function(e){if(le(e),e.length!==Be)throw new Error("bad secret key size");var t=new Uint8Array(Se);return F(t,e),{publicKey:t,secretKey:new Uint8Array(e)}},t.box.publicKeyLength=Se,t.box.secretKeyLength=Be,t.box.sharedKeyLength=Ue,t.box.nonceLength=Ee,t.box.overheadLength=t.secretbox.overheadLength,t.sign=function(e,t){if(le(e,t),t.length!==De)throw new Error("bad secret key size");var o=new Uint8Array(Ce+e.length);return ae(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),a=se(o,e,e.length,t);if(0>a)return null;for(var r=new Uint8Array(a),s=0;sa;a++)o[a]=e[a];return ee(t,o,!0),{publicKey:t,secretKey:o}},t.sign.publicKeyLength=Ie,t.sign.secretKeyLength=De,t.sign.seedLength=Re,t.sign.signatureLength=Ce,t.hash=function(e){le(e);var t=new Uint8Array(ze);return V(t,e,e.length),t},t.hash.hashLength=ze,t.verify=function(e,t){return le(e,t),0!==e.length&&0!==t.length&&e.length===t.length&&0===r(e,0,t,0,e.length)},t.setPRNG=function(e){q=e},function(){var a="undefined"==typeof self?null:self.crypto||self.msCrypto;if(a&&a.getRandomValues){t.setPRNG(function(e,t){var r=new Uint8Array(t),s;for(s=0;st)throw Error("Bid amount must be positive and 2^53-1");if(!a(n)||0>n)throw Error("BidID must be positive and 2^53-1");if(!a(l)||0>l)throw Error("auctionID must be positive");Object.assign(this,{bidderKey:e,auctionKey:i,bidAmount:t,maxPrice:s,bidID:n,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=s.encode(this.get_obj_for_encoding()),a=o.from(i.concatArrays(this.tag,t)),r=n.sign(a,e);let l={sig:o.from(r),bid:this.get_obj_for_encoding()};return new Uint8Array(s.encode({t:"b",b:l}))}}}}).call(this,e("buffer").Buffer)},{"./encoding/address":58,"./encoding/encoding":59,"./nacl/naclWrappers":67,"./utils/utils":69,buffer:8}],23:[function(t,o,a){(function(a){const r=t("./client");o.exports={Algod:function(t="",o="http://r2.algorand.network",s=4180,n={}){function l(e){return void 0===e.noteb64||null===e.noteb64||(e.note=a.from(e.noteb64,"base64")),e}function p(e){let t=e;return Object.keys(t).every(e=>"content-type"!==e.toLowerCase())&&(t={...e},t["Content-Type"]="application/x-binary"),t}let d=t;"string"==typeof d&&(d={"X-Algo-API-Token":d});let u=new r.HTTPClient(d,o,s,n);this.status=async function(e={}){let t=await u.get("/v1/status",{},e);return t.body},this.healthCheck=async function(e={}){let t=await u.get("/health",{},e);return t.body},this.statusAfterBlock=async function(t,o={}){if(!e(t))throw Error("roundNumber should be an integer");let a=await u.get("/v1/status/wait-for-block-after/"+t,{},o);return a.body},this.pendingTransactions=async function(t,o={}){if(!e(t))throw Error("maxTxns should be an integer");let a=await u.get("/v1/transactions/pending",{max:t},o);if(200===a.statusCode&&a.body.truncatedTxns.transactions!==void 0)for(let e=0;eArray.from(e)));let s=await u.post("/v1/transactions",a.from(r),o);return s.body},this.getTransactionParams=async function(e={}){let t=await u.get("/v1/transactions/params",{},e);return t.body},this.suggestParams=async function(e={}){let t=await this.getTransactionParams(e);return{flatFee:!1,fee:t.fee,firstRound:t.lastRound,lastRound:t.lastRound+1e3,genesisID:t.genesisID,genesisHash:t.genesishashb64}},this.block=async function(t,o={}){if(!e(t))throw Error("roundNumber should be an integer");let a=await u.get("/v1/block/"+t,{},o);if(200===a.statusCode&&a.body.txns.transactions!==void 0)for(let e=0;e"content-type"!==e.toLowerCase())&&(t={...e},t["Content-Type"]="text/plain"),t}async do(t={}){let o=this.setHeaders(t),a=await this.c.post("/v2/teal/compile",e.from(this.source),o);return a.body}}}}).call(this,e("buffer").Buffer)},{buffer:8}],30:[function(e,t,o){(function(o){const a=e("../../../encoding/encoding");t.exports={Dryrun:class{constructor(e,t){this.c=e,this.blob=a.encode(t.get_obj_for_encoding())}setHeaders(e){let t=e;return Object.keys(t).every(e=>"content-type"!==e.toLowerCase())&&(t={...e},t["Content-Type"]="application/msgpack"),t}async do(e={}){let t=this.setHeaders(e),a=await this.c.post("/v2/teal/dryrun",o.from(this.blob),t);return a.body}}}}).call(this,e("buffer").Buffer)},{"../../../encoding/encoding":59,buffer:8}],31:[function(e,t,o){t.exports={GetApplicationByID:class{constructor(e,t){this.c=e,this.index=t,this.query={}}async do(e={}){let t=await this.c.get("/v2/applications/"+this.index,this.query,e);return t.body}}}},{}],32:[function(e,t,o){t.exports={GetAssetByID:class{constructor(e,t){this.c=e,this.index=t,this.query={}}async do(e={}){let t=await this.c.get("/v2/assets/"+this.index,this.query,e);return t.body}}}},{}],33:[function(e,t,o){t.exports={HealthCheck:class{constructor(e){this.c=e}async do(e={}){let t=await this.c.get("/health",{},e);return t.body}}}},{}],34:[function(e,t,o){t.exports={BaseModel:class{_is_primitive(e){return e==null||null==e||"object"!=typeof e&&"function"!=typeof e}_is_address(e){return e.publicKey!==void 0&&e.checksum!==void 0}_get_obj_for_encoding(e){let t;if("function"==typeof e.get_obj_for_encoding)t=e.get_obj_for_encoding();else if(e instanceof Array){t=[];for(const o of e)t.push(this._get_obj_for_encoding(o))}else if("object"==typeof e){const o={};for(const t of Object.keys(e))o[t]=this._get_obj_for_encoding(e[t]);t=o}else if(this._is_primitive(e))t=e;else throw new Error("Unsupported value: "+(e+""));return t}get_obj_for_encoding(){const e={};for(const t of Object.keys(this)){if("attribute_map"==t)continue;const o=this[t];if(void 0===o)continue;const a=this.attribute_map[t];e[a]=null===o?null:this._get_obj_for_encoding(o)}return e}}}},{}],35:[function(e,t,o){function a(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}const r=e("./base");class DryrunRequest extends r.BaseModel{constructor({txns:e,accounts:t,apps:o,protocolVersion:r,round:s,latestTimestamp:n,sources:i}){super(),a(this,"attribute_map",{txns:"txns",accounts:"accounts",apps:"apps",protocolVersion:"protocol-version",round:"round",latestTimestamp:"latest-timestamp",sources:"sources"}),this.txns=e,this.accounts=t,this.apps=o,this.protocolVersion=r,this.round=s,this.latestTimestamp=n,this.sources=i}}class DryrunSource extends r.BaseModel{constructor(e,t,o,r){super(),a(this,"attribute_map",{fieldName:"field-name",source:"source",txnIndex:"txn-index",appIndex:"app-index"}),this.fieldName=e,this.source=t,this.txnIndex=o,this.appIndex=r}}class Application extends r.BaseModel{constructor(e,t){super(),a(this,"attribute_map",{id:"id",params:"params"}),this.id=e,this.params=t}}class ApplicationParams extends r.BaseModel{constructor({creator:e,approvalProgram:t,clearStateProgram:o,localStateSchema:r,globalStateSchema:s,globalState:n}){super(),a(this,"attribute_map",{creator:"creator",approvalProgram:"approval-program",clearStateProgram:"clear-state-program",localStateSchema:"local-state-schema",globalStateSchema:"global-state-schema",globalState:"global-state"}),this.creator=e,this.approvalProgram=t,this.clearStateProgram=o,this.localStateSchema=r,this.globalStateSchema=s,this.globalState=n}}class ApplicationStateSchema extends r.BaseModel{constructor(e,t){super(),a(this,"attribute_map",{numUint:"num-uint",numByteSlice:"num-byte-slice"}),this.numUint=e,this.numByteSlice=t}}class ApplicationLocalStates extends r.BaseModel{constructor(e,t){super(),a(this,"attribute_map",{id:"id",state:"state"}),this.id=e,this.state=t}}class ApplicationLocalState extends r.BaseModel{constructor(e,t){super(),a(this,"attribute_map",{schema:"schema",keyValue:"key-value"}),this.schema=e,this.keyValue=t}}class TealKeyValue extends r.BaseModel{constructor(e,t){super(),a(this,"attribute_map",{key:"key",value:"value"}),this.key=e,this.value=t}}class TealValue extends r.BaseModel{constructor(e,t,o){super(),a(this,"attribute_map",{type:"type",bytes:"bytes",uint:"uint"}),this.type=e,this.bytes=t,this.uint=o}}class AssetHolding extends r.BaseModel{constructor(e,t,o,a){this.amount=e,this.assetId=t,this.creator=o,this.isFrozen=a}}class Asset extends r.BaseModel{constructor(e,t){this.amount=e,this.assetId=t}}class AssetParams extends r.BaseModel{constructor({clawback:e,creator:t,decimals:o,defaultFrozen:a,freeze:r,manager:s,metadataHash:n,name:i,reserve:l,total:p,unitName:d,url:u}){this.clawback=e,this.creator=t,this.decimals=o,this.defaultFrozen=a,this.freeze=r,this.manager=s,this.metadataHash=n,this.name=i,this.reserve=l,this.total=p,this.unitName=d,this.url=u}}class Account extends r.BaseModel{constructor({address:e,amount:t,amountWithoutPendingRewards:o,appsLocalState:r,appsTotalSchema:s,assets:n,createdApps:i,createdAssets:l,participation:p,pendingRewards:d,rewardBase:u,rewards:g,round:h,status:y,sigType:m,authAddr:f}){super(),a(this,"attribute_map",{address:"address",amount:"amount",amountWithoutPendingRewards:"amount-without-pending-rewards",appsLocalState:"apps-local-state",appsTotalSchema:"apps-total-schema",assets:"assets",createdApps:"created-apps",createdAssets:"created-assets",participation:"participation",pendingRewards:"pending-rewards",rewardBase:"reward-base",rewards:"rewards",round:"round",status:"status",sigType:"sig-type",authAddr:"auth-addr"}),this.address=e,this.amount=t,this.amountWithoutPendingRewards=o,this.appsLocalState=r,this.appsTotalSchema=s,this.assets=n,this.createdApps=i,this.createdAssets=l,this.participation=p,this.pendingRewards=d,this.rewardBase=u,this.rewards=g,this.round=h,this.status=y,this.sigType=m,this.authAddr=f}}t.exports={DryrunRequest,DryrunSource,Account,Application,ApplicationParams,Asset,AssetParams,AssetHolding,ApplicationLocalState,ApplicationStateSchema,TealKeyValue,TealValue}},{"./base":34}],36:[function(e,t,o){const a=e("../../../encoding/encoding");t.exports={PendingTransactionInformation:class{constructor(e,t){this.c=e,this.txid=t,this.query={},this.query.format="msgpack"}async do(e={}){let t=await this.c.get("/v2/transactions/pending/"+this.txid,this.query,e);return t.body?a.decode(t.body):void 0}max(e){return this.query.max=e,this}}}},{"../../../encoding/encoding":59}],37:[function(e,t,o){const a=e("../../../encoding/encoding");t.exports={PendingTransactions:class{constructor(e){this.c=e,this.query={},this.query.format="msgpack"}async do(e={}){let t=await this.c.get("/v2/transactions/pending",this.query,e);return t.body?a.decode(t.body):void 0}max(e){return this.query.max=e,this}}}},{"../../../encoding/encoding":59}],38:[function(e,t,o){const a=e("../../../encoding/encoding");t.exports={PendingTransactionsByAddress:class{constructor(e,t){this.c=e,this.address=t,this.query={format:"msgpack"}}async do(e={}){let t=await this.c.get("/v2/accounts/"+this.address+"/transactions/pending",this.query,e);return t.body?a.decode(t.body):void 0}max(e){return this.query.max=e,this}}}},{"../../../encoding/encoding":59}],39:[function(e,t,o){(function(e){t.exports={SendRawTransaction:class{constructor(e,t){let o=t;Array.isArray(t)&&(o=Array.prototype.concat(...t.map(e=>Array.from(e)))),this.txnBytesToPost=o,this.c=e}setSendTransactionHeaders(e){let t=e;return Object.keys(t).every(e=>"content-type"!==e.toLowerCase())&&(t={...e},t["Content-Type"]="application/x-binary"),t}async do(t={}){let o=this.setSendTransactionHeaders(t),a=await this.c.post("/v2/transactions",e.from(this.txnBytesToPost),o);return a.body}}}}).call(this,e("buffer").Buffer)},{buffer:8}],40:[function(e,t,o){t.exports={Status:class{constructor(e){this.c=e}async do(e={}){let t=await this.c.get("/v2/status",{},e);return t.body}}}},{}],41:[function(t,o,a){o.exports={StatusAfterBlock:class{constructor(t,o){if(this.c=t,!e(o))throw Error("round should be an integer");this.round=o}async do(e={}){let t=await this.c.get("/v2/status/wait-for-block-after/"+this.round,{},e);return t.body}}}},{}],42:[function(e,t,o){t.exports={SuggestedParams:class{constructor(e){this.c=e}async do(e={}){let t=await this.c.get("/v2/transactions/params",{},e);return{flatFee:!1,fee:t.body.fee,firstRound:t.body["last-round"],lastRound:t.body["last-round"]+1e3,genesisID:t.body["genesis-id"],genesisHash:t.body["genesis-hash"]}}}}},{}],43:[function(e,t,o){t.exports={Supply:class{constructor(e){this.c=e}async do(e={}){let t=await this.c.get("/v2/ledger/supply",{},e);return t.body}}}},{}],44:[function(e,t,o){t.exports={Versions:class{constructor(e){this.c=e}async do(e={}){let t=await c.get("/versions",{},e);return t.body}}}},{}],45:[function(e,t,o){const a=e("../../client"),r=e("../indexer/makeHealthCheck"),s=e("../indexer/lookupAccountByID"),n=e("../indexer/lookupAccountTransactions"),i=e("../indexer/lookupApplications"),l=e("../indexer/lookupAssetBalances"),p=e("../indexer/lookupAssetByID"),d=e("../indexer/lookupAssetTransactions"),u=e("../indexer/lookupBlock"),g=e("../indexer/searchForAssets"),h=e("../indexer/searchForApplications"),y=e("../indexer/searchForTransactions"),m=e("../indexer/searchAccounts");t.exports={IndexerClient:class{constructor(e,t="http://127.0.0.1",o=8080,f={}){let A=e;"string"==typeof A&&(A={"X-Indexer-API-Token":A});let x=new a.HTTPClient(A,t,o,f);this.makeHealthCheck=function(){return new r.MakeHealthCheck(x)},this.lookupAssetBalances=function(e){return new l.LookupAssetBalances(x,e)},this.lookupAssetTransactions=function(e){return new d.LookupAssetTransactions(x,e)},this.lookupAccountTransactions=function(e){return new n.LookupAccountTransactions(x,e)},this.lookupBlock=function(e){return new u.LookupBlock(x,e)},this.lookupAccountByID=function(e){return new s.LookupAccountByID(x,e)},this.lookupAssetByID=function(e){return new p.LookupAssetByID(x,e)},this.lookupApplications=function(e){return new i.LookupApplications(x,e)},this.searchAccounts=function(){return new m.SearchAccounts(x)},this.searchForTransactions=function(){return new y.SearchForTransactions(x)},this.searchForAssets=function(){return new g.SearchForAssets(x)},this.searchForApplications=function(){return new h.SearchForApplications(x)}}}}},{"../../client":24,"../indexer/lookupAccountByID":46,"../indexer/lookupAccountTransactions":47,"../indexer/lookupApplications":48,"../indexer/lookupAssetBalances":49,"../indexer/lookupAssetByID":50,"../indexer/lookupAssetTransactions":51,"../indexer/lookupBlock":52,"../indexer/makeHealthCheck":53,"../indexer/searchAccounts":54,"../indexer/searchForApplications":55,"../indexer/searchForAssets":56,"../indexer/searchForTransactions":57}],46:[function(e,t,o){t.exports={LookupAccountByID:class{constructor(e,t){this.c=e,this.account=t,this.query={}}async do(e={}){let t=await this.c.get("/v2/accounts/"+this.account,this.query,e);return t.body}round(e){return this.query.round=e,this}}}},{}],47:[function(e,t,o){t.exports={LookupAccountTransactions:class{constructor(e,t){this.c=e,this.account=t,this.query={}}async do(e={}){let t=await this.c.get("/v2/accounts/"+this.account+"/transactions",this.query,e);return t.body}notePrefix(e){return this.query["note-prefix"]=e,this}txType(e){return this.query["tx-type"]=e,this}sigType(e){return this.query["sig-type"]=e,this}txid(e){return this.query.txid=e,this}round(e){return this.query.round=e,this}minRound(e){return this.query["min-round"]=e,this}maxRound(e){return this.query["max-round"]=e,this}assetID(e){return this.query["asset-id"]=e,this}limit(e){return this.query.limit=e,this}beforeTime(e){return this.query["before-time"]=e,this}afterTime(e){return this.query["after-time"]=e,this}currencyGreaterThan(e){return this.query["currency-greater-than"]=e,this}currencyLessThan(e){return this.query["currency-less-than"]=e,this}nextToken(e){return this.query.next=e,this}rekeyTo(e){return this.query["rekey-to"]=e,this}}}},{}],48:[function(e,t,o){t.exports={LookupApplications:class{constructor(e,t){this.c=e,this.query={},this.index=t}async do(e={}){let t=await this.c.get("/v2/applications/"+this.index,this.query,e);return t.body}round(e){return this.query.round=e,this}}}},{}],49:[function(e,t,o){t.exports={LookupAssetBalances:class{constructor(e,t){this.c=e,this.index=t,this.query={}}async do(e={}){let t=await this.c.get("/v2/assets/"+this.index+"/balances",this.query,e);return t.body}limit(e){return this.query.limit=e,this}round(e){return this.query.round=e,this}currencyGreaterThan(e){return this.query["currency-greater-than"]=e,this}currencyLessThan(e){return this.query["currency-less-than"]=e,this}nextToken(e){return this.query.next=e,this}}}},{}],50:[function(e,t,o){t.exports={LookupAssetByID:class{constructor(e,t){this.c=e,this.index=t}async do(e={}){let t=await this.c.get("/v2/assets/"+this.index,{},e);return t.body}}}},{}],51:[function(e,t,o){t.exports={LookupAssetTransactions:class{constructor(e,t){this.c=e,this.index=t,this.query={}}async do(e={}){let t=await this.c.get("/v2/assets/"+this.index+"/transactions",this.query,e);return t.body}notePrefix(e){return this.query["note-prefix"]=e,this}txType(e){return this.query["tx-type"]=e,this}sigType(e){return this.query["sig-type"]=e,this}txid(e){return this.query.txid=e,this}round(e){return this.query.round=e,this}minRound(e){return this.query["min-round"]=e,this}maxRound(e){return this.query["max-round"]=e,this}assetID(e){return this.query["asset-id"]=e,this}limit(e){return this.query.limit=e,this}beforeTime(e){return this.query["before-time"]=e,this}afterTime(e){return this.query["after-time"]=e,this}currencyGreaterThan(e){return this.query["currency-greater-than"]=e,this}currencyLessThan(e){return this.query["currency-less-than"]=e,this}addressRole(e){return this.query["address-role"]=e,this}address(e){return this.query.address=e,this}excludeCloseTo(e){return this.query["exclude-close-to"]=e,this}nextToken(e){return this.query.next=e,this}rekeyTo(e){return this.query["rekey-to"]=e,this}}}},{}],52:[function(e,t,o){t.exports={LookupBlock:class{constructor(e,t){this.c=e,this.round=t}async do(e={}){let t=await this.c.get("/v2/blocks/"+this.round,{},e);return t.body}}}},{}],53:[function(e,t,o){t.exports={MakeHealthCheck:class{constructor(e){this.c=e}async do(e={}){let t=await this.c.get("/health",{},e);return t.body}}}},{}],54:[function(e,t,o){t.exports={SearchAccounts:class{constructor(e){this.c=e,this.query={}}async do(e={}){let t=await this.c.get("/v2/accounts",this.query,e);return t.body}currencyGreaterThan(e){return this.query["currency-greater-than"]=e,this}currencyLessThan(e){return this.query["currency-less-than"]=e,this}limit(e){return this.query.limit=e,this}assetID(e){return this.query["asset-id"]=e,this}nextToken(e){return this.query.next=e,this}round(e){return this.query.round=e,this}authAddr(e){return this.query["auth-addr"]=e,this}applicationID(e){return this.query["application-id"]=e,this}}}},{}],55:[function(e,t,o){t.exports={SearchForApplications:class{constructor(e){this.c=e,this.query={}}async do(e={}){let t=await this.c.get("/v2/applications",this.query,e);return t.body}index(e){return this.query["application-id"]=e,this}round(e){return this.query.round=e,this}nextToken(e){return this.query.next=e,this}limit(e){return this.query.limit=e,this}}}},{}],56:[function(e,t,o){t.exports={SearchForAssets:class{constructor(e){this.c=e,this.query={}}async do(e={}){let t=await this.c.get("/v2/assets",this.query,e);return t.body}limit(e){return this.query.limit=e,this}creator(e){return this.query.creator=e,this}name(e){return this.query.name=e,this}unit(e){return this.query.unit=e,this}index(e){return this.query["asset-id"]=e,this}nextToken(e){return this.query.next=e,this}}}},{}],57:[function(e,t,o){t.exports={SearchForTransactions:class{constructor(e){this.c=e,this.query={}}async do(e={}){let t=await this.c.get("/v2/transactions",this.query,e);return t.body}notePrefix(e){return this.query["note-prefix"]=e,this}txType(e){return this.query["tx-type"]=e,this}sigType(e){return this.query["sig-type"]=e,this}txid(e){return this.query.txid=e,this}round(e){return this.query.round=e,this}minRound(e){return this.query["min-round"]=e,this}maxRound(e){return this.query["max-round"]=e,this}assetID(e){return this.query["asset-id"]=e,this}limit(e){return this.query.limit=e,this}beforeTime(e){return this.query["before-time"]=e,this}afterTime(e){return this.query["after-time"]=e,this}currencyGreaterThan(e){return this.query["currency-greater-than"]=e,this}currencyLessThan(e){return this.query["currency-less-than"]=e,this}addressRole(e){return this.query["address-role"]=e,this}address(e){return this.query.address=e,this}excludeCloseTo(e){return this.query["exclude-close-to"]=e,this}nextToken(e){return this.query.next=e,this}rekeyTo(e){return this.query["rekey-to"]=e,this}applicationID(e){return this.query["application-id"]=e,this}}}},{}],58:[function(e,t,o){function a(e){if(!("string"==typeof e||e instanceof String))throw y;let t=n.decode.asBytes(e);if(t.length!==d)throw y;let o=new Uint8Array(t.slice(0,32)),a=new Uint8Array(t.slice(l.PUBLIC_KEY_LENGTH,d));return{publicKey:o,checksum:a}}function r(e){let t=l.genericHash(e).slice(l.PUBLIC_KEY_LENGTH-u,l.PUBLIC_KEY_LENGTH),o=n.encode(p.concatArrays(e,t));return o.toString().slice(0,g)}function s({version:e,threshold:t,pks:o}){if(1!==e||255e)throw m;if(0===t||0===o.length||t>o.length||255a(e).publicKey);return r(s({version:e,threshold:t,pks:n}))},MALFORMED_ADDRESS_ERROR:y,INVALID_MSIG_VERSION:m,INVALID_MSIG_THRESHOLD:f,INVALID_MSIG_PK:A,UNEXPECTED_PK_LEN:x,ALGORAND_ZERO_ADDRESS_STRING:"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ"}},{"../nacl/naclWrappers":67,"../utils/utils":69,"hi-base32":10}],59:[function(e,t,o){function a(e){for(let t in e)if(e.hasOwnProperty(t)&&(!e[t]||0===e[t].length))return{containsEmpty:!0,firstEmptyKey:t};return{containsEmpty:!1,firstEmptyKey:void 0}}const r=e("@msgpack/msgpack"),s="The object contains empty or 0 values. First empty or 0 value encountered during encoding: ";t.exports={encode:function(e){let t=a(e);if(t.containsEmpty)throw new Error(s+t.firstEmptyKey);return r.encode(e,{sortKeys:!0})},decode:function(e){return r.decode(e)},ERROR_CONTAINS_EMPTY_STRING:s}},{"@msgpack/msgpack":1}],60:[function(e,t,o){t.exports={EvalMaxVersion:2,LogicSigVersion:2,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:35,Size:1,Doc:"SHA256 hash of value X, yields [32]byte",Groups:["Arithmetic"]},{Opcode:2,Name:"keccak256",Args:"B",Returns:"B",Cost:130,Size:1,Doc:"Keccak256 hash of value X, yields [32]byte",Groups:["Arithmetic"]},{Opcode:3,Name:"sha512_256",Args:"B",Returns:"B",Cost:45,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, preceded by the 64 byte signature at the second-to-last element on the stack, preceded 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.",DocExtra:"Overflow is an error condition which halts execution and fails the transaction. Full precision is available from `plusw`.",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:30,Name:"plusw",Args:"UU",Returns:"UU",Cost:1,Size:1,Doc:"A plus B out to 128-bit long result as sum (top) and carry-bit 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","ApplicationID","OnCompletion","ApplicationArgs","NumAppArgs","Accounts","NumAccounts","ApprovalProgram","ClearStateProgram","RekeyTo","ConfigAsset","ConfigAssetTotal","ConfigAssetDecimals","ConfigAssetDefaultFrozen","ConfigAssetUnitName","ConfigAssetName","ConfigAssetURL","ConfigAssetMetadataHash","ConfigAssetManager","ConfigAssetReserve","ConfigAssetFreeze","ConfigAssetClawback","FreezeAsset","FreezeAssetAccount","FreezeAssetFrozen"],ArgEnumTypes:"BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBU",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","LogicSigVersion","Round","LatestTimestamp"],ArgEnumTypes:"UUUBUUUU",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","ApplicationID","OnCompletion","ApplicationArgs","NumAppArgs","Accounts","NumAccounts","ApprovalProgram","ClearStateProgram","RekeyTo","ConfigAsset","ConfigAssetTotal","ConfigAssetDecimals","ConfigAssetDefaultFrozen","ConfigAssetUnitName","ConfigAssetName","ConfigAssetURL","ConfigAssetMetadataHash","ConfigAssetManager","ConfigAssetReserve","ConfigAssetFreeze","ConfigAssetClawback","FreezeAsset","FreezeAssetAccount","FreezeAssetFrozen"],ArgEnumTypes:"BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBU",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:54,Name:"txna",Returns:".",Cost:1,Size:3,ArgEnum:["ApplicationArgs","Accounts"],ArgEnumTypes:"BB",Doc:"push value of an array field from current transaction to stack",ImmediateNote:"{uint8 transaction field index}{uint8 transaction field array index}",Groups:["Loading Values"]},{Opcode:55,Name:"gtxna",Returns:".",Cost:1,Size:4,ArgEnum:["ApplicationArgs","Accounts"],ArgEnumTypes:"BB",Doc:"push value of a field to the stack from a transaction in the current transaction group",ImmediateNote:"{uint8 transaction group index}{uint8 transaction field index}{uint8 transaction field array index}",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.\n\nAt LogicSigVersion 2 it became allowed to branch to the end of the program exactly after the last instruction, removing the need for a last instruction or no-op as a branch target at the end. Branching beyond that may still fail the program.",ImmediateNote:"{0..0x7fff forward branch offset, big endian}",Groups:["Flow Control"]},{Opcode:65,Name:"bz",Args:"U",Cost:1,Size:3,Doc:"branch if value X is zero",DocExtra:"See `bnz` for details on how branches work. `bz` inverts the behavior of `bnz`.",ImmediateNote:"{0..0x7fff forward branch offset, big endian}",Groups:["Flow Control"]},{Opcode:66,Name:"b",Cost:1,Size:3,Doc:"branch unconditionally to offset",DocExtra:"See `bnz` for details on how branches work. `b` always jumps to the offset.",ImmediateNote:"{0..0x7fff forward branch offset, big endian}",Groups:["Flow Control"]},{Opcode:67,Name:"return",Args:"U",Cost:1,Size:1,Doc:"use last value on stack as success value; end",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"]},{Opcode:74,Name:"dup2",Args:"..",Returns:"....",Cost:1,Size:1,Doc:"duplicate two last values on stack: A, B -> A, B, A, B",Groups:["Flow Control"]},{Opcode:80,Name:"concat",Args:"BB",Returns:"B",Cost:1,Size:1,Doc:"pop two byte strings A and B and join them, push the result",DocExtra:"`concat` panics if the result would be greater than 4096 bytes.",Groups:["Arithmetic"]},{Opcode:81,Name:"substring",Args:"B",Returns:"B",Cost:1,Size:3,Doc:"pop a byte string X. For immediate values in 0..255 N and M: extract a range of bytes from it starting at N up to but not including M, push the substring result",ImmediateNote:"{uint8 start position}{uint8 end position}",Groups:["Arithmetic"]},{Opcode:82,Name:"substring3",Args:"BUU",Returns:"B",Cost:1,Size:1,Doc:"pop a byte string A and two integers B and C. Extract a range of bytes from A starting at B up to but not including C, push the substring result",Groups:["Arithmetic"]},{Opcode:96,Name:"balance",Args:"U",Returns:"U",Cost:1,Size:1,Doc:"get balance for the requested account specified by Txn.Accounts[A] in microalgos. A is specified as an account index in the Accounts field of the ApplicationCall transaction",Groups:["State Access"]},{Opcode:97,Name:"app_opted_in",Args:"UU",Returns:"U",Cost:1,Size:1,Doc:"check if account specified by Txn.Accounts[A] opted in for the application B => {0 or 1}",DocExtra:"params: account index, application id (top of the stack on opcode entry). Return: 1 if opted in and 0 otherwise.",Groups:["State Access"]},{Opcode:98,Name:"app_local_get",Args:"UB",Returns:".",Cost:1,Size:1,Doc:"read from account specified by Txn.Accounts[A] from local state of the current application key B => value",DocExtra:"params: account index, state key. Return: value. The value is zero if the key does not exist.",Groups:["State Access"]},{Opcode:99,Name:"app_local_get_ex",Args:"UUB",Returns:"U.",Cost:1,Size:1,Doc:"read from account specified by Txn.Accounts[A] from local state of the application B key C => {0 or 1 (top), value}",DocExtra:"params: account index, application id, state key. Return: did_exist flag (top of the stack, 1 if exist and 0 otherwise), value.",Groups:["State Access"]},{Opcode:100,Name:"app_global_get",Args:"B",Returns:".",Cost:1,Size:1,Doc:"read key A from global state of a current application => value",DocExtra:"params: state key. Return: value. The value is zero if the key does not exist.",Groups:["State Access"]},{Opcode:101,Name:"app_global_get_ex",Args:"UB",Returns:"U.",Cost:1,Size:1,Doc:"read from application A global state key B => {0 or 1 (top), value}",DocExtra:"params: application id, state key. Return: value.",Groups:["State Access"]},{Opcode:102,Name:"app_local_put",Args:"UB.",Cost:1,Size:1,Doc:"write to account specified by Txn.Accounts[A] to local state of a current application key B with value C",DocExtra:"params: account index, state key, value.",Groups:["State Access"]},{Opcode:103,Name:"app_global_put",Args:"B.",Cost:1,Size:1,Doc:"write key A and value B to global state of the current application",Groups:["State Access"]},{Opcode:104,Name:"app_local_del",Args:"UB",Cost:1,Size:1,Doc:"delete from account specified by Txn.Accounts[A] local state key B of the current application",DocExtra:"params: account index, state key.",Groups:["State Access"]},{Opcode:105,Name:"app_global_del",Args:"B",Cost:1,Size:1,Doc:"delete key A from a global state of the current application",DocExtra:"params: state key.",Groups:["State Access"]},{Opcode:112,Name:"asset_holding_get",Args:"UU",Returns:"U.",Cost:1,Size:2,ArgEnum:["AssetBalance","AssetFrozen"],ArgEnumTypes:"UU",Doc:"read from account specified by Txn.Accounts[A] and asset B holding field X (imm arg) => {0 or 1 (top), value}",DocExtra:"params: account index, asset id. Return: did_exist flag (1 if exist and 0 otherwise), value.",ImmediateNote:"{uint8 asset holding field index}",Groups:["State Access"]},{Opcode:113,Name:"asset_params_get",Args:"UU",Returns:"U.",Cost:1,Size:2,ArgEnum:["AssetTotal","AssetDecimals","AssetDefaultFrozen","AssetUnitName","AssetName","AssetURL","AssetMetadataHash","AssetManager","AssetReserve","AssetFreeze","AssetClawback"],ArgEnumTypes:"UUUBBBBBBBB",Doc:"read from account specified by Txn.Accounts[A] and asset B params field X (imm arg) => {0 or 1 (top), value}",DocExtra:"params: account index, asset id. Return: did_exist flag (1 if exist and 0 otherwise), value.",ImmediateNote:"{uint8 asset params field index}",Groups:["State Access"]}]}},{}],61:[function(e,t,o){function a(e,t){if(!e)throw new Error("empty program");if(null==t&&(t=[]),!Array.isArray(t))throw new Error("invalid arguments");let[o,a]=n(e);if(0>=a)throw new Error("version parsing error");if(o>i.EvalMaxVersion)throw new Error("unsupported version");let u=0,g=e.length;for(let o of t)g+=o.length;if(g>d)throw new Error("program too long");if(!l){l={};for(let e of i.Ops)l[e.Opcode]=e}let h=a,y=[],m=[];for(;hp)throw new Error("program too costly to run");return[y,m,!0]}function r(e,t){let o=1,[a,r]=n(e.slice(t+o));if(0>=r)throw new Error(`could not decode int const block size at pc=${t+o}`);let s=[];o+=r;for(let r=0;r=e.length)throw new Error("intcblock ran past end of program");let[a,i]=n(e.slice(t+o));if(0>=i)throw new Error(`could not decode int const[${r}] block size at pc=${t+o}`);s.push(a),o+=i}return[o,s]}function s(e,t){let o=1,[a,r]=n(e.slice(t+o));if(0>=r)throw new Error(`could not decode []byte const block size at pc=${t+o}`);let s=[];o+=r;for(let r=0;r=e.length)throw new Error("bytecblock ran past end of program");let[a,i]=n(e.slice(t+o));if(0>=i)throw new Error(`could not decode []byte] const[${r}] block size at pc=${t+o}`);if(o+=i,t+o>=e.length)throw new Error("bytecblock ran past end of program");let l=e.slice(t+o,t+o+a);s.push(l),o+=a}return[o,s]}function n(e){let t=0,o=0;for(let a=0;ab)return 9({pk:s.decode(e).publicKey}));this.msig={v:t.version,thr:t.threshold,subsig:o};let[a,r]=this.singleSignMultisig(e,this.msig);this.msig.subsig[r].s=a}}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=p.concatArrays(this.tag,this.logic);const o=r.sign(t,e);return o}singleSignMultisig(e,t){let o=-1,a=r.keyPairFromSecretKey(e).publicKey;for(let r=0,s;rA.decode(e).publicKey);let i=v.decode(e),l=w.MultisigTransaction.from_obj_for_encoding(i.txn),p=l.partialSignTxn({version:t,threshold:o,pks:n},s);return{txID:l.txID().toString(),blob:r([e,p])}},mergeMultisigTransactions:r,signMultisigTransaction:function(e,{version:t,threshold:o,addrs:a},r){let s=A.fromMultisigPreImgAddrs({version:t,threshold:o,addrs:a});if(!e.hasOwnProperty("from"))e.from=s;else if(e.from!==s&&A.encode(e.from.publicKey)!==s)throw K;const n=a.map(e=>A.decode(e).publicKey);let i=e instanceof k.Transaction,l,p;return i?(l=e,p=w.MultisigTransaction.prototype.partialSignTxn.call(l,{version:t,threshold:o,pks:n},r)):(l=new w.MultisigTransaction(e),p=l.partialSignTxn({version:t,threshold:o,pks:n},r)),{txID:l.txID().toString(),blob:p}},multisigAddress:function({version:e,threshold:t,addrs:o}){return A.fromMultisigPreImgAddrs({version:e,threshold:t,addrs:o})},ERROR_MULTISIG_BAD_SENDER:K,ERROR_INVALID_MICROALGOS:M,microalgosToAlgos:function(e){if(0>e||!a(e))throw M;return e/q},algosToMicroalgos:function(e){return Math.round(e*q)},computeGroupID:s,assignGroupID:function(e,t=void 0){const o=s(e);let a=[];for(tx of e)t&&A.encode(tx.from.publicKey)!=t||(tx.group=o,a.push(tx));return a},makeLogicSig:n,signLogicSigTransaction:function(e,t){if(!t.verify(A.decode(e.from).publicKey))throw new Error("invalid signature");let o=new k.Transaction(e);return i(o,t)},signLogicSigTransactionObject:i,logicSigFromByte:function(e){return E.LogicSig.fromByte(e)},tealSign:l,tealSignFromProgram:function(e,t,o){const a=n(o),r=a.address();return l(e,t,r)},makePaymentTxn:function(e,t,o,a,r,s,n,i,l,d){return p(e,t,a,r,i,{genesisHash:l,genesisID:d,firstRound:s,lastRound:n,fee:o})},makeKeyRegistrationTxn:function(e,t,o,a,r,s,n,i,l,p,u,g){return d(e,r,i,l,p,u,g,{genesisHash:s,genesisID:n,firstRound:o,lastRound:a,fee:t})},makeAssetCreateTxn:function(e,t,o,a,r,s,n,i,l,p,d,g,h,y,m,f,A,x){return u(e,r,i,l,p,d,g,h,y,m,f,A,x,{genesisHash:s,genesisID:n,firstRound:o,lastRound:a,fee:t})},makeAssetConfigTxn:function(e,t,o,a,r,s,n,i,l,p,d,u,h=!0){return g(e,r,i,l,p,d,u,{genesisHash:s,genesisID:n,firstRound:o,lastRound:a,fee:t},h)},makeAssetDestroyTxn:function(e,t,o,a,r,s,n,i){return h(e,r,i,{genesisHash:s,genesisID:n,firstRound:o,lastRound:a,fee:t})},makeAssetFreezeTxn:function(e,t,o,a,r,s,n,i,l,p){return y(e,r,i,l,p,{genesisHash:s,genesisID:n,firstRound:o,lastRound:a,fee:t})},makeAssetTransferTxn:function(e,t,o,a,r,s,n,i,l,p,d,u){return m(e,t,o,a,s,l,u,{genesisHash:p,genesisID:d,firstRound:n,lastRound:i,fee:r})},makePaymentTxnWithSuggestedParams:p,makeKeyRegistrationTxnWithSuggestedParams:d,makeAssetCreateTxnWithSuggestedParams:u,makeAssetConfigTxnWithSuggestedParams:g,makeAssetDestroyTxnWithSuggestedParams:h,makeAssetFreezeTxnWithSuggestedParams:y,makeAssetTransferTxnWithSuggestedParams:m,OnApplicationComplete:F,makeApplicationCreateTxn:function(e,t,o,a,r,s,n,i,l,p=void 0,d=void 0,u=void 0,g=void 0,h=void 0,y=void 0,m=void 0){return new k.Transaction({type:"appl",from:e,suggestedParams:t,appIndex:0,appOnComplete:o,appLocalInts:s,appLocalByteSlices:n,appGlobalInts:i,appGlobalByteSlices:l,appApprovalProgram:a,appClearProgram:r,appArgs:p,appAccounts:d,appForeignApps:u,appForeignAssets:g,note:h,lease:y,reKeyTo:m})},makeApplicationUpdateTxn:function(e,t,a,r,s,n=void 0,i=void 0,l=void 0,p=void 0,d=void 0,u=void 0,g=void 0){let h={type:"appl",from:e,suggestedParams:t,appIndex:a,appApprovalProgram:r,appOnComplete:F.UpdateApplicationOC,appClearProgram:s,appArgs:n,appAccounts:i,appForeignApps:l,appForeignAssets:p,note:d,lease:u,reKeyTo:g};return new k.Transaction(h)},makeApplicationDeleteTxn:function(e,t,a,r=void 0,s=void 0,n=void 0,i=void 0,l=void 0,p=void 0,d=void 0){let u={type:"appl",from:e,suggestedParams:t,appIndex:a,appOnComplete:F.DeleteApplicationOC,appArgs:r,appAccounts:s,appForeignApps:n,appForeignAssets:i,note:l,lease:p,reKeyTo:d};return new k.Transaction(u)},makeApplicationOptInTxn:function(e,t,a,r=void 0,s=void 0,n=void 0,i=void 0,l=void 0,p=void 0,d=void 0){let u={type:"appl",from:e,suggestedParams:t,appIndex:a,appOnComplete:F.OptInOC,appArgs:r,appAccounts:s,appForeignApps:n,appForeignAssets:i,note:l,lease:p,reKeyTo:d};return new k.Transaction(u)},makeApplicationCloseOutTxn:function(e,t,a,r=void 0,s=void 0,n=void 0,i=void 0,l=void 0,p=void 0,d=void 0){let u={type:"appl",from:e,suggestedParams:t,appIndex:a,appOnComplete:F.CloseOutOC,appArgs:r,appAccounts:s,appForeignApps:n,appForeignAssets:i,note:l,lease:p,reKeyTo:d};return new k.Transaction(u)},makeApplicationClearStateTxn:function(e,t,a,r=void 0,s=void 0,n=void 0,i=void 0,l=void 0,p=void 0,d=void 0){let u={type:"appl",from:e,suggestedParams:t,appIndex:a,appOnComplete:F.ClearStateOC,appArgs:r,appAccounts:s,appForeignApps:n,appForeignAssets:i,note:l,lease:p,reKeyTo:d};return new k.Transaction(u)},makeApplicationNoOpTxn:function(e,t,a,r=void 0,s=void 0,n=void 0,i=void 0,l=void 0,p=void 0,d=void 0){let u={type:"appl",from:e,suggestedParams:t,appIndex:a,appOnComplete:F.NoOpOC,appArgs:r,appAccounts:s,appForeignApps:n,appForeignAssets:i,note:l,lease:p,reKeyTo:d};return new k.Transaction(u)}}}).call(this,e("buffer").Buffer)},{"./bid":22,"./client/algod":23,"./client/kmd":25,"./client/v2/algod/algod":27,"./client/v2/algod/models/types":35,"./client/v2/indexer/indexer":45,"./encoding/address":58,"./encoding/encoding":59,"./logicsig":62,"./mnemonic/mnemonic":64,"./multisig":66,"./nacl/naclWrappers":67,"./transaction":68,"./utils/utils":69,buffer:8}],64:[function(e,t,o){function a(e){const t=l.genericHash(e),o=s(t),a=r(o);return a[0]}function r(e){return e.map(e=>i[e])}function s(e){function t(e){r=e<>=11,s-=11)}function o(){s&&a.push(r)}let a=[],r=0,s=0;return e.forEach(t),o(),a}function n(e){function t(e){for(r=e<>=8,s-=8}function o(){s&&a.push(r)}let a=[],r=0,s=0;return e.forEach(t),o(),new Uint8Array(a)}const i=e("./wordlists/english"),l=e("../nacl/naclWrappers"),p=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=s(e),o=r(t),n=a(e);return o.join(" ")+" "+n},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 r=t[t.length-1],s=o.map(e=>i.indexOf(e));let l=n(s);if(33!==l.length)throw p;if(0!==l[l.length-1])throw p;l=l.slice(0,l.length-1);const u=a(l);if(u===r)return l;throw p},ERROR_FAIL_TO_DECODE_MNEMONIC:p,ERROR_NOT_IN_WORDS_LIST:d}},{"../nacl/naclWrappers":67,"./wordlists/english":65}],65:[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"]},{}],66:[function(e,t,o){(function(o){function a(e,{rawSig:t,myPk:a},{version:s,threshold:i,pks:l}){let p=!1,d=l.map(e=>r.bytesEqual(e,a)?(p=!0,{pk:o.from(e),s:t}):{pk:o.from(e)});if(!1==p)throw y;return new Uint8Array(n.encode({msig:{v:s,thr:i,subsig:d},txn:e}))}const r=e("./nacl/naclWrappers"),s=e("./encoding/address"),n=e("./encoding/encoding"),i=e("./transaction"),l=e("./utils/utils"),p=new Error("Not enough multisig transactions to merge. Need at least two"),d=new Error("Cannot merge txs. txIDs differ"),u=new Error("Cannot merge txs. Multisig preimages differ"),g=new Error("Cannot merge txs. subsigs are mismatched."),h=new Error("The transaction from field and multisig preimage do not match."),y=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},n){if(!this.hasOwnProperty("objForEncoding")){let a=s.fromMultisigPreImg({version:e,threshold:t,pks:o});if(s.encode(this.from.publicKey)!==s.encode(a))throw h}let i=r.keyPairFromSecretKey(n).publicKey;return a(this.get_obj_for_encoding(),{rawSig:this.rawSignTxn(n),myPk:i},{version:e,threshold:t,pks:o})}}t.exports={MultisigTransaction,mergeMultisigTransactions:function(e){if(2>e.length)throw p;const t=n.decode(e[0]),a=MultisigTransaction.from_obj_for_encoding(t.txn),r=a.txID().toString(),l=s.encode(t.txn.snd);let h=t.msig.subsig;for(let a=0;ae.pk)};if(l!==s.encode(s.fromMultisigPreImg(y)))throw u;h=i.msig.subsig.map((e,t)=>{let a=h[t];if(a.s){if(e.s&&0!==o.compare(e.s,a.s))throw g;return{pk:a.pk,s:a.s}}return e.s?{pk:a.pk,s:e.s}:a})}let y={v:t.msig.v,thr:t.msig.thr,subsig:h},m={msig:y,txn:t.txn};return new Uint8Array(n.encode(m))},createMultisigTransaction:a,verifyMultisig:function(e,t,o){const a=t.v,n=t.thr,i=t.subsig;let p=i.map(e=>e.pk);if(t.subsig.lengthn))throw Error("Amount must be a positive number and smaller than 2^53-1");if(!a(s)||0>s)throw Error("fee must be a positive number and smaller than 2^53-1");if(!a(i)||0>i)throw Error("firstRound must be a positive number");if(!a(l)||0>l)throw Error("lastRound must be a positive number");if(void 0!==S&&(!a(S)||0>S))throw Error("Total asset issuance must be a positive number and smaller than 2^53-1");if(void 0!==B&&(!a(B)||0>B||B>g))throw Error("assetDecimals must be a positive number and smaller than "+g.toString());if(void 0!==T&&(!a(T)||0>T))throw Error("Asset index must be a positive number and smaller than 2^53-1");if(void 0!==K&&(!a(K)||0>K))throw Error("Application index must be a positive number and smaller than 2^53-1");if(void 0!==F&&(!a(F)||0>F))throw Error("Application local ints count must be a positive number and smaller than 2^53-1");if(void 0!==j&&(!a(j)||0>j))throw Error("Application local byte slices count must be a positive number and smaller than 2^53-1");if(void 0!==G&&(!a(G)||0>G))throw Error("Application global ints count must be a positive number and smaller than 2^53-1");if(void 0!==H&&(!a(H)||0>H))throw Error("Application global byte slices count must be a positive number and smaller than 2^53-1");if(void 0!==V&&V.constructor!==Uint8Array)throw Error("appApprovalProgram must be a Uint8Array.");if(void 0!==W&&W.constructor!==Uint8Array)throw Error("appClearProgram must be a Uint8Array.");if(void 0!==Y){if(Y.constructor!==Array)throw Error("appArgs must be an Array of Uint8Array.");Y.forEach(e=>{if(e.constructor!==Uint8Array)throw Error("each element of AppArgs must be a Uint8Array.")})}else Y=new Uint8Array(0);if(void 0!==X&&X.forEach((e,t)=>{X[t]=r.decode(e)}),void 0!==J&&J.forEach(e=>{if(!a(e)||0>e)throw Error("each foreign application index must be a positive number and smaller than 2^53-1")}),void 0!==Z&&Z.forEach(e=>{if(!a(e)||0>e)throw Error("each foreign asset index must be a positive number and smaller than 2^53-1")}),void 0===u)u=new Uint8Array(0);else if(u.constructor!==Uint8Array)throw Error("note must be a Uint8Array.");if(void 0!==m){if(m.constructor!==Uint8Array)throw Error("lease must be a Uint8Array.");if(m.length!==d)throw Error("lease must be of length "+d.toString()+".")}else m=new Uint8Array(0);void 0!==A&&(A=o.from(A,"base64")),void 0!==x&&(x=o.from(x,"base64")),Object.assign(this,{from:e,to:t,fee:s,amount:n,firstRound:i,lastRound:l,note:u,genesisID:h,genesisHash:y,lease:m,closeRemainderTo:f,voteKey:A,selectionKey:x,voteFirst:v,voteLast:k,voteKeyDilution:w,assetIndex:T,assetTotal:S,assetDecimals:B,assetDefaultFrozen:U,assetManager:E,assetReserve:C,assetFreeze:I,assetClawback:D,assetUnitName:R,assetName:z,assetURL:O,assetMetadataHash:L,freezeAccount:P,freezeState:N,assetRevocationTarget:q,appIndex:K,appOnComplete:M,appLocalInts:F,appLocalByteSlices:j,appGlobalInts:G,appGlobalByteSlices:H,appApprovalProgram:V,appClearProgram:W,appArgs:Y,appAccounts:X,appForeignApps:J,appForeignAssets:Z,type:Q,reKeyTo:te}),$||(this.fee*=this.estimateSize()),this.fee{e.apaa.push(o.from(t))})),void 0!==this.appAccounts&&(e.apat=[],this.appAccounts.forEach(t=>{e.apat.push(o.from(t.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.apid||delete e.apid,e.apls.nui||delete e.apls.nui,e.apls.nbs||delete e.apls.nbs,e.apls.nui||e.apls.nbs||delete e.apls,e.apgs.nui||delete e.apgs.nui,e.apgs.nbs||delete e.apgs.nbs,e.apaa&&e.apaa.length||delete e.apaa,e.apgs.nui||e.apgs.nbs||delete e.apgs,e.apap||delete e.apap,e.apsu||delete e.apsu,e.apan||delete e.apan,e.apfa||delete e.apfa,e.apas||delete e.apas,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=r.decode(r.encode(new Uint8Array(e.snd))),void 0!==e.grp&&(t.group=o.from(e.grp)),void 0!==e.rekey&&(t.reKeyTo=r.decode(r.encode(new Uint8Array(e.rekey)))),"pay"===e.type?(t.amount=e.amt,t.to=r.decode(r.encode(new Uint8Array(e.rcv))),void 0!==e.close&&(t.closeRemainderTo=r.decode(r.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=r.decode(r.encode(new Uint8Array(e.apar.m)))),void 0!==e.apar.r&&(t.assetReserve=r.decode(r.encode(new Uint8Array(e.apar.r)))),void 0!==e.apar.f&&(t.assetFreeze=r.decode(r.encode(new Uint8Array(e.apar.f)))),void 0!==e.apar.c&&(t.assetClawback=r.decode(r.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=r.decode(r.encode(new Uint8Array(e.aclose)))),void 0!==e.asnd&&(t.assetRevocationTarget=r.decode(r.encode(new Uint8Array(e.asnd)))),t.to=r.decode(r.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=r.decode(r.encode(new Uint8Array(e.fadd)))):"appl"===e.type&&(void 0!==e.apid&&(t.appIndex=e.apid),void 0!==e.apan&&(t.appOnComplete=e.apan),void 0!==e.apls&&(void 0!==e.apls.nui&&(t.appLocalInts=e.apls.nui),void 0!==e.apls.nbs&&(t.appLocalByteSlices=e.apls.nbs)),void 0!==e.apgs&&(void 0!==e.apgs.nui&&(t.appGlobalInts=e.apgs.nui),void 0!==e.apgs.nbs&&(t.appGlobalByteSlices=e.apgs.nbs)),void 0!==e.apap&&(t.appApprovalProgram=new Uint8Array(e.apap)),void 0!==e.apsu&&(t.appClearProgram=new Uint8Array(e.apsu)),void 0!==e.apaa&&(t.appArgs=[],e.apaa.forEach(e=>{t.appArgs.push(new Uint8Array(e))})),void 0!==e.apat&&(t.appAccounts=[],e.apat.forEach(e=>{t.appAccounts.push(r.decode(r.encode(new Uint8Array(e))))})),void 0!==e.apfa&&(t.appForeignApps=e.apfa),void 0!==e.apas&&(t.appForeignAssets=e.apas)),t}estimateSize(){return this.toByte().length+75}bytesToSign(){let e=this.toByte();return o.from(i.concatArrays(this.tag,e))}toByte(){return s.encode(this.get_obj_for_encoding())}rawSignTxn(e){const t=this.bytesToSign(),a=n.sign(t,e);return o.from(a)}signTxn(e){let t={sig:this.rawSignTxn(e),txn:this.get_obj_for_encoding()},a=n.keyPairFromSecretKey(e),i=a.publicKey;return r.encode(i)!=r.encode(this.from.publicKey)&&(t.sgnr=o.from(i)),new Uint8Array(s.encode(t))}rawTxID(){const e=this.toByte(),t=o.from(i.concatArrays(this.tag,e));return o.from(n.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+=(5+d)*t)}addRekey(e,t=0){e!==void 0&&(this.reKeyTo=r.decode(e)),0!==t&&(this.fee+=(5+32)*t)}},TxGroup:class{constructor(e){if(e.length>u){let t=e.length.toString()+" transactions grouped together but max group size is "+u.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 a of e.txlist)t.txGroupHashes.push(new o.from(a));return t}toByte(){return s.encode(this.get_obj_for_encoding())}},ALGORAND_MIN_TX_FEE:p}}).call(this,e("buffer").Buffer)},{"./encoding/address":58,"./encoding/encoding":59,"./nacl/naclWrappers":67,"./utils/utils":69,buffer:8,"hi-base32":10}],69:[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}}},{}]},{},[63])(63)}); \ No newline at end of file +(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 e=Number.isInteger,t=Math.pow,o=Math.min,a=Number.isSafeInteger,r=Math.abs,s=Math.floor,p=String.fromCharCode,d;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 u=new Error("Cannot find module '"+d+"'");throw u.code="MODULE_NOT_FOUND",u}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=l&&s>>10),m=56320|1023&m),o.push(m)}else o.push(u);65536<=o.length-4&&(s+=p.apply(String,le(o)),o.length=0)}return 0=e){if(0===t&&4294967295>=e){var a=new Uint8Array(4);return(r=new DataView(a.buffer)).setUint32(0,e),a}return a=new Uint8Array(8),(r=new DataView(a.buffer)).setUint32(0,t<<2|3&e/4294967296),r.setUint32(4,4294967295&e),a}var r;return a=new Uint8Array(12),(r=new DataView(a.buffer)).setUint32(0,t),T(r,4,e),a}function v(o){var e=o.getTime(),t=s(e/1e3),a=1e6*(e-1e3*t),r=s(a/1e9);return{sec:t+r,nsec:a-1e9*r}}function g(t){return t instanceof Date?d(v(t)):null}function M(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:z(e,4),nsec:e.getUint32(0)};default:throw new Error("Unrecognized data size for timestamp: "+o.length);}}function m(o){var e=M(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 s=new DataView(x.memory.buffer,a,e),n=0;nt?"-":"")+"0x"+r(t).toString(16).padStart(2,"0")}function F(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 j(t){return null==t[Symbol.asyncIterator]?function(a){return re(this,arguments,function(){var e,s,l,p;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,p=s.value,l?[4,te(void 0)]:[3,5];case 4:return[2,t.sent()];case 5:return[4,te(p)];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 W(o,e){return void 0===e&&(e=Z),ne(this,void 0,void 0,function(){var t;return oe(this,function(a){return t=j(o),[2,new Y(e.extensionCodec,e.maxStrLength,e.maxBinLength,e.maxArrayLength,e.maxMapLength,e.maxExtLength).decodeSingleAsync(t)]})})}function ee(o,e){void 0===e&&(e=Z);var a=j(o);return new Y(e.extensionCodec,e.maxStrLength,e.maxBinLength,e.maxArrayLength,e.maxMapLength,e.maxExtLength).decodeArrayStream(a)}function ae(o,e){void 0===e&&(e=Z);var a=j(o);return new Y(e.extensionCodec,e.maxStrLength,e.maxBinLength,e.maxArrayLength,e.maxMapLength,e.maxExtLength).decodeStream(a)}t.r(e);var ie=function(a,e){var l="function"==typeof Symbol&&a[Symbol.iterator];if(!l)return a;var p=l.call(a),o=[],s,d;try{for(;(void 0===e||0e?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,p){void 0===o&&(o=f.defaultCodec),void 0===a&&(a=100),void 0===s&&(s=2048),void 0===l&&(l=!1),void 0===p&&(p=!1),this.extensionCodec=o,this.maxDepth=a,this.initialBufferSize=s,this.sortKeys=l,this.forceFloat32=p,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.byteLengtht?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(ce&&200>6;else{if(55296<=d&&56319>=d&&p>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,p;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(),u;!o.done;o=d.next())u=o.value,this.encode(u,e+1)}catch(t){i={error:t}}finally{try{o&&!o.done&&(p=d.return)&&p.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 s=0,n;se)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),T(this.view,this.pos,t),this.pos+=8},t}(),B={},C=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 s=0;s=this.maxLengthPerKey?t[0|Math.random()*t.length]=a:t.push(a)},t.prototype.decode=function(a,e,t){var r=this.get(a,e,t);if(r)return r;var s=w(a,e,t),n=Uint8Array.prototype.slice.call(a,e,e+t);return this.store(n,s),s},t}(),D=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(p)throw new TypeError("Generator is already executing.");for(;a;)try{if(p=1,d&&(u=2&t[0]?d.return:t[0]?d.throw||((u=d.return)&&u.call(d),0):d.next)&&!(u=u.call(d,t[1])).done)return u;switch(d=0,u&&(t=[2&t[0],u.value]),t[0]){case 0:case 1:u=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(!(u=0<(u=a.trys).length&&u[u.length-1])&&(6===t[0]||2===t[0])){a=0;continue}if(3===t[0]&&(!u||t[1]>u[0]&&t[1]=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 D(this,void 0,void 0,function(){var t,r,n,i,A,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=(A=this).headByte,v=A.pos,k=A.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,p,d,g,y,m,A,x,v;return O(this,function(o){switch(o.label){case 0:t=e,p=-1,o.label=1;case 1:o.trys.push([1,13,14,19]),d=K(l),o.label=2;case 2:return[4,V(d.next())];case 3:if((g=o.sent()).done)return[3,12];if(y=g.value,e&&0===p)throw this.createNoExtraBytesError(this.totalPos);this.appendBuffer(y),t&&(p=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==--p?[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 A=o.sent(),x={error:A},[3,19];case 14:return o.trys.push([14,,17,18]),g&&!g.done&&(v=d.return)?[4,V(v.call(d))]:[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!=(p=a-128)){this.pushMapState(p),this.complete();continue e}e={}}else if(160>a){if(0!=(p=a-144)){this.pushArrayState(p),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!==(p=this.readU16())){this.pushArrayState(p),this.complete();continue e}e=[]}else if(221===a){if(0!==(p=this.readU32())){this.pushArrayState(p),this.complete();continue e}e=[]}else if(222===a){if(0!==(p=this.readU16())){this.pushMapState(p),this.complete();continue e}e={}}else if(223===a){if(0!==(p=this.readU32())){this.pushMapState(p),this.complete();continue e}e={}}else if(196===a){var p=this.lookU8();e=this.decodeBinary(p,1)}else if(197===a)p=this.lookU16(),e=this.decodeBinary(p,2);else if(198===a)p=this.lookU32(),e=this.decodeBinary(p,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)p=this.lookU8(),e=this.decodeExtension(p,1);else if(200===a)p=this.lookU16(),e=this.decodeExtension(p,2);else{if(201!==a)throw new Error("Unrecognized type byte: "+P(a));p=this.lookU32(),e=this.decodeExtension(p,4)}this.complete();for(var d=this.stack,i;0t)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.byteLengththis.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,a=this.bytes.subarray(t,t+o);return this.pos+=e+o,a},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),a=this.decodeBinary(o,e+1);return this.extensionCodec.decode(a,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=(a=this.view,r=this.pos,4294967296*a.getUint32(r)+a.getUint32(r+4)),a,r;return this.pos+=8,o},t.prototype.readI64=function(){var t=z(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(p)throw new TypeError("Generator is already executing.");for(;a;)try{if(p=1,d&&(u=2&t[0]?d.return:t[0]?d.throw||((u=d.return)&&u.call(d),0):d.next)&&!(u=u.call(d,t[1])).done)return u;switch(d=0,u&&(t=[2&t[0],u.value]),t[0]){case 0:case 1:u=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(!(u=0<(u=a.trys).length&&u[u.length-1])&&(6===t[0]||2===t[0])){a=0;continue}if(3===t[0]&&(!u||t[1]>u[0]&&t[1]u[0]&&t[1]a)return w(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var n;return n=k?u(e,t,a,f,m):m.map(function(o){return g(e,t,a,f,o,k)}),e.seen.pop(),h(n,x,T)}function p(e,t){if(k(t))return e.stylize("undefined","undefined");if(v(t)){var o="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,"\"")+"'";return e.stylize(o,"string")}return x(t)?e.stylize(""+t,"number"):m(t)?e.stylize(""+t,"boolean"):A(t)?e.stylize("null","null"):void 0}function d(e){return"["+Error.prototype.toString.call(e)+"]"}function u(e,t,o,a,r){for(var s=[],n=0,p=t.length;ne.seen.indexOf(p.value)?(i=A(o)?l(e,p.value,null):l(e,p.value,o-1),-1e?"0"+e.toString(10):e.toString(10)}function I(){var e=new Date,t=[C(e.getHours()),C(e.getMinutes()),C(e.getSeconds())].join(":");return[e.getDate(),O[e.getMonth()],t].join(" ")}function D(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var R=/%[sdj%]/g;o.format=function(e){if(!v(e)){for(var t=[],o=0;o=s)return e;switch(e){case"%s":return a[o++]+"";case"%d":return+a[o++];case"%j":try{return JSON.stringify(a[o++])}catch(e){return"[Circular]"}default:return e;}}),l=a[o];o>16,n[l++]=255&h>>8,n[l++]=255&h;return 2===s&&(h=u[e.charCodeAt(d)]<<2|u[e.charCodeAt(d+1)]>>4,n[l++]=255&h),1===s&&(h=u[e.charCodeAt(d)]<<10|u[e.charCodeAt(d+1)]<<4|u[e.charCodeAt(d+2)]>>2,n[l++]=255&h>>8,n[l++]=255&h),n}function n(e){return d[63&e>>18]+d[63&e>>12]+d[63&e>>6]+d[63&e]}function l(e,t,o){for(var a=[],r=t,s;rn?n:s+r));return 1===o?(p=e[t-1],a.push(d[p>>2]+d[63&p<<4]+"==")):2===o&&(p=(e[t-2]<<8)+e[t-1],a.push(d[p>>10]+d[63&p>>4]+d[63&p<<2]+"=")),a.join("")}o.byteLength=function(e){var t=a(e),o=t[0],r=t[1];return 3*(o+r)/4-r},o.toByteArray=s,o.fromByteArray=p;for(var d=[],u=[],g="undefined"==typeof Uint8Array?Array:Uint8Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y=0,m=h.length;ye)throw new RangeError("The value \""+e+"\" is invalid for option \"size\"")}function d(e,t,o){return l(e),0>=e?n(e):void 0===t?n(e):"string"==typeof o?n(e).fill(t,o):n(e).fill(t)}function u(e){return l(e),n(0>e?0:0|f(e))}function g(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!s.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var o=0|x(e,t),a=n(o),r=a.write(e,t);return r!==o&&(a=a.slice(0,r)),a}function h(e){for(var t=0>e.length?0:0|f(e.length),o=n(t),a=0;at||e.byteLength=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647 .toString(16)+" bytes");return 0|e}function A(e){return+e!=e&&(e=0),s.alloc(+e)}function x(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Z(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>>1;case"base64":return X(e).length;default:if(r)return a?-1:V(e).length;t=(""+t).toLowerCase(),r=!0;}}function v(e,t,o){var a=!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 N(this,t,o);case"utf8":case"utf-8":return R(this,t,o);case"ascii":return L(this,t,o);case"latin1":case"binary":return O(this,t,o);case"base64":return D(this,t,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,o);default:if(a)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),a=!0;}}function k(e,t,o){var a=e[t];e[t]=e[o],e[o]=a}function w(e,t,o,a,r){if(0===e.length)return-1;if("string"==typeof o?(a=o,o=0):2147483647o&&(o=-2147483648),o=+o,Q(o)&&(o=r?0:e.length-1),0>o&&(o=e.length+o),o>=e.length){if(r)return-1;o=e.length-1}else if(0>o)if(r)o=0;else return-1;if("string"==typeof t&&(t=s.from(t,a)),s.isBuffer(t))return 0===t.length?-1:T(e,t,o,a,r);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,o):Uint8Array.prototype.lastIndexOf.call(e,t,o):T(e,[t],o,a,r);throw new TypeError("val must be string, number or Buffer")}function T(e,t,o,a,r){function s(e,t){return 1===n?e[t]:e.readUInt16BE(t*n)}var n=1,l=e.length,p=t.length;if(void 0!==a&&(a=(a+"").toLowerCase(),"ucs2"===a||"ucs-2"===a||"utf16le"===a||"utf-16le"===a)){if(2>e.length||2>t.length)return-1;n=2,l/=2,p/=2,o/=2}var d;if(r){var u=-1;for(d=o;dl&&(o=l-p),d=o;0<=d;d--){for(var g=!0,h=0;hr&&(a=r)):a=r;var s=t.length;a>s/2&&(a=s/2);for(var n=0,l;nn&&(l=n):2===p?(d=e[s+1],128==(192&d)&&(h=(31&n)<<6|63&d,127h||57343h&&(l=h))):void 0}null===l?(l=65533,p=1):65535>>10),l=56320|1023&l),r.push(l),s+=p}return z(r)}function z(e){var t=e.length;if(t<=4096)return p.apply(String,e);for(var o="",a=0;at)&&(t=0),(!o||0>o||o>a)&&(o=a);for(var r="",s=t;se)throw new RangeError("offset is not uint");if(e+t>o)throw new RangeError("Trying to access beyond buffer length")}function K(e,t,o,a,r,n){if(!s.isBuffer(e))throw new TypeError("\"buffer\" argument must be a Buffer instance");if(t>r||te.length)throw new RangeError("Index out of range")}function M(e,t,o,a,r,s){if(o+a>e.length)throw new RangeError("Index out of range");if(0>o)throw new RangeError("Index out of range")}function F(e,t,o,a,r){return t=+t,o>>>=0,r||M(e,t,o,4,34028234663852886e22,-34028234663852886e22),ee.write(e,t,o,a,23,4),o+4}function j(e,t,o,a,r){return t=+t,o>>>=0,r||M(e,t,o,8,17976931348623157e292,-17976931348623157e292),ee.write(e,t,o,a,52,8),o+8}function G(e){if(e=e.split("=")[0],e=e.trim().replace(te,""),2>e.length)return"";for(;0!=e.length%4;)e+="=";return e}function H(e){return 16>e?"0"+e.toString(16):e.toString(16)}function V(e,t){t=t||1/0;for(var o=e.length,a=null,r=[],s=0,n;sn){if(!a){if(56319n){-1<(t-=3)&&r.push(239,191,189),a=n;continue}n=(a-55296<<10|n-56320)+65536}else a&&-1<(t-=3)&&r.push(239,191,189);if(a=null,128>n){if(0>(t-=1))break;r.push(n)}else if(2048>n){if(0>(t-=2))break;r.push(192|n>>6,128|63&n)}else if(65536>n){if(0>(t-=3))break;r.push(224|n>>12,128|63&n>>6,128|63&n)}else if(1114112>n){if(0>(t-=4))break;r.push(240|n>>18,128|63&n>>12,128|63&n>>6,128|63&n)}else throw new Error("Invalid code point")}return r}function W(e){for(var t=[],o=0;o(t-=2));++a)r=e.charCodeAt(a),s=r>>8,n=r%256,o.push(n),o.push(s);return o}function X(e){return $.toByteArray(G(e))}function J(e,t,o,a){for(var r=0;r=t.length||r>=e.length);++r)t[r+o]=e[r];return r}function Z(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Q(e){return e!==e}var $=e("base64-js"),ee=e("ieee754");r.Buffer=s,r.SlowBuffer=A,r.INSPECT_MAX_BYTES=50;r.kMaxLength=2147483647,s.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(t){return!1}}(),s.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(s.prototype,"parent",{enumerable:!0,get:function(){return s.isBuffer(this)?this.buffer:void 0}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){return s.isBuffer(this)?this.byteOffset:void 0}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),s.poolSize=8192,s.from=function(e,t,o){return i(e,t,o)},s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,s.alloc=function(e,t,o){return d(e,t,o)},s.allocUnsafe=function(e){return u(e)},s.allocUnsafeSlow=function(e){return u(e)},s.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==s.prototype},s.compare=function(e,t){if(Z(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),Z(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError("The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array");if(e===t)return 0;for(var r=e.length,n=t.length,l=0,p=o(r,n);lt&&(e+=" ... "),""},s.prototype.compare=function(e,t,a,r,n){if(Z(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.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===r&&(r=0),void 0===n&&(n=this.length),0>t||a>e.length||0>r||n>this.length)throw new RangeError("out of range index");if(r>=n&&t>=a)return 0;if(r>=n)return-1;if(t>=a)return 1;if(t>>>=0,a>>>=0,r>>>=0,n>>>=0,this===e)return 0;for(var l=n-r,p=a-t,d=o(l,p),u=this.slice(r,n),g=e.slice(t,a),h=0;h>>=0,isFinite(o)?(o>>>=0,void 0===a&&(a="utf8")):(a=o,o=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var r=this.length-t;if((void 0===o||o>r)&&(o=r),0o||0>t)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");for(var s=!1;;)switch(a){case"hex":return S(this,e,t,o);case"utf8":case"utf-8":return B(this,e,t,o);case"ascii":return U(this,e,t,o);case"latin1":case"binary":return E(this,e,t,o);case"base64":return C(this,e,t,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,t,o);default:if(s)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),s=!0;}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};s.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>>=0,t>>>=0,o||q(e,t,this.length);for(var a=this[e],r=1,s=0;++s>>=0,t>>>=0,o||q(e,t,this.length);for(var a=this[e+--t],r=1;0>>=0,t||q(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||q(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||q(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||q(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||q(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,o,a){e>>>=0,o>>>=0,a||q(e,o,this.length);for(var r=this[e],s=1,n=0;++n=s&&(r-=t(2,8*o)),r},s.prototype.readIntBE=function(e,o,a){e>>>=0,o>>>=0,a||q(e,o,this.length);for(var r=o,s=1,n=this[e+--r];0=s&&(n-=t(2,8*o)),n},s.prototype.readInt8=function(e,t){return e>>>=0,t||q(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||q(e,2,this.length);var o=this[e]|this[e+1]<<8;return 32768&o?4294901760|o:o},s.prototype.readInt16BE=function(e,t){e>>>=0,t||q(e,2,this.length);var o=this[e+1]|this[e]<<8;return 32768&o?4294901760|o:o},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||q(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||q(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||q(e,4,this.length),ee.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||q(e,4,this.length),ee.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||q(e,8,this.length),ee.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||q(e,8,this.length),ee.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,o,a,r){if(e=+e,o>>>=0,a>>>=0,!r){var s=t(2,8*a)-1;K(this,e,o,a,s,0)}var n=1,l=0;for(this[o]=255&e;++l>>=0,a>>>=0,!r){var s=t(2,8*a)-1;K(this,e,o,a,s,0)}var n=a-1,l=1;for(this[o+n]=255&e;0<=--n&&(l*=256);)this[o+n]=255&e/l;return o+a},s.prototype.writeUInt8=function(e,t,o){return e=+e,t>>>=0,o||K(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,o){return e=+e,t>>>=0,o||K(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUInt16BE=function(e,t,o){return e=+e,t>>>=0,o||K(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUInt32LE=function(e,t,o){return e=+e,t>>>=0,o||K(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},s.prototype.writeUInt32BE=function(e,t,o){return e=+e,t>>>=0,o||K(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},s.prototype.writeIntLE=function(e,o,a,r){if(e=+e,o>>>=0,!r){var s=t(2,8*a-1);K(this,e,o,a,s-1,-s)}var n=0,l=1,p=0;for(this[o]=255&e;++ne&&0===p&&0!==this[o+n-1]&&(p=1),this[o+n]=255&(e/l>>0)-p;return o+a},s.prototype.writeIntBE=function(e,o,a,r){if(e=+e,o>>>=0,!r){var s=t(2,8*a-1);K(this,e,o,a,s-1,-s)}var n=a-1,l=1,p=0;for(this[o+n]=255&e;0<=--n&&(l*=256);)0>e&&0===p&&0!==this[o+n+1]&&(p=1),this[o+n]=255&(e/l>>0)-p;return o+a},s.prototype.writeInt8=function(e,t,o){return e=+e,t>>>=0,o||K(this,e,t,1,127,-128),0>e&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,o){return e=+e,t>>>=0,o||K(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,o){return e=+e,t>>>=0,o||K(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,o){return e=+e,t>>>=0,o||K(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},s.prototype.writeInt32BE=function(e,t,o){return e=+e,t>>>=0,o||K(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},s.prototype.writeFloatLE=function(e,t,o){return F(this,e,t,!0,o)},s.prototype.writeFloatBE=function(e,t,o){return F(this,e,t,!1,o)},s.prototype.writeDoubleLE=function(e,t,o){return j(this,e,t,!0,o)},s.prototype.writeDoubleBE=function(e,t,o){return j(this,e,t,!1,o)},s.prototype.copy=function(e,t,o,a){if(!s.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),0t)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-tr||"latin1"===a)&&(e=r)}}else"number"==typeof e&&(e&=255);if(0>t||this.length>>=0,o=o===void 0?this.length:o>>>0,e||(e=0);var n;if("number"==typeof e)for(n=t;n=s){t+=p(s);continue}else 191=s?(n=31&s,r=1):239>=s?(n=15&s,r=2):247>=s?(n=7&s,r=3):h(a,t);for(var l=0;ls||191=n&&h(a,t),1114111=n?t+=p(n):(n-=65536,t+=p((n>>10)+55296),t+=p((1023&n)+56320))}return t},m=function(e){if(!/^[A-Z2-7=]+$/.test(e))throw new Error("Invalid base32 characters");e=e.replace(/=/g,"");for(var t=[],o=0,a=e.length,r=0,s=a>>3<<3,n,l,p,d,g,h,y,m;r>>2),t[o++]=255&(l<<6|p<<1|d>>>4),t[o++]=255&(d<<4|g>>>1),t[o++]=255&(g<<7|h<<2|y>>>3),t[o++]=255&(y<<5|m);var f=a-s;return 2==f?(n=u[e.charAt(r++)],l=u[e.charAt(r++)],t[o++]=255&(n<<3|l>>>2)):4===f?(n=u[e.charAt(r++)],l=u[e.charAt(r++)],p=u[e.charAt(r++)],d=u[e.charAt(r++)],t[o++]=255&(n<<3|l>>>2),t[o++]=255&(l<<6|p<<1|d>>>4)):5===f?(n=u[e.charAt(r++)],l=u[e.charAt(r++)],p=u[e.charAt(r++)],d=u[e.charAt(r++)],g=u[e.charAt(r++)],t[o++]=255&(n<<3|l>>>2),t[o++]=255&(l<<6|p<<1|d>>>4),t[o++]=255&(d<<4|g>>>1)):7===f&&(n=u[e.charAt(r++)],l=u[e.charAt(r++)],p=u[e.charAt(r++)],d=u[e.charAt(r++)],g=u[e.charAt(r++)],h=u[e.charAt(r++)],y=u[e.charAt(r++)],t[o++]=255&(n<<3|l>>>2),t[o++]=255&(l<<6|p<<1|d>>>4),t[o++]=255&(d<<4|g>>>1),t[o++]=255&(g<<7|h<<2|y>>>3)),t},f=function(e){for(var t="",o=e.length,a=0,r=5*parseInt(o/5),s,n,p,d,u;a>>3]+l[31&(s<<2|n>>>6)]+l[31&n>>>1]+l[31&(n<<4|p>>>4)]+l[31&(p<<1|d>>>7)]+l[31&d>>>2]+l[31&(d<<3|u>>>5)]+l[31&u];var g=o-r;return 1==g?(s=e.charCodeAt(a),t+=l[s>>>3]+l[31&s<<2]+"======"):2===g?(s=e.charCodeAt(a++),n=e.charCodeAt(a),t+=l[s>>>3]+l[31&(s<<2|n>>>6)]+l[31&n>>>1]+l[31&n<<4]+"===="):3===g?(s=e.charCodeAt(a++),n=e.charCodeAt(a++),p=e.charCodeAt(a),t+=l[s>>>3]+l[31&(s<<2|n>>>6)]+l[31&n>>>1]+l[31&(n<<4|p>>>4)]+l[31&p<<1]+"==="):4===g&&(s=e.charCodeAt(a++),n=e.charCodeAt(a++),p=e.charCodeAt(a++),d=e.charCodeAt(a),t+=l[s>>>3]+l[31&(s<<2|n>>>6)]+l[31&n>>>1]+l[31&(n<<4|p>>>4)]+l[31&(p<<1|d>>>7)]+l[31&d>>>2]+l[31&d<<3]+"="),t},A=function(e){var t=!1,o="",a=0,r=0,s=0,n=e.length,p,d,u,h,y,m,f;do{for(g[0]=g[5],g[1]=g[6],g[2]=g[7],f=r;af;++a)m=e.charCodeAt(a),128>m?g[f++]=m:2048>m?(g[f++]=192|m>>6,g[f++]=128|63&m):55296>m||57344<=m?(g[f++]=224|m>>12,g[f++]=128|63&m>>6,g[f++]=128|63&m):(m=65536+((1023&m)<<10|1023&e.charCodeAt(++a)),g[f++]=240|m>>18,g[f++]=128|63&m>>12,g[f++]=128|63&m>>6,g[f++]=128|63&m);s+=f-r,r=f-5,a===n&&++a,a>n&&6>f&&(t=!0),p=g[0],4>>3]+l[31&(p<<2|d>>>6)]+l[31&d>>>1]+l[31&(d<<4|u>>>4)]+l[31&(u<<1|h>>>7)]+l[31&h>>>2]+l[31&(h<<3|y>>>5)]+l[31&y]):1===f?o+=l[p>>>3]+l[31&p<<2]+"======":2===f?(d=g[1],o+=l[p>>>3]+l[31&(p<<2|d>>>6)]+l[31&d>>>1]+l[31&d<<4]+"===="):3===f?(d=g[1],u=g[2],o+=l[p>>>3]+l[31&(p<<2|d>>>6)]+l[31&d>>>1]+l[31&(d<<4|u>>>4)]+l[31&u<<1]+"==="):(d=g[1],u=g[2],h=g[3],o+=l[p>>>3]+l[31&(p<<2|d>>>6)]+l[31&d>>>1]+l[31&(d<<4|u>>>4)]+l[31&(u<<1|h>>>7)]+l[31&h>>>2]+l[31&h<<3]+"=")}while(!t);return o},x=function(e){for(var t="",o=e.length,a=0,r=5*parseInt(o/5),s,n,p,d,u;a>>3]+l[31&(s<<2|n>>>6)]+l[31&n>>>1]+l[31&(n<<4|p>>>4)]+l[31&(p<<1|d>>>7)]+l[31&d>>>2]+l[31&(d<<3|u>>>5)]+l[31&u];var g=o-r;return 1==g?(s=e[a],t+=l[s>>>3]+l[31&s<<2]+"======"):2===g?(s=e[a++],n=e[a],t+=l[s>>>3]+l[31&(s<<2|n>>>6)]+l[31&n>>>1]+l[31&n<<4]+"===="):3===g?(s=e[a++],n=e[a++],p=e[a],t+=l[s>>>3]+l[31&(s<<2|n>>>6)]+l[31&n>>>1]+l[31&(n<<4|p>>>4)]+l[31&p<<1]+"==="):4===g&&(s=e[a++],n=e[a++],p=e[a++],d=e[a],t+=l[s>>>3]+l[31&(s<<2|n>>>6)]+l[31&n>>>1]+l[31&(n<<4|p>>>4)]+l[31&(p<<1|d>>>7)]+l[31&d>>>2]+l[31&d<<3]+"="),t},v=function(e,t){if(!t)return y(m(e));if(!/^[A-Z2-7=]+$/.test(e))throw new Error("Invalid base32 characters");var o="",a=e.indexOf("="),r,s,n,l,d,g,h,f;-1===a&&(a=e.length);for(var A=0,x=a>>3<<3;A>>2))+p(255&(s<<6|n<<1|l>>>4))+p(255&(l<<4|d>>>1))+p(255&(d<<7|g<<2|h>>>3))+p(255&(h<<5|f));var v=a-x;return 2==v?(r=u[e.charAt(A++)],s=u[e.charAt(A++)],o+=p(255&(r<<3|s>>>2))):4===v?(r=u[e.charAt(A++)],s=u[e.charAt(A++)],n=u[e.charAt(A++)],l=u[e.charAt(A++)],o+=p(255&(r<<3|s>>>2))+p(255&(s<<6|n<<1|l>>>4))):5===v?(r=u[e.charAt(A++)],s=u[e.charAt(A++)],n=u[e.charAt(A++)],l=u[e.charAt(A++)],d=u[e.charAt(A++)],o+=p(255&(r<<3|s>>>2))+p(255&(s<<6|n<<1|l>>>4))+p(255&(l<<4|d>>>1))):7===v&&(r=u[e.charAt(A++)],s=u[e.charAt(A++)],n=u[e.charAt(A++)],l=u[e.charAt(A++)],d=u[e.charAt(A++)],g=u[e.charAt(A++)],h=u[e.charAt(A++)],o+=p(255&(r<<3|s>>>2))+p(255&(s<<6|n<<1|l>>>4))+p(255&(l<<4|d>>>1))+p(255&(d<<7|g<<2|h>>>3))),o},k={encode:function(e,t){var o="string"!=typeof e;return o&&e.constructor===ArrayBuffer&&(e=new Uint8Array(e)),o?x(e):t?f(e):A(e)},decode:v};v.asBytes=m,s?t.exports=k:(a.base32=k,n&&d(function(){return k}))})()}).call(this,e("_process"),"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global)},{_process:14}],11:[function(e,o,a){a.read=function(o,a,r,n,l){var p=8*l-n-1,u=(1<>1,h=-7,y=r?l-1:0,f=r?-1:1,d=o[a+y],A,x;for(y+=f,A=d&(1<<-h)-1,d>>=-h,h+=p;0>=-h,h+=n;0>1,x=23===p?t(2,-24)-t(2,-77):0,v=l?0:u-1,k=l?1:-1,d=0>a||0===a&&0>1/a?1:0,w,T,S;for(a=r(a),isNaN(a)||a===1/0?(T=isNaN(a)?1:0,w=f):(w=s(h(a)/g),1>a*(S=t(2,-w))&&(w--,S*=2),a+=1<=w+A?x/S:x*t(2,1-A),2<=a*S&&(w++,S/=2),w+A>=f?(T=0,w=f):1<=w+A?(T=(a*S-1)*t(2,p),w+=A):(T=a*t(2,A-1)*t(2,p),w=0));8<=p;o[n+v]=255&T,v+=k,T/=256,p-=8);for(w=w<u?l[p++]=u:2048>u?(l[p++]=192|u>>6,l[p++]=128|63&u):55296>u||57344<=u?(l[p++]=224|u>>12,l[p++]=128|63&u>>6,l[p++]=128|63&u):(u=65536+((1023&u)<<10|1023&e.charCodeAt(++d)),l[p++]=240|u>>18,l[p++]=128|63&u>>12,l[p++]=128|63&u>>6,l[p++]=128|63&u);e=l}128d;++d)m=e[d]||0,h[d]=92^m,y[d]=54^m;a.call(this,t,o),this.update(y),this.oKeyPad=h,this.inner=!0,this.sharedMemory=o}var s="object"==typeof window,n=s?window:{};n.JS_SHA512_NO_WINDOW&&(s=!1);var i=!s&&"object"==typeof self,l=!n.JS_SHA512_NO_NODE_JS&&"object"==typeof e&&e.versions&&e.versions.node;l?n=o:i&&(n=self);var p=!n.JS_SHA512_NO_COMMON_JS&&"object"==typeof t&&t.exports,u="function"==typeof d&&d.amd,g=!n.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"],y=[-2147483648,8388608,32768,128],m=[24,16,8,0],f=[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],A=["hex","array","digest","arrayBuffer"],x=[];(n.JS_SHA512_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),g&&(n.JS_SHA512_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});var v=function(e,t){return function(o){return new a(t,!0).update(o)[e]()}},k=function(e){var t=v("hex",e);t.create=function(){return new a(e)},t.update=function(e){return t.create().update(e)};for(var o=0,r;ol;++a)s[l>>2]|=e[a]<l;++a)n=e.charCodeAt(a),128>n?s[l>>2]|=n<n?(s[l>>2]|=(192|n>>6)<>2]|=(128|63&n)<n||57344<=n?(s[l>>2]|=(224|n>>12)<>2]|=(128|63&n>>6)<>2]|=(128|63&n)<>2]|=(240|n>>18)<>2]|=(128|63&n>>12)<>2]|=(128|63&n>>6)<>2]|=(128|63&n)<>2]|=y[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()}},a.prototype.hash=function(){var e=this.h0h,t=this.h0l,o=this.h1h,a=this.h1l,r=this.h2h,s=this.h2l,n=this.h3h,i=this.h3l,l=this.h4h,p=this.h4l,d=this.h5h,u=this.h5l,g=this.h6h,h=this.h6l,y=this.h7h,m=this.h7l,A=this.blocks,x,v,k,w,T,S,B,U,E,C,I,D,R,z,L,O,N,P,q,K,M,F,G,H,V;for(x=32;160>x;x+=2)K=A[x-30],M=A[x-29],v=(K>>>1|M<<31)^(K>>>8|M<<24)^K>>>7,k=(M>>>1|K<<31)^(M>>>8|K<<24)^(M>>>7|K<<25),K=A[x-4],M=A[x-3],w=(K>>>19|M<<13)^(M>>>29|K<<3)^K>>>6,T=(M>>>19|K<<13)^(K>>>29|M<<3)^(M>>>6|K<<26),K=A[x-32],M=A[x-31],F=A[x-14],G=A[x-13],S=(65535&G)+(65535&M)+(65535&k)+(65535&T),B=(G>>>16)+(M>>>16)+(k>>>16)+(T>>>16)+(S>>>16),U=(65535&F)+(65535&K)+(65535&v)+(65535&w)+(B>>>16),E=(F>>>16)+(K>>>16)+(v>>>16)+(w>>>16)+(U>>>16),A[x]=E<<16|65535&U,A[x+1]=B<<16|65535&S;var W=e,Y=t,X=o,J=a,Z=r,Q=s,$=n,ee=i,te=l,oe=p,ae=d,re=u,se=g,ne=h,ie=y,le=m;for(O=X&Z,N=J&Q,x=0;160>x;x+=8)v=(W>>>28|Y<<4)^(Y>>>2|W<<30)^(Y>>>7|W<<25),k=(Y>>>28|W<<4)^(W>>>2|Y<<30)^(W>>>7|Y<<25),w=(te>>>14|oe<<18)^(te>>>18|oe<<14)^(oe>>>9|te<<23),T=(oe>>>14|te<<18)^(oe>>>18|te<<14)^(te>>>9|oe<<23),C=W&X,I=Y&J,P=C^W&Z^O,q=I^Y&Q^N,H=te&ae^~te&se,V=oe&re^~oe&ne,K=A[x],M=A[x+1],F=f[x],G=f[x+1],S=(65535&G)+(65535&M)+(65535&V)+(65535&T)+(65535&le),B=(G>>>16)+(M>>>16)+(V>>>16)+(T>>>16)+(le>>>16)+(S>>>16),U=(65535&F)+(65535&K)+(65535&H)+(65535&w)+(65535&ie)+(B>>>16),E=(F>>>16)+(K>>>16)+(H>>>16)+(w>>>16)+(ie>>>16)+(U>>>16),K=E<<16|65535&U,M=B<<16|65535&S,S=(65535&q)+(65535&k),B=(q>>>16)+(k>>>16)+(S>>>16),U=(65535&P)+(65535&v)+(B>>>16),E=(P>>>16)+(v>>>16)+(U>>>16),F=E<<16|65535&U,G=B<<16|65535&S,S=(65535&ee)+(65535&M),B=(ee>>>16)+(M>>>16)+(S>>>16),U=(65535&$)+(65535&K)+(B>>>16),E=($>>>16)+(K>>>16)+(U>>>16),ie=E<<16|65535&U,le=B<<16|65535&S,S=(65535&G)+(65535&M),B=(G>>>16)+(M>>>16)+(S>>>16),U=(65535&F)+(65535&K)+(B>>>16),E=(F>>>16)+(K>>>16)+(U>>>16),$=E<<16|65535&U,ee=B<<16|65535&S,v=($>>>28|ee<<4)^(ee>>>2|$<<30)^(ee>>>7|$<<25),k=(ee>>>28|$<<4)^($>>>2|ee<<30)^($>>>7|ee<<25),w=(ie>>>14|le<<18)^(ie>>>18|le<<14)^(le>>>9|ie<<23),T=(le>>>14|ie<<18)^(le>>>18|ie<<14)^(ie>>>9|le<<23),D=$&W,R=ee&Y,P=D^$&X^C,q=R^ee&J^I,H=ie&te^~ie&ae,V=le&oe^~le&re,K=A[x+2],M=A[x+3],F=f[x+2],G=f[x+3],S=(65535&G)+(65535&M)+(65535&V)+(65535&T)+(65535&ne),B=(G>>>16)+(M>>>16)+(V>>>16)+(T>>>16)+(ne>>>16)+(S>>>16),U=(65535&F)+(65535&K)+(65535&H)+(65535&w)+(65535&se)+(B>>>16),E=(F>>>16)+(K>>>16)+(H>>>16)+(w>>>16)+(se>>>16)+(U>>>16),K=E<<16|65535&U,M=B<<16|65535&S,S=(65535&q)+(65535&k),B=(q>>>16)+(k>>>16)+(S>>>16),U=(65535&P)+(65535&v)+(B>>>16),E=(P>>>16)+(v>>>16)+(U>>>16),F=E<<16|65535&U,G=B<<16|65535&S,S=(65535&Q)+(65535&M),B=(Q>>>16)+(M>>>16)+(S>>>16),U=(65535&Z)+(65535&K)+(B>>>16),E=(Z>>>16)+(K>>>16)+(U>>>16),se=E<<16|65535&U,ne=B<<16|65535&S,S=(65535&G)+(65535&M),B=(G>>>16)+(M>>>16)+(S>>>16),U=(65535&F)+(65535&K)+(B>>>16),E=(F>>>16)+(K>>>16)+(U>>>16),Z=E<<16|65535&U,Q=B<<16|65535&S,v=(Z>>>28|Q<<4)^(Q>>>2|Z<<30)^(Q>>>7|Z<<25),k=(Q>>>28|Z<<4)^(Z>>>2|Q<<30)^(Z>>>7|Q<<25),w=(se>>>14|ne<<18)^(se>>>18|ne<<14)^(ne>>>9|se<<23),T=(ne>>>14|se<<18)^(ne>>>18|se<<14)^(se>>>9|ne<<23),z=Z&$,L=Q&ee,P=z^Z&W^D,q=L^Q&Y^R,H=se&ie^~se&te,V=ne&le^~ne&oe,K=A[x+4],M=A[x+5],F=f[x+4],G=f[x+5],S=(65535&G)+(65535&M)+(65535&V)+(65535&T)+(65535&re),B=(G>>>16)+(M>>>16)+(V>>>16)+(T>>>16)+(re>>>16)+(S>>>16),U=(65535&F)+(65535&K)+(65535&H)+(65535&w)+(65535&ae)+(B>>>16),E=(F>>>16)+(K>>>16)+(H>>>16)+(w>>>16)+(ae>>>16)+(U>>>16),K=E<<16|65535&U,M=B<<16|65535&S,S=(65535&q)+(65535&k),B=(q>>>16)+(k>>>16)+(S>>>16),U=(65535&P)+(65535&v)+(B>>>16),E=(P>>>16)+(v>>>16)+(U>>>16),F=E<<16|65535&U,G=B<<16|65535&S,S=(65535&J)+(65535&M),B=(J>>>16)+(M>>>16)+(S>>>16),U=(65535&X)+(65535&K)+(B>>>16),E=(X>>>16)+(K>>>16)+(U>>>16),ae=E<<16|65535&U,re=B<<16|65535&S,S=(65535&G)+(65535&M),B=(G>>>16)+(M>>>16)+(S>>>16),U=(65535&F)+(65535&K)+(B>>>16),E=(F>>>16)+(K>>>16)+(U>>>16),X=E<<16|65535&U,J=B<<16|65535&S,v=(X>>>28|J<<4)^(J>>>2|X<<30)^(J>>>7|X<<25),k=(J>>>28|X<<4)^(X>>>2|J<<30)^(X>>>7|J<<25),w=(ae>>>14|re<<18)^(ae>>>18|re<<14)^(re>>>9|ae<<23),T=(re>>>14|ae<<18)^(re>>>18|ae<<14)^(ae>>>9|re<<23),O=X&Z,N=J&Q,P=O^X&$^z,q=N^J&ee^L,H=ae&se^~ae&ie,V=re&ne^~re&le,K=A[x+6],M=A[x+7],F=f[x+6],G=f[x+7],S=(65535&G)+(65535&M)+(65535&V)+(65535&T)+(65535&oe),B=(G>>>16)+(M>>>16)+(V>>>16)+(T>>>16)+(oe>>>16)+(S>>>16),U=(65535&F)+(65535&K)+(65535&H)+(65535&w)+(65535&te)+(B>>>16),E=(F>>>16)+(K>>>16)+(H>>>16)+(w>>>16)+(te>>>16)+(U>>>16),K=E<<16|65535&U,M=B<<16|65535&S,S=(65535&q)+(65535&k),B=(q>>>16)+(k>>>16)+(S>>>16),U=(65535&P)+(65535&v)+(B>>>16),E=(P>>>16)+(v>>>16)+(U>>>16),F=E<<16|65535&U,G=B<<16|65535&S,S=(65535&Y)+(65535&M),B=(Y>>>16)+(M>>>16)+(S>>>16),U=(65535&W)+(65535&K)+(B>>>16),E=(W>>>16)+(K>>>16)+(U>>>16),te=E<<16|65535&U,oe=B<<16|65535&S,S=(65535&G)+(65535&M),B=(G>>>16)+(M>>>16)+(S>>>16),U=(65535&F)+(65535&K)+(B>>>16),E=(F>>>16)+(K>>>16)+(U>>>16),W=E<<16|65535&U,Y=B<<16|65535&S;S=(65535&t)+(65535&Y),B=(t>>>16)+(Y>>>16)+(S>>>16),U=(65535&e)+(65535&W)+(B>>>16),E=(e>>>16)+(W>>>16)+(U>>>16),this.h0h=E<<16|65535&U,this.h0l=B<<16|65535&S,S=(65535&a)+(65535&J),B=(a>>>16)+(J>>>16)+(S>>>16),U=(65535&o)+(65535&X)+(B>>>16),E=(o>>>16)+(X>>>16)+(U>>>16),this.h1h=E<<16|65535&U,this.h1l=B<<16|65535&S,S=(65535&s)+(65535&Q),B=(s>>>16)+(Q>>>16)+(S>>>16),U=(65535&r)+(65535&Z)+(B>>>16),E=(r>>>16)+(Z>>>16)+(U>>>16),this.h2h=E<<16|65535&U,this.h2l=B<<16|65535&S,S=(65535&i)+(65535&ee),B=(i>>>16)+(ee>>>16)+(S>>>16),U=(65535&n)+(65535&$)+(B>>>16),E=(n>>>16)+($>>>16)+(U>>>16),this.h3h=E<<16|65535&U,this.h3l=B<<16|65535&S,S=(65535&p)+(65535&oe),B=(p>>>16)+(oe>>>16)+(S>>>16),U=(65535&l)+(65535&te)+(B>>>16),E=(l>>>16)+(te>>>16)+(U>>>16),this.h4h=E<<16|65535&U,this.h4l=B<<16|65535&S,S=(65535&u)+(65535&re),B=(u>>>16)+(re>>>16)+(S>>>16),U=(65535&d)+(65535&ae)+(B>>>16),E=(d>>>16)+(ae>>>16)+(U>>>16),this.h5h=E<<16|65535&U,this.h5l=B<<16|65535&S,S=(65535&h)+(65535&ne),B=(h>>>16)+(ne>>>16)+(S>>>16),U=(65535&g)+(65535&se)+(B>>>16),E=(g>>>16)+(se>>>16)+(U>>>16),this.h6h=E<<16|65535&U,this.h6l=B<<16|65535&S,S=(65535&m)+(65535&le),B=(m>>>16)+(le>>>16)+(S>>>16),U=(65535&y)+(65535&ie)+(B>>>16),E=(y>>>16)+(ie>>>16)+(U>>>16),this.h7h=E<<16|65535&U,this.h7l=B<<16|65535&S},a.prototype.hex=function(){this.finalize();var e=this.h0h,t=this.h0l,o=this.h1h,a=this.h1l,r=this.h2h,s=this.h2l,n=this.h3h,i=this.h3l,l=this.h4h,p=this.h4l,d=this.h5h,u=this.h5l,g=this.h6h,y=this.h6l,m=this.h7h,f=this.h7l,A=this.bits,x=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&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&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&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]+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];return 256<=A&&(x+=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<=A&&(x+=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&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]+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&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]),512==A&&(x+=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&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]+h[15&m>>28]+h[15&m>>24]+h[15&m>>20]+h[15&m>>16]+h[15&m>>12]+h[15&m>>8]+h[15&m>>4]+h[15&m]+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]),x},a.prototype.toString=a.prototype.hex,a.prototype.digest=function(){this.finalize();var e=this.h0h,t=this.h0l,o=this.h1h,a=this.h1l,r=this.h2h,s=this.h2l,n=this.h3h,i=this.h3l,l=this.h4h,p=this.h4l,d=this.h5h,u=this.h5l,g=this.h6h,h=this.h6l,y=this.h7h,m=this.h7l,f=this.bits,A=[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&a>>24,255&a>>16,255&a>>8,255&a,255&r>>24,255&r>>16,255&r>>8,255&r,255&s>>24,255&s>>16,255&s>>8,255&s,255&n>>24,255&n>>16,255&n>>8,255&n];return 256<=f&&A.push(255&i>>24,255&i>>16,255&i>>8,255&i),384<=f&&A.push(255&l>>24,255&l>>16,255&l>>8,255&l,255&p>>24,255&p>>16,255&p>>8,255&p,255&d>>24,255&d>>16,255&d>>8,255&d,255&u>>24,255&u>>16,255&u>>8,255&u),512==f&&A.push(255&g>>24,255&g>>16,255&g>>8,255&g,255&h>>24,255&h>>16,255&h>>8,255&h,255&y>>24,255&y>>16,255&y>>8,255&y,255&m>>24,255&m>>16,255&m>>8,255&m),A},a.prototype.array=a.prototype.digest,a.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},a.prototype.clone=function(){var e=new a(this.bits,!1);return this.copyTo(e),e},a.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;to;o++)t["_"+p(o)]=o;var a=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==a.join(""))return!1;var r={};return["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t"].forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var o=a(e),p=1,d,u;p{a.prototype[e]=function(...t){return this._defaults.push({fn:e,args:t}),this}}),a.prototype._setDefaults=function(e){this._defaults.forEach(t=>{e[t.fn].apply(e,t.args)})},t.exports=a},{}],16:[function(e,t,o){function a(){}function r(e){if(!m(e))return e;const t=[];for(const o in e)s(t,o,e[o]);return t.join("&")}function s(e,t,o){if(!(null!=o))null===o&&e.push(encodeURIComponent(t));else if(Array.isArray(o))o.forEach(o=>{s(e,t,o)});else if(m(o))for(const a in o)s(e,`${t}[${a}]`,o[a]);else e.push(encodeURIComponent(t)+"="+encodeURIComponent(o))}function n(e){const t={},o=e.split("&");let a,r;for(let s=0,n=o.length;s{let t=null,a=null;try{a=new p(o)}catch(a){return t=new Error("Parser is unable to parse the response"),t.parse=!0,t.original=a,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",a);let r;try{o._isResponseOK(a)||(r=new Error(a.statusText||"Unsuccessful HTTP response"))}catch(e){r=e}r?(r.original=t,r.response=a,r.status=a.status,o.callback(r,a)):o.callback(null,a)})}function u(e,t,o){const a=x("DELETE",e);return"function"==typeof t&&(o=t,t=null),t&&a.send(t),o&&a.end(o),a}let g;"undefined"==typeof window?"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),g=this):g=self:g=window;const h=e("component-emitter"),y=e("./request-base"),m=e("./is-object"),f=e("./response-base"),A=e("./agent-base");const x=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,x.getXHR=()=>{if(g.XMLHttpRequest&&(!g.location||"file:"!=g.location.protocol||!g.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 v=e=>e.trim();x.serializeObject=r,x.parseString=n,x.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"},x.serialize={"application/x-www-form-urlencoded":r,"application/json":JSON.stringify},x.parse={"application/x-www-form-urlencoded":n,"application/json":JSON.parse},f(p.prototype),p.prototype._parseBody=function(e){let t=x.parse[this.type];return this.req._parser?this.req._parser(this,e):(!t&&l(this.type)&&(t=x.parse["application/json"]),t&&e&&(e.length||e instanceof Object)?t(e):null)},p.prototype.toError=function(){const e=this.req,t=e.method,o=e.url,a=`cannot ${t} ${o} (${this.status})`,r=new Error(a);return r.status=this.status,r.method=t,r.url=o,r},x.Response=p,h(d.prototype),y(d.prototype),d.prototype.type=function(e){return this.set("Content-Type",x.types[e]||e),this},d.prototype.accept=function(e){return this.set("Accept",x.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=r(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 g.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||a,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=x.getXHR();let a=this._formData||this._data;this._setTimeouts(),o.onreadystatechange=()=>{const e=o.readyState;if(2<=e&&t._responseTimeoutTimer&&clearTimeout(t._responseTimeoutTimer),4!=e)return;let a;try{a=o.status}catch(t){a=0}return a?void t.emit("end"):t.timedout||t._aborted?void 0:t.crossDomainError()};const r=(o,a)=>{0new A,["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach(e=>{A.prototype[e.toLowerCase()]=function(t,o){const a=new x.Request(e,t);return this._setDefaults(a),o&&a.end(o),a}}),A.prototype.del=A.prototype["delete"],x.get=(e,t,o)=>{const a=x("GET",e);return"function"==typeof t&&(o=t,t=null),t&&a.query(t),o&&a.end(o),a},x.head=(e,t,o)=>{const a=x("HEAD",e);return"function"==typeof t&&(o=t,t=null),t&&a.query(t),o&&a.end(o),a},x.options=(e,t,o)=>{const a=x("OPTIONS",e);return"function"==typeof t&&(o=t,t=null),t&&a.send(t),o&&a.end(o),a},x.del=u,x["delete"]=u,x.patch=(e,t,o)=>{const a=x("PATCH",e);return"function"==typeof t&&(o=t,t=null),t&&a.send(t),o&&a.end(o),a},x.post=(e,t,o)=>{const a=x("POST",e);return"function"==typeof t&&(o=t,t=null),t&&a.send(t),o&&a.end(o),a},x.put=(e,t,o)=>{const a=x("PUT",e);return"function"==typeof t&&(o=t,t=null),t&&a.send(t),o&&a.end(o),a}},{"./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 a(e){if(e)return r(e)}function r(e){for(const t in a.prototype)e[t]=a.prototype[t];return e}const s=e("./is-object");t.exports=a,a.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,this},a.prototype.parse=function(e){return this._parser=e,this},a.prototype.responseType=function(e){return this._responseType=e,this},a.prototype.serialize=function(e){return this._serializer=e,this},a.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},a.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 n=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];a.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&&~n.indexOf(e.code))return!0;if(e.timeout&&"ECONNABORTED"==e.code)return!0;if(e.crossDomain)return!0}return!1},a.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},a.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,a)=>{e?o(e):t(a)})})}return this._fullfilledPromise.then(e,t)},a.prototype["catch"]=function(e){return this.then(void 0,e)},a.prototype.use=function(e){return e(this),this},a.prototype.ok=function(e){if("function"!=typeof e)throw Error("Callback required");return this._okCallback=e,this},a.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):200<=e.status&&300>e.status)},a.prototype.get=function(e){return this._header[e.toLowerCase()]},a.prototype.getHeader=a.prototype.get,a.prototype.set=function(e,t){if(s(e)){for(const t in e)this.set(t,e[t]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},a.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},a.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(s(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},a.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)},a.prototype._auth=function(e,t,o,a){switch(o.type){case"basic":this.set("Authorization",`Basic ${a(`${e}:${t}`)}`);break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization",`Bearer ${e}`);}return this},a.prototype.withCredentials=function(e){return null==e&&(e=!0),this._withCredentials=e,this},a.prototype.redirects=function(e){return this._maxRedirects=e,this},a.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw TypeError("Invalid argument");return this._maxResponseSize=e,this},a.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},a.prototype.send=function(e){const t=s(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&&s(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)},a.prototype.sortQuery=function(e){return this._sort="undefined"==typeof e||e,this},a.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("&")}}},a.prototype._appendQueryString=()=>{console.trace("Unsupported")},a.prototype._timeoutError=function(e,t,o){if(!this._aborted){const a=new Error(`${e+t}ms exceeded`);a.timeout=t,a.code="ECONNABORTED",a.errno=o,this.timedout=!0,this.abort(),this.callback(a)}},a.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 a(e){if(e)return r(e)}function r(e){for(const t in a.prototype)e[t]=a.prototype[t];return e}const s=e("./utils");t.exports=a,a.prototype.get=function(e){return this.header[e.toLowerCase()]},a.prototype._setHeaderProperties=function(e){const t=e["content-type"]||"";this.type=s.type(t);const o=s.params(t);for(const t in o)this[t]=o[t];this.links={};try{e.link&&(this.links=s.parseLinks(e.link))}catch(e){}},a.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(/ *= */),a=o.shift(),r=o.shift();return a&&r&&(e[a]=r),e},{}),o.parseLinks=e=>e.split(/ *, */).reduce((e,t)=>{const o=t.split(/ *; */),a=o[0].slice(1,-1),r=o[1].split(/ *= */)[1].slice(1,-1);return e[r]=a,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,a){(function(t){'use strict';function a(e,t,o,a){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&a>>24,e[t+5]=255&a>>16,e[t+6]=255&a>>8,e[t+7]=255&a}function r(e,t,o,a,r){var s=0,n;for(n=0;n>>8)-1}function i(e,t,o,a){return r(e,t,o,a,16)}function l(e,t,o,a){return r(e,t,o,a,32)}function p(e,t,o,a){for(var r=255&a[0]|(255&a[1])<<8|(255&a[2])<<16|(255&a[3])<<24,s=255&o[0]|(255&o[1])<<8|(255&o[2])<<16|(255&o[3])<<24,n=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,p=255&o[12]|(255&o[13])<<8|(255&o[14])<<16|(255&o[15])<<24,d=255&a[4]|(255&a[5])<<8|(255&a[6])<<16|(255&a[7])<<24,g=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,y=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,m=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,f=255&a[8]|(255&a[9])<<8|(255&a[10])<<16|(255&a[11])<<24,A=255&o[16]|(255&o[17])<<8|(255&o[18])<<16|(255&o[19])<<24,x=255&o[20]|(255&o[21])<<8|(255&o[22])<<16|(255&o[23])<<24,v=255&o[24]|(255&o[25])<<8|(255&o[26])<<16|(255&o[27])<<24,k=255&o[28]|(255&o[29])<<8|(255&o[30])<<16|(255&o[31])<<24,w=255&a[12]|(255&a[13])<<8|(255&a[14])<<16|(255&a[15])<<24,T=r,S=s,B=n,U=l,E=p,C=d,I=g,D=h,R=y,z=m,L=f,O=A,N=x,P=v,q=k,K=w,M=0,F;20>M;M+=2)F=0|T+N,E^=F<<7|F>>>25,F=0|E+T,R^=F<<9|F>>>23,F=0|R+E,N^=F<<13|F>>>19,F=0|N+R,T^=F<<18|F>>>14,F=0|C+S,z^=F<<7|F>>>25,F=0|z+C,P^=F<<9|F>>>23,F=0|P+z,S^=F<<13|F>>>19,F=0|S+P,C^=F<<18|F>>>14,F=0|L+I,q^=F<<7|F>>>25,F=0|q+L,B^=F<<9|F>>>23,F=0|B+q,I^=F<<13|F>>>19,F=0|I+B,L^=F<<18|F>>>14,F=0|K+O,U^=F<<7|F>>>25,F=0|U+K,D^=F<<9|F>>>23,F=0|D+U,O^=F<<13|F>>>19,F=0|O+D,K^=F<<18|F>>>14,F=0|T+U,S^=F<<7|F>>>25,F=0|S+T,B^=F<<9|F>>>23,F=0|B+S,U^=F<<13|F>>>19,F=0|U+B,T^=F<<18|F>>>14,F=0|C+E,I^=F<<7|F>>>25,F=0|I+C,D^=F<<9|F>>>23,F=0|D+I,E^=F<<13|F>>>19,F=0|E+D,C^=F<<18|F>>>14,F=0|L+z,O^=F<<7|F>>>25,F=0|O+L,R^=F<<9|F>>>23,F=0|R+O,z^=F<<13|F>>>19,F=0|z+R,L^=F<<18|F>>>14,F=0|K+q,N^=F<<7|F>>>25,F=0|N+K,P^=F<<9|F>>>23,F=0|P+N,q^=F<<13|F>>>19,F=0|q+P,K^=F<<18|F>>>14;T=0|T+r,S=0|S+s,B=0|B+n,U=0|U+l,E=0|E+p,C=0|C+d,I=0|I+g,D=0|D+h,R=0|R+y,z=0|z+m,L=0|L+f,O=0|O+A,N=0|N+x,P=0|P+v,q=0|q+k,K=0|K+w,e[0]=255&T>>>0,e[1]=255&T>>>8,e[2]=255&T>>>16,e[3]=255&T>>>24,e[4]=255&S>>>0,e[5]=255&S>>>8,e[6]=255&S>>>16,e[7]=255&S>>>24,e[8]=255&B>>>0,e[9]=255&B>>>8,e[10]=255&B>>>16,e[11]=255&B>>>24,e[12]=255&U>>>0,e[13]=255&U>>>8,e[14]=255&U>>>16,e[15]=255&U>>>24,e[16]=255&E>>>0,e[17]=255&E>>>8,e[18]=255&E>>>16,e[19]=255&E>>>24,e[20]=255&C>>>0,e[21]=255&C>>>8,e[22]=255&C>>>16,e[23]=255&C>>>24,e[24]=255&I>>>0,e[25]=255&I>>>8,e[26]=255&I>>>16,e[27]=255&I>>>24,e[28]=255&D>>>0,e[29]=255&D>>>8,e[30]=255&D>>>16,e[31]=255&D>>>24,e[32]=255&R>>>0,e[33]=255&R>>>8,e[34]=255&R>>>16,e[35]=255&R>>>24,e[36]=255&z>>>0,e[37]=255&z>>>8,e[38]=255&z>>>16,e[39]=255&z>>>24,e[40]=255&L>>>0,e[41]=255&L>>>8,e[42]=255&L>>>16,e[43]=255&L>>>24,e[44]=255&O>>>0,e[45]=255&O>>>8,e[46]=255&O>>>16,e[47]=255&O>>>24,e[48]=255&N>>>0,e[49]=255&N>>>8,e[50]=255&N>>>16,e[51]=255&N>>>24,e[52]=255&P>>>0,e[53]=255&P>>>8,e[54]=255&P>>>16,e[55]=255&P>>>24,e[56]=255&q>>>0,e[57]=255&q>>>8,e[58]=255&q>>>16,e[59]=255&q>>>24,e[60]=255&K>>>0,e[61]=255&K>>>8,e[62]=255&K>>>16,e[63]=255&K>>>24}function d(e,t,o,a){for(var r=255&a[0]|(255&a[1])<<8|(255&a[2])<<16|(255&a[3])<<24,s=255&o[0]|(255&o[1])<<8|(255&o[2])<<16|(255&o[3])<<24,n=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,p=255&o[12]|(255&o[13])<<8|(255&o[14])<<16|(255&o[15])<<24,d=255&a[4]|(255&a[5])<<8|(255&a[6])<<16|(255&a[7])<<24,g=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,y=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,m=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,f=255&a[8]|(255&a[9])<<8|(255&a[10])<<16|(255&a[11])<<24,A=255&o[16]|(255&o[17])<<8|(255&o[18])<<16|(255&o[19])<<24,x=255&o[20]|(255&o[21])<<8|(255&o[22])<<16|(255&o[23])<<24,v=255&o[24]|(255&o[25])<<8|(255&o[26])<<16|(255&o[27])<<24,k=255&o[28]|(255&o[29])<<8|(255&o[30])<<16|(255&o[31])<<24,w=255&a[12]|(255&a[13])<<8|(255&a[14])<<16|(255&a[15])<<24,T=r,S=s,B=n,U=l,E=p,C=d,I=g,D=h,R=y,z=m,L=f,O=A,N=x,P=v,q=k,K=w,M=0,F;20>M;M+=2)F=0|T+N,E^=F<<7|F>>>25,F=0|E+T,R^=F<<9|F>>>23,F=0|R+E,N^=F<<13|F>>>19,F=0|N+R,T^=F<<18|F>>>14,F=0|C+S,z^=F<<7|F>>>25,F=0|z+C,P^=F<<9|F>>>23,F=0|P+z,S^=F<<13|F>>>19,F=0|S+P,C^=F<<18|F>>>14,F=0|L+I,q^=F<<7|F>>>25,F=0|q+L,B^=F<<9|F>>>23,F=0|B+q,I^=F<<13|F>>>19,F=0|I+B,L^=F<<18|F>>>14,F=0|K+O,U^=F<<7|F>>>25,F=0|U+K,D^=F<<9|F>>>23,F=0|D+U,O^=F<<13|F>>>19,F=0|O+D,K^=F<<18|F>>>14,F=0|T+U,S^=F<<7|F>>>25,F=0|S+T,B^=F<<9|F>>>23,F=0|B+S,U^=F<<13|F>>>19,F=0|U+B,T^=F<<18|F>>>14,F=0|C+E,I^=F<<7|F>>>25,F=0|I+C,D^=F<<9|F>>>23,F=0|D+I,E^=F<<13|F>>>19,F=0|E+D,C^=F<<18|F>>>14,F=0|L+z,O^=F<<7|F>>>25,F=0|O+L,R^=F<<9|F>>>23,F=0|R+O,z^=F<<13|F>>>19,F=0|z+R,L^=F<<18|F>>>14,F=0|K+q,N^=F<<7|F>>>25,F=0|N+K,P^=F<<9|F>>>23,F=0|P+N,q^=F<<13|F>>>19,F=0|q+P,K^=F<<18|F>>>14;e[0]=255&T>>>0,e[1]=255&T>>>8,e[2]=255&T>>>16,e[3]=255&T>>>24,e[4]=255&C>>>0,e[5]=255&C>>>8,e[6]=255&C>>>16,e[7]=255&C>>>24,e[8]=255&L>>>0,e[9]=255&L>>>8,e[10]=255&L>>>16,e[11]=255&L>>>24,e[12]=255&K>>>0,e[13]=255&K>>>8,e[14]=255&K>>>16,e[15]=255&K>>>24,e[16]=255&I>>>0,e[17]=255&I>>>8,e[18]=255&I>>>16,e[19]=255&I>>>24,e[20]=255&D>>>0,e[21]=255&D>>>8,e[22]=255&D>>>16,e[23]=255&D>>>24,e[24]=255&R>>>0,e[25]=255&R>>>8,e[26]=255&R>>>16,e[27]=255&R>>>24,e[28]=255&z>>>0,e[29]=255&z>>>8,e[30]=255&z>>>16,e[31]=255&z>>>24}function u(e,t,o,a){p(e,t,o,a)}function g(e,t,o,a){d(e,t,o,a)}function h(e,t,o,a,r,s,n){var l=new Uint8Array(16),p=new Uint8Array(64),d,g;for(g=0;16>g;g++)l[g]=0;for(g=0;8>g;g++)l[g]=s[g];for(;64<=r;){for(u(p,l,n,I),g=0;64>g;g++)e[t+g]=o[a+g]^p[g];for(d=1,g=8;16>g;g++)d=0|d+(255&l[g]),l[g]=255&d,d>>>=8;r-=64,t+=64,a+=64}if(0p;p++)s[p]=0;for(p=0;8>p;p++)s[p]=a[p];for(;64<=o;){for(u(n,s,r,I),p=0;64>p;p++)e[t+p]=n[p];for(l=1,p=8;16>p;p++)l=0|l+(255&s[p]),s[p]=255&l,l>>>=8;o-=64,t+=64}if(0l;l++)s[l]=a[l+16];return y(e,t,o,s,n)}function x(e,t,o,a,r,l,n){var p=new Uint8Array(32);g(p,l,n,I);for(var s=new Uint8Array(8),d=0;8>d;d++)s[d]=l[d+16];return h(e,t,o,a,r,s,p)}function v(e,t,o,a,r,n){var i=new be(n);return i.update(o,a,r),i.finish(e,t),0}function w(e,t,o,a,r,s){var n=new Uint8Array(16);return v(n,0,o,a,r,s),i(e,t,n,0)}function T(e,t,o,a,r){var s;if(32>o)return-1;for(x(e,0,t,0,o,a,r),v(e,16,e,32,o-32,e),s=0;16>s;s++)e[s]=0;return 0}function B(e,t,o,a,r){var s=new Uint8Array(32),n;if(32>o)return-1;if(f(s,0,32,a,r),0!==w(t,16,t,32,o-32,s))return-1;for(x(e,0,t,0,o,a,r),n=0;32>n;n++)e[n]=0;return 0}function U(e,t){var o;for(o=0;16>o;o++)e[o]=0|t[o]}function E(e){var t=1,o,a;for(o=0;16>o;o++)a=e[o]+t+65535,t=s(a/65536),e[o]=a-65536*t;e[0]+=t-1+37*(t-1)}function C(e,o,a){for(var r=0,s;16>r;r++)s=~(a-1)&(e[r]^o[r]),e[r]^=s,o[r]^=s}function R(e,o){var a=pe(),r=pe(),t,s,n;for(t=0;16>t;t++)r[t]=o[t];for(E(r),E(r),E(r),s=0;2>s;s++){for(a[0]=r[0]-65517,t=1;15>t;t++)a[t]=r[t]-65535-(1&a[t-1]>>16),a[t-1]&=65535;a[15]=r[15]-32767-(1&a[14]>>16),n=1&a[15]>>16,a[14]&=65535,C(r,a,1-n)}for(t=0;16>t;t++)e[2*t]=255&r[t],e[2*t+1]=r[t]>>8}function z(e,t){var o=new Uint8Array(32),a=new Uint8Array(32);return R(o,e),R(a,t),l(o,0,a,0)}function O(e){var t=new Uint8Array(32);return R(t,e),1&t[0]}function N(e,t){var o;for(o=0;16>o;o++)e[o]=t[2*o]+(t[2*o+1]<<8);e[15]&=32767}function P(e,t,o){for(var a=0;16>a;a++)e[a]=t[a]+o[a]}function n(e,t,o){for(var a=0;16>a;a++)e[a]=t[a]-o[a]}function m(e,t,o){var a=0,r=0,n=0,i=0,l=0,p=0,d=0,u=0,g=0,h=0,y=0,m=0,f=0,A=0,x=0,k=0,w=0,T=0,S=0,B=0,U=0,E=0,C=0,I=0,D=0,R=0,z=0,L=0,O=0,N=0,P=0,q=o[0],K=o[1],M=o[2],F=o[3],j=o[4],G=o[5],H=o[6],V=o[7],W=o[8],Y=o[9],X=o[10],J=o[11],Z=o[12],Q=o[13],$=o[14],ee=o[15],te,oe;te=t[0],a+=te*q,r+=te*K,n+=te*M,i+=te*F,l+=te*j,p+=te*G,d+=te*H,u+=te*V,g+=te*W,h+=te*Y,y+=te*X,m+=te*J,f+=te*Z,A+=te*Q,x+=te*$,k+=te*ee,te=t[1],r+=te*q,n+=te*K,i+=te*M,l+=te*F,p+=te*j,d+=te*G,u+=te*H,g+=te*V,h+=te*W,y+=te*Y,m+=te*X,f+=te*J,A+=te*Z,x+=te*Q,k+=te*$,w+=te*ee,te=t[2],n+=te*q,i+=te*K,l+=te*M,p+=te*F,d+=te*j,u+=te*G,g+=te*H,h+=te*V,y+=te*W,m+=te*Y,f+=te*X,A+=te*J,x+=te*Z,k+=te*Q,w+=te*$,T+=te*ee,te=t[3],i+=te*q,l+=te*K,p+=te*M,d+=te*F,u+=te*j,g+=te*G,h+=te*H,y+=te*V,m+=te*W,f+=te*Y,A+=te*X,x+=te*J,k+=te*Z,w+=te*Q,T+=te*$,S+=te*ee,te=t[4],l+=te*q,p+=te*K,d+=te*M,u+=te*F,g+=te*j,h+=te*G,y+=te*H,m+=te*V,f+=te*W,A+=te*Y,x+=te*X,k+=te*J,w+=te*Z,T+=te*Q,S+=te*$,B+=te*ee,te=t[5],p+=te*q,d+=te*K,u+=te*M,g+=te*F,h+=te*j,y+=te*G,m+=te*H,f+=te*V,A+=te*W,x+=te*Y,k+=te*X,w+=te*J,T+=te*Z,S+=te*Q,B+=te*$,U+=te*ee,te=t[6],d+=te*q,u+=te*K,g+=te*M,h+=te*F,y+=te*j,m+=te*G,f+=te*H,A+=te*V,x+=te*W,k+=te*Y,w+=te*X,T+=te*J,S+=te*Z,B+=te*Q,U+=te*$,E+=te*ee,te=t[7],u+=te*q,g+=te*K,h+=te*M,y+=te*F,m+=te*j,f+=te*G,A+=te*H,x+=te*V,k+=te*W,w+=te*Y,T+=te*X,S+=te*J,B+=te*Z,U+=te*Q,E+=te*$,C+=te*ee,te=t[8],g+=te*q,h+=te*K,y+=te*M,m+=te*F,f+=te*j,A+=te*G,x+=te*H,k+=te*V,w+=te*W,T+=te*Y,S+=te*X,B+=te*J,U+=te*Z,E+=te*Q,C+=te*$,I+=te*ee,te=t[9],h+=te*q,y+=te*K,m+=te*M,f+=te*F,A+=te*j,x+=te*G,k+=te*H,w+=te*V,T+=te*W,S+=te*Y,B+=te*X,U+=te*J,E+=te*Z,C+=te*Q,I+=te*$,D+=te*ee,te=t[10],y+=te*q,m+=te*K,f+=te*M,A+=te*F,x+=te*j,k+=te*G,w+=te*H,T+=te*V,S+=te*W,B+=te*Y,U+=te*X,E+=te*J,C+=te*Z,I+=te*Q,D+=te*$,R+=te*ee,te=t[11],m+=te*q,f+=te*K,A+=te*M,x+=te*F,k+=te*j,w+=te*G,T+=te*H,S+=te*V,B+=te*W,U+=te*Y,E+=te*X,C+=te*J,I+=te*Z,D+=te*Q,R+=te*$,z+=te*ee,te=t[12],f+=te*q,A+=te*K,x+=te*M,k+=te*F,w+=te*j,T+=te*G,S+=te*H,B+=te*V,U+=te*W,E+=te*Y,C+=te*X,I+=te*J,D+=te*Z,R+=te*Q,z+=te*$,L+=te*ee,te=t[13],A+=te*q,x+=te*K,k+=te*M,w+=te*F,T+=te*j,S+=te*G,B+=te*H,U+=te*V,E+=te*W,C+=te*Y,I+=te*X,D+=te*J,R+=te*Z,z+=te*Q,L+=te*$,O+=te*ee,te=t[14],x+=te*q,k+=te*K,w+=te*M,T+=te*F,S+=te*j,B+=te*G,U+=te*H,E+=te*V,C+=te*W,I+=te*Y,D+=te*X,R+=te*J,z+=te*Z,L+=te*Q,O+=te*$,N+=te*ee,te=t[15],k+=te*q,w+=te*K,T+=te*M,S+=te*F,B+=te*j,U+=te*G,E+=te*H,C+=te*V,I+=te*W,D+=te*Y,R+=te*X,z+=te*J,L+=te*Z,O+=te*Q,N+=te*$,P+=te*ee,a+=38*w,r+=38*T,n+=38*S,i+=38*B,l+=38*U,p+=38*E,d+=38*C,u+=38*I,g+=38*D,h+=38*R,y+=38*z,m+=38*L,f+=38*O,A+=38*N,x+=38*P,oe=1,te=a+oe+65535,oe=s(te/65536),a=te-65536*oe,te=r+oe+65535,oe=s(te/65536),r=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=p+oe+65535,oe=s(te/65536),p=te-65536*oe,te=d+oe+65535,oe=s(te/65536),d=te-65536*oe,te=u+oe+65535,oe=s(te/65536),u=te-65536*oe,te=g+oe+65535,oe=s(te/65536),g=te-65536*oe,te=h+oe+65535,oe=s(te/65536),h=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=f+oe+65535,oe=s(te/65536),f=te-65536*oe,te=A+oe+65535,oe=s(te/65536),A=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,a+=oe-1+37*(oe-1),oe=1,te=a+oe+65535,oe=s(te/65536),a=te-65536*oe,te=r+oe+65535,oe=s(te/65536),r=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=p+oe+65535,oe=s(te/65536),p=te-65536*oe,te=d+oe+65535,oe=s(te/65536),d=te-65536*oe,te=u+oe+65535,oe=s(te/65536),u=te-65536*oe,te=g+oe+65535,oe=s(te/65536),g=te-65536*oe,te=h+oe+65535,oe=s(te/65536),h=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=f+oe+65535,oe=s(te/65536),f=te-65536*oe,te=A+oe+65535,oe=s(te/65536),A=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,a+=oe-1+37*(oe-1),e[0]=a,e[1]=r,e[2]=n,e[3]=i,e[4]=l,e[5]=p,e[6]=d,e[7]=u,e[8]=g,e[9]=h,e[10]=y,e[11]=m,e[12]=f,e[13]=A,e[14]=x,e[15]=k}function A(e,t){m(e,t,t)}function k(e,t){var o=pe(),r;for(r=0;16>r;r++)o[r]=t[r];for(r=253;0<=r;r--)A(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=pe(),r;for(r=0;16>r;r++)o[r]=t[r];for(r=250;0<=r;r--)A(o,o),1!==r&&m(o,o,t);for(r=0;16>r;r++)e[r]=o[r]}function M(t,o,s){var l=new Uint8Array(32),p=new Float64Array(80),u=pe(),a=pe(),g=pe(),h=pe(),d=pe(),e=pe(),y,f;for(f=0;31>f;f++)l[f]=o[f];for(l[31]=64|127&o[31],l[0]&=248,N(p,s),f=0;16>f;f++)a[f]=p[f],h[f]=u[f]=g[f]=0;for(u[0]=h[0]=1,f=254;0<=f;--f)y=1&l[f>>>3]>>>(7&f),C(u,a,y),C(g,h,y),P(d,u,g),n(u,u,g),P(g,a,h),n(a,a,h),A(h,d),A(e,u),m(u,g,u),m(g,a,d),P(d,u,g),n(u,u,g),A(a,u),n(g,h,e),m(u,g,ye),P(u,u,h),m(g,g,u),m(u,h,e),m(h,a,p),A(a,d),C(u,a,y),C(g,h,y);for(f=0;16>f;f++)p[f+16]=u[f],p[f+32]=g[f],p[f+48]=a[f],p[f+64]=h[f];var x=p.subarray(32),v=p.subarray(16);return k(x,x),m(v,v,x),R(t,v),0}function F(e,t){return M(e,t,ue)}function j(e,t){return q(t,32),F(e,t)}function G(e,t,o){var a=new Uint8Array(32);return M(a,o,t),g(e,de,a,I)}function H(e,t,o,r){for(var s=new Int32Array(16),p=new Int32Array(16),u=e[0],g=e[1],y=e[2],m=e[3],f=e[4],A=e[5],x=e[6],v=e[7],k=t[0],w=t[1],T=t[2],S=t[3],B=t[4],U=t[5],E=t[6],C=t[7],I=0,D,R,z,L,O,N,P,q,K,M,F,G,H,V,W,Y,X,J,Z,Q,$,ee,te,oe,ae,re;128<=r;){for(Z=0;16>Z;Z++)Q=8*Z+I,s[Z]=o[Q+0]<<24|o[Q+1]<<16|o[Q+2]<<8|o[Q+3],p[Z]=o[Q+4]<<24|o[Q+5]<<16|o[Q+6]<<8|o[Q+7];for(Z=0;80>Z;Z++)if(D=u,R=g,z=y,L=m,O=f,N=A,P=x,q=v,K=k,M=w,F=T,G=S,H=B,V=U,W=E,Y=C,$=v,ee=C,te=65535&ee,oe=ee>>>16,ae=65535&$,re=$>>>16,$=(f>>>14|B<<18)^(f>>>18|B<<14)^(B>>>9|f<<23),ee=(B>>>14|f<<18)^(B>>>18|f<<14)^(f>>>9|B<<23),te+=65535&ee,oe+=ee>>>16,ae+=65535&$,re+=$>>>16,$=f&A^~f&x,ee=B&U^~B&E,te+=65535&ee,oe+=ee>>>16,ae+=65535&$,re+=$>>>16,$=xe[2*Z],ee=xe[2*Z+1],te+=65535&ee,oe+=ee>>>16,ae+=65535&$,re+=$>>>16,$=s[Z%16],ee=p[Z%16],te+=65535&ee,oe+=ee>>>16,ae+=65535&$,re+=$>>>16,oe+=te>>>16,ae+=oe>>>16,re+=ae>>>16,X=65535&ae|re<<16,J=65535&te|oe<<16,$=X,ee=J,te=65535&ee,oe=ee>>>16,ae=65535&$,re=$>>>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,ae+=65535&$,re+=$>>>16,$=u&g^u&y^g&y,ee=k&w^k&T^w&T,te+=65535&ee,oe+=ee>>>16,ae+=65535&$,re+=$>>>16,oe+=te>>>16,ae+=oe>>>16,re+=ae>>>16,q=65535&ae|re<<16,Y=65535&te|oe<<16,$=L,ee=G,te=65535&ee,oe=ee>>>16,ae=65535&$,re=$>>>16,$=X,ee=J,te+=65535&ee,oe+=ee>>>16,ae+=65535&$,re+=$>>>16,oe+=te>>>16,ae+=oe>>>16,re+=ae>>>16,L=65535&ae|re<<16,G=65535&te|oe<<16,g=D,y=R,m=z,f=L,A=O,x=N,v=P,u=q,w=K,T=M,S=F,B=G,U=H,E=V,C=W,k=Y,15==Z%16)for(Q=0;16>Q;Q++)$=s[Q],ee=p[Q],te=65535&ee,oe=ee>>>16,ae=65535&$,re=$>>>16,$=s[(Q+9)%16],ee=p[(Q+9)%16],te+=65535&ee,oe+=ee>>>16,ae+=65535&$,re+=$>>>16,X=s[(Q+1)%16],J=p[(Q+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,ae+=65535&$,re+=$>>>16,X=s[(Q+14)%16],J=p[(Q+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,ae+=65535&$,re+=$>>>16,oe+=te>>>16,ae+=oe>>>16,re+=ae>>>16,s[Q]=65535&ae|re<<16,p[Q]=65535&te|oe<<16;$=u,ee=k,te=65535&ee,oe=ee>>>16,ae=65535&$,re=$>>>16,$=e[0],ee=t[0],te+=65535&ee,oe+=ee>>>16,ae+=65535&$,re+=$>>>16,oe+=te>>>16,ae+=oe>>>16,re+=ae>>>16,e[0]=u=65535&ae|re<<16,t[0]=k=65535&te|oe<<16,$=g,ee=w,te=65535&ee,oe=ee>>>16,ae=65535&$,re=$>>>16,$=e[1],ee=t[1],te+=65535&ee,oe+=ee>>>16,ae+=65535&$,re+=$>>>16,oe+=te>>>16,ae+=oe>>>16,re+=ae>>>16,e[1]=g=65535&ae|re<<16,t[1]=w=65535&te|oe<<16,$=y,ee=T,te=65535&ee,oe=ee>>>16,ae=65535&$,re=$>>>16,$=e[2],ee=t[2],te+=65535&ee,oe+=ee>>>16,ae+=65535&$,re+=$>>>16,oe+=te>>>16,ae+=oe>>>16,re+=ae>>>16,e[2]=y=65535&ae|re<<16,t[2]=T=65535&te|oe<<16,$=m,ee=S,te=65535&ee,oe=ee>>>16,ae=65535&$,re=$>>>16,$=e[3],ee=t[3],te+=65535&ee,oe+=ee>>>16,ae+=65535&$,re+=$>>>16,oe+=te>>>16,ae+=oe>>>16,re+=ae>>>16,e[3]=m=65535&ae|re<<16,t[3]=S=65535&te|oe<<16,$=f,ee=B,te=65535&ee,oe=ee>>>16,ae=65535&$,re=$>>>16,$=e[4],ee=t[4],te+=65535&ee,oe+=ee>>>16,ae+=65535&$,re+=$>>>16,oe+=te>>>16,ae+=oe>>>16,re+=ae>>>16,e[4]=f=65535&ae|re<<16,t[4]=B=65535&te|oe<<16,$=A,ee=U,te=65535&ee,oe=ee>>>16,ae=65535&$,re=$>>>16,$=e[5],ee=t[5],te+=65535&ee,oe+=ee>>>16,ae+=65535&$,re+=$>>>16,oe+=te>>>16,ae+=oe>>>16,re+=ae>>>16,e[5]=A=65535&ae|re<<16,t[5]=U=65535&te|oe<<16,$=x,ee=E,te=65535&ee,oe=ee>>>16,ae=65535&$,re=$>>>16,$=e[6],ee=t[6],te+=65535&ee,oe+=ee>>>16,ae+=65535&$,re+=$>>>16,oe+=te>>>16,ae+=oe>>>16,re+=ae>>>16,e[6]=x=65535&ae|re<<16,t[6]=E=65535&te|oe<<16,$=v,ee=C,te=65535&ee,oe=ee>>>16,ae=65535&$,re=$>>>16,$=e[7],ee=t[7],te+=65535&ee,oe+=ee>>>16,ae+=65535&$,re+=$>>>16,oe+=te>>>16,ae+=oe>>>16,re+=ae>>>16,e[7]=v=65535&ae|re<<16,t[7]=C=65535&te|oe<<16,I+=128,r-=128}return r}function V(e,t,o){var r=new Int32Array(8),s=new Int32Array(8),l=new Uint8Array(256),p=o,d;for(r[0]=1779033703,r[1]=3144134277,r[2]=1013904242,r[3]=2773480762,r[4]=1359893119,r[5]=2600822924,r[6]=528734635,r[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,H(r,s,t,o),o%=128,d=0;do?1:0),l[o-9]=0,a(l,o-8,0|p/536870912,p<<3),H(r,s,l,o),d=0;8>d;d++)a(e,8*d,r[d],s[d]);return 0}function W(o,r){var s=pe(),a=pe(),i=pe(),l=pe(),p=pe(),e=pe(),d=pe(),u=pe(),g=pe();n(s,o[1],o[0]),n(g,r[1],r[0]),m(s,s,g),P(a,o[0],o[1]),P(g,r[0],r[1]),m(a,a,g),m(i,o[3],r[3]),m(i,i,D),m(l,o[2],r[2]),P(l,l,l),n(p,a,s),n(e,l,i),P(d,l,i),P(u,a,s),m(o[0],p,e),m(o[1],u,d),m(o[2],d,e),m(o[3],p,u)}function J(e,t,o){var a;for(a=0;4>a;a++)C(e[a],t[a],o)}function Z(e,t){var o=pe(),a=pe(),r=pe();k(r,t[2]),m(o,t[0],r),m(a,t[1],r),R(e,a),e[31]^=O(o)<<7}function Q(e,t,o){var a,r;for(U(e[0],ge),U(e[1],he),U(e[2],he),U(e[3],ge),r=255;0<=r;--r)a=1&o[0|r/8]>>(7&r),J(e,t,a),W(t,e),W(e,e),J(e,t,a)}function $(e,t){var o=[pe(),pe(),pe(),pe()];U(o[0],fe),U(o[1],X),U(o[2],he),m(o[3],fe,X),Q(e,o,t)}function ee(e,t,o){var a=new Uint8Array(64),r=[pe(),pe(),pe(),pe()],s;for(o||q(t,32),V(a,t,32),a[0]&=248,a[31]&=127,a[31]|=64,$(r,a),Z(e,r),s=0;32>s;s++)t[s+32]=e[s];return 0}function te(e,t){var o,a,r,s;for(a=63;32<=a;--a){for(o=0,r=a-32,s=a-12;r>8,t[r]-=256*o;t[r]+=o,t[a]=0}for(o=0,r=0;32>r;r++)t[r]+=o-(t[31]>>4)*K[r],o=t[r]>>8,t[r]&=255;for(r=0;32>r;r++)t[r]-=o*K[r];for(a=0;32>a;a++)t[a+1]+=t[a]>>8,e[a]=255&t[a]}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 ae(e,t,o,a){var s=new Uint8Array(64),n=new Uint8Array(64),l=new Uint8Array(64),r=new Float64Array(64),d=[pe(),pe(),pe(),pe()],p,u;V(s,a,32),s[0]&=248,s[31]&=127,s[31]|=64;for(p=0;pp;p++)e[32+p]=s[32+p];for(V(l,e.subarray(32),o+32),oe(l),$(d,l),Z(e,d),p=32;64>p;p++)e[p]=a[p];for(V(n,e,o+64),oe(n),p=0;64>p;p++)r[p]=0;for(p=0;32>p;p++)r[p]=l[p];for(p=0;32>p;p++)for(u=0;32>u;u++)r[p+u]+=n[p]*s[u];return te(e.subarray(32),r),o+64}function re(e,o){var a=pe(),t=pe(),r=pe(),s=pe(),i=pe(),l=pe(),p=pe();return(U(e[2],he),N(e[1],o),A(r,e[1]),m(s,r,me),n(r,r,e[2]),P(s,e[2],s),A(i,s),A(l,i),m(p,l,i),m(a,p,r),m(a,a,s),S(a,a),m(a,a,r),m(a,a,s),m(a,a,s),m(e[0],a,s),A(t,e[0]),m(t,t,s),z(t,r)&&m(e[0],e[0],Y),A(t,e[0]),m(t,t,s),z(t,r))?-1:(O(e[0])===o[31]>>7&&n(e[0],ge,e[0]),m(e[3],e[0],e[1]),0)}function se(e,o,a,r){var s=new Uint8Array(32),t=new Uint8Array(64),d=[pe(),pe(),pe(),pe()],p=[pe(),pe(),pe(),pe()],u,g;if(g=-1,64>a)return-1;if(re(p,r))return-1;for(u=0;uu;u++)e[u+32]=r[u];if(V(t,e,a),oe(t),Q(d,p,t),$(p,o.subarray(32)),W(d,p),Z(s,d),a-=64,l(o,0,s,0)){for(u=0;u>>13|o<<3),a=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(o>>>10|a<<6),r=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(a>>>7|r<<9),s=255&e[8]|(255&e[9])<<8,this.r[4]=255&(r>>>4|s<<12),this.r[5]=8190&s>>>1,n=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(s>>>14|n<<2),i=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(n>>>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};be.prototype.blocks=function(e,t,o){for(var a=this.fin?0:2048,r=this.h[0],s=this.h[1],n=this.h[2],i=this.h[3],l=this.h[4],p=this.h[5],d=this.h[6],u=this.h[7],g=this.h[8],h=this.h[9],y=this.r[0],m=this.r[1],f=this.r[2],A=this.r[3],x=this.r[4],v=this.r[5],k=this.r[6],w=this.r[7],T=this.r[8],S=this.r[9],B,U,E,C,I,D,R,z,L,O,N,P,q,K,M,F,j,G,H;16<=o;)B=255&e[t+0]|(255&e[t+1])<<8,r+=8191&B,U=255&e[t+2]|(255&e[t+3])<<8,s+=8191&(B>>>13|U<<3),E=255&e[t+4]|(255&e[t+5])<<8,n+=8191&(U>>>10|E<<6),C=255&e[t+6]|(255&e[t+7])<<8,i+=8191&(E>>>7|C<<9),I=255&e[t+8]|(255&e[t+9])<<8,l+=8191&(C>>>4|I<<12),p+=8191&I>>>1,D=255&e[t+10]|(255&e[t+11])<<8,d+=8191&(I>>>14|D<<2),R=255&e[t+12]|(255&e[t+13])<<8,u+=8191&(D>>>11|R<<5),z=255&e[t+14]|(255&e[t+15])<<8,g+=8191&(R>>>8|z<<8),h+=z>>>5|a,L=0,O=L,O+=r*y,O+=s*(5*S),O+=n*(5*T),O+=i*(5*w),O+=l*(5*k),L=O>>>13,O&=8191,O+=p*(5*v),O+=d*(5*x),O+=u*(5*A),O+=g*(5*f),O+=h*(5*m),L+=O>>>13,O&=8191,N=L,N+=r*m,N+=s*y,N+=n*(5*S),N+=i*(5*T),N+=l*(5*w),L=N>>>13,N&=8191,N+=p*(5*k),N+=d*(5*v),N+=u*(5*x),N+=g*(5*A),N+=h*(5*f),L+=N>>>13,N&=8191,P=L,P+=r*f,P+=s*m,P+=n*y,P+=i*(5*S),P+=l*(5*T),L=P>>>13,P&=8191,P+=p*(5*w),P+=d*(5*k),P+=u*(5*v),P+=g*(5*x),P+=h*(5*A),L+=P>>>13,P&=8191,q=L,q+=r*A,q+=s*f,q+=n*m,q+=i*y,q+=l*(5*S),L=q>>>13,q&=8191,q+=p*(5*T),q+=d*(5*w),q+=u*(5*k),q+=g*(5*v),q+=h*(5*x),L+=q>>>13,q&=8191,K=L,K+=r*x,K+=s*A,K+=n*f,K+=i*m,K+=l*y,L=K>>>13,K&=8191,K+=p*(5*S),K+=d*(5*T),K+=u*(5*w),K+=g*(5*k),K+=h*(5*v),L+=K>>>13,K&=8191,M=L,M+=r*v,M+=s*x,M+=n*A,M+=i*f,M+=l*m,L=M>>>13,M&=8191,M+=p*y,M+=d*(5*S),M+=u*(5*T),M+=g*(5*w),M+=h*(5*k),L+=M>>>13,M&=8191,F=L,F+=r*k,F+=s*v,F+=n*x,F+=i*A,F+=l*f,L=F>>>13,F&=8191,F+=p*m,F+=d*y,F+=u*(5*S),F+=g*(5*T),F+=h*(5*w),L+=F>>>13,F&=8191,j=L,j+=r*w,j+=s*k,j+=n*v,j+=i*x,j+=l*A,L=j>>>13,j&=8191,j+=p*f,j+=d*m,j+=u*y,j+=g*(5*S),j+=h*(5*T),L+=j>>>13,j&=8191,G=L,G+=r*T,G+=s*w,G+=n*k,G+=i*v,G+=l*x,L=G>>>13,G&=8191,G+=p*A,G+=d*f,G+=u*m,G+=g*y,G+=h*(5*S),L+=G>>>13,G&=8191,H=L,H+=r*S,H+=s*T,H+=n*w,H+=i*k,H+=l*v,L=H>>>13,H&=8191,H+=p*x,H+=d*A,H+=u*f,H+=g*m,H+=h*y,L+=H>>>13,H&=8191,L=0|(L<<2)+L,L=0|L+O,O=8191&L,L>>>=13,N+=L,r=O,s=N,n=P,i=q,l=K,p=M,d=F,u=j,g=G,h=H,t+=16,o-=16;this.h[0]=r,this.h[1]=s,this.h[2]=n,this.h[3]=i,this.h[4]=l,this.h[5]=p,this.h[6]=d,this.h[7]=u,this.h[8]=g,this.h[9]=h},be.prototype.finish=function(e,t){var o=new Uint16Array(10),a,r,s,n;if(this.leftover){for(n=this.leftover,this.buffer[n++]=1;16>n;n++)this.buffer[n]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(a=this.h[1]>>>13,this.h[1]&=8191,n=2;10>n;n++)this.h[n]+=a,a=this.h[n]>>>13,this.h[n]&=8191;for(this.h[0]+=5*a,a=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=a,a=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=a,o[0]=this.h[0]+5,a=o[0]>>>13,o[0]&=8191,n=1;10>n;n++)o[n]=this.h[n]+a,a=o[n]>>>13,o[n]&=8191;for(o[9]-=8192,r=(1^a)-1,n=0;10>n;n++)o[n]&=r;for(r=~r,n=0;10>n;n++)this.h[n]=this.h[n]&r|o[n];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),s=this.h[0]+this.pad[0],this.h[0]=65535&s,n=1;8>n;n++)s=0|(0|this.h[n]+this.pad[n])+(s>>>16),this.h[n]=65535&s;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},be.prototype.update=function(e,t,o){var a,r;if(this.leftover){for(r=16-this.leftover,r>o&&(r=o),a=0;athis.leftover)return;this.blocks(this.buffer,0,16),this.leftover=0}if(16<=o&&(r=o-o%16,this.blocks(e,t,r),t+=r,o-=r),o){for(a=0;aa.length?null:0===B(r,a,a.length,t,o)?r.subarray(ke):null},t.secretbox.keyLength=L,t.secretbox.nonceLength=ve,t.secretbox.overheadLength=we,t.scalarMult=function(e,t){if(le(e,t),e.length!==Te)throw new Error("bad n size");if(t.length!==_e)throw new Error("bad p size");var o=new Uint8Array(_e);return M(o,e,t),o},t.scalarMult.base=function(e){if(le(e),e.length!==Te)throw new Error("bad n size");var t=new Uint8Array(_e);return F(t,e),t},t.scalarMult.scalarLength=Te,t.scalarMult.groupElementLength=_e,t.box=function(e,o,a,r){var s=t.box.before(a,r);return t.secretbox(e,o,s)},t.box.before=function(e,t){le(e,t),ie(e,t);var o=new Uint8Array(Ue);return G(o,e,t),o},t.box.after=t.secretbox,t.box.open=function(e,o,a,r){var s=t.box.before(a,r);return t.secretbox.open(e,o,s)},t.box.open.after=t.secretbox.open,t.box.keyPair=function(){var e=new Uint8Array(Se),t=new Uint8Array(Be);return j(e,t),{publicKey:e,secretKey:t}},t.box.keyPair.fromSecretKey=function(e){if(le(e),e.length!==Be)throw new Error("bad secret key size");var t=new Uint8Array(Se);return F(t,e),{publicKey:t,secretKey:new Uint8Array(e)}},t.box.publicKeyLength=Se,t.box.secretKeyLength=Be,t.box.sharedKeyLength=Ue,t.box.nonceLength=Ee,t.box.overheadLength=t.secretbox.overheadLength,t.sign=function(e,t){if(le(e,t),t.length!==De)throw new Error("bad secret key size");var o=new Uint8Array(Ce+e.length);return ae(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),a=se(o,e,e.length,t);if(0>a)return null;for(var r=new Uint8Array(a),s=0;sa;a++)o[a]=e[a];return ee(t,o,!0),{publicKey:t,secretKey:o}},t.sign.publicKeyLength=Ie,t.sign.secretKeyLength=De,t.sign.seedLength=Re,t.sign.signatureLength=Ce,t.hash=function(e){le(e);var t=new Uint8Array(ze);return V(t,e,e.length),t},t.hash.hashLength=ze,t.verify=function(e,t){return le(e,t),0!==e.length&&0!==t.length&&e.length===t.length&&0===r(e,0,t,0,e.length)},t.setPRNG=function(e){q=e},function(){var a="undefined"==typeof self?null:self.crypto||self.msCrypto;if(a&&a.getRandomValues){t.setPRNG(function(e,t){var r=new Uint8Array(t),s;for(s=0;st)throw Error("Bid amount must be positive and 2^53-1");if(!a(n)||0>n)throw Error("BidID must be positive and 2^53-1");if(!a(l)||0>l)throw Error("auctionID must be positive");Object.assign(this,{bidderKey:e,auctionKey:i,bidAmount:t,maxPrice:s,bidID:n,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=s.encode(this.get_obj_for_encoding()),a=o.from(i.concatArrays(this.tag,t)),r=n.sign(a,e);let l={sig:o.from(r),bid:this.get_obj_for_encoding()};return new Uint8Array(s.encode({t:"b",b:l}))}}}}).call(this,e("buffer").Buffer)},{"./encoding/address":58,"./encoding/encoding":59,"./nacl/naclWrappers":67,"./utils/utils":69,buffer:8}],23:[function(t,o,a){(function(a){const r=t("./client");o.exports={Algod:function(t="",o="http://r2.algorand.network",s=4180,n={}){function l(e){return void 0===e.noteb64||null===e.noteb64||(e.note=a.from(e.noteb64,"base64")),e}function p(e){let t=e;return Object.keys(t).every(e=>"content-type"!==e.toLowerCase())&&(t={...e},t["Content-Type"]="application/x-binary"),t}let d=t;"string"==typeof d&&(d={"X-Algo-API-Token":d});let u=new r.HTTPClient(d,o,s,n);this.status=async function(e={}){let t=await u.get("/v1/status",{},e);return t.body},this.healthCheck=async function(e={}){let t=await u.get("/health",{},e);return t.body},this.statusAfterBlock=async function(t,o={}){if(!e(t))throw Error("roundNumber should be an integer");let a=await u.get("/v1/status/wait-for-block-after/"+t,{},o);return a.body},this.pendingTransactions=async function(t,o={}){if(!e(t))throw Error("maxTxns should be an integer");let a=await u.get("/v1/transactions/pending",{max:t},o);if(200===a.statusCode&&a.body.truncatedTxns.transactions!==void 0)for(let e=0;eArray.from(e)));let s=await u.post("/v1/transactions",a.from(r),o);return s.body},this.getTransactionParams=async function(e={}){let t=await u.get("/v1/transactions/params",{},e);return t.body},this.suggestParams=async function(e={}){let t=await this.getTransactionParams(e);return{flatFee:!1,fee:t.fee,firstRound:t.lastRound,lastRound:t.lastRound+1e3,genesisID:t.genesisID,genesisHash:t.genesishashb64}},this.block=async function(t,o={}){if(!e(t))throw Error("roundNumber should be an integer");let a=await u.get("/v1/block/"+t,{},o);if(200===a.statusCode&&a.body.txns.transactions!==void 0)for(let e=0;e"content-type"!==e.toLowerCase())&&(t={...e},t["Content-Type"]="text/plain"),t}async do(t={}){let o=this.setHeaders(t),a=await this.c.post("/v2/teal/compile",e.from(this.source),o);return a.body}}}}).call(this,e("buffer").Buffer)},{buffer:8}],30:[function(e,t,o){(function(o){const a=e("../../../encoding/encoding");t.exports={Dryrun:class{constructor(e,t){this.c=e,this.blob=a.encode(t.get_obj_for_encoding())}setHeaders(e){let t=e;return Object.keys(t).every(e=>"content-type"!==e.toLowerCase())&&(t={...e},t["Content-Type"]="application/msgpack"),t}async do(e={}){let t=this.setHeaders(e),a=await this.c.post("/v2/teal/dryrun",o.from(this.blob),t);return a.body}}}}).call(this,e("buffer").Buffer)},{"../../../encoding/encoding":59,buffer:8}],31:[function(e,t,o){t.exports={GetApplicationByID:class{constructor(e,t){this.c=e,this.index=t,this.query={}}async do(e={}){let t=await this.c.get("/v2/applications/"+this.index,this.query,e);return t.body}}}},{}],32:[function(e,t,o){t.exports={GetAssetByID:class{constructor(e,t){this.c=e,this.index=t,this.query={}}async do(e={}){let t=await this.c.get("/v2/assets/"+this.index,this.query,e);return t.body}}}},{}],33:[function(e,t,o){t.exports={HealthCheck:class{constructor(e){this.c=e}async do(e={}){let t=await this.c.get("/health",{},e);return t.body}}}},{}],34:[function(e,t,o){t.exports={BaseModel:class{_is_primitive(e){return e==null||null==e||"object"!=typeof e&&"function"!=typeof e}_is_address(e){return e.publicKey!==void 0&&e.checksum!==void 0}_get_obj_for_encoding(e){let t;if("function"==typeof e.get_obj_for_encoding)t=e.get_obj_for_encoding();else if(e instanceof Array){t=[];for(const o of e)t.push(this._get_obj_for_encoding(o))}else if("object"==typeof e){const o={};for(const t of Object.keys(e))o[t]=this._get_obj_for_encoding(e[t]);t=o}else if(this._is_primitive(e))t=e;else throw new Error("Unsupported value: "+(e+""));return t}get_obj_for_encoding(){const e={};for(const t of Object.keys(this)){if("attribute_map"==t)continue;const o=this[t];if(void 0===o)continue;const a=this.attribute_map[t];e[a]=null===o?null:this._get_obj_for_encoding(o)}return e}}}},{}],35:[function(e,t,o){const a=e("./base");class DryrunRequest extends a.BaseModel{constructor({txns:e,accounts:t,apps:o,protocolVersion:a,round:r,latestTimestamp:s,sources:n}){super(),this.txns=e,this.accounts=t,this.apps=o,this.protocolVersion=a,this.round=r,this.latestTimestamp=s,this.sources=n,this.attribute_map={txns:"txns",accounts:"accounts",apps:"apps",protocolVersion:"protocol-version",round:"round",latestTimestamp:"latest-timestamp",sources:"sources"}}}class DryrunSource extends a.BaseModel{constructor(e,t,o,a){super(),this.fieldName=e,this.source=t,this.txnIndex=o,this.appIndex=a,this.attribute_map={fieldName:"field-name",source:"source",txnIndex:"txn-index",appIndex:"app-index"}}}class Application extends a.BaseModel{constructor(e,t){super(),this.id=e,this.params=t,this.attribute_map={id:"id",params:"params"}}}class ApplicationParams extends a.BaseModel{constructor({creator:e,approvalProgram:t,clearStateProgram:o,localStateSchema:a,globalStateSchema:r,globalState:s}){super(),this.creator=e,this.approvalProgram=t,this.clearStateProgram=o,this.localStateSchema=a,this.globalStateSchema=r,this.globalState=s,this.attribute_map={creator:"creator",approvalProgram:"approval-program",clearStateProgram:"clear-state-program",localStateSchema:"local-state-schema",globalStateSchema:"global-state-schema",globalState:"global-state"}}}class ApplicationStateSchema extends a.BaseModel{constructor(e,t){super(),this.numUint=e,this.numByteSlice=t,this.attribute_map={numUint:"num-uint",numByteSlice:"num-byte-slice"}}}class ApplicationLocalStates extends a.BaseModel{constructor(e,t){super(),this.id=e,this.state=t,this.attribute_map={id:"id",state:"state"}}}class ApplicationLocalState extends a.BaseModel{constructor(e,t){super(),this.schema=e,this.keyValue=t,this.attribute_map={schema:"schema",keyValue:"key-value"}}}class TealKeyValue extends a.BaseModel{constructor(e,t){super(),this.key=e,this.value=t,this.attribute_map={key:"key",value:"value"}}}class TealValue extends a.BaseModel{constructor(e,t,o){super(),this.type=e,this.bytes=t,this.uint=o,this.attribute_map={type:"type",bytes:"bytes",uint:"uint"}}}class AssetHolding extends a.BaseModel{constructor(e,t,o,a){this.amount=e,this.assetId=t,this.creator=o,this.isFrozen=a,this.attribute_map={amount:"amount",assetId:"asset-id",creator:"creator",isFrozen:"is-frozen"}}}class Asset extends a.BaseModel{constructor(e,t){this.amount=e,this.assetId=t,this.attribute_map={index:"index",params:"params"}}}class AssetParams extends a.BaseModel{constructor({clawback:e,creator:t,decimals:o,defaultFrozen:a,freeze:r,manager:s,metadataHash:n,name:i,reserve:l,total:p,unitName:d,url:u}){this.clawback=e,this.creator=t,this.decimals=o,this.defaultFrozen=a,this.freeze=r,this.manager=s,this.metadataHash=n,this.name=i,this.reserve=l,this.total=p,this.unitName=d,this.url=u,this.attribute_map={clawback:"clawback",creator:"creator",decimals:"decimals",defaultFrozen:"default-frozen",freeze:"freeze",manager:"manager",metadataHash:"metadata-hash",name:"name",reserve:"reserve",total:"total",unitName:"unit-name",url:"url"}}}class Account extends a.BaseModel{constructor({address:e,amount:t,amountWithoutPendingRewards:o,appsLocalState:a,appsTotalSchema:r,assets:s,createdApps:n,createdAssets:i,participation:l,pendingRewards:p,rewardBase:d,rewards:u,round:g,status:h,sigType:y,authAddr:m}){super(),this.address=e,this.amount=t,this.amountWithoutPendingRewards=o,this.appsLocalState=a,this.appsTotalSchema=r,this.assets=s,this.createdApps=n,this.createdAssets=i,this.participation=l,this.pendingRewards=p,this.rewardBase=d,this.rewards=u,this.round=g,this.status=h,this.sigType=y,this.authAddr=m,this.attribute_map={address:"address",amount:"amount",amountWithoutPendingRewards:"amount-without-pending-rewards",appsLocalState:"apps-local-state",appsTotalSchema:"apps-total-schema",assets:"assets",createdApps:"created-apps",createdAssets:"created-assets",participation:"participation",pendingRewards:"pending-rewards",rewardBase:"reward-base",rewards:"rewards",round:"round",status:"status",sigType:"sig-type",authAddr:"auth-addr"}}}t.exports={DryrunRequest,DryrunSource,Account,Application,ApplicationParams,Asset,AssetParams,AssetHolding,ApplicationLocalStates,ApplicationLocalState,ApplicationStateSchema,TealKeyValue,TealValue}},{"./base":34}],36:[function(e,t,o){const a=e("../../../encoding/encoding");t.exports={PendingTransactionInformation:class{constructor(e,t){this.c=e,this.txid=t,this.query={},this.query.format="msgpack"}async do(e={}){let t=await this.c.get("/v2/transactions/pending/"+this.txid,this.query,e);return t.body&&0Array.from(e)))),this.txnBytesToPost=o,this.c=e}setSendTransactionHeaders(e){let t=e;return Object.keys(t).every(e=>"content-type"!==e.toLowerCase())&&(t={...e},t["Content-Type"]="application/x-binary"),t}async do(t={}){let o=this.setSendTransactionHeaders(t),a=await this.c.post("/v2/transactions",e.from(this.txnBytesToPost),o);return a.body}}}}).call(this,e("buffer").Buffer)},{buffer:8}],40:[function(e,t,o){t.exports={Status:class{constructor(e){this.c=e}async do(e={}){let t=await this.c.get("/v2/status",{},e);return t.body}}}},{}],41:[function(t,o,a){o.exports={StatusAfterBlock:class{constructor(t,o){if(this.c=t,!e(o))throw Error("round should be an integer");this.round=o}async do(e={}){let t=await this.c.get("/v2/status/wait-for-block-after/"+this.round,{},e);return t.body}}}},{}],42:[function(e,t,o){t.exports={SuggestedParams:class{constructor(e){this.c=e}async do(e={}){let t=await this.c.get("/v2/transactions/params",{},e);return{flatFee:!1,fee:t.body.fee,firstRound:t.body["last-round"],lastRound:t.body["last-round"]+1e3,genesisID:t.body["genesis-id"],genesisHash:t.body["genesis-hash"]}}}}},{}],43:[function(e,t,o){t.exports={Supply:class{constructor(e){this.c=e}async do(e={}){let t=await this.c.get("/v2/ledger/supply",{},e);return t.body}}}},{}],44:[function(e,t,o){t.exports={Versions:class{constructor(e){this.c=e}async do(e={}){let t=await c.get("/versions",{},e);return t.body}}}},{}],45:[function(e,t,o){const a=e("../../client"),r=e("../indexer/makeHealthCheck"),s=e("../indexer/lookupAccountByID"),n=e("../indexer/lookupAccountTransactions"),i=e("../indexer/lookupApplications"),l=e("../indexer/lookupAssetBalances"),p=e("../indexer/lookupAssetByID"),d=e("../indexer/lookupAssetTransactions"),u=e("../indexer/lookupBlock"),g=e("../indexer/searchForAssets"),h=e("../indexer/searchForApplications"),y=e("../indexer/searchForTransactions"),m=e("../indexer/searchAccounts");t.exports={IndexerClient:class{constructor(e,t="http://127.0.0.1",o=8080,f={}){let A=e;"string"==typeof A&&(A={"X-Indexer-API-Token":A});let x=new a.HTTPClient(A,t,o,f);this.makeHealthCheck=function(){return new r.MakeHealthCheck(x)},this.lookupAssetBalances=function(e){return new l.LookupAssetBalances(x,e)},this.lookupAssetTransactions=function(e){return new d.LookupAssetTransactions(x,e)},this.lookupAccountTransactions=function(e){return new n.LookupAccountTransactions(x,e)},this.lookupBlock=function(e){return new u.LookupBlock(x,e)},this.lookupAccountByID=function(e){return new s.LookupAccountByID(x,e)},this.lookupAssetByID=function(e){return new p.LookupAssetByID(x,e)},this.lookupApplications=function(e){return new i.LookupApplications(x,e)},this.searchAccounts=function(){return new m.SearchAccounts(x)},this.searchForTransactions=function(){return new y.SearchForTransactions(x)},this.searchForAssets=function(){return new g.SearchForAssets(x)},this.searchForApplications=function(){return new h.SearchForApplications(x)}}}}},{"../../client":24,"../indexer/lookupAccountByID":46,"../indexer/lookupAccountTransactions":47,"../indexer/lookupApplications":48,"../indexer/lookupAssetBalances":49,"../indexer/lookupAssetByID":50,"../indexer/lookupAssetTransactions":51,"../indexer/lookupBlock":52,"../indexer/makeHealthCheck":53,"../indexer/searchAccounts":54,"../indexer/searchForApplications":55,"../indexer/searchForAssets":56,"../indexer/searchForTransactions":57}],46:[function(e,t,o){t.exports={LookupAccountByID:class{constructor(e,t){this.c=e,this.account=t,this.query={}}async do(e={}){let t=await this.c.get("/v2/accounts/"+this.account,this.query,e);return t.body}round(e){return this.query.round=e,this}}}},{}],47:[function(e,t,o){t.exports={LookupAccountTransactions:class{constructor(e,t){this.c=e,this.account=t,this.query={}}async do(e={}){let t=await this.c.get("/v2/accounts/"+this.account+"/transactions",this.query,e);return t.body}notePrefix(e){return this.query["note-prefix"]=e,this}txType(e){return this.query["tx-type"]=e,this}sigType(e){return this.query["sig-type"]=e,this}txid(e){return this.query.txid=e,this}round(e){return this.query.round=e,this}minRound(e){return this.query["min-round"]=e,this}maxRound(e){return this.query["max-round"]=e,this}assetID(e){return this.query["asset-id"]=e,this}limit(e){return this.query.limit=e,this}beforeTime(e){return this.query["before-time"]=e,this}afterTime(e){return this.query["after-time"]=e,this}currencyGreaterThan(e){return this.query["currency-greater-than"]=e,this}currencyLessThan(e){return this.query["currency-less-than"]=e,this}nextToken(e){return this.query.next=e,this}rekeyTo(e){return this.query["rekey-to"]=e,this}}}},{}],48:[function(e,t,o){t.exports={LookupApplications:class{constructor(e,t){this.c=e,this.query={},this.index=t}async do(e={}){let t=await this.c.get("/v2/applications/"+this.index,this.query,e);return t.body}round(e){return this.query.round=e,this}}}},{}],49:[function(e,t,o){t.exports={LookupAssetBalances:class{constructor(e,t){this.c=e,this.index=t,this.query={}}async do(e={}){let t=await this.c.get("/v2/assets/"+this.index+"/balances",this.query,e);return t.body}limit(e){return this.query.limit=e,this}round(e){return this.query.round=e,this}currencyGreaterThan(e){return this.query["currency-greater-than"]=e,this}currencyLessThan(e){return this.query["currency-less-than"]=e,this}nextToken(e){return this.query.next=e,this}}}},{}],50:[function(e,t,o){t.exports={LookupAssetByID:class{constructor(e,t){this.c=e,this.index=t}async do(e={}){let t=await this.c.get("/v2/assets/"+this.index,{},e);return t.body}}}},{}],51:[function(e,t,o){t.exports={LookupAssetTransactions:class{constructor(e,t){this.c=e,this.index=t,this.query={}}async do(e={}){let t=await this.c.get("/v2/assets/"+this.index+"/transactions",this.query,e);return t.body}notePrefix(e){return this.query["note-prefix"]=e,this}txType(e){return this.query["tx-type"]=e,this}sigType(e){return this.query["sig-type"]=e,this}txid(e){return this.query.txid=e,this}round(e){return this.query.round=e,this}minRound(e){return this.query["min-round"]=e,this}maxRound(e){return this.query["max-round"]=e,this}assetID(e){return this.query["asset-id"]=e,this}limit(e){return this.query.limit=e,this}beforeTime(e){return this.query["before-time"]=e,this}afterTime(e){return this.query["after-time"]=e,this}currencyGreaterThan(e){return this.query["currency-greater-than"]=e,this}currencyLessThan(e){return this.query["currency-less-than"]=e,this}addressRole(e){return this.query["address-role"]=e,this}address(e){return this.query.address=e,this}excludeCloseTo(e){return this.query["exclude-close-to"]=e,this}nextToken(e){return this.query.next=e,this}rekeyTo(e){return this.query["rekey-to"]=e,this}}}},{}],52:[function(e,t,o){t.exports={LookupBlock:class{constructor(e,t){this.c=e,this.round=t}async do(e={}){let t=await this.c.get("/v2/blocks/"+this.round,{},e);return t.body}}}},{}],53:[function(e,t,o){t.exports={MakeHealthCheck:class{constructor(e){this.c=e}async do(e={}){let t=await this.c.get("/health",{},e);return t.body}}}},{}],54:[function(e,t,o){t.exports={SearchAccounts:class{constructor(e){this.c=e,this.query={}}async do(e={}){let t=await this.c.get("/v2/accounts",this.query,e);return t.body}currencyGreaterThan(e){return this.query["currency-greater-than"]=e,this}currencyLessThan(e){return this.query["currency-less-than"]=e,this}limit(e){return this.query.limit=e,this}assetID(e){return this.query["asset-id"]=e,this}nextToken(e){return this.query.next=e,this}round(e){return this.query.round=e,this}authAddr(e){return this.query["auth-addr"]=e,this}applicationID(e){return this.query["application-id"]=e,this}}}},{}],55:[function(e,t,o){t.exports={SearchForApplications:class{constructor(e){this.c=e,this.query={}}async do(e={}){let t=await this.c.get("/v2/applications",this.query,e);return t.body}index(e){return this.query["application-id"]=e,this}round(e){return this.query.round=e,this}nextToken(e){return this.query.next=e,this}limit(e){return this.query.limit=e,this}}}},{}],56:[function(e,t,o){t.exports={SearchForAssets:class{constructor(e){this.c=e,this.query={}}async do(e={}){let t=await this.c.get("/v2/assets",this.query,e);return t.body}limit(e){return this.query.limit=e,this}creator(e){return this.query.creator=e,this}name(e){return this.query.name=e,this}unit(e){return this.query.unit=e,this}index(e){return this.query["asset-id"]=e,this}nextToken(e){return this.query.next=e,this}}}},{}],57:[function(e,t,o){t.exports={SearchForTransactions:class{constructor(e){this.c=e,this.query={}}async do(e={}){let t=await this.c.get("/v2/transactions",this.query,e);return t.body}notePrefix(e){return this.query["note-prefix"]=e,this}txType(e){return this.query["tx-type"]=e,this}sigType(e){return this.query["sig-type"]=e,this}txid(e){return this.query.txid=e,this}round(e){return this.query.round=e,this}minRound(e){return this.query["min-round"]=e,this}maxRound(e){return this.query["max-round"]=e,this}assetID(e){return this.query["asset-id"]=e,this}limit(e){return this.query.limit=e,this}beforeTime(e){return this.query["before-time"]=e,this}afterTime(e){return this.query["after-time"]=e,this}currencyGreaterThan(e){return this.query["currency-greater-than"]=e,this}currencyLessThan(e){return this.query["currency-less-than"]=e,this}addressRole(e){return this.query["address-role"]=e,this}address(e){return this.query.address=e,this}excludeCloseTo(e){return this.query["exclude-close-to"]=e,this}nextToken(e){return this.query.next=e,this}rekeyTo(e){return this.query["rekey-to"]=e,this}applicationID(e){return this.query["application-id"]=e,this}}}},{}],58:[function(e,t,o){function a(e){if(!("string"==typeof e||e instanceof String))throw y;let t=n.decode.asBytes(e);if(t.length!==d)throw y;let o=new Uint8Array(t.slice(0,32)),a=new Uint8Array(t.slice(l.PUBLIC_KEY_LENGTH,d));return{publicKey:o,checksum:a}}function r(e){let t=l.genericHash(e).slice(l.PUBLIC_KEY_LENGTH-u,l.PUBLIC_KEY_LENGTH),o=n.encode(p.concatArrays(e,t));return o.toString().slice(0,g)}function s({version:e,threshold:t,pks:o}){if(1!==e||255e)throw m;if(0===t||0===o.length||t>o.length||255a(e).publicKey);return r(s({version:e,threshold:t,pks:n}))},MALFORMED_ADDRESS_ERROR:y,INVALID_MSIG_VERSION:m,INVALID_MSIG_THRESHOLD:f,INVALID_MSIG_PK:A,UNEXPECTED_PK_LEN:x,ALGORAND_ZERO_ADDRESS_STRING:"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ"}},{"../nacl/naclWrappers":67,"../utils/utils":69,"hi-base32":10}],59:[function(e,t,o){function a(e){for(let t in e)if(e.hasOwnProperty(t)&&(!e[t]||0===e[t].length))return{containsEmpty:!0,firstEmptyKey:t};return{containsEmpty:!1,firstEmptyKey:void 0}}const r=e("@msgpack/msgpack"),s="The object contains empty or 0 values. First empty or 0 value encountered during encoding: ";t.exports={encode:function(e){let t=a(e);if(t.containsEmpty)throw new Error(s+t.firstEmptyKey);return r.encode(e,{sortKeys:!0})},decode:function(e){return r.decode(e)},ERROR_CONTAINS_EMPTY_STRING:s}},{"@msgpack/msgpack":1}],60:[function(e,t,o){t.exports={EvalMaxVersion:2,LogicSigVersion:2,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:35,Size:1,Doc:"SHA256 hash of value X, yields [32]byte",Groups:["Arithmetic"]},{Opcode:2,Name:"keccak256",Args:"B",Returns:"B",Cost:130,Size:1,Doc:"Keccak256 hash of value X, yields [32]byte",Groups:["Arithmetic"]},{Opcode:3,Name:"sha512_256",Args:"B",Returns:"B",Cost:45,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, preceded by the 64 byte signature at the second-to-last element on the stack, preceded 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.",DocExtra:"Overflow is an error condition which halts execution and fails the transaction. Full precision is available from `plusw`.",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:30,Name:"plusw",Args:"UU",Returns:"UU",Cost:1,Size:1,Doc:"A plus B out to 128-bit long result as sum (top) and carry-bit 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","ApplicationID","OnCompletion","ApplicationArgs","NumAppArgs","Accounts","NumAccounts","ApprovalProgram","ClearStateProgram","RekeyTo","ConfigAsset","ConfigAssetTotal","ConfigAssetDecimals","ConfigAssetDefaultFrozen","ConfigAssetUnitName","ConfigAssetName","ConfigAssetURL","ConfigAssetMetadataHash","ConfigAssetManager","ConfigAssetReserve","ConfigAssetFreeze","ConfigAssetClawback","FreezeAsset","FreezeAssetAccount","FreezeAssetFrozen"],ArgEnumTypes:"BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBU",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","LogicSigVersion","Round","LatestTimestamp"],ArgEnumTypes:"UUUBUUUU",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","ApplicationID","OnCompletion","ApplicationArgs","NumAppArgs","Accounts","NumAccounts","ApprovalProgram","ClearStateProgram","RekeyTo","ConfigAsset","ConfigAssetTotal","ConfigAssetDecimals","ConfigAssetDefaultFrozen","ConfigAssetUnitName","ConfigAssetName","ConfigAssetURL","ConfigAssetMetadataHash","ConfigAssetManager","ConfigAssetReserve","ConfigAssetFreeze","ConfigAssetClawback","FreezeAsset","FreezeAssetAccount","FreezeAssetFrozen"],ArgEnumTypes:"BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBU",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:54,Name:"txna",Returns:".",Cost:1,Size:3,ArgEnum:["ApplicationArgs","Accounts"],ArgEnumTypes:"BB",Doc:"push value of an array field from current transaction to stack",ImmediateNote:"{uint8 transaction field index}{uint8 transaction field array index}",Groups:["Loading Values"]},{Opcode:55,Name:"gtxna",Returns:".",Cost:1,Size:4,ArgEnum:["ApplicationArgs","Accounts"],ArgEnumTypes:"BB",Doc:"push value of a field to the stack from a transaction in the current transaction group",ImmediateNote:"{uint8 transaction group index}{uint8 transaction field index}{uint8 transaction field array index}",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.\n\nAt LogicSigVersion 2 it became allowed to branch to the end of the program exactly after the last instruction, removing the need for a last instruction or no-op as a branch target at the end. Branching beyond that may still fail the program.",ImmediateNote:"{0..0x7fff forward branch offset, big endian}",Groups:["Flow Control"]},{Opcode:65,Name:"bz",Args:"U",Cost:1,Size:3,Doc:"branch if value X is zero",DocExtra:"See `bnz` for details on how branches work. `bz` inverts the behavior of `bnz`.",ImmediateNote:"{0..0x7fff forward branch offset, big endian}",Groups:["Flow Control"]},{Opcode:66,Name:"b",Cost:1,Size:3,Doc:"branch unconditionally to offset",DocExtra:"See `bnz` for details on how branches work. `b` always jumps to the offset.",ImmediateNote:"{0..0x7fff forward branch offset, big endian}",Groups:["Flow Control"]},{Opcode:67,Name:"return",Args:"U",Cost:1,Size:1,Doc:"use last value on stack as success value; end",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"]},{Opcode:74,Name:"dup2",Args:"..",Returns:"....",Cost:1,Size:1,Doc:"duplicate two last values on stack: A, B -> A, B, A, B",Groups:["Flow Control"]},{Opcode:80,Name:"concat",Args:"BB",Returns:"B",Cost:1,Size:1,Doc:"pop two byte strings A and B and join them, push the result",DocExtra:"`concat` panics if the result would be greater than 4096 bytes.",Groups:["Arithmetic"]},{Opcode:81,Name:"substring",Args:"B",Returns:"B",Cost:1,Size:3,Doc:"pop a byte string X. For immediate values in 0..255 N and M: extract a range of bytes from it starting at N up to but not including M, push the substring result",ImmediateNote:"{uint8 start position}{uint8 end position}",Groups:["Arithmetic"]},{Opcode:82,Name:"substring3",Args:"BUU",Returns:"B",Cost:1,Size:1,Doc:"pop a byte string A and two integers B and C. Extract a range of bytes from A starting at B up to but not including C, push the substring result",Groups:["Arithmetic"]},{Opcode:96,Name:"balance",Args:"U",Returns:"U",Cost:1,Size:1,Doc:"get balance for the requested account specified by Txn.Accounts[A] in microalgos. A is specified as an account index in the Accounts field of the ApplicationCall transaction",Groups:["State Access"]},{Opcode:97,Name:"app_opted_in",Args:"UU",Returns:"U",Cost:1,Size:1,Doc:"check if account specified by Txn.Accounts[A] opted in for the application B => {0 or 1}",DocExtra:"params: account index, application id (top of the stack on opcode entry). Return: 1 if opted in and 0 otherwise.",Groups:["State Access"]},{Opcode:98,Name:"app_local_get",Args:"UB",Returns:".",Cost:1,Size:1,Doc:"read from account specified by Txn.Accounts[A] from local state of the current application key B => value",DocExtra:"params: account index, state key. Return: value. The value is zero if the key does not exist.",Groups:["State Access"]},{Opcode:99,Name:"app_local_get_ex",Args:"UUB",Returns:"U.",Cost:1,Size:1,Doc:"read from account specified by Txn.Accounts[A] from local state of the application B key C => {0 or 1 (top), value}",DocExtra:"params: account index, application id, state key. Return: did_exist flag (top of the stack, 1 if exist and 0 otherwise), value.",Groups:["State Access"]},{Opcode:100,Name:"app_global_get",Args:"B",Returns:".",Cost:1,Size:1,Doc:"read key A from global state of a current application => value",DocExtra:"params: state key. Return: value. The value is zero if the key does not exist.",Groups:["State Access"]},{Opcode:101,Name:"app_global_get_ex",Args:"UB",Returns:"U.",Cost:1,Size:1,Doc:"read from application A global state key B => {0 or 1 (top), value}",DocExtra:"params: application id, state key. Return: value.",Groups:["State Access"]},{Opcode:102,Name:"app_local_put",Args:"UB.",Cost:1,Size:1,Doc:"write to account specified by Txn.Accounts[A] to local state of a current application key B with value C",DocExtra:"params: account index, state key, value.",Groups:["State Access"]},{Opcode:103,Name:"app_global_put",Args:"B.",Cost:1,Size:1,Doc:"write key A and value B to global state of the current application",Groups:["State Access"]},{Opcode:104,Name:"app_local_del",Args:"UB",Cost:1,Size:1,Doc:"delete from account specified by Txn.Accounts[A] local state key B of the current application",DocExtra:"params: account index, state key.",Groups:["State Access"]},{Opcode:105,Name:"app_global_del",Args:"B",Cost:1,Size:1,Doc:"delete key A from a global state of the current application",DocExtra:"params: state key.",Groups:["State Access"]},{Opcode:112,Name:"asset_holding_get",Args:"UU",Returns:"U.",Cost:1,Size:2,ArgEnum:["AssetBalance","AssetFrozen"],ArgEnumTypes:"UU",Doc:"read from account specified by Txn.Accounts[A] and asset B holding field X (imm arg) => {0 or 1 (top), value}",DocExtra:"params: account index, asset id. Return: did_exist flag (1 if exist and 0 otherwise), value.",ImmediateNote:"{uint8 asset holding field index}",Groups:["State Access"]},{Opcode:113,Name:"asset_params_get",Args:"UU",Returns:"U.",Cost:1,Size:2,ArgEnum:["AssetTotal","AssetDecimals","AssetDefaultFrozen","AssetUnitName","AssetName","AssetURL","AssetMetadataHash","AssetManager","AssetReserve","AssetFreeze","AssetClawback"],ArgEnumTypes:"UUUBBBBBBBB",Doc:"read from account specified by Txn.Accounts[A] and asset B params field X (imm arg) => {0 or 1 (top), value}",DocExtra:"params: account index, asset id. Return: did_exist flag (1 if exist and 0 otherwise), value.",ImmediateNote:"{uint8 asset params field index}",Groups:["State Access"]}]}},{}],61:[function(e,t,o){function a(e,t){if(!e)throw new Error("empty program");if(null==t&&(t=[]),!Array.isArray(t))throw new Error("invalid arguments");let[o,a]=n(e);if(0>=a)throw new Error("version parsing error");if(o>i.EvalMaxVersion)throw new Error("unsupported version");let u=0,g=e.length;for(let o of t)g+=o.length;if(g>d)throw new Error("program too long");if(!l){l={};for(let e of i.Ops)l[e.Opcode]=e}let h=a,y=[],m=[];for(;hp)throw new Error("program too costly to run");return[y,m,!0]}function r(e,t){let o=1,[a,r]=n(e.slice(t+o));if(0>=r)throw new Error(`could not decode int const block size at pc=${t+o}`);let s=[];o+=r;for(let r=0;r=e.length)throw new Error("intcblock ran past end of program");let[a,i]=n(e.slice(t+o));if(0>=i)throw new Error(`could not decode int const[${r}] block size at pc=${t+o}`);s.push(a),o+=i}return[o,s]}function s(e,t){let o=1,[a,r]=n(e.slice(t+o));if(0>=r)throw new Error(`could not decode []byte const block size at pc=${t+o}`);let s=[];o+=r;for(let r=0;r=e.length)throw new Error("bytecblock ran past end of program");let[a,i]=n(e.slice(t+o));if(0>=i)throw new Error(`could not decode []byte] const[${r}] block size at pc=${t+o}`);if(o+=i,t+o>=e.length)throw new Error("bytecblock ran past end of program");let l=e.slice(t+o,t+o+a);s.push(l),o+=a}return[o,s]}function n(e){let t=0,o=0;for(let a=0;ab)return 9({pk:s.decode(e).publicKey}));this.msig={v:t.version,thr:t.threshold,subsig:o};let[a,r]=this.singleSignMultisig(e,this.msig);this.msig.subsig[r].s=a}}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=p.concatArrays(this.tag,this.logic);const o=r.sign(t,e);return o}singleSignMultisig(e,t){let o=-1,a=r.keyPairFromSecretKey(e).publicKey;for(let r=0,s;rA.decode(e).publicKey);let i=v.decode(e),l=w.MultisigTransaction.from_obj_for_encoding(i.txn),p=l.partialSignTxn({version:t,threshold:o,pks:n},s);return{txID:l.txID().toString(),blob:r([e,p])}},mergeMultisigTransactions:r,signMultisigTransaction:function(e,{version:t,threshold:o,addrs:a},r){let s=A.fromMultisigPreImgAddrs({version:t,threshold:o,addrs:a});if(!e.hasOwnProperty("from"))e.from=s;else if(e.from!==s&&A.encode(e.from.publicKey)!==s)throw K;const n=a.map(e=>A.decode(e).publicKey);let i=e instanceof k.Transaction,l,p;return i?(l=e,p=w.MultisigTransaction.prototype.partialSignTxn.call(l,{version:t,threshold:o,pks:n},r)):(l=new w.MultisigTransaction(e),p=l.partialSignTxn({version:t,threshold:o,pks:n},r)),{txID:l.txID().toString(),blob:p}},multisigAddress:function({version:e,threshold:t,addrs:o}){return A.fromMultisigPreImgAddrs({version:e,threshold:t,addrs:o})},ERROR_MULTISIG_BAD_SENDER:K,ERROR_INVALID_MICROALGOS:M,microalgosToAlgos:function(e){if(0>e||!a(e))throw M;return e/q},algosToMicroalgos:function(e){return Math.round(e*q)},computeGroupID:s,assignGroupID:function(e,t=void 0){const o=s(e);let a=[];for(tx of e)t&&A.encode(tx.from.publicKey)!=t||(tx.group=o,a.push(tx));return a},makeLogicSig:n,signLogicSigTransaction:function(e,t){if(!t.verify(A.decode(e.from).publicKey))throw new Error("invalid signature");let o=new k.Transaction(e);return i(o,t)},signLogicSigTransactionObject:i,logicSigFromByte:function(e){return E.LogicSig.fromByte(e)},tealSign:l,tealSignFromProgram:function(e,t,o){const a=n(o),r=a.address();return l(e,t,r)},makePaymentTxn:function(e,t,o,a,r,s,n,i,l,d){return p(e,t,a,r,i,{genesisHash:l,genesisID:d,firstRound:s,lastRound:n,fee:o})},makeKeyRegistrationTxn:function(e,t,o,a,r,s,n,i,l,p,u,g){return d(e,r,i,l,p,u,g,{genesisHash:s,genesisID:n,firstRound:o,lastRound:a,fee:t})},makeAssetCreateTxn:function(e,t,o,a,r,s,n,i,l,p,d,g,h,y,m,f,A,x){return u(e,r,i,l,p,d,g,h,y,m,f,A,x,{genesisHash:s,genesisID:n,firstRound:o,lastRound:a,fee:t})},makeAssetConfigTxn:function(e,t,o,a,r,s,n,i,l,p,d,u,h=!0){return g(e,r,i,l,p,d,u,{genesisHash:s,genesisID:n,firstRound:o,lastRound:a,fee:t},h)},makeAssetDestroyTxn:function(e,t,o,a,r,s,n,i){return h(e,r,i,{genesisHash:s,genesisID:n,firstRound:o,lastRound:a,fee:t})},makeAssetFreezeTxn:function(e,t,o,a,r,s,n,i,l,p){return y(e,r,i,l,p,{genesisHash:s,genesisID:n,firstRound:o,lastRound:a,fee:t})},makeAssetTransferTxn:function(e,t,o,a,r,s,n,i,l,p,d,u){return m(e,t,o,a,s,l,u,{genesisHash:p,genesisID:d,firstRound:n,lastRound:i,fee:r})},makePaymentTxnWithSuggestedParams:p,makeKeyRegistrationTxnWithSuggestedParams:d,makeAssetCreateTxnWithSuggestedParams:u,makeAssetConfigTxnWithSuggestedParams:g,makeAssetDestroyTxnWithSuggestedParams:h,makeAssetFreezeTxnWithSuggestedParams:y,makeAssetTransferTxnWithSuggestedParams:m,OnApplicationComplete:F,makeApplicationCreateTxn:function(e,t,o,a,r,s,n,i,l,p=void 0,d=void 0,u=void 0,g=void 0,h=void 0,y=void 0,m=void 0){return new k.Transaction({type:"appl",from:e,suggestedParams:t,appIndex:0,appOnComplete:o,appLocalInts:s,appLocalByteSlices:n,appGlobalInts:i,appGlobalByteSlices:l,appApprovalProgram:a,appClearProgram:r,appArgs:p,appAccounts:d,appForeignApps:u,appForeignAssets:g,note:h,lease:y,reKeyTo:m})},makeApplicationUpdateTxn:function(e,t,a,r,s,n=void 0,i=void 0,l=void 0,p=void 0,d=void 0,u=void 0,g=void 0){let h={type:"appl",from:e,suggestedParams:t,appIndex:a,appApprovalProgram:r,appOnComplete:F.UpdateApplicationOC,appClearProgram:s,appArgs:n,appAccounts:i,appForeignApps:l,appForeignAssets:p,note:d,lease:u,reKeyTo:g};return new k.Transaction(h)},makeApplicationDeleteTxn:function(e,t,a,r=void 0,s=void 0,n=void 0,i=void 0,l=void 0,p=void 0,d=void 0){let u={type:"appl",from:e,suggestedParams:t,appIndex:a,appOnComplete:F.DeleteApplicationOC,appArgs:r,appAccounts:s,appForeignApps:n,appForeignAssets:i,note:l,lease:p,reKeyTo:d};return new k.Transaction(u)},makeApplicationOptInTxn:function(e,t,a,r=void 0,s=void 0,n=void 0,i=void 0,l=void 0,p=void 0,d=void 0){let u={type:"appl",from:e,suggestedParams:t,appIndex:a,appOnComplete:F.OptInOC,appArgs:r,appAccounts:s,appForeignApps:n,appForeignAssets:i,note:l,lease:p,reKeyTo:d};return new k.Transaction(u)},makeApplicationCloseOutTxn:function(e,t,a,r=void 0,s=void 0,n=void 0,i=void 0,l=void 0,p=void 0,d=void 0){let u={type:"appl",from:e,suggestedParams:t,appIndex:a,appOnComplete:F.CloseOutOC,appArgs:r,appAccounts:s,appForeignApps:n,appForeignAssets:i,note:l,lease:p,reKeyTo:d};return new k.Transaction(u)},makeApplicationClearStateTxn:function(e,t,a,r=void 0,s=void 0,n=void 0,i=void 0,l=void 0,p=void 0,d=void 0){let u={type:"appl",from:e,suggestedParams:t,appIndex:a,appOnComplete:F.ClearStateOC,appArgs:r,appAccounts:s,appForeignApps:n,appForeignAssets:i,note:l,lease:p,reKeyTo:d};return new k.Transaction(u)},makeApplicationNoOpTxn:function(e,t,a,r=void 0,s=void 0,n=void 0,i=void 0,l=void 0,p=void 0,d=void 0){let u={type:"appl",from:e,suggestedParams:t,appIndex:a,appOnComplete:F.NoOpOC,appArgs:r,appAccounts:s,appForeignApps:n,appForeignAssets:i,note:l,lease:p,reKeyTo:d};return new k.Transaction(u)}}}).call(this,e("buffer").Buffer)},{"./bid":22,"./client/algod":23,"./client/kmd":25,"./client/v2/algod/algod":27,"./client/v2/algod/models/types":35,"./client/v2/indexer/indexer":45,"./encoding/address":58,"./encoding/encoding":59,"./logicsig":62,"./mnemonic/mnemonic":64,"./multisig":66,"./nacl/naclWrappers":67,"./transaction":68,"./utils/utils":69,buffer:8}],64:[function(e,t,o){function a(e){const t=l.genericHash(e),o=s(t),a=r(o);return a[0]}function r(e){return e.map(e=>i[e])}function s(e){function t(e){r=e<>=11,s-=11)}function o(){s&&a.push(r)}let a=[],r=0,s=0;return e.forEach(t),o(),a}function n(e){function t(e){for(r=e<>=8,s-=8}function o(){s&&a.push(r)}let a=[],r=0,s=0;return e.forEach(t),o(),new Uint8Array(a)}const i=e("./wordlists/english"),l=e("../nacl/naclWrappers"),p=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=s(e),o=r(t),n=a(e);return o.join(" ")+" "+n},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 r=t[t.length-1],s=o.map(e=>i.indexOf(e));let l=n(s);if(33!==l.length)throw p;if(0!==l[l.length-1])throw p;l=l.slice(0,l.length-1);const u=a(l);if(u===r)return l;throw p},ERROR_FAIL_TO_DECODE_MNEMONIC:p,ERROR_NOT_IN_WORDS_LIST:d}},{"../nacl/naclWrappers":67,"./wordlists/english":65}],65:[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"]},{}],66:[function(e,t,o){(function(o){function a(e,{rawSig:t,myPk:a},{version:s,threshold:i,pks:l}){let p=!1,d=l.map(e=>r.bytesEqual(e,a)?(p=!0,{pk:o.from(e),s:t}):{pk:o.from(e)});if(!1==p)throw y;return new Uint8Array(n.encode({msig:{v:s,thr:i,subsig:d},txn:e}))}const r=e("./nacl/naclWrappers"),s=e("./encoding/address"),n=e("./encoding/encoding"),i=e("./transaction"),l=e("./utils/utils"),p=new Error("Not enough multisig transactions to merge. Need at least two"),d=new Error("Cannot merge txs. txIDs differ"),u=new Error("Cannot merge txs. Multisig preimages differ"),g=new Error("Cannot merge txs. subsigs are mismatched."),h=new Error("The transaction from field and multisig preimage do not match."),y=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},n){if(!this.hasOwnProperty("objForEncoding")){let a=s.fromMultisigPreImg({version:e,threshold:t,pks:o});if(s.encode(this.from.publicKey)!==s.encode(a))throw h}let i=r.keyPairFromSecretKey(n).publicKey;return a(this.get_obj_for_encoding(),{rawSig:this.rawSignTxn(n),myPk:i},{version:e,threshold:t,pks:o})}}t.exports={MultisigTransaction,mergeMultisigTransactions:function(e){if(2>e.length)throw p;const t=n.decode(e[0]),a=MultisigTransaction.from_obj_for_encoding(t.txn),r=a.txID().toString(),l=s.encode(t.txn.snd);let h=t.msig.subsig;for(let a=0;ae.pk)};if(l!==s.encode(s.fromMultisigPreImg(y)))throw u;h=i.msig.subsig.map((e,t)=>{let a=h[t];if(a.s){if(e.s&&0!==o.compare(e.s,a.s))throw g;return{pk:a.pk,s:a.s}}return e.s?{pk:a.pk,s:e.s}:a})}let y={v:t.msig.v,thr:t.msig.thr,subsig:h},m={msig:y,txn:t.txn};return new Uint8Array(n.encode(m))},createMultisigTransaction:a,verifyMultisig:function(e,t,o){const a=t.v,n=t.thr,i=t.subsig;let p=i.map(e=>e.pk);if(t.subsig.lengthn))throw Error("Amount must be a positive number and smaller than 2^53-1");if(!a(s)||0>s)throw Error("fee must be a positive number and smaller than 2^53-1");if(!a(i)||0>i)throw Error("firstRound must be a positive number");if(!a(l)||0>l)throw Error("lastRound must be a positive number");if(void 0!==S&&(!a(S)||0>S))throw Error("Total asset issuance must be a positive number and smaller than 2^53-1");if(void 0!==B&&(!a(B)||0>B||B>g))throw Error("assetDecimals must be a positive number and smaller than "+g.toString());if(void 0!==T&&(!a(T)||0>T))throw Error("Asset index must be a positive number and smaller than 2^53-1");if(void 0!==K&&(!a(K)||0>K))throw Error("Application index must be a positive number and smaller than 2^53-1");if(void 0!==F&&(!a(F)||0>F))throw Error("Application local ints count must be a positive number and smaller than 2^53-1");if(void 0!==j&&(!a(j)||0>j))throw Error("Application local byte slices count must be a positive number and smaller than 2^53-1");if(void 0!==G&&(!a(G)||0>G))throw Error("Application global ints count must be a positive number and smaller than 2^53-1");if(void 0!==H&&(!a(H)||0>H))throw Error("Application global byte slices count must be a positive number and smaller than 2^53-1");if(void 0!==V&&V.constructor!==Uint8Array)throw Error("appApprovalProgram must be a Uint8Array.");if(void 0!==W&&W.constructor!==Uint8Array)throw Error("appClearProgram must be a Uint8Array.");if(void 0!==Y){if(Y.constructor!==Array)throw Error("appArgs must be an Array of Uint8Array.");Y.forEach(e=>{if(e.constructor!==Uint8Array)throw Error("each element of AppArgs must be a Uint8Array.")})}else Y=new Uint8Array(0);if(void 0!==X&&X.forEach((e,t)=>{X[t]=r.decode(e)}),void 0!==J&&J.forEach(e=>{if(!a(e)||0>e)throw Error("each foreign application index must be a positive number and smaller than 2^53-1")}),void 0!==Z&&Z.forEach(e=>{if(!a(e)||0>e)throw Error("each foreign asset index must be a positive number and smaller than 2^53-1")}),void 0===u)u=new Uint8Array(0);else if(u.constructor!==Uint8Array)throw Error("note must be a Uint8Array.");if(void 0!==m){if(m.constructor!==Uint8Array)throw Error("lease must be a Uint8Array.");if(m.length!==d)throw Error("lease must be of length "+d.toString()+".")}else m=new Uint8Array(0);void 0!==A&&(A=o.from(A,"base64")),void 0!==x&&(x=o.from(x,"base64")),Object.assign(this,{from:e,to:t,fee:s,amount:n,firstRound:i,lastRound:l,note:u,genesisID:h,genesisHash:y,lease:m,closeRemainderTo:f,voteKey:A,selectionKey:x,voteFirst:v,voteLast:k,voteKeyDilution:w,assetIndex:T,assetTotal:S,assetDecimals:B,assetDefaultFrozen:U,assetManager:E,assetReserve:C,assetFreeze:I,assetClawback:D,assetUnitName:R,assetName:z,assetURL:L,assetMetadataHash:O,freezeAccount:N,freezeState:P,assetRevocationTarget:q,appIndex:K,appOnComplete:M,appLocalInts:F,appLocalByteSlices:j,appGlobalInts:G,appGlobalByteSlices:H,appApprovalProgram:V,appClearProgram:W,appArgs:Y,appAccounts:X,appForeignApps:J,appForeignAssets:Z,type:Q,reKeyTo:te}),$||(this.fee*=this.estimateSize()),this.fee{e.apaa.push(o.from(t))})),void 0!==this.appAccounts&&(e.apat=[],this.appAccounts.forEach(t=>{e.apat.push(o.from(t.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.apid||delete e.apid,e.apls.nui||delete e.apls.nui,e.apls.nbs||delete e.apls.nbs,e.apls.nui||e.apls.nbs||delete e.apls,e.apgs.nui||delete e.apgs.nui,e.apgs.nbs||delete e.apgs.nbs,e.apaa&&e.apaa.length||delete e.apaa,e.apgs.nui||e.apgs.nbs||delete e.apgs,e.apap||delete e.apap,e.apsu||delete e.apsu,e.apan||delete e.apan,e.apfa||delete e.apfa,e.apas||delete e.apas,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=r.decode(r.encode(new Uint8Array(e.snd))),void 0!==e.grp&&(t.group=o.from(e.grp)),void 0!==e.rekey&&(t.reKeyTo=r.decode(r.encode(new Uint8Array(e.rekey)))),"pay"===e.type?(t.amount=e.amt,t.to=r.decode(r.encode(new Uint8Array(e.rcv))),void 0!==e.close&&(t.closeRemainderTo=r.decode(r.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=r.decode(r.encode(new Uint8Array(e.apar.m)))),void 0!==e.apar.r&&(t.assetReserve=r.decode(r.encode(new Uint8Array(e.apar.r)))),void 0!==e.apar.f&&(t.assetFreeze=r.decode(r.encode(new Uint8Array(e.apar.f)))),void 0!==e.apar.c&&(t.assetClawback=r.decode(r.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=r.decode(r.encode(new Uint8Array(e.aclose)))),void 0!==e.asnd&&(t.assetRevocationTarget=r.decode(r.encode(new Uint8Array(e.asnd)))),t.to=r.decode(r.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=r.decode(r.encode(new Uint8Array(e.fadd)))):"appl"===e.type&&(void 0!==e.apid&&(t.appIndex=e.apid),void 0!==e.apan&&(t.appOnComplete=e.apan),void 0!==e.apls&&(void 0!==e.apls.nui&&(t.appLocalInts=e.apls.nui),void 0!==e.apls.nbs&&(t.appLocalByteSlices=e.apls.nbs)),void 0!==e.apgs&&(void 0!==e.apgs.nui&&(t.appGlobalInts=e.apgs.nui),void 0!==e.apgs.nbs&&(t.appGlobalByteSlices=e.apgs.nbs)),void 0!==e.apap&&(t.appApprovalProgram=new Uint8Array(e.apap)),void 0!==e.apsu&&(t.appClearProgram=new Uint8Array(e.apsu)),void 0!==e.apaa&&(t.appArgs=[],e.apaa.forEach(e=>{t.appArgs.push(new Uint8Array(e))})),void 0!==e.apat&&(t.appAccounts=[],e.apat.forEach(e=>{t.appAccounts.push(r.decode(r.encode(new Uint8Array(e))))})),void 0!==e.apfa&&(t.appForeignApps=e.apfa),void 0!==e.apas&&(t.appForeignAssets=e.apas)),t}estimateSize(){return this.toByte().length+75}bytesToSign(){let e=this.toByte();return o.from(i.concatArrays(this.tag,e))}toByte(){return s.encode(this.get_obj_for_encoding())}rawSignTxn(e){const t=this.bytesToSign(),a=n.sign(t,e);return o.from(a)}signTxn(e){let t={sig:this.rawSignTxn(e),txn:this.get_obj_for_encoding()},a=n.keyPairFromSecretKey(e),i=a.publicKey;return r.encode(i)!=r.encode(this.from.publicKey)&&(t.sgnr=o.from(i)),new Uint8Array(s.encode(t))}rawTxID(){const e=this.toByte(),t=o.from(i.concatArrays(this.tag,e));return o.from(n.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+=(5+d)*t)}addRekey(e,t=0){e!==void 0&&(this.reKeyTo=r.decode(e)),0!==t&&(this.fee+=(5+32)*t)}},TxGroup:class{constructor(e){if(e.length>u){let t=e.length.toString()+" transactions grouped together but max group size is "+u.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 a of e.txlist)t.txGroupHashes.push(new o.from(a));return t}toByte(){return s.encode(this.get_obj_for_encoding())}},ALGORAND_MIN_TX_FEE:p}}).call(this,e("buffer").Buffer)},{"./encoding/address":58,"./encoding/encoding":59,"./nacl/naclWrappers":67,"./utils/utils":69,buffer:8,"hi-base32":10}],69:[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}}},{}]},{},[63])(63)}); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 914062d5a..b5c14d87d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "algosdk", - "version": "1.7.0", + "version": "1.7.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index a340e734b..693329804 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "algosdk", - "version": "1.7.1", + "version": "1.7.2", "description": "algosdk is Algorand's official javascript SDK", "main": "index.js", "directories": {