algosdk 1.24.1 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/browser/algosdk.min.js +1 -1
- package/dist/browser/algosdk.min.js.LICENSE.txt +0 -18
- package/dist/browser/algosdk.min.js.map +1 -1
- package/dist/cjs/abi/abi_type.js +6 -5
- package/dist/cjs/abi/abi_type.js.map +1 -1
- package/dist/cjs/bid.js +6 -5
- package/dist/cjs/bid.js.map +1 -1
- package/dist/cjs/client/client.js +4 -3
- package/dist/cjs/client/client.js.map +1 -1
- package/dist/cjs/client/kmd.js +12 -11
- package/dist/cjs/client/kmd.js.map +1 -1
- package/dist/cjs/client/urlTokenBaseHTTPClient.js +2 -1
- package/dist/cjs/client/urlTokenBaseHTTPClient.js.map +1 -1
- package/dist/cjs/client/v2/algod/algod.js +17 -1
- package/dist/cjs/client/v2/algod/algod.js.map +1 -1
- package/dist/cjs/client/v2/algod/compile.js +2 -1
- package/dist/cjs/client/v2/algod/compile.js.map +1 -1
- package/dist/cjs/client/v2/algod/disassemble.js +46 -0
- package/dist/cjs/client/v2/algod/disassemble.js.map +1 -0
- package/dist/cjs/client/v2/algod/dryrun.js +2 -1
- package/dist/cjs/client/v2/algod/dryrun.js.map +1 -1
- package/dist/cjs/client/v2/algod/getApplicationBoxByName.js +2 -1
- package/dist/cjs/client/v2/algod/getApplicationBoxByName.js.map +1 -1
- package/dist/cjs/client/v2/algod/models/types.js +182 -143
- package/dist/cjs/client/v2/algod/models/types.js.map +1 -1
- package/dist/cjs/client/v2/algod/sendRawTransaction.js +2 -1
- package/dist/cjs/client/v2/algod/sendRawTransaction.js.map +1 -1
- package/dist/cjs/client/v2/basemodel.js +3 -2
- package/dist/cjs/client/v2/basemodel.js.map +1 -1
- package/dist/cjs/client/v2/indexer/lookupAccountTransactions.js +2 -1
- package/dist/cjs/client/v2/indexer/lookupAccountTransactions.js.map +1 -1
- package/dist/cjs/client/v2/indexer/lookupApplicationBoxByIDandName.js +2 -1
- package/dist/cjs/client/v2/indexer/lookupApplicationBoxByIDandName.js.map +1 -1
- package/dist/cjs/client/v2/indexer/lookupAssetTransactions.js +0 -7
- package/dist/cjs/client/v2/indexer/lookupAssetTransactions.js.map +1 -1
- package/dist/cjs/client/v2/indexer/models/types.js +39 -38
- package/dist/cjs/client/v2/indexer/models/types.js.map +1 -1
- package/dist/cjs/composer.js +7 -6
- package/dist/cjs/composer.js.map +1 -1
- package/dist/cjs/dryrun.js +22 -12
- package/dist/cjs/dryrun.js.map +1 -1
- package/dist/cjs/encoding/address.js +2 -1
- package/dist/cjs/encoding/address.js.map +1 -1
- package/dist/cjs/encoding/bigint.js +2 -1
- package/dist/cjs/encoding/bigint.js.map +1 -1
- package/dist/cjs/encoding/uint64.js +14 -8
- package/dist/cjs/encoding/uint64.js.map +1 -1
- package/dist/cjs/group.js +6 -5
- package/dist/cjs/group.js.map +1 -1
- package/dist/cjs/logicsig.js +24 -21
- package/dist/cjs/logicsig.js.map +1 -1
- package/dist/cjs/main.js +8 -9
- package/dist/cjs/main.js.map +1 -1
- package/dist/cjs/makeTxn.js +1 -193
- package/dist/cjs/makeTxn.js.map +1 -1
- package/dist/cjs/multisig.js +6 -5
- package/dist/cjs/multisig.js.map +1 -1
- package/dist/cjs/transaction.js +64 -63
- package/dist/cjs/transaction.js.map +1 -1
- package/dist/cjs/types/transactions/encoded.js +0 -3
- package/dist/cjs/types/transactions/encoded.js.map +1 -1
- package/dist/cjs/utils/utils.js +5 -1
- package/dist/cjs/utils/utils.js.map +1 -1
- package/dist/esm/abi/abi_type.js +1 -0
- package/dist/esm/abi/abi_type.js.map +1 -1
- package/dist/esm/bid.js +1 -0
- package/dist/esm/bid.js.map +1 -1
- package/dist/esm/client/client.js +1 -0
- package/dist/esm/client/client.js.map +1 -1
- package/dist/esm/client/kmd.js +1 -0
- package/dist/esm/client/kmd.js.map +1 -1
- package/dist/esm/client/urlTokenBaseHTTPClient.js +1 -0
- package/dist/esm/client/urlTokenBaseHTTPClient.js.map +1 -1
- package/dist/esm/client/v2/algod/algod.js +17 -1
- package/dist/esm/client/v2/algod/algod.js.map +1 -1
- package/dist/esm/client/v2/algod/compile.js +1 -0
- package/dist/esm/client/v2/algod/compile.js.map +1 -1
- package/dist/esm/client/v2/algod/disassemble.js +38 -0
- package/dist/esm/client/v2/algod/disassemble.js.map +1 -0
- package/dist/esm/client/v2/algod/dryrun.js +1 -0
- package/dist/esm/client/v2/algod/dryrun.js.map +1 -1
- package/dist/esm/client/v2/algod/getApplicationBoxByName.js +1 -0
- package/dist/esm/client/v2/algod/getApplicationBoxByName.js.map +1 -1
- package/dist/esm/client/v2/algod/models/types.js +161 -120
- package/dist/esm/client/v2/algod/models/types.js.map +1 -1
- package/dist/esm/client/v2/algod/sendRawTransaction.js +1 -0
- package/dist/esm/client/v2/algod/sendRawTransaction.js.map +1 -1
- package/dist/esm/client/v2/basemodel.js +1 -0
- package/dist/esm/client/v2/basemodel.js.map +1 -1
- package/dist/esm/client/v2/indexer/lookupAccountTransactions.js +1 -0
- package/dist/esm/client/v2/indexer/lookupAccountTransactions.js.map +1 -1
- package/dist/esm/client/v2/indexer/lookupApplicationBoxByIDandName.js +1 -0
- package/dist/esm/client/v2/indexer/lookupApplicationBoxByIDandName.js.map +1 -1
- package/dist/esm/client/v2/indexer/lookupAssetTransactions.js +0 -7
- package/dist/esm/client/v2/indexer/lookupAssetTransactions.js.map +1 -1
- package/dist/esm/client/v2/indexer/models/types.js +1 -0
- package/dist/esm/client/v2/indexer/models/types.js.map +1 -1
- package/dist/esm/composer.js +5 -4
- package/dist/esm/composer.js.map +1 -1
- package/dist/esm/dryrun.js +17 -7
- package/dist/esm/dryrun.js.map +1 -1
- package/dist/esm/encoding/address.js +1 -0
- package/dist/esm/encoding/address.js.map +1 -1
- package/dist/esm/encoding/bigint.js +1 -0
- package/dist/esm/encoding/bigint.js.map +1 -1
- package/dist/esm/encoding/uint64.js +14 -8
- package/dist/esm/encoding/uint64.js.map +1 -1
- package/dist/esm/group.js +1 -0
- package/dist/esm/group.js.map +1 -1
- package/dist/esm/logicsig.js +15 -12
- package/dist/esm/logicsig.js.map +1 -1
- package/dist/esm/main.js +2 -4
- package/dist/esm/main.js.map +1 -1
- package/dist/esm/makeTxn.js +0 -185
- package/dist/esm/makeTxn.js.map +1 -1
- package/dist/esm/multisig.js +1 -0
- package/dist/esm/multisig.js.map +1 -1
- package/dist/esm/transaction.js +1 -0
- package/dist/esm/transaction.js.map +1 -1
- package/dist/esm/types/transactions/encoded.js +0 -3
- package/dist/esm/types/transactions/encoded.js.map +1 -1
- package/dist/esm/utils/utils.js +5 -1
- package/dist/esm/utils/utils.js.map +1 -1
- package/dist/types/client/v2/algod/algod.d.ts +15 -1
- package/dist/types/client/v2/algod/disassemble.d.ts +20 -0
- package/dist/types/client/v2/algod/models/types.d.ts +122 -67
- package/dist/types/client/v2/basemodel.d.ts +0 -3
- package/dist/types/client/v2/indexer/lookupAssetTransactions.d.ts +0 -4
- package/dist/types/composer.d.ts +7 -1
- package/dist/types/logicsig.d.ts +10 -10
- package/dist/types/main.d.ts +1 -3
- package/dist/types/makeTxn.d.ts +1 -147
- package/dist/types/types/transactions/encoded.d.ts +1 -16
- package/package.json +2 -3
- package/src/abi/abi_type.ts +1 -0
- package/src/bid.ts +1 -0
- package/src/client/client.ts +1 -0
- package/src/client/kmd.ts +1 -0
- package/src/client/urlTokenBaseHTTPClient.ts +1 -0
- package/src/client/v2/algod/algod.ts +19 -2
- package/src/client/v2/algod/compile.ts +1 -0
- package/src/client/v2/algod/disassemble.ts +46 -0
- package/src/client/v2/algod/dryrun.ts +1 -0
- package/src/client/v2/algod/getApplicationBoxByName.ts +1 -0
- package/src/client/v2/algod/models/types.ts +319 -249
- package/src/client/v2/algod/sendRawTransaction.ts +1 -0
- package/src/client/v2/basemodel.ts +2 -0
- package/src/client/v2/indexer/lookupAccountTransactions.ts +1 -0
- package/src/client/v2/indexer/lookupApplicationBoxByIDandName.ts +1 -0
- package/src/client/v2/indexer/lookupAssetTransactions.ts +0 -8
- package/src/client/v2/indexer/models/types.ts +1 -0
- package/src/composer.ts +16 -3
- package/src/dryrun.ts +14 -13
- package/src/encoding/address.ts +1 -0
- package/src/encoding/bigint.ts +2 -0
- package/src/encoding/uint64.ts +16 -10
- package/src/group.ts +1 -0
- package/src/logicsig.ts +26 -13
- package/src/main.ts +3 -5
- package/src/makeTxn.ts +0 -421
- package/src/multisig.ts +1 -0
- package/src/transaction.ts +1 -0
- package/src/types/transactions/encoded.ts +2 -17
- package/src/utils/utils.ts +3 -0
- package/dist/cjs/client/algod.js +0 -295
- package/dist/cjs/client/algod.js.map +0 -1
- package/dist/cjs/logic/langspec.json +0 -2014
- package/dist/cjs/logic/logic.js +0 -262
- package/dist/cjs/logic/logic.js.map +0 -1
- package/dist/cjs/logicTemplates/dynamicfee.js +0 -192
- package/dist/cjs/logicTemplates/dynamicfee.js.map +0 -1
- package/dist/cjs/logicTemplates/htlc.js +0 -145
- package/dist/cjs/logicTemplates/htlc.js.map +0 -1
- package/dist/cjs/logicTemplates/index.js +0 -19
- package/dist/cjs/logicTemplates/index.js.map +0 -1
- package/dist/cjs/logicTemplates/limitorder.js +0 -167
- package/dist/cjs/logicTemplates/limitorder.js.map +0 -1
- package/dist/cjs/logicTemplates/periodicpayment.js +0 -163
- package/dist/cjs/logicTemplates/periodicpayment.js.map +0 -1
- package/dist/cjs/logicTemplates/split.js +0 -154
- package/dist/cjs/logicTemplates/split.js.map +0 -1
- package/dist/cjs/logicTemplates/templates.js +0 -67
- package/dist/cjs/logicTemplates/templates.js.map +0 -1
- package/dist/esm/client/algod.js +0 -295
- package/dist/esm/client/algod.js.map +0 -1
- package/dist/esm/logic/langspec.json +0 -2014
- package/dist/esm/logic/logic.js +0 -249
- package/dist/esm/logic/logic.js.map +0 -1
- package/dist/esm/logicTemplates/dynamicfee.js +0 -192
- package/dist/esm/logicTemplates/dynamicfee.js.map +0 -1
- package/dist/esm/logicTemplates/htlc.js +0 -145
- package/dist/esm/logicTemplates/htlc.js.map +0 -1
- package/dist/esm/logicTemplates/index.js +0 -19
- package/dist/esm/logicTemplates/index.js.map +0 -1
- package/dist/esm/logicTemplates/limitorder.js +0 -167
- package/dist/esm/logicTemplates/limitorder.js.map +0 -1
- package/dist/esm/logicTemplates/periodicpayment.js +0 -163
- package/dist/esm/logicTemplates/periodicpayment.js.map +0 -1
- package/dist/esm/logicTemplates/split.js +0 -154
- package/dist/esm/logicTemplates/split.js.map +0 -1
- package/dist/esm/logicTemplates/templates.js +0 -67
- package/dist/esm/logicTemplates/templates.js.map +0 -1
- package/dist/types/client/algod.d.ts +0 -162
- package/dist/types/logic/logic.d.ts +0 -45
- package/dist/types/logicTemplates/dynamicfee.d.ts +0 -59
- package/dist/types/logicTemplates/htlc.d.ts +0 -51
- package/dist/types/logicTemplates/index.d.ts +0 -16
- package/dist/types/logicTemplates/limitorder.d.ts +0 -70
- package/dist/types/logicTemplates/periodicpayment.d.ts +0 -58
- package/dist/types/logicTemplates/split.d.ts +0 -57
- package/dist/types/logicTemplates/templates.d.ts +0 -6
- package/src/client/algod.js +0 -365
- package/src/logic/langspec.json +0 -2014
- package/src/logic/logic.ts +0 -316
- package/src/logicTemplates/dynamicfee.js +0 -219
- package/src/logicTemplates/htlc.js +0 -165
- package/src/logicTemplates/index.js +0 -20
- package/src/logicTemplates/limitorder.js +0 -227
- package/src/logicTemplates/periodicpayment.js +0 -208
- package/src/logicTemplates/split.js +0 -208
- package/src/logicTemplates/templates.js +0 -78
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! For license information please see algosdk.min.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.algosdk=t():e.algosdk=t()}(self,(()=>(()=>{var __webpack_modules__={5406:function(e){e.exports=function(e){var t={};function r(s){if(t[s])return t[s].exports;var n=t[s]={i:s,l:!1,exports:{}};return e[s].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,s){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:s})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(r.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(s,n,function(t){return e[t]}.bind(null,n));return s},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){"use strict";r.r(t),r.d(t,"encode",(function(){return B})),r.d(t,"decode",(function(){return M})),r.d(t,"decodeAsync",(function(){return W})),r.d(t,"decodeArrayStream",(function(){return Z})),r.d(t,"decodeStream",(function(){return X})),r.d(t,"Decoder",(function(){return z})),r.d(t,"Encoder",(function(){return T})),r.d(t,"ExtensionCodec",(function(){return _})),r.d(t,"ExtData",(function(){return p})),r.d(t,"EXT_TIMESTAMP",(function(){return m})),r.d(t,"encodeDateToTimeSpec",(function(){return b})),r.d(t,"encodeTimeSpecToTimestamp",(function(){return y})),r.d(t,"decodeTimestampToTimeSpec",(function(){return A})),r.d(t,"encodeTimestampExtension",(function(){return w})),r.d(t,"decodeTimestampExtension",(function(){return v}));var s=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var s,n,o=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(s=o.next()).done;)i.push(s.value)}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},n=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(s(arguments[t]));return e},o="undefined"!=typeof process&&"undefined"!=typeof TextEncoder&&"undefined"!=typeof TextDecoder;function i(e){for(var t=e.length,r=0,s=0;s<t;){var n=e.charCodeAt(s++);if(0!=(4294967168&n))if(0==(4294965248&n))r+=2;else{if(n>=55296&&n<=56319&&s<t){var o=e.charCodeAt(s);56320==(64512&o)&&(++s,n=((1023&n)<<10)+(1023&o)+65536)}r+=0==(4294901760&n)?3:4}else r++}return r}var a=o?new TextEncoder:void 0,c="undefined"!=typeof process?200:0,u=(null==a?void 0:a.encodeInto)?function(e,t,r){a.encodeInto(e,t.subarray(r))}:function(e,t,r){t.set(a.encode(e),r)};function d(e,t,r){for(var s=t,o=s+r,i=[],a="";s<o;){var c=e[s++];if(0==(128&c))i.push(c);else if(192==(224&c)){var u=63&e[s++];i.push((31&c)<<6|u)}else if(224==(240&c)){u=63&e[s++];var d=63&e[s++];i.push((31&c)<<12|u<<6|d)}else if(240==(248&c)){var l=(7&c)<<18|(u=63&e[s++])<<12|(d=63&e[s++])<<6|63&e[s++];l>65535&&(l-=65536,i.push(l>>>10&1023|55296),l=56320|1023&l),i.push(l)}else i.push(c);i.length>=4096&&(a+=String.fromCharCode.apply(String,n(i)),i.length=0)}return i.length>0&&(a+=String.fromCharCode.apply(String,n(i))),a}var l=o?new TextDecoder:null,h="undefined"!=typeof process?200:0,p=function(e,t){this.type=e,this.data=t};function f(e,t,r){var s=Math.floor(r/4294967296),n=r;e.setUint32(t,s),e.setUint32(t+4,n)}function g(e,t){var r=e.getInt32(t),s=e.getUint32(t+4),n=r<Math.floor(Number.MIN_SAFE_INTEGER/4294967296)||r===Math.floor(Number.MIN_SAFE_INTEGER/4294967296)&&0===s,o=r>Math.floor(Number.MAX_SAFE_INTEGER/4294967296);return n||o?BigInt(r)*BigInt(4294967296)+BigInt(s):4294967296*r+s}var m=-1;function y(e){var t,r=e.sec,s=e.nsec;if(r>=0&&s>=0&&r<=17179869183){if(0===s&&r<=4294967295){var n=new Uint8Array(4);return(t=new DataView(n.buffer)).setUint32(0,r),n}var o=r/4294967296,i=4294967295&r;return n=new Uint8Array(8),(t=new DataView(n.buffer)).setUint32(0,s<<2|3&o),t.setUint32(4,i),n}return n=new Uint8Array(12),(t=new DataView(n.buffer)).setUint32(0,s),f(t,4,r),n}function b(e){var t=e.getTime(),r=Math.floor(t/1e3),s=1e6*(t-1e3*r),n=Math.floor(s/1e9);return{sec:r+n,nsec:s-1e9*n}}function w(e){return e instanceof Date?y(b(e)):null}function A(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);switch(e.byteLength){case 4:return{sec:t.getUint32(0),nsec:0};case 8:var r=t.getUint32(0);return{sec:4294967296*(3&r)+t.getUint32(4),nsec:r>>>2};case 12:return{sec:g(t,4),nsec:t.getUint32(0)};default:throw new Error("Unrecognized data size for timestamp: "+e.length)}}function v(e){var t=A(e);return new Date(1e3*t.sec+t.nsec/1e6)}var x={type:m,encode:w,decode:v},_=function(){function e(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(x)}return e.prototype.register=function(e){var t=e.type,r=e.encode,s=e.decode;if(t>=0)this.encoders[t]=r,this.decoders[t]=s;else{var n=1+t;this.builtInEncoders[n]=r,this.builtInDecoders[n]=s}},e.prototype.tryToEncode=function(e,t){for(var r=0;r<this.builtInEncoders.length;r++)if(null!=(s=this.builtInEncoders[r])&&null!=(n=s(e,t)))return new p(-1-r,n);for(r=0;r<this.encoders.length;r++){var s,n;if(null!=(s=this.encoders[r])&&null!=(n=s(e,t)))return new p(r,n)}return e instanceof p?e:null},e.prototype.decode=function(e,t,r){var s=t<0?this.builtInDecoders[-1-t]:this.decoders[t];return s?s(e,t,r):new p(t,e)},e.defaultCodec=new e,e}();function S(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e instanceof ArrayBuffer?new Uint8Array(e):Uint8Array.from(e)}var E=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],s=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&s>=e.length&&(e=void 0),{value:e&&e[s++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},T=function(){function e(e,t,r,s,n,o,i,a){void 0===e&&(e=_.defaultCodec),void 0===t&&(t=void 0),void 0===r&&(r=100),void 0===s&&(s=2048),void 0===n&&(n=!1),void 0===o&&(o=!1),void 0===i&&(i=!1),void 0===a&&(a=!1),this.extensionCodec=e,this.context=t,this.maxDepth=r,this.initialBufferSize=s,this.sortKeys=n,this.forceFloat32=o,this.ignoreUndefined=i,this.forceIntegerToFloat=a,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}return e.prototype.getUint8Array=function(){return this.bytes.subarray(0,this.pos)},e.prototype.reinitializeState=function(){this.pos=0},e.prototype.encode=function(e){return this.reinitializeState(),this.doEncode(e,1),this.getUint8Array()},e.prototype.doEncode=function(e,t){if(t>this.maxDepth)throw new Error("Too deep objects in depth "+t);null==e?this.encodeNil():"boolean"==typeof e?this.encodeBoolean(e):"number"==typeof e?this.encodeNumber(e):"string"==typeof e?this.encodeString(e):"bigint"==typeof e?this.encodebigint(e):this.encodeObject(e,t)},e.prototype.ensureBufferSizeToWrite=function(e){var t=this.pos+e;this.view.byteLength<t&&this.resizeBuffer(2*t)},e.prototype.resizeBuffer=function(e){var t=new ArrayBuffer(e),r=new Uint8Array(t),s=new DataView(t);r.set(this.bytes),this.view=s,this.bytes=r},e.prototype.encodeNil=function(){this.writeU8(192)},e.prototype.encodeBoolean=function(e){!1===e?this.writeU8(194):this.writeU8(195)},e.prototype.encodeNumber=function(e){Number.isSafeInteger(e)&&!this.forceIntegerToFloat?e>=0?e<128?this.writeU8(e):e<256?(this.writeU8(204),this.writeU8(e)):e<65536?(this.writeU8(205),this.writeU16(e)):e<4294967296?(this.writeU8(206),this.writeU32(e)):(this.writeU8(207),this.writeU64(e)):e>=-32?this.writeU8(224|e+32):e>=-128?(this.writeU8(208),this.writeI8(e)):e>=-32768?(this.writeU8(209),this.writeI16(e)):e>=-2147483648?(this.writeU8(210),this.writeI32(e)):(this.writeU8(211),this.writeI64(e)):this.forceFloat32?(this.writeU8(202),this.writeF32(e)):(this.writeU8(203),this.writeF64(e))},e.prototype.encodebigint=function(e){e>=BigInt(0)?e<BigInt(128)?this.writeU8(Number(e)):e<BigInt(256)?(this.writeU8(204),this.writeU8(Number(e))):e<BigInt(65536)?(this.writeU8(205),this.writeU16(Number(e))):e<BigInt(4294967296)?(this.writeU8(206),this.writeU32(Number(e))):(this.writeU8(207),this.writeBig64(e)):e>=BigInt(-32)?this.writeU8(224|Number(e)+32):e>=BigInt(-128)?(this.writeU8(208),this.writeI8(Number(e))):e>=BigInt(-32768)?(this.writeU8(209),this.writeI16(Number(e))):e>=BigInt(-2147483648)?(this.writeU8(210),this.writeI32(Number(e))):(this.writeU8(211),this.writeBig64(e))},e.prototype.writeStringHeader=function(e){if(e<32)this.writeU8(160+e);else if(e<256)this.writeU8(217),this.writeU8(e);else if(e<65536)this.writeU8(218),this.writeU16(e);else{if(!(e<4294967296))throw new Error("Too long string: "+e+" bytes in UTF-8");this.writeU8(219),this.writeU32(e)}},e.prototype.encodeString=function(e){var t=e.length;if(o&&t>c){var r=i(e);this.ensureBufferSizeToWrite(5+r),this.writeStringHeader(r),u(e,this.bytes,this.pos),this.pos+=r}else r=i(e),this.ensureBufferSizeToWrite(5+r),this.writeStringHeader(r),function(e,t,r){for(var s=e.length,n=r,o=0;o<s;){var i=e.charCodeAt(o++);if(0!=(4294967168&i)){if(0==(4294965248&i))t[n++]=i>>6&31|192;else{if(i>=55296&&i<=56319&&o<s){var a=e.charCodeAt(o);56320==(64512&a)&&(++o,i=((1023&i)<<10)+(1023&a)+65536)}0==(4294901760&i)?(t[n++]=i>>12&15|224,t[n++]=i>>6&63|128):(t[n++]=i>>18&7|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128)}t[n++]=63&i|128}else t[n++]=i}}(e,this.bytes,this.pos),this.pos+=r},e.prototype.encodeObject=function(e,t){var r=this.extensionCodec.tryToEncode(e,this.context);if(null!=r)this.encodeExtension(r);else if(Array.isArray(e))this.encodeArray(e,t);else if(ArrayBuffer.isView(e))this.encodeBinary(e);else{if("object"!=typeof e)throw new Error("Unrecognized object: "+Object.prototype.toString.apply(e));this.encodeMap(e,t)}},e.prototype.encodeBinary=function(e){var t=e.byteLength;if(t<256)this.writeU8(196),this.writeU8(t);else if(t<65536)this.writeU8(197),this.writeU16(t);else{if(!(t<4294967296))throw new Error("Too large binary: "+t);this.writeU8(198),this.writeU32(t)}var r=S(e);this.writeU8a(r)},e.prototype.encodeArray=function(e,t){var r,s,n=e.length;if(n<16)this.writeU8(144+n);else if(n<65536)this.writeU8(220),this.writeU16(n);else{if(!(n<4294967296))throw new Error("Too large array: "+n);this.writeU8(221),this.writeU32(n)}try{for(var o=E(e),i=o.next();!i.done;i=o.next()){var a=i.value;this.doEncode(a,t+1)}}catch(e){r={error:e}}finally{try{i&&!i.done&&(s=o.return)&&s.call(o)}finally{if(r)throw r.error}}},e.prototype.countWithoutUndefined=function(e,t){var r,s,n=0;try{for(var o=E(t),i=o.next();!i.done;i=o.next())void 0!==e[i.value]&&n++}catch(e){r={error:e}}finally{try{i&&!i.done&&(s=o.return)&&s.call(o)}finally{if(r)throw r.error}}return n},e.prototype.encodeMap=function(e,t){var r,s,n=Object.keys(e);this.sortKeys&&n.sort();var o=this.ignoreUndefined?this.countWithoutUndefined(e,n):n.length;if(o<16)this.writeU8(128+o);else if(o<65536)this.writeU8(222),this.writeU16(o);else{if(!(o<4294967296))throw new Error("Too large map object: "+o);this.writeU8(223),this.writeU32(o)}try{for(var i=E(n),a=i.next();!a.done;a=i.next()){var c=a.value,u=e[c];this.ignoreUndefined&&void 0===u||(this.encodeString(c),this.doEncode(u,t+1))}}catch(e){r={error:e}}finally{try{a&&!a.done&&(s=i.return)&&s.call(i)}finally{if(r)throw r.error}}},e.prototype.encodeExtension=function(e){var t=e.data.length;if(1===t)this.writeU8(212);else if(2===t)this.writeU8(213);else if(4===t)this.writeU8(214);else if(8===t)this.writeU8(215);else if(16===t)this.writeU8(216);else if(t<256)this.writeU8(199),this.writeU8(t);else if(t<65536)this.writeU8(200),this.writeU16(t);else{if(!(t<4294967296))throw new Error("Too large extension object: "+t);this.writeU8(201),this.writeU32(t)}this.writeI8(e.type),this.writeU8a(e.data)},e.prototype.writeU8=function(e){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,e),this.pos++},e.prototype.writeU8a=function(e){var t=e.length;this.ensureBufferSizeToWrite(t),this.bytes.set(e,this.pos),this.pos+=t},e.prototype.writeI8=function(e){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,e),this.pos++},e.prototype.writeU16=function(e){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,e),this.pos+=2},e.prototype.writeI16=function(e){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,e),this.pos+=2},e.prototype.writeU32=function(e){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,e),this.pos+=4},e.prototype.writeI32=function(e){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,e),this.pos+=4},e.prototype.writeF32=function(e){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,e),this.pos+=4},e.prototype.writeF64=function(e){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,e),this.pos+=8},e.prototype.writeU64=function(e){this.ensureBufferSizeToWrite(8),function(e,t,r){var s=r/4294967296,n=r;e.setUint32(t,s),e.setUint32(t+4,n)}(this.view,this.pos,e),this.pos+=8},e.prototype.writeI64=function(e){this.ensureBufferSizeToWrite(8),f(this.view,this.pos,e),this.pos+=8},e.prototype.writeBig64=function(e){this.ensureBufferSizeToWrite(8),function(e,t,r){var s=Number(r/BigInt(4294967296)),n=Number(r%BigInt(4294967296));s<0&&0!==n&&(s-=1),e.setUint32(t,s),e.setUint32(t+4,n)}(this.view,this.pos,e),this.pos+=8},e}(),R={};function B(e,t){return void 0===t&&(t=R),new T(t.extensionCodec,t.context,t.maxDepth,t.initialBufferSize,t.sortKeys,t.forceFloat32,t.ignoreUndefined,t.forceIntegerToFloat).encode(e)}function k(e){return(e<0?"-":"")+"0x"+Math.abs(e).toString(16).padStart(2,"0")}var U=function(){function e(e,t){void 0===e&&(e=16),void 0===t&&(t=16),this.maxKeyLength=e,this.maxLengthPerKey=t,this.hit=0,this.miss=0,this.caches=[];for(var r=0;r<this.maxKeyLength;r++)this.caches.push([])}return e.prototype.canBeCached=function(e){return e>0&&e<=this.maxKeyLength},e.prototype.get=function(e,t,r){var s=this.caches[r-1],n=s.length;e:for(var o=0;o<n;o++){for(var i=s[o],a=i.bytes,c=0;c<r;c++)if(a[c]!==e[t+c])continue e;return i.value}return null},e.prototype.store=function(e,t){var r=this.caches[e.length-1],s={bytes:e,value:t};r.length>=this.maxLengthPerKey?r[Math.random()*r.length|0]=s:r.push(s)},e.prototype.decode=function(e,t,r){var s=this.get(e,t,r);if(null!=s)return this.hit++,s;this.miss++;var n=d(e,t,r),o=Uint8Array.prototype.slice.call(e,t,t+r);return this.store(o,n),n},e}(),I=function(e,t){var r,s,n,o,i={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,s&&(n=2&o[0]?s.return:o[0]?s.throw||((n=s.return)&&n.call(s),0):s.next)&&!(n=n.call(s,o[1])).done)return n;switch(s=0,n&&(o=[2&o[0],n.value]),o[0]){case 0:case 1:n=o;break;case 4:return i.label++,{value:o[1],done:!1};case 5:i.label++,s=o[1],o=[0];continue;case 7:o=i.ops.pop(),i.trys.pop();continue;default:if(!((n=(n=i.trys).length>0&&n[n.length-1])||6!==o[0]&&2!==o[0])){i=0;continue}if(3===o[0]&&(!n||o[1]>n[0]&&o[1]<n[3])){i.label=o[1];break}if(6===o[0]&&i.label<n[1]){i.label=n[1],n=o;break}if(n&&i.label<n[2]){i.label=n[2],i.ops.push(o);break}n[2]&&i.ops.pop(),i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e],s=0}finally{r=n=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},C=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},s("next"),s("throw"),s("return"),t[Symbol.asyncIterator]=function(){return this},t);function s(r){t[r]=e[r]&&function(t){return new Promise((function(s,n){!function(e,t,r,s){Promise.resolve(s).then((function(t){e({value:t,done:r})}),t)}(s,n,(t=e[r](t)).done,t.value)}))}}},D=function(e){return this instanceof D?(this.v=e,this):new D(e)},P=function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s,n=r.apply(e,t||[]),o=[];return s={},i("next"),i("throw"),i("return"),s[Symbol.asyncIterator]=function(){return this},s;function i(e){n[e]&&(s[e]=function(t){return new Promise((function(r,s){o.push([e,t,r,s])>1||a(e,t)}))})}function a(e,t){try{(r=n[e](t)).value instanceof D?Promise.resolve(r.value.v).then(c,u):d(o[0][2],r)}catch(e){d(o[0][3],e)}var r}function c(e){a("next",e)}function u(e){a("throw",e)}function d(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}},N=new DataView(new ArrayBuffer(0)),O=new Uint8Array(N.buffer),L=function(){try{N.getInt8(0)}catch(e){return e.constructor}throw new Error("never reached")}(),F=new L("Insufficient data"),j=new U,z=function(){function e(e,t,r,s,n,o,i,a){void 0===e&&(e=_.defaultCodec),void 0===t&&(t=void 0),void 0===r&&(r=4294967295),void 0===s&&(s=4294967295),void 0===n&&(n=4294967295),void 0===o&&(o=4294967295),void 0===i&&(i=4294967295),void 0===a&&(a=j),this.extensionCodec=e,this.context=t,this.maxStrLength=r,this.maxBinLength=s,this.maxArrayLength=n,this.maxMapLength=o,this.maxExtLength=i,this.keyDecoder=a,this.totalPos=0,this.pos=0,this.view=N,this.bytes=O,this.headByte=-1,this.stack=[]}return e.prototype.reinitializeState=function(){this.totalPos=0,this.headByte=-1},e.prototype.setBuffer=function(e){this.bytes=S(e),this.view=function(e){if(e instanceof ArrayBuffer)return new DataView(e);var t=S(e);return new DataView(t.buffer,t.byteOffset,t.byteLength)}(this.bytes),this.pos=0},e.prototype.appendBuffer=function(e){if(-1!==this.headByte||this.hasRemaining()){var t=this.bytes.subarray(this.pos),r=S(e),s=new Uint8Array(t.length+r.length);s.set(t),s.set(r,t.length),this.setBuffer(s)}else this.setBuffer(e)},e.prototype.hasRemaining=function(e){return void 0===e&&(e=1),this.view.byteLength-this.pos>=e},e.prototype.createNoExtraBytesError=function(e){var t=this.view,r=this.pos;return new RangeError("Extra "+(t.byteLength-r)+" of "+t.byteLength+" byte(s) found at buffer["+e+"]")},e.prototype.decode=function(e){return this.reinitializeState(),this.setBuffer(e),this.doDecodeSingleSync()},e.prototype.doDecodeSingleSync=function(){var e=this.doDecodeSync();if(this.hasRemaining())throw this.createNoExtraBytesError(this.pos);return e},e.prototype.decodeAsync=function(e){var t,r,s,n;return function(e,t,r,s){return new(r||(r=Promise))((function(n,o){function i(e){try{c(s.next(e))}catch(e){o(e)}}function a(e){try{c(s.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,a)}c((s=s.apply(e,t||[])).next())}))}(this,void 0,void 0,(function(){var o,i,a,c,u,d,l,h;return I(this,(function(p){switch(p.label){case 0:o=!1,p.label=1;case 1:p.trys.push([1,6,7,12]),t=C(e),p.label=2;case 2:return[4,t.next()];case 3:if((r=p.sent()).done)return[3,5];if(a=r.value,o)throw this.createNoExtraBytesError(this.totalPos);this.appendBuffer(a);try{i=this.doDecodeSync(),o=!0}catch(e){if(!(e instanceof L))throw e}this.totalPos+=this.pos,p.label=4;case 4:return[3,2];case 5:return[3,12];case 6:return c=p.sent(),s={error:c},[3,12];case 7:return p.trys.push([7,,10,11]),r&&!r.done&&(n=t.return)?[4,n.call(t)]:[3,9];case 8:p.sent(),p.label=9;case 9:return[3,11];case 10:if(s)throw s.error;return[7];case 11:return[7];case 12:if(o){if(this.hasRemaining())throw this.createNoExtraBytesError(this.totalPos);return[2,i]}throw d=(u=this).headByte,l=u.pos,h=u.totalPos,new RangeError("Insufficient data in parcing "+k(d)+" at "+h+" ("+l+" in the current buffer)")}}))}))},e.prototype.decodeArrayStream=function(e){return this.decodeMultiAsync(e,!0)},e.prototype.decodeStream=function(e){return this.decodeMultiAsync(e,!1)},e.prototype.decodeMultiAsync=function(e,t){return P(this,arguments,(function(){var r,s,n,o,i,a,c,u,d;return I(this,(function(l){switch(l.label){case 0:r=t,s=-1,l.label=1;case 1:l.trys.push([1,13,14,19]),n=C(e),l.label=2;case 2:return[4,D(n.next())];case 3:if((o=l.sent()).done)return[3,12];if(i=o.value,t&&0===s)throw this.createNoExtraBytesError(this.totalPos);this.appendBuffer(i),r&&(s=this.readArraySize(),r=!1,this.complete()),l.label=4;case 4:l.trys.push([4,9,,10]),l.label=5;case 5:return[4,D(this.doDecodeSync())];case 6:return[4,l.sent()];case 7:return l.sent(),0==--s?[3,8]:[3,5];case 8:return[3,10];case 9:if(!((a=l.sent())instanceof L))throw a;return[3,10];case 10:this.totalPos+=this.pos,l.label=11;case 11:return[3,2];case 12:return[3,19];case 13:return c=l.sent(),u={error:c},[3,19];case 14:return l.trys.push([14,,17,18]),o&&!o.done&&(d=n.return)?[4,D(d.call(n))]:[3,16];case 15:l.sent(),l.label=16;case 16:return[3,18];case 17:if(u)throw u.error;return[7];case 18:return[7];case 19:return[2]}}))}))},e.prototype.doDecodeSync=function(){e:for(;;){var e=this.readHeadByte(),t=void 0;if(e>=224)t=e-256;else if(e<192)if(e<128)t=e;else if(e<144){if(0!=(s=e-128)){this.pushMapState(s),this.complete();continue e}t={}}else if(e<160){if(0!=(s=e-144)){this.pushArrayState(s),this.complete();continue e}t=[]}else{var r=e-160;t=this.decodeUtf8String(r,0)}else if(192===e)t=null;else if(194===e)t=!1;else if(195===e)t=!0;else if(202===e)t=this.readF32();else if(203===e)t=this.readF64();else if(204===e)t=this.readU8();else if(205===e)t=this.readU16();else if(206===e)t=this.readU32();else if(207===e)t=this.readU64();else if(208===e)t=this.readI8();else if(209===e)t=this.readI16();else if(210===e)t=this.readI32();else if(211===e)t=this.readI64();else if(217===e)r=this.lookU8(),t=this.decodeUtf8String(r,1);else if(218===e)r=this.lookU16(),t=this.decodeUtf8String(r,2);else if(219===e)r=this.lookU32(),t=this.decodeUtf8String(r,4);else if(220===e){if(0!==(s=this.readU16())){this.pushArrayState(s),this.complete();continue e}t=[]}else if(221===e){if(0!==(s=this.readU32())){this.pushArrayState(s),this.complete();continue e}t=[]}else if(222===e){if(0!==(s=this.readU16())){this.pushMapState(s),this.complete();continue e}t={}}else if(223===e){if(0!==(s=this.readU32())){this.pushMapState(s),this.complete();continue e}t={}}else if(196===e){var s=this.lookU8();t=this.decodeBinary(s,1)}else if(197===e)s=this.lookU16(),t=this.decodeBinary(s,2);else if(198===e)s=this.lookU32(),t=this.decodeBinary(s,4);else if(212===e)t=this.decodeExtension(1,0);else if(213===e)t=this.decodeExtension(2,0);else if(214===e)t=this.decodeExtension(4,0);else if(215===e)t=this.decodeExtension(8,0);else if(216===e)t=this.decodeExtension(16,0);else if(199===e)s=this.lookU8(),t=this.decodeExtension(s,1);else if(200===e)s=this.lookU16(),t=this.decodeExtension(s,2);else{if(201!==e)throw new Error("Unrecognized type byte: "+k(e));s=this.lookU32(),t=this.decodeExtension(s,4)}this.complete();for(var n=this.stack;n.length>0;){var o=n[n.length-1];if(0===o.type){if(o.array[o.position]=t,o.position++,o.position!==o.size)continue e;n.pop(),t=o.array}else{if(1===o.type){if(void 0,"string"!=(i=typeof t)&&"number"!==i)throw new Error("The type of key must be string or number but "+typeof t);o.key=t,o.type=2;continue e}if(o.map[o.key]=t,o.readCount++,o.readCount!==o.size){o.key=null,o.type=1;continue e}n.pop(),t=o.map}}return t}var i},e.prototype.readHeadByte=function(){return-1===this.headByte&&(this.headByte=this.readU8()),this.headByte},e.prototype.complete=function(){this.headByte=-1},e.prototype.readArraySize=function(){var e=this.readHeadByte();switch(e){case 220:return this.readU16();case 221:return this.readU32();default:if(e<160)return e-144;throw new Error("Unrecognized array type byte: "+k(e))}},e.prototype.pushMapState=function(e){if(e>this.maxMapLength)throw new Error("Max length exceeded: map length ("+e+") > maxMapLengthLength ("+this.maxMapLength+")");this.stack.push({type:1,size:e,key:null,readCount:0,map:{}})},e.prototype.pushArrayState=function(e){if(e>this.maxArrayLength)throw new Error("Max length exceeded: array length ("+e+") > maxArrayLength ("+this.maxArrayLength+")");this.stack.push({type:0,size:e,array:new Array(e),position:0})},e.prototype.decodeUtf8String=function(e,t){var r;if(e>this.maxStrLength)throw new Error("Max length exceeded: UTF-8 byte length ("+e+") > maxStrLength ("+this.maxStrLength+")");if(this.bytes.byteLength<this.pos+t+e)throw F;var s,n=this.pos+t;return s=this.stateIsMapKey()&&(null===(r=this.keyDecoder)||void 0===r?void 0:r.canBeCached(e))?this.keyDecoder.decode(this.bytes,n,e):o&&e>h?function(e,t,r){var s=e.subarray(t,t+r);return l.decode(s)}(this.bytes,n,e):d(this.bytes,n,e),this.pos+=t+e,s},e.prototype.stateIsMapKey=function(){return this.stack.length>0&&1===this.stack[this.stack.length-1].type},e.prototype.decodeBinary=function(e,t){if(e>this.maxBinLength)throw new Error("Max length exceeded: bin length ("+e+") > maxBinLength ("+this.maxBinLength+")");if(!this.hasRemaining(e+t))throw F;var r=this.pos+t,s=this.bytes.subarray(r,r+e);return this.pos+=t+e,s},e.prototype.decodeExtension=function(e,t){if(e>this.maxExtLength)throw new Error("Max length exceeded: ext length ("+e+") > maxExtLength ("+this.maxExtLength+")");var r=this.view.getInt8(this.pos+t),s=this.decodeBinary(e,t+1);return this.extensionCodec.decode(s,r,this.context)},e.prototype.lookU8=function(){return this.view.getUint8(this.pos)},e.prototype.lookU16=function(){return this.view.getUint16(this.pos)},e.prototype.lookU32=function(){return this.view.getUint32(this.pos)},e.prototype.readU8=function(){var e=this.view.getUint8(this.pos);return this.pos++,e},e.prototype.readI8=function(){var e=this.view.getInt8(this.pos);return this.pos++,e},e.prototype.readU16=function(){var e=this.view.getUint16(this.pos);return this.pos+=2,e},e.prototype.readI16=function(){var e=this.view.getInt16(this.pos);return this.pos+=2,e},e.prototype.readU32=function(){var e=this.view.getUint32(this.pos);return this.pos+=4,e},e.prototype.readI32=function(){var e=this.view.getInt32(this.pos);return this.pos+=4,e},e.prototype.readU64=function(){var e,t,r,s,n=(e=this.view,t=this.pos,r=e.getUint32(t),s=e.getUint32(t+4),r>Math.floor(Number.MAX_SAFE_INTEGER/4294967296)?BigInt(r)*BigInt(4294967296)+BigInt(s):4294967296*r+s);return this.pos+=8,n},e.prototype.readI64=function(){var e=g(this.view,this.pos);return this.pos+=8,e},e.prototype.readF32=function(){var e=this.view.getFloat32(this.pos);return this.pos+=4,e},e.prototype.readF64=function(){var e=this.view.getFloat64(this.pos);return this.pos+=8,e},e}(),q={};function M(e,t){return void 0===t&&(t=q),new z(t.extensionCodec,t.context,t.maxStrLength,t.maxBinLength,t.maxArrayLength,t.maxMapLength,t.maxExtLength).decode(e)}var $=function(e,t){var r,s,n,o,i={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,s&&(n=2&o[0]?s.return:o[0]?s.throw||((n=s.return)&&n.call(s),0):s.next)&&!(n=n.call(s,o[1])).done)return n;switch(s=0,n&&(o=[2&o[0],n.value]),o[0]){case 0:case 1:n=o;break;case 4:return i.label++,{value:o[1],done:!1};case 5:i.label++,s=o[1],o=[0];continue;case 7:o=i.ops.pop(),i.trys.pop();continue;default:if(!((n=(n=i.trys).length>0&&n[n.length-1])||6!==o[0]&&2!==o[0])){i=0;continue}if(3===o[0]&&(!n||o[1]>n[0]&&o[1]<n[3])){i.label=o[1];break}if(6===o[0]&&i.label<n[1]){i.label=n[1],n=o;break}if(n&&i.label<n[2]){i.label=n[2],i.ops.push(o);break}n[2]&&i.ops.pop(),i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e],s=0}finally{r=n=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},H=function(e){return this instanceof H?(this.v=e,this):new H(e)},K=function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s,n=r.apply(e,t||[]),o=[];return s={},i("next"),i("throw"),i("return"),s[Symbol.asyncIterator]=function(){return this},s;function i(e){n[e]&&(s[e]=function(t){return new Promise((function(r,s){o.push([e,t,r,s])>1||a(e,t)}))})}function a(e,t){try{(r=n[e](t)).value instanceof H?Promise.resolve(r.value.v).then(c,u):d(o[0][2],r)}catch(e){d(o[0][3],e)}var r}function c(e){a("next",e)}function u(e){a("throw",e)}function d(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}};function G(e){if(null==e)throw new Error("Assertion Failure: value must not be null nor undefined")}function V(e){return null!=e[Symbol.asyncIterator]?e:function(e){return K(this,arguments,(function(){var t,r,s,n;return $(this,(function(o){switch(o.label){case 0:t=e.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,H(t.read())];case 3:return r=o.sent(),s=r.done,n=r.value,s?[4,H(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return G(n),[4,H(n)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))}(e)}function W(e,t){return void 0===t&&(t=q),function(e,t,r,s){return new(r||(r=Promise))((function(n,o){function i(e){try{c(s.next(e))}catch(e){o(e)}}function a(e){try{c(s.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,a)}c((s=s.apply(e,t||[])).next())}))}(this,void 0,void 0,(function(){var r;return function(e,t){var r,s,n,o,i={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,s&&(n=2&o[0]?s.return:o[0]?s.throw||((n=s.return)&&n.call(s),0):s.next)&&!(n=n.call(s,o[1])).done)return n;switch(s=0,n&&(o=[2&o[0],n.value]),o[0]){case 0:case 1:n=o;break;case 4:return i.label++,{value:o[1],done:!1};case 5:i.label++,s=o[1],o=[0];continue;case 7:o=i.ops.pop(),i.trys.pop();continue;default:if(!((n=(n=i.trys).length>0&&n[n.length-1])||6!==o[0]&&2!==o[0])){i=0;continue}if(3===o[0]&&(!n||o[1]>n[0]&&o[1]<n[3])){i.label=o[1];break}if(6===o[0]&&i.label<n[1]){i.label=n[1],n=o;break}if(n&&i.label<n[2]){i.label=n[2],i.ops.push(o);break}n[2]&&i.ops.pop(),i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e],s=0}finally{r=n=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}(this,(function(s){return r=V(e),[2,new z(t.extensionCodec,t.context,t.maxStrLength,t.maxBinLength,t.maxArrayLength,t.maxMapLength,t.maxExtLength).decodeAsync(r)]}))}))}function Z(e,t){void 0===t&&(t=q);var r=V(e);return new z(t.extensionCodec,t.context,t.maxStrLength,t.maxBinLength,t.maxArrayLength,t.maxMapLength,t.maxExtLength).decodeArrayStream(r)}function X(e,t){void 0===t&&(t=q);var r=V(e);return new z(t.extensionCodec,t.context,t.maxStrLength,t.maxBinLength,t.maxArrayLength,t.maxMapLength,t.maxExtLength).decodeStream(r)}}])},5155:(e,t)=>{"use strict";t.byteLength=function(e){var t=c(e),r=t[0],s=t[1];return 3*(r+s)/4-s},t.toByteArray=function(e){var t,r,o=c(e),i=o[0],a=o[1],u=new n(function(e,t,r){return 3*(t+r)/4-r}(0,i,a)),d=0,l=a>0?i-4:i;for(r=0;r<l;r+=4)t=s[e.charCodeAt(r)]<<18|s[e.charCodeAt(r+1)]<<12|s[e.charCodeAt(r+2)]<<6|s[e.charCodeAt(r+3)],u[d++]=t>>16&255,u[d++]=t>>8&255,u[d++]=255&t;return 2===a&&(t=s[e.charCodeAt(r)]<<2|s[e.charCodeAt(r+1)]>>4,u[d++]=255&t),1===a&&(t=s[e.charCodeAt(r)]<<10|s[e.charCodeAt(r+1)]<<4|s[e.charCodeAt(r+2)]>>2,u[d++]=t>>8&255,u[d++]=255&t),u},t.fromByteArray=function(e){for(var t,s=e.length,n=s%3,o=[],i=16383,a=0,c=s-n;a<c;a+=i)o.push(u(e,a,a+i>c?c:a+i));return 1===n?(t=e[s-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===n&&(t=(e[s-2]<<8)+e[s-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],s=[],n="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,a=o.length;i<a;++i)r[i]=o[i],s[o.charCodeAt(i)]=i;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,s){for(var n,o,i=[],a=t;a<s;a+=3)n=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),i.push(r[(o=n)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return i.join("")}s["-".charCodeAt(0)]=62,s["_".charCodeAt(0)]=63},5117:function(e,t,r){var s;!function(n){"use strict";var o,i=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,a=Math.ceil,c=Math.floor,u="[BigNumber Error] ",d=u+"Number primitive has more than 15 significant digits: ",l=1e14,h=14,p=9007199254740991,f=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],g=1e7,m=1e9;function y(e){var t=0|e;return e>0||e===t?t:t-1}function b(e){for(var t,r,s=1,n=e.length,o=e[0]+"";s<n;){for(t=e[s++]+"",r=h-t.length;r--;t="0"+t);o+=t}for(n=o.length;48===o.charCodeAt(--n););return o.slice(0,n+1||1)}function w(e,t){var r,s,n=e.c,o=t.c,i=e.s,a=t.s,c=e.e,u=t.e;if(!i||!a)return null;if(r=n&&!n[0],s=o&&!o[0],r||s)return r?s?0:-a:i;if(i!=a)return i;if(r=i<0,s=c==u,!n||!o)return s?0:!n^r?1:-1;if(!s)return c>u^r?1:-1;for(a=(c=n.length)<(u=o.length)?c:u,i=0;i<a;i++)if(n[i]!=o[i])return n[i]>o[i]^r?1:-1;return c==u?0:c>u^r?1:-1}function A(e,t,r,s){if(e<t||e>r||e!==c(e))throw Error(u+(s||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function v(e){var t=e.c.length-1;return y(e.e/h)==t&&e.c[t]%2!=0}function x(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function _(e,t,r){var s,n;if(t<0){for(n=r+".";++t;n+=r);e=n+e}else if(++t>(s=e.length)){for(n=r,t-=s;--t;n+=r);e+=n}else t<s&&(e=e.slice(0,t)+"."+e.slice(t));return e}(o=function e(t){var r,s,n,o,S,E,T,R,B,k,U=$.prototype={constructor:$,toString:null,valueOf:null},I=new $(1),C=20,D=4,P=-7,N=21,O=-1e7,L=1e7,F=!1,j=1,z=0,q={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},M="0123456789abcdefghijklmnopqrstuvwxyz";function $(e,t){var r,o,a,u,l,f,g,m,y=this;if(!(y instanceof $))return new $(e,t);if(null==t){if(e&&!0===e._isBigNumber)return y.s=e.s,void(!e.c||e.e>L?y.c=y.e=null:e.e<O?y.c=[y.e=0]:(y.e=e.e,y.c=e.c.slice()));if((f="number"==typeof e)&&0*e==0){if(y.s=1/e<0?(e=-e,-1):1,e===~~e){for(u=0,l=e;l>=10;l/=10,u++);return void(u>L?y.c=y.e=null:(y.e=u,y.c=[e]))}m=String(e)}else{if(!i.test(m=String(e)))return n(y,m,f);y.s=45==m.charCodeAt(0)?(m=m.slice(1),-1):1}(u=m.indexOf("."))>-1&&(m=m.replace(".","")),(l=m.search(/e/i))>0?(u<0&&(u=l),u+=+m.slice(l+1),m=m.substring(0,l)):u<0&&(u=m.length)}else{if(A(t,2,M.length,"Base"),10==t)return V(y=new $(e),C+y.e+1,D);if(m=String(e),f="number"==typeof e){if(0*e!=0)return n(y,m,f,t);if(y.s=1/e<0?(m=m.slice(1),-1):1,$.DEBUG&&m.replace(/^0\.0*|\./,"").length>15)throw Error(d+e)}else y.s=45===m.charCodeAt(0)?(m=m.slice(1),-1):1;for(r=M.slice(0,t),u=l=0,g=m.length;l<g;l++)if(r.indexOf(o=m.charAt(l))<0){if("."==o){if(l>u){u=g;continue}}else if(!a&&(m==m.toUpperCase()&&(m=m.toLowerCase())||m==m.toLowerCase()&&(m=m.toUpperCase()))){a=!0,l=-1,u=0;continue}return n(y,String(e),f,t)}f=!1,(u=(m=s(m,t,10,y.s)).indexOf("."))>-1?m=m.replace(".",""):u=m.length}for(l=0;48===m.charCodeAt(l);l++);for(g=m.length;48===m.charCodeAt(--g););if(m=m.slice(l,++g)){if(g-=l,f&&$.DEBUG&&g>15&&(e>p||e!==c(e)))throw Error(d+y.s*e);if((u=u-l-1)>L)y.c=y.e=null;else if(u<O)y.c=[y.e=0];else{if(y.e=u,y.c=[],l=(u+1)%h,u<0&&(l+=h),l<g){for(l&&y.c.push(+m.slice(0,l)),g-=h;l<g;)y.c.push(+m.slice(l,l+=h));l=h-(m=m.slice(l)).length}else l-=g;for(;l--;m+="0");y.c.push(+m)}}else y.c=[y.e=0]}function H(e,t,r,s){var n,o,i,a,c;if(null==r?r=D:A(r,0,8),!e.c)return e.toString();if(n=e.c[0],i=e.e,null==t)c=b(e.c),c=1==s||2==s&&(i<=P||i>=N)?x(c,i):_(c,i,"0");else if(o=(e=V(new $(e),t,r)).e,a=(c=b(e.c)).length,1==s||2==s&&(t<=o||o<=P)){for(;a<t;c+="0",a++);c=x(c,o)}else if(t-=i,c=_(c,o,"0"),o+1>a){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=o-a)>0)for(o+1==a&&(c+=".");t--;c+="0");return e.s<0&&n?"-"+c:c}function K(e,t){for(var r,s=1,n=new $(e[0]);s<e.length;s++){if(!(r=new $(e[s])).s){n=r;break}t.call(n,r)&&(n=r)}return n}function G(e,t,r){for(var s=1,n=t.length;!t[--n];t.pop());for(n=t[0];n>=10;n/=10,s++);return(r=s+r*h-1)>L?e.c=e.e=null:r<O?e.c=[e.e=0]:(e.e=r,e.c=t),e}function V(e,t,r,s){var n,o,i,u,d,p,g,m=e.c,y=f;if(m){e:{for(n=1,u=m[0];u>=10;u/=10,n++);if((o=t-n)<0)o+=h,i=t,g=(d=m[p=0])/y[n-i-1]%10|0;else if((p=a((o+1)/h))>=m.length){if(!s)break e;for(;m.length<=p;m.push(0));d=g=0,n=1,i=(o%=h)-h+1}else{for(d=u=m[p],n=1;u>=10;u/=10,n++);g=(i=(o%=h)-h+n)<0?0:d/y[n-i-1]%10|0}if(s=s||t<0||null!=m[p+1]||(i<0?d:d%y[n-i-1]),s=r<4?(g||s)&&(0==r||r==(e.s<0?3:2)):g>5||5==g&&(4==r||s||6==r&&(o>0?i>0?d/y[n-i]:0:m[p-1])%10&1||r==(e.s<0?8:7)),t<1||!m[0])return m.length=0,s?(t-=e.e+1,m[0]=y[(h-t%h)%h],e.e=-t||0):m[0]=e.e=0,e;if(0==o?(m.length=p,u=1,p--):(m.length=p+1,u=y[h-o],m[p]=i>0?c(d/y[n-i]%y[i])*u:0),s)for(;;){if(0==p){for(o=1,i=m[0];i>=10;i/=10,o++);for(i=m[0]+=u,u=1;i>=10;i/=10,u++);o!=u&&(e.e++,m[0]==l&&(m[0]=1));break}if(m[p]+=u,m[p]!=l)break;m[p--]=0,u=1}for(o=m.length;0===m[--o];m.pop());}e.e>L?e.c=e.e=null:e.e<O&&(e.c=[e.e=0])}return e}function W(e){var t,r=e.e;return null===r?e.toString():(t=b(e.c),t=r<=P||r>=N?x(t,r):_(t,r,"0"),e.s<0?"-"+t:t)}return $.clone=e,$.ROUND_UP=0,$.ROUND_DOWN=1,$.ROUND_CEIL=2,$.ROUND_FLOOR=3,$.ROUND_HALF_UP=4,$.ROUND_HALF_DOWN=5,$.ROUND_HALF_EVEN=6,$.ROUND_HALF_CEIL=7,$.ROUND_HALF_FLOOR=8,$.EUCLID=9,$.config=$.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(u+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(A(r=e[t],0,m,t),C=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(A(r=e[t],0,8,t),D=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(A(r[0],-m,0,t),A(r[1],0,m,t),P=r[0],N=r[1]):(A(r,-m,m,t),P=-(N=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)A(r[0],-m,-1,t),A(r[1],1,m,t),O=r[0],L=r[1];else{if(A(r,-m,m,t),!r)throw Error(u+t+" cannot be zero: "+r);O=-(L=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(u+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw F=!r,Error(u+"crypto unavailable");F=r}else F=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(A(r=e[t],0,9,t),j=r),e.hasOwnProperty(t="POW_PRECISION")&&(A(r=e[t],0,m,t),z=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(u+t+" not an object: "+r);q=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(u+t+" invalid: "+r);M=r}}return{DECIMAL_PLACES:C,ROUNDING_MODE:D,EXPONENTIAL_AT:[P,N],RANGE:[O,L],CRYPTO:F,MODULO_MODE:j,POW_PRECISION:z,FORMAT:q,ALPHABET:M}},$.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!$.DEBUG)return!0;var t,r,s=e.c,n=e.e,o=e.s;e:if("[object Array]"=={}.toString.call(s)){if((1===o||-1===o)&&n>=-m&&n<=m&&n===c(n)){if(0===s[0]){if(0===n&&1===s.length)return!0;break e}if((t=(n+1)%h)<1&&(t+=h),String(s[0]).length==t){for(t=0;t<s.length;t++)if((r=s[t])<0||r>=l||r!==c(r))break e;if(0!==r)return!0}}}else if(null===s&&null===n&&(null===o||1===o||-1===o))return!0;throw Error(u+"Invalid BigNumber: "+e)},$.maximum=$.max=function(){return K(arguments,U.lt)},$.minimum=$.min=function(){return K(arguments,U.gt)},$.random=(o=9007199254740992,S=Math.random()*o&2097151?function(){return c(Math.random()*o)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,s,n,o,i=0,d=[],l=new $(I);if(null==e?e=C:A(e,0,m),n=a(e/h),F)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(n*=2));i<n;)(o=131072*t[i]+(t[i+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[i]=r[0],t[i+1]=r[1]):(d.push(o%1e14),i+=2);i=n/2}else{if(!crypto.randomBytes)throw F=!1,Error(u+"crypto unavailable");for(t=crypto.randomBytes(n*=7);i<n;)(o=281474976710656*(31&t[i])+1099511627776*t[i+1]+4294967296*t[i+2]+16777216*t[i+3]+(t[i+4]<<16)+(t[i+5]<<8)+t[i+6])>=9e15?crypto.randomBytes(7).copy(t,i):(d.push(o%1e14),i+=7);i=n/7}if(!F)for(;i<n;)(o=S())<9e15&&(d[i++]=o%1e14);for(n=d[--i],e%=h,n&&e&&(o=f[h-e],d[i]=c(n/o)*o);0===d[i];d.pop(),i--);if(i<0)d=[s=0];else{for(s=-1;0===d[0];d.splice(0,1),s-=h);for(i=1,o=d[0];o>=10;o/=10,i++);i<h&&(s-=h-i)}return l.e=s,l.c=d,l}),$.sum=function(){for(var e=1,t=arguments,r=new $(t[0]);e<t.length;)r=r.plus(t[e++]);return r},s=function(){var e="0123456789";function t(e,t,r,s){for(var n,o,i=[0],a=0,c=e.length;a<c;){for(o=i.length;o--;i[o]*=t);for(i[0]+=s.indexOf(e.charAt(a++)),n=0;n<i.length;n++)i[n]>r-1&&(null==i[n+1]&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}return function(s,n,o,i,a){var c,u,d,l,h,p,f,g,m=s.indexOf("."),y=C,w=D;for(m>=0&&(l=z,z=0,s=s.replace(".",""),p=(g=new $(n)).pow(s.length-m),z=l,g.c=t(_(b(p.c),p.e,"0"),10,o,e),g.e=g.c.length),d=l=(f=t(s,n,o,a?(c=M,e):(c=e,M))).length;0==f[--l];f.pop());if(!f[0])return c.charAt(0);if(m<0?--d:(p.c=f,p.e=d,p.s=i,f=(p=r(p,g,y,w,o)).c,h=p.r,d=p.e),m=f[u=d+y+1],l=o/2,h=h||u<0||null!=f[u+1],h=w<4?(null!=m||h)&&(0==w||w==(p.s<0?3:2)):m>l||m==l&&(4==w||h||6==w&&1&f[u-1]||w==(p.s<0?8:7)),u<1||!f[0])s=h?_(c.charAt(1),-y,c.charAt(0)):c.charAt(0);else{if(f.length=u,h)for(--o;++f[--u]>o;)f[u]=0,u||(++d,f=[1].concat(f));for(l=f.length;!f[--l];);for(m=0,s="";m<=l;s+=c.charAt(f[m++]));s=_(s,d,c.charAt(0))}return s}}(),r=function(){function e(e,t,r){var s,n,o,i,a=0,c=e.length,u=t%g,d=t/g|0;for(e=e.slice();c--;)a=((n=u*(o=e[c]%g)+(s=d*o+(i=e[c]/g|0)*u)%g*g+a)/r|0)+(s/g|0)+d*i,e[c]=n%r;return a&&(e=[a].concat(e)),e}function t(e,t,r,s){var n,o;if(r!=s)o=r>s?1:-1;else for(n=o=0;n<r;n++)if(e[n]!=t[n]){o=e[n]>t[n]?1:-1;break}return o}function r(e,t,r,s){for(var n=0;r--;)e[r]-=n,n=e[r]<t[r]?1:0,e[r]=n*s+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(s,n,o,i,a){var u,d,p,f,g,m,b,w,A,v,x,_,S,E,T,R,B,k=s.s==n.s?1:-1,U=s.c,I=n.c;if(!(U&&U[0]&&I&&I[0]))return new $(s.s&&n.s&&(U?!I||U[0]!=I[0]:I)?U&&0==U[0]||!I?0*k:k/0:NaN);for(A=(w=new $(k)).c=[],k=o+(d=s.e-n.e)+1,a||(a=l,d=y(s.e/h)-y(n.e/h),k=k/h|0),p=0;I[p]==(U[p]||0);p++);if(I[p]>(U[p]||0)&&d--,k<0)A.push(1),f=!0;else{for(E=U.length,R=I.length,p=0,k+=2,(g=c(a/(I[0]+1)))>1&&(I=e(I,g,a),U=e(U,g,a),R=I.length,E=U.length),S=R,x=(v=U.slice(0,R)).length;x<R;v[x++]=0);B=I.slice(),B=[0].concat(B),T=I[0],I[1]>=a/2&&T++;do{if(g=0,(u=t(I,v,R,x))<0){if(_=v[0],R!=x&&(_=_*a+(v[1]||0)),(g=c(_/T))>1)for(g>=a&&(g=a-1),b=(m=e(I,g,a)).length,x=v.length;1==t(m,v,b,x);)g--,r(m,R<b?B:I,b,a),b=m.length,u=1;else 0==g&&(u=g=1),b=(m=I.slice()).length;if(b<x&&(m=[0].concat(m)),r(v,m,x,a),x=v.length,-1==u)for(;t(I,v,R,x)<1;)g++,r(v,R<x?B:I,x,a),x=v.length}else 0===u&&(g++,v=[0]);A[p++]=g,v[0]?v[x++]=U[S]||0:(v=[U[S]],x=1)}while((S++<E||null!=v[0])&&k--);f=null!=v[0],A[0]||A.splice(0,1)}if(a==l){for(p=1,k=A[0];k>=10;k/=10,p++);V(w,o+(w.e=p+d*h-1)+1,i,f)}else w.e=d,w.r=+f;return w}}(),E=/^(-?)0([xbo])(?=\w[\w.]*$)/i,T=/^([^.]+)\.$/,R=/^\.([^.]+)$/,B=/^-?(Infinity|NaN)$/,k=/^\s*\+(?=[\w.])|^\s+|\s+$/g,n=function(e,t,r,s){var n,o=r?t:t.replace(k,"");if(B.test(o))e.s=isNaN(o)?null:o<0?-1:1;else{if(!r&&(o=o.replace(E,(function(e,t,r){return n="x"==(r=r.toLowerCase())?16:"b"==r?2:8,s&&s!=n?e:t})),s&&(n=s,o=o.replace(T,"$1").replace(R,"0.$1")),t!=o))return new $(o,n);if($.DEBUG)throw Error(u+"Not a"+(s?" base "+s:"")+" number: "+t);e.s=null}e.c=e.e=null},U.absoluteValue=U.abs=function(){var e=new $(this);return e.s<0&&(e.s=1),e},U.comparedTo=function(e,t){return w(this,new $(e,t))},U.decimalPlaces=U.dp=function(e,t){var r,s,n,o=this;if(null!=e)return A(e,0,m),null==t?t=D:A(t,0,8),V(new $(o),e+o.e+1,t);if(!(r=o.c))return null;if(s=((n=r.length-1)-y(this.e/h))*h,n=r[n])for(;n%10==0;n/=10,s--);return s<0&&(s=0),s},U.dividedBy=U.div=function(e,t){return r(this,new $(e,t),C,D)},U.dividedToIntegerBy=U.idiv=function(e,t){return r(this,new $(e,t),0,1)},U.exponentiatedBy=U.pow=function(e,t){var r,s,n,o,i,d,l,p,f=this;if((e=new $(e)).c&&!e.isInteger())throw Error(u+"Exponent not an integer: "+W(e));if(null!=t&&(t=new $(t)),i=e.e>14,!f.c||!f.c[0]||1==f.c[0]&&!f.e&&1==f.c.length||!e.c||!e.c[0])return p=new $(Math.pow(+W(f),i?2-v(e):+W(e))),t?p.mod(t):p;if(d=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new $(NaN);(s=!d&&f.isInteger()&&t.isInteger())&&(f=f.mod(t))}else{if(e.e>9&&(f.e>0||f.e<-1||(0==f.e?f.c[0]>1||i&&f.c[1]>=24e7:f.c[0]<8e13||i&&f.c[0]<=9999975e7)))return o=f.s<0&&v(e)?-0:0,f.e>-1&&(o=1/o),new $(d?1/o:o);z&&(o=a(z/h+2))}for(i?(r=new $(.5),d&&(e.s=1),l=v(e)):l=(n=Math.abs(+W(e)))%2,p=new $(I);;){if(l){if(!(p=p.times(f)).c)break;o?p.c.length>o&&(p.c.length=o):s&&(p=p.mod(t))}if(n){if(0===(n=c(n/2)))break;l=n%2}else if(V(e=e.times(r),e.e+1,1),e.e>14)l=v(e);else{if(0==(n=+W(e)))break;l=n%2}f=f.times(f),o?f.c&&f.c.length>o&&(f.c.length=o):s&&(f=f.mod(t))}return s?p:(d&&(p=I.div(p)),t?p.mod(t):o?V(p,z,D,void 0):p)},U.integerValue=function(e){var t=new $(this);return null==e?e=D:A(e,0,8),V(t,t.e+1,e)},U.isEqualTo=U.eq=function(e,t){return 0===w(this,new $(e,t))},U.isFinite=function(){return!!this.c},U.isGreaterThan=U.gt=function(e,t){return w(this,new $(e,t))>0},U.isGreaterThanOrEqualTo=U.gte=function(e,t){return 1===(t=w(this,new $(e,t)))||0===t},U.isInteger=function(){return!!this.c&&y(this.e/h)>this.c.length-2},U.isLessThan=U.lt=function(e,t){return w(this,new $(e,t))<0},U.isLessThanOrEqualTo=U.lte=function(e,t){return-1===(t=w(this,new $(e,t)))||0===t},U.isNaN=function(){return!this.s},U.isNegative=function(){return this.s<0},U.isPositive=function(){return this.s>0},U.isZero=function(){return!!this.c&&0==this.c[0]},U.minus=function(e,t){var r,s,n,o,i=this,a=i.s;if(t=(e=new $(e,t)).s,!a||!t)return new $(NaN);if(a!=t)return e.s=-t,i.plus(e);var c=i.e/h,u=e.e/h,d=i.c,p=e.c;if(!c||!u){if(!d||!p)return d?(e.s=-t,e):new $(p?i:NaN);if(!d[0]||!p[0])return p[0]?(e.s=-t,e):new $(d[0]?i:3==D?-0:0)}if(c=y(c),u=y(u),d=d.slice(),a=c-u){for((o=a<0)?(a=-a,n=d):(u=c,n=p),n.reverse(),t=a;t--;n.push(0));n.reverse()}else for(s=(o=(a=d.length)<(t=p.length))?a:t,a=t=0;t<s;t++)if(d[t]!=p[t]){o=d[t]<p[t];break}if(o&&(n=d,d=p,p=n,e.s=-e.s),(t=(s=p.length)-(r=d.length))>0)for(;t--;d[r++]=0);for(t=l-1;s>a;){if(d[--s]<p[s]){for(r=s;r&&!d[--r];d[r]=t);--d[r],d[s]+=l}d[s]-=p[s]}for(;0==d[0];d.splice(0,1),--u);return d[0]?G(e,d,u):(e.s=3==D?-1:1,e.c=[e.e=0],e)},U.modulo=U.mod=function(e,t){var s,n,o=this;return e=new $(e,t),!o.c||!e.s||e.c&&!e.c[0]?new $(NaN):!e.c||o.c&&!o.c[0]?new $(o):(9==j?(n=e.s,e.s=1,s=r(o,e,0,3),e.s=n,s.s*=n):s=r(o,e,0,j),(e=o.minus(s.times(e))).c[0]||1!=j||(e.s=o.s),e)},U.multipliedBy=U.times=function(e,t){var r,s,n,o,i,a,c,u,d,p,f,m,b,w,A,v=this,x=v.c,_=(e=new $(e,t)).c;if(!(x&&_&&x[0]&&_[0]))return!v.s||!e.s||x&&!x[0]&&!_||_&&!_[0]&&!x?e.c=e.e=e.s=null:(e.s*=v.s,x&&_?(e.c=[0],e.e=0):e.c=e.e=null),e;for(s=y(v.e/h)+y(e.e/h),e.s*=v.s,(c=x.length)<(p=_.length)&&(b=x,x=_,_=b,n=c,c=p,p=n),n=c+p,b=[];n--;b.push(0));for(w=l,A=g,n=p;--n>=0;){for(r=0,f=_[n]%A,m=_[n]/A|0,o=n+(i=c);o>n;)r=((u=f*(u=x[--i]%A)+(a=m*u+(d=x[i]/A|0)*f)%A*A+b[o]+r)/w|0)+(a/A|0)+m*d,b[o--]=u%w;b[o]=r}return r?++s:b.splice(0,1),G(e,b,s)},U.negated=function(){var e=new $(this);return e.s=-e.s||null,e},U.plus=function(e,t){var r,s=this,n=s.s;if(t=(e=new $(e,t)).s,!n||!t)return new $(NaN);if(n!=t)return e.s=-t,s.minus(e);var o=s.e/h,i=e.e/h,a=s.c,c=e.c;if(!o||!i){if(!a||!c)return new $(n/0);if(!a[0]||!c[0])return c[0]?e:new $(a[0]?s:0*n)}if(o=y(o),i=y(i),a=a.slice(),n=o-i){for(n>0?(i=o,r=c):(n=-n,r=a),r.reverse();n--;r.push(0));r.reverse()}for((n=a.length)-(t=c.length)<0&&(r=c,c=a,a=r,t=n),n=0;t;)n=(a[--t]=a[t]+c[t]+n)/l|0,a[t]=l===a[t]?0:a[t]%l;return n&&(a=[n].concat(a),++i),G(e,a,i)},U.precision=U.sd=function(e,t){var r,s,n,o=this;if(null!=e&&e!==!!e)return A(e,1,m),null==t?t=D:A(t,0,8),V(new $(o),e,t);if(!(r=o.c))return null;if(s=(n=r.length-1)*h+1,n=r[n]){for(;n%10==0;n/=10,s--);for(n=r[0];n>=10;n/=10,s++);}return e&&o.e+1>s&&(s=o.e+1),s},U.shiftedBy=function(e){return A(e,-9007199254740991,p),this.times("1e"+e)},U.squareRoot=U.sqrt=function(){var e,t,s,n,o,i=this,a=i.c,c=i.s,u=i.e,d=C+4,l=new $("0.5");if(1!==c||!a||!a[0])return new $(!c||c<0&&(!a||a[0])?NaN:a?i:1/0);if(0==(c=Math.sqrt(+W(i)))||c==1/0?(((t=b(a)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=y((u+1)/2)-(u<0||u%2),s=new $(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):s=new $(c+""),s.c[0])for((c=(u=s.e)+d)<3&&(c=0);;)if(o=s,s=l.times(o.plus(r(i,o,d,1))),b(o.c).slice(0,c)===(t=b(s.c)).slice(0,c)){if(s.e<u&&--c,"9999"!=(t=t.slice(c-3,c+1))&&(n||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(V(s,s.e+C+2,1),e=!s.times(s).eq(i));break}if(!n&&(V(o,o.e+C+2,0),o.times(o).eq(i))){s=o;break}d+=4,c+=4,n=1}return V(s,s.e+C+1,D,e)},U.toExponential=function(e,t){return null!=e&&(A(e,0,m),e++),H(this,e,t,1)},U.toFixed=function(e,t){return null!=e&&(A(e,0,m),e=e+this.e+1),H(this,e,t)},U.toFormat=function(e,t,r){var s,n=this;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=q;else if("object"!=typeof r)throw Error(u+"Argument not an object: "+r);if(s=n.toFixed(e,t),n.c){var o,i=s.split("."),a=+r.groupSize,c=+r.secondaryGroupSize,d=r.groupSeparator||"",l=i[0],h=i[1],p=n.s<0,f=p?l.slice(1):l,g=f.length;if(c&&(o=a,a=c,c=o,g-=o),a>0&&g>0){for(o=g%a||a,l=f.substr(0,o);o<g;o+=a)l+=d+f.substr(o,a);c>0&&(l+=d+f.slice(o)),p&&(l="-"+l)}s=h?l+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?h.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):h):l}return(r.prefix||"")+s+(r.suffix||"")},U.toFraction=function(e){var t,s,n,o,i,a,c,d,l,p,g,m,y=this,w=y.c;if(null!=e&&(!(c=new $(e)).isInteger()&&(c.c||1!==c.s)||c.lt(I)))throw Error(u+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+W(c));if(!w)return new $(y);for(t=new $(I),l=s=new $(I),n=d=new $(I),m=b(w),i=t.e=m.length-y.e-1,t.c[0]=f[(a=i%h)<0?h+a:a],e=!e||c.comparedTo(t)>0?i>0?t:l:c,a=L,L=1/0,c=new $(m),d.c[0]=0;p=r(c,t,0,1),1!=(o=s.plus(p.times(n))).comparedTo(e);)s=n,n=o,l=d.plus(p.times(o=l)),d=o,t=c.minus(p.times(o=t)),c=o;return o=r(e.minus(s),n,0,1),d=d.plus(o.times(l)),s=s.plus(o.times(n)),d.s=l.s=y.s,g=r(l,n,i*=2,D).minus(y).abs().comparedTo(r(d,s,i,D).minus(y).abs())<1?[l,n]:[d,s],L=a,g},U.toNumber=function(){return+W(this)},U.toPrecision=function(e,t){return null!=e&&A(e,1,m),H(this,e,t,2)},U.toString=function(e){var t,r=this,n=r.s,o=r.e;return null===o?n?(t="Infinity",n<0&&(t="-"+t)):t="NaN":(null==e?t=o<=P||o>=N?x(b(r.c),o):_(b(r.c),o,"0"):10===e?t=_(b((r=V(new $(r),C+o+1,D)).c),r.e,"0"):(A(e,2,M.length,"Base"),t=s(_(b(r.c),o,"0"),10,e,n,!0)),n<0&&r.c[0]&&(t="-"+t)),t},U.valueOf=U.toJSON=function(){return W(this)},U._isBigNumber=!0,null!=t&&$.set(t),$}()).default=o.BigNumber=o,void 0===(s=function(){return o}.call(t,r,t,e))||(e.exports=s)}()},2486:(e,t,r)=>{"use strict";const s=r(5155),n=r(4525),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.lW=c,t.h2=50;const i=2147483647;function a(e){if(e>i)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return l(e)}return u(e,t,r)}function u(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|g(e,t);let s=a(r);const n=s.write(e,t);return n!==r&&(s=s.slice(0,n)),s}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Z(e,Uint8Array)){const t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Z(e,ArrayBuffer)||e&&Z(e.buffer,ArrayBuffer))return p(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(Z(e,SharedArrayBuffer)||e&&Z(e.buffer,SharedArrayBuffer)))return p(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const s=e.valueOf&&e.valueOf();if(null!=s&&s!==e)return c.from(s,t,r);const n=function(e){if(c.isBuffer(e)){const t=0|f(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||X(e.length)?a(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(n)return n;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function d(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return d(e),a(e<0?0:0|f(e))}function h(e){const t=e.length<0?0:0|f(e.length),r=a(t);for(let s=0;s<t;s+=1)r[s]=255&e[s];return r}function p(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let s;return s=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(s,c.prototype),s}function f(e){if(e>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|e}function g(e,t){if(c.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);const r=e.length,s=arguments.length>2&&!0===arguments[2];if(!s&&0===r)return 0;let n=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return V(e).length;default:if(n)return s?-1:G(e).length;t=(""+t).toLowerCase(),n=!0}}function m(e,t,r){let s=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return U(this,t,r);case"utf8":case"utf-8":return T(this,t,r);case"ascii":return B(this,t,r);case"latin1":case"binary":return k(this,t,r);case"base64":return E(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,r);default:if(s)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),s=!0}}function y(e,t,r){const s=e[t];e[t]=e[r],e[r]=s}function b(e,t,r,s,n){if(0===e.length)return-1;if("string"==typeof r?(s=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),X(r=+r)&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return-1;r=e.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof t&&(t=c.from(t,s)),c.isBuffer(t))return 0===t.length?-1:w(e,t,r,s,n);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):w(e,[t],r,s,n);throw new TypeError("val must be string, number or Buffer")}function w(e,t,r,s,n){let o,i=1,a=e.length,c=t.length;if(void 0!==s&&("ucs2"===(s=String(s).toLowerCase())||"ucs-2"===s||"utf16le"===s||"utf-16le"===s)){if(e.length<2||t.length<2)return-1;i=2,a/=2,c/=2,r/=2}function u(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(n){let s=-1;for(o=r;o<a;o++)if(u(e,o)===u(t,-1===s?0:o-s)){if(-1===s&&(s=o),o-s+1===c)return s*i}else-1!==s&&(o-=o-s),s=-1}else for(r+c>a&&(r=a-c),o=r;o>=0;o--){let r=!0;for(let s=0;s<c;s++)if(u(e,o+s)!==u(t,s)){r=!1;break}if(r)return o}return-1}function A(e,t,r,s){r=Number(r)||0;const n=e.length-r;s?(s=Number(s))>n&&(s=n):s=n;const o=t.length;let i;for(s>o/2&&(s=o/2),i=0;i<s;++i){const s=parseInt(t.substr(2*i,2),16);if(X(s))return i;e[r+i]=s}return i}function v(e,t,r,s){return W(G(t,e.length-r),e,r,s)}function x(e,t,r,s){return W(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,s)}function _(e,t,r,s){return W(V(t),e,r,s)}function S(e,t,r,s){return W(function(e,t){let r,s,n;const o=[];for(let i=0;i<e.length&&!((t-=2)<0);++i)r=e.charCodeAt(i),s=r>>8,n=r%256,o.push(n),o.push(s);return o}(t,e.length-r),e,r,s)}function E(e,t,r){return 0===t&&r===e.length?s.fromByteArray(e):s.fromByteArray(e.slice(t,r))}function T(e,t,r){r=Math.min(e.length,r);const s=[];let n=t;for(;n<r;){const t=e[n];let o=null,i=t>239?4:t>223?3:t>191?2:1;if(n+i<=r){let r,s,a,c;switch(i){case 1:t<128&&(o=t);break;case 2:r=e[n+1],128==(192&r)&&(c=(31&t)<<6|63&r,c>127&&(o=c));break;case 3:r=e[n+1],s=e[n+2],128==(192&r)&&128==(192&s)&&(c=(15&t)<<12|(63&r)<<6|63&s,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:r=e[n+1],s=e[n+2],a=e[n+3],128==(192&r)&&128==(192&s)&&128==(192&a)&&(c=(15&t)<<18|(63&r)<<12|(63&s)<<6|63&a,c>65535&&c<1114112&&(o=c))}}null===o?(o=65533,i=1):o>65535&&(o-=65536,s.push(o>>>10&1023|55296),o=56320|1023&o),s.push(o),n+=i}return function(e){const t=e.length;if(t<=R)return String.fromCharCode.apply(String,e);let r="",s=0;for(;s<t;)r+=String.fromCharCode.apply(String,e.slice(s,s+=R));return r}(s)}c.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),c.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(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,r){return u(e,t,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,r){return function(e,t,r){return d(e),e<=0?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)}(e,t,r)},c.allocUnsafe=function(e){return l(e)},c.allocUnsafeSlow=function(e){return l(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(Z(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),Z(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,s=t.length;for(let n=0,o=Math.min(r,s);n<o;++n)if(e[n]!==t[n]){r=e[n],s=t[n];break}return r<s?-1:s<r?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const s=c.allocUnsafe(t);let n=0;for(r=0;r<e.length;++r){let t=e[r];if(Z(t,Uint8Array))n+t.length>s.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(s,n)):Uint8Array.prototype.set.call(s,t,n);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(s,n)}n+=t.length}return s},c.byteLength=g,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)y(this,t,t+1);return this},c.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},c.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?T(this,0,e):m.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e="";const r=t.h2;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(c.prototype[o]=c.prototype.inspect),c.prototype.compare=function(e,t,r,s,n){if(Z(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.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===r&&(r=e?e.length:0),void 0===s&&(s=0),void 0===n&&(n=this.length),t<0||r>e.length||s<0||n>this.length)throw new RangeError("out of range index");if(s>=n&&t>=r)return 0;if(s>=n)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(n>>>=0)-(s>>>=0),i=(r>>>=0)-(t>>>=0);const a=Math.min(o,i),u=this.slice(s,n),d=e.slice(t,r);for(let e=0;e<a;++e)if(u[e]!==d[e]){o=u[e],i=d[e];break}return o<i?-1:i<o?1:0},c.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},c.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},c.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},c.prototype.write=function(e,t,r,s){if(void 0===t)s="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)s=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===s&&(s="utf8")):(s=r,r=void 0)}const n=this.length-t;if((void 0===r||r>n)&&(r=n),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");s||(s="utf8");let o=!1;for(;;)switch(s){case"hex":return A(this,e,t,r);case"utf8":case"utf-8":return v(this,e,t,r);case"ascii":case"latin1":case"binary":return x(this,e,t,r);case"base64":return _(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+s);s=(""+s).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const R=4096;function B(e,t,r){let s="";r=Math.min(e.length,r);for(let n=t;n<r;++n)s+=String.fromCharCode(127&e[n]);return s}function k(e,t,r){let s="";r=Math.min(e.length,r);for(let n=t;n<r;++n)s+=String.fromCharCode(e[n]);return s}function U(e,t,r){const s=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>s)&&(r=s);let n="";for(let s=t;s<r;++s)n+=Y[e[s]];return n}function I(e,t,r){const s=e.slice(t,r);let n="";for(let e=0;e<s.length-1;e+=2)n+=String.fromCharCode(s[e]+256*s[e+1]);return n}function C(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,r,s,n,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<o)throw new RangeError('"value" argument is out of bounds');if(r+s>e.length)throw new RangeError("Index out of range")}function P(e,t,r,s,n){M(t,s,n,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let i=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i,r}function N(e,t,r,s,n){M(t,s,n,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let i=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=i,i>>=8,e[r+2]=i,i>>=8,e[r+1]=i,i>>=8,e[r]=i,r+8}function O(e,t,r,s,n,o){if(r+s>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(e,t,r,s,o){return t=+t,r>>>=0,o||O(e,0,r,4),n.write(e,t,r,s,23,4),r+4}function F(e,t,r,s,o){return t=+t,r>>>=0,o||O(e,0,r,8),n.write(e,t,r,s,52,8),r+8}c.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const s=this.subarray(e,t);return Object.setPrototypeOf(s,c.prototype),s},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let s=this[e],n=1,o=0;for(;++o<t&&(n*=256);)s+=this[e+o]*n;return s},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let s=this[e+--t],n=1;for(;t>0&&(n*=256);)s+=this[e+--t]*n;return s},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=J((function(e){$(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const s=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,n=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(s)+(BigInt(n)<<BigInt(32))})),c.prototype.readBigUInt64BE=J((function(e){$(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const s=t*2**24+65536*this[++e]+256*this[++e]+this[++e],n=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(s)<<BigInt(32))+BigInt(n)})),c.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let s=this[e],n=1,o=0;for(;++o<t&&(n*=256);)s+=this[e+o]*n;return n*=128,s>=n&&(s-=Math.pow(2,8*t)),s},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let s=t,n=1,o=this[e+--s];for(;s>0&&(n*=256);)o+=this[e+--s]*n;return n*=128,o>=n&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||C(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||C(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=J((function(e){$(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const s=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(s)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),c.prototype.readBigInt64BE=J((function(e){$(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const s=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(s)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||C(e,4,this.length),n.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||C(e,4,this.length),n.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||C(e,8,this.length),n.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||C(e,8,this.length),n.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,s){e=+e,t>>>=0,r>>>=0,s||D(this,e,t,r,Math.pow(2,8*r)-1,0);let n=1,o=0;for(this[t]=255&e;++o<r&&(n*=256);)this[t+o]=e/n&255;return t+r},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,r,s){e=+e,t>>>=0,r>>>=0,s||D(this,e,t,r,Math.pow(2,8*r)-1,0);let n=r-1,o=1;for(this[t+n]=255&e;--n>=0&&(o*=256);)this[t+n]=e/o&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||D(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},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||D(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},c.prototype.writeBigUInt64LE=J((function(e,t=0){return P(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=J((function(e,t=0){return N(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,r,s){if(e=+e,t>>>=0,!s){const s=Math.pow(2,8*r-1);D(this,e,t,r,s-1,-s)}let n=0,o=1,i=0;for(this[t]=255&e;++n<r&&(o*=256);)e<0&&0===i&&0!==this[t+n-1]&&(i=1),this[t+n]=(e/o>>0)-i&255;return t+r},c.prototype.writeIntBE=function(e,t,r,s){if(e=+e,t>>>=0,!s){const s=Math.pow(2,8*r-1);D(this,e,t,r,s-1,-s)}let n=r-1,o=1,i=0;for(this[t+n]=255&e;--n>=0&&(o*=256);)e<0&&0===i&&0!==this[t+n+1]&&(i=1),this[t+n]=(e/o>>0)-i&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||D(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},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,2147483647,-2147483648),e<0&&(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},c.prototype.writeBigInt64LE=J((function(e,t=0){return P(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=J((function(e,t=0){return N(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,r){return L(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return L(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return F(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return F(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,s){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),s||0===s||(s=this.length),t>=e.length&&(t=e.length),t||(t=0),s>0&&s<r&&(s=r),s===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(s<0)throw new RangeError("sourceEnd out of bounds");s>this.length&&(s=this.length),e.length-t<s-r&&(s=e.length-t+r);const n=s-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,s):Uint8Array.prototype.set.call(e,this.subarray(r,s),t),n},c.prototype.fill=function(e,t,r,s){if("string"==typeof e){if("string"==typeof t?(s=t,t=0,r=this.length):"string"==typeof r&&(s=r,r=this.length),void 0!==s&&"string"!=typeof s)throw new TypeError("encoding must be a string");if("string"==typeof s&&!c.isEncoding(s))throw new TypeError("Unknown encoding: "+s);if(1===e.length){const t=e.charCodeAt(0);("utf8"===s&&t<128||"latin1"===s)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let n;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(n=t;n<r;++n)this[n]=e;else{const o=c.isBuffer(e)?e:c.from(e,s),i=o.length;if(0===i)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(n=0;n<r-t;++n)this[n+t]=o[n%i]}return this};const j={};function z(e,t,r){j[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function q(e){let t="",r=e.length;const s="-"===e[0]?1:0;for(;r>=s+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function M(e,t,r,s,n,o){if(e>r||e<t){const s="bigint"==typeof t?"n":"";let n;throw n=o>3?0===t||t===BigInt(0)?`>= 0${s} and < 2${s} ** ${8*(o+1)}${s}`:`>= -(2${s} ** ${8*(o+1)-1}${s}) and < 2 ** ${8*(o+1)-1}${s}`:`>= ${t}${s} and <= ${r}${s}`,new j.ERR_OUT_OF_RANGE("value",n,e)}!function(e,t,r){$(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||H(t,e.length-(r+1))}(s,n,o)}function $(e,t){if("number"!=typeof e)throw new j.ERR_INVALID_ARG_TYPE(t,"number",e)}function H(e,t,r){if(Math.floor(e)!==e)throw $(e,r),new j.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new j.ERR_BUFFER_OUT_OF_BOUNDS;throw new j.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}z("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),z("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),z("ERR_OUT_OF_RANGE",(function(e,t,r){let s=`The value of "${e}" is out of range.`,n=r;return Number.isInteger(r)&&Math.abs(r)>2**32?n=q(String(r)):"bigint"==typeof r&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=q(n)),n+="n"),s+=` It must be ${t}. Received ${n}`,s}),RangeError);const K=/[^+/0-9A-Za-z-_]/g;function G(e,t){let r;t=t||1/0;const s=e.length;let n=null;const o=[];for(let i=0;i<s;++i){if(r=e.charCodeAt(i),r>55295&&r<57344){if(!n){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(i+1===s){(t-=3)>-1&&o.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&(t-=3)>-1&&o.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function V(e){return s.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(K,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function W(e,t,r,s){let n;for(n=0;n<s&&!(n+r>=t.length||n>=e.length);++n)t[n+r]=e[n];return n}function Z(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function X(e){return e!=e}const Y=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const s=16*r;for(let n=0;n<16;++n)t[s+n]=e[r]+e[n]}return t}();function J(e){return"undefined"==typeof BigInt?Q:e}function Q(){throw new Error("BigInt not supported")}},7297:function(e,t){var r="undefined"!=typeof self?self:this,s=function(){function e(){this.fetch=!1,this.DOMException=r.DOMException}return e.prototype=r,new e}();!function(e){!function(t){var r="URLSearchParams"in e,s="Symbol"in e&&"iterator"in Symbol,n="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),o="FormData"in e,i="ArrayBuffer"in e;if(i)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&a.indexOf(Object.prototype.toString.call(e))>-1};function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function d(e){return"string"!=typeof e&&(e=String(e)),e}function l(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return s&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function p(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function f(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function g(e){var t=new FileReader,r=f(t);return t.readAsArrayBuffer(e),r}function m(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:n&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:o&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():i&&n&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=m(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):i&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=m(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},n&&(this.blob=function(){var e=p(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(g)}),this.text=function(){var e,t,r,s=p(this);if(s)return s;if(this._bodyBlob)return e=this._bodyBlob,r=f(t=new FileReader),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),s=0;s<t.length;s++)r[s]=String.fromCharCode(t[s]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o&&(this.formData=function(){return this.text().then(A)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(e,t){e=u(e),t=d(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},h.prototype.delete=function(e){delete this.map[u(e)]},h.prototype.get=function(e){return e=u(e),this.has(e)?this.map[e]:null},h.prototype.has=function(e){return this.map.hasOwnProperty(u(e))},h.prototype.set=function(e,t){this.map[u(e)]=d(t)},h.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},h.prototype.keys=function(){var e=[];return this.forEach((function(t,r){e.push(r)})),l(e)},h.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),l(e)},h.prototype.entries=function(){var e=[];return this.forEach((function(t,r){e.push([r,t])})),l(e)},s&&(h.prototype[Symbol.iterator]=h.prototype.entries);var b=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function w(e,t){var r,s,n=(t=t||{}).body;if(e instanceof w){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new h(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new h(t.headers)),this.method=(s=(r=t.method||this.method||"GET").toUpperCase(),b.indexOf(s)>-1?s:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function A(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),s=r.shift().replace(/\+/g," "),n=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(s),decodeURIComponent(n))}})),t}function v(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}w.prototype.clone=function(){return new w(this,{body:this._bodyInit})},y.call(w.prototype),y.call(v.prototype),v.prototype.clone=function(){return new v(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},v.error=function(){var e=new v(null,{status:0,statusText:""});return e.type="error",e};var x=[301,302,303,307,308];v.redirect=function(e,t){if(-1===x.indexOf(t))throw new RangeError("Invalid status code");return new v(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function _(e,r){return new Promise((function(s,o){var i=new w(e,r);if(i.signal&&i.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function c(){a.abort()}a.onload=function(){var e,t,r={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new h,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var r=e.split(":"),s=r.shift().trim();if(s){var n=r.join(":").trim();t.append(s,n)}})),t)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var n="response"in a?a.response:a.responseText;s(new v(n,r))},a.onerror=function(){o(new TypeError("Network request failed"))},a.ontimeout=function(){o(new TypeError("Network request failed"))},a.onabort=function(){o(new t.DOMException("Aborted","AbortError"))},a.open(i.method,i.url,!0),"include"===i.credentials?a.withCredentials=!0:"omit"===i.credentials&&(a.withCredentials=!1),"responseType"in a&&n&&(a.responseType="blob"),i.headers.forEach((function(e,t){a.setRequestHeader(t,e)})),i.signal&&(i.signal.addEventListener("abort",c),a.onreadystatechange=function(){4===a.readyState&&i.signal.removeEventListener("abort",c)}),a.send(void 0===i._bodyInit?null:i._bodyInit)}))}_.polyfill=!0,e.fetch||(e.fetch=_,e.Headers=h,e.Request=w,e.Response=v),t.Headers=h,t.Request=w,t.Response=v,t.fetch=_,Object.defineProperty(t,"__esModule",{value:!0})}({})}(s),s.fetch.ponyfill=!0,delete s.fetch.polyfill;var n=s;(t=n.fetch).default=n.fetch,t.fetch=n.fetch,t.Headers=n.Headers,t.Request=n.Request,t.Response=n.Response,e.exports=t},7267:(e,t,r)=>{var s;!function(){"use strict";var t="object"==typeof window?window:{};!t.HI_BASE32_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node&&(t=r.g);var n=!t.HI_BASE32_NO_COMMON_JS&&e.exports,o=r.amdO,i="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567".split(""),a={A:0,B:1,C:2,D:3,E:4,F:5,G:6,H:7,I:8,J:9,K:10,L:11,M:12,N:13,O:14,P:15,Q:16,R:17,S:18,T:19,U:20,V:21,W:22,X:23,Y:24,Z:25,2:26,3:27,4:28,5:29,6:30,7:31},c=[0,0,0,0,0,0,0,0],u=function(e,t){t.length>10&&(t="..."+t.substr(-10));var r=new Error("Decoded data is not valid UTF-8. Maybe try base32.decode.asBytes()? Partial data after reading "+e+" bytes: "+t+" <-");throw r.position=e,r},d=function(e){if(""===e)return[];if(!/^[A-Z2-7=]+$/.test(e))throw new Error("Invalid base32 characters");for(var t,r,s,n,o,i,c,u,d=[],l=0,h=(e=e.replace(/=/g,"")).length,p=0,f=h>>3<<3;p<f;)t=a[e.charAt(p++)],r=a[e.charAt(p++)],s=a[e.charAt(p++)],n=a[e.charAt(p++)],o=a[e.charAt(p++)],i=a[e.charAt(p++)],c=a[e.charAt(p++)],u=a[e.charAt(p++)],d[l++]=255&(t<<3|r>>>2),d[l++]=255&(r<<6|s<<1|n>>>4),d[l++]=255&(n<<4|o>>>1),d[l++]=255&(o<<7|i<<2|c>>>3),d[l++]=255&(c<<5|u);var g=h-f;return 2===g?(t=a[e.charAt(p++)],r=a[e.charAt(p++)],d[l++]=255&(t<<3|r>>>2)):4===g?(t=a[e.charAt(p++)],r=a[e.charAt(p++)],s=a[e.charAt(p++)],n=a[e.charAt(p++)],d[l++]=255&(t<<3|r>>>2),d[l++]=255&(r<<6|s<<1|n>>>4)):5===g?(t=a[e.charAt(p++)],r=a[e.charAt(p++)],s=a[e.charAt(p++)],n=a[e.charAt(p++)],o=a[e.charAt(p++)],d[l++]=255&(t<<3|r>>>2),d[l++]=255&(r<<6|s<<1|n>>>4),d[l++]=255&(n<<4|o>>>1)):7===g&&(t=a[e.charAt(p++)],r=a[e.charAt(p++)],s=a[e.charAt(p++)],n=a[e.charAt(p++)],o=a[e.charAt(p++)],i=a[e.charAt(p++)],c=a[e.charAt(p++)],d[l++]=255&(t<<3|r>>>2),d[l++]=255&(r<<6|s<<1|n>>>4),d[l++]=255&(n<<4|o>>>1),d[l++]=255&(o<<7|i<<2|c>>>3)),d},l=function(e,t){if(!t)return function(e){for(var t,r,s="",n=e.length,o=0,i=0;o<n;)if((t=e[o++])<=127)s+=String.fromCharCode(t);else{t>191&&t<=223?(r=31&t,i=1):t<=239?(r=15&t,i=2):t<=247?(r=7&t,i=3):u(o,s);for(var a=0;a<i;++a)((t=e[o++])<128||t>191)&&u(o,s),r<<=6,r+=63&t;r>=55296&&r<=57343&&u(o,s),r>1114111&&u(o,s),r<=65535?s+=String.fromCharCode(r):(r-=65536,s+=String.fromCharCode(55296+(r>>10)),s+=String.fromCharCode(56320+(1023&r)))}return s}(d(e));if(""===e)return"";if(!/^[A-Z2-7=]+$/.test(e))throw new Error("Invalid base32 characters");var r,s,n,o,i,c,l,h,p="",f=e.indexOf("=");-1===f&&(f=e.length);for(var g=0,m=f>>3<<3;g<m;)r=a[e.charAt(g++)],s=a[e.charAt(g++)],n=a[e.charAt(g++)],o=a[e.charAt(g++)],i=a[e.charAt(g++)],c=a[e.charAt(g++)],l=a[e.charAt(g++)],h=a[e.charAt(g++)],p+=String.fromCharCode(255&(r<<3|s>>>2))+String.fromCharCode(255&(s<<6|n<<1|o>>>4))+String.fromCharCode(255&(o<<4|i>>>1))+String.fromCharCode(255&(i<<7|c<<2|l>>>3))+String.fromCharCode(255&(l<<5|h));var y=f-m;return 2===y?(r=a[e.charAt(g++)],s=a[e.charAt(g++)],p+=String.fromCharCode(255&(r<<3|s>>>2))):4===y?(r=a[e.charAt(g++)],s=a[e.charAt(g++)],n=a[e.charAt(g++)],o=a[e.charAt(g++)],p+=String.fromCharCode(255&(r<<3|s>>>2))+String.fromCharCode(255&(s<<6|n<<1|o>>>4))):5===y?(r=a[e.charAt(g++)],s=a[e.charAt(g++)],n=a[e.charAt(g++)],o=a[e.charAt(g++)],i=a[e.charAt(g++)],p+=String.fromCharCode(255&(r<<3|s>>>2))+String.fromCharCode(255&(s<<6|n<<1|o>>>4))+String.fromCharCode(255&(o<<4|i>>>1))):7===y&&(r=a[e.charAt(g++)],s=a[e.charAt(g++)],n=a[e.charAt(g++)],o=a[e.charAt(g++)],i=a[e.charAt(g++)],c=a[e.charAt(g++)],l=a[e.charAt(g++)],p+=String.fromCharCode(255&(r<<3|s>>>2))+String.fromCharCode(255&(s<<6|n<<1|o>>>4))+String.fromCharCode(255&(o<<4|i>>>1))+String.fromCharCode(255&(i<<7|c<<2|l>>>3))),p},h={encode:function(e,t){var r="string"!=typeof e;return r&&e.constructor===ArrayBuffer&&(e=new Uint8Array(e)),r?function(e){for(var t,r,s,n,o,a="",c=e.length,u=0,d=5*parseInt(c/5);u<d;)t=e[u++],r=e[u++],s=e[u++],n=e[u++],o=e[u++],a+=i[t>>>3]+i[31&(t<<2|r>>>6)]+i[r>>>1&31]+i[31&(r<<4|s>>>4)]+i[31&(s<<1|n>>>7)]+i[n>>>2&31]+i[31&(n<<3|o>>>5)]+i[31&o];var l=c-d;return 1===l?(t=e[u],a+=i[t>>>3]+i[t<<2&31]+"======"):2===l?(t=e[u++],r=e[u],a+=i[t>>>3]+i[31&(t<<2|r>>>6)]+i[r>>>1&31]+i[r<<4&31]+"===="):3===l?(t=e[u++],r=e[u++],s=e[u],a+=i[t>>>3]+i[31&(t<<2|r>>>6)]+i[r>>>1&31]+i[31&(r<<4|s>>>4)]+i[s<<1&31]+"==="):4===l&&(t=e[u++],r=e[u++],s=e[u++],n=e[u],a+=i[t>>>3]+i[31&(t<<2|r>>>6)]+i[r>>>1&31]+i[31&(r<<4|s>>>4)]+i[31&(s<<1|n>>>7)]+i[n>>>2&31]+i[n<<3&31]+"="),a}(e):t?function(e){for(var t,r,s,n,o,a="",c=e.length,u=0,d=5*parseInt(c/5);u<d;)t=e.charCodeAt(u++),r=e.charCodeAt(u++),s=e.charCodeAt(u++),n=e.charCodeAt(u++),o=e.charCodeAt(u++),a+=i[t>>>3]+i[31&(t<<2|r>>>6)]+i[r>>>1&31]+i[31&(r<<4|s>>>4)]+i[31&(s<<1|n>>>7)]+i[n>>>2&31]+i[31&(n<<3|o>>>5)]+i[31&o];var l=c-d;return 1===l?(t=e.charCodeAt(u),a+=i[t>>>3]+i[t<<2&31]+"======"):2===l?(t=e.charCodeAt(u++),r=e.charCodeAt(u),a+=i[t>>>3]+i[31&(t<<2|r>>>6)]+i[r>>>1&31]+i[r<<4&31]+"===="):3===l?(t=e.charCodeAt(u++),r=e.charCodeAt(u++),s=e.charCodeAt(u),a+=i[t>>>3]+i[31&(t<<2|r>>>6)]+i[r>>>1&31]+i[31&(r<<4|s>>>4)]+i[s<<1&31]+"==="):4===l&&(t=e.charCodeAt(u++),r=e.charCodeAt(u++),s=e.charCodeAt(u++),n=e.charCodeAt(u),a+=i[t>>>3]+i[31&(t<<2|r>>>6)]+i[r>>>1&31]+i[31&(r<<4|s>>>4)]+i[31&(s<<1|n>>>7)]+i[n>>>2&31]+i[n<<3&31]+"="),a}(e):function(e){var t,r,s,n,o,a,u,d=!1,l="",h=0,p=0,f=e.length;if(""===e)return l;do{for(c[0]=c[5],c[1]=c[6],c[2]=c[7],u=p;h<f&&u<5;++h)(a=e.charCodeAt(h))<128?c[u++]=a:a<2048?(c[u++]=192|a>>6,c[u++]=128|63&a):a<55296||a>=57344?(c[u++]=224|a>>12,c[u++]=128|a>>6&63,c[u++]=128|63&a):(a=65536+((1023&a)<<10|1023&e.charCodeAt(++h)),c[u++]=240|a>>18,c[u++]=128|a>>12&63,c[u++]=128|a>>6&63,c[u++]=128|63&a);p=u-5,h===f&&++h,h>f&&u<6&&(d=!0),t=c[0],u>4?(r=c[1],s=c[2],n=c[3],o=c[4],l+=i[t>>>3]+i[31&(t<<2|r>>>6)]+i[r>>>1&31]+i[31&(r<<4|s>>>4)]+i[31&(s<<1|n>>>7)]+i[n>>>2&31]+i[31&(n<<3|o>>>5)]+i[31&o]):1===u?l+=i[t>>>3]+i[t<<2&31]+"======":2===u?(r=c[1],l+=i[t>>>3]+i[31&(t<<2|r>>>6)]+i[r>>>1&31]+i[r<<4&31]+"===="):3===u?(r=c[1],s=c[2],l+=i[t>>>3]+i[31&(t<<2|r>>>6)]+i[r>>>1&31]+i[31&(r<<4|s>>>4)]+i[s<<1&31]+"==="):(r=c[1],s=c[2],n=c[3],l+=i[t>>>3]+i[31&(t<<2|r>>>6)]+i[r>>>1&31]+i[31&(r<<4|s>>>4)]+i[31&(s<<1|n>>>7)]+i[n>>>2&31]+i[n<<3&31]+"=")}while(!d);return l}(e)},decode:l};l.asBytes=d,n?e.exports=h:(t.base32=h,o&&(void 0===(s=function(){return h}.call(h,r,h,e))||(e.exports=s)))}()},4525:(e,t)=>{t.read=function(e,t,r,s,n){var o,i,a=8*n-s-1,c=(1<<a)-1,u=c>>1,d=-7,l=r?n-1:0,h=r?-1:1,p=e[t+l];for(l+=h,o=p&(1<<-d)-1,p>>=-d,d+=a;d>0;o=256*o+e[t+l],l+=h,d-=8);for(i=o&(1<<-d)-1,o>>=-d,d+=s;d>0;i=256*i+e[t+l],l+=h,d-=8);if(0===o)o=1-u;else{if(o===c)return i?NaN:1/0*(p?-1:1);i+=Math.pow(2,s),o-=u}return(p?-1:1)*i*Math.pow(2,o-s)},t.write=function(e,t,r,s,n,o){var i,a,c,u=8*o-n-1,d=(1<<u)-1,l=d>>1,h=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,p=s?0:o-1,f=s?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,i=d):(i=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-i))<1&&(i--,c*=2),(t+=i+l>=1?h/c:h*Math.pow(2,1-l))*c>=2&&(i++,c/=2),i+l>=d?(a=0,i=d):i+l>=1?(a=(t*c-1)*Math.pow(2,n),i+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,n),i=0));n>=8;e[r+p]=255&a,p+=f,a/=256,n-=8);for(i=i<<n|a,u+=n;u>0;e[r+p]=255&i,p+=f,i/=256,u-=8);e[r+p-f]|=128*g}},3477:(module,exports,__webpack_require__)=>{var __WEBPACK_AMD_DEFINE_RESULT__;(function(){"use strict";var ERROR="input is invalid type",WINDOW="object"==typeof window,root=WINDOW?window:{};root.JS_SHA256_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&"object"==typeof self,NODE_JS=!root.JS_SHA256_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;NODE_JS?root=__webpack_require__.g:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_SHA256_NO_COMMON_JS&&module.exports,AMD=__webpack_require__.amdO,ARRAY_BUFFER=!root.JS_SHA256_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],K=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[];!root.JS_SHA256_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!ARRAY_BUFFER||!root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});var createOutputMethod=function(e,t){return function(r){return new Sha256(t,!0).update(r)[e]()}},createMethod=function(e){var t=createOutputMethod("hex",e);NODE_JS&&(t=nodeWrap(t,e)),t.create=function(){return new Sha256(e)},t.update=function(e){return t.create().update(e)};for(var r=0;r<OUTPUT_TYPES.length;++r){var s=OUTPUT_TYPES[r];t[s]=createOutputMethod(s,e)}return t},nodeWrap=function(method,is224){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),algorithm=is224?"sha224":"sha256",nodeMethod=function(e){if("string"==typeof e)return crypto.createHash(algorithm).update(e,"utf8").digest("hex");if(null==e)throw new Error(ERROR);return e.constructor===ArrayBuffer&&(e=new Uint8Array(e)),Array.isArray(e)||ArrayBuffer.isView(e)||e.constructor===Buffer?crypto.createHash(algorithm).update(new Buffer(e)).digest("hex"):method(e)};return nodeMethod},createHmacOutputMethod=function(e,t){return function(r,s){return new HmacSha256(r,t,!0).update(s)[e]()}},createHmacMethod=function(e){var t=createHmacOutputMethod("hex",e);t.create=function(t){return new HmacSha256(t,e)},t.update=function(e,r){return t.create(e).update(r)};for(var r=0;r<OUTPUT_TYPES.length;++r){var s=OUTPUT_TYPES[r];t[s]=createHmacOutputMethod(s,e)}return t};function Sha256(e,t){t?(blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=e}function HmacSha256(e,t,r){var s,n=typeof e;if("string"===n){var o,i=[],a=e.length,c=0;for(s=0;s<a;++s)(o=e.charCodeAt(s))<128?i[c++]=o:o<2048?(i[c++]=192|o>>6,i[c++]=128|63&o):o<55296||o>=57344?(i[c++]=224|o>>12,i[c++]=128|o>>6&63,i[c++]=128|63&o):(o=65536+((1023&o)<<10|1023&e.charCodeAt(++s)),i[c++]=240|o>>18,i[c++]=128|o>>12&63,i[c++]=128|o>>6&63,i[c++]=128|63&o);e=i}else{if("object"!==n)throw new Error(ERROR);if(null===e)throw new Error(ERROR);if(ARRAY_BUFFER&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||ARRAY_BUFFER&&ArrayBuffer.isView(e)))throw new Error(ERROR)}e.length>64&&(e=new Sha256(t,!0).update(e).array());var u=[],d=[];for(s=0;s<64;++s){var l=e[s]||0;u[s]=92^l,d[s]=54^l}Sha256.call(this,t,r),this.update(d),this.oKeyPad=u,this.inner=!0,this.sharedMemory=r}Sha256.prototype.update=function(e){if(!this.finalized){var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(ERROR);if(null===e)throw new Error(ERROR);if(ARRAY_BUFFER&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||ARRAY_BUFFER&&ArrayBuffer.isView(e)))throw new Error(ERROR);t=!0}for(var s,n,o=0,i=e.length,a=this.blocks;o<i;){if(this.hashed&&(this.hashed=!1,a[0]=this.block,a[16]=a[1]=a[2]=a[3]=a[4]=a[5]=a[6]=a[7]=a[8]=a[9]=a[10]=a[11]=a[12]=a[13]=a[14]=a[15]=0),t)for(n=this.start;o<i&&n<64;++o)a[n>>2]|=e[o]<<SHIFT[3&n++];else for(n=this.start;o<i&&n<64;++o)(s=e.charCodeAt(o))<128?a[n>>2]|=s<<SHIFT[3&n++]:s<2048?(a[n>>2]|=(192|s>>6)<<SHIFT[3&n++],a[n>>2]|=(128|63&s)<<SHIFT[3&n++]):s<55296||s>=57344?(a[n>>2]|=(224|s>>12)<<SHIFT[3&n++],a[n>>2]|=(128|s>>6&63)<<SHIFT[3&n++],a[n>>2]|=(128|63&s)<<SHIFT[3&n++]):(s=65536+((1023&s)<<10|1023&e.charCodeAt(++o)),a[n>>2]|=(240|s>>18)<<SHIFT[3&n++],a[n>>2]|=(128|s>>12&63)<<SHIFT[3&n++],a[n>>2]|=(128|s>>6&63)<<SHIFT[3&n++],a[n>>2]|=(128|63&s)<<SHIFT[3&n++]);this.lastByteIndex=n,this.bytes+=n-this.start,n>=64?(this.block=a[16],this.start=n-64,this.hash(),this.hashed=!0):this.start=n}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha256.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>2]|=EXTRA[3&t],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=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]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},Sha256.prototype.hash=function(){var e,t,r,s,n,o,i,a,c,u=this.h0,d=this.h1,l=this.h2,h=this.h3,p=this.h4,f=this.h5,g=this.h6,m=this.h7,y=this.blocks;for(e=16;e<64;++e)t=((n=y[e-15])>>>7|n<<25)^(n>>>18|n<<14)^n>>>3,r=((n=y[e-2])>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,y[e]=y[e-16]+t+y[e-7]+r<<0;for(c=d&l,e=0;e<64;e+=4)this.first?(this.is224?(o=300032,m=(n=y[0]-1413257819)-150054599<<0,h=n+24177077<<0):(o=704751109,m=(n=y[0]-210244248)-1521486534<<0,h=n+143694565<<0),this.first=!1):(t=(u>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10),s=(o=u&d)^u&l^c,m=h+(n=m+(r=(p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+(p&f^~p&g)+K[e]+y[e])<<0,h=n+(t+s)<<0),t=(h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10),s=(i=h&u)^h&d^o,g=l+(n=g+(r=(m>>>6|m<<26)^(m>>>11|m<<21)^(m>>>25|m<<7))+(m&p^~m&f)+K[e+1]+y[e+1])<<0,t=((l=n+(t+s)<<0)>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10),s=(a=l&h)^l&u^i,f=d+(n=f+(r=(g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7))+(g&m^~g&p)+K[e+2]+y[e+2])<<0,t=((d=n+(t+s)<<0)>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10),s=(c=d&l)^d&h^a,p=u+(n=p+(r=(f>>>6|f<<26)^(f>>>11|f<<21)^(f>>>25|f<<7))+(f&g^~f&m)+K[e+3]+y[e+3])<<0,u=n+(t+s)<<0;this.h0=this.h0+u<<0,this.h1=this.h1+d<<0,this.h2=this.h2+l<<0,this.h3=this.h3+h<<0,this.h4=this.h4+p<<0,this.h5=this.h5+f<<0,this.h6=this.h6+g<<0,this.h7=this.h7+m<<0},Sha256.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,s=this.h3,n=this.h4,o=this.h5,i=this.h6,a=this.h7,c=HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[15&e]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[15&t]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[15&r]+HEX_CHARS[s>>28&15]+HEX_CHARS[s>>24&15]+HEX_CHARS[s>>20&15]+HEX_CHARS[s>>16&15]+HEX_CHARS[s>>12&15]+HEX_CHARS[s>>8&15]+HEX_CHARS[s>>4&15]+HEX_CHARS[15&s]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[15&n]+HEX_CHARS[o>>28&15]+HEX_CHARS[o>>24&15]+HEX_CHARS[o>>20&15]+HEX_CHARS[o>>16&15]+HEX_CHARS[o>>12&15]+HEX_CHARS[o>>8&15]+HEX_CHARS[o>>4&15]+HEX_CHARS[15&o]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[15&i];return this.is224||(c+=HEX_CHARS[a>>28&15]+HEX_CHARS[a>>24&15]+HEX_CHARS[a>>20&15]+HEX_CHARS[a>>16&15]+HEX_CHARS[a>>12&15]+HEX_CHARS[a>>8&15]+HEX_CHARS[a>>4&15]+HEX_CHARS[15&a]),c},Sha256.prototype.toString=Sha256.prototype.hex,Sha256.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,s=this.h3,n=this.h4,o=this.h5,i=this.h6,a=this.h7,c=[e>>24&255,e>>16&255,e>>8&255,255&e,t>>24&255,t>>16&255,t>>8&255,255&t,r>>24&255,r>>16&255,r>>8&255,255&r,s>>24&255,s>>16&255,s>>8&255,255&s,n>>24&255,n>>16&255,n>>8&255,255&n,o>>24&255,o>>16&255,o>>8&255,255&o,i>>24&255,i>>16&255,i>>8&255,255&i];return this.is224||c.push(a>>24&255,a>>16&255,a>>8&255,255&a),c},Sha256.prototype.array=Sha256.prototype.digest,Sha256.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e},HmacSha256.prototype=new Sha256,HmacSha256.prototype.finalize=function(){if(Sha256.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();Sha256.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),Sha256.prototype.finalize.call(this)}};var exports=createMethod();exports.sha256=exports,exports.sha224=createMethod(!0),exports.sha256.hmac=createHmacMethod(),exports.sha224.hmac=createHmacMethod(!0),COMMON_JS?module.exports=exports:(root.sha256=exports.sha256,root.sha224=exports.sha224,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__webpack_require__,exports,module),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))})()},583:(e,t,r)=>{var s;!function(){"use strict";var n="input is invalid type",o="object"==typeof window,i=o?window:{};i.JS_SHA3_NO_WINDOW&&(o=!1);var a=!o&&"object"==typeof self;!i.JS_SHA3_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?i=r.g:a&&(i=self);var c=!i.JS_SHA3_NO_COMMON_JS&&e.exports,u=r.amdO,d=!i.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,l="0123456789abcdef".split(""),h=[4,1024,262144,67108864],p=[0,8,16,24],f=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],g=[224,256,384,512],m=[128,256],y=["hex","buffer","arrayBuffer","array","digest"],b={128:168,256:136};!i.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!d||!i.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var w=function(e,t,r){return function(s){return new P(e,t,e).update(s)[r]()}},A=function(e,t,r){return function(s,n){return new P(e,t,n).update(s)[r]()}},v=function(e,t,r){return function(t,s,n,o){return T["cshake"+e].update(t,s,n,o)[r]()}},x=function(e,t,r){return function(t,s,n,o){return T["kmac"+e].update(t,s,n,o)[r]()}},_=function(e,t,r,s){for(var n=0;n<y.length;++n){var o=y[n];e[o]=t(r,s,o)}return e},S=function(e,t){var r=w(e,t,"hex");return r.create=function(){return new P(e,t,e)},r.update=function(e){return r.create().update(e)},_(r,w,e,t)},E=[{name:"keccak",padding:[1,256,65536,16777216],bits:g,createMethod:S},{name:"sha3",padding:[6,1536,393216,100663296],bits:g,createMethod:S},{name:"shake",padding:[31,7936,2031616,520093696],bits:m,createMethod:function(e,t){var r=A(e,t,"hex");return r.create=function(r){return new P(e,t,r)},r.update=function(e,t){return r.create(t).update(e)},_(r,A,e,t)}},{name:"cshake",padding:h,bits:m,createMethod:function(e,t){var r=b[e],s=v(e,0,"hex");return s.create=function(s,n,o){return n||o?new P(e,t,s).bytepad([n,o],r):T["shake"+e].create(s)},s.update=function(e,t,r,n){return s.create(t,r,n).update(e)},_(s,v,e,t)}},{name:"kmac",padding:h,bits:m,createMethod:function(e,t){var r=b[e],s=x(e,0,"hex");return s.create=function(s,n,o){return new N(e,t,n).bytepad(["KMAC",o],r).bytepad([s],r)},s.update=function(e,t,r,n){return s.create(e,r,n).update(t)},_(s,x,e,t)}}],T={},R=[],B=0;B<E.length;++B)for(var k=E[B],U=k.bits,I=0;I<U.length;++I){var C=k.name+"_"+U[I];if(R.push(C),T[C]=k.createMethod(U[I],k.padding),"sha3"!==k.name){var D=k.name+U[I];R.push(D),T[D]=T[C]}}function P(e,t,r){this.blocks=[],this.s=[],this.padding=t,this.outputBits=r,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(e<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var s=0;s<50;++s)this.s[s]=0}function N(e,t,r){P.call(this,e,t,r)}P.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(n);if(null===e)throw new Error(n);if(d&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||d&&ArrayBuffer.isView(e)))throw new Error(n);t=!0}for(var s,o,i=this.blocks,a=this.byteCount,c=e.length,u=this.blockCount,l=0,h=this.s;l<c;){if(this.reset)for(this.reset=!1,i[0]=this.block,s=1;s<u+1;++s)i[s]=0;if(t)for(s=this.start;l<c&&s<a;++l)i[s>>2]|=e[l]<<p[3&s++];else for(s=this.start;l<c&&s<a;++l)(o=e.charCodeAt(l))<128?i[s>>2]|=o<<p[3&s++]:o<2048?(i[s>>2]|=(192|o>>6)<<p[3&s++],i[s>>2]|=(128|63&o)<<p[3&s++]):o<55296||o>=57344?(i[s>>2]|=(224|o>>12)<<p[3&s++],i[s>>2]|=(128|o>>6&63)<<p[3&s++],i[s>>2]|=(128|63&o)<<p[3&s++]):(o=65536+((1023&o)<<10|1023&e.charCodeAt(++l)),i[s>>2]|=(240|o>>18)<<p[3&s++],i[s>>2]|=(128|o>>12&63)<<p[3&s++],i[s>>2]|=(128|o>>6&63)<<p[3&s++],i[s>>2]|=(128|63&o)<<p[3&s++]);if(this.lastByteIndex=s,s>=a){for(this.start=s-a,this.block=i[u],s=0;s<u;++s)h[s]^=i[s];O(h),this.reset=!0}else this.start=s}return this},P.prototype.encode=function(e,t){var r=255&e,s=1,n=[r];for(r=255&(e>>=8);r>0;)n.unshift(r),r=255&(e>>=8),++s;return t?n.push(s):n.unshift(s),this.update(n),n.length},P.prototype.encodeString=function(e){var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(n);if(null===e)throw new Error(n);if(d&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||d&&ArrayBuffer.isView(e)))throw new Error(n);t=!0}var s=0,o=e.length;if(t)s=o;else for(var i=0;i<e.length;++i){var a=e.charCodeAt(i);a<128?s+=1:a<2048?s+=2:a<55296||a>=57344?s+=3:(a=65536+((1023&a)<<10|1023&e.charCodeAt(++i)),s+=4)}return s+=this.encode(8*s),this.update(e),s},P.prototype.bytepad=function(e,t){for(var r=this.encode(t),s=0;s<e.length;++s)r+=this.encodeString(e[s]);var n=t-r%t,o=[];return o.length=n,this.update(o),this},P.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex,r=this.blockCount,s=this.s;if(e[t>>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t<r+1;++t)e[t]=0;for(e[r-1]|=2147483648,t=0;t<r;++t)s[t]^=e[t];O(s)}},P.prototype.toString=P.prototype.hex=function(){this.finalize();for(var e,t=this.blockCount,r=this.s,s=this.outputBlocks,n=this.extraBytes,o=0,i=0,a="";i<s;){for(o=0;o<t&&i<s;++o,++i)e=r[o],a+=l[e>>4&15]+l[15&e]+l[e>>12&15]+l[e>>8&15]+l[e>>20&15]+l[e>>16&15]+l[e>>28&15]+l[e>>24&15];i%t==0&&(O(r),o=0)}return n&&(e=r[o],a+=l[e>>4&15]+l[15&e],n>1&&(a+=l[e>>12&15]+l[e>>8&15]),n>2&&(a+=l[e>>20&15]+l[e>>16&15])),a},P.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,s=this.outputBlocks,n=this.extraBytes,o=0,i=0,a=this.outputBits>>3;e=n?new ArrayBuffer(s+1<<2):new ArrayBuffer(a);for(var c=new Uint32Array(e);i<s;){for(o=0;o<t&&i<s;++o,++i)c[i]=r[o];i%t==0&&O(r)}return n&&(c[o]=r[o],e=e.slice(0,a)),e},P.prototype.buffer=P.prototype.arrayBuffer,P.prototype.digest=P.prototype.array=function(){this.finalize();for(var e,t,r=this.blockCount,s=this.s,n=this.outputBlocks,o=this.extraBytes,i=0,a=0,c=[];a<n;){for(i=0;i<r&&a<n;++i,++a)e=a<<2,t=s[i],c[e]=255&t,c[e+1]=t>>8&255,c[e+2]=t>>16&255,c[e+3]=t>>24&255;a%r==0&&O(s)}return o&&(e=a<<2,t=s[i],c[e]=255&t,o>1&&(c[e+1]=t>>8&255),o>2&&(c[e+2]=t>>16&255)),c},N.prototype=new P,N.prototype.finalize=function(){return this.encode(this.outputBits,!0),P.prototype.finalize.call(this)};var O=function(e){var t,r,s,n,o,i,a,c,u,d,l,h,p,g,m,y,b,w,A,v,x,_,S,E,T,R,B,k,U,I,C,D,P,N,O,L,F,j,z,q,M,$,H,K,G,V,W,Z,X,Y,J,Q,ee,te,re,se,ne,oe,ie,ae,ce,ue,de;for(s=0;s<48;s+=2)n=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],i=e[2]^e[12]^e[22]^e[32]^e[42],a=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],u=e[5]^e[15]^e[25]^e[35]^e[45],d=e[6]^e[16]^e[26]^e[36]^e[46],l=e[7]^e[17]^e[27]^e[37]^e[47],t=(h=e[8]^e[18]^e[28]^e[38]^e[48])^(i<<1|a>>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(a<<1|i>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=n^(c<<1|u>>>31),r=o^(u<<1|c>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=i^(d<<1|l>>>31),r=a^(l<<1|d>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=c^(h<<1|p>>>31),r=u^(p<<1|h>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=d^(n<<1|o>>>31),r=l^(o<<1|n>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,g=e[0],m=e[1],V=e[11]<<4|e[10]>>>28,W=e[10]<<4|e[11]>>>28,k=e[20]<<3|e[21]>>>29,U=e[21]<<3|e[20]>>>29,ae=e[31]<<9|e[30]>>>23,ce=e[30]<<9|e[31]>>>23,$=e[40]<<18|e[41]>>>14,H=e[41]<<18|e[40]>>>14,N=e[2]<<1|e[3]>>>31,O=e[3]<<1|e[2]>>>31,y=e[13]<<12|e[12]>>>20,b=e[12]<<12|e[13]>>>20,Z=e[22]<<10|e[23]>>>22,X=e[23]<<10|e[22]>>>22,I=e[33]<<13|e[32]>>>19,C=e[32]<<13|e[33]>>>19,ue=e[42]<<2|e[43]>>>30,de=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,F=e[15]<<6|e[14]>>>26,w=e[25]<<11|e[24]>>>21,A=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,J=e[35]<<15|e[34]>>>17,D=e[45]<<29|e[44]>>>3,P=e[44]<<29|e[45]>>>3,E=e[6]<<28|e[7]>>>4,T=e[7]<<28|e[6]>>>4,se=e[17]<<23|e[16]>>>9,ne=e[16]<<23|e[17]>>>9,j=e[26]<<25|e[27]>>>7,z=e[27]<<25|e[26]>>>7,v=e[36]<<21|e[37]>>>11,x=e[37]<<21|e[36]>>>11,Q=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,K=e[8]<<27|e[9]>>>5,G=e[9]<<27|e[8]>>>5,R=e[18]<<20|e[19]>>>12,B=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ie=e[28]<<7|e[29]>>>25,q=e[38]<<8|e[39]>>>24,M=e[39]<<8|e[38]>>>24,_=e[48]<<14|e[49]>>>18,S=e[49]<<14|e[48]>>>18,e[0]=g^~y&w,e[1]=m^~b&A,e[10]=E^~R&k,e[11]=T^~B&U,e[20]=N^~L&j,e[21]=O^~F&z,e[30]=K^~V&Z,e[31]=G^~W&X,e[40]=te^~se&oe,e[41]=re^~ne&ie,e[2]=y^~w&v,e[3]=b^~A&x,e[12]=R^~k&I,e[13]=B^~U&C,e[22]=L^~j&q,e[23]=F^~z&M,e[32]=V^~Z&Y,e[33]=W^~X&J,e[42]=se^~oe&ae,e[43]=ne^~ie&ce,e[4]=w^~v&_,e[5]=A^~x&S,e[14]=k^~I&D,e[15]=U^~C&P,e[24]=j^~q&$,e[25]=z^~M&H,e[34]=Z^~Y&Q,e[35]=X^~J&ee,e[44]=oe^~ae&ue,e[45]=ie^~ce&de,e[6]=v^~_&g,e[7]=x^~S&m,e[16]=I^~D&E,e[17]=C^~P&T,e[26]=q^~$&N,e[27]=M^~H&O,e[36]=Y^~Q&K,e[37]=J^~ee&G,e[46]=ae^~ue&te,e[47]=ce^~de&re,e[8]=_^~g&y,e[9]=S^~m&b,e[18]=D^~E&R,e[19]=P^~T&B,e[28]=$^~N&L,e[29]=H^~O&F,e[38]=Q^~K&V,e[39]=ee^~G&W,e[48]=ue^~te&se,e[49]=de^~re&ne,e[0]^=f[s],e[1]^=f[s+1]};if(c)e.exports=T;else{for(B=0;B<R.length;++B)i[R[B]]=T[R[B]];u&&(void 0===(s=function(){return T}.call(t,r,t,e))||(e.exports=s))}}()},9757:(e,t,r)=>{var s;!function(){"use strict";var t="input is invalid type",n="object"==typeof window,o=n?window:{};o.JS_SHA512_NO_WINDOW&&(n=!1);var i=!n&&"object"==typeof self;!o.JS_SHA512_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?o=r.g:i&&(o=self);var a=!o.JS_SHA512_NO_COMMON_JS&&e.exports,c=r.amdO,u=!o.JS_SHA512_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,d="0123456789abcdef".split(""),l=[-2147483648,8388608,32768,128],h=[24,16,8,0],p=[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],f=["hex","array","digest","arrayBuffer"],g=[];!o.JS_SHA512_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!u||!o.JS_SHA512_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});var m=function(e,t){return function(r){return new A(t,!0).update(r)[e]()}},y=function(e){var t=m("hex",e);t.create=function(){return new A(e)},t.update=function(e){return t.create().update(e)};for(var r=0;r<f.length;++r){var s=f[r];t[s]=m(s,e)}return t},b=function(e,t){return function(r,s){return new v(r,t,!0).update(s)[e]()}},w=function(e){var t=b("hex",e);t.create=function(t){return new v(t,e)},t.update=function(e,r){return t.create(e).update(r)};for(var r=0;r<f.length;++r){var s=f[r];t[s]=b(s,e)}return t};function A(e,t){t?(g[0]=g[1]=g[2]=g[3]=g[4]=g[5]=g[6]=g[7]=g[8]=g[9]=g[10]=g[11]=g[12]=g[13]=g[14]=g[15]=g[16]=g[17]=g[18]=g[19]=g[20]=g[21]=g[22]=g[23]=g[24]=g[25]=g[26]=g[27]=g[28]=g[29]=g[30]=g[31]=g[32]=0,this.blocks=g):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],384==e?(this.h0h=3418070365,this.h0l=3238371032,this.h1h=1654270250,this.h1l=914150663,this.h2h=2438529370,this.h2l=812702999,this.h3h=355462360,this.h3l=4144912697,this.h4h=1731405415,this.h4l=4290775857,this.h5h=2394180231,this.h5l=1750603025,this.h6h=3675008525,this.h6l=1694076839,this.h7h=1203062813,this.h7l=3204075428):256==e?(this.h0h=573645204,this.h0l=4230739756,this.h1h=2673172387,this.h1l=3360449730,this.h2h=596883563,this.h2l=1867755857,this.h3h=2520282905,this.h3l=1497426621,this.h4h=2519219938,this.h4l=2827943907,this.h5h=3193839141,this.h5l=1401305490,this.h6h=721525244,this.h6l=746961066,this.h7h=246885852,this.h7l=2177182882):224==e?(this.h0h=2352822216,this.h0l=424955298,this.h1h=1944164710,this.h1l=2312950998,this.h2h=502970286,this.h2l=855612546,this.h3h=1738396948,this.h3l=1479516111,this.h4h=258812777,this.h4l=2077511080,this.h5h=2011393907,this.h5l=79989058,this.h6h=1067287976,this.h6l=1780299464,this.h7h=286451373,this.h7l=2446758561):(this.h0h=1779033703,this.h0l=4089235720,this.h1h=3144134277,this.h1l=2227873595,this.h2h=1013904242,this.h2l=4271175723,this.h3h=2773480762,this.h3l=1595750129,this.h4h=1359893119,this.h4l=2917565137,this.h5h=2600822924,this.h5l=725511199,this.h6h=528734635,this.h6l=4215389547,this.h7h=1541459225,this.h7l=327033209),this.bits=e,this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1}function v(e,r,s){var n,o=typeof e;if("string"!==o){if("object"!==o)throw new Error(t);if(null===e)throw new Error(t);if(u&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||u&&ArrayBuffer.isView(e)))throw new Error(t);n=!0}var i=e.length;if(!n){for(var a,c=[],d=(i=e.length,0),l=0;l<i;++l)(a=e.charCodeAt(l))<128?c[d++]=a:a<2048?(c[d++]=192|a>>6,c[d++]=128|63&a):a<55296||a>=57344?(c[d++]=224|a>>12,c[d++]=128|a>>6&63,c[d++]=128|63&a):(a=65536+((1023&a)<<10|1023&e.charCodeAt(++l)),c[d++]=240|a>>18,c[d++]=128|a>>12&63,c[d++]=128|a>>6&63,c[d++]=128|63&a);e=c}e.length>128&&(e=new A(r,!0).update(e).array());var h=[],p=[];for(l=0;l<128;++l){var f=e[l]||0;h[l]=92^f,p[l]=54^f}A.call(this,r,s),this.update(p),this.oKeyPad=h,this.inner=!0,this.sharedMemory=s}A.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var r,s=typeof e;if("string"!==s){if("object"!==s)throw new Error(t);if(null===e)throw new Error(t);if(u&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||u&&ArrayBuffer.isView(e)))throw new Error(t);r=!0}for(var n,o,i=0,a=e.length,c=this.blocks;i<a;){if(this.hashed&&(this.hashed=!1,c[0]=this.block,c[1]=c[2]=c[3]=c[4]=c[5]=c[6]=c[7]=c[8]=c[9]=c[10]=c[11]=c[12]=c[13]=c[14]=c[15]=c[16]=c[17]=c[18]=c[19]=c[20]=c[21]=c[22]=c[23]=c[24]=c[25]=c[26]=c[27]=c[28]=c[29]=c[30]=c[31]=c[32]=0),r)for(o=this.start;i<a&&o<128;++i)c[o>>2]|=e[i]<<h[3&o++];else for(o=this.start;i<a&&o<128;++i)(n=e.charCodeAt(i))<128?c[o>>2]|=n<<h[3&o++]:n<2048?(c[o>>2]|=(192|n>>6)<<h[3&o++],c[o>>2]|=(128|63&n)<<h[3&o++]):n<55296||n>=57344?(c[o>>2]|=(224|n>>12)<<h[3&o++],c[o>>2]|=(128|n>>6&63)<<h[3&o++],c[o>>2]|=(128|63&n)<<h[3&o++]):(n=65536+((1023&n)<<10|1023&e.charCodeAt(++i)),c[o>>2]|=(240|n>>18)<<h[3&o++],c[o>>2]|=(128|n>>12&63)<<h[3&o++],c[o>>2]|=(128|n>>6&63)<<h[3&o++],c[o>>2]|=(128|63&n)<<h[3&o++]);this.lastByteIndex=o,this.bytes+=o-this.start,o>=128?(this.block=c[32],this.start=o-128,this.hash(),this.hashed=!0):this.start=o}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this},A.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[32]=this.block,e[t>>2]|=l[3&t],this.block=e[32],t>=112&&(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,t,r,s,n,o,i,a,c,u,d,l,h,f,g,m,y,b,w,A,v,x,_,S,E,T=this.h0h,R=this.h0l,B=this.h1h,k=this.h1l,U=this.h2h,I=this.h2l,C=this.h3h,D=this.h3l,P=this.h4h,N=this.h4l,O=this.h5h,L=this.h5l,F=this.h6h,j=this.h6l,z=this.h7h,q=this.h7l,M=this.blocks;for(e=32;e<160;e+=2)t=((A=M[e-30])>>>1|(v=M[e-29])<<31)^(A>>>8|v<<24)^A>>>7,r=(v>>>1|A<<31)^(v>>>8|A<<24)^(v>>>7|A<<25),s=((A=M[e-4])>>>19|(v=M[e-3])<<13)^(v>>>29|A<<3)^A>>>6,n=(v>>>19|A<<13)^(A>>>29|v<<3)^(v>>>6|A<<26),A=M[e-32],v=M[e-31],c=((x=M[e-14])>>>16)+(A>>>16)+(t>>>16)+(s>>>16)+((a=(65535&x)+(65535&A)+(65535&t)+(65535&s)+((i=((_=M[e-13])>>>16)+(v>>>16)+(r>>>16)+(n>>>16)+((o=(65535&_)+(65535&v)+(65535&r)+(65535&n))>>>16))>>>16))>>>16),M[e]=c<<16|65535&a,M[e+1]=i<<16|65535&o;var $=T,H=R,K=B,G=k,V=U,W=I,Z=C,X=D,Y=P,J=N,Q=O,ee=L,te=F,re=j,se=z,ne=q;for(m=K&V,y=G&W,e=0;e<160;e+=8)t=($>>>28|H<<4)^(H>>>2|$<<30)^(H>>>7|$<<25),r=(H>>>28|$<<4)^($>>>2|H<<30)^($>>>7|H<<25),s=(Y>>>14|J<<18)^(Y>>>18|J<<14)^(J>>>9|Y<<23),n=(J>>>14|Y<<18)^(J>>>18|Y<<14)^(Y>>>9|J<<23),b=(u=$&K)^$&V^m,w=(d=H&G)^H&W^y,S=Y&Q^~Y&te,E=J&ee^~J&re,A=M[e],v=M[e+1],A=(c=((x=p[e])>>>16)+(A>>>16)+(S>>>16)+(s>>>16)+(se>>>16)+((a=(65535&x)+(65535&A)+(65535&S)+(65535&s)+(65535&se)+((i=((_=p[e+1])>>>16)+(v>>>16)+(E>>>16)+(n>>>16)+(ne>>>16)+((o=(65535&_)+(65535&v)+(65535&E)+(65535&n)+(65535&ne))>>>16))>>>16))>>>16))<<16|65535&a,v=i<<16|65535&o,x=(c=(b>>>16)+(t>>>16)+((a=(65535&b)+(65535&t)+((i=(w>>>16)+(r>>>16)+((o=(65535&w)+(65535&r))>>>16))>>>16))>>>16))<<16|65535&a,_=i<<16|65535&o,se=(c=(Z>>>16)+(A>>>16)+((a=(65535&Z)+(65535&A)+((i=(X>>>16)+(v>>>16)+((o=(65535&X)+(65535&v))>>>16))>>>16))>>>16))<<16|65535&a,ne=i<<16|65535&o,t=((Z=(c=(x>>>16)+(A>>>16)+((a=(65535&x)+(65535&A)+((i=(_>>>16)+(v>>>16)+((o=(65535&_)+(65535&v))>>>16))>>>16))>>>16))<<16|65535&a)>>>28|(X=i<<16|65535&o)<<4)^(X>>>2|Z<<30)^(X>>>7|Z<<25),r=(X>>>28|Z<<4)^(Z>>>2|X<<30)^(Z>>>7|X<<25),s=(se>>>14|ne<<18)^(se>>>18|ne<<14)^(ne>>>9|se<<23),n=(ne>>>14|se<<18)^(ne>>>18|se<<14)^(se>>>9|ne<<23),b=(l=Z&$)^Z&K^u,w=(h=X&H)^X&G^d,S=se&Y^~se&Q,E=ne&J^~ne&ee,A=M[e+2],v=M[e+3],A=(c=((x=p[e+2])>>>16)+(A>>>16)+(S>>>16)+(s>>>16)+(te>>>16)+((a=(65535&x)+(65535&A)+(65535&S)+(65535&s)+(65535&te)+((i=((_=p[e+3])>>>16)+(v>>>16)+(E>>>16)+(n>>>16)+(re>>>16)+((o=(65535&_)+(65535&v)+(65535&E)+(65535&n)+(65535&re))>>>16))>>>16))>>>16))<<16|65535&a,v=i<<16|65535&o,x=(c=(b>>>16)+(t>>>16)+((a=(65535&b)+(65535&t)+((i=(w>>>16)+(r>>>16)+((o=(65535&w)+(65535&r))>>>16))>>>16))>>>16))<<16|65535&a,_=i<<16|65535&o,te=(c=(V>>>16)+(A>>>16)+((a=(65535&V)+(65535&A)+((i=(W>>>16)+(v>>>16)+((o=(65535&W)+(65535&v))>>>16))>>>16))>>>16))<<16|65535&a,re=i<<16|65535&o,t=((V=(c=(x>>>16)+(A>>>16)+((a=(65535&x)+(65535&A)+((i=(_>>>16)+(v>>>16)+((o=(65535&_)+(65535&v))>>>16))>>>16))>>>16))<<16|65535&a)>>>28|(W=i<<16|65535&o)<<4)^(W>>>2|V<<30)^(W>>>7|V<<25),r=(W>>>28|V<<4)^(V>>>2|W<<30)^(V>>>7|W<<25),s=(te>>>14|re<<18)^(te>>>18|re<<14)^(re>>>9|te<<23),n=(re>>>14|te<<18)^(re>>>18|te<<14)^(te>>>9|re<<23),b=(f=V&Z)^V&$^l,w=(g=W&X)^W&H^h,S=te&se^~te&Y,E=re&ne^~re&J,A=M[e+4],v=M[e+5],A=(c=((x=p[e+4])>>>16)+(A>>>16)+(S>>>16)+(s>>>16)+(Q>>>16)+((a=(65535&x)+(65535&A)+(65535&S)+(65535&s)+(65535&Q)+((i=((_=p[e+5])>>>16)+(v>>>16)+(E>>>16)+(n>>>16)+(ee>>>16)+((o=(65535&_)+(65535&v)+(65535&E)+(65535&n)+(65535&ee))>>>16))>>>16))>>>16))<<16|65535&a,v=i<<16|65535&o,x=(c=(b>>>16)+(t>>>16)+((a=(65535&b)+(65535&t)+((i=(w>>>16)+(r>>>16)+((o=(65535&w)+(65535&r))>>>16))>>>16))>>>16))<<16|65535&a,_=i<<16|65535&o,Q=(c=(K>>>16)+(A>>>16)+((a=(65535&K)+(65535&A)+((i=(G>>>16)+(v>>>16)+((o=(65535&G)+(65535&v))>>>16))>>>16))>>>16))<<16|65535&a,ee=i<<16|65535&o,t=((K=(c=(x>>>16)+(A>>>16)+((a=(65535&x)+(65535&A)+((i=(_>>>16)+(v>>>16)+((o=(65535&_)+(65535&v))>>>16))>>>16))>>>16))<<16|65535&a)>>>28|(G=i<<16|65535&o)<<4)^(G>>>2|K<<30)^(G>>>7|K<<25),r=(G>>>28|K<<4)^(K>>>2|G<<30)^(K>>>7|G<<25),s=(Q>>>14|ee<<18)^(Q>>>18|ee<<14)^(ee>>>9|Q<<23),n=(ee>>>14|Q<<18)^(ee>>>18|Q<<14)^(Q>>>9|ee<<23),b=(m=K&V)^K&Z^f,w=(y=G&W)^G&X^g,S=Q&te^~Q&se,E=ee&re^~ee&ne,A=M[e+6],v=M[e+7],A=(c=((x=p[e+6])>>>16)+(A>>>16)+(S>>>16)+(s>>>16)+(Y>>>16)+((a=(65535&x)+(65535&A)+(65535&S)+(65535&s)+(65535&Y)+((i=((_=p[e+7])>>>16)+(v>>>16)+(E>>>16)+(n>>>16)+(J>>>16)+((o=(65535&_)+(65535&v)+(65535&E)+(65535&n)+(65535&J))>>>16))>>>16))>>>16))<<16|65535&a,v=i<<16|65535&o,x=(c=(b>>>16)+(t>>>16)+((a=(65535&b)+(65535&t)+((i=(w>>>16)+(r>>>16)+((o=(65535&w)+(65535&r))>>>16))>>>16))>>>16))<<16|65535&a,_=i<<16|65535&o,Y=(c=($>>>16)+(A>>>16)+((a=(65535&$)+(65535&A)+((i=(H>>>16)+(v>>>16)+((o=(65535&H)+(65535&v))>>>16))>>>16))>>>16))<<16|65535&a,J=i<<16|65535&o,$=(c=(x>>>16)+(A>>>16)+((a=(65535&x)+(65535&A)+((i=(_>>>16)+(v>>>16)+((o=(65535&_)+(65535&v))>>>16))>>>16))>>>16))<<16|65535&a,H=i<<16|65535&o;c=(T>>>16)+($>>>16)+((a=(65535&T)+(65535&$)+((i=(R>>>16)+(H>>>16)+((o=(65535&R)+(65535&H))>>>16))>>>16))>>>16),this.h0h=c<<16|65535&a,this.h0l=i<<16|65535&o,c=(B>>>16)+(K>>>16)+((a=(65535&B)+(65535&K)+((i=(k>>>16)+(G>>>16)+((o=(65535&k)+(65535&G))>>>16))>>>16))>>>16),this.h1h=c<<16|65535&a,this.h1l=i<<16|65535&o,c=(U>>>16)+(V>>>16)+((a=(65535&U)+(65535&V)+((i=(I>>>16)+(W>>>16)+((o=(65535&I)+(65535&W))>>>16))>>>16))>>>16),this.h2h=c<<16|65535&a,this.h2l=i<<16|65535&o,c=(C>>>16)+(Z>>>16)+((a=(65535&C)+(65535&Z)+((i=(D>>>16)+(X>>>16)+((o=(65535&D)+(65535&X))>>>16))>>>16))>>>16),this.h3h=c<<16|65535&a,this.h3l=i<<16|65535&o,c=(P>>>16)+(Y>>>16)+((a=(65535&P)+(65535&Y)+((i=(N>>>16)+(J>>>16)+((o=(65535&N)+(65535&J))>>>16))>>>16))>>>16),this.h4h=c<<16|65535&a,this.h4l=i<<16|65535&o,c=(O>>>16)+(Q>>>16)+((a=(65535&O)+(65535&Q)+((i=(L>>>16)+(ee>>>16)+((o=(65535&L)+(65535&ee))>>>16))>>>16))>>>16),this.h5h=c<<16|65535&a,this.h5l=i<<16|65535&o,c=(F>>>16)+(te>>>16)+((a=(65535&F)+(65535&te)+((i=(j>>>16)+(re>>>16)+((o=(65535&j)+(65535&re))>>>16))>>>16))>>>16),this.h6h=c<<16|65535&a,this.h6l=i<<16|65535&o,c=(z>>>16)+(se>>>16)+((a=(65535&z)+(65535&se)+((i=(q>>>16)+(ne>>>16)+((o=(65535&q)+(65535&ne))>>>16))>>>16))>>>16),this.h7h=c<<16|65535&a,this.h7l=i<<16|65535&o},A.prototype.hex=function(){this.finalize();var e=this.h0h,t=this.h0l,r=this.h1h,s=this.h1l,n=this.h2h,o=this.h2l,i=this.h3h,a=this.h3l,c=this.h4h,u=this.h4l,l=this.h5h,h=this.h5l,p=this.h6h,f=this.h6l,g=this.h7h,m=this.h7l,y=this.bits,b=d[e>>28&15]+d[e>>24&15]+d[e>>20&15]+d[e>>16&15]+d[e>>12&15]+d[e>>8&15]+d[e>>4&15]+d[15&e]+d[t>>28&15]+d[t>>24&15]+d[t>>20&15]+d[t>>16&15]+d[t>>12&15]+d[t>>8&15]+d[t>>4&15]+d[15&t]+d[r>>28&15]+d[r>>24&15]+d[r>>20&15]+d[r>>16&15]+d[r>>12&15]+d[r>>8&15]+d[r>>4&15]+d[15&r]+d[s>>28&15]+d[s>>24&15]+d[s>>20&15]+d[s>>16&15]+d[s>>12&15]+d[s>>8&15]+d[s>>4&15]+d[15&s]+d[n>>28&15]+d[n>>24&15]+d[n>>20&15]+d[n>>16&15]+d[n>>12&15]+d[n>>8&15]+d[n>>4&15]+d[15&n]+d[o>>28&15]+d[o>>24&15]+d[o>>20&15]+d[o>>16&15]+d[o>>12&15]+d[o>>8&15]+d[o>>4&15]+d[15&o]+d[i>>28&15]+d[i>>24&15]+d[i>>20&15]+d[i>>16&15]+d[i>>12&15]+d[i>>8&15]+d[i>>4&15]+d[15&i];return y>=256&&(b+=d[a>>28&15]+d[a>>24&15]+d[a>>20&15]+d[a>>16&15]+d[a>>12&15]+d[a>>8&15]+d[a>>4&15]+d[15&a]),y>=384&&(b+=d[c>>28&15]+d[c>>24&15]+d[c>>20&15]+d[c>>16&15]+d[c>>12&15]+d[c>>8&15]+d[c>>4&15]+d[15&c]+d[u>>28&15]+d[u>>24&15]+d[u>>20&15]+d[u>>16&15]+d[u>>12&15]+d[u>>8&15]+d[u>>4&15]+d[15&u]+d[l>>28&15]+d[l>>24&15]+d[l>>20&15]+d[l>>16&15]+d[l>>12&15]+d[l>>8&15]+d[l>>4&15]+d[15&l]+d[h>>28&15]+d[h>>24&15]+d[h>>20&15]+d[h>>16&15]+d[h>>12&15]+d[h>>8&15]+d[h>>4&15]+d[15&h]),512==y&&(b+=d[p>>28&15]+d[p>>24&15]+d[p>>20&15]+d[p>>16&15]+d[p>>12&15]+d[p>>8&15]+d[p>>4&15]+d[15&p]+d[f>>28&15]+d[f>>24&15]+d[f>>20&15]+d[f>>16&15]+d[f>>12&15]+d[f>>8&15]+d[f>>4&15]+d[15&f]+d[g>>28&15]+d[g>>24&15]+d[g>>20&15]+d[g>>16&15]+d[g>>12&15]+d[g>>8&15]+d[g>>4&15]+d[15&g]+d[m>>28&15]+d[m>>24&15]+d[m>>20&15]+d[m>>16&15]+d[m>>12&15]+d[m>>8&15]+d[m>>4&15]+d[15&m]),b},A.prototype.toString=A.prototype.hex,A.prototype.digest=function(){this.finalize();var e=this.h0h,t=this.h0l,r=this.h1h,s=this.h1l,n=this.h2h,o=this.h2l,i=this.h3h,a=this.h3l,c=this.h4h,u=this.h4l,d=this.h5h,l=this.h5l,h=this.h6h,p=this.h6l,f=this.h7h,g=this.h7l,m=this.bits,y=[e>>24&255,e>>16&255,e>>8&255,255&e,t>>24&255,t>>16&255,t>>8&255,255&t,r>>24&255,r>>16&255,r>>8&255,255&r,s>>24&255,s>>16&255,s>>8&255,255&s,n>>24&255,n>>16&255,n>>8&255,255&n,o>>24&255,o>>16&255,o>>8&255,255&o,i>>24&255,i>>16&255,i>>8&255,255&i];return m>=256&&y.push(a>>24&255,a>>16&255,a>>8&255,255&a),m>=384&&y.push(c>>24&255,c>>16&255,c>>8&255,255&c,u>>24&255,u>>16&255,u>>8&255,255&u,d>>24&255,d>>16&255,d>>8&255,255&d,l>>24&255,l>>16&255,l>>8&255,255&l),512==m&&y.push(h>>24&255,h>>16&255,h>>8&255,255&h,p>>24&255,p>>16&255,p>>8&255,255&p,f>>24&255,f>>16&255,f>>8&255,255&f,g>>24&255,g>>16&255,g>>8&255,255&g),y},A.prototype.array=A.prototype.digest,A.prototype.arrayBuffer=function(){this.finalize();var e=this.bits,t=new ArrayBuffer(e/8),r=new DataView(t);return r.setUint32(0,this.h0h),r.setUint32(4,this.h0l),r.setUint32(8,this.h1h),r.setUint32(12,this.h1l),r.setUint32(16,this.h2h),r.setUint32(20,this.h2l),r.setUint32(24,this.h3h),e>=256&&r.setUint32(28,this.h3l),e>=384&&(r.setUint32(32,this.h4h),r.setUint32(36,this.h4l),r.setUint32(40,this.h5h),r.setUint32(44,this.h5l)),512==e&&(r.setUint32(48,this.h6h),r.setUint32(52,this.h6l),r.setUint32(56,this.h7h),r.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,r=["h0h","h0l","h1h","h1l","h2h","h2l","h3h","h3l","h4h","h4l","h5h","h5l","h6h","h6l","h7h","h7l","start","bytes","hBytes","finalized","hashed","lastByteIndex"];for(t=0;t<r.length;++t)e[r[t]]=this[r[t]];for(t=0;t<this.blocks.length;++t)e.blocks[t]=this.blocks[t]},v.prototype=new A,v.prototype.finalize=function(){if(A.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();A.call(this,this.bits,this.sharedMemory),this.update(this.oKeyPad),this.update(e),A.prototype.finalize.call(this)}},v.prototype.clone=function(){var e=new v([],this.bits,!1);this.copyTo(e),e.inner=this.inner;for(var t=0;t<this.oKeyPad.length;++t)e.oKeyPad[t]=this.oKeyPad[t];return e};var x=y(512);x.sha512=x,x.sha384=y(384),x.sha512_256=y(256),x.sha512_224=y(224),x.sha512.hmac=w(512),x.sha384.hmac=w(384),x.sha512_256.hmac=w(256),x.sha512_224.hmac=w(224),a?e.exports=x:(o.sha512=x.sha512,o.sha384=x.sha384,o.sha512_256=x.sha512_256,o.sha512_224=x.sha512_224,c&&(void 0===(s=function(){return x}.call(x,r,x,e))||(e.exports=s)))}()},4360:(e,t,r)=>{var s=r(592).stringify,n=r(9385);e.exports=function(e){return{parse:n(e),stringify:s}},e.exports.parse=n(),e.exports.stringify=s},9385:(e,t,r)=>{var s=null;const n=/(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/,o=/(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/;e.exports=function(e){"use strict";var t={strict:!1,storeAsString:!1,alwaysParseAsBig:!1,useNativeBigInt:!1,protoAction:"error",constructorAction:"error"};if(null!=e){if(!0===e.strict&&(t.strict=!0),!0===e.storeAsString&&(t.storeAsString=!0),t.alwaysParseAsBig=!0===e.alwaysParseAsBig&&e.alwaysParseAsBig,t.useNativeBigInt=!0===e.useNativeBigInt&&e.useNativeBigInt,void 0!==e.constructorAction){if("error"!==e.constructorAction&&"ignore"!==e.constructorAction&&"preserve"!==e.constructorAction)throw new Error(`Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${e.constructorAction}`);t.constructorAction=e.constructorAction}if(void 0!==e.protoAction){if("error"!==e.protoAction&&"ignore"!==e.protoAction&&"preserve"!==e.protoAction)throw new Error(`Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${e.protoAction}`);t.protoAction=e.protoAction}}var i,a,c,u,d={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},l=function(e){throw{name:"SyntaxError",message:e,at:i,text:c}},h=function(e){return e&&e!==a&&l("Expected '"+e+"' instead of '"+a+"'"),a=c.charAt(i),i+=1,a},p=function(){var e,n="";for("-"===a&&(n="-",h("-"));a>="0"&&a<="9";)n+=a,h();if("."===a)for(n+=".";h()&&a>="0"&&a<="9";)n+=a;if("e"===a||"E"===a)for(n+=a,h(),"-"!==a&&"+"!==a||(n+=a,h());a>="0"&&a<="9";)n+=a,h();if(e=+n,isFinite(e))return null==s&&(s=r(5117)),n.length>15?t.storeAsString?n:t.useNativeBigInt?BigInt(n):new s(n):t.alwaysParseAsBig?t.useNativeBigInt?BigInt(e):new s(e):e;l("Bad number")},f=function(){var e,t,r,s="";if('"'===a)for(var n=i;h();){if('"'===a)return i-1>n&&(s+=c.substring(n,i-1)),h(),s;if("\\"===a){if(i-1>n&&(s+=c.substring(n,i-1)),h(),"u"===a){for(r=0,t=0;t<4&&(e=parseInt(h(),16),isFinite(e));t+=1)r=16*r+e;s+=String.fromCharCode(r)}else{if("string"!=typeof d[a])break;s+=d[a]}n=i}}l("Bad string")},g=function(){for(;a&&a<=" ";)h()};return u=function(){switch(g(),a){case"{":return function(){var e,r=Object.create(null);if("{"===a){if(h("{"),g(),"}"===a)return h("}"),r;for(;a;){if(e=f(),g(),h(":"),!0===t.strict&&Object.hasOwnProperty.call(r,e)&&l('Duplicate key "'+e+'"'),!0===n.test(e)?"error"===t.protoAction?l("Object contains forbidden prototype property"):"ignore"===t.protoAction?u():r[e]=u():!0===o.test(e)?"error"===t.constructorAction?l("Object contains forbidden constructor property"):"ignore"===t.constructorAction?u():r[e]=u():r[e]=u(),g(),"}"===a)return h("}"),r;h(","),g()}}l("Bad object")}();case"[":return function(){var e=[];if("["===a){if(h("["),g(),"]"===a)return h("]"),e;for(;a;){if(e.push(u()),g(),"]"===a)return h("]"),e;h(","),g()}}l("Bad array")}();case'"':return f();case"-":return p();default:return a>="0"&&a<="9"?p():function(){switch(a){case"t":return h("t"),h("r"),h("u"),h("e"),!0;case"f":return h("f"),h("a"),h("l"),h("s"),h("e"),!1;case"n":return h("n"),h("u"),h("l"),h("l"),null}l("Unexpected '"+a+"'")}()}},function(e,t){var r;return c=e+"",i=0,a=" ",r=u(),g(),a&&l("Syntax error"),"function"==typeof t?function e(r,s){var n,o=r[s];return o&&"object"==typeof o&&Object.keys(o).forEach((function(t){void 0!==(n=e(o,t))?o[t]=n:delete o[t]})),t.call(r,s,o)}({"":r},""):r}}},592:(e,t,r)=>{var s=r(5117),n=e.exports;!function(){"use strict";var e,t,r,o=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,i={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function a(e){return o.lastIndex=0,o.test(e)?'"'+e.replace(o,(function(e){var t=i[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}function c(n,o){var i,u,d,l,h,p=e,f=o[n],g=null!=f&&(f instanceof s||s.isBigNumber(f));switch(f&&"object"==typeof f&&"function"==typeof f.toJSON&&(f=f.toJSON(n)),"function"==typeof r&&(f=r.call(o,n,f)),typeof f){case"string":return g?f:a(f);case"number":return isFinite(f)?String(f):"null";case"boolean":case"null":case"bigint":return String(f);case"object":if(!f)return"null";if(e+=t,h=[],"[object Array]"===Object.prototype.toString.apply(f)){for(l=f.length,i=0;i<l;i+=1)h[i]=c(i,f)||"null";return d=0===h.length?"[]":e?"[\n"+e+h.join(",\n"+e)+"\n"+p+"]":"["+h.join(",")+"]",e=p,d}if(r&&"object"==typeof r)for(l=r.length,i=0;i<l;i+=1)"string"==typeof r[i]&&(d=c(u=r[i],f))&&h.push(a(u)+(e?": ":":")+d);else Object.keys(f).forEach((function(t){var r=c(t,f);r&&h.push(a(t)+(e?": ":":")+r)}));return d=0===h.length?"{}":e?"{\n"+e+h.join(",\n"+e)+"\n"+p+"}":"{"+h.join(",")+"}",e=p,d}}"function"!=typeof n.stringify&&(n.stringify=function(s,n,o){var i;if(e="",t="","number"==typeof o)for(i=0;i<o;i+=1)t+=" ";else"string"==typeof o&&(t=o);if(r=n,n&&"function"!=typeof n&&("object"!=typeof n||"number"!=typeof n.length))throw new Error("JSON.stringify");return c("",{"":s})})}()},7765:function(e,t){!function(e){"use strict";var t=function(e){var t,r=new Float64Array(16);if(e)for(t=0;t<e.length;t++)r[t]=e[t];return r},r=function(){throw new Error("no PRNG")},s=new Uint8Array(16),n=new Uint8Array(32);n[0]=9;var o=t(),i=t([1]),a=t([56129,1]),c=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),u=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),d=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),l=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),h=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function p(e,t,r,s){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r,e[t+4]=s>>24&255,e[t+5]=s>>16&255,e[t+6]=s>>8&255,e[t+7]=255&s}function f(e,t,r,s,n){var o,i=0;for(o=0;o<n;o++)i|=e[t+o]^r[s+o];return(1&i-1>>>8)-1}function g(e,t,r,s){return f(e,t,r,s,16)}function m(e,t,r,s){return f(e,t,r,s,32)}function y(e,t,r,s){!function(e,t,r,s){for(var n,o=255&s[0]|(255&s[1])<<8|(255&s[2])<<16|(255&s[3])<<24,i=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,c=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,u=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,d=255&s[4]|(255&s[5])<<8|(255&s[6])<<16|(255&s[7])<<24,l=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,p=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,f=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,g=255&s[8]|(255&s[9])<<8|(255&s[10])<<16|(255&s[11])<<24,m=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,y=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,b=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,w=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,A=255&s[12]|(255&s[13])<<8|(255&s[14])<<16|(255&s[15])<<24,v=o,x=i,_=a,S=c,E=u,T=d,R=l,B=h,k=p,U=f,I=g,C=m,D=y,P=b,N=w,O=A,L=0;L<20;L+=2)v^=(n=(D^=(n=(k^=(n=(E^=(n=v+D|0)<<7|n>>>25)+v|0)<<9|n>>>23)+E|0)<<13|n>>>19)+k|0)<<18|n>>>14,T^=(n=(x^=(n=(P^=(n=(U^=(n=T+x|0)<<7|n>>>25)+T|0)<<9|n>>>23)+U|0)<<13|n>>>19)+P|0)<<18|n>>>14,I^=(n=(R^=(n=(_^=(n=(N^=(n=I+R|0)<<7|n>>>25)+I|0)<<9|n>>>23)+N|0)<<13|n>>>19)+_|0)<<18|n>>>14,O^=(n=(C^=(n=(B^=(n=(S^=(n=O+C|0)<<7|n>>>25)+O|0)<<9|n>>>23)+S|0)<<13|n>>>19)+B|0)<<18|n>>>14,v^=(n=(S^=(n=(_^=(n=(x^=(n=v+S|0)<<7|n>>>25)+v|0)<<9|n>>>23)+x|0)<<13|n>>>19)+_|0)<<18|n>>>14,T^=(n=(E^=(n=(B^=(n=(R^=(n=T+E|0)<<7|n>>>25)+T|0)<<9|n>>>23)+R|0)<<13|n>>>19)+B|0)<<18|n>>>14,I^=(n=(U^=(n=(k^=(n=(C^=(n=I+U|0)<<7|n>>>25)+I|0)<<9|n>>>23)+C|0)<<13|n>>>19)+k|0)<<18|n>>>14,O^=(n=(N^=(n=(P^=(n=(D^=(n=O+N|0)<<7|n>>>25)+O|0)<<9|n>>>23)+D|0)<<13|n>>>19)+P|0)<<18|n>>>14;v=v+o|0,x=x+i|0,_=_+a|0,S=S+c|0,E=E+u|0,T=T+d|0,R=R+l|0,B=B+h|0,k=k+p|0,U=U+f|0,I=I+g|0,C=C+m|0,D=D+y|0,P=P+b|0,N=N+w|0,O=O+A|0,e[0]=v>>>0&255,e[1]=v>>>8&255,e[2]=v>>>16&255,e[3]=v>>>24&255,e[4]=x>>>0&255,e[5]=x>>>8&255,e[6]=x>>>16&255,e[7]=x>>>24&255,e[8]=_>>>0&255,e[9]=_>>>8&255,e[10]=_>>>16&255,e[11]=_>>>24&255,e[12]=S>>>0&255,e[13]=S>>>8&255,e[14]=S>>>16&255,e[15]=S>>>24&255,e[16]=E>>>0&255,e[17]=E>>>8&255,e[18]=E>>>16&255,e[19]=E>>>24&255,e[20]=T>>>0&255,e[21]=T>>>8&255,e[22]=T>>>16&255,e[23]=T>>>24&255,e[24]=R>>>0&255,e[25]=R>>>8&255,e[26]=R>>>16&255,e[27]=R>>>24&255,e[28]=B>>>0&255,e[29]=B>>>8&255,e[30]=B>>>16&255,e[31]=B>>>24&255,e[32]=k>>>0&255,e[33]=k>>>8&255,e[34]=k>>>16&255,e[35]=k>>>24&255,e[36]=U>>>0&255,e[37]=U>>>8&255,e[38]=U>>>16&255,e[39]=U>>>24&255,e[40]=I>>>0&255,e[41]=I>>>8&255,e[42]=I>>>16&255,e[43]=I>>>24&255,e[44]=C>>>0&255,e[45]=C>>>8&255,e[46]=C>>>16&255,e[47]=C>>>24&255,e[48]=D>>>0&255,e[49]=D>>>8&255,e[50]=D>>>16&255,e[51]=D>>>24&255,e[52]=P>>>0&255,e[53]=P>>>8&255,e[54]=P>>>16&255,e[55]=P>>>24&255,e[56]=N>>>0&255,e[57]=N>>>8&255,e[58]=N>>>16&255,e[59]=N>>>24&255,e[60]=O>>>0&255,e[61]=O>>>8&255,e[62]=O>>>16&255,e[63]=O>>>24&255}(e,t,r,s)}function b(e,t,r,s){!function(e,t,r,s){for(var n,o=255&s[0]|(255&s[1])<<8|(255&s[2])<<16|(255&s[3])<<24,i=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,c=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,u=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,d=255&s[4]|(255&s[5])<<8|(255&s[6])<<16|(255&s[7])<<24,l=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,p=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,f=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,g=255&s[8]|(255&s[9])<<8|(255&s[10])<<16|(255&s[11])<<24,m=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,y=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,b=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,w=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,A=255&s[12]|(255&s[13])<<8|(255&s[14])<<16|(255&s[15])<<24,v=0;v<20;v+=2)o^=(n=(y^=(n=(p^=(n=(u^=(n=o+y|0)<<7|n>>>25)+o|0)<<9|n>>>23)+u|0)<<13|n>>>19)+p|0)<<18|n>>>14,d^=(n=(i^=(n=(b^=(n=(f^=(n=d+i|0)<<7|n>>>25)+d|0)<<9|n>>>23)+f|0)<<13|n>>>19)+b|0)<<18|n>>>14,g^=(n=(l^=(n=(a^=(n=(w^=(n=g+l|0)<<7|n>>>25)+g|0)<<9|n>>>23)+w|0)<<13|n>>>19)+a|0)<<18|n>>>14,A^=(n=(m^=(n=(h^=(n=(c^=(n=A+m|0)<<7|n>>>25)+A|0)<<9|n>>>23)+c|0)<<13|n>>>19)+h|0)<<18|n>>>14,o^=(n=(c^=(n=(a^=(n=(i^=(n=o+c|0)<<7|n>>>25)+o|0)<<9|n>>>23)+i|0)<<13|n>>>19)+a|0)<<18|n>>>14,d^=(n=(u^=(n=(h^=(n=(l^=(n=d+u|0)<<7|n>>>25)+d|0)<<9|n>>>23)+l|0)<<13|n>>>19)+h|0)<<18|n>>>14,g^=(n=(f^=(n=(p^=(n=(m^=(n=g+f|0)<<7|n>>>25)+g|0)<<9|n>>>23)+m|0)<<13|n>>>19)+p|0)<<18|n>>>14,A^=(n=(w^=(n=(b^=(n=(y^=(n=A+w|0)<<7|n>>>25)+A|0)<<9|n>>>23)+y|0)<<13|n>>>19)+b|0)<<18|n>>>14;e[0]=o>>>0&255,e[1]=o>>>8&255,e[2]=o>>>16&255,e[3]=o>>>24&255,e[4]=d>>>0&255,e[5]=d>>>8&255,e[6]=d>>>16&255,e[7]=d>>>24&255,e[8]=g>>>0&255,e[9]=g>>>8&255,e[10]=g>>>16&255,e[11]=g>>>24&255,e[12]=A>>>0&255,e[13]=A>>>8&255,e[14]=A>>>16&255,e[15]=A>>>24&255,e[16]=l>>>0&255,e[17]=l>>>8&255,e[18]=l>>>16&255,e[19]=l>>>24&255,e[20]=h>>>0&255,e[21]=h>>>8&255,e[22]=h>>>16&255,e[23]=h>>>24&255,e[24]=p>>>0&255,e[25]=p>>>8&255,e[26]=p>>>16&255,e[27]=p>>>24&255,e[28]=f>>>0&255,e[29]=f>>>8&255,e[30]=f>>>16&255,e[31]=f>>>24&255}(e,t,r,s)}var w=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function A(e,t,r,s,n,o,i){var a,c,u=new Uint8Array(16),d=new Uint8Array(64);for(c=0;c<16;c++)u[c]=0;for(c=0;c<8;c++)u[c]=o[c];for(;n>=64;){for(y(d,u,i,w),c=0;c<64;c++)e[t+c]=r[s+c]^d[c];for(a=1,c=8;c<16;c++)a=a+(255&u[c])|0,u[c]=255&a,a>>>=8;n-=64,t+=64,s+=64}if(n>0)for(y(d,u,i,w),c=0;c<n;c++)e[t+c]=r[s+c]^d[c];return 0}function v(e,t,r,s,n){var o,i,a=new Uint8Array(16),c=new Uint8Array(64);for(i=0;i<16;i++)a[i]=0;for(i=0;i<8;i++)a[i]=s[i];for(;r>=64;){for(y(c,a,n,w),i=0;i<64;i++)e[t+i]=c[i];for(o=1,i=8;i<16;i++)o=o+(255&a[i])|0,a[i]=255&o,o>>>=8;r-=64,t+=64}if(r>0)for(y(c,a,n,w),i=0;i<r;i++)e[t+i]=c[i];return 0}function x(e,t,r,s,n){var o=new Uint8Array(32);b(o,s,n,w);for(var i=new Uint8Array(8),a=0;a<8;a++)i[a]=s[a+16];return v(e,t,r,i,o)}function _(e,t,r,s,n,o,i){var a=new Uint8Array(32);b(a,o,i,w);for(var c=new Uint8Array(8),u=0;u<8;u++)c[u]=o[u+16];return A(e,t,r,s,n,c,a)}var S=function(e){var t,r,s,n,o,i,a,c;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,t=255&e[0]|(255&e[1])<<8,this.r[0]=8191&t,r=255&e[2]|(255&e[3])<<8,this.r[1]=8191&(t>>>13|r<<3),s=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(r>>>10|s<<6),n=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(s>>>7|n<<9),o=255&e[8]|(255&e[9])<<8,this.r[4]=255&(n>>>4|o<<12),this.r[5]=o>>>1&8190,i=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(o>>>14|i<<2),a=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(i>>>11|a<<5),c=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(a>>>8|c<<8),this.r[9]=c>>>5&127,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};function E(e,t,r,s,n,o){var i=new S(o);return i.update(r,s,n),i.finish(e,t),0}function T(e,t,r,s,n,o){var i=new Uint8Array(16);return E(i,0,r,s,n,o),g(e,t,i,0)}function R(e,t,r,s,n){var o;if(r<32)return-1;for(_(e,0,t,0,r,s,n),E(e,16,e,32,r-32,e),o=0;o<16;o++)e[o]=0;return 0}function B(e,t,r,s,n){var o,i=new Uint8Array(32);if(r<32)return-1;if(x(i,0,32,s,n),0!==T(t,16,t,32,r-32,i))return-1;for(_(e,0,t,0,r,s,n),o=0;o<32;o++)e[o]=0;return 0}function k(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function U(e){var t,r,s=1;for(t=0;t<16;t++)r=e[t]+s+65535,s=Math.floor(r/65536),e[t]=r-65536*s;e[0]+=s-1+37*(s-1)}function I(e,t,r){for(var s,n=~(r-1),o=0;o<16;o++)s=n&(e[o]^t[o]),e[o]^=s,t[o]^=s}function C(e,r){var s,n,o,i=t(),a=t();for(s=0;s<16;s++)a[s]=r[s];for(U(a),U(a),U(a),n=0;n<2;n++){for(i[0]=a[0]-65517,s=1;s<15;s++)i[s]=a[s]-65535-(i[s-1]>>16&1),i[s-1]&=65535;i[15]=a[15]-32767-(i[14]>>16&1),o=i[15]>>16&1,i[14]&=65535,I(a,i,1-o)}for(s=0;s<16;s++)e[2*s]=255&a[s],e[2*s+1]=a[s]>>8}function D(e,t){var r=new Uint8Array(32),s=new Uint8Array(32);return C(r,e),C(s,t),m(r,0,s,0)}function P(e){var t=new Uint8Array(32);return C(t,e),1&t[0]}function N(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function O(e,t,r){for(var s=0;s<16;s++)e[s]=t[s]+r[s]}function L(e,t,r){for(var s=0;s<16;s++)e[s]=t[s]-r[s]}function F(e,t,r){var s,n,o=0,i=0,a=0,c=0,u=0,d=0,l=0,h=0,p=0,f=0,g=0,m=0,y=0,b=0,w=0,A=0,v=0,x=0,_=0,S=0,E=0,T=0,R=0,B=0,k=0,U=0,I=0,C=0,D=0,P=0,N=0,O=r[0],L=r[1],F=r[2],j=r[3],z=r[4],q=r[5],M=r[6],$=r[7],H=r[8],K=r[9],G=r[10],V=r[11],W=r[12],Z=r[13],X=r[14],Y=r[15];o+=(s=t[0])*O,i+=s*L,a+=s*F,c+=s*j,u+=s*z,d+=s*q,l+=s*M,h+=s*$,p+=s*H,f+=s*K,g+=s*G,m+=s*V,y+=s*W,b+=s*Z,w+=s*X,A+=s*Y,i+=(s=t[1])*O,a+=s*L,c+=s*F,u+=s*j,d+=s*z,l+=s*q,h+=s*M,p+=s*$,f+=s*H,g+=s*K,m+=s*G,y+=s*V,b+=s*W,w+=s*Z,A+=s*X,v+=s*Y,a+=(s=t[2])*O,c+=s*L,u+=s*F,d+=s*j,l+=s*z,h+=s*q,p+=s*M,f+=s*$,g+=s*H,m+=s*K,y+=s*G,b+=s*V,w+=s*W,A+=s*Z,v+=s*X,x+=s*Y,c+=(s=t[3])*O,u+=s*L,d+=s*F,l+=s*j,h+=s*z,p+=s*q,f+=s*M,g+=s*$,m+=s*H,y+=s*K,b+=s*G,w+=s*V,A+=s*W,v+=s*Z,x+=s*X,_+=s*Y,u+=(s=t[4])*O,d+=s*L,l+=s*F,h+=s*j,p+=s*z,f+=s*q,g+=s*M,m+=s*$,y+=s*H,b+=s*K,w+=s*G,A+=s*V,v+=s*W,x+=s*Z,_+=s*X,S+=s*Y,d+=(s=t[5])*O,l+=s*L,h+=s*F,p+=s*j,f+=s*z,g+=s*q,m+=s*M,y+=s*$,b+=s*H,w+=s*K,A+=s*G,v+=s*V,x+=s*W,_+=s*Z,S+=s*X,E+=s*Y,l+=(s=t[6])*O,h+=s*L,p+=s*F,f+=s*j,g+=s*z,m+=s*q,y+=s*M,b+=s*$,w+=s*H,A+=s*K,v+=s*G,x+=s*V,_+=s*W,S+=s*Z,E+=s*X,T+=s*Y,h+=(s=t[7])*O,p+=s*L,f+=s*F,g+=s*j,m+=s*z,y+=s*q,b+=s*M,w+=s*$,A+=s*H,v+=s*K,x+=s*G,_+=s*V,S+=s*W,E+=s*Z,T+=s*X,R+=s*Y,p+=(s=t[8])*O,f+=s*L,g+=s*F,m+=s*j,y+=s*z,b+=s*q,w+=s*M,A+=s*$,v+=s*H,x+=s*K,_+=s*G,S+=s*V,E+=s*W,T+=s*Z,R+=s*X,B+=s*Y,f+=(s=t[9])*O,g+=s*L,m+=s*F,y+=s*j,b+=s*z,w+=s*q,A+=s*M,v+=s*$,x+=s*H,_+=s*K,S+=s*G,E+=s*V,T+=s*W,R+=s*Z,B+=s*X,k+=s*Y,g+=(s=t[10])*O,m+=s*L,y+=s*F,b+=s*j,w+=s*z,A+=s*q,v+=s*M,x+=s*$,_+=s*H,S+=s*K,E+=s*G,T+=s*V,R+=s*W,B+=s*Z,k+=s*X,U+=s*Y,m+=(s=t[11])*O,y+=s*L,b+=s*F,w+=s*j,A+=s*z,v+=s*q,x+=s*M,_+=s*$,S+=s*H,E+=s*K,T+=s*G,R+=s*V,B+=s*W,k+=s*Z,U+=s*X,I+=s*Y,y+=(s=t[12])*O,b+=s*L,w+=s*F,A+=s*j,v+=s*z,x+=s*q,_+=s*M,S+=s*$,E+=s*H,T+=s*K,R+=s*G,B+=s*V,k+=s*W,U+=s*Z,I+=s*X,C+=s*Y,b+=(s=t[13])*O,w+=s*L,A+=s*F,v+=s*j,x+=s*z,_+=s*q,S+=s*M,E+=s*$,T+=s*H,R+=s*K,B+=s*G,k+=s*V,U+=s*W,I+=s*Z,C+=s*X,D+=s*Y,w+=(s=t[14])*O,A+=s*L,v+=s*F,x+=s*j,_+=s*z,S+=s*q,E+=s*M,T+=s*$,R+=s*H,B+=s*K,k+=s*G,U+=s*V,I+=s*W,C+=s*Z,D+=s*X,P+=s*Y,A+=(s=t[15])*O,i+=38*(x+=s*F),a+=38*(_+=s*j),c+=38*(S+=s*z),u+=38*(E+=s*q),d+=38*(T+=s*M),l+=38*(R+=s*$),h+=38*(B+=s*H),p+=38*(k+=s*K),f+=38*(U+=s*G),g+=38*(I+=s*V),m+=38*(C+=s*W),y+=38*(D+=s*Z),b+=38*(P+=s*X),w+=38*(N+=s*Y),o=(s=(o+=38*(v+=s*L))+(n=1)+65535)-65536*(n=Math.floor(s/65536)),i=(s=i+n+65535)-65536*(n=Math.floor(s/65536)),a=(s=a+n+65535)-65536*(n=Math.floor(s/65536)),c=(s=c+n+65535)-65536*(n=Math.floor(s/65536)),u=(s=u+n+65535)-65536*(n=Math.floor(s/65536)),d=(s=d+n+65535)-65536*(n=Math.floor(s/65536)),l=(s=l+n+65535)-65536*(n=Math.floor(s/65536)),h=(s=h+n+65535)-65536*(n=Math.floor(s/65536)),p=(s=p+n+65535)-65536*(n=Math.floor(s/65536)),f=(s=f+n+65535)-65536*(n=Math.floor(s/65536)),g=(s=g+n+65535)-65536*(n=Math.floor(s/65536)),m=(s=m+n+65535)-65536*(n=Math.floor(s/65536)),y=(s=y+n+65535)-65536*(n=Math.floor(s/65536)),b=(s=b+n+65535)-65536*(n=Math.floor(s/65536)),w=(s=w+n+65535)-65536*(n=Math.floor(s/65536)),A=(s=A+n+65535)-65536*(n=Math.floor(s/65536)),o=(s=(o+=n-1+37*(n-1))+(n=1)+65535)-65536*(n=Math.floor(s/65536)),i=(s=i+n+65535)-65536*(n=Math.floor(s/65536)),a=(s=a+n+65535)-65536*(n=Math.floor(s/65536)),c=(s=c+n+65535)-65536*(n=Math.floor(s/65536)),u=(s=u+n+65535)-65536*(n=Math.floor(s/65536)),d=(s=d+n+65535)-65536*(n=Math.floor(s/65536)),l=(s=l+n+65535)-65536*(n=Math.floor(s/65536)),h=(s=h+n+65535)-65536*(n=Math.floor(s/65536)),p=(s=p+n+65535)-65536*(n=Math.floor(s/65536)),f=(s=f+n+65535)-65536*(n=Math.floor(s/65536)),g=(s=g+n+65535)-65536*(n=Math.floor(s/65536)),m=(s=m+n+65535)-65536*(n=Math.floor(s/65536)),y=(s=y+n+65535)-65536*(n=Math.floor(s/65536)),b=(s=b+n+65535)-65536*(n=Math.floor(s/65536)),w=(s=w+n+65535)-65536*(n=Math.floor(s/65536)),A=(s=A+n+65535)-65536*(n=Math.floor(s/65536)),o+=n-1+37*(n-1),e[0]=o,e[1]=i,e[2]=a,e[3]=c,e[4]=u,e[5]=d,e[6]=l,e[7]=h,e[8]=p,e[9]=f,e[10]=g,e[11]=m,e[12]=y,e[13]=b,e[14]=w,e[15]=A}function j(e,t){F(e,t,t)}function z(e,r){var s,n=t();for(s=0;s<16;s++)n[s]=r[s];for(s=253;s>=0;s--)j(n,n),2!==s&&4!==s&&F(n,n,r);for(s=0;s<16;s++)e[s]=n[s]}function q(e,r){var s,n=t();for(s=0;s<16;s++)n[s]=r[s];for(s=250;s>=0;s--)j(n,n),1!==s&&F(n,n,r);for(s=0;s<16;s++)e[s]=n[s]}function M(e,r,s){var n,o,i=new Uint8Array(32),c=new Float64Array(80),u=t(),d=t(),l=t(),h=t(),p=t(),f=t();for(o=0;o<31;o++)i[o]=r[o];for(i[31]=127&r[31]|64,i[0]&=248,N(c,s),o=0;o<16;o++)d[o]=c[o],h[o]=u[o]=l[o]=0;for(u[0]=h[0]=1,o=254;o>=0;--o)I(u,d,n=i[o>>>3]>>>(7&o)&1),I(l,h,n),O(p,u,l),L(u,u,l),O(l,d,h),L(d,d,h),j(h,p),j(f,u),F(u,l,u),F(l,d,p),O(p,u,l),L(u,u,l),j(d,u),L(l,h,f),F(u,l,a),O(u,u,h),F(l,l,u),F(u,h,f),F(h,d,c),j(d,p),I(u,d,n),I(l,h,n);for(o=0;o<16;o++)c[o+16]=u[o],c[o+32]=l[o],c[o+48]=d[o],c[o+64]=h[o];var g=c.subarray(32),m=c.subarray(16);return z(g,g),F(m,m,g),C(e,m),0}function $(e,t){return M(e,t,n)}function H(e,t){return r(t,32),$(e,t)}function K(e,t,r){var n=new Uint8Array(32);return M(n,r,t),b(e,s,n,w)}S.prototype.blocks=function(e,t,r){for(var s,n,o,i,a,c,u,d,l,h,p,f,g,m,y,b,w,A,v,x=this.fin?0:2048,_=this.h[0],S=this.h[1],E=this.h[2],T=this.h[3],R=this.h[4],B=this.h[5],k=this.h[6],U=this.h[7],I=this.h[8],C=this.h[9],D=this.r[0],P=this.r[1],N=this.r[2],O=this.r[3],L=this.r[4],F=this.r[5],j=this.r[6],z=this.r[7],q=this.r[8],M=this.r[9];r>=16;)h=l=0,h+=(_+=8191&(s=255&e[t+0]|(255&e[t+1])<<8))*D,h+=(S+=8191&(s>>>13|(n=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*M),h+=(E+=8191&(n>>>10|(o=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*q),h+=(T+=8191&(o>>>7|(i=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*z),l=(h+=(R+=8191&(i>>>4|(a=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*j))>>>13,h&=8191,h+=(B+=a>>>1&8191)*(5*F),h+=(k+=8191&(a>>>14|(c=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*L),h+=(U+=8191&(c>>>11|(u=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*O),h+=(I+=8191&(u>>>8|(d=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*N),p=l+=(h+=(C+=d>>>5|x)*(5*P))>>>13,p+=_*P,p+=S*D,p+=E*(5*M),p+=T*(5*q),l=(p+=R*(5*z))>>>13,p&=8191,p+=B*(5*j),p+=k*(5*F),p+=U*(5*L),p+=I*(5*O),l+=(p+=C*(5*N))>>>13,p&=8191,f=l,f+=_*N,f+=S*P,f+=E*D,f+=T*(5*M),l=(f+=R*(5*q))>>>13,f&=8191,f+=B*(5*z),f+=k*(5*j),f+=U*(5*F),f+=I*(5*L),g=l+=(f+=C*(5*O))>>>13,g+=_*O,g+=S*N,g+=E*P,g+=T*D,l=(g+=R*(5*M))>>>13,g&=8191,g+=B*(5*q),g+=k*(5*z),g+=U*(5*j),g+=I*(5*F),m=l+=(g+=C*(5*L))>>>13,m+=_*L,m+=S*O,m+=E*N,m+=T*P,l=(m+=R*D)>>>13,m&=8191,m+=B*(5*M),m+=k*(5*q),m+=U*(5*z),m+=I*(5*j),y=l+=(m+=C*(5*F))>>>13,y+=_*F,y+=S*L,y+=E*O,y+=T*N,l=(y+=R*P)>>>13,y&=8191,y+=B*D,y+=k*(5*M),y+=U*(5*q),y+=I*(5*z),b=l+=(y+=C*(5*j))>>>13,b+=_*j,b+=S*F,b+=E*L,b+=T*O,l=(b+=R*N)>>>13,b&=8191,b+=B*P,b+=k*D,b+=U*(5*M),b+=I*(5*q),w=l+=(b+=C*(5*z))>>>13,w+=_*z,w+=S*j,w+=E*F,w+=T*L,l=(w+=R*O)>>>13,w&=8191,w+=B*N,w+=k*P,w+=U*D,w+=I*(5*M),A=l+=(w+=C*(5*q))>>>13,A+=_*q,A+=S*z,A+=E*j,A+=T*F,l=(A+=R*L)>>>13,A&=8191,A+=B*O,A+=k*N,A+=U*P,A+=I*D,v=l+=(A+=C*(5*M))>>>13,v+=_*M,v+=S*q,v+=E*z,v+=T*j,l=(v+=R*F)>>>13,v&=8191,v+=B*L,v+=k*O,v+=U*N,v+=I*P,_=h=8191&(l=(l=((l+=(v+=C*D)>>>13)<<2)+l|0)+(h&=8191)|0),S=p+=l>>>=13,E=f&=8191,T=g&=8191,R=m&=8191,B=y&=8191,k=b&=8191,U=w&=8191,I=A&=8191,C=v&=8191,t+=16,r-=16;this.h[0]=_,this.h[1]=S,this.h[2]=E,this.h[3]=T,this.h[4]=R,this.h[5]=B,this.h[6]=k,this.h[7]=U,this.h[8]=I,this.h[9]=C},S.prototype.finish=function(e,t){var r,s,n,o,i=new Uint16Array(10);if(this.leftover){for(o=this.leftover,this.buffer[o++]=1;o<16;o++)this.buffer[o]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,o=2;o<10;o++)this.h[o]+=r,r=this.h[o]>>>13,this.h[o]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,i[0]=this.h[0]+5,r=i[0]>>>13,i[0]&=8191,o=1;o<10;o++)i[o]=this.h[o]+r,r=i[o]>>>13,i[o]&=8191;for(i[9]-=8192,s=(1^r)-1,o=0;o<10;o++)i[o]&=s;for(s=~s,o=0;o<10;o++)this.h[o]=this.h[o]&s|i[o];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),n=this.h[0]+this.pad[0],this.h[0]=65535&n,o=1;o<8;o++)n=(this.h[o]+this.pad[o]|0)+(n>>>16)|0,this.h[o]=65535&n;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},S.prototype.update=function(e,t,r){var s,n;if(this.leftover){for((n=16-this.leftover)>r&&(n=r),s=0;s<n;s++)this.buffer[this.leftover+s]=e[t+s];if(r-=n,t+=n,this.leftover+=n,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(r>=16&&(n=r-r%16,this.blocks(e,t,n),t+=n,r-=n),r){for(s=0;s<r;s++)this.buffer[this.leftover+s]=e[t+s];this.leftover+=r}};var G=R,V=B,W=[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];function Z(e,t,r,s){for(var n,o,i,a,c,u,d,l,h,p,f,g,m,y,b,w,A,v,x,_,S,E,T,R,B,k,U=new Int32Array(16),I=new Int32Array(16),C=e[0],D=e[1],P=e[2],N=e[3],O=e[4],L=e[5],F=e[6],j=e[7],z=t[0],q=t[1],M=t[2],$=t[3],H=t[4],K=t[5],G=t[6],V=t[7],Z=0;s>=128;){for(x=0;x<16;x++)_=8*x+Z,U[x]=r[_+0]<<24|r[_+1]<<16|r[_+2]<<8|r[_+3],I[x]=r[_+4]<<24|r[_+5]<<16|r[_+6]<<8|r[_+7];for(x=0;x<80;x++)if(n=C,o=D,i=P,a=N,c=O,u=L,d=F,h=z,p=q,f=M,g=$,m=H,y=K,b=G,T=65535&(E=V),R=E>>>16,B=65535&(S=j),k=S>>>16,T+=65535&(E=(H>>>14|O<<18)^(H>>>18|O<<14)^(O>>>9|H<<23)),R+=E>>>16,B+=65535&(S=(O>>>14|H<<18)^(O>>>18|H<<14)^(H>>>9|O<<23)),k+=S>>>16,T+=65535&(E=H&K^~H&G),R+=E>>>16,B+=65535&(S=O&L^~O&F),k+=S>>>16,T+=65535&(E=W[2*x+1]),R+=E>>>16,B+=65535&(S=W[2*x]),k+=S>>>16,S=U[x%16],R+=(E=I[x%16])>>>16,B+=65535&S,k+=S>>>16,B+=(R+=(T+=65535&E)>>>16)>>>16,T=65535&(E=v=65535&T|R<<16),R=E>>>16,B=65535&(S=A=65535&B|(k+=B>>>16)<<16),k=S>>>16,T+=65535&(E=(z>>>28|C<<4)^(C>>>2|z<<30)^(C>>>7|z<<25)),R+=E>>>16,B+=65535&(S=(C>>>28|z<<4)^(z>>>2|C<<30)^(z>>>7|C<<25)),k+=S>>>16,R+=(E=z&q^z&M^q&M)>>>16,B+=65535&(S=C&D^C&P^D&P),k+=S>>>16,l=65535&(B+=(R+=(T+=65535&E)>>>16)>>>16)|(k+=B>>>16)<<16,w=65535&T|R<<16,T=65535&(E=g),R=E>>>16,B=65535&(S=a),k=S>>>16,R+=(E=v)>>>16,B+=65535&(S=A),k+=S>>>16,D=n,P=o,N=i,O=a=65535&(B+=(R+=(T+=65535&E)>>>16)>>>16)|(k+=B>>>16)<<16,L=c,F=u,j=d,C=l,q=h,M=p,$=f,H=g=65535&T|R<<16,K=m,G=y,V=b,z=w,x%16==15)for(_=0;_<16;_++)S=U[_],T=65535&(E=I[_]),R=E>>>16,B=65535&S,k=S>>>16,S=U[(_+9)%16],T+=65535&(E=I[(_+9)%16]),R+=E>>>16,B+=65535&S,k+=S>>>16,A=U[(_+1)%16],T+=65535&(E=((v=I[(_+1)%16])>>>1|A<<31)^(v>>>8|A<<24)^(v>>>7|A<<25)),R+=E>>>16,B+=65535&(S=(A>>>1|v<<31)^(A>>>8|v<<24)^A>>>7),k+=S>>>16,A=U[(_+14)%16],R+=(E=((v=I[(_+14)%16])>>>19|A<<13)^(A>>>29|v<<3)^(v>>>6|A<<26))>>>16,B+=65535&(S=(A>>>19|v<<13)^(v>>>29|A<<3)^A>>>6),k+=S>>>16,k+=(B+=(R+=(T+=65535&E)>>>16)>>>16)>>>16,U[_]=65535&B|k<<16,I[_]=65535&T|R<<16;T=65535&(E=z),R=E>>>16,B=65535&(S=C),k=S>>>16,S=e[0],R+=(E=t[0])>>>16,B+=65535&S,k+=S>>>16,k+=(B+=(R+=(T+=65535&E)>>>16)>>>16)>>>16,e[0]=C=65535&B|k<<16,t[0]=z=65535&T|R<<16,T=65535&(E=q),R=E>>>16,B=65535&(S=D),k=S>>>16,S=e[1],R+=(E=t[1])>>>16,B+=65535&S,k+=S>>>16,k+=(B+=(R+=(T+=65535&E)>>>16)>>>16)>>>16,e[1]=D=65535&B|k<<16,t[1]=q=65535&T|R<<16,T=65535&(E=M),R=E>>>16,B=65535&(S=P),k=S>>>16,S=e[2],R+=(E=t[2])>>>16,B+=65535&S,k+=S>>>16,k+=(B+=(R+=(T+=65535&E)>>>16)>>>16)>>>16,e[2]=P=65535&B|k<<16,t[2]=M=65535&T|R<<16,T=65535&(E=$),R=E>>>16,B=65535&(S=N),k=S>>>16,S=e[3],R+=(E=t[3])>>>16,B+=65535&S,k+=S>>>16,k+=(B+=(R+=(T+=65535&E)>>>16)>>>16)>>>16,e[3]=N=65535&B|k<<16,t[3]=$=65535&T|R<<16,T=65535&(E=H),R=E>>>16,B=65535&(S=O),k=S>>>16,S=e[4],R+=(E=t[4])>>>16,B+=65535&S,k+=S>>>16,k+=(B+=(R+=(T+=65535&E)>>>16)>>>16)>>>16,e[4]=O=65535&B|k<<16,t[4]=H=65535&T|R<<16,T=65535&(E=K),R=E>>>16,B=65535&(S=L),k=S>>>16,S=e[5],R+=(E=t[5])>>>16,B+=65535&S,k+=S>>>16,k+=(B+=(R+=(T+=65535&E)>>>16)>>>16)>>>16,e[5]=L=65535&B|k<<16,t[5]=K=65535&T|R<<16,T=65535&(E=G),R=E>>>16,B=65535&(S=F),k=S>>>16,S=e[6],R+=(E=t[6])>>>16,B+=65535&S,k+=S>>>16,k+=(B+=(R+=(T+=65535&E)>>>16)>>>16)>>>16,e[6]=F=65535&B|k<<16,t[6]=G=65535&T|R<<16,T=65535&(E=V),R=E>>>16,B=65535&(S=j),k=S>>>16,S=e[7],R+=(E=t[7])>>>16,B+=65535&S,k+=S>>>16,k+=(B+=(R+=(T+=65535&E)>>>16)>>>16)>>>16,e[7]=j=65535&B|k<<16,t[7]=V=65535&T|R<<16,Z+=128,s-=128}return s}function X(e,t,r){var s,n=new Int32Array(8),o=new Int32Array(8),i=new Uint8Array(256),a=r;for(n[0]=1779033703,n[1]=3144134277,n[2]=1013904242,n[3]=2773480762,n[4]=1359893119,n[5]=2600822924,n[6]=528734635,n[7]=1541459225,o[0]=4089235720,o[1]=2227873595,o[2]=4271175723,o[3]=1595750129,o[4]=2917565137,o[5]=725511199,o[6]=4215389547,o[7]=327033209,Z(n,o,t,r),r%=128,s=0;s<r;s++)i[s]=t[a-r+s];for(i[r]=128,i[(r=256-128*(r<112?1:0))-9]=0,p(i,r-8,a/536870912|0,a<<3),Z(n,o,i,r),s=0;s<8;s++)p(e,8*s,n[s],o[s]);return 0}function Y(e,r){var s=t(),n=t(),o=t(),i=t(),a=t(),c=t(),d=t(),l=t(),h=t();L(s,e[1],e[0]),L(h,r[1],r[0]),F(s,s,h),O(n,e[0],e[1]),O(h,r[0],r[1]),F(n,n,h),F(o,e[3],r[3]),F(o,o,u),F(i,e[2],r[2]),O(i,i,i),L(a,n,s),L(c,i,o),O(d,i,o),O(l,n,s),F(e[0],a,c),F(e[1],l,d),F(e[2],d,c),F(e[3],a,l)}function J(e,t,r){var s;for(s=0;s<4;s++)I(e[s],t[s],r)}function Q(e,r){var s=t(),n=t(),o=t();z(o,r[2]),F(s,r[0],o),F(n,r[1],o),C(e,n),e[31]^=P(s)<<7}function ee(e,t,r){var s,n;for(k(e[0],o),k(e[1],i),k(e[2],i),k(e[3],o),n=255;n>=0;--n)J(e,t,s=r[n/8|0]>>(7&n)&1),Y(t,e),Y(e,e),J(e,t,s)}function te(e,r){var s=[t(),t(),t(),t()];k(s[0],d),k(s[1],l),k(s[2],i),F(s[3],d,l),ee(e,s,r)}function re(e,s,n){var o,i=new Uint8Array(64),a=[t(),t(),t(),t()];for(n||r(s,32),X(i,s,32),i[0]&=248,i[31]&=127,i[31]|=64,te(a,i),Q(e,a),o=0;o<32;o++)s[o+32]=e[o];return 0}var se=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function ne(e,t){var r,s,n,o;for(s=63;s>=32;--s){for(r=0,n=s-32,o=s-12;n<o;++n)t[n]+=r-16*t[s]*se[n-(s-32)],r=Math.floor((t[n]+128)/256),t[n]-=256*r;t[n]+=r,t[s]=0}for(r=0,n=0;n<32;n++)t[n]+=r-(t[31]>>4)*se[n],r=t[n]>>8,t[n]&=255;for(n=0;n<32;n++)t[n]-=r*se[n];for(s=0;s<32;s++)t[s+1]+=t[s]>>8,e[s]=255&t[s]}function oe(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;ne(e,r)}function ie(e,r,s,n){var o,i,a=new Uint8Array(64),c=new Uint8Array(64),u=new Uint8Array(64),d=new Float64Array(64),l=[t(),t(),t(),t()];X(a,n,32),a[0]&=248,a[31]&=127,a[31]|=64;var h=s+64;for(o=0;o<s;o++)e[64+o]=r[o];for(o=0;o<32;o++)e[32+o]=a[32+o];for(X(u,e.subarray(32),s+32),oe(u),te(l,u),Q(e,l),o=32;o<64;o++)e[o]=n[o];for(X(c,e,s+64),oe(c),o=0;o<64;o++)d[o]=0;for(o=0;o<32;o++)d[o]=u[o];for(o=0;o<32;o++)for(i=0;i<32;i++)d[o+i]+=c[o]*a[i];return ne(e.subarray(32),d),h}function ae(e,r,s,n){var a,u=new Uint8Array(32),d=new Uint8Array(64),l=[t(),t(),t(),t()],p=[t(),t(),t(),t()];if(s<64)return-1;if(function(e,r){var s=t(),n=t(),a=t(),u=t(),d=t(),l=t(),p=t();return k(e[2],i),N(e[1],r),j(a,e[1]),F(u,a,c),L(a,a,e[2]),O(u,e[2],u),j(d,u),j(l,d),F(p,l,d),F(s,p,a),F(s,s,u),q(s,s),F(s,s,a),F(s,s,u),F(s,s,u),F(e[0],s,u),j(n,e[0]),F(n,n,u),D(n,a)&&F(e[0],e[0],h),j(n,e[0]),F(n,n,u),D(n,a)?-1:(P(e[0])===r[31]>>7&&L(e[0],o,e[0]),F(e[3],e[0],e[1]),0)}(p,n))return-1;for(a=0;a<s;a++)e[a]=r[a];for(a=0;a<32;a++)e[a+32]=n[a];if(X(d,e,s),oe(d),ee(l,p,d),te(p,r.subarray(32)),Y(l,p),Q(u,l),s-=64,m(r,0,u,0)){for(a=0;a<s;a++)e[a]=0;return-1}for(a=0;a<s;a++)e[a]=r[a+64];return s}var ce=64,ue=32,de=64;function le(e,t){if(32!==e.length)throw new Error("bad key size");if(24!==t.length)throw new Error("bad nonce size")}function he(){for(var e=0;e<arguments.length;e++)if(!(arguments[e]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function pe(e){for(var t=0;t<e.length;t++)e[t]=0}e.lowlevel={crypto_core_hsalsa20:b,crypto_stream_xor:_,crypto_stream:x,crypto_stream_salsa20_xor:A,crypto_stream_salsa20:v,crypto_onetimeauth:E,crypto_onetimeauth_verify:T,crypto_verify_16:g,crypto_verify_32:m,crypto_secretbox:R,crypto_secretbox_open:B,crypto_scalarmult:M,crypto_scalarmult_base:$,crypto_box_beforenm:K,crypto_box_afternm:G,crypto_box:function(e,t,r,s,n,o){var i=new Uint8Array(32);return K(i,n,o),G(e,t,r,s,i)},crypto_box_open:function(e,t,r,s,n,o){var i=new Uint8Array(32);return K(i,n,o),V(e,t,r,s,i)},crypto_box_keypair:H,crypto_hash:X,crypto_sign:ie,crypto_sign_keypair:re,crypto_sign_open:ae,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:16,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:ce,crypto_sign_PUBLICKEYBYTES:ue,crypto_sign_SECRETKEYBYTES:de,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:t,D:c,L:se,pack25519:C,unpack25519:N,M:F,A:O,S:j,Z:L,pow2523:q,add:Y,set25519:k,modL:ne,scalarmult:ee,scalarbase:te},e.randomBytes=function(e){var t=new Uint8Array(e);return r(t,e),t},e.secretbox=function(e,t,r){he(e,t,r),le(r,t);for(var s=new Uint8Array(32+e.length),n=new Uint8Array(s.length),o=0;o<e.length;o++)s[o+32]=e[o];return R(n,s,s.length,t,r),n.subarray(16)},e.secretbox.open=function(e,t,r){he(e,t,r),le(r,t);for(var s=new Uint8Array(16+e.length),n=new Uint8Array(s.length),o=0;o<e.length;o++)s[o+16]=e[o];return s.length<32||0!==B(n,s,s.length,t,r)?null:n.subarray(32)},e.secretbox.keyLength=32,e.secretbox.nonceLength=24,e.secretbox.overheadLength=16,e.scalarMult=function(e,t){if(he(e,t),32!==e.length)throw new Error("bad n size");if(32!==t.length)throw new Error("bad p size");var r=new Uint8Array(32);return M(r,e,t),r},e.scalarMult.base=function(e){if(he(e),32!==e.length)throw new Error("bad n size");var t=new Uint8Array(32);return $(t,e),t},e.scalarMult.scalarLength=32,e.scalarMult.groupElementLength=32,e.box=function(t,r,s,n){var o=e.box.before(s,n);return e.secretbox(t,r,o)},e.box.before=function(e,t){he(e,t),function(e,t){if(32!==e.length)throw new Error("bad public key size");if(32!==t.length)throw new Error("bad secret key size")}(e,t);var r=new Uint8Array(32);return K(r,e,t),r},e.box.after=e.secretbox,e.box.open=function(t,r,s,n){var o=e.box.before(s,n);return e.secretbox.open(t,r,o)},e.box.open.after=e.secretbox.open,e.box.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(32);return H(e,t),{publicKey:e,secretKey:t}},e.box.keyPair.fromSecretKey=function(e){if(he(e),32!==e.length)throw new Error("bad secret key size");var t=new Uint8Array(32);return $(t,e),{publicKey:t,secretKey:new Uint8Array(e)}},e.box.publicKeyLength=32,e.box.secretKeyLength=32,e.box.sharedKeyLength=32,e.box.nonceLength=24,e.box.overheadLength=e.secretbox.overheadLength,e.sign=function(e,t){if(he(e,t),t.length!==de)throw new Error("bad secret key size");var r=new Uint8Array(ce+e.length);return ie(r,e,e.length,t),r},e.sign.open=function(e,t){if(he(e,t),t.length!==ue)throw new Error("bad public key size");var r=new Uint8Array(e.length),s=ae(r,e,e.length,t);if(s<0)return null;for(var n=new Uint8Array(s),o=0;o<n.length;o++)n[o]=r[o];return n},e.sign.detached=function(t,r){for(var s=e.sign(t,r),n=new Uint8Array(ce),o=0;o<n.length;o++)n[o]=s[o];return n},e.sign.detached.verify=function(e,t,r){if(he(e,t,r),t.length!==ce)throw new Error("bad signature size");if(r.length!==ue)throw new Error("bad public key size");var s,n=new Uint8Array(ce+e.length),o=new Uint8Array(ce+e.length);for(s=0;s<ce;s++)n[s]=t[s];for(s=0;s<e.length;s++)n[s+ce]=e[s];return ae(o,n,n.length,r)>=0},e.sign.keyPair=function(){var e=new Uint8Array(ue),t=new Uint8Array(de);return re(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(he(e),e.length!==de)throw new Error("bad secret key size");for(var t=new Uint8Array(ue),r=0;r<t.length;r++)t[r]=e[32+r];return{publicKey:t,secretKey:new Uint8Array(e)}},e.sign.keyPair.fromSeed=function(e){if(he(e),32!==e.length)throw new Error("bad seed size");for(var t=new Uint8Array(ue),r=new Uint8Array(de),s=0;s<32;s++)r[s]=e[s];return re(t,r,!0),{publicKey:t,secretKey:r}},e.sign.publicKeyLength=ue,e.sign.secretKeyLength=de,e.sign.seedLength=32,e.sign.signatureLength=ce,e.hash=function(e){he(e);var t=new Uint8Array(64);return X(t,e,e.length),t},e.hash.hashLength=64,e.verify=function(e,t){return he(e,t),0!==e.length&&0!==t.length&&e.length===t.length&&0===f(e,0,t,0,e.length)},e.setPRNG=function(e){r=e},function(){var t="undefined"!=typeof self?self.crypto||self.msCrypto:null;t&&t.getRandomValues?e.setPRNG((function(e,r){var s,n=new Uint8Array(r);for(s=0;s<r;s+=65536)t.getRandomValues(n.subarray(s,s+Math.min(r-s,65536)));for(s=0;s<r;s++)e[s]=n[s];pe(n)})):"undefined"!=typeof require&&(t=require("crypto"))&&t.randomBytes&&e.setPRNG((function(e,r){var s,n=t.randomBytes(r);for(s=0;s<r;s++)e[s]=n[s];pe(n)}))}()}(void 0!==e&&e.exports?e.exports:self.nacl=self.nacl||{})},5922:(e,t,r)=>{var s=r(2486).lW;const{default:n}=r(1113),{setSendTransactionHeaders:o}=r(5180);e.exports={Algod:function(e="",t="http://r2.algorand.network",r=4180,i={}){let a=e;"string"==typeof a&&(a={"X-Algo-API-Token":a});const c=new n(a,t,r,i);function u(e){return void 0!==e.noteb64&&null!==e.noteb64&&(e.note=s.from(e.noteb64,"base64")),e}this.status=async(e={})=>(await c.get("/v1/status",{},e)).body,this.healthCheck=async(e={})=>{const t=await c.get("/health",{},e);if(!t.ok)throw new Error(`Health response: ${t.status}`);return{}},this.statusAfterBlock=async(e,t={})=>{if(!Number.isInteger(e))throw Error("roundNumber should be an integer");return(await c.get(`/v1/status/wait-for-block-after/${e}`,{},t)).body},this.pendingTransactions=async(e,t={})=>{if(!Number.isInteger(e))throw Error("maxTxns should be an integer");const r=await c.get("/v1/transactions/pending",{max:e},t);if(200===r.statusCode&&void 0!==r.body.truncatedTxns.transactions)for(let e=0;e<r.body.truncatedTxns.transactions.length;e++)r.body.truncatedTxns.transactions[e]=u(r.body.truncatedTxns.transactions[e]);return r.body},this.versions=async(e={})=>(await c.get("/versions",{},e)).body,this.ledgerSupply=async(e={})=>(await c.get("/v1/ledger/supply",{},e)).body,this.transactionByAddress=async(e,t=null,r=null,s=null,n={})=>{if(null!==t&&!Number.isInteger(t))throw Error("first round should be an integer");if(null!==r&&!Number.isInteger(r))throw Error("last round should be an integer");const o=await c.get(`/v1/account/${e}/transactions`,{firstRound:t,lastRound:r,max:s},n);if(200===o.statusCode&&void 0!==o.body.transactions)for(let e=0;e<o.body.transactions.length;e++)o.body.transactions[e]=u(o.body.transactions[e]);return o.body},this.transactionByAddressAndDate=async(e,t,r,s=null,n={})=>{const o=await c.get(`/v1/account/${e}/transactions`,{fromDate:t,toDate:r,max:s},n);if(200===o.statusCode&&void 0!==o.body.transactions)for(let e=0;e<o.body.transactions.length;e++)o.body.transactions[e]=u(o.body.transactions[e]);return o.body},this.transactionById=async(e,t={})=>{const r=await c.get(`/v1/transaction/${e}`,{},t);return 200===r.statusCode&&(r.body=u(r.body)),r.body},this.transactionInformation=async(e,t,r={})=>{const s=await c.get(`/v1/account/${e}/transaction/${t}`,{},r);return 200===s.statusCode&&(s.body=u(s.body)),s.body},this.pendingTransactionInformation=async(e,t={})=>{const r=await c.get(`/v1/transactions/pending/${e}`,{},t);return 200===r.statusCode&&(r.body=u(r.body)),r.body},this.accountInformation=async(e,t={})=>(await c.get(`/v1/account/${e}`,{},t)).body,this.assetInformation=async(e,t={})=>(await c.get(`/v1/asset/${e}`,{},t)).body,this.suggestedFee=async(e={})=>(await c.get("/v1/transactions/fee",{},e)).body,this.sendRawTransaction=async(e,t={})=>{const r=o(t);return(await c.post("/v1/transactions",s.from(e),r)).body},this.sendRawTransactions=async(e,t={})=>{const r=o(t),n=Array.prototype.concat(...e.map((e=>Array.from(e))));return(await c.post("/v1/transactions",s.from(n),r)).body},this.getTransactionParams=async(e={})=>(await c.get("/v1/transactions/params",{},e)).body,this.suggestParams=async(e={})=>{const 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(e,t={})=>{if(!Number.isInteger(e))throw Error("roundNumber should be an integer");const r=await c.get(`/v1/block/${e}`,{},t);if(200===r.statusCode&&void 0!==r.body.txns.transactions)for(let e=0;e<r.body.txns.transactions.length;e++)r.body.txns.transactions[e]=u(r.body.txns.transactions[e]);return r.body}}}},1834:(e,t,r)=>{var s=r(2486).lW;const n=r(7116),o=r(3033),i=r(1063),a=r(568),c=r(8800),u=r(9404),d=r(2514),l=r(5592);e.exports={DynamicFee:class{constructor(e,t,r,o,i,a){if(!Number.isSafeInteger(t)||t<0)throw Error("amount must be a positive number and smaller than 2^53-1");if(!Number.isSafeInteger(r)||r<0)throw Error("firstValid must be a positive number and smaller than 2^53-1");if(!Number.isSafeInteger(o)||o<0)throw Error("lastValid must be a positive number and smaller than 2^53-1");if(void 0===i&&(i=n.ALGORAND_ZERO_ADDRESS_STRING),void 0===a){const e=u.randomBytes(32);a=s.from(e).toString("base64")}const l=s.from("ASAFAgEHBgUmAyD+vKC7FEpaTqe0OKRoGsgObKEFvLYH/FZTJclWlfaiEyDmmpYeby1feshmB5JlUr6YI17TM2PKiJGLuck4qRW2+SB/g7Flf/H8U7ktwYFIodZd/C1LH6PWdyhK3dIAEm2QaTIEIhIzABAjEhAzAAcxABIQMwAIMQESEDEWIxIQMRAjEhAxBygSEDEJKRIQMQgkEhAxAiUSEDEEIQQSEDEGKhIQ","base64"),h=[t,r,o,e,i,a],p=[d.valTypes.INT,d.valTypes.INT,d.valTypes.INT,d.valTypes.ADDRESS,d.valTypes.ADDRESS,d.valTypes.BASE64],f=d.inject(l,[5,6,7,11,44,76],h,p);this.programBytes=f;const g=new c.LogicSig(f,void 0);this.address=g.address()}getProgram(){return this.programBytes}getAddress(){return this.address}},getDynamicFeeTransactions:function(e,t,r,s){if(!t.verify(n.decodeAddress(e.from).publicKey))throw new Error("invalid signature");e.fee=s,e.fee<l.ALGORAND_MIN_TX_FEE&&(e.fee=l.ALGORAND_MIN_TX_FEE);const a=u.keyPairFromSecretKey(r),c=n.encodeAddress(a.publicKey),{lease:d}=e;delete e.lease;const h=new l.Transaction(e);h.addLease(d,s);const p={from:c,to:e.from,fee:s,amount:h.fee,firstRound:e.firstRound,lastRound:e.lastRound,genesisHash:e.genesisHash,type:"pay"},f=new l.Transaction(p);f.addLease(d,s);const g=i.assignGroupID([f,h],void 0),m=g[0],y=g[1],b={lsig:t.get_obj_for_encoding(),txn:y.get_obj_for_encoding()},w=m.signTxn(r),A=o.encode(b),v=new Uint8Array(w.length+A.length);return v.set(w),v.set(A,w.length),v},signDynamicFee:function(e,t,r){const s=a.readProgram(e,void 0),o=s[0],i=s[1],d=u.keyPairFromSecretKey(t),l={from:n.encodeAddress(d.publicKey),to:n.encodeAddress(i[0]),fee:0,amount:o[2],closeRemainderTo:n.encodeAddress(i[1]),firstRound:o[3],lastRound:o[4],genesisHash:r,type:"pay",lease:new Uint8Array(i[2])},h=new c.LogicSig(e,void 0);return h.sign(t),{txn:l,lsig:h}}}},1786:(e,t,r)=>{var s=r(2486).lW;const n=r(3477),{keccak256:o}=r(583),i=r(568),a=r(8800),c=r(2514),u=r(5592);e.exports={HTLC:class{constructor(e,t,r,n,o,i){if(!Number.isSafeInteger(o)||o<0)throw Error("expiryRound must be a positive number and smaller than 2^53-1");if(!Number.isSafeInteger(i)||i<0)throw Error("maxFee must be a positive number and smaller than 2^53-1");let u="";if("sha256"===r)u="ASAECAEACSYDIOaalh5vLV96yGYHkmVSvpgjXtMzY8qIkYu5yTipFbb5IH+DsWV/8fxTuS3BgUih1l38LUsfo9Z3KErd0gASbZBpIP68oLsUSlpOp7Q4pGgayA5soQW8tgf8VlMlyVaV9qITMQEiDjEQIxIQMQcyAxIQMQgkEhAxCSgSLQEpEhAxCSoSMQIlDRAREA==";else{if("keccak256"!==r)throw Error("hash function unrecognized");u="ASAECAEACSYDIOaalh5vLV96yGYHkmVSvpgjXtMzY8qIkYu5yTipFbb5IH+DsWV/8fxTuS3BgUih1l38LUsfo9Z3KErd0gASbZBpIP68oLsUSlpOp7Q4pGgayA5soQW8tgf8VlMlyVaV9qITMQEiDjEQIxIQMQcyAxIQMQgkEhAxCSgSLQIpEhAxCSoSMQIlDRAREA=="}if(32!==s.from(n,"base64").length)throw Error("hash image must be 32 bytes");const d=s.from(u,"base64"),l=[i,o,t,n,e],h=[c.valTypes.INT,c.valTypes.INT,c.valTypes.ADDRESS,c.valTypes.BASE64,c.valTypes.ADDRESS],p=c.inject(d,[3,6,10,42,76],l,h);this.programBytes=p;const f=new a.LogicSig(p,void 0);this.address=f.address()}getProgram(){return this.programBytes}getAddress(){return this.address}},signTransactionWithHTLCUnlock:function(e,t,r){const c=s.from(r,"base64"),d=i.readProgram(e,void 0),l=d[0],h=d[1][1],p=e[e.length-15];if(1===p){const e=n.create();if(e.update(c),!s.from(e.hex(),"hex").equals(h))throw new Error("sha256 hash of preimage did not match stored contract hash")}else{if(2!==p)throw new Error("hash function in contract unrecognized");{const e=o.create();if(e.update(c),!s.from(e.hex(),"hex").equals(h))throw new Error("keccak256 hash of preimage did not match stored contract hash")}}const f=[c],g=new a.LogicSig(e,f);delete t.to;const m=l[0],y=new u.Transaction(t);if(y.fee>m)throw new Error(`final fee of payment transaction${y.fee.toString()}greater than transaction max fee${m.toString()}`);return a.signLogicSigTransaction(t,g)}}},8886:(e,t,r)=>{const s=r(1834),n=r(1786),o=r(4748),i=r(3758),a=r(2200);e.exports={DynamicFee:s.DynamicFee,getDynamicFeeTransactions:s.getDynamicFeeTransactions,signDynamicFee:s.signDynamicFee,HTLC:n.HTLC,signTransactionWithHTLCUnlock:n.signTransactionWithHTLCUnlock,LimitOrder:o.LimitOrder,getSwapAssetsTransaction:o.getSwapAssetsTransaction,Split:i.Split,getSplitFundsTransaction:i.getSplitFundsTransaction,PeriodicPayment:a.PeriodicPayment,getPeriodicPaymentWithdrawalTransaction:a.getPeriodicPaymentWithdrawalTransaction}},4748:(e,t,r)=>{var s=r(2486).lW;const n=r(7116),o=r(1988),i=r(1063),a=r(568),c=r(8800),u=r(9404),d=r(2514),l=r(413);e.exports={LimitOrder:class{constructor(e,t,r,n,o,i,a){if(!Number.isSafeInteger(t)||t<0)throw Error("assetid must be a positive number and smaller than 2^53-1");if(!Number.isSafeInteger(r)||r<0)throw Error("ratn must be a positive number and smaller than 2^53-1");if(!Number.isSafeInteger(n)||n<0)throw Error("ratd must be a positive number and smaller than 2^53-1");if(!Number.isSafeInteger(o)||o<0)throw Error("expiryRound must be a positive number and smaller than 2^53-1");if(!Number.isSafeInteger(i)||i<0)throw Error("minTrade must be a positive number and smaller than 2^53-1");if(!Number.isSafeInteger(a)||a<0)throw Error("maxFee must be a positive number and smaller than 2^53-1");const u=s.from("ASAKAAEFAgYEBwgJCiYBIP68oLsUSlpOp7Q4pGgayA5soQW8tgf8VlMlyVaV9qITMRYiEjEQIxIQMQEkDhAyBCMSQABVMgQlEjEIIQQNEDEJMgMSEDMBECEFEhAzAREhBhIQMwEUKBIQMwETMgMSEDMBEiEHHTUCNQExCCEIHTUENQM0ATQDDUAAJDQBNAMSNAI0BA8QQAAWADEJKBIxAiEJDRAxBzIDEhAxCCISEBA=","base64"),l=[a,i,t,n,r,o,e],h=[d.valTypes.INT,d.valTypes.INT,d.valTypes.INT,d.valTypes.INT,d.valTypes.INT,d.valTypes.INT,d.valTypes.ADDRESS],p=d.inject(u,[5,7,9,10,11,12,16],l,h);this.programBytes=p;const f=new c.LogicSig(p,void 0);this.address=f.address(),this.owner=e,this.assetid=t}getProgram(){return this.programBytes}getAddress(){return this.address}},getSwapAssetsTransaction:function(e,t,r,s,d,h,p,f){const g=u.keyPairFromSecretKey(s),m=n.encodeAddress(g.publicKey),y=a.readProgram(e,void 0),b=y[0],w=y[1];let A;const v=b[6],x=n.encodeAddress(w[0]),_=c.makeLogicSig(e,void 0),S=_.address(),E=[o.makePaymentTxn(S,m,d,r,A,h,p,void 0,f,void 0),o.makeAssetTransferTxn(m,x,A,void 0,d,t,h,p,void 0,f,void 0,v)],T=i.assignGroupID(E),R=b[7],B=b[8];if(t*R<r*B)throw new Error(`bad payment ratio, ${t.toString()}*${R.toString()} !>= ${r.toString()}*${B.toString()}`);const k=b[4];if(r<k)throw new Error(`payment amount ${r.toString()} less than minimum trade ${k.toString()}`);const U=b[2];if(T[0].fee>U)throw new Error(`final fee of payment transaction ${T[0].fee.toString()} greater than transaction max fee ${U.toString()}`);if(T[1].fee>U)throw new Error(`final fee of asset transaction ${T[1].fee.toString()} greater than transaction max fee ${U.toString()}`);const I=c.signLogicSigTransactionObject(T[0],_),C=T[1].signTxn(s);return l.concatArrays(I.blob,C)}}},2200:(e,t,r)=>{var s=r(2486).lW;const n=r(7116),o=r(1988),i=r(568),a=r(8800),c=r(9404),u=r(2514);e.exports={PeriodicPayment:class{constructor(e,t,r,n,o,i,u){if(this.receiver=e,!Number.isSafeInteger(t)||t<0)throw Error("amount must be a positive number and smaller than 2^53-1");if(this.amount=t,!Number.isSafeInteger(r)||r<0)throw Error("withdrawalWindow must be a positive number and smaller than 2^53-1");if(this.withdrawalWindow=r,!Number.isSafeInteger(n)||n<0)throw Error("period must be a positive number and smaller than 2^53-1");if(this.period=n,!Number.isSafeInteger(o)||o<0)throw Error("expiryRound must be a positive number and smaller than 2^53-1");if(this.expiryRound=o,!Number.isSafeInteger(i)||i<0)throw Error("maxFee must be a positive number and smaller than 2^53-1");if(this.maxFee=i,void 0===u){const e=c.randomBytes(32);this.lease=s.from(e).toString("base64")}else this.lease=u;this.programBytes=this.getProgram();const d=new a.LogicSig(this.programBytes,void 0);this.address=d.address()}getProgram(){const e=s.from("ASAHAQYFAAQDByYCIAECAwQFBgcIAQIDBAUGBwgBAgMEBQYHCAECAwQFBgcIIJKvkYTkEzwJf2arzJOxERsSogG9nQzKPkpIoc4TzPTFMRAiEjEBIw4QMQIkGCUSEDEEIQQxAggSEDEGKBIQMQkyAxIxBykSEDEIIQUSEDEJKRIxBzIDEhAxAiEGDRAxCCUSEBEQ","base64"),t=[this.maxFee,this.period,this.withdrawalWindow,this.amount,this.expiryRound,this.lease,this.receiver],r=[u.valTypes.INT,u.valTypes.INT,u.valTypes.INT,u.valTypes.INT,u.valTypes.INT,u.valTypes.BASE64,u.valTypes.ADDRESS];return u.inject(e,[4,5,7,8,9,12,46],t,r)}getAddress(){return this.address}},getPeriodicPaymentWithdrawalTransaction:function(e,t,r,s){const c=i.readProgram(e,void 0),u=c[0],d=c[1],l=u[2],h=u[4],p=u[5];if(r%l!=0)throw new Error(`firstValid round ${r.toString()} was not a multiple of contract period ${l.toString()}`);const f=d[1],g=n.encodeAddress(f),m=d[0],y=new Uint8Array(m),b=r+h,w=g;let A,v;const x=a.makeLogicSig(e,void 0),_=x.address(),S={from:_,to:w,fee:t,amount:p,closeRemainderTo:A,firstRound:r,lastRound:b,note:v,genesisHash:s,genesisID:"",type:"pay",lease:y},E=o.makePaymentTxn(_,w,t,p,A,r,b,v,s,"");if(E.fee>u[1])throw new Error(`final fee of payment transaction${E.fee.toString()}greater than transaction max fee${u[1].toString()}`);return a.signLogicSigTransaction(S,x)}}},3758:(e,t,r)=>{var s=r(2486).lW;const n=r(7116),o=r(1988),i=r(1063),a=r(8800),c=r(568),u=r(2514),d=r(413);e.exports={Split:class{constructor(e,t,r,n,o,i,c,d){if(!Number.isSafeInteger(o)||o<0)throw Error("rat2 must be a positive number and smaller than 2^53-1");if(!Number.isSafeInteger(n)||n<0)throw Error("rat1 must be a positive number and smaller than 2^53-1");if(!Number.isSafeInteger(i)||i<0)throw Error("expiryRound must be a positive number and smaller than 2^53-1");if(!Number.isSafeInteger(c)||c<0)throw Error("minPay must be a positive number and smaller than 2^53-1");if(!Number.isSafeInteger(d)||d<0)throw Error("maxFee must be a positive number and smaller than 2^53-1");const l=s.from("ASAIAQUCAAYHCAkmAyCztwQn0+DycN+vsk+vJWcsoz/b7NDS6i33HOkvTpf+YiC3qUpIgHGWE8/1LPh9SGCalSN7IaITeeWSXbfsS5wsXyC4kBQ38Z8zcwWVAym4S8vpFB/c0XC6R4mnPi9EBADsPDEQIhIxASMMEDIEJBJAABkxCSgSMQcyAxIQMQglEhAxAiEEDRAiQAAuMwAAMwEAEjEJMgMSEDMABykSEDMBByoSEDMACCEFCzMBCCEGCxIQMwAIIQcPEBA=","base64"),h=[d,i,o,n,c,e,t,r],p=[u.valTypes.INT,u.valTypes.INT,u.valTypes.INT,u.valTypes.INT,u.valTypes.INT,u.valTypes.ADDRESS,u.valTypes.ADDRESS,u.valTypes.ADDRESS],f=u.inject(l,[4,7,8,9,10,14,47,80],h,p);this.programBytes=f;const g=a.makeLogicSig(f,void 0);this.address=g.address()}getProgram(){return this.programBytes}getAddress(){return this.address}},getSplitFundsTransaction:function(e,t,r,s,u,l){const h=c.readProgram(e,void 0),p=h[0],f=h[1];let g=p[6],m=p[5],y=0;const b=(e,t)=>{if("number"!=typeof e||"number"!=typeof t)throw new Error("gcd operates only on positive integers");return t?b(t,e%t):e},w=b(g,m);g=Math.floor(g/w),m=Math.floor(m/w);const A=m/g;y=Math.round(t/(1+A));const v=t-y;if(m*y!=g*v)throw Error("could not split funds in a way that satisfied the contract ratio");const x=a.makeLogicSig(e,void 0).address(),_=n.encodeAddress(f[1]),S=n.encodeAddress(f[2]),E=[o.makePaymentTxn(x,_,u,y,void 0,r,s,void 0,l),o.makePaymentTxn(x,S,u,v,void 0,r,s,void 0,l)],T=i.assignGroupID(E).map((e=>a.signLogicSigTransactionObject(e,a).blob));return d.concatArrays(T[0],T[1])}}},2514:(e,t,r)=>{var s=r(2486).lW;const n=r(7116);function o(e,t){let r=0;for(;t>128;)e.push(255&t|128),t>>=7,r+=1;return e.push(255&t),r+1}const i={INT:1,ADDRESS:2,BASE64:3};e.exports={inject:function(e,t,r,a){if(t.length!==r.length||t.length!==a.length)throw new Error("Lengths do not match");let c=e;function u(e,t,r,n){const o=e.slice(0,r),i=e.slice(r+n,e.length),a=[o,s.from(t),i];return s.concat(a)}for(let e=0;e<t.length;e++){let d=0,l=r[e];switch(a[e]){case i.INT:const r=[];d=o(r,l),c=u(c,r,t[e],1);break;case i.ADDRESS:l=n.decodeAddress(l),c=u(c,l.publicKey,t[e],32);break;case i.BASE64:const a=[];l=s.from(l,"base64"),o(a,l.length),l=s.concat([s.from(a),l]),c=u(c,l,t[e],33);break;default:throw new Error("unrecognized value type")}if(0!==d)for(let e=0;e<t.length;e++)t[e]+=d-1}return c},valTypes:i}},7677:(e,t,r)=>{"use strict";r.d(t,{JQ:()=>y,_4:()=>x,X3:()=>v,R0:()=>b,jD:()=>w,Yh:()=>P,bL:()=>N,Ls:()=>C,UV:()=>R,Ax:()=>A,A9:()=>T,w1:()=>_,NK:()=>f,RY:()=>m,Pu:()=>g,Vk:()=>c,nh:()=>l,kG:()=>a,qH:()=>d,JH:()=>u,vJ:()=>U,o5:()=>I,AE:()=>k,I5:()=>D});var s=r(7116),n=r(8922),o=r(413),i=r(2486).lW;const a=65535,c=32,u=1,d=1,l=2,h=/^([a-z\d[\](),]+)\[(0|[1-9][\d]*)]$/,p=/^ufixed([1-9][\d]*)x([1-9][\d]*)$/;class f{static from(e){if(e.endsWith("[]")){const t=f.from(e.slice(0,e.length-2));return new x(t)}if(e.endsWith("]")){const t=e.match(h);if(3!==t.length)throw new Error(`malformed static array string: ${e}`);const r=t[2],s=parseInt(r,10);if(s>a)throw new Error(`array length exceeds limit ${a}`);const n=f.from(t[1]);return new v(n,s)}if(e.startsWith("uint")){const t=e=>[...e].every((e=>"0123456789".includes(e))),r=e.slice(4,e.length);if(!t(r))throw new Error(`malformed uint string: ${r}`);const s=parseInt(r,10);if(s>a)throw new Error(`malformed uint string: ${s}`);return new g(s)}if("byte"===e)return new w;if(e.startsWith("ufixed")){const t=e.match(p);if(3!==t.length)throw new Error(`malformed ufixed type: ${e}`);const r=parseInt(t[1],10),s=parseInt(t[2],10);return new m(r,s)}if("bool"===e)return new b;if("address"===e)return new y;if("string"===e)return new A;if(e.length>=2&&"("===e[0]&&")"===e[e.length-1]){const t=_.parseTupleContent(e.slice(1,e.length-1)),r=[];for(let e=0;e<t.length;e++){const s=f.from(t[e]);r.push(s)}return new _(r)}throw new Error(`cannot convert a string ${e} to an ABI type`)}}class g extends f{constructor(e){if(super(),e%8!=0||e<8||e>512)throw new Error(`unsupported uint type bitSize: ${e}`);this.bitSize=e}toString(){return`uint${this.bitSize}`}equals(e){return e instanceof g&&this.bitSize===e.bitSize}isDynamic(){return!1}byteLen(){return this.bitSize/8}encode(e){if("bigint"!=typeof e&&"number"!=typeof e)throw new Error(`Cannot encode value as uint${this.bitSize}: ${e}`);if(e>=BigInt(2**this.bitSize)||e<BigInt(0))throw new Error(`${e} is not a non-negative int or too big to fit in size uint${this.bitSize}`);if("number"==typeof e&&!Number.isSafeInteger(e))throw new Error(`${e} should be converted into a BigInt before it is encoded`);return(0,n.j)(e,this.bitSize/8)}decode(e){if(e.length!==this.bitSize/8)throw new Error(`byte string must correspond to a uint${this.bitSize}`);return(0,n.v)(e)}}class m extends f{constructor(e,t){if(super(),e%8!=0||e<8||e>512)throw new Error(`unsupported ufixed type bitSize: ${e}`);if(t>160||t<1)throw new Error(`unsupported ufixed type precision: ${t}`);this.bitSize=e,this.precision=t}toString(){return`ufixed${this.bitSize}x${this.precision}`}equals(e){return e instanceof m&&this.bitSize===e.bitSize&&this.precision===e.precision}isDynamic(){return!1}byteLen(){return this.bitSize/8}encode(e){if("bigint"!=typeof e&&"number"!=typeof e)throw new Error(`Cannot encode value as ${this.toString()}: ${e}`);if(e>=BigInt(2**this.bitSize)||e<BigInt(0))throw new Error(`${e} is not a non-negative int or too big to fit in size ${this.toString()}`);if("number"==typeof e&&!Number.isSafeInteger(e))throw new Error(`${e} should be converted into a BigInt before it is encoded`);return(0,n.j)(e,this.bitSize/8)}decode(e){if(e.length!==this.bitSize/8)throw new Error(`byte string must correspond to a ${this.toString()}`);return(0,n.v)(e)}}class y extends f{toString(){return"address"}equals(e){return e instanceof y}isDynamic(){return!1}byteLen(){return c}encode(e){if("string"!=typeof e&&!(e instanceof Uint8Array))throw new Error(`Cannot encode value as ${this.toString()}: ${e}`);if("string"==typeof e)return(0,s.decodeAddress)(e).publicKey;if(32!==e.byteLength)throw new Error("byte string must be 32 bytes long for an address");return e}decode(e){if(32!==e.byteLength)throw new Error("byte string must be 32 bytes long for an address");return(0,s.encodeAddress)(e)}}class b extends f{toString(){return"bool"}equals(e){return e instanceof b}isDynamic(){return!1}byteLen(){return d}encode(e){if("boolean"!=typeof e)throw new Error(`Cannot encode value as bool: ${e}`);return e?new Uint8Array([128]):new Uint8Array([0])}decode(e){if(1!==e.byteLength)throw new Error("bool string must be 1 byte long");const t=e[0];if(128===t)return!0;if(0===t)return!1;throw new Error("boolean could not be decoded from the byte string")}}class w extends f{toString(){return"byte"}equals(e){return e instanceof w}isDynamic(){return!1}byteLen(){return u}encode(e){if("number"!=typeof e&&"bigint"!=typeof e)throw new Error(`Cannot encode value as byte: ${e}`);if("bigint"==typeof e&&(e=Number(e)),e<0||e>255)throw new Error(`${e} cannot be encoded into a byte`);return new Uint8Array([e])}decode(e){if(1!==e.byteLength)throw new Error("byte string must be 1 byte long");return e[0]}}class A extends f{toString(){return"string"}equals(e){return e instanceof A}isDynamic(){return!0}byteLen(){throw new Error(`${this.toString()} is a dynamic type`)}encode(e){if("string"!=typeof e&&!(e instanceof Uint8Array))throw new Error(`Cannot encode value as string: ${e}`);const t=i.from(e),r=(0,n.j)(t.length,l),s=new Uint8Array(t.length+l);return s.set(r),s.set(t,l),s}decode(e){if(e.length<l)throw new Error(`byte string is too short to be decoded. Actual length is ${e.length}, but expected at least ${l}`);const t=i.from(e).readUIntBE(0,l),r=e.slice(l,e.length);if(t!==r.length)throw new Error(`string length bytes do not match the actual length of string. Expected ${t}, got ${r.length}`);return i.from(r).toString("utf-8")}}class v extends f{constructor(e,t){if(super(),t<0)throw new Error(`static array must have a non negative length: ${t}`);this.childType=e,this.staticLength=t}toString(){return`${this.childType.toString()}[${this.staticLength}]`}equals(e){return e instanceof v&&this.staticLength===e.staticLength&&this.childType.equals(e.childType)}isDynamic(){return this.childType.isDynamic()}byteLen(){return this.childType.constructor===b?Math.ceil(this.staticLength/8):this.staticLength*this.childType.byteLen()}encode(e){if(!(Array.isArray(e)||e instanceof Uint8Array))throw new Error(`Cannot encode value as ${this.toString()}: ${e}`);if(e.length!==this.staticLength)throw new Error(`Value array does not match static array length. Expected ${this.staticLength}, got ${e.length}`);return this.toABITupleType().encode(e)}decode(e){return this.toABITupleType().decode(e)}toABITupleType(){return new _(Array(this.staticLength).fill(this.childType))}}class x extends f{constructor(e){super(),this.childType=e}toString(){return`${this.childType.toString()}[]`}equals(e){return e instanceof x&&this.childType.equals(e.childType)}isDynamic(){return!0}byteLen(){throw new Error(`${this.toString()} is a dynamic type`)}encode(e){if(!(Array.isArray(e)||e instanceof Uint8Array))throw new Error(`Cannot encode value as ${this.toString()}: ${e}`);const t=this.toABITupleType(e.length),r=t.encode(e),s=(0,n.j)(t.childTypes.length,l);return(0,o.concatArrays)(s,r)}decode(e){const t=i.from(e).readUIntBE(0,l);return this.toABITupleType(t).decode(e.slice(l,e.length))}toABITupleType(e){return new _(Array(e).fill(this.childType))}}class _ extends f{constructor(e){if(super(),e.length>=a)throw new Error("tuple type child type number larger than maximum uint16 error");this.childTypes=e}toString(){const e=[];for(let t=0;t<this.childTypes.length;t++)e[t]=this.childTypes[t].toString();return`(${e.join(",")})`}equals(e){return e instanceof _&&this.childTypes.length===e.childTypes.length&&this.childTypes.every(((t,r)=>t.equals(e.childTypes[r])))}isDynamic(){return this.childTypes.some((e=>e.isDynamic()))}byteLen(){let e=0;for(let t=0;t<this.childTypes.length;t++)if(this.childTypes[t].constructor===b){const r=E(this.childTypes,t,1),s=r+1;t+=r,e+=Math.trunc((s+7)/8)}else e+=this.childTypes[t].byteLen();return e}encode(e){if(!(Array.isArray(e)||e instanceof Uint8Array))throw new Error(`Cannot encode value as ${this.toString()}: ${e}`);const t=Array.from(e);if(e.length>a)throw new Error("length of tuple array should not exceed a uint16");const r=this.childTypes,s=[],i=[],c=new Map;let u=0;for(;u<r.length;){const e=r[u];if(e.isDynamic())c.set(s.length,!0),s.push(new Uint8Array([0,0])),i.push(e.encode(t[u]));else{if(e.constructor===b){const e=E(r,u,-1);let o=E(r,u,1);if(e%8!=0)throw new Error("expected before index should have number of bool mod 8 equal 0");o=Math.min(7,o);const i=S(t.slice(u,u+o+1));s.push((0,n.j)(i,1)),u+=o}else{const r=e.encode(t[u]);s.push(r)}c.set(u,!1),i.push(new Uint8Array)}u+=1}let d=0;for(const e of s)d+=e.length;let h=0;for(let e=0;e<s.length;e++){if(c.get(e)){const t=d+h;if(t>a)throw new Error(`byte length of ${t} should not exceed a uint16`);s[e]=(0,n.j)(t,l)}h+=i[e].length}return(0,o.concatArrays)(...s,...i)}decode(e){const t=this.childTypes,r=[],s=[];let n=0,o=0;const a=i.from(e);for(;n<t.length;){const i=t[n];if(i.isDynamic()){if(e.slice(o,e.length).length<l)throw new Error("dynamic type in tuple is too short to be decoded");const t=a.readUIntBE(o,l);if(r.length>0&&(r[r.length-1].right=t,t<r[r.length-1].left))throw new Error("dynamic index segment miscalculation: left is greater than right index");const n={left:t,right:-1};r.push(n),s.push(null),o+=l}else if(i.constructor===b){const t=E(this.childTypes,n,-1);let r=E(this.childTypes,n,1);if(t%8!=0)throw new Error("expected before bool number mod 8 === 0");r=Math.min(7,r);for(let t=0;t<=r;t++){const r=128>>t;(e[o]&r)>0?s.push(new Uint8Array([128])):s.push(new Uint8Array([0]))}n+=r,o+=1}else{const t=i.byteLen();s.push(e.slice(o,o+t)),o+=t}if(n!==t.length-1&&o>=e.length)throw new Error("input byte not enough to decode");n+=1}if(r.length>0&&(r[r.length-1].right=e.length,o=e.length),o<e.length)throw new Error("input byte not fully consumed");for(let e=0;e<r.length;e++){const t=r[e];if(t.left>t.right)throw new Error("dynamic segment should display a [l, r] space with l <= r");if(e!==r.length-1&&t.right!==r[e+1].left)throw new Error("dynamic segment should be consecutive")}let c=0;for(let n=0;n<t.length;n++)t[n].isDynamic()&&(s[n]=e.slice(r[c].left,r[c].right),c+=1);const u=[];for(let e=0;e<t.length;e++){const r=t[e].decode(s[e]);u.push(r)}return u}static parseTupleContent(e){if(0===e.length)return[];if(e.endsWith(",")||e.startsWith(","))throw new Error("tuple string should not start with comma");if(e.includes(",,"))throw new Error("tuple string should not have consecutive commas");const t=[];let r=0,s="";for(const n of e)s+=n,"("===n?r+=1:")"===n?r-=1:","===n&&0===r&&(t.push(s.slice(0,s.length-1)),s="");if(0!==s.length&&t.push(s),0!==r)throw new Error("tuple string has mismatched parentheses");return t}}function S(e){let t=0;if(e.length>8)throw new Error("value list passed in should be no greater than length 8");for(let r=0;r<e.length;r++){const s=e[r];if("boolean"!=typeof s)throw new Error("non-boolean values cannot be compressed into a byte");s&&(t|=1<<7-r)}return t}function E(e,t,r){let s=0;for(;;){const n=t+r*s;if(e[n].constructor!==b){s-=1;break}if(n!==e.length-1&&1===r)s+=1;else{if(!(n>0&&-1===r))break;s+=1}}return s}var T,R,B=r(9404);function k(e){return e===T.any||e===T.pay||e===T.keyreg||e===T.acfg||e===T.axfer||e===T.afrz||e===T.appl}function U(e,t){return e===T.any||t.type&&t.type.toString()===e.toString()}function I(e){return e===R.account||e===R.application||e===R.asset}!function(e){e.any="txn",e.pay="pay",e.keyreg="keyreg",e.acfg="acfg",e.axfer="axfer",e.afrz="afrz",e.appl="appl"}(T||(T={})),function(e){e.account="account",e.application="application",e.asset="asset"}(R||(R={}));class C{constructor(e){if("string"!=typeof e.name||"object"!=typeof e.returns||!Array.isArray(e.args))throw new Error("Invalid ABIMethod parameters");this.name=e.name,this.description=e.desc,this.args=e.args.map((({type:e,name:t,desc:r})=>k(e)||I(e)?{type:e,name:t,description:r}:{type:f.from(e),name:t,description:r})),this.returns={type:"void"===e.returns.type?e.returns.type:f.from(e.returns.type),description:e.returns.desc}}getSignature(){const e=this.args.map((e=>e.type.toString())).join(","),t=this.returns.type.toString();return`${this.name}(${e})${t}`}getSelector(){const e=(0,B.genericHash)(this.getSignature());return new Uint8Array(e.slice(0,4))}txnCount(){let e=1;for(const t of this.args)"string"==typeof t.type&&k(t.type)&&(e+=1);return e}toJSON(){return{name:this.name,desc:this.description,args:this.args.map((({type:e,name:t,description:r})=>({type:e.toString(),name:t,desc:r}))),returns:{type:this.returns.type.toString(),desc:this.returns.description}}}static fromSignature(e){const{name:t,args:r,returns:s}=function(e){const t=e.indexOf("(");if(-1===t)throw new Error(`Invalid method signature: ${e}`);let r=-1,s=0;for(let n=t;n<e.length;n++){const t=e[n];if("("===t)s+=1;else if(")"===t){if(0===s)break;if(s-=1,0===s){r=n;break}}}if(-1===r)throw new Error(`Invalid method signature: ${e}`);return{name:e.slice(0,t),args:_.parseTupleContent(e.slice(t+1,r)),returns:e.slice(r+1)}}(e);return new C({name:t,args:r.map((e=>({type:e}))),returns:{type:s}})}}function D(e,t){if(null===e||!Array.isArray(e)||!e.every((e=>e instanceof C)))throw new Error("Methods list provided is null or not the correct type");const r=e.filter((e=>e.name===t));if(r.length>1)throw new Error(`found ${r.length} methods with the same name ${r.map((e=>e.getSignature())).join(",")}`);if(0===r.length)throw new Error(`found 0 methods with the name ${t}`);return r[0]}class P{constructor(e){if("string"!=typeof e.name||!Array.isArray(e.methods)||e.networks&&"object"!=typeof e.networks)throw new Error("Invalid ABIContract parameters");this.name=e.name,this.description=e.desc,this.networks=e.networks?{...e.networks}:{},this.methods=e.methods.map((e=>new C(e)))}toJSON(){return{name:this.name,desc:this.description,networks:this.networks,methods:this.methods.map((e=>e.toJSON()))}}getMethodByName(e){return D(this.methods,e)}}class N{constructor(e){if("string"!=typeof e.name||!Array.isArray(e.methods))throw new Error("Invalid ABIInterface parameters");this.name=e.name,this.description=e.desc,this.methods=e.methods.map((e=>new C(e)))}toJSON(){return{name:this.name,desc:this.description,methods:this.methods.map((e=>e.toJSON()))}}getMethodByName(e){return D(this.methods,e)}}},7988:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var s=r(9404),n=r(7116);function o(){const e=s.keyPair();return{addr:n.encodeAddress(e.publicKey),sk:e.secretKey}}},2691:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var s=r(7116),n=r(3033),o=r(9404),i=r(413),a=r(2486).lW;class c{constructor({bidderKey:e,bidAmount:t,bidID:r,auctionKey:n,auctionID:o,maxPrice:i}){this.name="Bid",this.tag=a.from([97,66]);const c=s.decodeAddress(e),u=s.decodeAddress(n);if(!Number.isSafeInteger(t)||t<0)throw Error("Bid amount must be positive and 2^53-1");if(!Number.isSafeInteger(r)||r<0)throw Error("BidID must be positive and 2^53-1");if(!Number.isSafeInteger(o)||o<0)throw Error("auctionID must be positive");Object.assign(this,{bidderKey:c,bidAmount:t,bidID:r,auctionKey:u,auctionID:o,maxPrice:i})}get_obj_for_encoding(){return{bidder:a.from(this.bidderKey.publicKey),cur:this.bidAmount,price:this.maxPrice,id:this.bidID,auc:a.from(this.auctionKey.publicKey),aid:this.auctionID}}signBid(e){const t=n.encode(this.get_obj_for_encoding()),r=a.from(i.concatArrays(this.tag,t)),s=o.sign(r,e),c={t:"b",b:{sig:a.from(s),bid:this.get_obj_for_encoding()}};return new Uint8Array(n.encode(c))}}},1113:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>d});var s=r(413),n=r(7297),o=r(2486).lW;class i extends Error{constructor(e,t){super(e),this.response=t,this.name="URLTokenBaseHTTPError",this.response=t}}class a{constructor(e,t,r,s={}){this.defaultHeaders=s;const n=t.endsWith("/")?t:`${t}/`,o=new URL(n);if(void 0!==r&&(o.port=r.toString()),0===o.protocol.length)throw new Error("Invalid base server URL, protocol must be defined.");this.baseURL=o,this.tokenHeader=e}getURL(e,t){let r;r=e.startsWith("./")?e:e.startsWith("/")?`.${e}`:`./${e}`;const s=new URL(r,this.baseURL);if(t)for(const[e,r]of Object.entries(t))s.searchParams.set(e,r);return s.toString()}static formatFetchResponseHeaders(e){const t={};return e.forEach(((e,r)=>{t[e]=r})),t}static async checkHttpError(e){if(e.ok)return;let t=null,r=null;try{t=new Uint8Array(await e.arrayBuffer());const s=JSON.parse(o.from(t).toString());s.message&&(r=s.message)}catch(e){}let s=`Network request error. Received status ${e.status} (${e.statusText})`;throw r&&(s+=`: ${r}`),new i(s,{body:t,status:e.status,headers:a.formatFetchResponseHeaders(e.headers)})}static async formatFetchResponse(e){return await this.checkHttpError(e),{body:new Uint8Array(await e.arrayBuffer()),status:e.status,headers:a.formatFetchResponseHeaders(e.headers)}}async get(e,t,r={}){const s={...this.tokenHeader,...this.defaultHeaders,...r},o=await(0,n.fetch)(this.getURL(e,t),{mode:"cors",headers:s});return a.formatFetchResponse(o)}async post(e,t,r,s={}){const o={...this.tokenHeader,...this.defaultHeaders,...s},i=await(0,n.fetch)(this.getURL(e,r),{method:"POST",mode:"cors",body:t,headers:o});return a.formatFetchResponse(i)}async delete(e,t,r,s={}){const o={...this.tokenHeader,...this.defaultHeaders,...s},i=await(0,n.fetch)(this.getURL(e,r),{method:"DELETE",mode:"cors",body:t,headers:o});return a.formatFetchResponse(i)}}var c=r(2486).lW;function u(e){return Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{})}class d{constructor(e,t,r,s={}){this.bc=void 0!==t?new a(e,t,r,s):e}static parseJSON(e,t,r={}){try{return 0===Object.keys(r).length?e&&JSON.parse(e):e&&s.parseJSON(e,r)}catch(r){const s=r;throw s.rawResponse=e||null,s.statusCode=t,s}}static serializeData(e,t){if(!e)return new Uint8Array(0);if("application/json"===t["content-type"])return new Uint8Array(c.from(JSON.stringify(e)));if("string"==typeof e)return new Uint8Array(c.from(e));if(e instanceof Uint8Array)return e;throw new Error("provided data is neither a string nor a Uint8Array and content-type is not application/json")}static prepareResponse(e,t,r,s={}){let n,{body:o}=e;return"application/msgpack"!==t&&(n=o&&c.from(o).toString()||""),r&&"application/json"===t&&(o=d.parseJSON(n,e.status,s)),{...e,body:o,text:n,ok:2===Math.trunc(e.status/100)}}static prepareResponseError(e){return e.response&&(e.response=d.prepareResponse(e.response,"application/json",!0),e.status=e.response.status),e}async get(e,t,r={},s={},n=!0){const o=function(e){if(void 0===e||!Object.prototype.hasOwnProperty.call(e,"format"))return"application/json";switch(e.format){case"msgpack":return"application/msgpack";case"json":default:return"application/json"}}(t),i={...r,accept:o};try{const r=await this.bc.get(e,function(e){for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(e[t]&&0!==e[t].length||delete e[t]);return e}(t),i);return d.prepareResponse(r,o,n,s)}catch(e){throw d.prepareResponseError(e)}}async post(e,t,r={},s,n=!0){const o={"content-type":"application/json",...u(r)};try{const r=await this.bc.post(e,d.serializeData(t,o),s,o);return d.prepareResponse(r,"application/json",n)}catch(e){throw d.prepareResponseError(e)}}async delete(e,t,r={},s=!0){const n={"content-type":"application/json",...u(r)},o=await this.bc.delete(e,d.serializeData(t,n),void 0,n);return d.prepareResponse(o,"application/json",s)}}},6477:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var s=r(3480),n=r(5592),o=r(2486).lW;class i extends s.Z{constructor(e,t="http://127.0.0.1",r=7833,s={}){super("X-KMD-API-Token",e,t,r,s)}async versions(){return(await this.c.get("/versions")).body}async listWallets(){return(await this.c.get("/v1/wallets")).body}async createWallet(e,t,r=new Uint8Array,s="sqlite"){const n={wallet_name:e,wallet_driver_name:s,wallet_password:t,master_derivation_key:o.from(r).toString("base64")};return(await this.c.post("/v1/wallet",n)).body}async initWalletHandle(e,t){const r={wallet_id:e,wallet_password:t};return(await this.c.post("/v1/wallet/init",r)).body}async releaseWalletHandle(e){const t={wallet_handle_token:e};return(await this.c.post("/v1/wallet/release",t)).body}async renewWalletHandle(e){const t={wallet_handle_token:e};return(await this.c.post("/v1/wallet/renew",t)).body}async renameWallet(e,t,r){const s={wallet_id:e,wallet_password:t,wallet_name:r};return(await this.c.post("/v1/wallet/rename",s)).body}async getWallet(e){const t={wallet_handle_token:e};return(await this.c.post("/v1/wallet/info",t)).body}async exportMasterDerivationKey(e,t){const r={wallet_handle_token:e,wallet_password:t},s=await this.c.post("/v1/master-key/export",r);return{master_derivation_key:o.from(s.body.master_derivation_key,"base64")}}async importKey(e,t){const r={wallet_handle_token:e,private_key:o.from(t).toString("base64")};return(await this.c.post("/v1/key/import",r)).body}async exportKey(e,t,r){const s={wallet_handle_token:e,address:r,wallet_password:t},n=await this.c.post("/v1/key/export",s);return{private_key:o.from(n.body.private_key,"base64")}}async generateKey(e){const t={wallet_handle_token:e,display_mnemonic:!1};return(await this.c.post("/v1/key",t)).body}async deleteKey(e,t,r){const s={wallet_handle_token:e,address:r,wallet_password:t};return(await this.c.delete("/v1/key",s)).body}async listKeys(e){const t={wallet_handle_token:e};return(await this.c.post("/v1/key/list",t)).body}async signTransaction(e,t,r){const s=n.instantiateTxnIfNeeded(r),i={wallet_handle_token:e,wallet_password:t,transaction:o.from(s.toByte()).toString("base64")},a=await this.c.post("/v1/transaction/sign",i);return 200===a.status?o.from(a.body.signed_transaction,"base64"):a.body}async signTransactionWithSpecificPublicKey(e,t,r,s){const i=n.instantiateTxnIfNeeded(r),a={wallet_handle_token:e,wallet_password:t,transaction:o.from(i.toByte()).toString("base64"),public_key:o.from(s).toString("base64")},c=await this.c.post("/v1/transaction/sign",a);return 200===c.status?o.from(c.body.signed_transaction,"base64"):c.body}async listMultisig(e){const t={wallet_handle_token:e};return(await this.c.post("/v1/multisig/list",t)).body}async importMultisig(e,t,r,s){const n={wallet_handle_token:e,multisig_version:t,threshold:r,pks:s};return(await this.c.post("/v1/multisig/import",n)).body}async exportMultisig(e,t){const r={wallet_handle_token:e,address:t};return(await this.c.post("/v1/multisig/export",r)).body}async signMultisigTransaction(e,t,r,s,i){const a=n.instantiateTxnIfNeeded(r),c={wallet_handle_token:e,transaction:o.from(a.toByte()).toString("base64"),public_key:o.from(s).toString("base64"),partial_multisig:i,wallet_password:t};return(await this.c.post("/v1/multisig/sign",c)).body}async deleteMultisig(e,t,r){const s={wallet_handle_token:e,address:r,wallet_password:t};return(await this.c.delete("/v1/multisig",s)).body}}},8569:(e,t,r)=>{"use strict";r.d(t,{Z:()=>O});var s=r(3480),n=r(8680);class o extends n.Z{constructor(e,t,r){super(e,t),this.account=r,this.account=r}path(){return`/v2/accounts/${this.account}`}exclude(e){return this.query.exclude=e,this}}class i extends n.Z{constructor(e,t,r,s){super(e,t),this.account=r,this.assetID=s,this.account=r,this.assetID=s}path(){return`/v2/accounts/${this.account}/assets/${this.assetID}`}}class a extends n.Z{constructor(e,t,r,s){super(e,t),this.account=r,this.applicationID=s,this.account=r,this.applicationID=s}path(){return`/v2/accounts/${this.account}/applications/${this.applicationID}`}}var c=r(3033);class u extends n.Z{constructor(e,t){if(super(e),!Number.isInteger(t))throw Error("roundNumber should be an integer");this.round=t,this.query={format:"msgpack"}}path(){return`/v2/blocks/${this.round}`}prepare(e){if(e&&e.byteLength>0)return c.decode(e)}}var d=r(2486).lW;function l(e={}){let t=e;return Object.keys(t).every((e=>"content-type"!==e.toLowerCase()))&&(t={...e},t["Content-Type"]="text/plain"),t}class h extends n.Z{constructor(e,t){super(e),this.source=t,this.source=t}path(){return"/v2/teal/compile"}sourcemap(e=!0){return this.query.sourcemap=e,this}async do(e={}){const t=l(e);return(await this.c.post(this.path(),d.from(this.source),t,this.query)).body}}var p=r(2486).lW;class f extends n.Z{constructor(e,t){super(e),this.blob=c.encode(t.get_obj_for_encoding(!0))}path(){return"/v2/teal/dryrun"}async do(e={}){const t=l(e);return(await this.c.post(this.path(),p.from(this.blob),t)).body}}class g extends n.Z{path(){return"/genesis"}}class m extends n.Z{constructor(e,t,r){super(e,t),this.index=r,this.index=r}path(){return`/v2/assets/${this.index}`}}class y extends n.Z{constructor(e,t,r){super(e,t),this.index=r,this.index=r}path(){return`/v2/applications/${this.index}`}}class b extends n.Z{constructor(e,t,r){if(super(e,t),!Number.isInteger(r))throw Error("roundNumber should be an integer");this.round=r}path(){return`/v2/blocks/${this.round}/hash`}}var w=r(1685),A=r(2486).lW;class v extends n.Z{constructor(e,t,r,s){super(e,t),this.index=r,this.index=r;const n=A.from(s).toString("base64");this.query.name=encodeURI(`b64:${n}`)}path(){return`/v2/applications/${this.index}/box`}prepare(e){return w.Box.from_obj_for_encoding(e)}}class x extends n.Z{constructor(e,t,r){super(e,t),this.index=r,this.index=r,this.query.max=0}path(){return`/v2/applications/${this.index}/boxes`}max(e){return this.query.max=e,this}prepare(e){return w.BoxesResponse.from_obj_for_encoding(e)}}class _ extends n.Z{path(){return"/health"}async do(e={}){const t=await this.c.get(this.path(),{},e);if(!t.ok)throw new Error(`Health response: ${t.status}`);return{}}}class S extends n.Z{constructor(e,t){super(e),this.txid=t,this.txid=t,this.query.format="msgpack"}prepare(e){if(e&&e.byteLength>0)return c.decode(e)}path(){return`/v2/transactions/pending/${this.txid}`}max(e){return this.query.max=e,this}}class E extends n.Z{constructor(e){super(e),this.query.format="msgpack"}path(){return"/v2/transactions/pending"}prepare(e){if(e&&e.byteLength>0)return c.decode(e)}max(e){return this.query.max=e,this}}class T extends n.Z{constructor(e,t){super(e),this.address=t,this.address=t,this.query.format="msgpack"}prepare(e){if(e&&e.byteLength>0)return c.decode(e)}path(){return`/v2/accounts/${this.address}/transactions/pending`}max(e){return this.query.max=e,this}}class R extends n.Z{constructor(e,t,r,s){super(e,t),this.round=r,this.txID=s,this.round=r,this.txID=s}path(){return`/v2/blocks/${this.round}/transactions/${this.txID}/proof`}hashType(e){return this.query.hashtype=e,this}}var B=r(5180);class k extends n.Z{path(){return"/v2/status"}}class U extends n.Z{constructor(e,t,r){if(super(e,t),this.round=r,!Number.isInteger(r))throw Error("round should be an integer");this.round=r}path(){return`/v2/status/wait-for-block-after/${this.round}`}}class I extends n.Z{path(){return"/v2/transactions/params"}prepare(e){return{flatFee:!1,fee:e.fee,firstRound:e["last-round"],lastRound:e["last-round"]+1e3,genesisID:e["genesis-id"],genesisHash:e["genesis-hash"]}}}class C extends n.Z{path(){return"/v2/ledger/supply"}}class D extends n.Z{path(){return"/versions"}}class P extends n.Z{constructor(e,t,r){super(e,t),this.round=r,this.round=r}path(){return`/v2/blocks/${this.round}/lightheader/proof`}}class N extends n.Z{constructor(e,t,r){super(e,t),this.round=r,this.round=r}path(){return`/v2/stateproofs/${this.round}`}}class O extends s.Z{constructor(e,t="http://r2.algorand.network",r=4180,s={}){super("X-Algo-API-Token",e,t,r,s)}healthCheck(){return new _(this.c)}versionsCheck(){return new D(this.c)}sendRawTransaction(e){return new B.default(this.c,e)}accountInformation(e){return new o(this.c,this.intDecoding,e)}accountAssetInformation(e,t){return new i(this.c,this.intDecoding,e,t)}accountApplicationInformation(e,t){return new a(this.c,this.intDecoding,e,t)}block(e){return new u(this.c,e)}getBlockHash(e){return new b(this.c,this.intDecoding,e)}pendingTransactionInformation(e){return new S(this.c,e)}pendingTransactionsInformation(){return new E(this.c)}pendingTransactionByAddress(e){return new T(this.c,e)}status(){return new k(this.c,this.intDecoding)}statusAfterBlock(e){return new U(this.c,this.intDecoding,e)}getTransactionParams(){return new I(this.c)}supply(){return new C(this.c,this.intDecoding)}compile(e){return new h(this.c,e)}dryrun(e){return new f(this.c,e)}getAssetByID(e){return new m(this.c,this.intDecoding,e)}getApplicationByID(e){return new y(this.c,this.intDecoding,e)}getApplicationBoxByName(e,t){return new v(this.c,this.intDecoding,e,t)}getApplicationBoxes(e){return new x(this.c,this.intDecoding,e)}genesis(){return new g(this.c,this.intDecoding)}getTransactionProof(e,t){return new R(this.c,this.intDecoding,e,t)}getLightBlockHeaderProof(e){return new P(this.c,this.intDecoding,e)}getStateProof(e){return new N(this.c,this.intDecoding,e)}}},1685:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Account:()=>o,AccountApplicationResponse:()=>i,AccountAssetResponse:()=>a,AccountParticipation:()=>c,AccountStateDelta:()=>u,Application:()=>d,ApplicationLocalState:()=>l,ApplicationParams:()=>h,ApplicationStateSchema:()=>p,Asset:()=>f,AssetHolding:()=>g,AssetParams:()=>m,BlockHashResponse:()=>y,BlockResponse:()=>b,Box:()=>w,BoxDescriptor:()=>A,BoxesResponse:()=>v,BuildVersion:()=>x,CatchpointAbortResponse:()=>_,CatchpointStartResponse:()=>S,CompileResponse:()=>E,DisassembleResponse:()=>T,DryrunRequest:()=>R,DryrunResponse:()=>B,DryrunSource:()=>k,DryrunState:()=>U,DryrunTxnResult:()=>I,ErrorResponse:()=>C,EvalDelta:()=>D,EvalDeltaKeyValue:()=>P,LightBlockHeaderProof:()=>N,NodeStatusResponse:()=>O,PendingTransactionResponse:()=>L,PendingTransactionsResponse:()=>F,PostTransactionsResponse:()=>j,StateProof:()=>z,StateProofMessage:()=>q,SupplyResponse:()=>M,TealKeyValue:()=>$,TealValue:()=>H,TransactionParametersResponse:()=>K,TransactionProofResponse:()=>G,Version:()=>V});var s=r(5899),n=r(2486).lW;class o extends s.Z{constructor({address:e,amount:t,amountWithoutPendingRewards:r,minBalance:s,pendingRewards:n,rewards:o,round:i,status:a,totalAppsOptedIn:c,totalAssetsOptedIn:u,totalCreatedApps:d,totalCreatedAssets:l,appsLocalState:h,appsTotalExtraPages:p,appsTotalSchema:f,assets:g,authAddr:m,createdApps:y,createdAssets:b,participation:w,rewardBase:A,sigType:v,totalBoxBytes:x,totalBoxes:_}){super(),this.address=e,this.amount=t,this.amountWithoutPendingRewards=r,this.minBalance=s,this.pendingRewards=n,this.rewards=o,this.round=i,this.status=a,this.totalAppsOptedIn=c,this.totalAssetsOptedIn=u,this.totalCreatedApps=d,this.totalCreatedAssets=l,this.appsLocalState=h,this.appsTotalExtraPages=p,this.appsTotalSchema=f,this.assets=g,this.authAddr=m,this.createdApps=y,this.createdAssets=b,this.participation=w,this.rewardBase=A,this.sigType=v,this.totalBoxBytes=x,this.totalBoxes=_,this.attribute_map={address:"address",amount:"amount",amountWithoutPendingRewards:"amount-without-pending-rewards",minBalance:"min-balance",pendingRewards:"pending-rewards",rewards:"rewards",round:"round",status:"status",totalAppsOptedIn:"total-apps-opted-in",totalAssetsOptedIn:"total-assets-opted-in",totalCreatedApps:"total-created-apps",totalCreatedAssets:"total-created-assets",appsLocalState:"apps-local-state",appsTotalExtraPages:"apps-total-extra-pages",appsTotalSchema:"apps-total-schema",assets:"assets",authAddr:"auth-addr",createdApps:"created-apps",createdAssets:"created-assets",participation:"participation",rewardBase:"reward-base",sigType:"sig-type",totalBoxBytes:"total-box-bytes",totalBoxes:"total-boxes"}}static from_obj_for_encoding(e){if(void 0===e.address)throw new Error(`Response is missing required field 'address': ${e}`);if(void 0===e.amount)throw new Error(`Response is missing required field 'amount': ${e}`);if(void 0===e["amount-without-pending-rewards"])throw new Error(`Response is missing required field 'amount-without-pending-rewards': ${e}`);if(void 0===e["min-balance"])throw new Error(`Response is missing required field 'min-balance': ${e}`);if(void 0===e["pending-rewards"])throw new Error(`Response is missing required field 'pending-rewards': ${e}`);if(void 0===e.rewards)throw new Error(`Response is missing required field 'rewards': ${e}`);if(void 0===e.round)throw new Error(`Response is missing required field 'round': ${e}`);if(void 0===e.status)throw new Error(`Response is missing required field 'status': ${e}`);if(void 0===e["total-apps-opted-in"])throw new Error(`Response is missing required field 'total-apps-opted-in': ${e}`);if(void 0===e["total-assets-opted-in"])throw new Error(`Response is missing required field 'total-assets-opted-in': ${e}`);if(void 0===e["total-created-apps"])throw new Error(`Response is missing required field 'total-created-apps': ${e}`);if(void 0===e["total-created-assets"])throw new Error(`Response is missing required field 'total-created-assets': ${e}`);return new o({address:e.address,amount:e.amount,amountWithoutPendingRewards:e["amount-without-pending-rewards"],minBalance:e["min-balance"],pendingRewards:e["pending-rewards"],rewards:e.rewards,round:e.round,status:e.status,totalAppsOptedIn:e["total-apps-opted-in"],totalAssetsOptedIn:e["total-assets-opted-in"],totalCreatedApps:e["total-created-apps"],totalCreatedAssets:e["total-created-assets"],appsLocalState:void 0!==e["apps-local-state"]?e["apps-local-state"].map(l.from_obj_for_encoding):void 0,appsTotalExtraPages:e["apps-total-extra-pages"],appsTotalSchema:void 0!==e["apps-total-schema"]?p.from_obj_for_encoding(e["apps-total-schema"]):void 0,assets:void 0!==e.assets?e.assets.map(g.from_obj_for_encoding):void 0,authAddr:e["auth-addr"],createdApps:void 0!==e["created-apps"]?e["created-apps"].map(d.from_obj_for_encoding):void 0,createdAssets:void 0!==e["created-assets"]?e["created-assets"].map(f.from_obj_for_encoding):void 0,participation:void 0!==e.participation?c.from_obj_for_encoding(e.participation):void 0,rewardBase:e["reward-base"],sigType:e["sig-type"],totalBoxBytes:e["total-box-bytes"],totalBoxes:e["total-boxes"]})}}class i extends s.Z{constructor(e,t,r){super(),this.round=e,this.appLocalState=t,this.createdApp=r,this.attribute_map={round:"round",appLocalState:"app-local-state",createdApp:"created-app"}}static from_obj_for_encoding(e){if(void 0===e.round)throw new Error(`Response is missing required field 'round': ${e}`);return new i(e.round,void 0!==e["app-local-state"]?l.from_obj_for_encoding(e["app-local-state"]):void 0,void 0!==e["created-app"]?h.from_obj_for_encoding(e["created-app"]):void 0)}}class a extends s.Z{constructor(e,t,r){super(),this.round=e,this.assetHolding=t,this.createdAsset=r,this.attribute_map={round:"round",assetHolding:"asset-holding",createdAsset:"created-asset"}}static from_obj_for_encoding(e){if(void 0===e.round)throw new Error(`Response is missing required field 'round': ${e}`);return new a(e.round,void 0!==e["asset-holding"]?g.from_obj_for_encoding(e["asset-holding"]):void 0,void 0!==e["created-asset"]?m.from_obj_for_encoding(e["created-asset"]):void 0)}}class c extends s.Z{constructor({selectionParticipationKey:e,voteFirstValid:t,voteKeyDilution:r,voteLastValid:s,voteParticipationKey:o,stateProofKey:i}){super(),this.selectionParticipationKey="string"==typeof e?new Uint8Array(n.from(e,"base64")):e,this.voteFirstValid=t,this.voteKeyDilution=r,this.voteLastValid=s,this.voteParticipationKey="string"==typeof o?new Uint8Array(n.from(o,"base64")):o,this.stateProofKey="string"==typeof i?new Uint8Array(n.from(i,"base64")):i,this.attribute_map={selectionParticipationKey:"selection-participation-key",voteFirstValid:"vote-first-valid",voteKeyDilution:"vote-key-dilution",voteLastValid:"vote-last-valid",voteParticipationKey:"vote-participation-key",stateProofKey:"state-proof-key"}}static from_obj_for_encoding(e){if(void 0===e["selection-participation-key"])throw new Error(`Response is missing required field 'selection-participation-key': ${e}`);if(void 0===e["vote-first-valid"])throw new Error(`Response is missing required field 'vote-first-valid': ${e}`);if(void 0===e["vote-key-dilution"])throw new Error(`Response is missing required field 'vote-key-dilution': ${e}`);if(void 0===e["vote-last-valid"])throw new Error(`Response is missing required field 'vote-last-valid': ${e}`);if(void 0===e["vote-participation-key"])throw new Error(`Response is missing required field 'vote-participation-key': ${e}`);return new c({selectionParticipationKey:e["selection-participation-key"],voteFirstValid:e["vote-first-valid"],voteKeyDilution:e["vote-key-dilution"],voteLastValid:e["vote-last-valid"],voteParticipationKey:e["vote-participation-key"],stateProofKey:e["state-proof-key"]})}}class u extends s.Z{constructor(e,t){super(),this.address=e,this.delta=t,this.attribute_map={address:"address",delta:"delta"}}static from_obj_for_encoding(e){if(void 0===e.address)throw new Error(`Response is missing required field 'address': ${e}`);if(!Array.isArray(e.delta))throw new Error(`Response is missing required array field 'delta': ${e}`);return new u(e.address,e.delta.map(P.from_obj_for_encoding))}}class d extends s.Z{constructor(e,t){super(),this.id=e,this.params=t,this.attribute_map={id:"id",params:"params"}}static from_obj_for_encoding(e){if(void 0===e.id)throw new Error(`Response is missing required field 'id': ${e}`);if(void 0===e.params)throw new Error(`Response is missing required field 'params': ${e}`);return new d(e.id,h.from_obj_for_encoding(e.params))}}class l extends s.Z{constructor(e,t,r){super(),this.id=e,this.schema=t,this.keyValue=r,this.attribute_map={id:"id",schema:"schema",keyValue:"key-value"}}static from_obj_for_encoding(e){if(void 0===e.id)throw new Error(`Response is missing required field 'id': ${e}`);if(void 0===e.schema)throw new Error(`Response is missing required field 'schema': ${e}`);return new l(e.id,p.from_obj_for_encoding(e.schema),void 0!==e["key-value"]?e["key-value"].map($.from_obj_for_encoding):void 0)}}class h extends s.Z{constructor({approvalProgram:e,clearStateProgram:t,creator:r,extraProgramPages:s,globalState:o,globalStateSchema:i,localStateSchema:a}){super(),this.approvalProgram="string"==typeof e?new Uint8Array(n.from(e,"base64")):e,this.clearStateProgram="string"==typeof t?new Uint8Array(n.from(t,"base64")):t,this.creator=r,this.extraProgramPages=s,this.globalState=o,this.globalStateSchema=i,this.localStateSchema=a,this.attribute_map={approvalProgram:"approval-program",clearStateProgram:"clear-state-program",creator:"creator",extraProgramPages:"extra-program-pages",globalState:"global-state",globalStateSchema:"global-state-schema",localStateSchema:"local-state-schema"}}static from_obj_for_encoding(e){if(void 0===e["approval-program"])throw new Error(`Response is missing required field 'approval-program': ${e}`);if(void 0===e["clear-state-program"])throw new Error(`Response is missing required field 'clear-state-program': ${e}`);if(void 0===e.creator)throw new Error(`Response is missing required field 'creator': ${e}`);return new h({approvalProgram:e["approval-program"],clearStateProgram:e["clear-state-program"],creator:e.creator,extraProgramPages:e["extra-program-pages"],globalState:void 0!==e["global-state"]?e["global-state"].map($.from_obj_for_encoding):void 0,globalStateSchema:void 0!==e["global-state-schema"]?p.from_obj_for_encoding(e["global-state-schema"]):void 0,localStateSchema:void 0!==e["local-state-schema"]?p.from_obj_for_encoding(e["local-state-schema"]):void 0})}}class p extends s.Z{constructor(e,t){super(),this.numUint=e,this.numByteSlice=t,this.attribute_map={numUint:"num-uint",numByteSlice:"num-byte-slice"}}static from_obj_for_encoding(e){if(void 0===e["num-uint"])throw new Error(`Response is missing required field 'num-uint': ${e}`);if(void 0===e["num-byte-slice"])throw new Error(`Response is missing required field 'num-byte-slice': ${e}`);return new p(e["num-uint"],e["num-byte-slice"])}}class f extends s.Z{constructor(e,t){super(),this.index=e,this.params=t,this.attribute_map={index:"index",params:"params"}}static from_obj_for_encoding(e){if(void 0===e.index)throw new Error(`Response is missing required field 'index': ${e}`);if(void 0===e.params)throw new Error(`Response is missing required field 'params': ${e}`);return new f(e.index,m.from_obj_for_encoding(e.params))}}class g extends s.Z{constructor(e,t,r){super(),this.amount=e,this.assetId=t,this.isFrozen=r,this.attribute_map={amount:"amount",assetId:"asset-id",isFrozen:"is-frozen"}}static from_obj_for_encoding(e){if(void 0===e.amount)throw new Error(`Response is missing required field 'amount': ${e}`);if(void 0===e["asset-id"])throw new Error(`Response is missing required field 'asset-id': ${e}`);if(void 0===e["is-frozen"])throw new Error(`Response is missing required field 'is-frozen': ${e}`);return new g(e.amount,e["asset-id"],e["is-frozen"])}}class m extends s.Z{constructor({creator:e,decimals:t,total:r,clawback:s,defaultFrozen:o,freeze:i,manager:a,metadataHash:c,name:u,nameB64:d,reserve:l,unitName:h,unitNameB64:p,url:f,urlB64:g}){super(),this.creator=e,this.decimals=t,this.total=r,this.clawback=s,this.defaultFrozen=o,this.freeze=i,this.manager=a,this.metadataHash="string"==typeof c?new Uint8Array(n.from(c,"base64")):c,this.name=u,this.nameB64="string"==typeof d?new Uint8Array(n.from(d,"base64")):d,this.reserve=l,this.unitName=h,this.unitNameB64="string"==typeof p?new Uint8Array(n.from(p,"base64")):p,this.url=f,this.urlB64="string"==typeof g?new Uint8Array(n.from(g,"base64")):g,this.attribute_map={creator:"creator",decimals:"decimals",total:"total",clawback:"clawback",defaultFrozen:"default-frozen",freeze:"freeze",manager:"manager",metadataHash:"metadata-hash",name:"name",nameB64:"name-b64",reserve:"reserve",unitName:"unit-name",unitNameB64:"unit-name-b64",url:"url",urlB64:"url-b64"}}static from_obj_for_encoding(e){if(void 0===e.creator)throw new Error(`Response is missing required field 'creator': ${e}`);if(void 0===e.decimals)throw new Error(`Response is missing required field 'decimals': ${e}`);if(void 0===e.total)throw new Error(`Response is missing required field 'total': ${e}`);return new m({creator:e.creator,decimals:e.decimals,total:e.total,clawback:e.clawback,defaultFrozen:e["default-frozen"],freeze:e.freeze,manager:e.manager,metadataHash:e["metadata-hash"],name:e.name,nameB64:e["name-b64"],reserve:e.reserve,unitName:e["unit-name"],unitNameB64:e["unit-name-b64"],url:e.url,urlB64:e["url-b64"]})}}class y extends s.Z{constructor(e){super(),this.blockhash=e,this.attribute_map={blockhash:"blockHash"}}static from_obj_for_encoding(e){if(void 0===e.blockHash)throw new Error(`Response is missing required field 'blockHash': ${e}`);return new y(e.blockHash)}}class b extends s.Z{constructor(e,t){super(),this.block=e,this.cert=t,this.attribute_map={block:"block",cert:"cert"}}static from_obj_for_encoding(e){if(void 0===e.block)throw new Error(`Response is missing required field 'block': ${e}`);return new b(e.block,e.cert)}}class w extends s.Z{constructor(e,t){super(),this.name="string"==typeof e?new Uint8Array(n.from(e,"base64")):e,this.value="string"==typeof t?new Uint8Array(n.from(t,"base64")):t,this.attribute_map={name:"name",value:"value"}}static from_obj_for_encoding(e){if(void 0===e.name)throw new Error(`Response is missing required field 'name': ${e}`);if(void 0===e.value)throw new Error(`Response is missing required field 'value': ${e}`);return new w(e.name,e.value)}}class A extends s.Z{constructor(e){super(),this.name="string"==typeof e?new Uint8Array(n.from(e,"base64")):e,this.attribute_map={name:"name"}}static from_obj_for_encoding(e){if(void 0===e.name)throw new Error(`Response is missing required field 'name': ${e}`);return new A(e.name)}}class v extends s.Z{constructor(e){super(),this.boxes=e,this.attribute_map={boxes:"boxes"}}static from_obj_for_encoding(e){if(!Array.isArray(e.boxes))throw new Error(`Response is missing required array field 'boxes': ${e}`);return new v(e.boxes.map(A.from_obj_for_encoding))}}class x extends s.Z{constructor({branch:e,buildNumber:t,channel:r,commitHash:s,major:n,minor:o}){super(),this.branch=e,this.buildNumber=t,this.channel=r,this.commitHash=s,this.major=n,this.minor=o,this.attribute_map={branch:"branch",buildNumber:"build_number",channel:"channel",commitHash:"commit_hash",major:"major",minor:"minor"}}static from_obj_for_encoding(e){if(void 0===e.branch)throw new Error(`Response is missing required field 'branch': ${e}`);if(void 0===e.build_number)throw new Error(`Response is missing required field 'build_number': ${e}`);if(void 0===e.channel)throw new Error(`Response is missing required field 'channel': ${e}`);if(void 0===e.commit_hash)throw new Error(`Response is missing required field 'commit_hash': ${e}`);if(void 0===e.major)throw new Error(`Response is missing required field 'major': ${e}`);if(void 0===e.minor)throw new Error(`Response is missing required field 'minor': ${e}`);return new x({branch:e.branch,buildNumber:e.build_number,channel:e.channel,commitHash:e.commit_hash,major:e.major,minor:e.minor})}}class _ extends s.Z{constructor(e){super(),this.catchupMessage=e,this.attribute_map={catchupMessage:"catchup-message"}}static from_obj_for_encoding(e){if(void 0===e["catchup-message"])throw new Error(`Response is missing required field 'catchup-message': ${e}`);return new _(e["catchup-message"])}}class S extends s.Z{constructor(e){super(),this.catchupMessage=e,this.attribute_map={catchupMessage:"catchup-message"}}static from_obj_for_encoding(e){if(void 0===e["catchup-message"])throw new Error(`Response is missing required field 'catchup-message': ${e}`);return new S(e["catchup-message"])}}class E extends s.Z{constructor(e,t,r){super(),this.hash=e,this.result=t,this.sourcemap=r,this.attribute_map={hash:"hash",result:"result",sourcemap:"sourcemap"}}static from_obj_for_encoding(e){if(void 0===e.hash)throw new Error(`Response is missing required field 'hash': ${e}`);if(void 0===e.result)throw new Error(`Response is missing required field 'result': ${e}`);return new E(e.hash,e.result,e.sourcemap)}}class T extends s.Z{constructor(e){super(),this.result=e,this.attribute_map={result:"result"}}static from_obj_for_encoding(e){if(void 0===e.result)throw new Error(`Response is missing required field 'result': ${e}`);return new T(e.result)}}class R extends s.Z{constructor({accounts:e,apps:t,latestTimestamp:r,protocolVersion:s,round:n,sources:o,txns:i}){super(),this.accounts=e,this.apps=t,this.latestTimestamp=r,this.protocolVersion=s,this.round=n,this.sources=o,this.txns=i,this.attribute_map={accounts:"accounts",apps:"apps",latestTimestamp:"latest-timestamp",protocolVersion:"protocol-version",round:"round",sources:"sources",txns:"txns"}}static from_obj_for_encoding(e){if(!Array.isArray(e.accounts))throw new Error(`Response is missing required array field 'accounts': ${e}`);if(!Array.isArray(e.apps))throw new Error(`Response is missing required array field 'apps': ${e}`);if(void 0===e["latest-timestamp"])throw new Error(`Response is missing required field 'latest-timestamp': ${e}`);if(void 0===e["protocol-version"])throw new Error(`Response is missing required field 'protocol-version': ${e}`);if(void 0===e.round)throw new Error(`Response is missing required field 'round': ${e}`);if(!Array.isArray(e.sources))throw new Error(`Response is missing required array field 'sources': ${e}`);if(!Array.isArray(e.txns))throw new Error(`Response is missing required array field 'txns': ${e}`);return new R({accounts:e.accounts.map(o.from_obj_for_encoding),apps:e.apps.map(d.from_obj_for_encoding),latestTimestamp:e["latest-timestamp"],protocolVersion:e["protocol-version"],round:e.round,sources:e.sources.map(k.from_obj_for_encoding),txns:e.txns})}}class B extends s.Z{constructor(e,t,r){super(),this.error=e,this.protocolVersion=t,this.txns=r,this.attribute_map={error:"error",protocolVersion:"protocol-version",txns:"txns"}}static from_obj_for_encoding(e){if(void 0===e.error)throw new Error(`Response is missing required field 'error': ${e}`);if(void 0===e["protocol-version"])throw new Error(`Response is missing required field 'protocol-version': ${e}`);if(!Array.isArray(e.txns))throw new Error(`Response is missing required array field 'txns': ${e}`);return new B(e.error,e["protocol-version"],e.txns.map(I.from_obj_for_encoding))}}class k extends s.Z{constructor(e,t,r,s){super(),this.fieldName=e,this.source=t,this.txnIndex=r,this.appIndex=s,this.attribute_map={fieldName:"field-name",source:"source",txnIndex:"txn-index",appIndex:"app-index"}}static from_obj_for_encoding(e){if(void 0===e["field-name"])throw new Error(`Response is missing required field 'field-name': ${e}`);if(void 0===e.source)throw new Error(`Response is missing required field 'source': ${e}`);if(void 0===e["txn-index"])throw new Error(`Response is missing required field 'txn-index': ${e}`);if(void 0===e["app-index"])throw new Error(`Response is missing required field 'app-index': ${e}`);return new k(e["field-name"],e.source,e["txn-index"],e["app-index"])}}class U extends s.Z{constructor({line:e,pc:t,stack:r,error:s,scratch:n}){super(),this.line=e,this.pc=t,this.stack=r,this.error=s,this.scratch=n,this.attribute_map={line:"line",pc:"pc",stack:"stack",error:"error",scratch:"scratch"}}static from_obj_for_encoding(e){if(void 0===e.line)throw new Error(`Response is missing required field 'line': ${e}`);if(void 0===e.pc)throw new Error(`Response is missing required field 'pc': ${e}`);if(!Array.isArray(e.stack))throw new Error(`Response is missing required array field 'stack': ${e}`);return new U({line:e.line,pc:e.pc,stack:e.stack.map(H.from_obj_for_encoding),error:e.error,scratch:void 0!==e.scratch?e.scratch.map(H.from_obj_for_encoding):void 0})}}class I extends s.Z{constructor({disassembly:e,appCallMessages:t,appCallTrace:r,budgetAdded:s,budgetConsumed:n,cost:o,globalDelta:i,localDeltas:a,logicSigDisassembly:c,logicSigMessages:u,logicSigTrace:d,logs:l}){super(),this.disassembly=e,this.appCallMessages=t,this.appCallTrace=r,this.budgetAdded=s,this.budgetConsumed=n,this.cost=o,this.globalDelta=i,this.localDeltas=a,this.logicSigDisassembly=c,this.logicSigMessages=u,this.logicSigTrace=d,this.logs=l,this.attribute_map={disassembly:"disassembly",appCallMessages:"app-call-messages",appCallTrace:"app-call-trace",budgetAdded:"budget-added",budgetConsumed:"budget-consumed",cost:"cost",globalDelta:"global-delta",localDeltas:"local-deltas",logicSigDisassembly:"logic-sig-disassembly",logicSigMessages:"logic-sig-messages",logicSigTrace:"logic-sig-trace",logs:"logs"}}static from_obj_for_encoding(e){if(!Array.isArray(e.disassembly))throw new Error(`Response is missing required array field 'disassembly': ${e}`);return new I({disassembly:e.disassembly,appCallMessages:e["app-call-messages"],appCallTrace:void 0!==e["app-call-trace"]?e["app-call-trace"].map(U.from_obj_for_encoding):void 0,budgetAdded:e["budget-added"],budgetConsumed:e["budget-consumed"],cost:e.cost,globalDelta:void 0!==e["global-delta"]?e["global-delta"].map(P.from_obj_for_encoding):void 0,localDeltas:void 0!==e["local-deltas"]?e["local-deltas"].map(u.from_obj_for_encoding):void 0,logicSigDisassembly:e["logic-sig-disassembly"],logicSigMessages:e["logic-sig-messages"],logicSigTrace:void 0!==e["logic-sig-trace"]?e["logic-sig-trace"].map(U.from_obj_for_encoding):void 0,logs:e.logs})}}class C extends s.Z{constructor(e,t){super(),this.message=e,this.data=t,this.attribute_map={message:"message",data:"data"}}static from_obj_for_encoding(e){if(void 0===e.message)throw new Error(`Response is missing required field 'message': ${e}`);return new C(e.message,e.data)}}class D extends s.Z{constructor(e,t,r){super(),this.action=e,this.bytes=t,this.uint=r,this.attribute_map={action:"action",bytes:"bytes",uint:"uint"}}static from_obj_for_encoding(e){if(void 0===e.action)throw new Error(`Response is missing required field 'action': ${e}`);return new D(e.action,e.bytes,e.uint)}}class P extends s.Z{constructor(e,t){super(),this.key=e,this.value=t,this.attribute_map={key:"key",value:"value"}}static from_obj_for_encoding(e){if(void 0===e.key)throw new Error(`Response is missing required field 'key': ${e}`);if(void 0===e.value)throw new Error(`Response is missing required field 'value': ${e}`);return new P(e.key,D.from_obj_for_encoding(e.value))}}class N extends s.Z{constructor(e,t,r){super(),this.index=e,this.proof="string"==typeof t?new Uint8Array(n.from(t,"base64")):t,this.treedepth=r,this.attribute_map={index:"index",proof:"proof",treedepth:"treedepth"}}static from_obj_for_encoding(e){if(void 0===e.index)throw new Error(`Response is missing required field 'index': ${e}`);if(void 0===e.proof)throw new Error(`Response is missing required field 'proof': ${e}`);if(void 0===e.treedepth)throw new Error(`Response is missing required field 'treedepth': ${e}`);return new N(e.index,e.proof,e.treedepth)}}class O extends s.Z{constructor({catchupTime:e,lastRound:t,lastVersion:r,nextVersion:s,nextVersionRound:n,nextVersionSupported:o,stoppedAtUnsupportedRound:i,timeSinceLastRound:a,catchpoint:c,catchpointAcquiredBlocks:u,catchpointProcessedAccounts:d,catchpointProcessedKvs:l,catchpointTotalAccounts:h,catchpointTotalBlocks:p,catchpointTotalKvs:f,catchpointVerifiedAccounts:g,catchpointVerifiedKvs:m,lastCatchpoint:y}){super(),this.catchupTime=e,this.lastRound=t,this.lastVersion=r,this.nextVersion=s,this.nextVersionRound=n,this.nextVersionSupported=o,this.stoppedAtUnsupportedRound=i,this.timeSinceLastRound=a,this.catchpoint=c,this.catchpointAcquiredBlocks=u,this.catchpointProcessedAccounts=d,this.catchpointProcessedKvs=l,this.catchpointTotalAccounts=h,this.catchpointTotalBlocks=p,this.catchpointTotalKvs=f,this.catchpointVerifiedAccounts=g,this.catchpointVerifiedKvs=m,this.lastCatchpoint=y,this.attribute_map={catchupTime:"catchup-time",lastRound:"last-round",lastVersion:"last-version",nextVersion:"next-version",nextVersionRound:"next-version-round",nextVersionSupported:"next-version-supported",stoppedAtUnsupportedRound:"stopped-at-unsupported-round",timeSinceLastRound:"time-since-last-round",catchpoint:"catchpoint",catchpointAcquiredBlocks:"catchpoint-acquired-blocks",catchpointProcessedAccounts:"catchpoint-processed-accounts",catchpointProcessedKvs:"catchpoint-processed-kvs",catchpointTotalAccounts:"catchpoint-total-accounts",catchpointTotalBlocks:"catchpoint-total-blocks",catchpointTotalKvs:"catchpoint-total-kvs",catchpointVerifiedAccounts:"catchpoint-verified-accounts",catchpointVerifiedKvs:"catchpoint-verified-kvs",lastCatchpoint:"last-catchpoint"}}static from_obj_for_encoding(e){if(void 0===e["catchup-time"])throw new Error(`Response is missing required field 'catchup-time': ${e}`);if(void 0===e["last-round"])throw new Error(`Response is missing required field 'last-round': ${e}`);if(void 0===e["last-version"])throw new Error(`Response is missing required field 'last-version': ${e}`);if(void 0===e["next-version"])throw new Error(`Response is missing required field 'next-version': ${e}`);if(void 0===e["next-version-round"])throw new Error(`Response is missing required field 'next-version-round': ${e}`);if(void 0===e["next-version-supported"])throw new Error(`Response is missing required field 'next-version-supported': ${e}`);if(void 0===e["stopped-at-unsupported-round"])throw new Error(`Response is missing required field 'stopped-at-unsupported-round': ${e}`);if(void 0===e["time-since-last-round"])throw new Error(`Response is missing required field 'time-since-last-round': ${e}`);return new O({catchupTime:e["catchup-time"],lastRound:e["last-round"],lastVersion:e["last-version"],nextVersion:e["next-version"],nextVersionRound:e["next-version-round"],nextVersionSupported:e["next-version-supported"],stoppedAtUnsupportedRound:e["stopped-at-unsupported-round"],timeSinceLastRound:e["time-since-last-round"],catchpoint:e.catchpoint,catchpointAcquiredBlocks:e["catchpoint-acquired-blocks"],catchpointProcessedAccounts:e["catchpoint-processed-accounts"],catchpointProcessedKvs:e["catchpoint-processed-kvs"],catchpointTotalAccounts:e["catchpoint-total-accounts"],catchpointTotalBlocks:e["catchpoint-total-blocks"],catchpointTotalKvs:e["catchpoint-total-kvs"],catchpointVerifiedAccounts:e["catchpoint-verified-accounts"],catchpointVerifiedKvs:e["catchpoint-verified-kvs"],lastCatchpoint:e["last-catchpoint"]})}}class L extends s.Z{constructor({poolError:e,txn:t,applicationIndex:r,assetClosingAmount:s,assetIndex:n,closeRewards:o,closingAmount:i,confirmedRound:a,globalStateDelta:c,innerTxns:u,localStateDelta:d,logs:l,receiverRewards:h,senderRewards:p}){super(),this.poolError=e,this.txn=t,this.applicationIndex=r,this.assetClosingAmount=s,this.assetIndex=n,this.closeRewards=o,this.closingAmount=i,this.confirmedRound=a,this.globalStateDelta=c,this.innerTxns=u,this.localStateDelta=d,this.logs=l,this.receiverRewards=h,this.senderRewards=p,this.attribute_map={poolError:"pool-error",txn:"txn",applicationIndex:"application-index",assetClosingAmount:"asset-closing-amount",assetIndex:"asset-index",closeRewards:"close-rewards",closingAmount:"closing-amount",confirmedRound:"confirmed-round",globalStateDelta:"global-state-delta",innerTxns:"inner-txns",localStateDelta:"local-state-delta",logs:"logs",receiverRewards:"receiver-rewards",senderRewards:"sender-rewards"}}static from_obj_for_encoding(e){if(void 0===e["pool-error"])throw new Error(`Response is missing required field 'pool-error': ${e}`);if(void 0===e.txn)throw new Error(`Response is missing required field 'txn': ${e}`);return new L({poolError:e["pool-error"],txn:e.txn,applicationIndex:e["application-index"],assetClosingAmount:e["asset-closing-amount"],assetIndex:e["asset-index"],closeRewards:e["close-rewards"],closingAmount:e["closing-amount"],confirmedRound:e["confirmed-round"],globalStateDelta:void 0!==e["global-state-delta"]?e["global-state-delta"].map(P.from_obj_for_encoding):void 0,innerTxns:void 0!==e["inner-txns"]?e["inner-txns"].map(L.from_obj_for_encoding):void 0,localStateDelta:void 0!==e["local-state-delta"]?e["local-state-delta"].map(u.from_obj_for_encoding):void 0,logs:e.logs,receiverRewards:e["receiver-rewards"],senderRewards:e["sender-rewards"]})}}class F extends s.Z{constructor(e,t){super(),this.topTransactions=e,this.totalTransactions=t,this.attribute_map={topTransactions:"top-transactions",totalTransactions:"total-transactions"}}static from_obj_for_encoding(e){if(!Array.isArray(e["top-transactions"]))throw new Error(`Response is missing required array field 'top-transactions': ${e}`);if(void 0===e["total-transactions"])throw new Error(`Response is missing required field 'total-transactions': ${e}`);return new F(e["top-transactions"],e["total-transactions"])}}class j extends s.Z{constructor(e){super(),this.txid=e,this.attribute_map={txid:"txId"}}static from_obj_for_encoding(e){if(void 0===e.txId)throw new Error(`Response is missing required field 'txId': ${e}`);return new j(e.txId)}}class z extends s.Z{constructor(e,t){super(),this.message=e,this.stateproof="string"==typeof t?new Uint8Array(n.from(t,"base64")):t,this.attribute_map={message:"Message",stateproof:"StateProof"}}static from_obj_for_encoding(e){if(void 0===e.Message)throw new Error(`Response is missing required field 'Message': ${e}`);if(void 0===e.StateProof)throw new Error(`Response is missing required field 'StateProof': ${e}`);return new z(q.from_obj_for_encoding(e.Message),e.StateProof)}}class q extends s.Z{constructor({blockheaderscommitment:e,firstattestedround:t,lastattestedround:r,lnprovenweight:s,voterscommitment:o}){super(),this.blockheaderscommitment="string"==typeof e?new Uint8Array(n.from(e,"base64")):e,this.firstattestedround=t,this.lastattestedround=r,this.lnprovenweight=s,this.voterscommitment="string"==typeof o?new Uint8Array(n.from(o,"base64")):o,this.attribute_map={blockheaderscommitment:"BlockHeadersCommitment",firstattestedround:"FirstAttestedRound",lastattestedround:"LastAttestedRound",lnprovenweight:"LnProvenWeight",voterscommitment:"VotersCommitment"}}static from_obj_for_encoding(e){if(void 0===e.BlockHeadersCommitment)throw new Error(`Response is missing required field 'BlockHeadersCommitment': ${e}`);if(void 0===e.FirstAttestedRound)throw new Error(`Response is missing required field 'FirstAttestedRound': ${e}`);if(void 0===e.LastAttestedRound)throw new Error(`Response is missing required field 'LastAttestedRound': ${e}`);if(void 0===e.LnProvenWeight)throw new Error(`Response is missing required field 'LnProvenWeight': ${e}`);if(void 0===e.VotersCommitment)throw new Error(`Response is missing required field 'VotersCommitment': ${e}`);return new q({blockheaderscommitment:e.BlockHeadersCommitment,firstattestedround:e.FirstAttestedRound,lastattestedround:e.LastAttestedRound,lnprovenweight:e.LnProvenWeight,voterscommitment:e.VotersCommitment})}}class M extends s.Z{constructor(e,t,r){super(),this.currentRound=e,this.onlineMoney=t,this.totalMoney=r,this.attribute_map={currentRound:"current_round",onlineMoney:"online-money",totalMoney:"total-money"}}static from_obj_for_encoding(e){if(void 0===e.current_round)throw new Error(`Response is missing required field 'current_round': ${e}`);if(void 0===e["online-money"])throw new Error(`Response is missing required field 'online-money': ${e}`);if(void 0===e["total-money"])throw new Error(`Response is missing required field 'total-money': ${e}`);return new M(e.current_round,e["online-money"],e["total-money"])}}class $ extends s.Z{constructor(e,t){super(),this.key=e,this.value=t,this.attribute_map={key:"key",value:"value"}}static from_obj_for_encoding(e){if(void 0===e.key)throw new Error(`Response is missing required field 'key': ${e}`);if(void 0===e.value)throw new Error(`Response is missing required field 'value': ${e}`);return new $(e.key,H.from_obj_for_encoding(e.value))}}class H extends s.Z{constructor(e,t,r){super(),this.type=e,this.bytes=t,this.uint=r,this.attribute_map={type:"type",bytes:"bytes",uint:"uint"}}static from_obj_for_encoding(e){if(void 0===e.type)throw new Error(`Response is missing required field 'type': ${e}`);if(void 0===e.bytes)throw new Error(`Response is missing required field 'bytes': ${e}`);if(void 0===e.uint)throw new Error(`Response is missing required field 'uint': ${e}`);return new H(e.type,e.bytes,e.uint)}}class K extends s.Z{constructor({consensusVersion:e,fee:t,genesisHash:r,genesisId:s,lastRound:o,minFee:i}){super(),this.consensusVersion=e,this.fee=t,this.genesisHash="string"==typeof r?new Uint8Array(n.from(r,"base64")):r,this.genesisId=s,this.lastRound=o,this.minFee=i,this.attribute_map={consensusVersion:"consensus-version",fee:"fee",genesisHash:"genesis-hash",genesisId:"genesis-id",lastRound:"last-round",minFee:"min-fee"}}static from_obj_for_encoding(e){if(void 0===e["consensus-version"])throw new Error(`Response is missing required field 'consensus-version': ${e}`);if(void 0===e.fee)throw new Error(`Response is missing required field 'fee': ${e}`);if(void 0===e["genesis-hash"])throw new Error(`Response is missing required field 'genesis-hash': ${e}`);if(void 0===e["genesis-id"])throw new Error(`Response is missing required field 'genesis-id': ${e}`);if(void 0===e["last-round"])throw new Error(`Response is missing required field 'last-round': ${e}`);if(void 0===e["min-fee"])throw new Error(`Response is missing required field 'min-fee': ${e}`);return new K({consensusVersion:e["consensus-version"],fee:e.fee,genesisHash:e["genesis-hash"],genesisId:e["genesis-id"],lastRound:e["last-round"],minFee:e["min-fee"]})}}class G extends s.Z{constructor({idx:e,proof:t,stibhash:r,treedepth:s,hashtype:o}){super(),this.idx=e,this.proof="string"==typeof t?new Uint8Array(n.from(t,"base64")):t,this.stibhash="string"==typeof r?new Uint8Array(n.from(r,"base64")):r,this.treedepth=s,this.hashtype=o,this.attribute_map={idx:"idx",proof:"proof",stibhash:"stibhash",treedepth:"treedepth",hashtype:"hashtype"}}static from_obj_for_encoding(e){if(void 0===e.idx)throw new Error(`Response is missing required field 'idx': ${e}`);if(void 0===e.proof)throw new Error(`Response is missing required field 'proof': ${e}`);if(void 0===e.stibhash)throw new Error(`Response is missing required field 'stibhash': ${e}`);if(void 0===e.treedepth)throw new Error(`Response is missing required field 'treedepth': ${e}`);return new G({idx:e.idx,proof:e.proof,stibhash:e.stibhash,treedepth:e.treedepth,hashtype:e.hashtype})}}class V extends s.Z{constructor(e,t,r,s){super(),this.build=e,this.genesisHashB64="string"==typeof t?new Uint8Array(n.from(t,"base64")):t,this.genesisId=r,this.versions=s,this.attribute_map={build:"build",genesisHashB64:"genesis_hash_b64",genesisId:"genesis_id",versions:"versions"}}static from_obj_for_encoding(e){if(void 0===e.build)throw new Error(`Response is missing required field 'build': ${e}`);if(void 0===e.genesis_hash_b64)throw new Error(`Response is missing required field 'genesis_hash_b64': ${e}`);if(void 0===e.genesis_id)throw new Error(`Response is missing required field 'genesis_id': ${e}`);if(!Array.isArray(e.versions))throw new Error(`Response is missing required array field 'versions': ${e}`);return new V(x.from_obj_for_encoding(e.build),e.genesis_hash_b64,e.genesis_id,e.versions)}}},5180:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>c,setSendTransactionHeaders:()=>i});var s=r(8680),n=r(413),o=r(2486).lW;function i(e={}){let t=e;return Object.keys(t).every((e=>"content-type"!==e.toLowerCase()))&&(t={...e},t["Content-Type"]="application/x-binary"),t}function a(e){return e&&void 0!==e.byteLength}class c extends s.Z{constructor(e,t){super(e);let r=t;if(Array.isArray(t)){if(!t.every(a))throw new TypeError("Array elements must be byte arrays");r=(0,n.concatArrays)(...t)}else if(!a(r))throw new TypeError("Argument must be byte array");this.txnBytesToPost=r}path(){return"/v2/transactions"}async do(e={}){const t=i(e);return(await this.c.post(this.path(),o.from(this.txnBytesToPost),t)).body}}},5899:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var s=r(2486).lW;function n(e,t){let r;if(e instanceof Uint8Array)r=t?e:s.from(e).toString("base64");else if("function"==typeof e.get_obj_for_encoding)r=e.get_obj_for_encoding(t);else if(Array.isArray(e)){r=[];for(const s of e)r.push(n(s,t))}else if("object"==typeof e){const s={};for(const r of Object.keys(e))s[r]=n(e[r],t);r=s}else{if(!function(e){return void 0===e||null==e||"object"!=typeof e&&"function"!=typeof e}(e))throw new Error(`Unsupported value: ${String(e)}`);r=e}return r}class o{get_obj_for_encoding(e=!1){const t={};for(const r of Object.keys(this.attribute_map)){const s=this.attribute_map[r],o=this[r];void 0!==o&&(t[s]=null===o?null:n(o,e))}return t}}},6595:(e,t,r)=>{"use strict";r.d(t,{Z:()=>k});var s=r(3480),n=r(8680);class o extends n.Z{path(){return"/health"}}class i extends n.Z{constructor(e,t,r){super(e,t),this.index=r,this.index=r}path(){return`/v2/assets/${this.index}/balances`}limit(e){return this.query.limit=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}includeAll(e=!0){return this.query["include-all"]=e,this}}var a=r(2486).lW;function c(e){return"string"==typeof e?e:a.from(e).toString("base64")}class u extends n.Z{constructor(e,t,r){super(e,t),this.account=r,this.account=r}path(){return`/v2/accounts/${this.account}/transactions`}notePrefix(e){return this.query["note-prefix"]=c(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}}class d extends n.Z{constructor(e,t,r){super(e,t),this.index=r,this.index=r}path(){return`/v2/assets/${this.index}/transactions`}notePrefix(e){return this.query["note-prefix"]=c(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}}class l extends n.Z{constructor(e,t,r){super(e,t),this.round=r,this.round=r}path(){return`/v2/blocks/${this.round}`}headerOnly(e){return this.query["header-only"]=e,this}}class h extends n.Z{constructor(e,t,r){super(e,t),this.txID=r,this.txID=r}path(){return`/v2/transactions/${this.txID}`}}class p extends n.Z{constructor(e,t,r){super(e,t),this.account=r,this.account=r}path(){return`/v2/accounts/${this.account}`}round(e){return this.query.round=e,this}includeAll(e=!0){return this.query["include-all"]=e,this}exclude(e){return this.query.exclude=e,this}}class f extends n.Z{constructor(e,t,r){super(e,t),this.account=r,this.account=r}path(){return`/v2/accounts/${this.account}/assets`}limit(e){return this.query.limit=e,this}round(e){return this.query.round=e,this}nextToken(e){return this.query.next=e,this}includeAll(e=!0){return this.query["include-all"]=e,this}assetId(e){return this.query["asset-id"]=e,this}}class g extends n.Z{constructor(e,t,r){super(e,t),this.account=r,this.account=r}path(){return`/v2/accounts/${this.account}/created-assets`}limit(e){return this.query.limit=e,this}round(e){return this.query.round=e,this}nextToken(e){return this.query.next=e,this}includeAll(e=!0){return this.query["include-all"]=e,this}assetID(e){return this.query["asset-id"]=e,this}}class m extends n.Z{constructor(e,t,r){super(e,t),this.account=r,this.account=r}path(){return`/v2/accounts/${this.account}/apps-local-state`}limit(e){return this.query.limit=e,this}round(e){return this.query.round=e,this}nextToken(e){return this.query.next=e,this}includeAll(e=!0){return this.query["include-all"]=e,this}applicationID(e){return this.query["application-id"]=e,this}}class y extends n.Z{constructor(e,t,r){super(e,t),this.account=r,this.account=r}path(){return`/v2/accounts/${this.account}/created-applications`}limit(e){return this.query.limit=e,this}round(e){return this.query.round=e,this}nextToken(e){return this.query.next=e,this}includeAll(e=!0){return this.query["include-all"]=e,this}applicationID(e){return this.query["application-id"]=e,this}}class b extends n.Z{constructor(e,t,r){super(e,t),this.index=r,this.index=r}path(){return`/v2/assets/${this.index}`}includeAll(e=!0){return this.query["include-all"]=e,this}}class w extends n.Z{constructor(e,t,r){super(e,t),this.index=r,this.index=r}path(){return`/v2/applications/${this.index}`}includeAll(e=!0){return this.query["include-all"]=e,this}}class A extends n.Z{constructor(e,t,r){super(e,t),this.appID=r,this.appID=r}path(){return`/v2/applications/${this.appID}/logs`}limit(e){return this.query.limit=e,this}minRound(e){return this.query["min-round"]=e,this}maxRound(e){return this.query["max-round"]=e,this}nextToken(e){return this.query.next=e,this}sender(e){return this.query["sender-address"]=e,this}txid(e){return this.query.txid=e,this}}var v=r(8230),x=r(2486).lW;class _ extends n.Z{constructor(e,t,r,s){super(e,t),this.index=r,this.index=r;const n=x.from(s).toString("base64");this.query.name=encodeURI(`b64:${n}`)}path(){return`/v2/applications/${this.index}/box`}prepare(e){return v.Box.from_obj_for_encoding(e)}}class S extends n.Z{path(){return"/v2/accounts"}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}includeAll(e=!0){return this.query["include-all"]=e,this}exclude(e){return this.query.exclude=e,this}}class E extends n.Z{path(){return"/v2/transactions"}notePrefix(e){return this.query["note-prefix"]=c(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}}class T extends n.Z{path(){return"/v2/assets"}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}includeAll(e=!0){return this.query["include-all"]=e,this}}class R extends n.Z{path(){return"/v2/applications"}index(e){return this.query["application-id"]=e,this}creator(e){return this.query.creator=e,this}nextToken(e){return this.query.next=e,this}limit(e){return this.query.limit=e,this}includeAll(e=!0){return this.query["include-all"]=e,this}}class B extends n.Z{constructor(e,t,r){super(e,t),this.index=r,this.index=r}path(){return`/v2/applications/${this.index}/boxes`}nextToken(e){return this.query.next=e,this}limit(e){return this.query.limit=e,this}prepare(e){return v.BoxesResponse.from_obj_for_encoding(e)}}class k extends s.Z{constructor(e,t="http://127.0.0.1",r=8080,s={}){super("X-Indexer-API-Token",e,t,r,s)}makeHealthCheck(){return new o(this.c,this.intDecoding)}lookupAssetBalances(e){return new i(this.c,this.intDecoding,e)}lookupAssetTransactions(e){return new d(this.c,this.intDecoding,e)}lookupAccountTransactions(e){return new u(this.c,this.intDecoding,e)}lookupBlock(e){return new l(this.c,this.intDecoding,e)}lookupTransactionByID(e){return new h(this.c,this.intDecoding,e)}lookupAccountByID(e){return new p(this.c,this.intDecoding,e)}lookupAccountAssets(e){return new f(this.c,this.intDecoding,e)}lookupAccountCreatedAssets(e){return new g(this.c,this.intDecoding,e)}lookupAccountAppLocalStates(e){return new m(this.c,this.intDecoding,e)}lookupAccountCreatedApplications(e){return new y(this.c,this.intDecoding,e)}lookupAssetByID(e){return new b(this.c,this.intDecoding,e)}lookupApplications(e){return new w(this.c,this.intDecoding,e)}lookupApplicationLogs(e){return new A(this.c,this.intDecoding,e)}searchAccounts(){return new S(this.c,this.intDecoding)}searchForTransactions(){return new E(this.c,this.intDecoding)}searchForAssets(){return new T(this.c,this.intDecoding)}searchForApplications(){return new R(this.c,this.intDecoding)}searchForApplicationBoxes(e){return new B(this.c,this.intDecoding,e)}lookupApplicationBoxByIDandName(e,t){return new _(this.c,this.intDecoding,e,t)}}},8230:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Account:()=>o,AccountParticipation:()=>i,AccountResponse:()=>a,AccountStateDelta:()=>c,AccountsResponse:()=>u,Application:()=>d,ApplicationLocalState:()=>l,ApplicationLocalStatesResponse:()=>h,ApplicationLogData:()=>p,ApplicationLogsResponse:()=>f,ApplicationParams:()=>g,ApplicationResponse:()=>m,ApplicationStateSchema:()=>y,ApplicationsResponse:()=>b,Asset:()=>w,AssetBalancesResponse:()=>A,AssetHolding:()=>v,AssetHoldingsResponse:()=>x,AssetParams:()=>_,AssetResponse:()=>S,AssetsResponse:()=>E,Block:()=>T,BlockRewards:()=>R,BlockUpgradeState:()=>B,BlockUpgradeVote:()=>k,Box:()=>U,BoxDescriptor:()=>I,BoxesResponse:()=>C,ErrorResponse:()=>D,EvalDelta:()=>P,EvalDeltaKeyValue:()=>N,HashFactory:()=>O,HealthCheck:()=>L,IndexerStateProofMessage:()=>F,MerkleArrayProof:()=>j,MiniAssetHolding:()=>z,ParticipationUpdates:()=>q,StateProofFields:()=>M,StateProofParticipant:()=>$,StateProofReveal:()=>H,StateProofSigSlot:()=>K,StateProofSignature:()=>G,StateProofTracking:()=>V,StateProofVerifier:()=>W,StateSchema:()=>Z,TealKeyValue:()=>X,TealValue:()=>Y,Transaction:()=>J,TransactionApplication:()=>Q,TransactionAssetConfig:()=>ee,TransactionAssetFreeze:()=>te,TransactionAssetTransfer:()=>re,TransactionKeyreg:()=>se,TransactionPayment:()=>ne,TransactionResponse:()=>oe,TransactionSignature:()=>ie,TransactionSignatureLogicsig:()=>ae,TransactionSignatureMultisig:()=>ce,TransactionSignatureMultisigSubsignature:()=>ue,TransactionStateProof:()=>de,TransactionsResponse:()=>le});var s=r(5899),n=r(2486).lW;class o extends s.Z{constructor({address:e,amount:t,amountWithoutPendingRewards:r,pendingRewards:s,rewards:n,round:o,status:i,totalAppsOptedIn:a,totalAssetsOptedIn:c,totalBoxBytes:u,totalBoxes:d,totalCreatedApps:l,totalCreatedAssets:h,appsLocalState:p,appsTotalExtraPages:f,appsTotalSchema:g,assets:m,authAddr:y,closedAtRound:b,createdApps:w,createdAssets:A,createdAtRound:v,deleted:x,participation:_,rewardBase:S,sigType:E}){super(),this.address=e,this.amount=t,this.amountWithoutPendingRewards=r,this.pendingRewards=s,this.rewards=n,this.round=o,this.status=i,this.totalAppsOptedIn=a,this.totalAssetsOptedIn=c,this.totalBoxBytes=u,this.totalBoxes=d,this.totalCreatedApps=l,this.totalCreatedAssets=h,this.appsLocalState=p,this.appsTotalExtraPages=f,this.appsTotalSchema=g,this.assets=m,this.authAddr=y,this.closedAtRound=b,this.createdApps=w,this.createdAssets=A,this.createdAtRound=v,this.deleted=x,this.participation=_,this.rewardBase=S,this.sigType=E,this.attribute_map={address:"address",amount:"amount",amountWithoutPendingRewards:"amount-without-pending-rewards",pendingRewards:"pending-rewards",rewards:"rewards",round:"round",status:"status",totalAppsOptedIn:"total-apps-opted-in",totalAssetsOptedIn:"total-assets-opted-in",totalBoxBytes:"total-box-bytes",totalBoxes:"total-boxes",totalCreatedApps:"total-created-apps",totalCreatedAssets:"total-created-assets",appsLocalState:"apps-local-state",appsTotalExtraPages:"apps-total-extra-pages",appsTotalSchema:"apps-total-schema",assets:"assets",authAddr:"auth-addr",closedAtRound:"closed-at-round",createdApps:"created-apps",createdAssets:"created-assets",createdAtRound:"created-at-round",deleted:"deleted",participation:"participation",rewardBase:"reward-base",sigType:"sig-type"}}static from_obj_for_encoding(e){if(void 0===e.address)throw new Error(`Response is missing required field 'address': ${e}`);if(void 0===e.amount)throw new Error(`Response is missing required field 'amount': ${e}`);if(void 0===e["amount-without-pending-rewards"])throw new Error(`Response is missing required field 'amount-without-pending-rewards': ${e}`);if(void 0===e["pending-rewards"])throw new Error(`Response is missing required field 'pending-rewards': ${e}`);if(void 0===e.rewards)throw new Error(`Response is missing required field 'rewards': ${e}`);if(void 0===e.round)throw new Error(`Response is missing required field 'round': ${e}`);if(void 0===e.status)throw new Error(`Response is missing required field 'status': ${e}`);if(void 0===e["total-apps-opted-in"])throw new Error(`Response is missing required field 'total-apps-opted-in': ${e}`);if(void 0===e["total-assets-opted-in"])throw new Error(`Response is missing required field 'total-assets-opted-in': ${e}`);if(void 0===e["total-box-bytes"])throw new Error(`Response is missing required field 'total-box-bytes': ${e}`);if(void 0===e["total-boxes"])throw new Error(`Response is missing required field 'total-boxes': ${e}`);if(void 0===e["total-created-apps"])throw new Error(`Response is missing required field 'total-created-apps': ${e}`);if(void 0===e["total-created-assets"])throw new Error(`Response is missing required field 'total-created-assets': ${e}`);return new o({address:e.address,amount:e.amount,amountWithoutPendingRewards:e["amount-without-pending-rewards"],pendingRewards:e["pending-rewards"],rewards:e.rewards,round:e.round,status:e.status,totalAppsOptedIn:e["total-apps-opted-in"],totalAssetsOptedIn:e["total-assets-opted-in"],totalBoxBytes:e["total-box-bytes"],totalBoxes:e["total-boxes"],totalCreatedApps:e["total-created-apps"],totalCreatedAssets:e["total-created-assets"],appsLocalState:void 0!==e["apps-local-state"]?e["apps-local-state"].map(l.from_obj_for_encoding):void 0,appsTotalExtraPages:e["apps-total-extra-pages"],appsTotalSchema:void 0!==e["apps-total-schema"]?y.from_obj_for_encoding(e["apps-total-schema"]):void 0,assets:void 0!==e.assets?e.assets.map(v.from_obj_for_encoding):void 0,authAddr:e["auth-addr"],closedAtRound:e["closed-at-round"],createdApps:void 0!==e["created-apps"]?e["created-apps"].map(d.from_obj_for_encoding):void 0,createdAssets:void 0!==e["created-assets"]?e["created-assets"].map(w.from_obj_for_encoding):void 0,createdAtRound:e["created-at-round"],deleted:e.deleted,participation:void 0!==e.participation?i.from_obj_for_encoding(e.participation):void 0,rewardBase:e["reward-base"],sigType:e["sig-type"]})}}class i extends s.Z{constructor({selectionParticipationKey:e,voteFirstValid:t,voteKeyDilution:r,voteLastValid:s,voteParticipationKey:o,stateProofKey:i}){super(),this.selectionParticipationKey="string"==typeof e?new Uint8Array(n.from(e,"base64")):e,this.voteFirstValid=t,this.voteKeyDilution=r,this.voteLastValid=s,this.voteParticipationKey="string"==typeof o?new Uint8Array(n.from(o,"base64")):o,this.stateProofKey="string"==typeof i?new Uint8Array(n.from(i,"base64")):i,this.attribute_map={selectionParticipationKey:"selection-participation-key",voteFirstValid:"vote-first-valid",voteKeyDilution:"vote-key-dilution",voteLastValid:"vote-last-valid",voteParticipationKey:"vote-participation-key",stateProofKey:"state-proof-key"}}static from_obj_for_encoding(e){if(void 0===e["selection-participation-key"])throw new Error(`Response is missing required field 'selection-participation-key': ${e}`);if(void 0===e["vote-first-valid"])throw new Error(`Response is missing required field 'vote-first-valid': ${e}`);if(void 0===e["vote-key-dilution"])throw new Error(`Response is missing required field 'vote-key-dilution': ${e}`);if(void 0===e["vote-last-valid"])throw new Error(`Response is missing required field 'vote-last-valid': ${e}`);if(void 0===e["vote-participation-key"])throw new Error(`Response is missing required field 'vote-participation-key': ${e}`);return new i({selectionParticipationKey:e["selection-participation-key"],voteFirstValid:e["vote-first-valid"],voteKeyDilution:e["vote-key-dilution"],voteLastValid:e["vote-last-valid"],voteParticipationKey:e["vote-participation-key"],stateProofKey:e["state-proof-key"]})}}class a extends s.Z{constructor({account:e,currentRound:t}){super(),this.account=e,this.currentRound=t,this.attribute_map={account:"account",currentRound:"current-round"}}static from_obj_for_encoding(e){if(void 0===e.account)throw new Error(`Response is missing required field 'account': ${e}`);if(void 0===e["current-round"])throw new Error(`Response is missing required field 'current-round': ${e}`);return new a({account:o.from_obj_for_encoding(e.account),currentRound:e["current-round"]})}}class c extends s.Z{constructor({address:e,delta:t}){super(),this.address=e,this.delta=t,this.attribute_map={address:"address",delta:"delta"}}static from_obj_for_encoding(e){if(void 0===e.address)throw new Error(`Response is missing required field 'address': ${e}`);if(!Array.isArray(e.delta))throw new Error(`Response is missing required array field 'delta': ${e}`);return new c({address:e.address,delta:e.delta.map(N.from_obj_for_encoding)})}}class u extends s.Z{constructor({accounts:e,currentRound:t,nextToken:r}){super(),this.accounts=e,this.currentRound=t,this.nextToken=r,this.attribute_map={accounts:"accounts",currentRound:"current-round",nextToken:"next-token"}}static from_obj_for_encoding(e){if(!Array.isArray(e.accounts))throw new Error(`Response is missing required array field 'accounts': ${e}`);if(void 0===e["current-round"])throw new Error(`Response is missing required field 'current-round': ${e}`);return new u({accounts:e.accounts.map(o.from_obj_for_encoding),currentRound:e["current-round"],nextToken:e["next-token"]})}}class d extends s.Z{constructor({id:e,params:t,createdAtRound:r,deleted:s,deletedAtRound:n}){super(),this.id=e,this.params=t,this.createdAtRound=r,this.deleted=s,this.deletedAtRound=n,this.attribute_map={id:"id",params:"params",createdAtRound:"created-at-round",deleted:"deleted",deletedAtRound:"deleted-at-round"}}static from_obj_for_encoding(e){if(void 0===e.id)throw new Error(`Response is missing required field 'id': ${e}`);if(void 0===e.params)throw new Error(`Response is missing required field 'params': ${e}`);return new d({id:e.id,params:g.from_obj_for_encoding(e.params),createdAtRound:e["created-at-round"],deleted:e.deleted,deletedAtRound:e["deleted-at-round"]})}}class l extends s.Z{constructor({id:e,schema:t,closedOutAtRound:r,deleted:s,keyValue:n,optedInAtRound:o}){super(),this.id=e,this.schema=t,this.closedOutAtRound=r,this.deleted=s,this.keyValue=n,this.optedInAtRound=o,this.attribute_map={id:"id",schema:"schema",closedOutAtRound:"closed-out-at-round",deleted:"deleted",keyValue:"key-value",optedInAtRound:"opted-in-at-round"}}static from_obj_for_encoding(e){if(void 0===e.id)throw new Error(`Response is missing required field 'id': ${e}`);if(void 0===e.schema)throw new Error(`Response is missing required field 'schema': ${e}`);return new l({id:e.id,schema:y.from_obj_for_encoding(e.schema),closedOutAtRound:e["closed-out-at-round"],deleted:e.deleted,keyValue:void 0!==e["key-value"]?e["key-value"].map(X.from_obj_for_encoding):void 0,optedInAtRound:e["opted-in-at-round"]})}}class h extends s.Z{constructor({appsLocalStates:e,currentRound:t,nextToken:r}){super(),this.appsLocalStates=e,this.currentRound=t,this.nextToken=r,this.attribute_map={appsLocalStates:"apps-local-states",currentRound:"current-round",nextToken:"next-token"}}static from_obj_for_encoding(e){if(!Array.isArray(e["apps-local-states"]))throw new Error(`Response is missing required array field 'apps-local-states': ${e}`);if(void 0===e["current-round"])throw new Error(`Response is missing required field 'current-round': ${e}`);return new h({appsLocalStates:e["apps-local-states"].map(l.from_obj_for_encoding),currentRound:e["current-round"],nextToken:e["next-token"]})}}class p extends s.Z{constructor({logs:e,txid:t}){super(),this.logs=e,this.txid=t,this.attribute_map={logs:"logs",txid:"txid"}}static from_obj_for_encoding(e){if(!Array.isArray(e.logs))throw new Error(`Response is missing required array field 'logs': ${e}`);if(void 0===e.txid)throw new Error(`Response is missing required field 'txid': ${e}`);return new p({logs:e.logs,txid:e.txid})}}class f extends s.Z{constructor({applicationId:e,currentRound:t,logData:r,nextToken:s}){super(),this.applicationId=e,this.currentRound=t,this.logData=r,this.nextToken=s,this.attribute_map={applicationId:"application-id",currentRound:"current-round",logData:"log-data",nextToken:"next-token"}}static from_obj_for_encoding(e){if(void 0===e["application-id"])throw new Error(`Response is missing required field 'application-id': ${e}`);if(void 0===e["current-round"])throw new Error(`Response is missing required field 'current-round': ${e}`);return new f({applicationId:e["application-id"],currentRound:e["current-round"],logData:void 0!==e["log-data"]?e["log-data"].map(p.from_obj_for_encoding):void 0,nextToken:e["next-token"]})}}class g extends s.Z{constructor({approvalProgram:e,clearStateProgram:t,creator:r,extraProgramPages:s,globalState:o,globalStateSchema:i,localStateSchema:a}){super(),this.approvalProgram="string"==typeof e?new Uint8Array(n.from(e,"base64")):e,this.clearStateProgram="string"==typeof t?new Uint8Array(n.from(t,"base64")):t,this.creator=r,this.extraProgramPages=s,this.globalState=o,this.globalStateSchema=i,this.localStateSchema=a,this.attribute_map={approvalProgram:"approval-program",clearStateProgram:"clear-state-program",creator:"creator",extraProgramPages:"extra-program-pages",globalState:"global-state",globalStateSchema:"global-state-schema",localStateSchema:"local-state-schema"}}static from_obj_for_encoding(e){if(void 0===e["approval-program"])throw new Error(`Response is missing required field 'approval-program': ${e}`);if(void 0===e["clear-state-program"])throw new Error(`Response is missing required field 'clear-state-program': ${e}`);return new g({approvalProgram:e["approval-program"],clearStateProgram:e["clear-state-program"],creator:e.creator,extraProgramPages:e["extra-program-pages"],globalState:void 0!==e["global-state"]?e["global-state"].map(X.from_obj_for_encoding):void 0,globalStateSchema:void 0!==e["global-state-schema"]?y.from_obj_for_encoding(e["global-state-schema"]):void 0,localStateSchema:void 0!==e["local-state-schema"]?y.from_obj_for_encoding(e["local-state-schema"]):void 0})}}class m extends s.Z{constructor({currentRound:e,application:t}){super(),this.currentRound=e,this.application=t,this.attribute_map={currentRound:"current-round",application:"application"}}static from_obj_for_encoding(e){if(void 0===e["current-round"])throw new Error(`Response is missing required field 'current-round': ${e}`);return new m({currentRound:e["current-round"],application:void 0!==e.application?d.from_obj_for_encoding(e.application):void 0})}}class y extends s.Z{constructor({numByteSlice:e,numUint:t}){super(),this.numByteSlice=e,this.numUint=t,this.attribute_map={numByteSlice:"num-byte-slice",numUint:"num-uint"}}static from_obj_for_encoding(e){if(void 0===e["num-byte-slice"])throw new Error(`Response is missing required field 'num-byte-slice': ${e}`);if(void 0===e["num-uint"])throw new Error(`Response is missing required field 'num-uint': ${e}`);return new y({numByteSlice:e["num-byte-slice"],numUint:e["num-uint"]})}}class b extends s.Z{constructor({applications:e,currentRound:t,nextToken:r}){super(),this.applications=e,this.currentRound=t,this.nextToken=r,this.attribute_map={applications:"applications",currentRound:"current-round",nextToken:"next-token"}}static from_obj_for_encoding(e){if(!Array.isArray(e.applications))throw new Error(`Response is missing required array field 'applications': ${e}`);if(void 0===e["current-round"])throw new Error(`Response is missing required field 'current-round': ${e}`);return new b({applications:e.applications.map(d.from_obj_for_encoding),currentRound:e["current-round"],nextToken:e["next-token"]})}}class w extends s.Z{constructor({index:e,params:t,createdAtRound:r,deleted:s,destroyedAtRound:n}){super(),this.index=e,this.params=t,this.createdAtRound=r,this.deleted=s,this.destroyedAtRound=n,this.attribute_map={index:"index",params:"params",createdAtRound:"created-at-round",deleted:"deleted",destroyedAtRound:"destroyed-at-round"}}static from_obj_for_encoding(e){if(void 0===e.index)throw new Error(`Response is missing required field 'index': ${e}`);if(void 0===e.params)throw new Error(`Response is missing required field 'params': ${e}`);return new w({index:e.index,params:_.from_obj_for_encoding(e.params),createdAtRound:e["created-at-round"],deleted:e.deleted,destroyedAtRound:e["destroyed-at-round"]})}}class A extends s.Z{constructor({balances:e,currentRound:t,nextToken:r}){super(),this.balances=e,this.currentRound=t,this.nextToken=r,this.attribute_map={balances:"balances",currentRound:"current-round",nextToken:"next-token"}}static from_obj_for_encoding(e){if(!Array.isArray(e.balances))throw new Error(`Response is missing required array field 'balances': ${e}`);if(void 0===e["current-round"])throw new Error(`Response is missing required field 'current-round': ${e}`);return new A({balances:e.balances.map(z.from_obj_for_encoding),currentRound:e["current-round"],nextToken:e["next-token"]})}}class v extends s.Z{constructor({amount:e,assetId:t,isFrozen:r,deleted:s,optedInAtRound:n,optedOutAtRound:o}){super(),this.amount=e,this.assetId=t,this.isFrozen=r,this.deleted=s,this.optedInAtRound=n,this.optedOutAtRound=o,this.attribute_map={amount:"amount",assetId:"asset-id",isFrozen:"is-frozen",deleted:"deleted",optedInAtRound:"opted-in-at-round",optedOutAtRound:"opted-out-at-round"}}static from_obj_for_encoding(e){if(void 0===e.amount)throw new Error(`Response is missing required field 'amount': ${e}`);if(void 0===e["asset-id"])throw new Error(`Response is missing required field 'asset-id': ${e}`);if(void 0===e["is-frozen"])throw new Error(`Response is missing required field 'is-frozen': ${e}`);return new v({amount:e.amount,assetId:e["asset-id"],isFrozen:e["is-frozen"],deleted:e.deleted,optedInAtRound:e["opted-in-at-round"],optedOutAtRound:e["opted-out-at-round"]})}}class x extends s.Z{constructor({assets:e,currentRound:t,nextToken:r}){super(),this.assets=e,this.currentRound=t,this.nextToken=r,this.attribute_map={assets:"assets",currentRound:"current-round",nextToken:"next-token"}}static from_obj_for_encoding(e){if(!Array.isArray(e.assets))throw new Error(`Response is missing required array field 'assets': ${e}`);if(void 0===e["current-round"])throw new Error(`Response is missing required field 'current-round': ${e}`);return new x({assets:e.assets.map(v.from_obj_for_encoding),currentRound:e["current-round"],nextToken:e["next-token"]})}}class _ extends s.Z{constructor({creator:e,decimals:t,total:r,clawback:s,defaultFrozen:o,freeze:i,manager:a,metadataHash:c,name:u,nameB64:d,reserve:l,unitName:h,unitNameB64:p,url:f,urlB64:g}){super(),this.creator=e,this.decimals=t,this.total=r,this.clawback=s,this.defaultFrozen=o,this.freeze=i,this.manager=a,this.metadataHash="string"==typeof c?new Uint8Array(n.from(c,"base64")):c,this.name=u,this.nameB64="string"==typeof d?new Uint8Array(n.from(d,"base64")):d,this.reserve=l,this.unitName=h,this.unitNameB64="string"==typeof p?new Uint8Array(n.from(p,"base64")):p,this.url=f,this.urlB64="string"==typeof g?new Uint8Array(n.from(g,"base64")):g,this.attribute_map={creator:"creator",decimals:"decimals",total:"total",clawback:"clawback",defaultFrozen:"default-frozen",freeze:"freeze",manager:"manager",metadataHash:"metadata-hash",name:"name",nameB64:"name-b64",reserve:"reserve",unitName:"unit-name",unitNameB64:"unit-name-b64",url:"url",urlB64:"url-b64"}}static from_obj_for_encoding(e){if(void 0===e.creator)throw new Error(`Response is missing required field 'creator': ${e}`);if(void 0===e.decimals)throw new Error(`Response is missing required field 'decimals': ${e}`);if(void 0===e.total)throw new Error(`Response is missing required field 'total': ${e}`);return new _({creator:e.creator,decimals:e.decimals,total:e.total,clawback:e.clawback,defaultFrozen:e["default-frozen"],freeze:e.freeze,manager:e.manager,metadataHash:e["metadata-hash"],name:e.name,nameB64:e["name-b64"],reserve:e.reserve,unitName:e["unit-name"],unitNameB64:e["unit-name-b64"],url:e.url,urlB64:e["url-b64"]})}}class S extends s.Z{constructor({asset:e,currentRound:t}){super(),this.asset=e,this.currentRound=t,this.attribute_map={asset:"asset",currentRound:"current-round"}}static from_obj_for_encoding(e){if(void 0===e.asset)throw new Error(`Response is missing required field 'asset': ${e}`);if(void 0===e["current-round"])throw new Error(`Response is missing required field 'current-round': ${e}`);return new S({asset:w.from_obj_for_encoding(e.asset),currentRound:e["current-round"]})}}class E extends s.Z{constructor({assets:e,currentRound:t,nextToken:r}){super(),this.assets=e,this.currentRound=t,this.nextToken=r,this.attribute_map={assets:"assets",currentRound:"current-round",nextToken:"next-token"}}static from_obj_for_encoding(e){if(!Array.isArray(e.assets))throw new Error(`Response is missing required array field 'assets': ${e}`);if(void 0===e["current-round"])throw new Error(`Response is missing required field 'current-round': ${e}`);return new E({assets:e.assets.map(w.from_obj_for_encoding),currentRound:e["current-round"],nextToken:e["next-token"]})}}class T extends s.Z{constructor({genesisHash:e,genesisId:t,previousBlockHash:r,round:s,seed:o,timestamp:i,transactionsRoot:a,transactionsRootSha256:c,participationUpdates:u,rewards:d,stateProofTracking:l,transactions:h,txnCounter:p,upgradeState:f,upgradeVote:g}){super(),this.genesisHash="string"==typeof e?new Uint8Array(n.from(e,"base64")):e,this.genesisId=t,this.previousBlockHash="string"==typeof r?new Uint8Array(n.from(r,"base64")):r,this.round=s,this.seed="string"==typeof o?new Uint8Array(n.from(o,"base64")):o,this.timestamp=i,this.transactionsRoot="string"==typeof a?new Uint8Array(n.from(a,"base64")):a,this.transactionsRootSha256="string"==typeof c?new Uint8Array(n.from(c,"base64")):c,this.participationUpdates=u,this.rewards=d,this.stateProofTracking=l,this.transactions=h,this.txnCounter=p,this.upgradeState=f,this.upgradeVote=g,this.attribute_map={genesisHash:"genesis-hash",genesisId:"genesis-id",previousBlockHash:"previous-block-hash",round:"round",seed:"seed",timestamp:"timestamp",transactionsRoot:"transactions-root",transactionsRootSha256:"transactions-root-sha256",participationUpdates:"participation-updates",rewards:"rewards",stateProofTracking:"state-proof-tracking",transactions:"transactions",txnCounter:"txn-counter",upgradeState:"upgrade-state",upgradeVote:"upgrade-vote"}}static from_obj_for_encoding(e){if(void 0===e["genesis-hash"])throw new Error(`Response is missing required field 'genesis-hash': ${e}`);if(void 0===e["genesis-id"])throw new Error(`Response is missing required field 'genesis-id': ${e}`);if(void 0===e["previous-block-hash"])throw new Error(`Response is missing required field 'previous-block-hash': ${e}`);if(void 0===e.round)throw new Error(`Response is missing required field 'round': ${e}`);if(void 0===e.seed)throw new Error(`Response is missing required field 'seed': ${e}`);if(void 0===e.timestamp)throw new Error(`Response is missing required field 'timestamp': ${e}`);if(void 0===e["transactions-root"])throw new Error(`Response is missing required field 'transactions-root': ${e}`);if(void 0===e["transactions-root-sha256"])throw new Error(`Response is missing required field 'transactions-root-sha256': ${e}`);return new T({genesisHash:e["genesis-hash"],genesisId:e["genesis-id"],previousBlockHash:e["previous-block-hash"],round:e.round,seed:e.seed,timestamp:e.timestamp,transactionsRoot:e["transactions-root"],transactionsRootSha256:e["transactions-root-sha256"],participationUpdates:void 0!==e["participation-updates"]?q.from_obj_for_encoding(e["participation-updates"]):void 0,rewards:void 0!==e.rewards?R.from_obj_for_encoding(e.rewards):void 0,stateProofTracking:void 0!==e["state-proof-tracking"]?e["state-proof-tracking"].map(V.from_obj_for_encoding):void 0,transactions:void 0!==e.transactions?e.transactions.map(J.from_obj_for_encoding):void 0,txnCounter:e["txn-counter"],upgradeState:void 0!==e["upgrade-state"]?B.from_obj_for_encoding(e["upgrade-state"]):void 0,upgradeVote:void 0!==e["upgrade-vote"]?k.from_obj_for_encoding(e["upgrade-vote"]):void 0})}}class R extends s.Z{constructor({feeSink:e,rewardsCalculationRound:t,rewardsLevel:r,rewardsPool:s,rewardsRate:n,rewardsResidue:o}){super(),this.feeSink=e,this.rewardsCalculationRound=t,this.rewardsLevel=r,this.rewardsPool=s,this.rewardsRate=n,this.rewardsResidue=o,this.attribute_map={feeSink:"fee-sink",rewardsCalculationRound:"rewards-calculation-round",rewardsLevel:"rewards-level",rewardsPool:"rewards-pool",rewardsRate:"rewards-rate",rewardsResidue:"rewards-residue"}}static from_obj_for_encoding(e){if(void 0===e["fee-sink"])throw new Error(`Response is missing required field 'fee-sink': ${e}`);if(void 0===e["rewards-calculation-round"])throw new Error(`Response is missing required field 'rewards-calculation-round': ${e}`);if(void 0===e["rewards-level"])throw new Error(`Response is missing required field 'rewards-level': ${e}`);if(void 0===e["rewards-pool"])throw new Error(`Response is missing required field 'rewards-pool': ${e}`);if(void 0===e["rewards-rate"])throw new Error(`Response is missing required field 'rewards-rate': ${e}`);if(void 0===e["rewards-residue"])throw new Error(`Response is missing required field 'rewards-residue': ${e}`);return new R({feeSink:e["fee-sink"],rewardsCalculationRound:e["rewards-calculation-round"],rewardsLevel:e["rewards-level"],rewardsPool:e["rewards-pool"],rewardsRate:e["rewards-rate"],rewardsResidue:e["rewards-residue"]})}}class B extends s.Z{constructor({currentProtocol:e,nextProtocol:t,nextProtocolApprovals:r,nextProtocolSwitchOn:s,nextProtocolVoteBefore:n}){super(),this.currentProtocol=e,this.nextProtocol=t,this.nextProtocolApprovals=r,this.nextProtocolSwitchOn=s,this.nextProtocolVoteBefore=n,this.attribute_map={currentProtocol:"current-protocol",nextProtocol:"next-protocol",nextProtocolApprovals:"next-protocol-approvals",nextProtocolSwitchOn:"next-protocol-switch-on",nextProtocolVoteBefore:"next-protocol-vote-before"}}static from_obj_for_encoding(e){if(void 0===e["current-protocol"])throw new Error(`Response is missing required field 'current-protocol': ${e}`);return new B({currentProtocol:e["current-protocol"],nextProtocol:e["next-protocol"],nextProtocolApprovals:e["next-protocol-approvals"],nextProtocolSwitchOn:e["next-protocol-switch-on"],nextProtocolVoteBefore:e["next-protocol-vote-before"]})}}class k extends s.Z{constructor({upgradeApprove:e,upgradeDelay:t,upgradePropose:r}){super(),this.upgradeApprove=e,this.upgradeDelay=t,this.upgradePropose=r,this.attribute_map={upgradeApprove:"upgrade-approve",upgradeDelay:"upgrade-delay",upgradePropose:"upgrade-propose"}}static from_obj_for_encoding(e){return new k({upgradeApprove:e["upgrade-approve"],upgradeDelay:e["upgrade-delay"],upgradePropose:e["upgrade-propose"]})}}class U extends s.Z{constructor({name:e,value:t}){super(),this.name="string"==typeof e?new Uint8Array(n.from(e,"base64")):e,this.value="string"==typeof t?new Uint8Array(n.from(t,"base64")):t,this.attribute_map={name:"name",value:"value"}}static from_obj_for_encoding(e){if(void 0===e.name)throw new Error(`Response is missing required field 'name': ${e}`);if(void 0===e.value)throw new Error(`Response is missing required field 'value': ${e}`);return new U({name:e.name,value:e.value})}}class I extends s.Z{constructor({name:e}){super(),this.name="string"==typeof e?new Uint8Array(n.from(e,"base64")):e,this.attribute_map={name:"name"}}static from_obj_for_encoding(e){if(void 0===e.name)throw new Error(`Response is missing required field 'name': ${e}`);return new I({name:e.name})}}class C extends s.Z{constructor({applicationId:e,boxes:t,nextToken:r}){super(),this.applicationId=e,this.boxes=t,this.nextToken=r,this.attribute_map={applicationId:"application-id",boxes:"boxes",nextToken:"next-token"}}static from_obj_for_encoding(e){if(void 0===e["application-id"])throw new Error(`Response is missing required field 'application-id': ${e}`);if(!Array.isArray(e.boxes))throw new Error(`Response is missing required array field 'boxes': ${e}`);return new C({applicationId:e["application-id"],boxes:e.boxes.map(I.from_obj_for_encoding),nextToken:e["next-token"]})}}class D extends s.Z{constructor({message:e,data:t}){super(),this.message=e,this.data=t,this.attribute_map={message:"message",data:"data"}}static from_obj_for_encoding(e){if(void 0===e.message)throw new Error(`Response is missing required field 'message': ${e}`);return new D({message:e.message,data:e.data})}}class P extends s.Z{constructor({action:e,bytes:t,uint:r}){super(),this.action=e,this.bytes=t,this.uint=r,this.attribute_map={action:"action",bytes:"bytes",uint:"uint"}}static from_obj_for_encoding(e){if(void 0===e.action)throw new Error(`Response is missing required field 'action': ${e}`);return new P({action:e.action,bytes:e.bytes,uint:e.uint})}}class N extends s.Z{constructor({key:e,value:t}){super(),this.key=e,this.value=t,this.attribute_map={key:"key",value:"value"}}static from_obj_for_encoding(e){if(void 0===e.key)throw new Error(`Response is missing required field 'key': ${e}`);if(void 0===e.value)throw new Error(`Response is missing required field 'value': ${e}`);return new N({key:e.key,value:P.from_obj_for_encoding(e.value)})}}class O extends s.Z{constructor({hashType:e}){super(),this.hashType=e,this.attribute_map={hashType:"hash-type"}}static from_obj_for_encoding(e){return new O({hashType:e["hash-type"]})}}class L extends s.Z{constructor({dbAvailable:e,isMigrating:t,message:r,round:s,version:n,data:o,errors:i}){super(),this.dbAvailable=e,this.isMigrating=t,this.message=r,this.round=s,this.version=n,this.data=o,this.errors=i,this.attribute_map={dbAvailable:"db-available",isMigrating:"is-migrating",message:"message",round:"round",version:"version",data:"data",errors:"errors"}}static from_obj_for_encoding(e){if(void 0===e["db-available"])throw new Error(`Response is missing required field 'db-available': ${e}`);if(void 0===e["is-migrating"])throw new Error(`Response is missing required field 'is-migrating': ${e}`);if(void 0===e.message)throw new Error(`Response is missing required field 'message': ${e}`);if(void 0===e.round)throw new Error(`Response is missing required field 'round': ${e}`);if(void 0===e.version)throw new Error(`Response is missing required field 'version': ${e}`);return new L({dbAvailable:e["db-available"],isMigrating:e["is-migrating"],message:e.message,round:e.round,version:e.version,data:e.data,errors:e.errors})}}class F extends s.Z{constructor({blockHeadersCommitment:e,firstAttestedRound:t,latestAttestedRound:r,lnProvenWeight:s,votersCommitment:o}){super(),this.blockHeadersCommitment="string"==typeof e?new Uint8Array(n.from(e,"base64")):e,this.firstAttestedRound=t,this.latestAttestedRound=r,this.lnProvenWeight=s,this.votersCommitment="string"==typeof o?new Uint8Array(n.from(o,"base64")):o,this.attribute_map={blockHeadersCommitment:"block-headers-commitment",firstAttestedRound:"first-attested-round",latestAttestedRound:"latest-attested-round",lnProvenWeight:"ln-proven-weight",votersCommitment:"voters-commitment"}}static from_obj_for_encoding(e){return new F({blockHeadersCommitment:e["block-headers-commitment"],firstAttestedRound:e["first-attested-round"],latestAttestedRound:e["latest-attested-round"],lnProvenWeight:e["ln-proven-weight"],votersCommitment:e["voters-commitment"]})}}class j extends s.Z{constructor({hashFactory:e,path:t,treeDepth:r}){super(),this.hashFactory=e,this.path=t,this.treeDepth=r,this.attribute_map={hashFactory:"hash-factory",path:"path",treeDepth:"tree-depth"}}static from_obj_for_encoding(e){return new j({hashFactory:void 0!==e["hash-factory"]?O.from_obj_for_encoding(e["hash-factory"]):void 0,path:e.path,treeDepth:e["tree-depth"]})}}class z extends s.Z{constructor({address:e,amount:t,isFrozen:r,deleted:s,optedInAtRound:n,optedOutAtRound:o}){super(),this.address=e,this.amount=t,this.isFrozen=r,this.deleted=s,this.optedInAtRound=n,this.optedOutAtRound=o,this.attribute_map={address:"address",amount:"amount",isFrozen:"is-frozen",deleted:"deleted",optedInAtRound:"opted-in-at-round",optedOutAtRound:"opted-out-at-round"}}static from_obj_for_encoding(e){if(void 0===e.address)throw new Error(`Response is missing required field 'address': ${e}`);if(void 0===e.amount)throw new Error(`Response is missing required field 'amount': ${e}`);if(void 0===e["is-frozen"])throw new Error(`Response is missing required field 'is-frozen': ${e}`);return new z({address:e.address,amount:e.amount,isFrozen:e["is-frozen"],deleted:e.deleted,optedInAtRound:e["opted-in-at-round"],optedOutAtRound:e["opted-out-at-round"]})}}class q extends s.Z{constructor({expiredParticipationAccounts:e}){super(),this.expiredParticipationAccounts=e,this.attribute_map={expiredParticipationAccounts:"expired-participation-accounts"}}static from_obj_for_encoding(e){return new q({expiredParticipationAccounts:e["expired-participation-accounts"]})}}class M extends s.Z{constructor({partProofs:e,positionsToReveal:t,reveals:r,saltVersion:s,sigCommit:o,sigProofs:i,signedWeight:a}){super(),this.partProofs=e,this.positionsToReveal=t,this.reveals=r,this.saltVersion=s,this.sigCommit="string"==typeof o?new Uint8Array(n.from(o,"base64")):o,this.sigProofs=i,this.signedWeight=a,this.attribute_map={partProofs:"part-proofs",positionsToReveal:"positions-to-reveal",reveals:"reveals",saltVersion:"salt-version",sigCommit:"sig-commit",sigProofs:"sig-proofs",signedWeight:"signed-weight"}}static from_obj_for_encoding(e){return new M({partProofs:void 0!==e["part-proofs"]?j.from_obj_for_encoding(e["part-proofs"]):void 0,positionsToReveal:e["positions-to-reveal"],reveals:void 0!==e.reveals?e.reveals.map(H.from_obj_for_encoding):void 0,saltVersion:e["salt-version"],sigCommit:e["sig-commit"],sigProofs:void 0!==e["sig-proofs"]?j.from_obj_for_encoding(e["sig-proofs"]):void 0,signedWeight:e["signed-weight"]})}}class $ extends s.Z{constructor({verifier:e,weight:t}){super(),this.verifier=e,this.weight=t,this.attribute_map={verifier:"verifier",weight:"weight"}}static from_obj_for_encoding(e){return new $({verifier:void 0!==e.verifier?W.from_obj_for_encoding(e.verifier):void 0,weight:e.weight})}}class H extends s.Z{constructor({participant:e,position:t,sigSlot:r}){super(),this.participant=e,this.position=t,this.sigSlot=r,this.attribute_map={participant:"participant",position:"position",sigSlot:"sig-slot"}}static from_obj_for_encoding(e){return new H({participant:void 0!==e.participant?$.from_obj_for_encoding(e.participant):void 0,position:e.position,sigSlot:void 0!==e["sig-slot"]?K.from_obj_for_encoding(e["sig-slot"]):void 0})}}class K extends s.Z{constructor({lowerSigWeight:e,signature:t}){super(),this.lowerSigWeight=e,this.signature=t,this.attribute_map={lowerSigWeight:"lower-sig-weight",signature:"signature"}}static from_obj_for_encoding(e){return new K({lowerSigWeight:e["lower-sig-weight"],signature:void 0!==e.signature?G.from_obj_for_encoding(e.signature):void 0})}}class G extends s.Z{constructor({falconSignature:e,merkleArrayIndex:t,proof:r,verifyingKey:s}){super(),this.falconSignature="string"==typeof e?new Uint8Array(n.from(e,"base64")):e,this.merkleArrayIndex=t,this.proof=r,this.verifyingKey="string"==typeof s?new Uint8Array(n.from(s,"base64")):s,this.attribute_map={falconSignature:"falcon-signature",merkleArrayIndex:"merkle-array-index",proof:"proof",verifyingKey:"verifying-key"}}static from_obj_for_encoding(e){return new G({falconSignature:e["falcon-signature"],merkleArrayIndex:e["merkle-array-index"],proof:void 0!==e.proof?j.from_obj_for_encoding(e.proof):void 0,verifyingKey:e["verifying-key"]})}}class V extends s.Z{constructor({nextRound:e,onlineTotalWeight:t,type:r,votersCommitment:s}){super(),this.nextRound=e,this.onlineTotalWeight=t,this.type=r,this.votersCommitment="string"==typeof s?new Uint8Array(n.from(s,"base64")):s,this.attribute_map={nextRound:"next-round",onlineTotalWeight:"online-total-weight",type:"type",votersCommitment:"voters-commitment"}}static from_obj_for_encoding(e){return new V({nextRound:e["next-round"],onlineTotalWeight:e["online-total-weight"],type:e.type,votersCommitment:e["voters-commitment"]})}}class W extends s.Z{constructor({commitment:e,keyLifetime:t}){super(),this.commitment="string"==typeof e?new Uint8Array(n.from(e,"base64")):e,this.keyLifetime=t,this.attribute_map={commitment:"commitment",keyLifetime:"key-lifetime"}}static from_obj_for_encoding(e){return new W({commitment:e.commitment,keyLifetime:e["key-lifetime"]})}}class Z extends s.Z{constructor({numByteSlice:e,numUint:t}){super(),this.numByteSlice=e,this.numUint=t,this.attribute_map={numByteSlice:"num-byte-slice",numUint:"num-uint"}}static from_obj_for_encoding(e){if(void 0===e["num-byte-slice"])throw new Error(`Response is missing required field 'num-byte-slice': ${e}`);if(void 0===e["num-uint"])throw new Error(`Response is missing required field 'num-uint': ${e}`);return new Z({numByteSlice:e["num-byte-slice"],numUint:e["num-uint"]})}}class X extends s.Z{constructor({key:e,value:t}){super(),this.key=e,this.value=t,this.attribute_map={key:"key",value:"value"}}static from_obj_for_encoding(e){if(void 0===e.key)throw new Error(`Response is missing required field 'key': ${e}`);if(void 0===e.value)throw new Error(`Response is missing required field 'value': ${e}`);return new X({key:e.key,value:Y.from_obj_for_encoding(e.value)})}}class Y extends s.Z{constructor({bytes:e,type:t,uint:r}){super(),this.bytes=e,this.type=t,this.uint=r,this.attribute_map={bytes:"bytes",type:"type",uint:"uint"}}static from_obj_for_encoding(e){if(void 0===e.bytes)throw new Error(`Response is missing required field 'bytes': ${e}`);if(void 0===e.type)throw new Error(`Response is missing required field 'type': ${e}`);if(void 0===e.uint)throw new Error(`Response is missing required field 'uint': ${e}`);return new Y({bytes:e.bytes,type:e.type,uint:e.uint})}}class J extends s.Z{constructor({fee:e,firstValid:t,lastValid:r,sender:s,applicationTransaction:o,assetConfigTransaction:i,assetFreezeTransaction:a,assetTransferTransaction:c,authAddr:u,closeRewards:d,closingAmount:l,confirmedRound:h,createdApplicationIndex:p,createdAssetIndex:f,genesisHash:g,genesisId:m,globalStateDelta:y,group:b,id:w,innerTxns:A,intraRoundOffset:v,keyregTransaction:x,lease:_,localStateDelta:S,logs:E,note:T,paymentTransaction:R,receiverRewards:B,rekeyTo:k,roundTime:U,senderRewards:I,signature:C,stateProofTransaction:D,txType:P}){super(),this.fee=e,this.firstValid=t,this.lastValid=r,this.sender=s,this.applicationTransaction=o,this.assetConfigTransaction=i,this.assetFreezeTransaction=a,this.assetTransferTransaction=c,this.authAddr=u,this.closeRewards=d,this.closingAmount=l,this.confirmedRound=h,this.createdApplicationIndex=p,this.createdAssetIndex=f,this.genesisHash="string"==typeof g?new Uint8Array(n.from(g,"base64")):g,this.genesisId=m,this.globalStateDelta=y,this.group="string"==typeof b?new Uint8Array(n.from(b,"base64")):b,this.id=w,this.innerTxns=A,this.intraRoundOffset=v,this.keyregTransaction=x,this.lease="string"==typeof _?new Uint8Array(n.from(_,"base64")):_,this.localStateDelta=S,this.logs=E,this.note="string"==typeof T?new Uint8Array(n.from(T,"base64")):T,this.paymentTransaction=R,this.receiverRewards=B,this.rekeyTo=k,this.roundTime=U,this.senderRewards=I,this.signature=C,this.stateProofTransaction=D,this.txType=P,this.attribute_map={fee:"fee",firstValid:"first-valid",lastValid:"last-valid",sender:"sender",applicationTransaction:"application-transaction",assetConfigTransaction:"asset-config-transaction",assetFreezeTransaction:"asset-freeze-transaction",assetTransferTransaction:"asset-transfer-transaction",authAddr:"auth-addr",closeRewards:"close-rewards",closingAmount:"closing-amount",confirmedRound:"confirmed-round",createdApplicationIndex:"created-application-index",createdAssetIndex:"created-asset-index",genesisHash:"genesis-hash",genesisId:"genesis-id",globalStateDelta:"global-state-delta",group:"group",id:"id",innerTxns:"inner-txns",intraRoundOffset:"intra-round-offset",keyregTransaction:"keyreg-transaction",lease:"lease",localStateDelta:"local-state-delta",logs:"logs",note:"note",paymentTransaction:"payment-transaction",receiverRewards:"receiver-rewards",rekeyTo:"rekey-to",roundTime:"round-time",senderRewards:"sender-rewards",signature:"signature",stateProofTransaction:"state-proof-transaction",txType:"tx-type"}}static from_obj_for_encoding(e){if(void 0===e.fee)throw new Error(`Response is missing required field 'fee': ${e}`);if(void 0===e["first-valid"])throw new Error(`Response is missing required field 'first-valid': ${e}`);if(void 0===e["last-valid"])throw new Error(`Response is missing required field 'last-valid': ${e}`);if(void 0===e.sender)throw new Error(`Response is missing required field 'sender': ${e}`);return new J({fee:e.fee,firstValid:e["first-valid"],lastValid:e["last-valid"],sender:e.sender,applicationTransaction:void 0!==e["application-transaction"]?Q.from_obj_for_encoding(e["application-transaction"]):void 0,assetConfigTransaction:void 0!==e["asset-config-transaction"]?ee.from_obj_for_encoding(e["asset-config-transaction"]):void 0,assetFreezeTransaction:void 0!==e["asset-freeze-transaction"]?te.from_obj_for_encoding(e["asset-freeze-transaction"]):void 0,assetTransferTransaction:void 0!==e["asset-transfer-transaction"]?re.from_obj_for_encoding(e["asset-transfer-transaction"]):void 0,authAddr:e["auth-addr"],closeRewards:e["close-rewards"],closingAmount:e["closing-amount"],confirmedRound:e["confirmed-round"],createdApplicationIndex:e["created-application-index"],createdAssetIndex:e["created-asset-index"],genesisHash:e["genesis-hash"],genesisId:e["genesis-id"],globalStateDelta:void 0!==e["global-state-delta"]?e["global-state-delta"].map(N.from_obj_for_encoding):void 0,group:e.group,id:e.id,innerTxns:void 0!==e["inner-txns"]?e["inner-txns"].map(J.from_obj_for_encoding):void 0,intraRoundOffset:e["intra-round-offset"],keyregTransaction:void 0!==e["keyreg-transaction"]?se.from_obj_for_encoding(e["keyreg-transaction"]):void 0,lease:e.lease,localStateDelta:void 0!==e["local-state-delta"]?e["local-state-delta"].map(c.from_obj_for_encoding):void 0,logs:e.logs,note:e.note,paymentTransaction:void 0!==e["payment-transaction"]?ne.from_obj_for_encoding(e["payment-transaction"]):void 0,receiverRewards:e["receiver-rewards"],rekeyTo:e["rekey-to"],roundTime:e["round-time"],senderRewards:e["sender-rewards"],signature:void 0!==e.signature?ie.from_obj_for_encoding(e.signature):void 0,stateProofTransaction:void 0!==e["state-proof-transaction"]?de.from_obj_for_encoding(e["state-proof-transaction"]):void 0,txType:e["tx-type"]})}}class Q extends s.Z{constructor({applicationId:e,accounts:t,applicationArgs:r,approvalProgram:s,clearStateProgram:o,extraProgramPages:i,foreignApps:a,foreignAssets:c,globalStateSchema:u,localStateSchema:d,onCompletion:l}){super(),this.applicationId=e,this.accounts=t,this.applicationArgs=r,this.approvalProgram="string"==typeof s?new Uint8Array(n.from(s,"base64")):s,this.clearStateProgram="string"==typeof o?new Uint8Array(n.from(o,"base64")):o,this.extraProgramPages=i,this.foreignApps=a,this.foreignAssets=c,this.globalStateSchema=u,this.localStateSchema=d,this.onCompletion=l,this.attribute_map={applicationId:"application-id",accounts:"accounts",applicationArgs:"application-args",approvalProgram:"approval-program",clearStateProgram:"clear-state-program",extraProgramPages:"extra-program-pages",foreignApps:"foreign-apps",foreignAssets:"foreign-assets",globalStateSchema:"global-state-schema",localStateSchema:"local-state-schema",onCompletion:"on-completion"}}static from_obj_for_encoding(e){if(void 0===e["application-id"])throw new Error(`Response is missing required field 'application-id': ${e}`);return new Q({applicationId:e["application-id"],accounts:e.accounts,applicationArgs:e["application-args"],approvalProgram:e["approval-program"],clearStateProgram:e["clear-state-program"],extraProgramPages:e["extra-program-pages"],foreignApps:e["foreign-apps"],foreignAssets:e["foreign-assets"],globalStateSchema:void 0!==e["global-state-schema"]?Z.from_obj_for_encoding(e["global-state-schema"]):void 0,localStateSchema:void 0!==e["local-state-schema"]?Z.from_obj_for_encoding(e["local-state-schema"]):void 0,onCompletion:e["on-completion"]})}}class ee extends s.Z{constructor({assetId:e,params:t}){super(),this.assetId=e,this.params=t,this.attribute_map={assetId:"asset-id",params:"params"}}static from_obj_for_encoding(e){return new ee({assetId:e["asset-id"],params:void 0!==e.params?_.from_obj_for_encoding(e.params):void 0})}}class te extends s.Z{constructor({address:e,assetId:t,newFreezeStatus:r}){super(),this.address=e,this.assetId=t,this.newFreezeStatus=r,this.attribute_map={address:"address",assetId:"asset-id",newFreezeStatus:"new-freeze-status"}}static from_obj_for_encoding(e){if(void 0===e.address)throw new Error(`Response is missing required field 'address': ${e}`);if(void 0===e["asset-id"])throw new Error(`Response is missing required field 'asset-id': ${e}`);if(void 0===e["new-freeze-status"])throw new Error(`Response is missing required field 'new-freeze-status': ${e}`);return new te({address:e.address,assetId:e["asset-id"],newFreezeStatus:e["new-freeze-status"]})}}class re extends s.Z{constructor({amount:e,assetId:t,receiver:r,closeAmount:s,closeTo:n,sender:o}){super(),this.amount=e,this.assetId=t,this.receiver=r,this.closeAmount=s,this.closeTo=n,this.sender=o,this.attribute_map={amount:"amount",assetId:"asset-id",receiver:"receiver",closeAmount:"close-amount",closeTo:"close-to",sender:"sender"}}static from_obj_for_encoding(e){if(void 0===e.amount)throw new Error(`Response is missing required field 'amount': ${e}`);if(void 0===e["asset-id"])throw new Error(`Response is missing required field 'asset-id': ${e}`);if(void 0===e.receiver)throw new Error(`Response is missing required field 'receiver': ${e}`);return new re({amount:e.amount,assetId:e["asset-id"],receiver:e.receiver,closeAmount:e["close-amount"],closeTo:e["close-to"],sender:e.sender})}}class se extends s.Z{constructor({nonParticipation:e,selectionParticipationKey:t,stateProofKey:r,voteFirstValid:s,voteKeyDilution:o,voteLastValid:i,voteParticipationKey:a}){super(),this.nonParticipation=e,this.selectionParticipationKey="string"==typeof t?new Uint8Array(n.from(t,"base64")):t,this.stateProofKey="string"==typeof r?new Uint8Array(n.from(r,"base64")):r,this.voteFirstValid=s,this.voteKeyDilution=o,this.voteLastValid=i,this.voteParticipationKey="string"==typeof a?new Uint8Array(n.from(a,"base64")):a,this.attribute_map={nonParticipation:"non-participation",selectionParticipationKey:"selection-participation-key",stateProofKey:"state-proof-key",voteFirstValid:"vote-first-valid",voteKeyDilution:"vote-key-dilution",voteLastValid:"vote-last-valid",voteParticipationKey:"vote-participation-key"}}static from_obj_for_encoding(e){return new se({nonParticipation:e["non-participation"],selectionParticipationKey:e["selection-participation-key"],stateProofKey:e["state-proof-key"],voteFirstValid:e["vote-first-valid"],voteKeyDilution:e["vote-key-dilution"],voteLastValid:e["vote-last-valid"],voteParticipationKey:e["vote-participation-key"]})}}class ne extends s.Z{constructor({amount:e,receiver:t,closeAmount:r,closeRemainderTo:s}){super(),this.amount=e,this.receiver=t,this.closeAmount=r,this.closeRemainderTo=s,this.attribute_map={amount:"amount",receiver:"receiver",closeAmount:"close-amount",closeRemainderTo:"close-remainder-to"}}static from_obj_for_encoding(e){if(void 0===e.amount)throw new Error(`Response is missing required field 'amount': ${e}`);if(void 0===e.receiver)throw new Error(`Response is missing required field 'receiver': ${e}`);return new ne({amount:e.amount,receiver:e.receiver,closeAmount:e["close-amount"],closeRemainderTo:e["close-remainder-to"]})}}class oe extends s.Z{constructor({currentRound:e,transaction:t}){super(),this.currentRound=e,this.transaction=t,this.attribute_map={currentRound:"current-round",transaction:"transaction"}}static from_obj_for_encoding(e){if(void 0===e["current-round"])throw new Error(`Response is missing required field 'current-round': ${e}`);if(void 0===e.transaction)throw new Error(`Response is missing required field 'transaction': ${e}`);return new oe({currentRound:e["current-round"],transaction:J.from_obj_for_encoding(e.transaction)})}}class ie extends s.Z{constructor({logicsig:e,multisig:t,sig:r}){super(),this.logicsig=e,this.multisig=t,this.sig="string"==typeof r?new Uint8Array(n.from(r,"base64")):r,this.attribute_map={logicsig:"logicsig",multisig:"multisig",sig:"sig"}}static from_obj_for_encoding(e){return new ie({logicsig:void 0!==e.logicsig?ae.from_obj_for_encoding(e.logicsig):void 0,multisig:void 0!==e.multisig?ce.from_obj_for_encoding(e.multisig):void 0,sig:e.sig})}}class ae extends s.Z{constructor({logic:e,args:t,multisigSignature:r,signature:s}){super(),this.logic="string"==typeof e?new Uint8Array(n.from(e,"base64")):e,this.args=t,this.multisigSignature=r,this.signature="string"==typeof s?new Uint8Array(n.from(s,"base64")):s,this.attribute_map={logic:"logic",args:"args",multisigSignature:"multisig-signature",signature:"signature"}}static from_obj_for_encoding(e){if(void 0===e.logic)throw new Error(`Response is missing required field 'logic': ${e}`);return new ae({logic:e.logic,args:e.args,multisigSignature:void 0!==e["multisig-signature"]?ce.from_obj_for_encoding(e["multisig-signature"]):void 0,signature:e.signature})}}class ce extends s.Z{constructor({subsignature:e,threshold:t,version:r}){super(),this.subsignature=e,this.threshold=t,this.version=r,this.attribute_map={subsignature:"subsignature",threshold:"threshold",version:"version"}}static from_obj_for_encoding(e){return new ce({subsignature:void 0!==e.subsignature?e.subsignature.map(ue.from_obj_for_encoding):void 0,threshold:e.threshold,version:e.version})}}class ue extends s.Z{constructor({publicKey:e,signature:t}){super(),this.publicKey="string"==typeof e?new Uint8Array(n.from(e,"base64")):e,this.signature="string"==typeof t?new Uint8Array(n.from(t,"base64")):t,this.attribute_map={publicKey:"public-key",signature:"signature"}}static from_obj_for_encoding(e){return new ue({publicKey:e["public-key"],signature:e.signature})}}class de extends s.Z{constructor({message:e,stateProof:t,stateProofType:r}){super(),this.message=e,this.stateProof=t,this.stateProofType=r,this.attribute_map={message:"message",stateProof:"state-proof",stateProofType:"state-proof-type"}}static from_obj_for_encoding(e){return new de({message:void 0!==e.message?F.from_obj_for_encoding(e.message):void 0,stateProof:void 0!==e["state-proof"]?M.from_obj_for_encoding(e["state-proof"]):void 0,stateProofType:e["state-proof-type"]})}}class le extends s.Z{constructor({currentRound:e,transactions:t,nextToken:r}){super(),this.currentRound=e,this.transactions=t,this.nextToken=r,this.attribute_map={currentRound:"current-round",transactions:"transactions",nextToken:"next-token"}}static from_obj_for_encoding(e){if(void 0===e["current-round"])throw new Error(`Response is missing required field 'current-round': ${e}`);if(!Array.isArray(e.transactions))throw new Error(`Response is missing required array field 'transactions': ${e}`);return new le({currentRound:e["current-round"],transactions:e.transactions.map(J.from_obj_for_encoding),nextToken:e["next-token"]})}}},8680:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});var s=r(7197);class n{constructor(e,t){this.c=e,this.query={},this.intDecoding=t||s.Z.DEFAULT}prepare(e){return e}async do(e={}){const t={};"default"!==this.intDecoding&&(t.intDecoding=this.intDecoding);const r=await this.c.get(this.path(),this.query,e,t);return this.prepare(r.body)}async doRaw(e={}){return(await this.c.get(this.path(),this.query,e,{},!1)).body}setIntDecoding(e){if("default"!==e&&"safe"!==e&&"mixed"!==e&&"bigint"!==e)throw new Error(`Invalid method for int decoding: ${e}`);return this.intDecoding=e,this}}},3480:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var s=r(1113),n=r(7197);class o{constructor(e,t,r,o,i={}){if("function"==typeof t.get)this.c=new s.default(t);else{let n;n="string"==typeof t?function(e="",t){const r={};return r[t]=e,r}(t,e):t,this.c=new s.default(n,r,o,i)}this.intDecoding=n.Z.DEFAULT}setIntEncoding(e){this.intDecoding=e}getIntEncoding(){return this.intDecoding}}},3458:(e,t,r)=>{"use strict";r.d(t,{A:()=>f,b:()=>h});var s=r(7677),n=r(5592),o=r(1988),i=r(1063),a=r(5062),c=r(834),u=r(1624),d=r(2486).lW;const l=d.from([21,31,124,117]);var h;function p(e,t,r){if(null!=r&&e===r)return 0;const s=null==r?0:1;for(let r=0;r<t.length;r++)if(e===t[r])return r+s;return t.push(e),t.length-1+s}!function(e){e[e.BUILDING=0]="BUILDING",e[e.BUILT=1]="BUILT",e[e.SIGNED=2]="SIGNED",e[e.SUBMITTED=3]="SUBMITTED",e[e.COMMITTED=4]="COMMITTED"}(h||(h={}));class f{constructor(){this.status=h.BUILDING,this.transactions=[],this.methodCalls=new Map,this.signedTxns=[],this.txIDs=[]}getStatus(){return this.status}count(){return this.transactions.length}clone(){const e=new f;return e.transactions=this.transactions.map((({txn:e,signer:t})=>({txn:n.Transaction.from_obj_for_encoding({...e.get_obj_for_encoding(),grp:void 0}),signer:t}))),e.methodCalls=new Map(this.methodCalls),e}addTransaction(e){if(this.status!==h.BUILDING)throw new Error("Cannot add transactions when composer status is not BUILDING");if(this.transactions.length===f.MAX_GROUP_SIZE)throw new Error(`Adding an additional transaction exceeds the maximum atomic group size of ${f.MAX_GROUP_SIZE}`);if(e.txn.group&&e.txn.group.some((e=>0!==e)))throw new Error("Cannot add a transaction with nonzero group ID");this.transactions.push(e)}addMethodCall({appID:e,method:t,methodArgs:r,sender:n,suggestedParams:i,onComplete:a,approvalProgram:d,clearProgram:l,numGlobalInts:g,numGlobalByteSlices:m,numLocalInts:y,numLocalByteSlices:b,extraPages:w,boxes:A,note:v,lease:x,rekeyTo:_,signer:S}){if(this.status!==h.BUILDING)throw new Error("Cannot add transactions when composer status is not BUILDING");if(this.transactions.length+t.txnCount()>f.MAX_GROUP_SIZE)throw new Error(`Adding additional transactions exceeds the maximum atomic group size of ${f.MAX_GROUP_SIZE}`);if(0===e){if(null==d||null==l||null==g||null==m||null==y||null==b)throw new Error("One of the following required parameters for application creation is missing: approvalProgram, clearProgram, numGlobalInts, numGlobalByteSlices, numLocalInts, numLocalByteSlices")}else if(a===u.hq.UpdateApplicationOC){if(null==d||null==l)throw new Error("One of the following required parameters for OnApplicationComplete.UpdateApplicationOC is missing: approvalProgram, clearProgram");if(null!=g||null!=m||null!=y||null!=b||null!=w)throw new Error("One of the following application creation parameters were set on a non-creation call: numGlobalInts, numGlobalByteSlices, numLocalInts, numLocalByteSlices, extraPages")}else if(null!=d||null!=l||null!=g||null!=m||null!=y||null!=b||null!=w)throw new Error("One of the following application creation parameters were set on a non-creation call: approvalProgram, clearProgram, numGlobalInts, numGlobalByteSlices, numLocalInts, numLocalByteSlices, extraPages");if(null==r&&(r=[]),r.length!==t.args.length)throw new Error(`Incorrect number of method arguments. Expected ${t.args.length}, got ${r.length}`);let E=[],T=[];const R=[],B=[],k=[],U=new Map,I=A||[];for(let e=0;e<r.length;e++){let n=t.args[e].type;const o=r[e];if((0,s.AE)(n)){if(!(0,c.Xw)(o)||!(0,s.vJ)(n,o.txn))throw new Error(`Expected ${n} transaction for argument at index ${e}`);if(o.txn.group&&o.txn.group.some((e=>0!==e)))throw new Error("Cannot add a transaction with nonzero group ID");R.push(o)}else{if((0,c.Xw)(o))throw new Error(`Expected non-transaction value for argument at index ${e}`);if((0,s.o5)(n)&&(U.set(B.length,E.length),B.push(n),k.push(o),n=new s.Pu(8)),"string"==typeof n)throw new Error(`Unknown ABI type: ${n}`);E.push(n),T.push(o)}}const C=[],D=[],P=[],N=[];for(let t=0;t<B.length;t++){const r=B[t],o=k[t];let i=0;switch(r){case s.UV.account:{const e=new s.JQ;i=p(e.decode(e.encode(o)),D,n);break}case s.UV.application:{const t=new s.Pu(64),r=t.decode(t.encode(o));if(r>Number.MAX_SAFE_INTEGER)throw new Error(`Expected safe integer for application value, got ${r}`);i=p(Number(r),P,e);break}case s.UV.asset:{const e=new s.Pu(64),t=e.decode(e.encode(o));if(t>Number.MAX_SAFE_INTEGER)throw new Error(`Expected safe integer for asset value, got ${t}`);i=p(Number(t),N);break}default:throw new Error(`Unknown reference type: ${r}`)}C.push(i)}for(let e=0;e<C.length;e++)T[U.get(e)]=C[e];if(E.length>15){const e=E.slice(14),t=T.slice(14);E=E.slice(0,14),T=T.slice(0,14),E.push(new s.w1(e)),T.push(t)}const O=[t.getSelector()];for(let e=0;e<E.length;e++)O.push(E[e].encode(T[e]));const L={txn:(0,o.makeApplicationCallTxnFromObject)({from:n,appIndex:e,appArgs:O,accounts:D,foreignApps:P,foreignAssets:N,boxes:I,onComplete:null==a?u.hq.NoOpOC:a,approvalProgram:d,clearProgram:l,numGlobalInts:g,numGlobalByteSlices:m,numLocalInts:y,numLocalByteSlices:b,extraPages:w,lease:x,note:v,rekeyTo:_,suggestedParams:i}),signer:S};this.transactions.push(...R,L),this.methodCalls.set(this.transactions.length-1,t)}buildGroup(){if(this.status===h.BUILDING){if(0===this.transactions.length)throw new Error("Cannot build a group with 0 transactions");this.transactions.length>1&&(0,i.assignGroupID)(this.transactions.map((e=>e.txn))),this.status=h.BUILT}return this.transactions}async gatherSignatures(){if(this.status>=h.SIGNED)return this.signedTxns;const e=this.buildGroup(),t=e.map((e=>e.txn)),r=new Map;for(let t=0;t<e.length;t++){const{signer:s}=e[t];r.has(s)||r.set(s,[]),r.get(s).push(t)}const s=Array.from(r),o=await Promise.all(s.map((([e,r])=>e(t,r)))),i=e.map((()=>null));for(let e=0;e<s.length;e++){const t=s[e][1],r=o[e];for(let e=0;e<t.length;e++)i[t[e]]=r[e]}if(!i.every((e=>null!=e)))throw new Error(`Missing signatures. Got ${i}`);const a=i.map(((e,t)=>{try{return(0,n.decodeSignedTransaction)(e).txn.txID()}catch(e){throw new Error(`Cannot decode signed transaction at index ${t}. ${e}`)}}));return this.signedTxns=i,this.txIDs=a,this.status=h.SIGNED,i}async submit(e){if(this.status>h.SUBMITTED)throw new Error("Transaction group cannot be resubmitted");const t=await this.gatherSignatures();return await e.sendRawTransaction(t).do(),this.status=h.SUBMITTED,this.txIDs}async execute(e,t){if(this.status===h.COMMITTED)throw new Error("Transaction group has already been executed successfully");const r=await this.submit(e);this.status=h.SUBMITTED;const s=this.transactions.findIndex(((e,t)=>this.methodCalls.has(t))),n=-1===s?0:s,o=await(0,a.K)(e,r[n],t);this.status=h.COMMITTED;const i=o["confirmed-round"],c=[];for(const[t,n]of this.methodCalls){const i=r[t],a={txID:i,rawReturnValue:new Uint8Array,method:n};try{const r=t===s?o:await e.pendingTransactionInformation(i).do();if(a.txInfo=r,"void"!==n.returns.type){const e=r.logs||[];if(0===e.length)throw new Error("App call transaction did not log a return value");const t=d.from(e[e.length-1],"base64");if(t.byteLength<4||!t.slice(0,4).equals(l))throw new Error("App call transaction did not log a return value");a.rawReturnValue=new Uint8Array(t.slice(4)),a.returnValue=n.returns.type.decode(a.rawReturnValue)}}catch(e){a.decodeError=e}c.push(a)}return{confirmedRound:i,txIDs:r,methodResults:c}}}f.MAX_GROUP_SIZE=16},9070:(e,t,r)=>{"use strict";r.d(t,{HN:()=>i,_:()=>o,rD:()=>n});const s=1e6,n="Microalgos should be positive and less than 2^53 - 1.";function o(e){if(e<0||!Number.isSafeInteger(e))throw new Error(n);return e/s}function i(e){const t=e*s;return Math.round(t)}},4383:(e,t,r)=>{"use strict";r.d(t,{P:()=>c,x:()=>m});var s=r(1685),n=r(1824),o=r(7116),i=r(2486).lW;function a(e){return e.params["approval-program"]=i.from(e.params["approval-program"].toString(),"base64"),e.params["clear-state-program"]=i.from(e.params["clear-state-program"].toString(),"base64"),e}async function c({client:e,txns:t,protocolVersion:r,latestTimestamp:i,round:c,sources:u}){const d=[],l=[],h=[],p=[],f=[];for(const e of t)e.txn.type===n.i.appl&&(f.push((0,o.encodeAddress)(e.txn.from.publicKey)),e.txn.appAccounts&&f.push(...e.txn.appAccounts.map((e=>(0,o.encodeAddress)(e.publicKey)))),e.txn.appForeignApps&&(h.push(...e.txn.appForeignApps),f.push(...e.txn.appForeignApps.map((e=>(0,o.getApplicationAddress)(e))))),e.txn.appForeignAssets&&p.push(...e.txn.appForeignAssets),void 0===e.txn.appIndex||0===e.txn.appIndex?d.push(new s.Application(1380011588,new s.ApplicationParams({creator:(0,o.encodeAddress)(e.txn.from.publicKey),approvalProgram:e.txn.appApprovalProgram,clearStateProgram:e.txn.appClearProgram,localStateSchema:new s.ApplicationStateSchema(e.txn.appLocalInts,e.txn.appLocalByteSlices),globalStateSchema:new s.ApplicationStateSchema(e.txn.appGlobalInts,e.txn.appGlobalByteSlices)}))):(h.push(e.txn.appIndex),f.push((0,o.getApplicationAddress)(e.txn.appIndex))));const g=[];for(const t of[...new Set(p)])g.push(e.getAssetByID(t).do().then((e=>{f.push(e.params.creator)})));await Promise.all(g);const m=[];for(const t of[...new Set(h)])m.push(e.getApplicationByID(t).do().then((e=>{const t=a(e);d.push(t),f.push(t.params.creator)})));await Promise.all(m);const y=[];for(const t of[...new Set(f)])y.push(e.accountInformation(t).do().then((e=>{"created-apps"in e&&(e["created-apps"]=e["created-apps"].map((e=>a(e)))),l.push(e)})));return await Promise.all(y),new s.DryrunRequest({txns:t.map((e=>({...e,txn:e.txn.get_obj_for_encoding()}))),accounts:l,apps:d,latestTimestamp:i,round:c,protocolVersion:r,sources:u})}class u{constructor(e){this.type=0,this.bytes="",this.uint=0,this.type=e.type,this.bytes=e.bytes,this.uint=e.uint}toString(){return 1===this.type?`0x${i.from(this.bytes,"base64").toString("hex")}`:this.uint.toString()}}class d{constructor(e){this.error="",this.line=0,this.pc=0,this.scratch=[],this.stack=[],this.error=void 0===e.error?"":e.error,this.line=e.line,this.pc=e.pc,this.scratch=e.scratch,this.stack=e.stack.map((e=>new u(e)))}}class l{constructor(e){this.trace=[],null!=e&&(this.trace=e.map((e=>new d(e))))}}function h(e,t){return e.length>t&&t>0?`${e.slice(0,t)}...`:e}function p(e,t){if(0===t.length)return"";let r=null;for(let s=0;s<t.length;s++)(s>e.length||JSON.stringify(e[s])!==JSON.stringify(t[s]))&&(r=s);if(null==r)return"";const s=t[r];return s.bytes.length>0?`${r} = 0x${i.from(s.bytes,"base64").toString("hex")}`:`${r} = ${s.uint.toString()}`}function f(e,t){return`[${(t?e.reverse():e).map((e=>{switch(e.type){case 1:return`0x${i.from(e.bytes,"base64").toString("hex")}`;case 2:return`${e.uint.toString()}`;default:return""}})).join(", ")}]`}class g{constructor(e){this.disassembly=[],this.appCallMessages=[],this.localDeltas=[],this.globalDelta=[],this.cost=0,this.logicSigMessages=[],this.logicSigDisassembly=[],this.logs=[],this.appCallTrace=void 0,this.logicSigTrace=void 0,this.required=["disassembly"],this.optionals=["app-call-messages","local-deltas","global-delta","cost","logic-sig-messages","logic-sig-disassembly","logs"],this.traces=["app-call-trace","logic-sig-trace"],this.disassembly=e.disassembly,this.appCallMessages=e["app-call-messages"],this.localDeltas=e["local-deltas"],this.globalDelta=e["global-delta"],this.cost=e.cost,this.logicSigMessages=e["logic-sig-messages"],this.logicSigDisassembly=e["logic-sig-disassembly"],this.logs=e.logs,this.appCallTrace=new l(e["app-call-trace"]),this.logicSigTrace=new l(e["logic-sig-trace"])}appCallRejected(){return void 0!==this.appCallMessages&&this.appCallMessages.includes("REJECT")}logicSigRejected(){return void 0!==this.logicSigMessages&&this.logicSigMessages.includes("REJECT")}static trace(e,t,r){const s=r.maxValueWidth||30,n=[["pc#","ln#","source","scratch","stack"]];for(let o=0;o<e.trace.length;o++){const{line:i,error:a,pc:c,scratch:u,stack:d}=e.trace[o],l=void 0!==u?u:[],g=o>0&&void 0!==e.trace[o-1].scratch?e.trace[o-1].scratch:[],m=""===a?t[i]:`!! ${a} !!`;n.push([c.toString().padEnd(3," "),i.toString().padEnd(3," "),h(m,s),h(p(g,l),s),h(f(d,r.topOfStackFirst),s)])}const o=n.reduce(((e,t)=>{const r=new Array(n[0].length).fill(0);for(let s=0;s<e.length;s++)r[s]=t[s].length>e[s]?t[s].length:e[s];return r}),new Array(n[0].length).fill(0));return`${n.map((e=>e.map(((e,t)=>e.padEnd(o[t]+1," "))).join("|").trim())).join("\n")}\n`}appTrace(e){if(void 0===this.appCallTrace||!this.disassembly)return"";let t=e;return void 0===e&&(t={maxValueWidth:30,topOfStackFirst:!1}),g.trace(this.appCallTrace,this.disassembly,t)}lsigTrace(e){if(void 0===this.logicSigTrace||void 0===this.logicSigDisassembly)return"";let t=e;return void 0===e&&(t={maxValueWidth:30,topOfStackFirst:!0}),g.trace(this.logicSigTrace,this.logicSigDisassembly,t)}}class m{constructor(e){this.error="",this.protocolVersion="",this.txns=[],this.error=e.error,this.protocolVersion=e["protocol-version"],this.txns=e.txns.map((e=>new g(e)))}}},7116:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ALGORAND_ZERO_ADDRESS_STRING:()=>u,CHECKSUM_ADDRESS_ERROR_MSG:()=>p,INVALID_MSIG_PK_ERROR_MSG:()=>m,INVALID_MSIG_THRESHOLD_ERROR_MSG:()=>g,INVALID_MSIG_VERSION_ERROR_MSG:()=>f,MALFORMED_ADDRESS_ERROR_MSG:()=>h,UNEXPECTED_PK_LEN_ERROR_MSG:()=>y,decodeAddress:()=>b,encodeAddress:()=>A,fromMultisigPreImg:()=>v,fromMultisigPreImgAddrs:()=>x,getApplicationAddress:()=>_,isValidAddress:()=>w});var s=r(7267),n=r.n(s),o=r(9404),i=r(413),a=r(6963),c=r(2486).lW;const u="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ",d=new Uint8Array([77,117,108,116,105,115,105,103,65,100,100,114]),l=c.from("appID"),h="address seems to be malformed",p="wrong checksum for address",f="invalid multisig version",g="bad multisig threshold",m="bad multisig public key - wrong length",y="nacl public key length is not 32 bytes";function b(e){if("string"!=typeof e||58!==e.length)throw new Error(h);const t=n().decode.asBytes(e.toString());if(36!==t.length)throw new Error(h);const r=new Uint8Array(t.slice(0,32)),s=new Uint8Array(t.slice(o.PUBLIC_KEY_LENGTH,36)),a=o.genericHash(r).slice(o.HASH_BYTES_LENGTH-4,o.HASH_BYTES_LENGTH);if(!i.arrayEqual(a,s))throw new Error(p);return{publicKey:r,checksum:s}}function w(e){try{b(e)}catch(e){return!1}return!0}function A(e){const t=o.genericHash(e).slice(o.PUBLIC_KEY_LENGTH-4,o.PUBLIC_KEY_LENGTH);return n().encode(i.concatArrays(e,t)).toString().slice(0,58)}function v({version:e,threshold:t,pks:r}){if(1!==e||e>255||e<0)throw new Error(f);if(0===t||0===r.length||t>r.length||t>255)throw new Error(g);if(32!==o.PUBLIC_KEY_LENGTH)throw new Error(y);const s=new Uint8Array(d.length+2+32*r.length);s.set(d,0),s.set([e],d.length),s.set([t],d.length+1);for(let e=0;e<r.length;e++){if(32!==r[e].length)throw new Error(m);s.set(r[e],d.length+2+32*e)}return new Uint8Array(o.genericHash(s))}function x({version:e,threshold:t,addrs:r}){return A(v({version:e,threshold:t,pks:r.map((e=>b(e).publicKey))}))}function _(e){const t=i.concatArrays(l,(0,a.T)(e)),r=o.genericHash(t);return A(new Uint8Array(r))}},8922:(e,t,r)=>{"use strict";r.d(t,{j:()=>n,v:()=>o});var s=r(2486).lW;function n(e,t){let r=e.toString(16);r.length!==2*t&&(r=r.padStart(2*t,"0"));const s=new Uint8Array(r.length/2);for(let e=0,t=0;e<r.length/2;e++,t+=2)s[e]=parseInt(r.slice(t,t+2),16);return s}function o(e){let t=BigInt(0);const r=s.from(e);for(let s=0;s<e.length;s++)t=BigInt(Number(r.readUIntBE(s,1)))+t*BigInt(256);return t}},3033:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ERROR_CONTAINS_EMPTY_STRING:()=>n,decode:()=>i,encode:()=>o});var s=r(5406);const n="The object contains empty or 0 values. First empty or 0 value encountered during encoding: ";function o(e){const t=function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&(!e[t]||0===e[t].length))return{containsEmpty:!0,firstEmptyKey:t};return{containsEmpty:!1,firstEmptyKey:void 0}}(e);if(t.containsEmpty)throw new Error(n+t.firstEmptyKey);return s.encode(e,{sortKeys:!0})}function i(e){return s.decode(e)}},6963:(e,t,r)=>{"use strict";r.d(t,{T:()=>n,u:()=>o});var s=r(2486).lW;function n(e){if("bigint"!=typeof e&&!Number.isInteger(e)||e<0||e>BigInt("0xffffffffffffffff"))throw new Error("Input is not a 64-bit unsigned integer");const t=s.allocUnsafe(8);return t.writeBigUInt64BE(BigInt(e)),new Uint8Array(t)}function o(e,t="safe"){if("safe"!==t&&"mixed"!==t&&"bigint"!==t)throw new Error(`Unknown decodingMode option: ${t}`);if(0===e.byteLength||e.byteLength>8)throw new Error(`Data has unacceptable length. Expected length is between 1 and 8, got ${e.byteLength}`);const r=s.allocUnsafe(8-e.byteLength);r.fill(0);const n=s.concat([r,s.from(e)]).readBigUInt64BE(),o=n>Number.MAX_SAFE_INTEGER;if("safe"===t){if(o)throw new Error(`Integer exceeds maximum safe integer: ${n.toString()}. Try decoding with "mixed" or "safe" decodingMode.`);return Number(n)}return"mixed"!==t||o?n:Number(n)}},1063:(e,t,r)=>{"use strict";r.r(t),r.d(t,{TxGroup:()=>u,assignGroupID:()=>l,computeGroupID:()=>d,default:()=>h});var s=r(5592),n=r(9404),o=r(3033),i=r(7116),a=r(413),c=r(2486).lW;class u{constructor(e){if(this.name="Transaction group",this.tag=c.from("TG"),e.length>16){const t=`${e.length.toString()} transactions grouped together but max group size is ${16..toString()}`;throw Error(t)}this.txGroupHashes=e}get_obj_for_encoding(){return{txlist:this.txGroupHashes}}static from_obj_for_encoding(e){const t=Object.create(this.prototype);t.name="Transaction group",t.tag=c.from("TG"),t.txGroupHashes=[];for(const r of e.txlist)t.txGroupHashes.push(c.from(r));return t}toByte(){return o.encode(this.get_obj_for_encoding())}}function d(e){const t=[];for(const r of e){const e=s.instantiateTxnIfNeeded(r);t.push(e.rawTxID())}const r=new u(t),o=r.toByte(),i=c.from(a.concatArrays(r.tag,o)),d=n.genericHash(i);return c.from(d)}function l(e,t){const r=d(e),n=[];for(const o of e){const e=s.instantiateTxnIfNeeded(o);t&&i.encodeAddress(e.from.publicKey)!==t||(e.group=r,n.push(e))}return n}const h=u},568:(e,t,r)=>{"use strict";r.r(t),r.d(t,{checkByteConstBlock:()=>p,checkIntConstBlock:()=>h,checkProgram:()=>l,checkPushByteOp:()=>g,checkPushIntOp:()=>f,langspecEvalMaxVersion:()=>m,langspecLogicSigVersion:()=>y,parseUvarint:()=>o,readProgram:()=>d});const s=JSON.parse('{"z_":6,"BV":5,"AP":[{"Opcode":0,"Name":"err","Cost":1,"Size":1,"Doc":"Fail immediately.","Groups":["Flow Control"]},{"Opcode":1,"Name":"sha256","Args":"B","Returns":"B","Cost":35,"Size":1,"Doc":"SHA256 hash of value A, yields [32]byte","Groups":["Arithmetic"]},{"Opcode":2,"Name":"keccak256","Args":"B","Returns":"B","Cost":130,"Size":1,"Doc":"Keccak256 hash of value A, yields [32]byte","Groups":["Arithmetic"]},{"Opcode":3,"Name":"sha512_256","Args":"B","Returns":"B","Cost":45,"Size":1,"Doc":"SHA512_256 hash of value A, 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":5,"Name":"ecdsa_verify","Args":"BBBBB","Returns":"U","Cost":1700,"Size":2,"Doc":"for (data A, signature B, C and pubkey D, E) verify the signature of the data against the pubkey => {0 or 1}","DocExtra":"The 32 byte Y-component of a public key is the last element on the stack, preceded by X-component of a pubkey, preceded by S and R components of a signature, preceded by the data that is fifth element on the stack. All values are big-endian encoded. The signed data must be 32 bytes long, and signatures in lower-S form are only accepted.","ImmediateNote":"{uint8 curve index}","Groups":["Arithmetic"]},{"Opcode":6,"Name":"ecdsa_pk_decompress","Args":"B","Returns":"BB","Cost":650,"Size":2,"Doc":"decompress pubkey A into components X, Y","DocExtra":"The 33 byte public key in a compressed form to be decompressed into X and Y (top) components. All values are big-endian encoded.","ImmediateNote":"{uint8 curve index}","Groups":["Arithmetic"]},{"Opcode":7,"Name":"ecdsa_pk_recover","Args":"BUBB","Returns":"BB","Cost":2000,"Size":2,"Doc":"for (data A, recovery id B, signature C, D) recover a public key","DocExtra":"S (top) and R elements of a signature, recovery id and data (bottom) are expected on the stack and used to deriver a public key. All values are big-endian encoded. The signed data must be 32 bytes long.","ImmediateNote":"{uint8 curve index}","Groups":["Arithmetic"]},{"Opcode":8,"Name":"+","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A plus B. Fail on overflow.","DocExtra":"Overflow is an error condition which halts execution and fails the transaction. Full precision is available from `addw`.","Groups":["Arithmetic"]},{"Opcode":9,"Name":"-","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A minus B. Fail if B > A.","Groups":["Arithmetic"]},{"Opcode":10,"Name":"/","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A divided by B (truncated division). Fail if B == 0.","DocExtra":"`divmodw` is available to divide the two-element values produced by `mulw` and `addw`.","Groups":["Arithmetic"]},{"Opcode":11,"Name":"*","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A times B. Fail 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":"A == 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 A","Groups":["Arithmetic"]},{"Opcode":22,"Name":"itob","Args":"U","Returns":"B","Cost":1,"Size":1,"Doc":"converts uint64 A to big endian bytes","Groups":["Arithmetic"]},{"Opcode":23,"Name":"btoi","Args":"B","Returns":"U","Cost":1,"Size":1,"Doc":"converts bytes A as big endian to uint64","DocExtra":"`btoi` fails 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. Fail 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 A","Groups":["Arithmetic"]},{"Opcode":29,"Name":"mulw","Args":"UU","Returns":"UU","Cost":1,"Size":1,"Doc":"A times B as a 128-bit result in two uint64s. X is the high 64 bits, Y is the low","Groups":["Arithmetic"]},{"Opcode":30,"Name":"addw","Args":"UU","Returns":"UU","Cost":1,"Size":1,"Doc":"A plus B as a 128-bit result. X is the carry-bit, Y is the low-order 64 bits.","Groups":["Arithmetic"]},{"Opcode":31,"Name":"divmodw","Args":"UUUU","Returns":"UUUU","Cost":20,"Size":1,"Doc":"W,X = (A,B / C,D); Y,Z = (A,B modulo C,D)","DocExtra":"The notation J,K indicates that two uint64 values J and K are interpreted as a uint128 value, with J as the high uint64 and K the low.","Groups":["Arithmetic"]},{"Opcode":32,"Name":"intcblock","Cost":1,"Size":0,"Doc":"prepare block of uint64 constants for use by intc","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":"Ith constant from intcblock","ImmediateNote":"{uint8 int constant index}","Groups":["Loading Values"]},{"Opcode":34,"Name":"intc_0","Returns":"U","Cost":1,"Size":1,"Doc":"constant 0 from intcblock","Groups":["Loading Values"]},{"Opcode":35,"Name":"intc_1","Returns":"U","Cost":1,"Size":1,"Doc":"constant 1 from intcblock","Groups":["Loading Values"]},{"Opcode":36,"Name":"intc_2","Returns":"U","Cost":1,"Size":1,"Doc":"constant 2 from intcblock","Groups":["Loading Values"]},{"Opcode":37,"Name":"intc_3","Returns":"U","Cost":1,"Size":1,"Doc":"constant 3 from intcblock","Groups":["Loading Values"]},{"Opcode":38,"Name":"bytecblock","Cost":1,"Size":0,"Doc":"prepare block of byte-array constants for use by bytec","DocExtra":"`bytecblock` loads the following program bytes into an array of byte-array 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":"Ith constant from bytecblock","ImmediateNote":"{uint8 byte constant index}","Groups":["Loading Values"]},{"Opcode":40,"Name":"bytec_0","Returns":"B","Cost":1,"Size":1,"Doc":"constant 0 from bytecblock","Groups":["Loading Values"]},{"Opcode":41,"Name":"bytec_1","Returns":"B","Cost":1,"Size":1,"Doc":"constant 1 from bytecblock","Groups":["Loading Values"]},{"Opcode":42,"Name":"bytec_2","Returns":"B","Cost":1,"Size":1,"Doc":"constant 2 from bytecblock","Groups":["Loading Values"]},{"Opcode":43,"Name":"bytec_3","Returns":"B","Cost":1,"Size":1,"Doc":"constant 3 from bytecblock","Groups":["Loading Values"]},{"Opcode":44,"Name":"arg","Returns":"B","Cost":1,"Size":2,"Doc":"Nth LogicSig argument","ImmediateNote":"{uint8 arg index N}","Groups":["Loading Values"]},{"Opcode":45,"Name":"arg_0","Returns":"B","Cost":1,"Size":1,"Doc":"LogicSig argument 0","Groups":["Loading Values"]},{"Opcode":46,"Name":"arg_1","Returns":"B","Cost":1,"Size":1,"Doc":"LogicSig argument 1","Groups":["Loading Values"]},{"Opcode":47,"Name":"arg_2","Returns":"B","Cost":1,"Size":1,"Doc":"LogicSig argument 2","Groups":["Loading Values"]},{"Opcode":48,"Name":"arg_3","Returns":"B","Cost":1,"Size":1,"Doc":"LogicSig argument 3","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","Assets","NumAssets","Applications","NumApplications","GlobalNumUint","GlobalNumByteSlice","LocalNumUint","LocalNumByteSlice","ExtraProgramPages","Nonparticipation","Logs","NumLogs","CreatedAssetID","CreatedApplicationID","LastLog","StateProofPK"],"ArgEnumTypes":"BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBUUUUUUUUUUUBUUUBB","Doc":"field F of current transaction","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,"Doc":"global field F","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","Assets","NumAssets","Applications","NumApplications","GlobalNumUint","GlobalNumByteSlice","LocalNumUint","LocalNumByteSlice","ExtraProgramPages","Nonparticipation","Logs","NumLogs","CreatedAssetID","CreatedApplicationID","LastLog","StateProofPK"],"ArgEnumTypes":"BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBUUUUUUUUUUUBUUUBB","Doc":"field F of the Tth transaction in the current 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":"Ith scratch space value. All scratch spaces are 0 at program start.","ImmediateNote":"{uint8 position in scratch space to load from}","Groups":["Loading Values"]},{"Opcode":53,"Name":"store","Args":".","Cost":1,"Size":2,"Doc":"store A to the Ith 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","Assets","Applications","Logs"],"ArgEnumTypes":"BBUUB","Doc":"Ith value of the array field F of the current transaction","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","Assets","Applications","Logs"],"ArgEnumTypes":"BBUUB","Doc":"Ith value of the array field F from the Tth transaction in the current group","ImmediateNote":"{uint8 transaction group index} {uint8 transaction field index} {uint8 transaction field array index}","Groups":["Loading Values"]},{"Opcode":56,"Name":"gtxns","Args":"U","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","Assets","NumAssets","Applications","NumApplications","GlobalNumUint","GlobalNumByteSlice","LocalNumUint","LocalNumByteSlice","ExtraProgramPages","Nonparticipation","Logs","NumLogs","CreatedAssetID","CreatedApplicationID","LastLog","StateProofPK"],"ArgEnumTypes":"BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBUUUUUUUUUUUBUUUBB","Doc":"field F of the Ath transaction in the current group","DocExtra":"for notes on transaction fields available, see `txn`. If top of stack is _i_, `gtxns field` is equivalent to `gtxn _i_ field`. gtxns exists so that _i_ can be calculated, often based on the index of the current transaction.","ImmediateNote":"{uint8 transaction field index}","Groups":["Loading Values"]},{"Opcode":57,"Name":"gtxnsa","Args":"U","Returns":".","Cost":1,"Size":3,"ArgEnum":["ApplicationArgs","Accounts","Assets","Applications","Logs"],"ArgEnumTypes":"BBUUB","Doc":"Ith value of the array field F from the Ath transaction in the current group","ImmediateNote":"{uint8 transaction field index} {uint8 transaction field array index}","Groups":["Loading Values"]},{"Opcode":58,"Name":"gload","Returns":".","Cost":1,"Size":3,"Doc":"Ith scratch space value of the Tth transaction in the current group","DocExtra":"`gload` fails unless the requested transaction is an ApplicationCall and T < GroupIndex.","ImmediateNote":"{uint8 transaction group index} {uint8 position in scratch space to load from}","Groups":["Loading Values"]},{"Opcode":59,"Name":"gloads","Args":"U","Returns":".","Cost":1,"Size":2,"Doc":"Ith scratch space value of the Ath transaction in the current group","DocExtra":"`gloads` fails unless the requested transaction is an ApplicationCall and A < GroupIndex.","ImmediateNote":"{uint8 position in scratch space to load from}","Groups":["Loading Values"]},{"Opcode":60,"Name":"gaid","Returns":"U","Cost":1,"Size":2,"Doc":"ID of the asset or application created in the Tth transaction of the current group","DocExtra":"`gaid` fails unless the requested transaction created an asset or application and T < GroupIndex.","ImmediateNote":"{uint8 transaction group index}","Groups":["Loading Values"]},{"Opcode":61,"Name":"gaids","Args":"U","Returns":"U","Cost":1,"Size":1,"Doc":"ID of the asset or application created in the Ath transaction of the current group","DocExtra":"`gaids` fails unless the requested transaction created an asset or application and A < GroupIndex.","Groups":["Loading Values"]},{"Opcode":62,"Name":"loads","Args":"U","Returns":".","Cost":1,"Size":1,"Doc":"Ath scratch space value. All scratch spaces are 0 at program start.","Groups":["Loading Values"]},{"Opcode":63,"Name":"stores","Args":"U.","Cost":1,"Size":1,"Doc":"store B to the Ath scratch space","Groups":["Loading Values"]},{"Opcode":64,"Name":"bnz","Args":"U","Cost":1,"Size":3,"Doc":"branch to TARGET if value A 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 aligned instructions. (e.g. Branching to the second byte of a 2 byte op will be rejected.) Starting at v4, the offset is treated as a signed 16 bit integer allowing for backward branches and looping. In prior version (v1 to v3), branch offsets are limited to forward branches only, 0-0x7fff.\\n\\nAt v2 it became allowed to branch to the end of the program exactly after the last instruction: bnz to byte N (with 0-indexing) was illegal for a TEAL program with N bytes before v2, and is legal after it. This change eliminates the need for a last instruction of no-op as a branch target at the end. (Branching beyond the end--in other words, to a byte larger than N--is still illegal and will cause the program to fail.)","ImmediateNote":"{int16 branch offset, big endian}","Groups":["Flow Control"]},{"Opcode":65,"Name":"bz","Args":"U","Cost":1,"Size":3,"Doc":"branch to TARGET if value A is zero","DocExtra":"See `bnz` for details on how branches work. `bz` inverts the behavior of `bnz`.","ImmediateNote":"{int16 branch offset, big endian}","Groups":["Flow Control"]},{"Opcode":66,"Name":"b","Cost":1,"Size":3,"Doc":"branch unconditionally to TARGET","DocExtra":"See `bnz` for details on how branches work. `b` always jumps to the offset.","ImmediateNote":"{int16 branch offset, big endian}","Groups":["Flow Control"]},{"Opcode":67,"Name":"return","Args":"U","Cost":1,"Size":1,"Doc":"use A as success value; end","Groups":["Flow Control"]},{"Opcode":68,"Name":"assert","Args":"U","Cost":1,"Size":1,"Doc":"immediately fail unless A is a non-zero number","Groups":["Flow Control"]},{"Opcode":72,"Name":"pop","Args":".","Cost":1,"Size":1,"Doc":"discard A","Groups":["Flow Control"]},{"Opcode":73,"Name":"dup","Args":".","Returns":"..","Cost":1,"Size":1,"Doc":"duplicate A","Groups":["Flow Control"]},{"Opcode":74,"Name":"dup2","Args":"..","Returns":"....","Cost":1,"Size":1,"Doc":"duplicate A and B","Groups":["Flow Control"]},{"Opcode":75,"Name":"dig","Args":".","Returns":"..","Cost":1,"Size":2,"Doc":"Nth value from the top of the stack. dig 0 is equivalent to dup","ImmediateNote":"{uint8 depth}","Groups":["Flow Control"]},{"Opcode":76,"Name":"swap","Args":"..","Returns":"..","Cost":1,"Size":1,"Doc":"swaps A and B on stack","Groups":["Flow Control"]},{"Opcode":77,"Name":"select","Args":"..U","Returns":".","Cost":1,"Size":1,"Doc":"selects one of two values based on top-of-stack: B if C != 0, else A","Groups":["Flow Control"]},{"Opcode":78,"Name":"cover","Args":".","Returns":".","Cost":1,"Size":2,"Doc":"remove top of stack, and place it deeper in the stack such that N elements are above it. Fails if stack depth <= N.","ImmediateNote":"{uint8 depth}","Groups":["Flow Control"]},{"Opcode":79,"Name":"uncover","Args":".","Returns":".","Cost":1,"Size":2,"Doc":"remove the value at depth N in the stack and shift above items down so the Nth deep value is on top of the stack. Fails if stack depth <= N.","ImmediateNote":"{uint8 depth}","Groups":["Flow Control"]},{"Opcode":80,"Name":"concat","Args":"BB","Returns":"B","Cost":1,"Size":1,"Doc":"join A and B","DocExtra":"`concat` fails if the result would be greater than 4096 bytes.","Groups":["Arithmetic"]},{"Opcode":81,"Name":"substring","Args":"B","Returns":"B","Cost":1,"Size":3,"Doc":"A range of bytes from A starting at S up to but not including E. If E < S, or either is larger than the array length, the program fails","ImmediateNote":"{uint8 start position} {uint8 end position}","Groups":["Byte Array Manipulation"]},{"Opcode":82,"Name":"substring3","Args":"BUU","Returns":"B","Cost":1,"Size":1,"Doc":"A range of bytes from A starting at B up to but not including C. If C < B, or either is larger than the array length, the program fails","Groups":["Byte Array Manipulation"]},{"Opcode":83,"Name":"getbit","Args":".U","Returns":"U","Cost":1,"Size":1,"Doc":"Bth bit of (byte-array or integer) A.","DocExtra":"see explanation of bit ordering in setbit","Groups":["Arithmetic"]},{"Opcode":84,"Name":"setbit","Args":".UU","Returns":".","Cost":1,"Size":1,"Doc":"Copy of (byte-array or integer) A, with the Bth bit set to (0 or 1) C","DocExtra":"When A is a uint64, index 0 is the least significant bit. Setting bit 3 to 1 on the integer 0 yields 8, or 2^3. When A is a byte array, index 0 is the leftmost bit of the leftmost byte. Setting bits 0 through 11 to 1 in a 4-byte-array of 0s yields the byte array 0xfff00000. Setting bit 3 to 1 on the 1-byte-array 0x00 yields the byte array 0x10.","Groups":["Arithmetic"]},{"Opcode":85,"Name":"getbyte","Args":"BU","Returns":"U","Cost":1,"Size":1,"Doc":"Bth byte of A, as an integer","Groups":["Arithmetic"]},{"Opcode":86,"Name":"setbyte","Args":"BUU","Returns":"B","Cost":1,"Size":1,"Doc":"Copy of A with the Bth byte set to small integer (between 0..255) C","Groups":["Arithmetic"]},{"Opcode":87,"Name":"extract","Args":"B","Returns":"B","Cost":1,"Size":3,"Doc":"A range of bytes from A starting at S up to but not including S+L. If L is 0, then extract to the end of the string. If S or S+L is larger than the array length, the program fails","ImmediateNote":"{uint8 start position} {uint8 length}","Groups":["Byte Array Manipulation"]},{"Opcode":88,"Name":"extract3","Args":"BUU","Returns":"B","Cost":1,"Size":1,"Doc":"A range of bytes from A starting at B up to but not including B+C. If B+C is larger than the array length, the program fails","Groups":["Byte Array Manipulation"]},{"Opcode":89,"Name":"extract_uint16","Args":"BU","Returns":"U","Cost":1,"Size":1,"Doc":"A uint16 formed from a range of big-endian bytes from A starting at B up to but not including B+2. If B+2 is larger than the array length, the program fails","Groups":["Byte Array Manipulation"]},{"Opcode":90,"Name":"extract_uint32","Args":"BU","Returns":"U","Cost":1,"Size":1,"Doc":"A uint32 formed from a range of big-endian bytes from A starting at B up to but not including B+4. If B+4 is larger than the array length, the program fails","Groups":["Byte Array Manipulation"]},{"Opcode":91,"Name":"extract_uint64","Args":"BU","Returns":"U","Cost":1,"Size":1,"Doc":"A uint64 formed from a range of big-endian bytes from A starting at B up to but not including B+8. If B+8 is larger than the array length, the program fails","Groups":["Byte Array Manipulation"]},{"Opcode":96,"Name":"balance","Args":".","Returns":"U","Cost":1,"Size":1,"Doc":"get balance for account A, in microalgos. The balance is observed after the effects of previous transactions in the group, and after the fee for the current transaction is deducted.","DocExtra":"params: Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset). Return: value.","Groups":["State Access"]},{"Opcode":97,"Name":"app_opted_in","Args":".U","Returns":"U","Cost":1,"Size":1,"Doc":"1 if account A is opted in to application B, else 0","DocExtra":"params: Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset). Return: 1 if opted in and 0 otherwise.","Groups":["State Access"]},{"Opcode":98,"Name":"app_local_get","Args":".B","Returns":".","Cost":1,"Size":1,"Doc":"local state of the key B in the current application in account A","DocExtra":"params: Txn.Accounts offset (or, since v4, an _available_ account address), state key. Return: value. The value is zero (of type uint64) if the key does not exist.","Groups":["State Access"]},{"Opcode":99,"Name":"app_local_get_ex","Args":".UB","Returns":".U","Cost":1,"Size":1,"Doc":"X is the local state of application B, key C in account A. Y is 1 if key existed, else 0","DocExtra":"params: Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset), state key. Return: did_exist flag (top of the stack, 1 if the application and key existed and 0 otherwise), value. The value is zero (of type uint64) if the key does not exist.","Groups":["State Access"]},{"Opcode":100,"Name":"app_global_get","Args":"B","Returns":".","Cost":1,"Size":1,"Doc":"global state of the key A in the current application","DocExtra":"params: state key. Return: value. The value is zero (of type uint64) 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":"X is the global state of application A, key B. Y is 1 if key existed, else 0","DocExtra":"params: Txn.ForeignApps offset (or, since v4, an _available_ application id), state key. Return: did_exist flag (top of the stack, 1 if the application and key existed and 0 otherwise), value. The value is zero (of type uint64) if the key does not exist.","Groups":["State Access"]},{"Opcode":102,"Name":"app_local_put","Args":".B.","Cost":1,"Size":1,"Doc":"write C to key B in account A\'s local state of the current application","DocExtra":"params: Txn.Accounts offset (or, since v4, an _available_ account address), state key, value.","Groups":["State Access"]},{"Opcode":103,"Name":"app_global_put","Args":"B.","Cost":1,"Size":1,"Doc":"write B to key A in the global state of the current application","Groups":["State Access"]},{"Opcode":104,"Name":"app_local_del","Args":".B","Cost":1,"Size":1,"Doc":"delete key B from account A\'s local state of the current application","DocExtra":"params: Txn.Accounts offset (or, since v4, an _available_ account address), state key.\\n\\nDeleting a key which is already absent has no effect on the application local state. (In particular, it does _not_ cause the program to fail.)","Groups":["State Access"]},{"Opcode":105,"Name":"app_global_del","Args":"B","Cost":1,"Size":1,"Doc":"delete key A from the global state of the current application","DocExtra":"params: state key.\\n\\nDeleting a key which is already absent has no effect on the application global state. (In particular, it does _not_ cause the program to fail.)","Groups":["State Access"]},{"Opcode":112,"Name":"asset_holding_get","Args":".U","Returns":".U","Cost":1,"Size":2,"ArgEnum":["AssetBalance","AssetFrozen"],"ArgEnumTypes":"UU","Doc":"X is field F from account A\'s holding of asset B. Y is 1 if A is opted into B, else 0","DocExtra":"params: Txn.Accounts offset (or, since v4, an _available_ address), asset id (or, since v4, a Txn.ForeignAssets offset). Return: did_exist flag (1 if the asset existed and 0 otherwise), value.","ImmediateNote":"{uint8 asset holding field index}","Groups":["State Access"]},{"Opcode":113,"Name":"asset_params_get","Args":"U","Returns":".U","Cost":1,"Size":2,"ArgEnum":["AssetTotal","AssetDecimals","AssetDefaultFrozen","AssetUnitName","AssetName","AssetURL","AssetMetadataHash","AssetManager","AssetReserve","AssetFreeze","AssetClawback","AssetCreator"],"ArgEnumTypes":"UUUBBBBBBBBB","Doc":"X is field F from asset A. Y is 1 if A exists, else 0","DocExtra":"params: Txn.ForeignAssets offset (or, since v4, an _available_ asset id. Return: did_exist flag (1 if the asset existed and 0 otherwise), value.","ImmediateNote":"{uint8 asset params field index}","Groups":["State Access"]},{"Opcode":114,"Name":"app_params_get","Args":"U","Returns":".U","Cost":1,"Size":2,"ArgEnum":["AppApprovalProgram","AppClearStateProgram","AppGlobalNumUint","AppGlobalNumByteSlice","AppLocalNumUint","AppLocalNumByteSlice","AppExtraProgramPages","AppCreator","AppAddress"],"ArgEnumTypes":"BBUUUUUBB","Doc":"X is field F from app A. Y is 1 if A exists, else 0","DocExtra":"params: Txn.ForeignApps offset or an _available_ app id. Return: did_exist flag (1 if the application existed and 0 otherwise), value.","ImmediateNote":"{uint8 app params field index}","Groups":["State Access"]},{"Opcode":115,"Name":"acct_params_get","Args":".","Returns":".U","Cost":1,"Size":2,"Doc":"X is field F from account A. Y is 1 if A owns positive algos, else 0","ImmediateNote":"{uint8 account params field index}","Groups":["State Access"]},{"Opcode":120,"Name":"min_balance","Args":".","Returns":"U","Cost":1,"Size":1,"Doc":"get minimum required balance for account A, in microalgos. Required balance is affected by [ASA](https://developer.algorand.org/docs/features/asa/#assets-overview) and [App](https://developer.algorand.org/docs/features/asc1/stateful/#minimum-balance-requirement-for-a-smart-contract) usage. When creating or opting into an app, the minimum balance grows before the app code runs, therefore the increase is visible there. When deleting or closing out, the minimum balance decreases after the app executes.","DocExtra":"params: Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset). Return: value.","Groups":["State Access"]},{"Opcode":128,"Name":"pushbytes","Returns":"B","Cost":1,"Size":0,"Doc":"immediate BYTES","DocExtra":"pushbytes args are not added to the bytecblock during assembly processes","ImmediateNote":"{varuint length} {bytes}","Groups":["Loading Values"]},{"Opcode":129,"Name":"pushint","Returns":"U","Cost":1,"Size":0,"Doc":"immediate UINT","DocExtra":"pushint args are not added to the intcblock during assembly processes","ImmediateNote":"{varuint int}","Groups":["Loading Values"]},{"Opcode":136,"Name":"callsub","Cost":1,"Size":3,"Doc":"branch unconditionally to TARGET, saving the next instruction on the call stack","DocExtra":"The call stack is separate from the data stack. Only `callsub` and `retsub` manipulate it.","ImmediateNote":"{int16 branch offset, big endian}","Groups":["Flow Control"]},{"Opcode":137,"Name":"retsub","Cost":1,"Size":1,"Doc":"pop the top instruction from the call stack and branch to it","DocExtra":"The call stack is separate from the data stack. Only `callsub` and `retsub` manipulate it.","Groups":["Flow Control"]},{"Opcode":144,"Name":"shl","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A times 2^B, modulo 2^64","Groups":["Arithmetic"]},{"Opcode":145,"Name":"shr","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A divided by 2^B","Groups":["Arithmetic"]},{"Opcode":146,"Name":"sqrt","Args":"U","Returns":"U","Cost":4,"Size":1,"Doc":"The largest integer I such that I^2 <= A","Groups":["Arithmetic"]},{"Opcode":147,"Name":"bitlen","Args":".","Returns":"U","Cost":1,"Size":1,"Doc":"The highest set bit in A. If A is a byte-array, it is interpreted as a big-endian unsigned integer. bitlen of 0 is 0, bitlen of 8 is 4","DocExtra":"bitlen interprets arrays as big-endian integers, unlike setbit/getbit","Groups":["Arithmetic"]},{"Opcode":148,"Name":"exp","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A raised to the Bth power. Fail if A == B == 0 and on overflow","Groups":["Arithmetic"]},{"Opcode":149,"Name":"expw","Args":"UU","Returns":"UU","Cost":10,"Size":1,"Doc":"A raised to the Bth power as a 128-bit result in two uint64s. X is the high 64 bits, Y is the low. Fail if A == B == 0 or if the results exceeds 2^128-1","Groups":["Arithmetic"]},{"Opcode":150,"Name":"bsqrt","Args":"B","Returns":"B","Cost":40,"Size":1,"Doc":"The largest integer I such that I^2 <= A. A and I are interpreted as big-endian unsigned integers","Groups":["Byte Array Arithmetic"]},{"Opcode":151,"Name":"divw","Args":"UUU","Returns":"U","Cost":1,"Size":1,"Doc":"A,B / C. Fail if C == 0 or if result overflows.","DocExtra":"The notation A,B indicates that A and B are interpreted as a uint128 value, with A as the high uint64 and B the low.","Groups":["Arithmetic"]},{"Opcode":160,"Name":"b+","Args":"BB","Returns":"B","Cost":10,"Size":1,"Doc":"A plus B. A and B are interpreted as big-endian unsigned integers","Groups":["Byte Array Arithmetic"]},{"Opcode":161,"Name":"b-","Args":"BB","Returns":"B","Cost":10,"Size":1,"Doc":"A minus B. A and B are interpreted as big-endian unsigned integers. Fail on underflow.","Groups":["Byte Array Arithmetic"]},{"Opcode":162,"Name":"b/","Args":"BB","Returns":"B","Cost":20,"Size":1,"Doc":"A divided by B (truncated division). A and B are interpreted as big-endian unsigned integers. Fail if B is zero.","Groups":["Byte Array Arithmetic"]},{"Opcode":163,"Name":"b*","Args":"BB","Returns":"B","Cost":20,"Size":1,"Doc":"A times B. A and B are interpreted as big-endian unsigned integers.","Groups":["Byte Array Arithmetic"]},{"Opcode":164,"Name":"b<","Args":"BB","Returns":"U","Cost":1,"Size":1,"Doc":"1 if A is less than B, else 0. A and B are interpreted as big-endian unsigned integers","Groups":["Byte Array Arithmetic"]},{"Opcode":165,"Name":"b>","Args":"BB","Returns":"U","Cost":1,"Size":1,"Doc":"1 if A is greater than B, else 0. A and B are interpreted as big-endian unsigned integers","Groups":["Byte Array Arithmetic"]},{"Opcode":166,"Name":"b<=","Args":"BB","Returns":"U","Cost":1,"Size":1,"Doc":"1 if A is less than or equal to B, else 0. A and B are interpreted as big-endian unsigned integers","Groups":["Byte Array Arithmetic"]},{"Opcode":167,"Name":"b>=","Args":"BB","Returns":"U","Cost":1,"Size":1,"Doc":"1 if A is greater than or equal to B, else 0. A and B are interpreted as big-endian unsigned integers","Groups":["Byte Array Arithmetic"]},{"Opcode":168,"Name":"b==","Args":"BB","Returns":"U","Cost":1,"Size":1,"Doc":"1 if A is equal to B, else 0. A and B are interpreted as big-endian unsigned integers","Groups":["Byte Array Arithmetic"]},{"Opcode":169,"Name":"b!=","Args":"BB","Returns":"U","Cost":1,"Size":1,"Doc":"0 if A is equal to B, else 1. A and B are interpreted as big-endian unsigned integers","Groups":["Byte Array Arithmetic"]},{"Opcode":170,"Name":"b%","Args":"BB","Returns":"B","Cost":20,"Size":1,"Doc":"A modulo B. A and B are interpreted as big-endian unsigned integers. Fail if B is zero.","Groups":["Byte Array Arithmetic"]},{"Opcode":171,"Name":"b|","Args":"BB","Returns":"B","Cost":6,"Size":1,"Doc":"A bitwise-or B. A and B are zero-left extended to the greater of their lengths","Groups":["Byte Array Logic"]},{"Opcode":172,"Name":"b&","Args":"BB","Returns":"B","Cost":6,"Size":1,"Doc":"A bitwise-and B. A and B are zero-left extended to the greater of their lengths","Groups":["Byte Array Logic"]},{"Opcode":173,"Name":"b^","Args":"BB","Returns":"B","Cost":6,"Size":1,"Doc":"A bitwise-xor B. A and B are zero-left extended to the greater of their lengths","Groups":["Byte Array Logic"]},{"Opcode":174,"Name":"b~","Args":"B","Returns":"B","Cost":4,"Size":1,"Doc":"A with all bits inverted","Groups":["Byte Array Logic"]},{"Opcode":175,"Name":"bzero","Args":"U","Returns":"B","Cost":1,"Size":1,"Doc":"zero filled byte-array of length A","Groups":["Loading Values"]},{"Opcode":176,"Name":"log","Args":"B","Cost":1,"Size":1,"Doc":"write A to log state of the current application","DocExtra":"`log` fails if called more than MaxLogCalls times in a program, or if the sum of logged bytes exceeds 1024 bytes.","Groups":["State Access"]},{"Opcode":177,"Name":"itxn_begin","Cost":1,"Size":1,"Doc":"begin preparation of a new inner transaction in a new transaction group","DocExtra":"`itxn_begin` initializes Sender to the application address; Fee to the minimum allowable, taking into account MinTxnFee and credit from overpaying in earlier transactions; FirstValid/LastValid to the values in the invoking transaction, and all other fields to zero or empty values.","Groups":["Inner Transactions"]},{"Opcode":178,"Name":"itxn_field","Args":".","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","Assets","NumAssets","Applications","NumApplications","GlobalNumUint","GlobalNumByteSlice","LocalNumUint","LocalNumByteSlice","ExtraProgramPages","Nonparticipation","Logs","NumLogs","CreatedAssetID","CreatedApplicationID","LastLog","StateProofPK"],"ArgEnumTypes":"BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBUUUUUUUUUUUBUUUBB","Doc":"set field F of the current inner transaction to A","DocExtra":"`itxn_field` fails if A is of the wrong type for F, including a byte array of the wrong size for use as an address when F is an address field. `itxn_field` also fails if A is an account, asset, or app that is not _available_, or an attempt is made extend an array field beyond the limit imposed by consensus parameters. (Addresses set into asset params of acfg transactions need not be _available_.)","ImmediateNote":"{uint8 transaction field index}","Groups":["Inner Transactions"]},{"Opcode":179,"Name":"itxn_submit","Cost":1,"Size":1,"Doc":"execute the current inner transaction group. Fail if executing this group would exceed the inner transaction limit, or if any transaction in the group fails.","DocExtra":"`itxn_submit` resets the current transaction so that it can not be resubmitted. A new `itxn_begin` is required to prepare another inner transaction.","Groups":["Inner Transactions"]},{"Opcode":180,"Name":"itxn","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","Assets","NumAssets","Applications","NumApplications","GlobalNumUint","GlobalNumByteSlice","LocalNumUint","LocalNumByteSlice","ExtraProgramPages","Nonparticipation","Logs","NumLogs","CreatedAssetID","CreatedApplicationID","LastLog","StateProofPK"],"ArgEnumTypes":"BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBUUUUUUUUUUUBUUUBB","Doc":"field F of the last inner transaction","ImmediateNote":"{uint8 transaction field index}","Groups":["Inner Transactions"]},{"Opcode":181,"Name":"itxna","Returns":".","Cost":1,"Size":3,"ArgEnum":["ApplicationArgs","Accounts","Assets","Applications","Logs"],"ArgEnumTypes":"BBUUB","Doc":"Ith value of the array field F of the last inner transaction","ImmediateNote":"{uint8 transaction field index} {uint8 transaction field array index}","Groups":["Inner Transactions"]},{"Opcode":182,"Name":"itxn_next","Cost":1,"Size":1,"Doc":"begin preparation of a new inner transaction in the same transaction group","DocExtra":"`itxn_next` initializes the transaction exactly as `itxn_begin` does","Groups":["Inner Transactions"]},{"Opcode":183,"Name":"gitxn","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","Assets","NumAssets","Applications","NumApplications","GlobalNumUint","GlobalNumByteSlice","LocalNumUint","LocalNumByteSlice","ExtraProgramPages","Nonparticipation","Logs","NumLogs","CreatedAssetID","CreatedApplicationID","LastLog","StateProofPK"],"ArgEnumTypes":"BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBUUUUUUUUUUUBUUUBB","Doc":"field F of the Tth transaction in the last inner group submitted","ImmediateNote":"{uint8 transaction group index} {uint8 transaction field index}","Groups":["Inner Transactions"]},{"Opcode":184,"Name":"gitxna","Returns":".","Cost":1,"Size":4,"ArgEnum":["ApplicationArgs","Accounts","Assets","Applications","Logs"],"ArgEnumTypes":"BBUUB","Doc":"Ith value of the array field F from the Tth transaction in the last inner group submitted","ImmediateNote":"{uint8 transaction group index} {uint8 transaction field index} {uint8 transaction field array index}","Groups":["Inner Transactions"]},{"Opcode":192,"Name":"txnas","Args":"U","Returns":".","Cost":1,"Size":2,"ArgEnum":["ApplicationArgs","Accounts","Assets","Applications","Logs"],"ArgEnumTypes":"BBUUB","Doc":"Ath value of the array field F of the current transaction","ImmediateNote":"{uint8 transaction field index}","Groups":["Loading Values"]},{"Opcode":193,"Name":"gtxnas","Args":"U","Returns":".","Cost":1,"Size":3,"ArgEnum":["ApplicationArgs","Accounts","Assets","Applications","Logs"],"ArgEnumTypes":"BBUUB","Doc":"Ath value of the array field F from the Tth transaction in the current group","ImmediateNote":"{uint8 transaction group index} {uint8 transaction field index}","Groups":["Loading Values"]},{"Opcode":194,"Name":"gtxnsas","Args":"UU","Returns":".","Cost":1,"Size":2,"ArgEnum":["ApplicationArgs","Accounts","Assets","Applications","Logs"],"ArgEnumTypes":"BBUUB","Doc":"Bth value of the array field F from the Ath transaction in the current group","ImmediateNote":"{uint8 transaction field index}","Groups":["Loading Values"]},{"Opcode":195,"Name":"args","Args":"U","Returns":"B","Cost":1,"Size":1,"Doc":"Ath LogicSig argument","Groups":["Loading Values"]},{"Opcode":196,"Name":"gloadss","Args":"UU","Returns":".","Cost":1,"Size":1,"Doc":"Bth scratch space value of the Ath transaction in the current group","Groups":["Loading Values"]},{"Opcode":197,"Name":"itxnas","Args":"U","Returns":".","Cost":1,"Size":2,"Doc":"Ath value of the array field F of the last inner transaction","ImmediateNote":"{uint8 transaction field index}","Groups":["Inner Transactions"]},{"Opcode":198,"Name":"gitxnas","Args":"U","Returns":".","Cost":1,"Size":3,"Doc":"Ath value of the array field F from the Tth transaction in the last inner group submitted","ImmediateNote":"{uint8 transaction group index} {uint8 transaction field index}","Groups":["Inner Transactions"]}]}');let n;function o(e){let t=0,r=0;for(let s=0;s<e.length;s++){const n=e[s];if(n<128)return s>9||9===s&&n>1?[0,-(s+1)]:[t|n<<r,s+1];t+=(127&n)<<r,r+=7}return[0,0]}function i(e,t){let r=1;const s=o(e.slice(t+r)),n=s[0];let i=s[1];if(i<=0)throw new Error(`could not decode int const block size at pc=${t+r}`);const a=[];r+=i;for(let s=0;s<n;s++){if(t+r>=e.length)throw new Error("intcblock ran past end of program");let n;if([n,i]=o(e.slice(t+r)),i<=0)throw new Error(`could not decode int const[${s}] block size at pc=${t+r}`);a.push(n),r+=i}return[r,a]}function a(e,t){let r=1;const s=o(e.slice(t+r)),n=s[0];let i=s[1];if(i<=0)throw new Error(`could not decode []byte const block size at pc=${t+r}`);const a=[];r+=i;for(let s=0;s<n;s++){if(t+r>=e.length)throw new Error("bytecblock ran past end of program");let n;if([n,i]=o(e.slice(t+r)),i<=0)throw new Error(`could not decode []byte] const[${s}] block size at pc=${t+r}`);if(r+=i,t+r+n>e.length)throw new Error("bytecblock ran past end of program");const c=e.slice(t+r,t+r+n);a.push(c),r+=n}return[r,a]}function c(e,t){let r=1;const[s,n]=o(e.slice(t+r));if(n<=0)throw new Error(`could not decode push int const at pc=${t+r}`);return r+=n,[r,s]}function u(e,t){let r=1;const[s,n]=o(e.slice(t+r));if(n<=0)throw new Error(`could not decode push []byte const size at pc=${t+r}`);if(r+=n,t+r+s>e.length)throw new Error("pushbytes ran past end of program");const i=e.slice(t+r,t+r+s);return r+=s,[r,i]}function d(e,t){if(!e)throw new Error("empty program");if(void 0===t&&(t=[]),!Array.isArray(t))throw new Error("invalid arguments");const[r,d]=o(e);if(d<=0)throw new Error("version parsing error");if(r>s.z_)throw new Error("unsupported version");let l=0,{length:h}=e;for(const e of t)h+=e.length;if(h>1e3)throw new Error("program too long");if(!n){n={};for(const e of s.AP)n[e.Opcode]=e}let p=d,f=[],g=[];for(;p<e.length;){const t=n[e[p]];if(void 0===t)throw new Error("invalid instruction");l+=t.Cost;let r=t.Size;if(0===r)switch(t.Opcode){case 32:{let t;[r,t]=i(e,p),f=f.concat(t);break}case 38:{let t;[r,t]=a(e,p),g=g.concat(t);break}case 129:{let t;[r,t]=c(e,p),f.push(t);break}case 128:{let t;[r,t]=u(e,p),g.push(t);break}default:throw new Error("invalid instruction")}p+=r}if(r<4&&l>2e4)throw new Error("program too costly for version < 4. consider using v4.");return[f,g,!0]}function l(e,t){const[,,r]=d(e,t);return r}function h(e,t){const[r]=i(e,t);return r}function p(e,t){const[r]=a(e,t);return r}function f(e,t){const[r]=c(e,t);return r}function g(e,t){const[r]=u(e,t);return r}const m=s.z_,y=s.BV},2009:(e,t,r)=>{"use strict";r.d(t,{Y:()=>o});let s={},n={};"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split("").forEach((function(e,t){s[e]=t,n[t]=e}));class o{constructor({version:e,sources:t,names:r,mappings:n}){if(this.version=e,this.sources=t,this.names=r,this.mappings=n,3!==this.version)throw new Error(`Only version 3 is supported, got ${this.version}`);if(void 0===this.mappings)throw new Error("mapping undefined, cannot build source map without `mapping`");const o=this.mappings.split(";").map((e=>{const t=function(e){let t=[],r=0,n=0;for(let o=0;o<e.length;o+=1){let i=s[e[o]];if(void 0===i)throw new Error("Invalid character ("+e[o]+")");const a=32&i;if(i&=31,n+=i<<r,a)r+=5;else{const e=1&n;n>>>=1,e?t.push(0===n?-2147483648:-n):t.push(n),n=r=0}}return t}(e);if(t.length>2)return t[2]}));this.pcToLine={},this.lineToPc={};let i=0;for(const[e,t]of o.entries())void 0!==t&&(i+=t),i in this.lineToPc||(this.lineToPc[i]=[]),this.lineToPc[i].push(e),this.pcToLine[e]=i}getLineForPc(e){return this.pcToLine[e]}getPcsForLine(e){return this.lineToPc[e]}}},8800:(e,t,r)=>{"use strict";r.r(t),r.d(t,{LogicSig:()=>l,LogicSigAccount:()=>h,logicSigFromByte:()=>m,makeLogicSig:()=>p,sanityCheckProgram:()=>d,signLogicSigTransaction:()=>g,signLogicSigTransactionObject:()=>f,tealSign:()=>b,tealSignFromProgram:()=>w});var s=r(9404),n=r(7116),o=r(3033),i=r(4158),a=r(413),c=r(5592),u=r(2486).lW;function d(e){if(!e||0===e.length)throw new Error("empty program");const t="\n".charCodeAt(0),r=" ".charCodeAt(0),s="~".charCodeAt(0);if(e.every((e=>e===t||(e=>r<=e&&e<=s)(e)))){const t=u.from(e).toString();if((0,n.isValidAddress)(t))throw new Error("requesting program bytes, get Algorand address");if(u.from(t,"base64").toString("base64")===t)throw new Error("program should not be b64 encoded");throw new Error("program bytes are all ASCII printable characters, not looking like Teal byte code")}}class l{constructor(e,t){if(this.tag=u.from("Program"),t&&(!Array.isArray(t)||!t.every((e=>e.constructor===Uint8Array||u.isBuffer(e)))))throw new TypeError("Invalid arguments");let r;null!=t&&(r=t.map((e=>new Uint8Array(e)))),d(e),this.logic=e,this.args=r,this.sig=void 0,this.msig=void 0}get_obj_for_encoding(){const e={l:this.logic};return this.args&&(e.arg=this.args),this.sig?e.sig=this.sig:this.msig&&(e.msig=this.msig),e}static from_obj_for_encoding(e){const t=new l(e.l,e.arg);return t.sig=e.sig,t.msig=e.msig,t}verify(e){if(this.sig&&this.msig)return!1;try{d(this.logic)}catch(e){return!1}const t=a.concatArrays(this.tag,this.logic);if(!this.sig&&!this.msig){const r=s.genericHash(t);return a.arrayEqual(r,e)}return this.sig?s.verify(t,this.sig,e):(0,i.F2)(t,this.msig,e)}address(){const e=a.concatArrays(this.tag,this.logic),t=s.genericHash(e);return n.encodeAddress(new Uint8Array(t))}sign(e,t){if(null==t)this.sig=this.signProgram(e);else{const r=t.addrs.map((e=>({pk:n.decodeAddress(e).publicKey})));this.msig={v:t.version,thr:t.threshold,subsig:r};const[s,o]=this.singleSignMultisig(e,this.msig);this.msig.subsig[o].s=s}}appendToMultisig(e){if(void 0===this.msig)throw new Error("no multisig present");const[t,r]=this.singleSignMultisig(e,this.msig);this.msig.subsig[r].s=t}signProgram(e){const t=a.concatArrays(this.tag,this.logic);return s.sign(t,e)}singleSignMultisig(e,t){let r=-1;const n=s.keyPairFromSecretKey(e).publicKey;for(let e=0;e<t.subsig.length;e++){const{pk:s}=t.subsig[e];if(a.arrayEqual(s,n)){r=e;break}}if(-1===r)throw new Error("invalid secret key");return[this.signProgram(e),r]}toByte(){return o.encode(this.get_obj_for_encoding())}static fromByte(e){const t=o.decode(e);return l.from_obj_for_encoding(t)}}class h{constructor(e,t){this.lsig=new l(e,t),this.sigkey=void 0}get_obj_for_encoding(){const e={lsig:this.lsig.get_obj_for_encoding()};return this.sigkey&&(e.sigkey=this.sigkey),e}static from_obj_for_encoding(e){const t=new h(e.lsig.l,e.lsig.arg);return t.lsig=l.from_obj_for_encoding(e.lsig),t.sigkey=e.sigkey,t}toByte(){return o.encode(this.get_obj_for_encoding())}static fromByte(e){const t=o.decode(e);return h.from_obj_for_encoding(t)}isDelegated(){return!(!this.lsig.sig&&!this.lsig.msig)}verify(){const e=this.address();return this.lsig.verify(n.decodeAddress(e).publicKey)}address(){if(this.lsig.sig&&this.lsig.msig)throw new Error("LogicSig has too many signatures. At most one of sig or msig may be present");if(this.lsig.sig){if(!this.sigkey)throw new Error("Signing key for delegated account is missing");return n.encodeAddress(this.sigkey)}if(this.lsig.msig){const e={version:this.lsig.msig.v,threshold:this.lsig.msig.thr,pks:this.lsig.msig.subsig.map((e=>e.pk))};return n.encodeAddress(n.fromMultisigPreImg(e))}return this.lsig.address()}signMultisig(e,t){this.lsig.sign(t,e)}appendToMultisig(e){this.lsig.appendToMultisig(e)}sign(e){this.lsig.sign(e),this.sigkey=s.keyPairFromSecretKey(e).publicKey}}function p(e,t){return new l(e,t)}function f(e,t){let r,i;if(t instanceof h)r=t.lsig,i=n.decodeAddress(t.address()).publicKey;else if(r=t,r.sig)i=e.from.publicKey;else if(r.msig){const e={version:r.msig.v,threshold:r.msig.thr,pks:r.msig.subsig.map((e=>e.pk))};i=n.fromMultisigPreImg(e)}else i=n.decodeAddress(r.address()).publicKey;return function(e,t,r){if(!t.verify(r))throw new Error("Logic signature verification failed. Ensure the program and signature are valid.");const n={lsig:t.get_obj_for_encoding(),txn:e.get_obj_for_encoding()};return s.bytesEqual(r,e.from.publicKey)||(n.sgnr=u.from(r)),{txID:e.txID().toString(),blob:o.encode(n)}}(e,r,i)}function g(e,t){return f(c.instantiateTxnIfNeeded(e),t)}function m(e){return l.fromByte(e)}const y=u.from("ProgData");function b(e,t,r){const o=a.concatArrays(n.decodeAddress(r).publicKey,t),i=u.from(a.concatArrays(y,o));return s.sign(i,e)}function w(e,t,r){return b(e,t,new l(r).address())}},6608:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ABIAddressType:()=>P.JQ,ABIArrayDynamicType:()=>P._4,ABIArrayStaticType:()=>P.X3,ABIBoolType:()=>P.R0,ABIByteType:()=>P.jD,ABIContract:()=>P.Yh,ABIInterface:()=>P.bL,ABIMethod:()=>P.Ls,ABIReferenceType:()=>P.UV,ABIStringType:()=>P.Ax,ABITransactionType:()=>P.A9,ABITupleType:()=>P.w1,ABIType:()=>P.NK,ABIUfixedType:()=>P.RY,ABIUintType:()=>P.Pu,ADDR_BYTE_SIZE:()=>P.Vk,ALGORAND_MIN_TX_FEE:()=>i.ALGORAND_MIN_TX_FEE,Algodv2:()=>f.Z,AtomicTransactionComposer:()=>C.A,AtomicTransactionComposerStatus:()=>C.b,DryrunResult:()=>k.x,ERROR_INVALID_MICROALGOS:()=>K,ERROR_MULTISIG_BAD_SENDER:()=>H,INVALID_MICROALGOS_ERROR_MSG:()=>d.rD,Indexer:()=>y.Z,IntDecoding:()=>m.Z,Kmd:()=>g.Z,LENGTH_ENCODE_BYTE_SIZE:()=>P.nh,LogicSigAccount:()=>T.LogicSigAccount,LogicTemplates:()=>G,MAX_LEN:()=>P.kG,MULTISIG_BAD_SENDER_ERROR_MSG:()=>L,OnApplicationComplete:()=>U.OnApplicationComplete,SINGLE_BOOL_SIZE:()=>P.qH,SINGLE_BYTE_SIZE:()=>P.JH,SourceMap:()=>B.Y,Transaction:()=>i.Transaction,TransactionType:()=>D.i,abiCheckTransactionType:()=>P.vJ,abiTypeIsReference:()=>P.o5,abiTypeIsTransaction:()=>P.AE,algosToMicroalgos:()=>d.HN,appendSignMultisigTransaction:()=>R.PO,appendSignRawMultisigSignature:()=>R.f7,assignGroupID:()=>E.assignGroupID,bigIntToBytes:()=>w.j,bytesToBigInt:()=>w.v,computeGroupID:()=>E.computeGroupID,createDryrun:()=>k.P,createMultisigTransaction:()=>R.gJ,decodeAddress:()=>n.decodeAddress,decodeObj:()=>$,decodeSignedTransaction:()=>i.decodeSignedTransaction,decodeUint64:()=>A.u,decodeUnsignedTransaction:()=>i.decodeUnsignedTransaction,encodeAddress:()=>n.encodeAddress,encodeObj:()=>M,encodeUint64:()=>A.T,encodeUnsignedTransaction:()=>i.encodeUnsignedTransaction,generateAccount:()=>v.Z,getApplicationAddress:()=>n.getApplicationAddress,getMethodByName:()=>P.I5,indexerModels:()=>_,instantiateTxnIfNeeded:()=>i.instantiateTxnIfNeeded,isTransactionWithSigner:()=>I.Xw,isValidAddress:()=>n.isValidAddress,logicSigFromByte:()=>T.logicSigFromByte,makeApplicationCallTxnFromObject:()=>U.makeApplicationCallTxnFromObject,makeApplicationClearStateTxn:()=>U.makeApplicationClearStateTxn,makeApplicationClearStateTxnFromObject:()=>U.makeApplicationClearStateTxnFromObject,makeApplicationCloseOutTxn:()=>U.makeApplicationCloseOutTxn,makeApplicationCloseOutTxnFromObject:()=>U.makeApplicationCloseOutTxnFromObject,makeApplicationCreateTxn:()=>U.makeApplicationCreateTxn,makeApplicationCreateTxnFromObject:()=>U.makeApplicationCreateTxnFromObject,makeApplicationDeleteTxn:()=>U.makeApplicationDeleteTxn,makeApplicationDeleteTxnFromObject:()=>U.makeApplicationDeleteTxnFromObject,makeApplicationNoOpTxn:()=>U.makeApplicationNoOpTxn,makeApplicationNoOpTxnFromObject:()=>U.makeApplicationNoOpTxnFromObject,makeApplicationOptInTxn:()=>U.makeApplicationOptInTxn,makeApplicationOptInTxnFromObject:()=>U.makeApplicationOptInTxnFromObject,makeApplicationUpdateTxn:()=>U.makeApplicationUpdateTxn,makeApplicationUpdateTxnFromObject:()=>U.makeApplicationUpdateTxnFromObject,makeAssetConfigTxn:()=>U.makeAssetConfigTxn,makeAssetConfigTxnWithSuggestedParams:()=>U.makeAssetConfigTxnWithSuggestedParams,makeAssetConfigTxnWithSuggestedParamsFromObject:()=>U.makeAssetConfigTxnWithSuggestedParamsFromObject,makeAssetCreateTxn:()=>U.makeAssetCreateTxn,makeAssetCreateTxnWithSuggestedParams:()=>U.makeAssetCreateTxnWithSuggestedParams,makeAssetCreateTxnWithSuggestedParamsFromObject:()=>U.makeAssetCreateTxnWithSuggestedParamsFromObject,makeAssetDestroyTxn:()=>U.makeAssetDestroyTxn,makeAssetDestroyTxnWithSuggestedParams:()=>U.makeAssetDestroyTxnWithSuggestedParams,makeAssetDestroyTxnWithSuggestedParamsFromObject:()=>U.makeAssetDestroyTxnWithSuggestedParamsFromObject,makeAssetFreezeTxn:()=>U.makeAssetFreezeTxn,makeAssetFreezeTxnWithSuggestedParams:()=>U.makeAssetFreezeTxnWithSuggestedParams,makeAssetFreezeTxnWithSuggestedParamsFromObject:()=>U.makeAssetFreezeTxnWithSuggestedParamsFromObject,makeAssetTransferTxn:()=>U.makeAssetTransferTxn,makeAssetTransferTxnWithSuggestedParams:()=>U.makeAssetTransferTxnWithSuggestedParams,makeAssetTransferTxnWithSuggestedParamsFromObject:()=>U.makeAssetTransferTxnWithSuggestedParamsFromObject,makeBasicAccountTransactionSigner:()=>I.x7,makeKeyRegistrationTxn:()=>U.makeKeyRegistrationTxn,makeKeyRegistrationTxnWithSuggestedParams:()=>U.makeKeyRegistrationTxnWithSuggestedParams,makeKeyRegistrationTxnWithSuggestedParamsFromObject:()=>U.makeKeyRegistrationTxnWithSuggestedParamsFromObject,makeLogicSig:()=>T.makeLogicSig,makeLogicSigAccountTransactionSigner:()=>I.i1,makeMultiSigAccountTransactionSigner:()=>I.Vj,makePaymentTxn:()=>U.makePaymentTxn,makePaymentTxnWithSuggestedParams:()=>U.makePaymentTxnWithSuggestedParams,makePaymentTxnWithSuggestedParamsFromObject:()=>U.makePaymentTxnWithSuggestedParamsFromObject,masterDerivationKeyToMnemonic:()=>S.vC,mergeMultisigTransactions:()=>R.J6,microalgosToAlgos:()=>d._,mnemonicFromSeed:()=>S.w3,mnemonicToMasterDerivationKey:()=>S.OF,mnemonicToSecretKey:()=>S.Ch,modelsv2:()=>x,multisigAddress:()=>R.vH,secretKeyToMnemonic:()=>S.QX,seedFromMnemonic:()=>S.mE,signBid:()=>j,signBytes:()=>z,signLogicSigTransaction:()=>T.signLogicSigTransaction,signLogicSigTransactionObject:()=>T.signLogicSigTransactionObject,signMultisigTransaction:()=>R.PU,signTransaction:()=>F,tealSign:()=>T.tealSign,tealSignFromProgram:()=>T.tealSignFromProgram,verifyBytes:()=>q,verifyMultisig:()=>R.F2,waitForConfirmation:()=>b.K});var s=r(9404),n=r(7116),o=r(3033),i=r(5592),a=r(8886),c=r.n(a),u=r(2691),d=r(9070),l=r(413),h=r(5922),p={};for(const e in h)["default","MULTISIG_BAD_SENDER_ERROR_MSG","signTransaction","signBid","signBytes","verifyBytes","encodeObj","decodeObj","ERROR_MULTISIG_BAD_SENDER","ERROR_INVALID_MICROALGOS","Algodv2","Kmd","IntDecoding","Indexer","waitForConfirmation","isValidAddress","encodeAddress","decodeAddress","getApplicationAddress","bytesToBigInt","bigIntToBytes","encodeUint64","decodeUint64","generateAccount","modelsv2","indexerModels","mnemonicToMasterDerivationKey","masterDerivationKeyToMnemonic","secretKeyToMnemonic","mnemonicToSecretKey","seedFromMnemonic","mnemonicFromSeed","microalgosToAlgos","algosToMicroalgos","INVALID_MICROALGOS_ERROR_MSG","computeGroupID","assignGroupID","LogicSigAccount","makeLogicSig","signLogicSigTransaction","signLogicSigTransactionObject","logicSigFromByte","tealSign","tealSignFromProgram","signMultisigTransaction","mergeMultisigTransactions","appendSignMultisigTransaction","createMultisigTransaction","appendSignRawMultisigSignature","verifyMultisig","multisigAddress","SourceMap","LogicTemplates"].indexOf(e)<0&&(p[e]=()=>h[e]);r.d(t,p);var f=r(8569),g=r(6477),m=r(7197),y=r(6595),b=r(5062),w=r(8922),A=r(6963),v=r(7988),x=r(1685),_=r(8230),S=r(3510),E=r(1063),T=r(8800),R=r(4158),B=r(2009),k=r(4383),U=r(1988),I=r(834),C=r(3458),D=r(2380),P=r(7677),N=r(2486).lW;const O=N.from([77,88]),L="The transaction sender address and multisig preimage do not match.";function F(e,t){if(void 0===e.from){const r=s.keyPairFromSecretKey(t);e.from=n.encodeAddress(r.publicKey)}const r=i.instantiateTxnIfNeeded(e);return{txID:r.txID().toString(),blob:r.signTxn(t)}}function j(e,t){return new u.Z(e).signBid(t)}function z(e,t){const r=N.from(l.concatArrays(O,e));return s.sign(r,t)}function q(e,t,r){const o=N.from(l.concatArrays(O,e)),i=n.decodeAddress(r).publicKey;return s.verify(o,t,i)}function M(e){return new Uint8Array(o.encode(e))}function $(e){return o.decode(e)}const H=new Error(L),K=new Error(d.rD),G=c()},1988:(e,t,r)=>{"use strict";r.r(t),r.d(t,{OnApplicationComplete:()=>n.hq,makeApplicationCallTxnFromObject:()=>q,makeApplicationClearStateTxn:()=>L,makeApplicationClearStateTxnFromObject:()=>F,makeApplicationCloseOutTxn:()=>N,makeApplicationCloseOutTxnFromObject:()=>O,makeApplicationCreateTxn:()=>R,makeApplicationCreateTxnFromObject:()=>B,makeApplicationDeleteTxn:()=>I,makeApplicationDeleteTxnFromObject:()=>C,makeApplicationNoOpTxn:()=>j,makeApplicationNoOpTxnFromObject:()=>z,makeApplicationOptInTxn:()=>D,makeApplicationOptInTxnFromObject:()=>P,makeApplicationUpdateTxn:()=>k,makeApplicationUpdateTxnFromObject:()=>U,makeAssetConfigTxn:()=>m,makeAssetConfigTxnWithSuggestedParams:()=>g,makeAssetConfigTxnWithSuggestedParamsFromObject:()=>y,makeAssetCreateTxn:()=>p,makeAssetCreateTxnWithSuggestedParams:()=>h,makeAssetCreateTxnWithSuggestedParamsFromObject:()=>f,makeAssetDestroyTxn:()=>w,makeAssetDestroyTxnWithSuggestedParams:()=>b,makeAssetDestroyTxnWithSuggestedParamsFromObject:()=>A,makeAssetFreezeTxn:()=>x,makeAssetFreezeTxnWithSuggestedParams:()=>v,makeAssetFreezeTxnWithSuggestedParamsFromObject:()=>_,makeAssetTransferTxn:()=>E,makeAssetTransferTxnWithSuggestedParams:()=>S,makeAssetTransferTxnWithSuggestedParamsFromObject:()=>T,makeKeyRegistrationTxn:()=>d,makeKeyRegistrationTxnWithSuggestedParams:()=>u,makeKeyRegistrationTxnWithSuggestedParamsFromObject:()=>l,makePaymentTxn:()=>a,makePaymentTxnWithSuggestedParams:()=>i,makePaymentTxnWithSuggestedParamsFromObject:()=>c});var s=r(5592),n=r(1624),o=r(1824);function i(e,t,r,n,i,a,c){const u={from:e,to:t,amount:r,closeRemainderTo:n,note:i,suggestedParams:a,type:o.i.pay,reKeyTo:c};return new s.Transaction(u)}function a(e,t,r,s,n,o,a,c,u,d,l){return i(e,t,s,n,c,{genesisHash:u,genesisID:d,firstRound:o,lastRound:a,fee:r},l)}function c(e){return i(e.from,e.to,e.amount,e.closeRemainderTo,e.note,e.suggestedParams,e.rekeyTo)}function u(e,t,r,n,i,a,c,u,d,l=!1,h){const p={from:e,note:t,voteKey:r,selectionKey:n,voteFirst:i,voteLast:a,voteKeyDilution:c,suggestedParams:u,type:o.i.keyreg,reKeyTo:d,nonParticipation:l,stateProofKey:h};return new s.Transaction(p)}function d(e,t,r,s,n,o,i,a,c,d,l,h,p,f=!1,g){return u(e,n,a,c,d,l,h,{genesisHash:o,genesisID:i,firstRound:r,lastRound:s,fee:t},p,f,g)}function l(e){return u(e.from,e.note,e.voteKey,e.selectionKey,e.voteFirst,e.voteLast,e.voteKeyDilution,e.suggestedParams,e.rekeyTo,e.nonParticipation,e.stateProofKey)}function h(e,t,r,n,i,a,c,u,d,l,h,p,f,g,m){const y={from:e,note:t,suggestedParams:g,assetTotal:r,assetDecimals:n,assetDefaultFrozen:i,assetUnitName:l,assetName:h,assetURL:p,assetMetadataHash:f,assetManager:a,assetReserve:c,assetFreeze:u,assetClawback:d,type:o.i.acfg,reKeyTo:m};return new s.Transaction(y)}function p(e,t,r,s,n,o,i,a,c,u,d,l,p,f,g,m,y,b,w){return h(e,n,a,c,u,d,l,p,f,g,m,y,b,{genesisHash:o,genesisID:i,firstRound:r,lastRound:s,fee:t},w)}function f(e){return h(e.from,e.note,e.total,e.decimals,e.defaultFrozen,e.manager,e.reserve,e.freeze,e.clawback,e.unitName,e.assetName,e.assetURL,e.assetMetadataHash,e.suggestedParams,e.rekeyTo)}function g(e,t,r,n,i,a,c,u,d=!0,l){if(d&&(void 0===n||void 0===i||void 0===a||void 0===c))throw Error("strict empty address checking was turned on, but at least one empty address was provided");const h={from:e,suggestedParams:u,assetIndex:r,assetManager:n,assetReserve:i,assetFreeze:a,assetClawback:c,type:o.i.acfg,note:t,reKeyTo:l};return new s.Transaction(h)}function m(e,t,r,s,n,o,i,a,c,u,d,l,h=!0,p){return g(e,n,a,c,u,d,l,{genesisHash:o,genesisID:i,firstRound:r,lastRound:s,fee:t},h,p)}function y(e){return g(e.from,e.note,e.assetIndex,e.manager,e.reserve,e.freeze,e.clawback,e.suggestedParams,e.strictEmptyAddressChecking,e.rekeyTo)}function b(e,t,r,n,i){const a={from:e,suggestedParams:n,assetIndex:r,type:o.i.acfg,note:t,reKeyTo:i};return new s.Transaction(a)}function w(e,t,r,s,n,o,i,a,c){return b(e,n,a,{genesisHash:o,genesisID:i,firstRound:r,lastRound:s,fee:t},c)}function A(e){return b(e.from,e.note,e.assetIndex,e.suggestedParams,e.rekeyTo)}function v(e,t,r,n,i,a,c){const u={from:e,type:o.i.afrz,freezeAccount:n,assetIndex:r,freezeState:i,note:t,suggestedParams:a,reKeyTo:c};return new s.Transaction(u)}function x(e,t,r,s,n,o,i,a,c,u,d){return v(e,n,a,c,u,{genesisHash:o,genesisID:i,firstRound:r,lastRound:s,fee:t},d)}function _(e){return v(e.from,e.note,e.assetIndex,e.freezeTarget,e.freezeState,e.suggestedParams,e.rekeyTo)}function S(e,t,r,n,i,a,c,u,d){const l={type:o.i.axfer,from:e,to:t,amount:i,suggestedParams:u,assetIndex:c,note:a,assetRevocationTarget:n,closeRemainderTo:r,reKeyTo:d};return new s.Transaction(l)}function E(e,t,r,s,n,o,i,a,c,u,d,l,h){return S(e,t,r,s,o,c,l,{genesisHash:u,genesisID:d,firstRound:i,lastRound:a,fee:n},h)}function T(e){return S(e.from,e.to,e.closeRemainderTo,e.revocationTarget,e.amount,e.note,e.assetIndex,e.suggestedParams,e.rekeyTo)}function R(e,t,r,n,i,a,c,u,d,l,h,p,f,g,m,y,b,w){const A={type:o.i.appl,from:e,suggestedParams:t,appIndex:0,appOnComplete:r,appLocalInts:a,appLocalByteSlices:c,appGlobalInts:u,appGlobalByteSlices:d,appApprovalProgram:n,appClearProgram:i,appArgs:l,appAccounts:h,appForeignApps:p,appForeignAssets:f,boxes:w,note:g,lease:m,reKeyTo:y,extraPages:b};return new s.Transaction(A)}function B(e){return R(e.from,e.suggestedParams,e.onComplete,e.approvalProgram,e.clearProgram,e.numLocalInts,e.numLocalByteSlices,e.numGlobalInts,e.numGlobalByteSlices,e.appArgs,e.accounts,e.foreignApps,e.foreignAssets,e.note,e.lease,e.rekeyTo,e.extraPages,e.boxes)}function k(e,t,r,i,a,c,u,d,l,h,p,f,g){const m={type:o.i.appl,from:e,suggestedParams:t,appIndex:r,appApprovalProgram:i,appOnComplete:n.hq.UpdateApplicationOC,appClearProgram:a,appArgs:c,appAccounts:u,appForeignApps:d,appForeignAssets:l,boxes:g,note:h,lease:p,reKeyTo:f};return new s.Transaction(m)}function U(e){return k(e.from,e.suggestedParams,e.appIndex,e.approvalProgram,e.clearProgram,e.appArgs,e.accounts,e.foreignApps,e.foreignAssets,e.note,e.lease,e.rekeyTo,e.boxes)}function I(e,t,r,i,a,c,u,d,l,h,p){const f={type:o.i.appl,from:e,suggestedParams:t,appIndex:r,appOnComplete:n.hq.DeleteApplicationOC,appArgs:i,appAccounts:a,appForeignApps:c,appForeignAssets:u,boxes:p,note:d,lease:l,reKeyTo:h};return new s.Transaction(f)}function C(e){return I(e.from,e.suggestedParams,e.appIndex,e.appArgs,e.accounts,e.foreignApps,e.foreignAssets,e.note,e.lease,e.rekeyTo,e.boxes)}function D(e,t,r,i,a,c,u,d,l,h,p){const f={type:o.i.appl,from:e,suggestedParams:t,appIndex:r,appOnComplete:n.hq.OptInOC,appArgs:i,appAccounts:a,appForeignApps:c,appForeignAssets:u,boxes:p,note:d,lease:l,reKeyTo:h};return new s.Transaction(f)}function P(e){return D(e.from,e.suggestedParams,e.appIndex,e.appArgs,e.accounts,e.foreignApps,e.foreignAssets,e.note,e.lease,e.rekeyTo,e.boxes)}function N(e,t,r,i,a,c,u,d,l,h,p){const f={type:o.i.appl,from:e,suggestedParams:t,appIndex:r,appOnComplete:n.hq.CloseOutOC,appArgs:i,appAccounts:a,appForeignApps:c,appForeignAssets:u,boxes:p,note:d,lease:l,reKeyTo:h};return new s.Transaction(f)}function O(e){return N(e.from,e.suggestedParams,e.appIndex,e.appArgs,e.accounts,e.foreignApps,e.foreignAssets,e.note,e.lease,e.rekeyTo,e.boxes)}function L(e,t,r,i,a,c,u,d,l,h,p){const f={type:o.i.appl,from:e,suggestedParams:t,appIndex:r,appOnComplete:n.hq.ClearStateOC,appArgs:i,appAccounts:a,appForeignApps:c,appForeignAssets:u,boxes:p,note:d,lease:l,reKeyTo:h};return new s.Transaction(f)}function F(e){return L(e.from,e.suggestedParams,e.appIndex,e.appArgs,e.accounts,e.foreignApps,e.foreignAssets,e.note,e.lease,e.rekeyTo,e.boxes)}function j(e,t,r,i,a,c,u,d,l,h,p){const f={type:o.i.appl,from:e,suggestedParams:t,appIndex:r,appOnComplete:n.hq.NoOpOC,appArgs:i,appAccounts:a,appForeignApps:c,appForeignAssets:u,boxes:p,note:d,lease:l,reKeyTo:h};return new s.Transaction(f)}function z(e){return j(e.from,e.suggestedParams,e.appIndex,e.appArgs,e.accounts,e.foreignApps,e.foreignAssets,e.note,e.lease,e.rekeyTo,e.boxes)}function q(e){const t={type:o.i.appl,from:e.from,suggestedParams:e.suggestedParams,appIndex:e.appIndex,appOnComplete:e.onComplete,appLocalInts:e.numLocalInts,appLocalByteSlices:e.numLocalByteSlices,appGlobalInts:e.numGlobalInts,appGlobalByteSlices:e.numGlobalByteSlices,appApprovalProgram:e.approvalProgram,appClearProgram:e.clearProgram,appArgs:e.appArgs,appAccounts:e.accounts,appForeignApps:e.foreignApps,appForeignAssets:e.foreignAssets,boxes:e.boxes,note:e.note,lease:e.lease,reKeyTo:e.rekeyTo,extraPages:e.extraPages};return new s.Transaction(t)}},3510:(e,t,r)=>{"use strict";r.d(t,{vC:()=>g,w3:()=>d,OF:()=>f,Ch:()=>h,QX:()=>p,mE:()=>l});const s=["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"];var n=r(9404),o=r(7116);const i="failed to decode mnemonic";function a(e){const t=[];let r=0,s=0;return e.forEach((function(e){r|=e<<s,s+=8,s>=11&&(t.push(2047&r),r>>=11,s-=11)})),s&&t.push(r),t}function c(e){return e.map((e=>s[e]))}function u(e){return c(a(n.genericHash(e)))[0]}function d(e){if(e.length!==n.SEED_BTYES_LENGTH)throw new RangeError(`Seed length must be ${n.SEED_BTYES_LENGTH}`);const t=c(a(e)),r=u(e);return`${t.join(" ")} ${r}`}function l(e){const t=e.split(" "),r=t.slice(0,24);for(const e of r)if(-1===s.indexOf(e))throw new Error("the mnemonic contains a word that is not in the wordlist");const n=t[t.length-1];let o=function(e){const t=[];let r=0,s=0;return e.forEach((function(e){for(r|=e<<s,s+=11;s>=8;)t.push(255&r),r>>=8,s-=8})),s&&t.push(r),new Uint8Array(t)}(r.map((e=>s.indexOf(e))));if(33!==o.length)throw new Error(i);if(0!==o[o.length-1])throw new Error(i);if(o=o.slice(0,o.length-1),u(o)===n)return o;throw new Error(i)}function h(e){const t=l(e),r=n.keyPairFromSeed(t);return{addr:o.encodeAddress(r.publicKey),sk:r.secretKey}}function p(e){return d(e.slice(0,n.SEED_BTYES_LENGTH))}function f(e){return l(e)}function g(e){return d(e)}},4158:(e,t,r)=>{"use strict";r.d(t,{F2:()=>g,J6:()=>f,PO:()=>y,PU:()=>m,f7:()=>b,gJ:()=>l,vH:()=>w});var s=r(9404),n=r(7116),o=r(3033),i=r(5592),a=r(413),c=r(2486).lW;const u="Cannot merge txs. Multisig preimages differ",d="Cannot mutate a multisig field as it would invalidate all existing signatures.";function l(e,{version:t,threshold:r,addrs:s}){const i=s.map((e=>n.decodeAddress(e).publicKey)),a={v:t,thr:r,subsig:i.map((e=>({pk:c.from(e)})))},u=e.get_obj_for_encoding(),d={msig:a,txn:u},l=n.fromMultisigPreImg({version:t,threshold:r,pks:i});return n.encodeAddress(u.snd)!==n.encodeAddress(l)&&(d.sgnr=c.from(l)),new Uint8Array(o.encode(d))}function h(e,{rawSig:t,myPk:r},{version:i,threshold:a,pks:u}){const d=l(e,{version:i,threshold:a,addrs:u.map((e=>n.encodeAddress(e)))}),h=o.decode(d);let p=!1;if(h.msig.subsig.forEach(((e,n)=>{s.bytesEqual(e.pk,r)&&(p=!0,h.msig.subsig[n].s=t)})),!1===p)throw new Error("Key does not exist");const f=n.fromMultisigPreImg({version:i,threshold:a,pks:u});return n.encodeAddress(h.txn.snd)!==n.encodeAddress(f)&&(h.sgnr=c.from(f)),new Uint8Array(o.encode(h))}class p extends i.Transaction{addLease(){throw new Error(d)}addRekey(){throw new Error(d)}signTxn(e){throw new Error("Cannot sign a multisig transaction using `signTxn`. Use `partialSignTxn` instead.")}partialSignTxn({version:e,threshold:t,pks:r},n){const o=s.keyPairFromSecretKey(n).publicKey;return h(this,{rawSig:this.rawSignTxn(n),myPk:o},{version:e,threshold:t,pks:r})}partialSignWithMultisigSignature(e,t,r){if(!s.isValidSignatureLength(r.length))throw new Error("Cannot add multisig signature. Signature is not of the correct length.");return h(this,{rawSig:r,myPk:n.decodeAddress(t).publicKey},e)}static from_obj_for_encoding(e){return super.from_obj_for_encoding(e)}}function f(e){if(e.length<2)throw new Error("Not enough multisig transactions to merge. Need at least two");const t=o.decode(e[0]),r=p.from_obj_for_encoding(t.txn).txID(),s=t.sgnr?n.encodeAddress(t.sgnr):void 0,i={version:t.msig.v,threshold:t.msig.thr,pks:t.msig.subsig.map((e=>e.pk))},a=n.encodeAddress(n.fromMultisigPreImg(i)),d=t.msig.subsig.map((e=>({...e})));for(let i=1;i<e.length;i++){const l=o.decode(e[i]);if(p.from_obj_for_encoding(l.txn).txID()!==r)throw new Error("Cannot merge txs. txIDs differ");if(s!==(l.sgnr?n.encodeAddress(l.sgnr):void 0))throw new Error("Cannot merge txs. Auth addrs differ");if(l.msig.subsig.length!==t.msig.subsig.length)throw new Error(u);const h={version:l.msig.v,threshold:l.msig.thr,pks:l.msig.subsig.map((e=>e.pk))};if(a!==n.encodeAddress(n.fromMultisigPreImg(h)))throw new Error(u);l.msig.subsig.forEach(((e,t)=>{if(!e.s)return;const r=d[t];if(r.s&&0!==c.compare(c.from(e.s),c.from(r.s)))throw new Error("Cannot merge txs. subsigs are mismatched.");r.s=e.s}))}const l={msig:{v:t.msig.v,thr:t.msig.thr,subsig:d},txn:t.txn};return void 0!==s&&(l.sgnr=c.from(n.decodeAddress(s).publicKey)),new Uint8Array(o.encode(l))}function g(e,t,r){const o=t.v,i=t.thr,c=t.subsig,u=c.map((e=>e.pk));if(t.subsig.length<i)return!1;let d;try{d=n.fromMultisigPreImg({version:o,threshold:i,pks:u})}catch(e){return!1}if(!a.arrayEqual(d,r))return!1;let l=0;for(const e of c)void 0!==e.s&&(l+=1);if(l<i)return!1;let h=0;for(const t of c)void 0!==t.s&&s.verify(e,t.s,t.pk)&&(h+=1);return!(h<i)}function m(e,{version:t,threshold:r,addrs:s},o){const a=n.fromMultisigPreImgAddrs({version:t,threshold:r,addrs:s});Object.prototype.hasOwnProperty.call(e,"from")||(e.from=a);const c=s.map((e=>n.decodeAddress(e).publicKey));let u,d;return e instanceof i.Transaction?(u=e,d=p.prototype.partialSignTxn.call(u,{version:t,threshold:r,pks:c},o)):(u=new p(e),d=u.partialSignTxn({version:t,threshold:r,pks:c},o)),{txID:u.txID().toString(),blob:d}}function y(e,{version:t,threshold:r,addrs:s},i){const a=s.map((e=>n.decodeAddress(e).publicKey)),c=o.decode(e),u=p.from_obj_for_encoding(c.txn),d=u.partialSignTxn({version:t,threshold:r,pks:a},i);return{txID:u.txID().toString(),blob:f([e,d])}}function b(e,{version:t,threshold:r,addrs:s},i,a){const c=s.map((e=>n.decodeAddress(e).publicKey)),u=o.decode(e),d=p.from_obj_for_encoding(u.txn),l=d.partialSignWithMultisigSignature({version:t,threshold:r,pks:c},i,a);return{txID:d.txID().toString(),blob:f([e,l])}}function w({version:e,threshold:t,addrs:r}){return n.fromMultisigPreImgAddrs({version:e,threshold:t,addrs:r})}},9404:(e,t,r)=>{"use strict";r.r(t),r.d(t,{HASH_BYTES_LENGTH:()=>b,PUBLIC_KEY_LENGTH:()=>m,SECRET_KEY_LENGTH:()=>y,SEED_BTYES_LENGTH:()=>w,bytesEqual:()=>f,genericHash:()=>a,isValidSignatureLength:()=>l,keyPair:()=>d,keyPairFromSecretKey:()=>h,keyPairFromSeed:()=>u,randomBytes:()=>c,sign:()=>p,verify:()=>g});var s=r(7765),n=r.n(s),o=r(9757),i=r.n(o);function a(e){return i().sha512_256.array(e)}function c(e){return n().randomBytes(e)}function u(e){return n().sign.keyPair.fromSeed(e)}function d(){return u(c(n().box.secretKeyLength))}function l(e){return e===n().sign.signatureLength}function h(e){return n().sign.keyPair.fromSecretKey(e)}function p(e,t){return n().sign.detached(e,t)}function f(e,t){return n().verify(e,t)}function g(e,t,r){return n().sign.detached.verify(e,t,r)}const m=n().sign.publicKeyLength,y=n().sign.secretKeyLength,b=32,w=32},834:(e,t,r)=>{"use strict";r.d(t,{Vj:()=>a,Xw:()=>c,i1:()=>i,x7:()=>o});var s=r(8800),n=r(4158);function o(e){return(t,r)=>{const s=[];for(const n of r)s.push(t[n].signTxn(e.sk));return Promise.resolve(s)}}function i(e){return(t,r)=>{const n=[];for(const o of r){const{blob:r}=(0,s.signLogicSigTransactionObject)(t[o],e);n.push(r)}return Promise.resolve(n)}}function a(e,t){return(r,s)=>{const o=[];for(const i of s){const s=r[i],a=[];for(const r of t){const{blob:t}=(0,n.PU)(s,e,r);a.push(t)}o.push((0,n.J6)(a))}return Promise.resolve(o)}}function c(e){return"object"==typeof e&&2===Object.keys(e).length&&"object"==typeof e.txn&&"function"==typeof e.signer}},5592:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ALGORAND_MIN_TX_FEE:()=>l,Transaction:()=>p,decodeSignedTransaction:()=>m,decodeUnsignedTransaction:()=>g,default:()=>b,encodeUnsignedTransaction:()=>f,instantiateTxnIfNeeded:()=>y});var s=r(7267),n=r.n(s),o=r(7116),i=r(3033),a=r(9404),c=r(413);var u=r(1624),d=r(2486).lW;const l=1e3;function h(e,t,r){if(null==e)return;let s;if("string"==typeof e?s=d.from(e,"base64"):e.constructor===Uint8Array?s=d.from(e):d.isBuffer(e)&&(s=e),null==s||s.byteLength!==r)throw Error(`${t} must be a ${r} byte Uint8Array or Buffer or base64 string.`);return s}class p{constructor({...e}){this.name="Transaction",this.tag=d.from("TX");const t={type:u.iU.pay,flatFee:!1,nonParticipation:!1};if(void 0===e.type&&(e.type=t.type),void 0===e.flatFee&&(e.flatFee=t.flatFee),e.type===u.iU.keyreg&&void 0!==e.voteKey&&void 0===e.nonParticipation&&(e.nonParticipation=t.nonParticipation),void 0!==e.suggestedParams){const t=e;t.genesisHash=t.suggestedParams.genesisHash,t.fee=t.suggestedParams.fee,void 0!==t.suggestedParams.flatFee&&(t.flatFee=t.suggestedParams.flatFee),t.firstRound=t.suggestedParams.firstRound,t.lastRound=t.suggestedParams.lastRound,t.genesisID=t.suggestedParams.genesisID}const r=e;if(r.from=o.decodeAddress(r.from),void 0!==r.to&&(r.to=o.decodeAddress(r.to)),void 0!==r.closeRemainderTo&&(r.closeRemainderTo=o.decodeAddress(r.closeRemainderTo)),void 0!==r.assetManager&&(r.assetManager=o.decodeAddress(r.assetManager)),void 0!==r.assetReserve&&(r.assetReserve=o.decodeAddress(r.assetReserve)),void 0!==r.assetFreeze&&(r.assetFreeze=o.decodeAddress(r.assetFreeze)),void 0!==r.assetClawback&&(r.assetClawback=o.decodeAddress(r.assetClawback)),void 0!==r.assetRevocationTarget&&(r.assetRevocationTarget=o.decodeAddress(r.assetRevocationTarget)),void 0!==r.freezeAccount&&(r.freezeAccount=o.decodeAddress(r.freezeAccount)),void 0!==r.reKeyTo&&(r.reKeyTo=o.decodeAddress(r.reKeyTo)),void 0===r.genesisHash)throw Error("genesis hash must be specified and in a base64 string.");if(r.genesisHash=d.from(r.genesisHash,"base64"),void 0!==r.amount&&(!(Number.isSafeInteger(r.amount)||"bigint"==typeof r.amount&&r.amount<=BigInt("0xffffffffffffffff"))||r.amount<0))throw Error("Amount must be a positive number and smaller than 2^64-1. If the number is larger than 2^53-1, use bigint.");if(!Number.isSafeInteger(r.fee)||r.fee<0)throw Error("fee must be a positive number and smaller than 2^53-1");if(!Number.isSafeInteger(r.firstRound)||r.firstRound<0)throw Error("firstRound must be a positive number");if(!Number.isSafeInteger(r.lastRound)||r.lastRound<0)throw Error("lastRound must be a positive number");if(void 0!==r.extraPages&&(!Number.isInteger(r.extraPages)||r.extraPages<0||r.extraPages>3))throw Error("extraPages must be an Integer between and including 0 to 3");if(void 0!==r.assetTotal&&(!(Number.isSafeInteger(r.assetTotal)||"bigint"==typeof r.assetTotal&&r.assetTotal<=BigInt("0xffffffffffffffff"))||r.assetTotal<0))throw Error("Total asset issuance must be a positive number and smaller than 2^64-1. If the number is larger than 2^53-1, use bigint.");if(void 0!==r.assetDecimals&&(!Number.isSafeInteger(r.assetDecimals)||r.assetDecimals<0||r.assetDecimals>19))throw Error(`assetDecimals must be a positive number and smaller than ${19..toString()}`);if(void 0!==r.assetIndex&&(!Number.isSafeInteger(r.assetIndex)||r.assetIndex<0))throw Error("Asset index must be a positive number and smaller than 2^53-1");if(void 0!==r.appIndex&&(!Number.isSafeInteger(r.appIndex)||r.appIndex<0))throw Error("Application index must be a positive number and smaller than 2^53-1");if(void 0!==r.appLocalInts&&(!Number.isSafeInteger(r.appLocalInts)||r.appLocalInts<0))throw Error("Application local ints count must be a positive number and smaller than 2^53-1");if(void 0!==r.appLocalByteSlices&&(!Number.isSafeInteger(r.appLocalByteSlices)||r.appLocalByteSlices<0))throw Error("Application local byte slices count must be a positive number and smaller than 2^53-1");if(void 0!==r.appGlobalInts&&(!Number.isSafeInteger(r.appGlobalInts)||r.appGlobalInts<0))throw Error("Application global ints count must be a positive number and smaller than 2^53-1");if(void 0!==r.appGlobalByteSlices&&(!Number.isSafeInteger(r.appGlobalByteSlices)||r.appGlobalByteSlices<0))throw Error("Application global byte slices count must be a positive number and smaller than 2^53-1");if(void 0!==r.appApprovalProgram&&r.appApprovalProgram.constructor!==Uint8Array)throw Error("appApprovalProgram must be a Uint8Array.");if(void 0!==r.appClearProgram&&r.appClearProgram.constructor!==Uint8Array)throw Error("appClearProgram must be a Uint8Array.");if(void 0!==r.appArgs){if(!Array.isArray(r.appArgs))throw Error("appArgs must be an Array of Uint8Array.");r.appArgs=r.appArgs.slice(),r.appArgs.forEach((e=>{if(e.constructor!==Uint8Array)throw Error("each element of AppArgs must be a Uint8Array.")}))}else r.appArgs=[];if(void 0!==r.appAccounts){if(!Array.isArray(r.appAccounts))throw Error("appAccounts must be an Array of addresses.");r.appAccounts=r.appAccounts.map((e=>o.decodeAddress(e)))}if(void 0!==r.appForeignApps){if(!Array.isArray(r.appForeignApps))throw Error("appForeignApps must be an Array of integers.");r.appForeignApps=r.appForeignApps.slice(),r.appForeignApps.forEach((e=>{if(!Number.isSafeInteger(e)||e<0)throw Error("each foreign application index must be a positive number and smaller than 2^53-1")}))}if(void 0!==r.appForeignAssets){if(!Array.isArray(r.appForeignAssets))throw Error("appForeignAssets must be an Array of integers.");r.appForeignAssets=r.appForeignAssets.slice(),r.appForeignAssets.forEach((e=>{if(!Number.isSafeInteger(e)||e<0)throw Error("each foreign asset index must be a positive number and smaller than 2^53-1")}))}if(void 0!==r.boxes){if(!Array.isArray(r.boxes))throw Error("boxes must be an Array of BoxReference.");r.boxes=r.boxes.slice(),r.boxes.forEach((e=>{if(!Number.isSafeInteger(e.appIndex)||e.name.constructor!==Uint8Array)throw Error("box app index must be a number and name must be an Uint8Array.")}))}if(void 0!==r.assetMetadataHash&&0!==r.assetMetadataHash.length){if("string"==typeof r.assetMetadataHash&&(r.assetMetadataHash=new Uint8Array(d.from(r.assetMetadataHash))),r.assetMetadataHash.constructor!==Uint8Array||32!==r.assetMetadataHash.byteLength)throw Error("assetMetadataHash must be a 32 byte Uint8Array or string.");r.assetMetadataHash.every((e=>0===e))&&(r.assetMetadataHash=void 0)}else r.assetMetadataHash=void 0;if(void 0!==r.note){if(r.note.constructor!==Uint8Array)throw Error("note must be a Uint8Array.")}else r.note=new Uint8Array(0);if(void 0!==r.lease){if(r.lease.constructor!==Uint8Array)throw Error("lease must be a Uint8Array.");if(32!==r.lease.length)throw Error(`lease must be of length ${32..toString()}.`);r.lease.every((e=>0===e))&&(r.lease=new Uint8Array(0))}else r.lease=new Uint8Array(0);if(r.voteKey=h(r.voteKey,"voteKey",32),r.selectionKey=h(r.selectionKey,"selectionKey",32),r.stateProofKey=h(r.stateProofKey,"stateProofKey",64),r.nonParticipation&&(r.voteKey||r.selectionKey||r.voteFirst||r.stateProofKey||r.voteLast||r.voteKeyDilution))throw new Error("nonParticipation is true but participation params are present.");if(!r.nonParticipation&&(r.voteKey||r.selectionKey||r.stateProofKey||r.voteFirst||r.voteLast||r.voteKeyDilution)&&!(r.voteKey&&r.selectionKey&&r.voteFirst&&r.voteLast&&r.voteKeyDilution))throw new Error("online key registration missing at least one of the following fields: voteKey, selectionKey, voteFirst, voteLast, voteKeyDilution");if(delete r.suggestedParams,Object.assign(this,c.removeUndefinedProperties(r)),r.flatFee||(this.fee*=this.estimateSize(),this.fee<l&&(this.fee=l)),this.group=void 0,void 0!==r.stateProofType&&(!Number.isSafeInteger(r.stateProofType)||r.stateProofType<0))throw Error("State Proof type must be a positive number and smaller than 2^53-1");if(void 0!==r.stateProofMessage){if(r.stateProofMessage.constructor!==Uint8Array)throw Error("stateProofMessage must be a Uint8Array.")}else r.stateProofMessage=new Uint8Array(0);if(void 0!==r.stateProof){if(r.stateProof.constructor!==Uint8Array)throw Error("stateProof must be a Uint8Array.")}else r.stateProof=new Uint8Array(0)}get_obj_for_encoding(){if("pay"===this.type){const e={amt:this.amount,fee:this.fee,fv:this.firstRound,lv:this.lastRound,note:d.from(this.note),snd:d.from(this.from.publicKey),type:"pay",gen:this.genesisID,gh:this.genesisHash,lx:d.from(this.lease),grp:this.group};return void 0!==this.closeRemainderTo&&o.encodeAddress(this.closeRemainderTo.publicKey)!==o.ALGORAND_ZERO_ADDRESS_STRING&&(e.close=d.from(this.closeRemainderTo.publicKey)),void 0!==this.reKeyTo&&(e.rekey=d.from(this.reKeyTo.publicKey)),void 0!==this.to&&(e.rcv=d.from(this.to.publicKey)),e.note.length||delete e.note,e.amt||delete e.amt,e.fee||delete e.fee,e.fv||delete e.fv,e.gen||delete e.gen,void 0===e.grp&&delete e.grp,e.lx.length||delete e.lx,e.rekey||delete e.rekey,e}if("keyreg"===this.type){const e={fee:this.fee,fv:this.firstRound,lv:this.lastRound,note:d.from(this.note),snd:d.from(this.from.publicKey),type:this.type,gen:this.genesisID,gh:this.genesisHash,lx:d.from(this.lease),grp:this.group,votekey:this.voteKey,selkey:this.selectionKey,sprfkey:this.stateProofKey,votefst:this.voteFirst,votelst:this.voteLast,votekd:this.voteKeyDilution};return e.note.length||delete e.note,e.lx.length||delete e.lx,e.fee||delete e.fee,e.fv||delete e.fv,e.gen||delete e.gen,void 0===e.grp&&delete e.grp,void 0!==this.reKeyTo&&(e.rekey=d.from(this.reKeyTo.publicKey)),this.nonParticipation&&(e.nonpart=!0),e.selkey||delete e.selkey,e.votekey||delete e.votekey,e.sprfkey||delete e.sprfkey,e.votefst||delete e.votefst,e.votelst||delete e.votelst,e.votekd||delete e.votekd,e}if("acfg"===this.type){const e={fee:this.fee,fv:this.firstRound,lv:this.lastRound,note:d.from(this.note),snd:d.from(this.from.publicKey),type:this.type,gen:this.genesisID,gh:this.genesisHash,lx:d.from(this.lease),grp:this.group,caid:this.assetIndex,apar:{t:this.assetTotal,df:this.assetDefaultFrozen,dc:this.assetDecimals}};return void 0!==this.assetManager&&(e.apar.m=d.from(this.assetManager.publicKey)),void 0!==this.assetReserve&&(e.apar.r=d.from(this.assetReserve.publicKey)),void 0!==this.assetFreeze&&(e.apar.f=d.from(this.assetFreeze.publicKey)),void 0!==this.assetClawback&&(e.apar.c=d.from(this.assetClawback.publicKey)),void 0!==this.assetName&&(e.apar.an=this.assetName),void 0!==this.assetUnitName&&(e.apar.un=this.assetUnitName),void 0!==this.assetURL&&(e.apar.au=this.assetURL),void 0!==this.assetMetadataHash&&(e.apar.am=d.from(this.assetMetadataHash)),e.note.length||delete e.note,e.lx.length||delete e.lx,e.amt||delete e.amt,e.fee||delete e.fee,e.fv||delete e.fv,e.gen||delete e.gen,void 0!==this.reKeyTo&&(e.rekey=d.from(this.reKeyTo.publicKey)),e.caid||delete e.caid,e.apar.t||e.apar.un||e.apar.an||e.apar.df||e.apar.m||e.apar.r||e.apar.f||e.apar.c||e.apar.au||e.apar.am||e.apar.dc?(e.apar.t||delete e.apar.t,e.apar.dc||delete e.apar.dc,e.apar.un||delete e.apar.un,e.apar.an||delete e.apar.an,e.apar.df||delete e.apar.df,e.apar.m||delete e.apar.m,e.apar.r||delete e.apar.r,e.apar.f||delete e.apar.f,e.apar.c||delete e.apar.c,e.apar.au||delete e.apar.au,e.apar.am||delete e.apar.am):delete e.apar,void 0===e.grp&&delete e.grp,e}if("axfer"===this.type){const e={aamt:this.amount,fee:this.fee,fv:this.firstRound,lv:this.lastRound,note:d.from(this.note),snd:d.from(this.from.publicKey),arcv:d.from(this.to.publicKey),type:this.type,gen:this.genesisID,gh:this.genesisHash,lx:d.from(this.lease),grp:this.group,xaid:this.assetIndex};return void 0!==this.closeRemainderTo&&(e.aclose=d.from(this.closeRemainderTo.publicKey)),void 0!==this.assetRevocationTarget&&(e.asnd=d.from(this.assetRevocationTarget.publicKey)),e.note.length||delete e.note,e.lx.length||delete e.lx,e.aamt||delete e.aamt,e.amt||delete e.amt,e.fee||delete e.fee,e.fv||delete e.fv,e.gen||delete e.gen,void 0===e.grp&&delete e.grp,e.aclose||delete e.aclose,e.asnd||delete e.asnd,e.rekey||delete e.rekey,void 0!==this.reKeyTo&&(e.rekey=d.from(this.reKeyTo.publicKey)),e}if("afrz"===this.type){const e={fee:this.fee,fv:this.firstRound,lv:this.lastRound,note:d.from(this.note),snd:d.from(this.from.publicKey),type:this.type,gen:this.genesisID,gh:this.genesisHash,lx:d.from(this.lease),grp:this.group,faid:this.assetIndex,afrz:this.freezeState};return void 0!==this.freezeAccount&&(e.fadd=d.from(this.freezeAccount.publicKey)),e.note.length||delete e.note,e.lx.length||delete e.lx,e.amt||delete e.amt,e.fee||delete e.fee,e.fv||delete e.fv,e.gen||delete e.gen,e.afrz||delete e.afrz,void 0===e.grp&&delete e.grp,void 0!==this.reKeyTo&&(e.rekey=d.from(this.reKeyTo.publicKey)),e}if("appl"===this.type){const s={fee:this.fee,fv:this.firstRound,lv:this.lastRound,note:d.from(this.note),snd:d.from(this.from.publicKey),type:this.type,gen:this.genesisID,gh:this.genesisHash,lx:d.from(this.lease),grp:this.group,apid:this.appIndex,apan:this.appOnComplete,apls:{nui:this.appLocalInts,nbs:this.appLocalByteSlices},apgs:{nui:this.appGlobalInts,nbs:this.appGlobalByteSlices},apfa:this.appForeignApps,apas:this.appForeignAssets,apep:this.extraPages,apbx:(e=this.boxes,t=this.appForeignApps,r=this.appIndex,null==e?[]:e.map((e=>function(e,t,r){const s=e.appIndex,n=e.name,o=0===s||s===r;let i=0;if(null!=t&&(i=t.indexOf(s)+1),0===i&&!o)throw new Error(`Box ref with appId ${s} not in foreign-apps`);return{i,n}}(e,t,r))))};void 0!==this.reKeyTo&&(s.rekey=d.from(this.reKeyTo.publicKey)),void 0!==this.appApprovalProgram&&(s.apap=d.from(this.appApprovalProgram)),void 0!==this.appClearProgram&&(s.apsu=d.from(this.appClearProgram)),void 0!==this.appArgs&&(s.apaa=this.appArgs.map((e=>d.from(e)))),void 0!==this.appAccounts&&(s.apat=this.appAccounts.map((e=>d.from(e.publicKey)))),s.note.length||delete s.note,s.lx.length||delete s.lx,s.amt||delete s.amt,s.fee||delete s.fee,s.fv||delete s.fv,s.gen||delete s.gen,s.apid||delete s.apid,s.apls.nui||delete s.apls.nui,s.apls.nbs||delete s.apls.nbs,s.apls.nui||s.apls.nbs||delete s.apls,s.apgs.nui||delete s.apgs.nui,s.apgs.nbs||delete s.apgs.nbs,s.apaa&&s.apaa.length||delete s.apaa,s.apgs.nui||s.apgs.nbs||delete s.apgs,s.apap||delete s.apap,s.apsu||delete s.apsu,s.apan||delete s.apan,s.apfa&&s.apfa.length||delete s.apfa,s.apas&&s.apas.length||delete s.apas;for(const e of s.apbx)e.i||delete e.i,e.n&&e.n.length||delete e.n;return s.apbx&&s.apbx.length||delete s.apbx,s.apat&&s.apat.length||delete s.apat,s.apep||delete s.apep,void 0===s.grp&&delete s.grp,s}var e,t,r;if("stpf"===this.type){const e={fee:this.fee,fv:this.firstRound,lv:this.lastRound,note:d.from(this.note),snd:d.from(this.from.publicKey),type:this.type,gen:this.genesisID,gh:this.genesisHash,lx:d.from(this.lease),sptype:this.stateProofType,spmsg:d.from(this.stateProofMessage),sp:d.from(this.stateProof)};return e.sptype||delete e.sptype,e.note.length||delete e.note,e.lx.length||delete e.lx,e.amt||delete e.amt,e.fee||delete e.fee,e.fv||delete e.fv,e.gen||delete e.gen,e.apid||delete e.apid,e.apaa&&e.apaa.length||delete e.apaa,e.apap||delete e.apap,e.apsu||delete e.apsu,e.apan||delete e.apan,e.apfa&&e.apfa.length||delete e.apfa,e.apas&&e.apas.length||delete e.apas,e.apat&&e.apat.length||delete e.apat,e.apep||delete e.apep,void 0===e.grp&&delete e.grp,e}}static from_obj_for_encoding(e){const t=Object.create(this.prototype);if(t.name="Transaction",t.tag=d.from("TX"),t.genesisID=e.gen,t.genesisHash=d.from(e.gh),!(0,u.v8)(e.type))throw new Error(`Unrecognized transaction type: ${e.type}`);return 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=o.decodeAddress(o.encodeAddress(new Uint8Array(e.snd))),void 0!==e.grp&&(t.group=d.from(e.grp)),void 0!==e.rekey&&(t.reKeyTo=o.decodeAddress(o.encodeAddress(new Uint8Array(e.rekey)))),"pay"===e.type?(t.amount=e.amt,t.to=o.decodeAddress(o.encodeAddress(new Uint8Array(e.rcv))),void 0!==e.close&&(t.closeRemainderTo=o.decodeAddress(o.encodeAddress(e.close)))):"keyreg"===e.type?(void 0!==e.votekey&&(t.voteKey=d.from(e.votekey)),void 0!==e.selkey&&(t.selectionKey=d.from(e.selkey)),void 0!==e.sprfkey&&(t.stateProofKey=d.from(e.sprfkey)),void 0!==e.votekd&&(t.voteKeyDilution=e.votekd),void 0!==e.votefst&&(t.voteFirst=e.votefst),void 0!==e.votelst&&(t.voteLast=e.votelst),void 0!==e.nonpart&&(t.nonParticipation=e.nonpart)):"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=o.decodeAddress(o.encodeAddress(new Uint8Array(e.apar.m)))),void 0!==e.apar.r&&(t.assetReserve=o.decodeAddress(o.encodeAddress(new Uint8Array(e.apar.r)))),void 0!==e.apar.f&&(t.assetFreeze=o.decodeAddress(o.encodeAddress(new Uint8Array(e.apar.f)))),void 0!==e.apar.c&&(t.assetClawback=o.decodeAddress(o.encodeAddress(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=o.decodeAddress(o.encodeAddress(new Uint8Array(e.aclose)))),void 0!==e.asnd&&(t.assetRevocationTarget=o.decodeAddress(o.encodeAddress(new Uint8Array(e.asnd)))),t.to=o.decodeAddress(o.encodeAddress(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=o.decodeAddress(o.encodeAddress(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.apep&&(t.extraPages=e.apep),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.map((e=>new Uint8Array(e)))),void 0!==e.apat&&(t.appAccounts=e.apat.map((e=>o.decodeAddress(o.encodeAddress(new Uint8Array(e)))))),void 0!==e.apfa&&(t.appForeignApps=e.apfa),void 0!==e.apas&&(t.appForeignAssets=e.apas),void 0!==e.apbx&&(t.boxes=e.apbx.map((e=>({appIndex:e.i?t.appForeignApps[e.i-1]:0,name:e.n}))))):"stpf"===e.type&&(void 0!==e.sptype&&(t.stateProofType=e.sptype),void 0!==e.sp&&(t.stateProof=e.sp),void 0!==e.spmsg&&(t.stateProofMessage=e.spmsg)),t}estimateSize(){return this.toByte().length+75}bytesToSign(){const e=this.toByte();return d.from(c.concatArrays(this.tag,e))}toByte(){return i.encode(this.get_obj_for_encoding())}rawSignTxn(e){const t=this.bytesToSign(),r=a.sign(t,e);return d.from(r)}signTxn(e){const t={sig:this.rawSignTxn(e),txn:this.get_obj_for_encoding()},r=a.keyPairFromSecretKey(e).publicKey;return o.encodeAddress(r)!==o.encodeAddress(this.from.publicKey)&&(t.sgnr=d.from(r)),new Uint8Array(i.encode(t))}attachSignature(e,t){if(!a.isValidSignatureLength(t.length))throw new Error("Invalid signature length");const r={sig:d.from(t),txn:this.get_obj_for_encoding()};if(e!==o.encodeAddress(this.from.publicKey)){const t=o.decodeAddress(e).publicKey;r.sgnr=d.from(t)}return new Uint8Array(i.encode(r))}rawTxID(){const e=this.toByte(),t=d.from(c.concatArrays(this.tag,e));return d.from(a.genericHash(t))}txID(){const e=this.rawTxID();return n().encode(e).slice(0,52)}addLease(e,t=0){let r;if(void 0!==e){if(e.constructor!==Uint8Array)throw Error("lease must be a Uint8Array.");if(32!==e.length)throw Error(`lease must be of length ${32..toString()}.`);r=new Uint8Array(e)}else r=new Uint8Array(0);this.lease=r,0!==t&&(this.fee+=37*t)}addRekey(e,t=0){void 0!==e&&(this.reKeyTo=o.decodeAddress(e)),0!==t&&(this.fee+=37*t)}_getDictForDisplay(){const e={...this};return e.tag=e.tag.toString(),e.from=o.encodeAddress(e.from.publicKey),void 0!==e.to&&(e.to=o.encodeAddress(e.to.publicKey)),void 0!==e.freezeAccount&&(e.freezeAccount=o.encodeAddress(e.freezeAccount.publicKey)),void 0!==e.closeRemainderTo&&(e.closeRemainderTo=o.encodeAddress(e.closeRemainderTo.publicKey)),void 0!==e.assetManager&&(e.assetManager=o.encodeAddress(e.assetManager.publicKey)),void 0!==e.assetReserve&&(e.assetReserve=o.encodeAddress(e.assetReserve.publicKey)),void 0!==e.assetFreeze&&(e.assetFreeze=o.encodeAddress(e.assetFreeze.publicKey)),void 0!==e.assetClawback&&(e.assetClawback=o.encodeAddress(e.assetClawback.publicKey)),void 0!==e.assetRevocationTarget&&(e.assetRevocationTarget=o.encodeAddress(e.assetRevocationTarget.publicKey)),void 0!==e.reKeyTo&&(e.reKeyTo=o.encodeAddress(e.reKeyTo.publicKey)),e.genesisHash=e.genesisHash.toString("base64"),e}prettyPrint(){console.log(this._getDictForDisplay())}toString(){return JSON.stringify(this._getDictForDisplay())}}function f(e){const t=e.get_obj_for_encoding();return i.encode(t)}function g(e){const t=i.decode(e);return p.from_obj_for_encoding(t)}function m(e){const t=i.decode(e);return{...t,txn:p.from_obj_for_encoding(t.txn)}}function y(e){return e instanceof p?e:new p(e)}const b=p},2380:(e,t,r)=>{"use strict";r.d(t,{i:()=>s.i});var s=r(1824)},7197:(e,t,r)=>{"use strict";var s;r.d(t,{Z:()=>n}),function(e){e.DEFAULT="default",e.SAFE="safe",e.MIXED="mixed",e.BIGINT="bigint"}(s||(s={}));const n=s},1624:(e,t,r)=>{"use strict";var s,n;function o(e){return e===s.pay||e===s.keyreg||e===s.acfg||e===s.axfer||e===s.afrz||e===s.appl||e===s.stpf}r.d(t,{hq:()=>n,iU:()=>s,v8:()=>o}),function(e){e.pay="pay",e.keyreg="keyreg",e.acfg="acfg",e.axfer="axfer",e.afrz="afrz",e.appl="appl",e.stpf="stpf"}(s||(s={})),function(e){e[e.NoOpOC=0]="NoOpOC",e[e.OptInOC=1]="OptInOC",e[e.CloseOutOC=2]="CloseOutOC",e[e.ClearStateOC=3]="ClearStateOC",e[e.UpdateApplicationOC=4]="UpdateApplicationOC",e[e.DeleteApplicationOC=5]="DeleteApplicationOC"}(n||(n={}))},1824:(e,t,r)=>{"use strict";r.d(t,{i:()=>s.iU});var s=r(1624)},413:(e,t,r)=>{"use strict";r.r(t),r.d(t,{arrayEqual:()=>c,concatArrays:()=>u,isNode:()=>l,parseJSON:()=>a,removeUndefinedProperties:()=>d});var s=r(4360),n=r.n(s),o=r(7197);const i=n()({useNativeBigInt:!0,strict:!0});function a(e,t){const r=t&&t.intDecoding?t.intDecoding:o.Z.DEFAULT;return i.parse(e,((e,t)=>{if(null!=t&&"object"==typeof t&&null==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,Object.prototype),"bigint"==typeof t){if("safe"===r&&t>Number.MAX_SAFE_INTEGER)throw new Error(`Integer exceeds maximum safe integer: ${t.toString()}. Try parsing with a different intDecoding option.`);return"bigint"===r||"mixed"===r&&t>Number.MAX_SAFE_INTEGER?t:Number(t)}return"number"==typeof t&&"bigint"===r&&Number.isInteger(t)?BigInt(t):t}))}function c(e,t){return e.length===t.length&&Array.from(e).every(((e,r)=>e===t[r]))}function u(...e){const t=e.reduce(((e,t)=>e+t.length),0),r=new Uint8Array(t);let s=0;for(let t=0;t<e.length;t++)r.set(e[t],s),s+=e[t].length;return r}function d(e){const t={...e};return Object.keys(t).forEach((e=>{void 0===t[e]&&delete t[e]})),t}function l(){return"object"==typeof process&&"object"==typeof process.versions&&void 0!==process.versions.node}},5062:(e,t,r)=>{"use strict";async function s(e,t,r){const s=await e.status().do();if(void 0===s)throw new Error("Unable to get node status");const n=s["last-round"]+1;let o=n;for(;o<n+r;){let r=!1;try{const s=await e.pendingTransactionInformation(t).do();if(s["confirmed-round"])return s;if(s["pool-error"])throw r=!0,new Error(`Transaction Rejected: ${s["pool-error"]}`)}catch(e){if(r)throw e}await e.statusAfterBlock(o).do(),o+=1}throw new Error(`Transaction not confirmed after ${r} rounds`)}r.d(t,{K:()=>s})}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.exports}__webpack_require__.amdO={},__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>r});var e=__webpack_require__(6608),t={};for(const r in e)"default"!==r&&(t[r]=()=>e[r]);__webpack_require__.d(__webpack_exports__,t);const r=e})(),__webpack_exports__})()));
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.algosdk=t():e.algosdk=t()}(self,(()=>(()=>{var e={406:function(e){e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var s=t[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,r),s.l=!0,s.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)r.d(n,s,function(t){return e[t]}.bind(null,s));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){"use strict";r.r(t),r.d(t,"encode",(function(){return R})),r.d(t,"decode",(function(){return F})),r.d(t,"decodeAsync",(function(){return G})),r.d(t,"decodeArrayStream",(function(){return Y})),r.d(t,"decodeStream",(function(){return J})),r.d(t,"Decoder",(function(){return M})),r.d(t,"Encoder",(function(){return S})),r.d(t,"ExtensionCodec",(function(){return _})),r.d(t,"ExtData",(function(){return p})),r.d(t,"EXT_TIMESTAMP",(function(){return m})),r.d(t,"encodeDateToTimeSpec",(function(){return w})),r.d(t,"encodeTimeSpecToTimestamp",(function(){return y})),r.d(t,"decodeTimestampToTimeSpec",(function(){return v})),r.d(t,"encodeTimestampExtension",(function(){return b})),r.d(t,"decodeTimestampExtension",(function(){return x}));var n=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,s,i=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){s={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(s)throw s.error}}return o},s=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(n(arguments[t]));return e},i="undefined"!=typeof process&&"undefined"!=typeof TextEncoder&&"undefined"!=typeof TextDecoder;function o(e){for(var t=e.length,r=0,n=0;n<t;){var s=e.charCodeAt(n++);if(0!=(4294967168&s))if(0==(4294965248&s))r+=2;else{if(s>=55296&&s<=56319&&n<t){var i=e.charCodeAt(n);56320==(64512&i)&&(++n,s=((1023&s)<<10)+(1023&i)+65536)}r+=0==(4294901760&s)?3:4}else r++}return r}var a=i?new TextEncoder:void 0,c="undefined"!=typeof process?200:0,u=(null==a?void 0:a.encodeInto)?function(e,t,r){a.encodeInto(e,t.subarray(r))}:function(e,t,r){t.set(a.encode(e),r)};function l(e,t,r){for(var n=t,i=n+r,o=[],a="";n<i;){var c=e[n++];if(0==(128&c))o.push(c);else if(192==(224&c)){var u=63&e[n++];o.push((31&c)<<6|u)}else if(224==(240&c)){u=63&e[n++];var l=63&e[n++];o.push((31&c)<<12|u<<6|l)}else if(240==(248&c)){var h=(7&c)<<18|(u=63&e[n++])<<12|(l=63&e[n++])<<6|63&e[n++];h>65535&&(h-=65536,o.push(h>>>10&1023|55296),h=56320|1023&h),o.push(h)}else o.push(c);o.length>=4096&&(a+=String.fromCharCode.apply(String,s(o)),o.length=0)}return o.length>0&&(a+=String.fromCharCode.apply(String,s(o))),a}var h=i?new TextDecoder:null,d="undefined"!=typeof process?200:0,p=function(e,t){this.type=e,this.data=t};function f(e,t,r){var n=Math.floor(r/4294967296),s=r;e.setUint32(t,n),e.setUint32(t+4,s)}function g(e,t){var r=e.getInt32(t),n=e.getUint32(t+4),s=r<Math.floor(Number.MIN_SAFE_INTEGER/4294967296)||r===Math.floor(Number.MIN_SAFE_INTEGER/4294967296)&&0===n,i=r>Math.floor(Number.MAX_SAFE_INTEGER/4294967296);return s||i?BigInt(r)*BigInt(4294967296)+BigInt(n):4294967296*r+n}var m=-1;function y(e){var t,r=e.sec,n=e.nsec;if(r>=0&&n>=0&&r<=17179869183){if(0===n&&r<=4294967295){var s=new Uint8Array(4);return(t=new DataView(s.buffer)).setUint32(0,r),s}var i=r/4294967296,o=4294967295&r;return s=new Uint8Array(8),(t=new DataView(s.buffer)).setUint32(0,n<<2|3&i),t.setUint32(4,o),s}return s=new Uint8Array(12),(t=new DataView(s.buffer)).setUint32(0,n),f(t,4,r),s}function w(e){var t=e.getTime(),r=Math.floor(t/1e3),n=1e6*(t-1e3*r),s=Math.floor(n/1e9);return{sec:r+s,nsec:n-1e9*s}}function b(e){return e instanceof Date?y(w(e)):null}function v(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);switch(e.byteLength){case 4:return{sec:t.getUint32(0),nsec:0};case 8:var r=t.getUint32(0);return{sec:4294967296*(3&r)+t.getUint32(4),nsec:r>>>2};case 12:return{sec:g(t,4),nsec:t.getUint32(0)};default:throw new Error("Unrecognized data size for timestamp: "+e.length)}}function x(e){var t=v(e);return new Date(1e3*t.sec+t.nsec/1e6)}var A={type:m,encode:b,decode:x},_=function(){function e(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(A)}return e.prototype.register=function(e){var t=e.type,r=e.encode,n=e.decode;if(t>=0)this.encoders[t]=r,this.decoders[t]=n;else{var s=1+t;this.builtInEncoders[s]=r,this.builtInDecoders[s]=n}},e.prototype.tryToEncode=function(e,t){for(var r=0;r<this.builtInEncoders.length;r++)if(null!=(n=this.builtInEncoders[r])&&null!=(s=n(e,t)))return new p(-1-r,s);for(r=0;r<this.encoders.length;r++){var n,s;if(null!=(n=this.encoders[r])&&null!=(s=n(e,t)))return new p(r,s)}return e instanceof p?e:null},e.prototype.decode=function(e,t,r){var n=t<0?this.builtInDecoders[-1-t]:this.decoders[t];return n?n(e,t,r):new p(t,e)},e.defaultCodec=new e,e}();function E(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e instanceof ArrayBuffer?new Uint8Array(e):Uint8Array.from(e)}var T=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},S=function(){function e(e,t,r,n,s,i,o,a){void 0===e&&(e=_.defaultCodec),void 0===t&&(t=void 0),void 0===r&&(r=100),void 0===n&&(n=2048),void 0===s&&(s=!1),void 0===i&&(i=!1),void 0===o&&(o=!1),void 0===a&&(a=!1),this.extensionCodec=e,this.context=t,this.maxDepth=r,this.initialBufferSize=n,this.sortKeys=s,this.forceFloat32=i,this.ignoreUndefined=o,this.forceIntegerToFloat=a,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}return e.prototype.getUint8Array=function(){return this.bytes.subarray(0,this.pos)},e.prototype.reinitializeState=function(){this.pos=0},e.prototype.encode=function(e){return this.reinitializeState(),this.doEncode(e,1),this.getUint8Array()},e.prototype.doEncode=function(e,t){if(t>this.maxDepth)throw new Error("Too deep objects in depth "+t);null==e?this.encodeNil():"boolean"==typeof e?this.encodeBoolean(e):"number"==typeof e?this.encodeNumber(e):"string"==typeof e?this.encodeString(e):"bigint"==typeof e?this.encodebigint(e):this.encodeObject(e,t)},e.prototype.ensureBufferSizeToWrite=function(e){var t=this.pos+e;this.view.byteLength<t&&this.resizeBuffer(2*t)},e.prototype.resizeBuffer=function(e){var t=new ArrayBuffer(e),r=new Uint8Array(t),n=new DataView(t);r.set(this.bytes),this.view=n,this.bytes=r},e.prototype.encodeNil=function(){this.writeU8(192)},e.prototype.encodeBoolean=function(e){!1===e?this.writeU8(194):this.writeU8(195)},e.prototype.encodeNumber=function(e){Number.isSafeInteger(e)&&!this.forceIntegerToFloat?e>=0?e<128?this.writeU8(e):e<256?(this.writeU8(204),this.writeU8(e)):e<65536?(this.writeU8(205),this.writeU16(e)):e<4294967296?(this.writeU8(206),this.writeU32(e)):(this.writeU8(207),this.writeU64(e)):e>=-32?this.writeU8(224|e+32):e>=-128?(this.writeU8(208),this.writeI8(e)):e>=-32768?(this.writeU8(209),this.writeI16(e)):e>=-2147483648?(this.writeU8(210),this.writeI32(e)):(this.writeU8(211),this.writeI64(e)):this.forceFloat32?(this.writeU8(202),this.writeF32(e)):(this.writeU8(203),this.writeF64(e))},e.prototype.encodebigint=function(e){e>=BigInt(0)?e<BigInt(128)?this.writeU8(Number(e)):e<BigInt(256)?(this.writeU8(204),this.writeU8(Number(e))):e<BigInt(65536)?(this.writeU8(205),this.writeU16(Number(e))):e<BigInt(4294967296)?(this.writeU8(206),this.writeU32(Number(e))):(this.writeU8(207),this.writeBig64(e)):e>=BigInt(-32)?this.writeU8(224|Number(e)+32):e>=BigInt(-128)?(this.writeU8(208),this.writeI8(Number(e))):e>=BigInt(-32768)?(this.writeU8(209),this.writeI16(Number(e))):e>=BigInt(-2147483648)?(this.writeU8(210),this.writeI32(Number(e))):(this.writeU8(211),this.writeBig64(e))},e.prototype.writeStringHeader=function(e){if(e<32)this.writeU8(160+e);else if(e<256)this.writeU8(217),this.writeU8(e);else if(e<65536)this.writeU8(218),this.writeU16(e);else{if(!(e<4294967296))throw new Error("Too long string: "+e+" bytes in UTF-8");this.writeU8(219),this.writeU32(e)}},e.prototype.encodeString=function(e){var t=e.length;if(i&&t>c){var r=o(e);this.ensureBufferSizeToWrite(5+r),this.writeStringHeader(r),u(e,this.bytes,this.pos),this.pos+=r}else r=o(e),this.ensureBufferSizeToWrite(5+r),this.writeStringHeader(r),function(e,t,r){for(var n=e.length,s=r,i=0;i<n;){var o=e.charCodeAt(i++);if(0!=(4294967168&o)){if(0==(4294965248&o))t[s++]=o>>6&31|192;else{if(o>=55296&&o<=56319&&i<n){var a=e.charCodeAt(i);56320==(64512&a)&&(++i,o=((1023&o)<<10)+(1023&a)+65536)}0==(4294901760&o)?(t[s++]=o>>12&15|224,t[s++]=o>>6&63|128):(t[s++]=o>>18&7|240,t[s++]=o>>12&63|128,t[s++]=o>>6&63|128)}t[s++]=63&o|128}else t[s++]=o}}(e,this.bytes,this.pos),this.pos+=r},e.prototype.encodeObject=function(e,t){var r=this.extensionCodec.tryToEncode(e,this.context);if(null!=r)this.encodeExtension(r);else if(Array.isArray(e))this.encodeArray(e,t);else if(ArrayBuffer.isView(e))this.encodeBinary(e);else{if("object"!=typeof e)throw new Error("Unrecognized object: "+Object.prototype.toString.apply(e));this.encodeMap(e,t)}},e.prototype.encodeBinary=function(e){var t=e.byteLength;if(t<256)this.writeU8(196),this.writeU8(t);else if(t<65536)this.writeU8(197),this.writeU16(t);else{if(!(t<4294967296))throw new Error("Too large binary: "+t);this.writeU8(198),this.writeU32(t)}var r=E(e);this.writeU8a(r)},e.prototype.encodeArray=function(e,t){var r,n,s=e.length;if(s<16)this.writeU8(144+s);else if(s<65536)this.writeU8(220),this.writeU16(s);else{if(!(s<4294967296))throw new Error("Too large array: "+s);this.writeU8(221),this.writeU32(s)}try{for(var i=T(e),o=i.next();!o.done;o=i.next()){var a=o.value;this.doEncode(a,t+1)}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},e.prototype.countWithoutUndefined=function(e,t){var r,n,s=0;try{for(var i=T(t),o=i.next();!o.done;o=i.next())void 0!==e[o.value]&&s++}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return s},e.prototype.encodeMap=function(e,t){var r,n,s=Object.keys(e);this.sortKeys&&s.sort();var i=this.ignoreUndefined?this.countWithoutUndefined(e,s):s.length;if(i<16)this.writeU8(128+i);else if(i<65536)this.writeU8(222),this.writeU16(i);else{if(!(i<4294967296))throw new Error("Too large map object: "+i);this.writeU8(223),this.writeU32(i)}try{for(var o=T(s),a=o.next();!a.done;a=o.next()){var c=a.value,u=e[c];this.ignoreUndefined&&void 0===u||(this.encodeString(c),this.doEncode(u,t+1))}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},e.prototype.encodeExtension=function(e){var t=e.data.length;if(1===t)this.writeU8(212);else if(2===t)this.writeU8(213);else if(4===t)this.writeU8(214);else if(8===t)this.writeU8(215);else if(16===t)this.writeU8(216);else if(t<256)this.writeU8(199),this.writeU8(t);else if(t<65536)this.writeU8(200),this.writeU16(t);else{if(!(t<4294967296))throw new Error("Too large extension object: "+t);this.writeU8(201),this.writeU32(t)}this.writeI8(e.type),this.writeU8a(e.data)},e.prototype.writeU8=function(e){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,e),this.pos++},e.prototype.writeU8a=function(e){var t=e.length;this.ensureBufferSizeToWrite(t),this.bytes.set(e,this.pos),this.pos+=t},e.prototype.writeI8=function(e){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,e),this.pos++},e.prototype.writeU16=function(e){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,e),this.pos+=2},e.prototype.writeI16=function(e){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,e),this.pos+=2},e.prototype.writeU32=function(e){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,e),this.pos+=4},e.prototype.writeI32=function(e){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,e),this.pos+=4},e.prototype.writeF32=function(e){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,e),this.pos+=4},e.prototype.writeF64=function(e){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,e),this.pos+=8},e.prototype.writeU64=function(e){this.ensureBufferSizeToWrite(8),function(e,t,r){var n=r/4294967296,s=r;e.setUint32(t,n),e.setUint32(t+4,s)}(this.view,this.pos,e),this.pos+=8},e.prototype.writeI64=function(e){this.ensureBufferSizeToWrite(8),f(this.view,this.pos,e),this.pos+=8},e.prototype.writeBig64=function(e){this.ensureBufferSizeToWrite(8),function(e,t,r){var n=Number(r/BigInt(4294967296)),s=Number(r%BigInt(4294967296));n<0&&0!==s&&(n-=1),e.setUint32(t,n),e.setUint32(t+4,s)}(this.view,this.pos,e),this.pos+=8},e}(),k={};function R(e,t){return void 0===t&&(t=k),new S(t.extensionCodec,t.context,t.maxDepth,t.initialBufferSize,t.sortKeys,t.forceFloat32,t.ignoreUndefined,t.forceIntegerToFloat).encode(e)}function I(e){return(e<0?"-":"")+"0x"+Math.abs(e).toString(16).padStart(2,"0")}var B=function(){function e(e,t){void 0===e&&(e=16),void 0===t&&(t=16),this.maxKeyLength=e,this.maxLengthPerKey=t,this.hit=0,this.miss=0,this.caches=[];for(var r=0;r<this.maxKeyLength;r++)this.caches.push([])}return e.prototype.canBeCached=function(e){return e>0&&e<=this.maxKeyLength},e.prototype.get=function(e,t,r){var n=this.caches[r-1],s=n.length;e:for(var i=0;i<s;i++){for(var o=n[i],a=o.bytes,c=0;c<r;c++)if(a[c]!==e[t+c])continue e;return o.value}return null},e.prototype.store=function(e,t){var r=this.caches[e.length-1],n={bytes:e,value:t};r.length>=this.maxLengthPerKey?r[Math.random()*r.length|0]=n:r.push(n)},e.prototype.decode=function(e,t,r){var n=this.get(e,t,r);if(null!=n)return this.hit++,n;this.miss++;var s=l(e,t,r),i=Uint8Array.prototype.slice.call(e,t,t+r);return this.store(i,s),s},e}(),U=function(e,t){var r,n,s,i,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(s=2&i[0]?n.return:i[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,i[1])).done)return s;switch(n=0,s&&(i=[2&i[0],s.value]),i[0]){case 0:case 1:s=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!s||i[1]>s[0]&&i[1]<s[3])){o.label=i[1];break}if(6===i[0]&&o.label<s[1]){o.label=s[1],s=i;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(i);break}s[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],n=0}finally{r=s=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},P=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,s){!function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}(n,s,(t=e[r](t)).done,t.value)}))}}},j=function(e){return this instanceof j?(this.v=e,this):new j(e)},q=function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,s=r.apply(e,t||[]),i=[];return n={},o("next"),o("throw"),o("return"),n[Symbol.asyncIterator]=function(){return this},n;function o(e){s[e]&&(n[e]=function(t){return new Promise((function(r,n){i.push([e,t,r,n])>1||a(e,t)}))})}function a(e,t){try{(r=s[e](t)).value instanceof j?Promise.resolve(r.value.v).then(c,u):l(i[0][2],r)}catch(e){l(i[0][3],e)}var r}function c(e){a("next",e)}function u(e){a("throw",e)}function l(e,t){e(t),i.shift(),i.length&&a(i[0][0],i[0][1])}},D=new DataView(new ArrayBuffer(0)),$=new Uint8Array(D.buffer),O=function(){try{D.getInt8(0)}catch(e){return e.constructor}throw new Error("never reached")}(),C=new O("Insufficient data"),L=new B,M=function(){function e(e,t,r,n,s,i,o,a){void 0===e&&(e=_.defaultCodec),void 0===t&&(t=void 0),void 0===r&&(r=4294967295),void 0===n&&(n=4294967295),void 0===s&&(s=4294967295),void 0===i&&(i=4294967295),void 0===o&&(o=4294967295),void 0===a&&(a=L),this.extensionCodec=e,this.context=t,this.maxStrLength=r,this.maxBinLength=n,this.maxArrayLength=s,this.maxMapLength=i,this.maxExtLength=o,this.keyDecoder=a,this.totalPos=0,this.pos=0,this.view=D,this.bytes=$,this.headByte=-1,this.stack=[]}return e.prototype.reinitializeState=function(){this.totalPos=0,this.headByte=-1},e.prototype.setBuffer=function(e){this.bytes=E(e),this.view=function(e){if(e instanceof ArrayBuffer)return new DataView(e);var t=E(e);return new DataView(t.buffer,t.byteOffset,t.byteLength)}(this.bytes),this.pos=0},e.prototype.appendBuffer=function(e){if(-1!==this.headByte||this.hasRemaining()){var t=this.bytes.subarray(this.pos),r=E(e),n=new Uint8Array(t.length+r.length);n.set(t),n.set(r,t.length),this.setBuffer(n)}else this.setBuffer(e)},e.prototype.hasRemaining=function(e){return void 0===e&&(e=1),this.view.byteLength-this.pos>=e},e.prototype.createNoExtraBytesError=function(e){var t=this.view,r=this.pos;return new RangeError("Extra "+(t.byteLength-r)+" of "+t.byteLength+" byte(s) found at buffer["+e+"]")},e.prototype.decode=function(e){return this.reinitializeState(),this.setBuffer(e),this.doDecodeSingleSync()},e.prototype.doDecodeSingleSync=function(){var e=this.doDecodeSync();if(this.hasRemaining())throw this.createNoExtraBytesError(this.pos);return e},e.prototype.decodeAsync=function(e){var t,r,n,s;return function(e,t,r,n){return new(r||(r=Promise))((function(s,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}c((n=n.apply(e,t||[])).next())}))}(this,void 0,void 0,(function(){var i,o,a,c,u,l,h,d;return U(this,(function(p){switch(p.label){case 0:i=!1,p.label=1;case 1:p.trys.push([1,6,7,12]),t=P(e),p.label=2;case 2:return[4,t.next()];case 3:if((r=p.sent()).done)return[3,5];if(a=r.value,i)throw this.createNoExtraBytesError(this.totalPos);this.appendBuffer(a);try{o=this.doDecodeSync(),i=!0}catch(e){if(!(e instanceof O))throw e}this.totalPos+=this.pos,p.label=4;case 4:return[3,2];case 5:return[3,12];case 6:return c=p.sent(),n={error:c},[3,12];case 7:return p.trys.push([7,,10,11]),r&&!r.done&&(s=t.return)?[4,s.call(t)]:[3,9];case 8:p.sent(),p.label=9;case 9:return[3,11];case 10:if(n)throw n.error;return[7];case 11:return[7];case 12:if(i){if(this.hasRemaining())throw this.createNoExtraBytesError(this.totalPos);return[2,o]}throw l=(u=this).headByte,h=u.pos,d=u.totalPos,new RangeError("Insufficient data in parcing "+I(l)+" at "+d+" ("+h+" in the current buffer)")}}))}))},e.prototype.decodeArrayStream=function(e){return this.decodeMultiAsync(e,!0)},e.prototype.decodeStream=function(e){return this.decodeMultiAsync(e,!1)},e.prototype.decodeMultiAsync=function(e,t){return q(this,arguments,(function(){var r,n,s,i,o,a,c,u,l;return U(this,(function(h){switch(h.label){case 0:r=t,n=-1,h.label=1;case 1:h.trys.push([1,13,14,19]),s=P(e),h.label=2;case 2:return[4,j(s.next())];case 3:if((i=h.sent()).done)return[3,12];if(o=i.value,t&&0===n)throw this.createNoExtraBytesError(this.totalPos);this.appendBuffer(o),r&&(n=this.readArraySize(),r=!1,this.complete()),h.label=4;case 4:h.trys.push([4,9,,10]),h.label=5;case 5:return[4,j(this.doDecodeSync())];case 6:return[4,h.sent()];case 7:return h.sent(),0==--n?[3,8]:[3,5];case 8:return[3,10];case 9:if(!((a=h.sent())instanceof O))throw a;return[3,10];case 10:this.totalPos+=this.pos,h.label=11;case 11:return[3,2];case 12:return[3,19];case 13:return c=h.sent(),u={error:c},[3,19];case 14:return h.trys.push([14,,17,18]),i&&!i.done&&(l=s.return)?[4,j(l.call(s))]:[3,16];case 15:h.sent(),h.label=16;case 16:return[3,18];case 17:if(u)throw u.error;return[7];case 18:return[7];case 19:return[2]}}))}))},e.prototype.doDecodeSync=function(){e:for(;;){var e=this.readHeadByte(),t=void 0;if(e>=224)t=e-256;else if(e<192)if(e<128)t=e;else if(e<144){if(0!=(n=e-128)){this.pushMapState(n),this.complete();continue e}t={}}else if(e<160){if(0!=(n=e-144)){this.pushArrayState(n),this.complete();continue e}t=[]}else{var r=e-160;t=this.decodeUtf8String(r,0)}else if(192===e)t=null;else if(194===e)t=!1;else if(195===e)t=!0;else if(202===e)t=this.readF32();else if(203===e)t=this.readF64();else if(204===e)t=this.readU8();else if(205===e)t=this.readU16();else if(206===e)t=this.readU32();else if(207===e)t=this.readU64();else if(208===e)t=this.readI8();else if(209===e)t=this.readI16();else if(210===e)t=this.readI32();else if(211===e)t=this.readI64();else if(217===e)r=this.lookU8(),t=this.decodeUtf8String(r,1);else if(218===e)r=this.lookU16(),t=this.decodeUtf8String(r,2);else if(219===e)r=this.lookU32(),t=this.decodeUtf8String(r,4);else if(220===e){if(0!==(n=this.readU16())){this.pushArrayState(n),this.complete();continue e}t=[]}else if(221===e){if(0!==(n=this.readU32())){this.pushArrayState(n),this.complete();continue e}t=[]}else if(222===e){if(0!==(n=this.readU16())){this.pushMapState(n),this.complete();continue e}t={}}else if(223===e){if(0!==(n=this.readU32())){this.pushMapState(n),this.complete();continue e}t={}}else if(196===e){var n=this.lookU8();t=this.decodeBinary(n,1)}else if(197===e)n=this.lookU16(),t=this.decodeBinary(n,2);else if(198===e)n=this.lookU32(),t=this.decodeBinary(n,4);else if(212===e)t=this.decodeExtension(1,0);else if(213===e)t=this.decodeExtension(2,0);else if(214===e)t=this.decodeExtension(4,0);else if(215===e)t=this.decodeExtension(8,0);else if(216===e)t=this.decodeExtension(16,0);else if(199===e)n=this.lookU8(),t=this.decodeExtension(n,1);else if(200===e)n=this.lookU16(),t=this.decodeExtension(n,2);else{if(201!==e)throw new Error("Unrecognized type byte: "+I(e));n=this.lookU32(),t=this.decodeExtension(n,4)}this.complete();for(var s=this.stack;s.length>0;){var i=s[s.length-1];if(0===i.type){if(i.array[i.position]=t,i.position++,i.position!==i.size)continue e;s.pop(),t=i.array}else{if(1===i.type){if(void 0,"string"!=(o=typeof t)&&"number"!==o)throw new Error("The type of key must be string or number but "+typeof t);i.key=t,i.type=2;continue e}if(i.map[i.key]=t,i.readCount++,i.readCount!==i.size){i.key=null,i.type=1;continue e}s.pop(),t=i.map}}return t}var o},e.prototype.readHeadByte=function(){return-1===this.headByte&&(this.headByte=this.readU8()),this.headByte},e.prototype.complete=function(){this.headByte=-1},e.prototype.readArraySize=function(){var e=this.readHeadByte();switch(e){case 220:return this.readU16();case 221:return this.readU32();default:if(e<160)return e-144;throw new Error("Unrecognized array type byte: "+I(e))}},e.prototype.pushMapState=function(e){if(e>this.maxMapLength)throw new Error("Max length exceeded: map length ("+e+") > maxMapLengthLength ("+this.maxMapLength+")");this.stack.push({type:1,size:e,key:null,readCount:0,map:{}})},e.prototype.pushArrayState=function(e){if(e>this.maxArrayLength)throw new Error("Max length exceeded: array length ("+e+") > maxArrayLength ("+this.maxArrayLength+")");this.stack.push({type:0,size:e,array:new Array(e),position:0})},e.prototype.decodeUtf8String=function(e,t){var r;if(e>this.maxStrLength)throw new Error("Max length exceeded: UTF-8 byte length ("+e+") > maxStrLength ("+this.maxStrLength+")");if(this.bytes.byteLength<this.pos+t+e)throw C;var n,s=this.pos+t;return n=this.stateIsMapKey()&&(null===(r=this.keyDecoder)||void 0===r?void 0:r.canBeCached(e))?this.keyDecoder.decode(this.bytes,s,e):i&&e>d?function(e,t,r){var n=e.subarray(t,t+r);return h.decode(n)}(this.bytes,s,e):l(this.bytes,s,e),this.pos+=t+e,n},e.prototype.stateIsMapKey=function(){return this.stack.length>0&&1===this.stack[this.stack.length-1].type},e.prototype.decodeBinary=function(e,t){if(e>this.maxBinLength)throw new Error("Max length exceeded: bin length ("+e+") > maxBinLength ("+this.maxBinLength+")");if(!this.hasRemaining(e+t))throw C;var r=this.pos+t,n=this.bytes.subarray(r,r+e);return this.pos+=t+e,n},e.prototype.decodeExtension=function(e,t){if(e>this.maxExtLength)throw new Error("Max length exceeded: ext length ("+e+") > maxExtLength ("+this.maxExtLength+")");var r=this.view.getInt8(this.pos+t),n=this.decodeBinary(e,t+1);return this.extensionCodec.decode(n,r,this.context)},e.prototype.lookU8=function(){return this.view.getUint8(this.pos)},e.prototype.lookU16=function(){return this.view.getUint16(this.pos)},e.prototype.lookU32=function(){return this.view.getUint32(this.pos)},e.prototype.readU8=function(){var e=this.view.getUint8(this.pos);return this.pos++,e},e.prototype.readI8=function(){var e=this.view.getInt8(this.pos);return this.pos++,e},e.prototype.readU16=function(){var e=this.view.getUint16(this.pos);return this.pos+=2,e},e.prototype.readI16=function(){var e=this.view.getInt16(this.pos);return this.pos+=2,e},e.prototype.readU32=function(){var e=this.view.getUint32(this.pos);return this.pos+=4,e},e.prototype.readI32=function(){var e=this.view.getInt32(this.pos);return this.pos+=4,e},e.prototype.readU64=function(){var e,t,r,n,s=(e=this.view,t=this.pos,r=e.getUint32(t),n=e.getUint32(t+4),r>Math.floor(Number.MAX_SAFE_INTEGER/4294967296)?BigInt(r)*BigInt(4294967296)+BigInt(n):4294967296*r+n);return this.pos+=8,s},e.prototype.readI64=function(){var e=g(this.view,this.pos);return this.pos+=8,e},e.prototype.readF32=function(){var e=this.view.getFloat32(this.pos);return this.pos+=4,e},e.prototype.readF64=function(){var e=this.view.getFloat64(this.pos);return this.pos+=8,e},e}(),N={};function F(e,t){return void 0===t&&(t=N),new M(t.extensionCodec,t.context,t.maxStrLength,t.maxBinLength,t.maxArrayLength,t.maxMapLength,t.maxExtLength).decode(e)}var K=function(e,t){var r,n,s,i,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(s=2&i[0]?n.return:i[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,i[1])).done)return s;switch(n=0,s&&(i=[2&i[0],s.value]),i[0]){case 0:case 1:s=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!s||i[1]>s[0]&&i[1]<s[3])){o.label=i[1];break}if(6===i[0]&&o.label<s[1]){o.label=s[1],s=i;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(i);break}s[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],n=0}finally{r=s=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},W=function(e){return this instanceof W?(this.v=e,this):new W(e)},z=function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,s=r.apply(e,t||[]),i=[];return n={},o("next"),o("throw"),o("return"),n[Symbol.asyncIterator]=function(){return this},n;function o(e){s[e]&&(n[e]=function(t){return new Promise((function(r,n){i.push([e,t,r,n])>1||a(e,t)}))})}function a(e,t){try{(r=s[e](t)).value instanceof W?Promise.resolve(r.value.v).then(c,u):l(i[0][2],r)}catch(e){l(i[0][3],e)}var r}function c(e){a("next",e)}function u(e){a("throw",e)}function l(e,t){e(t),i.shift(),i.length&&a(i[0][0],i[0][1])}};function V(e){if(null==e)throw new Error("Assertion Failure: value must not be null nor undefined")}function H(e){return null!=e[Symbol.asyncIterator]?e:function(e){return z(this,arguments,(function(){var t,r,n,s;return K(this,(function(i){switch(i.label){case 0:t=e.getReader(),i.label=1;case 1:i.trys.push([1,,9,10]),i.label=2;case 2:return[4,W(t.read())];case 3:return r=i.sent(),n=r.done,s=r.value,n?[4,W(void 0)]:[3,5];case 4:return[2,i.sent()];case 5:return V(s),[4,W(s)];case 6:return[4,i.sent()];case 7:return i.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))}(e)}function G(e,t){return void 0===t&&(t=N),function(e,t,r,n){return new(r||(r=Promise))((function(s,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}c((n=n.apply(e,t||[])).next())}))}(this,void 0,void 0,(function(){var r;return function(e,t){var r,n,s,i,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(s=2&i[0]?n.return:i[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,i[1])).done)return s;switch(n=0,s&&(i=[2&i[0],s.value]),i[0]){case 0:case 1:s=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((s=(s=o.trys).length>0&&s[s.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!s||i[1]>s[0]&&i[1]<s[3])){o.label=i[1];break}if(6===i[0]&&o.label<s[1]){o.label=s[1],s=i;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(i);break}s[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],n=0}finally{r=s=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}(this,(function(n){return r=H(e),[2,new M(t.extensionCodec,t.context,t.maxStrLength,t.maxBinLength,t.maxArrayLength,t.maxMapLength,t.maxExtLength).decodeAsync(r)]}))}))}function Y(e,t){void 0===t&&(t=N);var r=H(e);return new M(t.extensionCodec,t.context,t.maxStrLength,t.maxBinLength,t.maxArrayLength,t.maxMapLength,t.maxExtLength).decodeArrayStream(r)}function J(e,t){void 0===t&&(t=N);var r=H(e);return new M(t.extensionCodec,t.context,t.maxStrLength,t.maxBinLength,t.maxArrayLength,t.maxMapLength,t.maxExtLength).decodeStream(r)}}])},155:(e,t)=>{"use strict";t.byteLength=function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,i=c(e),o=i[0],a=i[1],u=new s(function(e,t,r){return 3*(t+r)/4-r}(0,o,a)),l=0,h=a>0?o-4:o;for(r=0;r<h;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;return 2===a&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[l++]=255&t),1===a&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,s=n%3,i=[],o=16383,a=0,c=n-s;a<c;a+=o)i.push(u(e,a,a+o>c?c:a+o));return 1===s?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===s&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),i.join("")};for(var r=[],n=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=i.length;o<a;++o)r[o]=i[o],n[i.charCodeAt(o)]=o;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,n){for(var s,i,o=[],a=t;a<n;a+=3)s=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),o.push(r[(i=s)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},117:function(e,t,r){var n;!function(s){"use strict";var i,o=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,a=Math.ceil,c=Math.floor,u="[BigNumber Error] ",l=u+"Number primitive has more than 15 significant digits: ",h=1e14,d=14,p=9007199254740991,f=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],g=1e7,m=1e9;function y(e){var t=0|e;return e>0||e===t?t:t-1}function w(e){for(var t,r,n=1,s=e.length,i=e[0]+"";n<s;){for(t=e[n++]+"",r=d-t.length;r--;t="0"+t);i+=t}for(s=i.length;48===i.charCodeAt(--s););return i.slice(0,s+1||1)}function b(e,t){var r,n,s=e.c,i=t.c,o=e.s,a=t.s,c=e.e,u=t.e;if(!o||!a)return null;if(r=s&&!s[0],n=i&&!i[0],r||n)return r?n?0:-a:o;if(o!=a)return o;if(r=o<0,n=c==u,!s||!i)return n?0:!s^r?1:-1;if(!n)return c>u^r?1:-1;for(a=(c=s.length)<(u=i.length)?c:u,o=0;o<a;o++)if(s[o]!=i[o])return s[o]>i[o]^r?1:-1;return c==u?0:c>u^r?1:-1}function v(e,t,r,n){if(e<t||e>r||e!==c(e))throw Error(u+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function x(e){var t=e.c.length-1;return y(e.e/d)==t&&e.c[t]%2!=0}function A(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function _(e,t,r){var n,s;if(t<0){for(s=r+".";++t;s+=r);e=s+e}else if(++t>(n=e.length)){for(s=r,t-=n;--t;s+=r);e+=s}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}(i=function e(t){var r,n,s,i,E,T,S,k,R,I,B=K.prototype={constructor:K,toString:null,valueOf:null},U=new K(1),P=20,j=4,q=-7,D=21,$=-1e7,O=1e7,C=!1,L=1,M=0,N={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},F="0123456789abcdefghijklmnopqrstuvwxyz";function K(e,t){var r,i,a,u,h,f,g,m,y=this;if(!(y instanceof K))return new K(e,t);if(null==t){if(e&&!0===e._isBigNumber)return y.s=e.s,void(!e.c||e.e>O?y.c=y.e=null:e.e<$?y.c=[y.e=0]:(y.e=e.e,y.c=e.c.slice()));if((f="number"==typeof e)&&0*e==0){if(y.s=1/e<0?(e=-e,-1):1,e===~~e){for(u=0,h=e;h>=10;h/=10,u++);return void(u>O?y.c=y.e=null:(y.e=u,y.c=[e]))}m=String(e)}else{if(!o.test(m=String(e)))return s(y,m,f);y.s=45==m.charCodeAt(0)?(m=m.slice(1),-1):1}(u=m.indexOf("."))>-1&&(m=m.replace(".","")),(h=m.search(/e/i))>0?(u<0&&(u=h),u+=+m.slice(h+1),m=m.substring(0,h)):u<0&&(u=m.length)}else{if(v(t,2,F.length,"Base"),10==t)return H(y=new K(e),P+y.e+1,j);if(m=String(e),f="number"==typeof e){if(0*e!=0)return s(y,m,f,t);if(y.s=1/e<0?(m=m.slice(1),-1):1,K.DEBUG&&m.replace(/^0\.0*|\./,"").length>15)throw Error(l+e)}else y.s=45===m.charCodeAt(0)?(m=m.slice(1),-1):1;for(r=F.slice(0,t),u=h=0,g=m.length;h<g;h++)if(r.indexOf(i=m.charAt(h))<0){if("."==i){if(h>u){u=g;continue}}else if(!a&&(m==m.toUpperCase()&&(m=m.toLowerCase())||m==m.toLowerCase()&&(m=m.toUpperCase()))){a=!0,h=-1,u=0;continue}return s(y,String(e),f,t)}f=!1,(u=(m=n(m,t,10,y.s)).indexOf("."))>-1?m=m.replace(".",""):u=m.length}for(h=0;48===m.charCodeAt(h);h++);for(g=m.length;48===m.charCodeAt(--g););if(m=m.slice(h,++g)){if(g-=h,f&&K.DEBUG&&g>15&&(e>p||e!==c(e)))throw Error(l+y.s*e);if((u=u-h-1)>O)y.c=y.e=null;else if(u<$)y.c=[y.e=0];else{if(y.e=u,y.c=[],h=(u+1)%d,u<0&&(h+=d),h<g){for(h&&y.c.push(+m.slice(0,h)),g-=d;h<g;)y.c.push(+m.slice(h,h+=d));h=d-(m=m.slice(h)).length}else h-=g;for(;h--;m+="0");y.c.push(+m)}}else y.c=[y.e=0]}function W(e,t,r,n){var s,i,o,a,c;if(null==r?r=j:v(r,0,8),!e.c)return e.toString();if(s=e.c[0],o=e.e,null==t)c=w(e.c),c=1==n||2==n&&(o<=q||o>=D)?A(c,o):_(c,o,"0");else if(i=(e=H(new K(e),t,r)).e,a=(c=w(e.c)).length,1==n||2==n&&(t<=i||i<=q)){for(;a<t;c+="0",a++);c=A(c,i)}else if(t-=o,c=_(c,i,"0"),i+1>a){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=i-a)>0)for(i+1==a&&(c+=".");t--;c+="0");return e.s<0&&s?"-"+c:c}function z(e,t){for(var r,n=1,s=new K(e[0]);n<e.length;n++){if(!(r=new K(e[n])).s){s=r;break}t.call(s,r)&&(s=r)}return s}function V(e,t,r){for(var n=1,s=t.length;!t[--s];t.pop());for(s=t[0];s>=10;s/=10,n++);return(r=n+r*d-1)>O?e.c=e.e=null:r<$?e.c=[e.e=0]:(e.e=r,e.c=t),e}function H(e,t,r,n){var s,i,o,u,l,p,g,m=e.c,y=f;if(m){e:{for(s=1,u=m[0];u>=10;u/=10,s++);if((i=t-s)<0)i+=d,o=t,g=(l=m[p=0])/y[s-o-1]%10|0;else if((p=a((i+1)/d))>=m.length){if(!n)break e;for(;m.length<=p;m.push(0));l=g=0,s=1,o=(i%=d)-d+1}else{for(l=u=m[p],s=1;u>=10;u/=10,s++);g=(o=(i%=d)-d+s)<0?0:l/y[s-o-1]%10|0}if(n=n||t<0||null!=m[p+1]||(o<0?l:l%y[s-o-1]),n=r<4?(g||n)&&(0==r||r==(e.s<0?3:2)):g>5||5==g&&(4==r||n||6==r&&(i>0?o>0?l/y[s-o]:0:m[p-1])%10&1||r==(e.s<0?8:7)),t<1||!m[0])return m.length=0,n?(t-=e.e+1,m[0]=y[(d-t%d)%d],e.e=-t||0):m[0]=e.e=0,e;if(0==i?(m.length=p,u=1,p--):(m.length=p+1,u=y[d-i],m[p]=o>0?c(l/y[s-o]%y[o])*u:0),n)for(;;){if(0==p){for(i=1,o=m[0];o>=10;o/=10,i++);for(o=m[0]+=u,u=1;o>=10;o/=10,u++);i!=u&&(e.e++,m[0]==h&&(m[0]=1));break}if(m[p]+=u,m[p]!=h)break;m[p--]=0,u=1}for(i=m.length;0===m[--i];m.pop());}e.e>O?e.c=e.e=null:e.e<$&&(e.c=[e.e=0])}return e}function G(e){var t,r=e.e;return null===r?e.toString():(t=w(e.c),t=r<=q||r>=D?A(t,r):_(t,r,"0"),e.s<0?"-"+t:t)}return K.clone=e,K.ROUND_UP=0,K.ROUND_DOWN=1,K.ROUND_CEIL=2,K.ROUND_FLOOR=3,K.ROUND_HALF_UP=4,K.ROUND_HALF_DOWN=5,K.ROUND_HALF_EVEN=6,K.ROUND_HALF_CEIL=7,K.ROUND_HALF_FLOOR=8,K.EUCLID=9,K.config=K.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(u+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(v(r=e[t],0,m,t),P=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(v(r=e[t],0,8,t),j=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(v(r[0],-m,0,t),v(r[1],0,m,t),q=r[0],D=r[1]):(v(r,-m,m,t),q=-(D=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)v(r[0],-m,-1,t),v(r[1],1,m,t),$=r[0],O=r[1];else{if(v(r,-m,m,t),!r)throw Error(u+t+" cannot be zero: "+r);$=-(O=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(u+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw C=!r,Error(u+"crypto unavailable");C=r}else C=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(v(r=e[t],0,9,t),L=r),e.hasOwnProperty(t="POW_PRECISION")&&(v(r=e[t],0,m,t),M=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(u+t+" not an object: "+r);N=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(u+t+" invalid: "+r);F=r}}return{DECIMAL_PLACES:P,ROUNDING_MODE:j,EXPONENTIAL_AT:[q,D],RANGE:[$,O],CRYPTO:C,MODULO_MODE:L,POW_PRECISION:M,FORMAT:N,ALPHABET:F}},K.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!K.DEBUG)return!0;var t,r,n=e.c,s=e.e,i=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===i||-1===i)&&s>=-m&&s<=m&&s===c(s)){if(0===n[0]){if(0===s&&1===n.length)return!0;break e}if((t=(s+1)%d)<1&&(t+=d),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=h||r!==c(r))break e;if(0!==r)return!0}}}else if(null===n&&null===s&&(null===i||1===i||-1===i))return!0;throw Error(u+"Invalid BigNumber: "+e)},K.maximum=K.max=function(){return z(arguments,B.lt)},K.minimum=K.min=function(){return z(arguments,B.gt)},K.random=(i=9007199254740992,E=Math.random()*i&2097151?function(){return c(Math.random()*i)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,s,i,o=0,l=[],h=new K(U);if(null==e?e=P:v(e,0,m),s=a(e/d),C)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(s*=2));o<s;)(i=131072*t[o]+(t[o+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[o]=r[0],t[o+1]=r[1]):(l.push(i%1e14),o+=2);o=s/2}else{if(!crypto.randomBytes)throw C=!1,Error(u+"crypto unavailable");for(t=crypto.randomBytes(s*=7);o<s;)(i=281474976710656*(31&t[o])+1099511627776*t[o+1]+4294967296*t[o+2]+16777216*t[o+3]+(t[o+4]<<16)+(t[o+5]<<8)+t[o+6])>=9e15?crypto.randomBytes(7).copy(t,o):(l.push(i%1e14),o+=7);o=s/7}if(!C)for(;o<s;)(i=E())<9e15&&(l[o++]=i%1e14);for(s=l[--o],e%=d,s&&e&&(i=f[d-e],l[o]=c(s/i)*i);0===l[o];l.pop(),o--);if(o<0)l=[n=0];else{for(n=-1;0===l[0];l.splice(0,1),n-=d);for(o=1,i=l[0];i>=10;i/=10,o++);o<d&&(n-=d-o)}return h.e=n,h.c=l,h}),K.sum=function(){for(var e=1,t=arguments,r=new K(t[0]);e<t.length;)r=r.plus(t[e++]);return r},n=function(){var e="0123456789";function t(e,t,r,n){for(var s,i,o=[0],a=0,c=e.length;a<c;){for(i=o.length;i--;o[i]*=t);for(o[0]+=n.indexOf(e.charAt(a++)),s=0;s<o.length;s++)o[s]>r-1&&(null==o[s+1]&&(o[s+1]=0),o[s+1]+=o[s]/r|0,o[s]%=r)}return o.reverse()}return function(n,s,i,o,a){var c,u,l,h,d,p,f,g,m=n.indexOf("."),y=P,b=j;for(m>=0&&(h=M,M=0,n=n.replace(".",""),p=(g=new K(s)).pow(n.length-m),M=h,g.c=t(_(w(p.c),p.e,"0"),10,i,e),g.e=g.c.length),l=h=(f=t(n,s,i,a?(c=F,e):(c=e,F))).length;0==f[--h];f.pop());if(!f[0])return c.charAt(0);if(m<0?--l:(p.c=f,p.e=l,p.s=o,f=(p=r(p,g,y,b,i)).c,d=p.r,l=p.e),m=f[u=l+y+1],h=i/2,d=d||u<0||null!=f[u+1],d=b<4?(null!=m||d)&&(0==b||b==(p.s<0?3:2)):m>h||m==h&&(4==b||d||6==b&&1&f[u-1]||b==(p.s<0?8:7)),u<1||!f[0])n=d?_(c.charAt(1),-y,c.charAt(0)):c.charAt(0);else{if(f.length=u,d)for(--i;++f[--u]>i;)f[u]=0,u||(++l,f=[1].concat(f));for(h=f.length;!f[--h];);for(m=0,n="";m<=h;n+=c.charAt(f[m++]));n=_(n,l,c.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,s,i,o,a=0,c=e.length,u=t%g,l=t/g|0;for(e=e.slice();c--;)a=((s=u*(i=e[c]%g)+(n=l*i+(o=e[c]/g|0)*u)%g*g+a)/r|0)+(n/g|0)+l*o,e[c]=s%r;return a&&(e=[a].concat(e)),e}function t(e,t,r,n){var s,i;if(r!=n)i=r>n?1:-1;else for(s=i=0;s<r;s++)if(e[s]!=t[s]){i=e[s]>t[s]?1:-1;break}return i}function r(e,t,r,n){for(var s=0;r--;)e[r]-=s,s=e[r]<t[r]?1:0,e[r]=s*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,s,i,o,a){var u,l,p,f,g,m,w,b,v,x,A,_,E,T,S,k,R,I=n.s==s.s?1:-1,B=n.c,U=s.c;if(!(B&&B[0]&&U&&U[0]))return new K(n.s&&s.s&&(B?!U||B[0]!=U[0]:U)?B&&0==B[0]||!U?0*I:I/0:NaN);for(v=(b=new K(I)).c=[],I=i+(l=n.e-s.e)+1,a||(a=h,l=y(n.e/d)-y(s.e/d),I=I/d|0),p=0;U[p]==(B[p]||0);p++);if(U[p]>(B[p]||0)&&l--,I<0)v.push(1),f=!0;else{for(T=B.length,k=U.length,p=0,I+=2,(g=c(a/(U[0]+1)))>1&&(U=e(U,g,a),B=e(B,g,a),k=U.length,T=B.length),E=k,A=(x=B.slice(0,k)).length;A<k;x[A++]=0);R=U.slice(),R=[0].concat(R),S=U[0],U[1]>=a/2&&S++;do{if(g=0,(u=t(U,x,k,A))<0){if(_=x[0],k!=A&&(_=_*a+(x[1]||0)),(g=c(_/S))>1)for(g>=a&&(g=a-1),w=(m=e(U,g,a)).length,A=x.length;1==t(m,x,w,A);)g--,r(m,k<w?R:U,w,a),w=m.length,u=1;else 0==g&&(u=g=1),w=(m=U.slice()).length;if(w<A&&(m=[0].concat(m)),r(x,m,A,a),A=x.length,-1==u)for(;t(U,x,k,A)<1;)g++,r(x,k<A?R:U,A,a),A=x.length}else 0===u&&(g++,x=[0]);v[p++]=g,x[0]?x[A++]=B[E]||0:(x=[B[E]],A=1)}while((E++<T||null!=x[0])&&I--);f=null!=x[0],v[0]||v.splice(0,1)}if(a==h){for(p=1,I=v[0];I>=10;I/=10,p++);H(b,i+(b.e=p+l*d-1)+1,o,f)}else b.e=l,b.r=+f;return b}}(),T=/^(-?)0([xbo])(?=\w[\w.]*$)/i,S=/^([^.]+)\.$/,k=/^\.([^.]+)$/,R=/^-?(Infinity|NaN)$/,I=/^\s*\+(?=[\w.])|^\s+|\s+$/g,s=function(e,t,r,n){var s,i=r?t:t.replace(I,"");if(R.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!r&&(i=i.replace(T,(function(e,t,r){return s="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=s?e:t})),n&&(s=n,i=i.replace(S,"$1").replace(k,"0.$1")),t!=i))return new K(i,s);if(K.DEBUG)throw Error(u+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},B.absoluteValue=B.abs=function(){var e=new K(this);return e.s<0&&(e.s=1),e},B.comparedTo=function(e,t){return b(this,new K(e,t))},B.decimalPlaces=B.dp=function(e,t){var r,n,s,i=this;if(null!=e)return v(e,0,m),null==t?t=j:v(t,0,8),H(new K(i),e+i.e+1,t);if(!(r=i.c))return null;if(n=((s=r.length-1)-y(this.e/d))*d,s=r[s])for(;s%10==0;s/=10,n--);return n<0&&(n=0),n},B.dividedBy=B.div=function(e,t){return r(this,new K(e,t),P,j)},B.dividedToIntegerBy=B.idiv=function(e,t){return r(this,new K(e,t),0,1)},B.exponentiatedBy=B.pow=function(e,t){var r,n,s,i,o,l,h,p,f=this;if((e=new K(e)).c&&!e.isInteger())throw Error(u+"Exponent not an integer: "+G(e));if(null!=t&&(t=new K(t)),o=e.e>14,!f.c||!f.c[0]||1==f.c[0]&&!f.e&&1==f.c.length||!e.c||!e.c[0])return p=new K(Math.pow(+G(f),o?2-x(e):+G(e))),t?p.mod(t):p;if(l=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new K(NaN);(n=!l&&f.isInteger()&&t.isInteger())&&(f=f.mod(t))}else{if(e.e>9&&(f.e>0||f.e<-1||(0==f.e?f.c[0]>1||o&&f.c[1]>=24e7:f.c[0]<8e13||o&&f.c[0]<=9999975e7)))return i=f.s<0&&x(e)?-0:0,f.e>-1&&(i=1/i),new K(l?1/i:i);M&&(i=a(M/d+2))}for(o?(r=new K(.5),l&&(e.s=1),h=x(e)):h=(s=Math.abs(+G(e)))%2,p=new K(U);;){if(h){if(!(p=p.times(f)).c)break;i?p.c.length>i&&(p.c.length=i):n&&(p=p.mod(t))}if(s){if(0===(s=c(s/2)))break;h=s%2}else if(H(e=e.times(r),e.e+1,1),e.e>14)h=x(e);else{if(0==(s=+G(e)))break;h=s%2}f=f.times(f),i?f.c&&f.c.length>i&&(f.c.length=i):n&&(f=f.mod(t))}return n?p:(l&&(p=U.div(p)),t?p.mod(t):i?H(p,M,j,void 0):p)},B.integerValue=function(e){var t=new K(this);return null==e?e=j:v(e,0,8),H(t,t.e+1,e)},B.isEqualTo=B.eq=function(e,t){return 0===b(this,new K(e,t))},B.isFinite=function(){return!!this.c},B.isGreaterThan=B.gt=function(e,t){return b(this,new K(e,t))>0},B.isGreaterThanOrEqualTo=B.gte=function(e,t){return 1===(t=b(this,new K(e,t)))||0===t},B.isInteger=function(){return!!this.c&&y(this.e/d)>this.c.length-2},B.isLessThan=B.lt=function(e,t){return b(this,new K(e,t))<0},B.isLessThanOrEqualTo=B.lte=function(e,t){return-1===(t=b(this,new K(e,t)))||0===t},B.isNaN=function(){return!this.s},B.isNegative=function(){return this.s<0},B.isPositive=function(){return this.s>0},B.isZero=function(){return!!this.c&&0==this.c[0]},B.minus=function(e,t){var r,n,s,i,o=this,a=o.s;if(t=(e=new K(e,t)).s,!a||!t)return new K(NaN);if(a!=t)return e.s=-t,o.plus(e);var c=o.e/d,u=e.e/d,l=o.c,p=e.c;if(!c||!u){if(!l||!p)return l?(e.s=-t,e):new K(p?o:NaN);if(!l[0]||!p[0])return p[0]?(e.s=-t,e):new K(l[0]?o:3==j?-0:0)}if(c=y(c),u=y(u),l=l.slice(),a=c-u){for((i=a<0)?(a=-a,s=l):(u=c,s=p),s.reverse(),t=a;t--;s.push(0));s.reverse()}else for(n=(i=(a=l.length)<(t=p.length))?a:t,a=t=0;t<n;t++)if(l[t]!=p[t]){i=l[t]<p[t];break}if(i&&(s=l,l=p,p=s,e.s=-e.s),(t=(n=p.length)-(r=l.length))>0)for(;t--;l[r++]=0);for(t=h-1;n>a;){if(l[--n]<p[n]){for(r=n;r&&!l[--r];l[r]=t);--l[r],l[n]+=h}l[n]-=p[n]}for(;0==l[0];l.splice(0,1),--u);return l[0]?V(e,l,u):(e.s=3==j?-1:1,e.c=[e.e=0],e)},B.modulo=B.mod=function(e,t){var n,s,i=this;return e=new K(e,t),!i.c||!e.s||e.c&&!e.c[0]?new K(NaN):!e.c||i.c&&!i.c[0]?new K(i):(9==L?(s=e.s,e.s=1,n=r(i,e,0,3),e.s=s,n.s*=s):n=r(i,e,0,L),(e=i.minus(n.times(e))).c[0]||1!=L||(e.s=i.s),e)},B.multipliedBy=B.times=function(e,t){var r,n,s,i,o,a,c,u,l,p,f,m,w,b,v,x=this,A=x.c,_=(e=new K(e,t)).c;if(!(A&&_&&A[0]&&_[0]))return!x.s||!e.s||A&&!A[0]&&!_||_&&!_[0]&&!A?e.c=e.e=e.s=null:(e.s*=x.s,A&&_?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=y(x.e/d)+y(e.e/d),e.s*=x.s,(c=A.length)<(p=_.length)&&(w=A,A=_,_=w,s=c,c=p,p=s),s=c+p,w=[];s--;w.push(0));for(b=h,v=g,s=p;--s>=0;){for(r=0,f=_[s]%v,m=_[s]/v|0,i=s+(o=c);i>s;)r=((u=f*(u=A[--o]%v)+(a=m*u+(l=A[o]/v|0)*f)%v*v+w[i]+r)/b|0)+(a/v|0)+m*l,w[i--]=u%b;w[i]=r}return r?++n:w.splice(0,1),V(e,w,n)},B.negated=function(){var e=new K(this);return e.s=-e.s||null,e},B.plus=function(e,t){var r,n=this,s=n.s;if(t=(e=new K(e,t)).s,!s||!t)return new K(NaN);if(s!=t)return e.s=-t,n.minus(e);var i=n.e/d,o=e.e/d,a=n.c,c=e.c;if(!i||!o){if(!a||!c)return new K(s/0);if(!a[0]||!c[0])return c[0]?e:new K(a[0]?n:0*s)}if(i=y(i),o=y(o),a=a.slice(),s=i-o){for(s>0?(o=i,r=c):(s=-s,r=a),r.reverse();s--;r.push(0));r.reverse()}for((s=a.length)-(t=c.length)<0&&(r=c,c=a,a=r,t=s),s=0;t;)s=(a[--t]=a[t]+c[t]+s)/h|0,a[t]=h===a[t]?0:a[t]%h;return s&&(a=[s].concat(a),++o),V(e,a,o)},B.precision=B.sd=function(e,t){var r,n,s,i=this;if(null!=e&&e!==!!e)return v(e,1,m),null==t?t=j:v(t,0,8),H(new K(i),e,t);if(!(r=i.c))return null;if(n=(s=r.length-1)*d+1,s=r[s]){for(;s%10==0;s/=10,n--);for(s=r[0];s>=10;s/=10,n++);}return e&&i.e+1>n&&(n=i.e+1),n},B.shiftedBy=function(e){return v(e,-9007199254740991,p),this.times("1e"+e)},B.squareRoot=B.sqrt=function(){var e,t,n,s,i,o=this,a=o.c,c=o.s,u=o.e,l=P+4,h=new K("0.5");if(1!==c||!a||!a[0])return new K(!c||c<0&&(!a||a[0])?NaN:a?o:1/0);if(0==(c=Math.sqrt(+G(o)))||c==1/0?(((t=w(a)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=y((u+1)/2)-(u<0||u%2),n=new K(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):n=new K(c+""),n.c[0])for((c=(u=n.e)+l)<3&&(c=0);;)if(i=n,n=h.times(i.plus(r(o,i,l,1))),w(i.c).slice(0,c)===(t=w(n.c)).slice(0,c)){if(n.e<u&&--c,"9999"!=(t=t.slice(c-3,c+1))&&(s||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(H(n,n.e+P+2,1),e=!n.times(n).eq(o));break}if(!s&&(H(i,i.e+P+2,0),i.times(i).eq(o))){n=i;break}l+=4,c+=4,s=1}return H(n,n.e+P+1,j,e)},B.toExponential=function(e,t){return null!=e&&(v(e,0,m),e++),W(this,e,t,1)},B.toFixed=function(e,t){return null!=e&&(v(e,0,m),e=e+this.e+1),W(this,e,t)},B.toFormat=function(e,t,r){var n,s=this;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=N;else if("object"!=typeof r)throw Error(u+"Argument not an object: "+r);if(n=s.toFixed(e,t),s.c){var i,o=n.split("."),a=+r.groupSize,c=+r.secondaryGroupSize,l=r.groupSeparator||"",h=o[0],d=o[1],p=s.s<0,f=p?h.slice(1):h,g=f.length;if(c&&(i=a,a=c,c=i,g-=i),a>0&&g>0){for(i=g%a||a,h=f.substr(0,i);i<g;i+=a)h+=l+f.substr(i,a);c>0&&(h+=l+f.slice(i)),p&&(h="-"+h)}n=d?h+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?d.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):d):h}return(r.prefix||"")+n+(r.suffix||"")},B.toFraction=function(e){var t,n,s,i,o,a,c,l,h,p,g,m,y=this,b=y.c;if(null!=e&&(!(c=new K(e)).isInteger()&&(c.c||1!==c.s)||c.lt(U)))throw Error(u+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+G(c));if(!b)return new K(y);for(t=new K(U),h=n=new K(U),s=l=new K(U),m=w(b),o=t.e=m.length-y.e-1,t.c[0]=f[(a=o%d)<0?d+a:a],e=!e||c.comparedTo(t)>0?o>0?t:h:c,a=O,O=1/0,c=new K(m),l.c[0]=0;p=r(c,t,0,1),1!=(i=n.plus(p.times(s))).comparedTo(e);)n=s,s=i,h=l.plus(p.times(i=h)),l=i,t=c.minus(p.times(i=t)),c=i;return i=r(e.minus(n),s,0,1),l=l.plus(i.times(h)),n=n.plus(i.times(s)),l.s=h.s=y.s,g=r(h,s,o*=2,j).minus(y).abs().comparedTo(r(l,n,o,j).minus(y).abs())<1?[h,s]:[l,n],O=a,g},B.toNumber=function(){return+G(this)},B.toPrecision=function(e,t){return null!=e&&v(e,1,m),W(this,e,t,2)},B.toString=function(e){var t,r=this,s=r.s,i=r.e;return null===i?s?(t="Infinity",s<0&&(t="-"+t)):t="NaN":(null==e?t=i<=q||i>=D?A(w(r.c),i):_(w(r.c),i,"0"):10===e?t=_(w((r=H(new K(r),P+i+1,j)).c),r.e,"0"):(v(e,2,F.length,"Base"),t=n(_(w(r.c),i,"0"),10,e,s,!0)),s<0&&r.c[0]&&(t="-"+t)),t},B.valueOf=B.toJSON=function(){return G(this)},B._isBigNumber=!0,null!=t&&K.set(t),K}()).default=i.BigNumber=i,void 0===(n=function(){return i}.call(t,r,t,e))||(e.exports=n)}()},486:(e,t,r)=>{"use strict";const n=r(155),s=r(525),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.lW=c,t.h2=50;const o=2147483647;function a(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return h(e)}return u(e,t,r)}function u(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|g(e,t);let n=a(r);const s=n.write(e,t);return s!==r&&(n=n.slice(0,s)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Y(e,Uint8Array)){const t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Y(e,ArrayBuffer)||e&&Y(e.buffer,ArrayBuffer))return p(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(Y(e,SharedArrayBuffer)||e&&Y(e.buffer,SharedArrayBuffer)))return p(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return c.from(n,t,r);const s=function(e){if(c.isBuffer(e)){const t=0|f(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||J(e.length)?a(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(s)return s;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function h(e){return l(e),a(e<0?0:0|f(e))}function d(e){const t=e.length<0?0:0|f(e.length),r=a(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function p(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,c.prototype),n}function f(e){if(e>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function g(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Y(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let s=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return H(e).length;default:if(s)return n?-1:V(e).length;t=(""+t).toLowerCase(),s=!0}}function m(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return B(this,t,r);case"utf8":case"utf-8":return S(this,t,r);case"ascii":return R(this,t,r);case"latin1":case"binary":return I(this,t,r);case"base64":return T(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function w(e,t,r,n,s){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),J(r=+r)&&(r=s?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(s)return-1;r=e.length-1}else if(r<0){if(!s)return-1;r=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,s);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,s);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,s){let i,o=1,a=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,a/=2,c/=2,r/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(s){let n=-1;for(i=r;i<a;i++)if(u(e,i)===u(t,-1===n?0:i-n)){if(-1===n&&(n=i),i-n+1===c)return n*o}else-1!==n&&(i-=i-n),n=-1}else for(r+c>a&&(r=a-c),i=r;i>=0;i--){let r=!0;for(let n=0;n<c;n++)if(u(e,i+n)!==u(t,n)){r=!1;break}if(r)return i}return-1}function v(e,t,r,n){r=Number(r)||0;const s=e.length-r;n?(n=Number(n))>s&&(n=s):n=s;const i=t.length;let o;for(n>i/2&&(n=i/2),o=0;o<n;++o){const n=parseInt(t.substr(2*o,2),16);if(J(n))return o;e[r+o]=n}return o}function x(e,t,r,n){return G(V(t,e.length-r),e,r,n)}function A(e,t,r,n){return G(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function _(e,t,r,n){return G(H(t),e,r,n)}function E(e,t,r,n){return G(function(e,t){let r,n,s;const i=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)r=e.charCodeAt(o),n=r>>8,s=r%256,i.push(s),i.push(n);return i}(t,e.length-r),e,r,n)}function T(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function S(e,t,r){r=Math.min(e.length,r);const n=[];let s=t;for(;s<r;){const t=e[s];let i=null,o=t>239?4:t>223?3:t>191?2:1;if(s+o<=r){let r,n,a,c;switch(o){case 1:t<128&&(i=t);break;case 2:r=e[s+1],128==(192&r)&&(c=(31&t)<<6|63&r,c>127&&(i=c));break;case 3:r=e[s+1],n=e[s+2],128==(192&r)&&128==(192&n)&&(c=(15&t)<<12|(63&r)<<6|63&n,c>2047&&(c<55296||c>57343)&&(i=c));break;case 4:r=e[s+1],n=e[s+2],a=e[s+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(c=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a,c>65535&&c<1114112&&(i=c))}}null===i?(i=65533,o=1):i>65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i),s+=o}return function(e){const t=e.length;if(t<=k)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=k));return r}(n)}c.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),c.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(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,r){return u(e,t,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,r){return function(e,t,r){return l(e),e<=0?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)}(e,t,r)},c.allocUnsafe=function(e){return h(e)},c.allocUnsafeSlow=function(e){return h(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(Y(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),Y(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let s=0,i=Math.min(r,n);s<i;++s)if(e[s]!==t[s]){r=e[s],n=t[s];break}return r<n?-1:n<r?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=c.allocUnsafe(t);let s=0;for(r=0;r<e.length;++r){let t=e[r];if(Y(t,Uint8Array))s+t.length>n.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(n,s)):Uint8Array.prototype.set.call(n,t,s);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,s)}s+=t.length}return n},c.byteLength=g,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)y(this,t,t+1);return this},c.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},c.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?S(this,0,e):m.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e="";const r=t.h2;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},i&&(c.prototype[i]=c.prototype.inspect),c.prototype.compare=function(e,t,r,n,s){if(Y(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.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===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===s&&(s=this.length),t<0||r>e.length||n<0||s>this.length)throw new RangeError("out of range index");if(n>=s&&t>=r)return 0;if(n>=s)return-1;if(t>=r)return 1;if(this===e)return 0;let i=(s>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0);const a=Math.min(i,o),u=this.slice(n,s),l=e.slice(t,r);for(let e=0;e<a;++e)if(u[e]!==l[e]){i=u[e],o=l[e];break}return i<o?-1:o<i?1:0},c.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},c.prototype.indexOf=function(e,t,r){return w(this,e,t,r,!0)},c.prototype.lastIndexOf=function(e,t,r){return w(this,e,t,r,!1)},c.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const s=this.length-t;if((void 0===r||r>s)&&(r=s),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let i=!1;for(;;)switch(n){case"hex":return v(this,e,t,r);case"utf8":case"utf-8":return x(this,e,t,r);case"ascii":case"latin1":case"binary":return A(this,e,t,r);case"base64":return _(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const k=4096;function R(e,t,r){let n="";r=Math.min(e.length,r);for(let s=t;s<r;++s)n+=String.fromCharCode(127&e[s]);return n}function I(e,t,r){let n="";r=Math.min(e.length,r);for(let s=t;s<r;++s)n+=String.fromCharCode(e[s]);return n}function B(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let s="";for(let n=t;n<r;++n)s+=X[e[n]];return s}function U(e,t,r){const n=e.slice(t,r);let s="";for(let e=0;e<n.length-1;e+=2)s+=String.fromCharCode(n[e]+256*n[e+1]);return s}function P(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function j(e,t,r,n,s,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>s||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function q(e,t,r,n,s){F(t,n,s,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,r}function D(e,t,r,n,s){F(t,n,s,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i>>=8,e[r+6]=i,i>>=8,e[r+5]=i,i>>=8,e[r+4]=i;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,o>>=8,e[r+2]=o,o>>=8,e[r+1]=o,o>>=8,e[r]=o,r+8}function $(e,t,r,n,s,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function O(e,t,r,n,i){return t=+t,r>>>=0,i||$(e,0,r,4),s.write(e,t,r,n,23,4),r+4}function C(e,t,r,n,i){return t=+t,r>>>=0,i||$(e,0,r,8),s.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,c.prototype),n},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);let n=this[e],s=1,i=0;for(;++i<t&&(s*=256);)n+=this[e+i]*s;return n},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);let n=this[e+--t],s=1;for(;t>0&&(s*=256);)n+=this[e+--t]*s;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=Z((function(e){K(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,s=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(s)<<BigInt(32))})),c.prototype.readBigUInt64BE=Z((function(e){K(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],s=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(s)})),c.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);let n=this[e],s=1,i=0;for(;++i<t&&(s*=256);)n+=this[e+i]*s;return s*=128,n>=s&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);let n=t,s=1,i=this[e+--n];for(;n>0&&(s*=256);)i+=this[e+--n]*s;return s*=128,i>=s&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||P(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||P(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=Z((function(e){K(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),c.prototype.readBigInt64BE=Z((function(e){K(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||P(e,4,this.length),s.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||P(e,4,this.length),s.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||P(e,8,this.length),s.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||P(e,8,this.length),s.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||j(this,e,t,r,Math.pow(2,8*r)-1,0);let s=1,i=0;for(this[t]=255&e;++i<r&&(s*=256);)this[t+i]=e/s&255;return t+r},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||j(this,e,t,r,Math.pow(2,8*r)-1,0);let s=r-1,i=1;for(this[t+s]=255&e;--s>=0&&(i*=256);)this[t+s]=e/i&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||j(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},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||j(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},c.prototype.writeBigUInt64LE=Z((function(e,t=0){return q(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=Z((function(e,t=0){return D(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);j(this,e,t,r,n-1,-n)}let s=0,i=1,o=0;for(this[t]=255&e;++s<r&&(i*=256);)e<0&&0===o&&0!==this[t+s-1]&&(o=1),this[t+s]=(e/i>>0)-o&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);j(this,e,t,r,n-1,-n)}let s=r-1,i=1,o=0;for(this[t+s]=255&e;--s>=0&&(i*=256);)e<0&&0===o&&0!==this[t+s+1]&&(o=1),this[t+s]=(e/i>>0)-o&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||j(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},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,2147483647,-2147483648),e<0&&(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},c.prototype.writeBigInt64LE=Z((function(e,t=0){return q(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=Z((function(e,t=0){return D(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,r){return O(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return O(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return C(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return C(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const s=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),s},c.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let s;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(s=t;s<r;++s)this[s]=e;else{const i=c.isBuffer(e)?e:c.from(e,n),o=i.length;if(0===o)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(s=0;s<r-t;++s)this[s+t]=i[s%o]}return this};const L={};function M(e,t,r){L[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function N(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function F(e,t,r,n,s,i){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let s;throw s=i>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(i+1)}${n}`:`>= -(2${n} ** ${8*(i+1)-1}${n}) and < 2 ** ${8*(i+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new L.ERR_OUT_OF_RANGE("value",s,e)}!function(e,t,r){K(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||W(t,e.length-(r+1))}(n,s,i)}function K(e,t){if("number"!=typeof e)throw new L.ERR_INVALID_ARG_TYPE(t,"number",e)}function W(e,t,r){if(Math.floor(e)!==e)throw K(e,r),new L.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new L.ERR_BUFFER_OUT_OF_BOUNDS;throw new L.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}M("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),M("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),M("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,s=r;return Number.isInteger(r)&&Math.abs(r)>2**32?s=N(String(r)):"bigint"==typeof r&&(s=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(s=N(s)),s+="n"),n+=` It must be ${t}. Received ${s}`,n}),RangeError);const z=/[^+/0-9A-Za-z-_]/g;function V(e,t){let r;t=t||1/0;const n=e.length;let s=null;const i=[];for(let o=0;o<n;++o){if(r=e.charCodeAt(o),r>55295&&r<57344){if(!s){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&i.push(239,191,189);continue}s=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),s=r;continue}r=65536+(s-55296<<10|r-56320)}else s&&(t-=3)>-1&&i.push(239,191,189);if(s=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function H(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(z,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function G(e,t,r,n){let s;for(s=0;s<n&&!(s+r>=t.length||s>=e.length);++s)t[s+r]=e[s];return s}function Y(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function J(e){return e!=e}const X=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let s=0;s<16;++s)t[n+s]=e[r]+e[s]}return t}();function Z(e){return"undefined"==typeof BigInt?Q:e}function Q(){throw new Error("BigInt not supported")}},297:function(e,t){var r="undefined"!=typeof self?self:this,n=function(){function e(){this.fetch=!1,this.DOMException=r.DOMException}return e.prototype=r,new e}();!function(e){!function(t){var r="URLSearchParams"in e,n="Symbol"in e&&"iterator"in Symbol,s="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),i="FormData"in e,o="ArrayBuffer"in e;if(o)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&a.indexOf(Object.prototype.toString.call(e))>-1};function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function h(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function d(e){this.map={},e instanceof d?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function p(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function f(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function g(e){var t=new FileReader,r=f(t);return t.readAsArrayBuffer(e),r}function m(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:s&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:i&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():o&&s&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=m(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=m(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},s&&(this.blob=function(){var e=p(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(g)}),this.text=function(){var e,t,r,n=p(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=f(t=new FileReader),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n<t.length;n++)r[n]=String.fromCharCode(t[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},i&&(this.formData=function(){return this.text().then(v)}),this.json=function(){return this.text().then(JSON.parse)},this}d.prototype.append=function(e,t){e=u(e),t=l(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},d.prototype.delete=function(e){delete this.map[u(e)]},d.prototype.get=function(e){return e=u(e),this.has(e)?this.map[e]:null},d.prototype.has=function(e){return this.map.hasOwnProperty(u(e))},d.prototype.set=function(e,t){this.map[u(e)]=l(t)},d.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},d.prototype.keys=function(){var e=[];return this.forEach((function(t,r){e.push(r)})),h(e)},d.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),h(e)},d.prototype.entries=function(){var e=[];return this.forEach((function(t,r){e.push([r,t])})),h(e)},n&&(d.prototype[Symbol.iterator]=d.prototype.entries);var w=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function b(e,t){var r,n,s=(t=t||{}).body;if(e instanceof b){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new d(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,s||null==e._bodyInit||(s=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new d(t.headers)),this.method=(n=(r=t.method||this.method||"GET").toUpperCase(),w.indexOf(n)>-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&s)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(s)}function v(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),s=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(s))}})),t}function x(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new d(t.headers),this.url=t.url||"",this._initBody(e)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},y.call(b.prototype),y.call(x.prototype),x.prototype.clone=function(){return new x(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new d(this.headers),url:this.url})},x.error=function(){var e=new x(null,{status:0,statusText:""});return e.type="error",e};var A=[301,302,303,307,308];x.redirect=function(e,t){if(-1===A.indexOf(t))throw new RangeError("Invalid status code");return new x(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function _(e,r){return new Promise((function(n,i){var o=new b(e,r);if(o.signal&&o.signal.aborted)return i(new t.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function c(){a.abort()}a.onload=function(){var e,t,r={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new d,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var r=e.split(":"),n=r.shift().trim();if(n){var s=r.join(":").trim();t.append(n,s)}})),t)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var s="response"in a?a.response:a.responseText;n(new x(s,r))},a.onerror=function(){i(new TypeError("Network request failed"))},a.ontimeout=function(){i(new TypeError("Network request failed"))},a.onabort=function(){i(new t.DOMException("Aborted","AbortError"))},a.open(o.method,o.url,!0),"include"===o.credentials?a.withCredentials=!0:"omit"===o.credentials&&(a.withCredentials=!1),"responseType"in a&&s&&(a.responseType="blob"),o.headers.forEach((function(e,t){a.setRequestHeader(t,e)})),o.signal&&(o.signal.addEventListener("abort",c),a.onreadystatechange=function(){4===a.readyState&&o.signal.removeEventListener("abort",c)}),a.send(void 0===o._bodyInit?null:o._bodyInit)}))}_.polyfill=!0,e.fetch||(e.fetch=_,e.Headers=d,e.Request=b,e.Response=x),t.Headers=d,t.Request=b,t.Response=x,t.fetch=_,Object.defineProperty(t,"__esModule",{value:!0})}({})}(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var s=n;(t=s.fetch).default=s.fetch,t.fetch=s.fetch,t.Headers=s.Headers,t.Request=s.Request,t.Response=s.Response,e.exports=t},267:(e,t,r)=>{var n;!function(){"use strict";var t="object"==typeof window?window:{};!t.HI_BASE32_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node&&(t=r.g);var s=!t.HI_BASE32_NO_COMMON_JS&&e.exports,i=r.amdO,o="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567".split(""),a={A:0,B:1,C:2,D:3,E:4,F:5,G:6,H:7,I:8,J:9,K:10,L:11,M:12,N:13,O:14,P:15,Q:16,R:17,S:18,T:19,U:20,V:21,W:22,X:23,Y:24,Z:25,2:26,3:27,4:28,5:29,6:30,7:31},c=[0,0,0,0,0,0,0,0],u=function(e,t){t.length>10&&(t="..."+t.substr(-10));var r=new Error("Decoded data is not valid UTF-8. Maybe try base32.decode.asBytes()? Partial data after reading "+e+" bytes: "+t+" <-");throw r.position=e,r},l=function(e){if(""===e)return[];if(!/^[A-Z2-7=]+$/.test(e))throw new Error("Invalid base32 characters");for(var t,r,n,s,i,o,c,u,l=[],h=0,d=(e=e.replace(/=/g,"")).length,p=0,f=d>>3<<3;p<f;)t=a[e.charAt(p++)],r=a[e.charAt(p++)],n=a[e.charAt(p++)],s=a[e.charAt(p++)],i=a[e.charAt(p++)],o=a[e.charAt(p++)],c=a[e.charAt(p++)],u=a[e.charAt(p++)],l[h++]=255&(t<<3|r>>>2),l[h++]=255&(r<<6|n<<1|s>>>4),l[h++]=255&(s<<4|i>>>1),l[h++]=255&(i<<7|o<<2|c>>>3),l[h++]=255&(c<<5|u);var g=d-f;return 2===g?(t=a[e.charAt(p++)],r=a[e.charAt(p++)],l[h++]=255&(t<<3|r>>>2)):4===g?(t=a[e.charAt(p++)],r=a[e.charAt(p++)],n=a[e.charAt(p++)],s=a[e.charAt(p++)],l[h++]=255&(t<<3|r>>>2),l[h++]=255&(r<<6|n<<1|s>>>4)):5===g?(t=a[e.charAt(p++)],r=a[e.charAt(p++)],n=a[e.charAt(p++)],s=a[e.charAt(p++)],i=a[e.charAt(p++)],l[h++]=255&(t<<3|r>>>2),l[h++]=255&(r<<6|n<<1|s>>>4),l[h++]=255&(s<<4|i>>>1)):7===g&&(t=a[e.charAt(p++)],r=a[e.charAt(p++)],n=a[e.charAt(p++)],s=a[e.charAt(p++)],i=a[e.charAt(p++)],o=a[e.charAt(p++)],c=a[e.charAt(p++)],l[h++]=255&(t<<3|r>>>2),l[h++]=255&(r<<6|n<<1|s>>>4),l[h++]=255&(s<<4|i>>>1),l[h++]=255&(i<<7|o<<2|c>>>3)),l},h=function(e,t){if(!t)return function(e){for(var t,r,n="",s=e.length,i=0,o=0;i<s;)if((t=e[i++])<=127)n+=String.fromCharCode(t);else{t>191&&t<=223?(r=31&t,o=1):t<=239?(r=15&t,o=2):t<=247?(r=7&t,o=3):u(i,n);for(var a=0;a<o;++a)((t=e[i++])<128||t>191)&&u(i,n),r<<=6,r+=63&t;r>=55296&&r<=57343&&u(i,n),r>1114111&&u(i,n),r<=65535?n+=String.fromCharCode(r):(r-=65536,n+=String.fromCharCode(55296+(r>>10)),n+=String.fromCharCode(56320+(1023&r)))}return n}(l(e));if(""===e)return"";if(!/^[A-Z2-7=]+$/.test(e))throw new Error("Invalid base32 characters");var r,n,s,i,o,c,h,d,p="",f=e.indexOf("=");-1===f&&(f=e.length);for(var g=0,m=f>>3<<3;g<m;)r=a[e.charAt(g++)],n=a[e.charAt(g++)],s=a[e.charAt(g++)],i=a[e.charAt(g++)],o=a[e.charAt(g++)],c=a[e.charAt(g++)],h=a[e.charAt(g++)],d=a[e.charAt(g++)],p+=String.fromCharCode(255&(r<<3|n>>>2))+String.fromCharCode(255&(n<<6|s<<1|i>>>4))+String.fromCharCode(255&(i<<4|o>>>1))+String.fromCharCode(255&(o<<7|c<<2|h>>>3))+String.fromCharCode(255&(h<<5|d));var y=f-m;return 2===y?(r=a[e.charAt(g++)],n=a[e.charAt(g++)],p+=String.fromCharCode(255&(r<<3|n>>>2))):4===y?(r=a[e.charAt(g++)],n=a[e.charAt(g++)],s=a[e.charAt(g++)],i=a[e.charAt(g++)],p+=String.fromCharCode(255&(r<<3|n>>>2))+String.fromCharCode(255&(n<<6|s<<1|i>>>4))):5===y?(r=a[e.charAt(g++)],n=a[e.charAt(g++)],s=a[e.charAt(g++)],i=a[e.charAt(g++)],o=a[e.charAt(g++)],p+=String.fromCharCode(255&(r<<3|n>>>2))+String.fromCharCode(255&(n<<6|s<<1|i>>>4))+String.fromCharCode(255&(i<<4|o>>>1))):7===y&&(r=a[e.charAt(g++)],n=a[e.charAt(g++)],s=a[e.charAt(g++)],i=a[e.charAt(g++)],o=a[e.charAt(g++)],c=a[e.charAt(g++)],h=a[e.charAt(g++)],p+=String.fromCharCode(255&(r<<3|n>>>2))+String.fromCharCode(255&(n<<6|s<<1|i>>>4))+String.fromCharCode(255&(i<<4|o>>>1))+String.fromCharCode(255&(o<<7|c<<2|h>>>3))),p},d={encode:function(e,t){var r="string"!=typeof e;return r&&e.constructor===ArrayBuffer&&(e=new Uint8Array(e)),r?function(e){for(var t,r,n,s,i,a="",c=e.length,u=0,l=5*parseInt(c/5);u<l;)t=e[u++],r=e[u++],n=e[u++],s=e[u++],i=e[u++],a+=o[t>>>3]+o[31&(t<<2|r>>>6)]+o[r>>>1&31]+o[31&(r<<4|n>>>4)]+o[31&(n<<1|s>>>7)]+o[s>>>2&31]+o[31&(s<<3|i>>>5)]+o[31&i];var h=c-l;return 1===h?(t=e[u],a+=o[t>>>3]+o[t<<2&31]+"======"):2===h?(t=e[u++],r=e[u],a+=o[t>>>3]+o[31&(t<<2|r>>>6)]+o[r>>>1&31]+o[r<<4&31]+"===="):3===h?(t=e[u++],r=e[u++],n=e[u],a+=o[t>>>3]+o[31&(t<<2|r>>>6)]+o[r>>>1&31]+o[31&(r<<4|n>>>4)]+o[n<<1&31]+"==="):4===h&&(t=e[u++],r=e[u++],n=e[u++],s=e[u],a+=o[t>>>3]+o[31&(t<<2|r>>>6)]+o[r>>>1&31]+o[31&(r<<4|n>>>4)]+o[31&(n<<1|s>>>7)]+o[s>>>2&31]+o[s<<3&31]+"="),a}(e):t?function(e){for(var t,r,n,s,i,a="",c=e.length,u=0,l=5*parseInt(c/5);u<l;)t=e.charCodeAt(u++),r=e.charCodeAt(u++),n=e.charCodeAt(u++),s=e.charCodeAt(u++),i=e.charCodeAt(u++),a+=o[t>>>3]+o[31&(t<<2|r>>>6)]+o[r>>>1&31]+o[31&(r<<4|n>>>4)]+o[31&(n<<1|s>>>7)]+o[s>>>2&31]+o[31&(s<<3|i>>>5)]+o[31&i];var h=c-l;return 1===h?(t=e.charCodeAt(u),a+=o[t>>>3]+o[t<<2&31]+"======"):2===h?(t=e.charCodeAt(u++),r=e.charCodeAt(u),a+=o[t>>>3]+o[31&(t<<2|r>>>6)]+o[r>>>1&31]+o[r<<4&31]+"===="):3===h?(t=e.charCodeAt(u++),r=e.charCodeAt(u++),n=e.charCodeAt(u),a+=o[t>>>3]+o[31&(t<<2|r>>>6)]+o[r>>>1&31]+o[31&(r<<4|n>>>4)]+o[n<<1&31]+"==="):4===h&&(t=e.charCodeAt(u++),r=e.charCodeAt(u++),n=e.charCodeAt(u++),s=e.charCodeAt(u),a+=o[t>>>3]+o[31&(t<<2|r>>>6)]+o[r>>>1&31]+o[31&(r<<4|n>>>4)]+o[31&(n<<1|s>>>7)]+o[s>>>2&31]+o[s<<3&31]+"="),a}(e):function(e){var t,r,n,s,i,a,u,l=!1,h="",d=0,p=0,f=e.length;if(""===e)return h;do{for(c[0]=c[5],c[1]=c[6],c[2]=c[7],u=p;d<f&&u<5;++d)(a=e.charCodeAt(d))<128?c[u++]=a:a<2048?(c[u++]=192|a>>6,c[u++]=128|63&a):a<55296||a>=57344?(c[u++]=224|a>>12,c[u++]=128|a>>6&63,c[u++]=128|63&a):(a=65536+((1023&a)<<10|1023&e.charCodeAt(++d)),c[u++]=240|a>>18,c[u++]=128|a>>12&63,c[u++]=128|a>>6&63,c[u++]=128|63&a);p=u-5,d===f&&++d,d>f&&u<6&&(l=!0),t=c[0],u>4?(r=c[1],n=c[2],s=c[3],i=c[4],h+=o[t>>>3]+o[31&(t<<2|r>>>6)]+o[r>>>1&31]+o[31&(r<<4|n>>>4)]+o[31&(n<<1|s>>>7)]+o[s>>>2&31]+o[31&(s<<3|i>>>5)]+o[31&i]):1===u?h+=o[t>>>3]+o[t<<2&31]+"======":2===u?(r=c[1],h+=o[t>>>3]+o[31&(t<<2|r>>>6)]+o[r>>>1&31]+o[r<<4&31]+"===="):3===u?(r=c[1],n=c[2],h+=o[t>>>3]+o[31&(t<<2|r>>>6)]+o[r>>>1&31]+o[31&(r<<4|n>>>4)]+o[n<<1&31]+"==="):(r=c[1],n=c[2],s=c[3],h+=o[t>>>3]+o[31&(t<<2|r>>>6)]+o[r>>>1&31]+o[31&(r<<4|n>>>4)]+o[31&(n<<1|s>>>7)]+o[s>>>2&31]+o[s<<3&31]+"=")}while(!l);return h}(e)},decode:h};h.asBytes=l,s?e.exports=d:(t.base32=d,i&&(void 0===(n=function(){return d}.call(d,r,d,e))||(e.exports=n)))}()},525:(e,t)=>{t.read=function(e,t,r,n,s){var i,o,a=8*s-n-1,c=(1<<a)-1,u=c>>1,l=-7,h=r?s-1:0,d=r?-1:1,p=e[t+h];for(h+=d,i=p&(1<<-l)-1,p>>=-l,l+=a;l>0;i=256*i+e[t+h],h+=d,l-=8);for(o=i&(1<<-l)-1,i>>=-l,l+=n;l>0;o=256*o+e[t+h],h+=d,l-=8);if(0===i)i=1-u;else{if(i===c)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),i-=u}return(p?-1:1)*o*Math.pow(2,i-n)},t.write=function(e,t,r,n,s,i){var o,a,c,u=8*i-s-1,l=(1<<u)-1,h=l>>1,d=23===s?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,f=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),(t+=o+h>=1?d/c:d*Math.pow(2,1-h))*c>=2&&(o++,c/=2),o+h>=l?(a=0,o=l):o+h>=1?(a=(t*c-1)*Math.pow(2,s),o+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,s),o=0));s>=8;e[r+p]=255&a,p+=f,a/=256,s-=8);for(o=o<<s|a,u+=s;u>0;e[r+p]=255&o,p+=f,o/=256,u-=8);e[r+p-f]|=128*g}},757:(e,t,r)=>{var n;!function(){"use strict";var t="input is invalid type",s="object"==typeof window,i=s?window:{};i.JS_SHA512_NO_WINDOW&&(s=!1);var o=!s&&"object"==typeof self;!i.JS_SHA512_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?i=r.g:o&&(i=self);var a=!i.JS_SHA512_NO_COMMON_JS&&e.exports,c=r.amdO,u=!i.JS_SHA512_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,l="0123456789abcdef".split(""),h=[-2147483648,8388608,32768,128],d=[24,16,8,0],p=[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],f=["hex","array","digest","arrayBuffer"],g=[];!i.JS_SHA512_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!u||!i.JS_SHA512_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});var m=function(e,t){return function(r){return new v(t,!0).update(r)[e]()}},y=function(e){var t=m("hex",e);t.create=function(){return new v(e)},t.update=function(e){return t.create().update(e)};for(var r=0;r<f.length;++r){var n=f[r];t[n]=m(n,e)}return t},w=function(e,t){return function(r,n){return new x(r,t,!0).update(n)[e]()}},b=function(e){var t=w("hex",e);t.create=function(t){return new x(t,e)},t.update=function(e,r){return t.create(e).update(r)};for(var r=0;r<f.length;++r){var n=f[r];t[n]=w(n,e)}return t};function v(e,t){t?(g[0]=g[1]=g[2]=g[3]=g[4]=g[5]=g[6]=g[7]=g[8]=g[9]=g[10]=g[11]=g[12]=g[13]=g[14]=g[15]=g[16]=g[17]=g[18]=g[19]=g[20]=g[21]=g[22]=g[23]=g[24]=g[25]=g[26]=g[27]=g[28]=g[29]=g[30]=g[31]=g[32]=0,this.blocks=g):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],384==e?(this.h0h=3418070365,this.h0l=3238371032,this.h1h=1654270250,this.h1l=914150663,this.h2h=2438529370,this.h2l=812702999,this.h3h=355462360,this.h3l=4144912697,this.h4h=1731405415,this.h4l=4290775857,this.h5h=2394180231,this.h5l=1750603025,this.h6h=3675008525,this.h6l=1694076839,this.h7h=1203062813,this.h7l=3204075428):256==e?(this.h0h=573645204,this.h0l=4230739756,this.h1h=2673172387,this.h1l=3360449730,this.h2h=596883563,this.h2l=1867755857,this.h3h=2520282905,this.h3l=1497426621,this.h4h=2519219938,this.h4l=2827943907,this.h5h=3193839141,this.h5l=1401305490,this.h6h=721525244,this.h6l=746961066,this.h7h=246885852,this.h7l=2177182882):224==e?(this.h0h=2352822216,this.h0l=424955298,this.h1h=1944164710,this.h1l=2312950998,this.h2h=502970286,this.h2l=855612546,this.h3h=1738396948,this.h3l=1479516111,this.h4h=258812777,this.h4l=2077511080,this.h5h=2011393907,this.h5l=79989058,this.h6h=1067287976,this.h6l=1780299464,this.h7h=286451373,this.h7l=2446758561):(this.h0h=1779033703,this.h0l=4089235720,this.h1h=3144134277,this.h1l=2227873595,this.h2h=1013904242,this.h2l=4271175723,this.h3h=2773480762,this.h3l=1595750129,this.h4h=1359893119,this.h4l=2917565137,this.h5h=2600822924,this.h5l=725511199,this.h6h=528734635,this.h6l=4215389547,this.h7h=1541459225,this.h7l=327033209),this.bits=e,this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1}function x(e,r,n){var s,i=typeof e;if("string"!==i){if("object"!==i)throw new Error(t);if(null===e)throw new Error(t);if(u&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||u&&ArrayBuffer.isView(e)))throw new Error(t);s=!0}var o=e.length;if(!s){for(var a,c=[],l=(o=e.length,0),h=0;h<o;++h)(a=e.charCodeAt(h))<128?c[l++]=a:a<2048?(c[l++]=192|a>>6,c[l++]=128|63&a):a<55296||a>=57344?(c[l++]=224|a>>12,c[l++]=128|a>>6&63,c[l++]=128|63&a):(a=65536+((1023&a)<<10|1023&e.charCodeAt(++h)),c[l++]=240|a>>18,c[l++]=128|a>>12&63,c[l++]=128|a>>6&63,c[l++]=128|63&a);e=c}e.length>128&&(e=new v(r,!0).update(e).array());var d=[],p=[];for(h=0;h<128;++h){var f=e[h]||0;d[h]=92^f,p[h]=54^f}v.call(this,r,n),this.update(p),this.oKeyPad=d,this.inner=!0,this.sharedMemory=n}v.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var r,n=typeof e;if("string"!==n){if("object"!==n)throw new Error(t);if(null===e)throw new Error(t);if(u&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||u&&ArrayBuffer.isView(e)))throw new Error(t);r=!0}for(var s,i,o=0,a=e.length,c=this.blocks;o<a;){if(this.hashed&&(this.hashed=!1,c[0]=this.block,c[1]=c[2]=c[3]=c[4]=c[5]=c[6]=c[7]=c[8]=c[9]=c[10]=c[11]=c[12]=c[13]=c[14]=c[15]=c[16]=c[17]=c[18]=c[19]=c[20]=c[21]=c[22]=c[23]=c[24]=c[25]=c[26]=c[27]=c[28]=c[29]=c[30]=c[31]=c[32]=0),r)for(i=this.start;o<a&&i<128;++o)c[i>>2]|=e[o]<<d[3&i++];else for(i=this.start;o<a&&i<128;++o)(s=e.charCodeAt(o))<128?c[i>>2]|=s<<d[3&i++]:s<2048?(c[i>>2]|=(192|s>>6)<<d[3&i++],c[i>>2]|=(128|63&s)<<d[3&i++]):s<55296||s>=57344?(c[i>>2]|=(224|s>>12)<<d[3&i++],c[i>>2]|=(128|s>>6&63)<<d[3&i++],c[i>>2]|=(128|63&s)<<d[3&i++]):(s=65536+((1023&s)<<10|1023&e.charCodeAt(++o)),c[i>>2]|=(240|s>>18)<<d[3&i++],c[i>>2]|=(128|s>>12&63)<<d[3&i++],c[i>>2]|=(128|s>>6&63)<<d[3&i++],c[i>>2]|=(128|63&s)<<d[3&i++]);this.lastByteIndex=i,this.bytes+=i-this.start,i>=128?(this.block=c[32],this.start=i-128,this.hash(),this.hashed=!0):this.start=i}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this},v.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[32]=this.block,e[t>>2]|=h[3&t],this.block=e[32],t>=112&&(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()}},v.prototype.hash=function(){var e,t,r,n,s,i,o,a,c,u,l,h,d,f,g,m,y,w,b,v,x,A,_,E,T,S=this.h0h,k=this.h0l,R=this.h1h,I=this.h1l,B=this.h2h,U=this.h2l,P=this.h3h,j=this.h3l,q=this.h4h,D=this.h4l,$=this.h5h,O=this.h5l,C=this.h6h,L=this.h6l,M=this.h7h,N=this.h7l,F=this.blocks;for(e=32;e<160;e+=2)t=((v=F[e-30])>>>1|(x=F[e-29])<<31)^(v>>>8|x<<24)^v>>>7,r=(x>>>1|v<<31)^(x>>>8|v<<24)^(x>>>7|v<<25),n=((v=F[e-4])>>>19|(x=F[e-3])<<13)^(x>>>29|v<<3)^v>>>6,s=(x>>>19|v<<13)^(v>>>29|x<<3)^(x>>>6|v<<26),v=F[e-32],x=F[e-31],c=((A=F[e-14])>>>16)+(v>>>16)+(t>>>16)+(n>>>16)+((a=(65535&A)+(65535&v)+(65535&t)+(65535&n)+((o=((_=F[e-13])>>>16)+(x>>>16)+(r>>>16)+(s>>>16)+((i=(65535&_)+(65535&x)+(65535&r)+(65535&s))>>>16))>>>16))>>>16),F[e]=c<<16|65535&a,F[e+1]=o<<16|65535&i;var K=S,W=k,z=R,V=I,H=B,G=U,Y=P,J=j,X=q,Z=D,Q=$,ee=O,te=C,re=L,ne=M,se=N;for(m=z&H,y=V&G,e=0;e<160;e+=8)t=(K>>>28|W<<4)^(W>>>2|K<<30)^(W>>>7|K<<25),r=(W>>>28|K<<4)^(K>>>2|W<<30)^(K>>>7|W<<25),n=(X>>>14|Z<<18)^(X>>>18|Z<<14)^(Z>>>9|X<<23),s=(Z>>>14|X<<18)^(Z>>>18|X<<14)^(X>>>9|Z<<23),w=(u=K&z)^K&H^m,b=(l=W&V)^W&G^y,E=X&Q^~X&te,T=Z&ee^~Z&re,v=F[e],x=F[e+1],v=(c=((A=p[e])>>>16)+(v>>>16)+(E>>>16)+(n>>>16)+(ne>>>16)+((a=(65535&A)+(65535&v)+(65535&E)+(65535&n)+(65535&ne)+((o=((_=p[e+1])>>>16)+(x>>>16)+(T>>>16)+(s>>>16)+(se>>>16)+((i=(65535&_)+(65535&x)+(65535&T)+(65535&s)+(65535&se))>>>16))>>>16))>>>16))<<16|65535&a,x=o<<16|65535&i,A=(c=(w>>>16)+(t>>>16)+((a=(65535&w)+(65535&t)+((o=(b>>>16)+(r>>>16)+((i=(65535&b)+(65535&r))>>>16))>>>16))>>>16))<<16|65535&a,_=o<<16|65535&i,ne=(c=(Y>>>16)+(v>>>16)+((a=(65535&Y)+(65535&v)+((o=(J>>>16)+(x>>>16)+((i=(65535&J)+(65535&x))>>>16))>>>16))>>>16))<<16|65535&a,se=o<<16|65535&i,t=((Y=(c=(A>>>16)+(v>>>16)+((a=(65535&A)+(65535&v)+((o=(_>>>16)+(x>>>16)+((i=(65535&_)+(65535&x))>>>16))>>>16))>>>16))<<16|65535&a)>>>28|(J=o<<16|65535&i)<<4)^(J>>>2|Y<<30)^(J>>>7|Y<<25),r=(J>>>28|Y<<4)^(Y>>>2|J<<30)^(Y>>>7|J<<25),n=(ne>>>14|se<<18)^(ne>>>18|se<<14)^(se>>>9|ne<<23),s=(se>>>14|ne<<18)^(se>>>18|ne<<14)^(ne>>>9|se<<23),w=(h=Y&K)^Y&z^u,b=(d=J&W)^J&V^l,E=ne&X^~ne&Q,T=se&Z^~se&ee,v=F[e+2],x=F[e+3],v=(c=((A=p[e+2])>>>16)+(v>>>16)+(E>>>16)+(n>>>16)+(te>>>16)+((a=(65535&A)+(65535&v)+(65535&E)+(65535&n)+(65535&te)+((o=((_=p[e+3])>>>16)+(x>>>16)+(T>>>16)+(s>>>16)+(re>>>16)+((i=(65535&_)+(65535&x)+(65535&T)+(65535&s)+(65535&re))>>>16))>>>16))>>>16))<<16|65535&a,x=o<<16|65535&i,A=(c=(w>>>16)+(t>>>16)+((a=(65535&w)+(65535&t)+((o=(b>>>16)+(r>>>16)+((i=(65535&b)+(65535&r))>>>16))>>>16))>>>16))<<16|65535&a,_=o<<16|65535&i,te=(c=(H>>>16)+(v>>>16)+((a=(65535&H)+(65535&v)+((o=(G>>>16)+(x>>>16)+((i=(65535&G)+(65535&x))>>>16))>>>16))>>>16))<<16|65535&a,re=o<<16|65535&i,t=((H=(c=(A>>>16)+(v>>>16)+((a=(65535&A)+(65535&v)+((o=(_>>>16)+(x>>>16)+((i=(65535&_)+(65535&x))>>>16))>>>16))>>>16))<<16|65535&a)>>>28|(G=o<<16|65535&i)<<4)^(G>>>2|H<<30)^(G>>>7|H<<25),r=(G>>>28|H<<4)^(H>>>2|G<<30)^(H>>>7|G<<25),n=(te>>>14|re<<18)^(te>>>18|re<<14)^(re>>>9|te<<23),s=(re>>>14|te<<18)^(re>>>18|te<<14)^(te>>>9|re<<23),w=(f=H&Y)^H&K^h,b=(g=G&J)^G&W^d,E=te&ne^~te&X,T=re&se^~re&Z,v=F[e+4],x=F[e+5],v=(c=((A=p[e+4])>>>16)+(v>>>16)+(E>>>16)+(n>>>16)+(Q>>>16)+((a=(65535&A)+(65535&v)+(65535&E)+(65535&n)+(65535&Q)+((o=((_=p[e+5])>>>16)+(x>>>16)+(T>>>16)+(s>>>16)+(ee>>>16)+((i=(65535&_)+(65535&x)+(65535&T)+(65535&s)+(65535&ee))>>>16))>>>16))>>>16))<<16|65535&a,x=o<<16|65535&i,A=(c=(w>>>16)+(t>>>16)+((a=(65535&w)+(65535&t)+((o=(b>>>16)+(r>>>16)+((i=(65535&b)+(65535&r))>>>16))>>>16))>>>16))<<16|65535&a,_=o<<16|65535&i,Q=(c=(z>>>16)+(v>>>16)+((a=(65535&z)+(65535&v)+((o=(V>>>16)+(x>>>16)+((i=(65535&V)+(65535&x))>>>16))>>>16))>>>16))<<16|65535&a,ee=o<<16|65535&i,t=((z=(c=(A>>>16)+(v>>>16)+((a=(65535&A)+(65535&v)+((o=(_>>>16)+(x>>>16)+((i=(65535&_)+(65535&x))>>>16))>>>16))>>>16))<<16|65535&a)>>>28|(V=o<<16|65535&i)<<4)^(V>>>2|z<<30)^(V>>>7|z<<25),r=(V>>>28|z<<4)^(z>>>2|V<<30)^(z>>>7|V<<25),n=(Q>>>14|ee<<18)^(Q>>>18|ee<<14)^(ee>>>9|Q<<23),s=(ee>>>14|Q<<18)^(ee>>>18|Q<<14)^(Q>>>9|ee<<23),w=(m=z&H)^z&Y^f,b=(y=V&G)^V&J^g,E=Q&te^~Q&ne,T=ee&re^~ee&se,v=F[e+6],x=F[e+7],v=(c=((A=p[e+6])>>>16)+(v>>>16)+(E>>>16)+(n>>>16)+(X>>>16)+((a=(65535&A)+(65535&v)+(65535&E)+(65535&n)+(65535&X)+((o=((_=p[e+7])>>>16)+(x>>>16)+(T>>>16)+(s>>>16)+(Z>>>16)+((i=(65535&_)+(65535&x)+(65535&T)+(65535&s)+(65535&Z))>>>16))>>>16))>>>16))<<16|65535&a,x=o<<16|65535&i,A=(c=(w>>>16)+(t>>>16)+((a=(65535&w)+(65535&t)+((o=(b>>>16)+(r>>>16)+((i=(65535&b)+(65535&r))>>>16))>>>16))>>>16))<<16|65535&a,_=o<<16|65535&i,X=(c=(K>>>16)+(v>>>16)+((a=(65535&K)+(65535&v)+((o=(W>>>16)+(x>>>16)+((i=(65535&W)+(65535&x))>>>16))>>>16))>>>16))<<16|65535&a,Z=o<<16|65535&i,K=(c=(A>>>16)+(v>>>16)+((a=(65535&A)+(65535&v)+((o=(_>>>16)+(x>>>16)+((i=(65535&_)+(65535&x))>>>16))>>>16))>>>16))<<16|65535&a,W=o<<16|65535&i;c=(S>>>16)+(K>>>16)+((a=(65535&S)+(65535&K)+((o=(k>>>16)+(W>>>16)+((i=(65535&k)+(65535&W))>>>16))>>>16))>>>16),this.h0h=c<<16|65535&a,this.h0l=o<<16|65535&i,c=(R>>>16)+(z>>>16)+((a=(65535&R)+(65535&z)+((o=(I>>>16)+(V>>>16)+((i=(65535&I)+(65535&V))>>>16))>>>16))>>>16),this.h1h=c<<16|65535&a,this.h1l=o<<16|65535&i,c=(B>>>16)+(H>>>16)+((a=(65535&B)+(65535&H)+((o=(U>>>16)+(G>>>16)+((i=(65535&U)+(65535&G))>>>16))>>>16))>>>16),this.h2h=c<<16|65535&a,this.h2l=o<<16|65535&i,c=(P>>>16)+(Y>>>16)+((a=(65535&P)+(65535&Y)+((o=(j>>>16)+(J>>>16)+((i=(65535&j)+(65535&J))>>>16))>>>16))>>>16),this.h3h=c<<16|65535&a,this.h3l=o<<16|65535&i,c=(q>>>16)+(X>>>16)+((a=(65535&q)+(65535&X)+((o=(D>>>16)+(Z>>>16)+((i=(65535&D)+(65535&Z))>>>16))>>>16))>>>16),this.h4h=c<<16|65535&a,this.h4l=o<<16|65535&i,c=($>>>16)+(Q>>>16)+((a=(65535&$)+(65535&Q)+((o=(O>>>16)+(ee>>>16)+((i=(65535&O)+(65535&ee))>>>16))>>>16))>>>16),this.h5h=c<<16|65535&a,this.h5l=o<<16|65535&i,c=(C>>>16)+(te>>>16)+((a=(65535&C)+(65535&te)+((o=(L>>>16)+(re>>>16)+((i=(65535&L)+(65535&re))>>>16))>>>16))>>>16),this.h6h=c<<16|65535&a,this.h6l=o<<16|65535&i,c=(M>>>16)+(ne>>>16)+((a=(65535&M)+(65535&ne)+((o=(N>>>16)+(se>>>16)+((i=(65535&N)+(65535&se))>>>16))>>>16))>>>16),this.h7h=c<<16|65535&a,this.h7l=o<<16|65535&i},v.prototype.hex=function(){this.finalize();var e=this.h0h,t=this.h0l,r=this.h1h,n=this.h1l,s=this.h2h,i=this.h2l,o=this.h3h,a=this.h3l,c=this.h4h,u=this.h4l,h=this.h5h,d=this.h5l,p=this.h6h,f=this.h6l,g=this.h7h,m=this.h7l,y=this.bits,w=l[e>>28&15]+l[e>>24&15]+l[e>>20&15]+l[e>>16&15]+l[e>>12&15]+l[e>>8&15]+l[e>>4&15]+l[15&e]+l[t>>28&15]+l[t>>24&15]+l[t>>20&15]+l[t>>16&15]+l[t>>12&15]+l[t>>8&15]+l[t>>4&15]+l[15&t]+l[r>>28&15]+l[r>>24&15]+l[r>>20&15]+l[r>>16&15]+l[r>>12&15]+l[r>>8&15]+l[r>>4&15]+l[15&r]+l[n>>28&15]+l[n>>24&15]+l[n>>20&15]+l[n>>16&15]+l[n>>12&15]+l[n>>8&15]+l[n>>4&15]+l[15&n]+l[s>>28&15]+l[s>>24&15]+l[s>>20&15]+l[s>>16&15]+l[s>>12&15]+l[s>>8&15]+l[s>>4&15]+l[15&s]+l[i>>28&15]+l[i>>24&15]+l[i>>20&15]+l[i>>16&15]+l[i>>12&15]+l[i>>8&15]+l[i>>4&15]+l[15&i]+l[o>>28&15]+l[o>>24&15]+l[o>>20&15]+l[o>>16&15]+l[o>>12&15]+l[o>>8&15]+l[o>>4&15]+l[15&o];return y>=256&&(w+=l[a>>28&15]+l[a>>24&15]+l[a>>20&15]+l[a>>16&15]+l[a>>12&15]+l[a>>8&15]+l[a>>4&15]+l[15&a]),y>=384&&(w+=l[c>>28&15]+l[c>>24&15]+l[c>>20&15]+l[c>>16&15]+l[c>>12&15]+l[c>>8&15]+l[c>>4&15]+l[15&c]+l[u>>28&15]+l[u>>24&15]+l[u>>20&15]+l[u>>16&15]+l[u>>12&15]+l[u>>8&15]+l[u>>4&15]+l[15&u]+l[h>>28&15]+l[h>>24&15]+l[h>>20&15]+l[h>>16&15]+l[h>>12&15]+l[h>>8&15]+l[h>>4&15]+l[15&h]+l[d>>28&15]+l[d>>24&15]+l[d>>20&15]+l[d>>16&15]+l[d>>12&15]+l[d>>8&15]+l[d>>4&15]+l[15&d]),512==y&&(w+=l[p>>28&15]+l[p>>24&15]+l[p>>20&15]+l[p>>16&15]+l[p>>12&15]+l[p>>8&15]+l[p>>4&15]+l[15&p]+l[f>>28&15]+l[f>>24&15]+l[f>>20&15]+l[f>>16&15]+l[f>>12&15]+l[f>>8&15]+l[f>>4&15]+l[15&f]+l[g>>28&15]+l[g>>24&15]+l[g>>20&15]+l[g>>16&15]+l[g>>12&15]+l[g>>8&15]+l[g>>4&15]+l[15&g]+l[m>>28&15]+l[m>>24&15]+l[m>>20&15]+l[m>>16&15]+l[m>>12&15]+l[m>>8&15]+l[m>>4&15]+l[15&m]),w},v.prototype.toString=v.prototype.hex,v.prototype.digest=function(){this.finalize();var e=this.h0h,t=this.h0l,r=this.h1h,n=this.h1l,s=this.h2h,i=this.h2l,o=this.h3h,a=this.h3l,c=this.h4h,u=this.h4l,l=this.h5h,h=this.h5l,d=this.h6h,p=this.h6l,f=this.h7h,g=this.h7l,m=this.bits,y=[e>>24&255,e>>16&255,e>>8&255,255&e,t>>24&255,t>>16&255,t>>8&255,255&t,r>>24&255,r>>16&255,r>>8&255,255&r,n>>24&255,n>>16&255,n>>8&255,255&n,s>>24&255,s>>16&255,s>>8&255,255&s,i>>24&255,i>>16&255,i>>8&255,255&i,o>>24&255,o>>16&255,o>>8&255,255&o];return m>=256&&y.push(a>>24&255,a>>16&255,a>>8&255,255&a),m>=384&&y.push(c>>24&255,c>>16&255,c>>8&255,255&c,u>>24&255,u>>16&255,u>>8&255,255&u,l>>24&255,l>>16&255,l>>8&255,255&l,h>>24&255,h>>16&255,h>>8&255,255&h),512==m&&y.push(d>>24&255,d>>16&255,d>>8&255,255&d,p>>24&255,p>>16&255,p>>8&255,255&p,f>>24&255,f>>16&255,f>>8&255,255&f,g>>24&255,g>>16&255,g>>8&255,255&g),y},v.prototype.array=v.prototype.digest,v.prototype.arrayBuffer=function(){this.finalize();var e=this.bits,t=new ArrayBuffer(e/8),r=new DataView(t);return r.setUint32(0,this.h0h),r.setUint32(4,this.h0l),r.setUint32(8,this.h1h),r.setUint32(12,this.h1l),r.setUint32(16,this.h2h),r.setUint32(20,this.h2l),r.setUint32(24,this.h3h),e>=256&&r.setUint32(28,this.h3l),e>=384&&(r.setUint32(32,this.h4h),r.setUint32(36,this.h4l),r.setUint32(40,this.h5h),r.setUint32(44,this.h5l)),512==e&&(r.setUint32(48,this.h6h),r.setUint32(52,this.h6l),r.setUint32(56,this.h7h),r.setUint32(60,this.h7l)),t},v.prototype.clone=function(){var e=new v(this.bits,!1);return this.copyTo(e),e},v.prototype.copyTo=function(e){var t=0,r=["h0h","h0l","h1h","h1l","h2h","h2l","h3h","h3l","h4h","h4l","h5h","h5l","h6h","h6l","h7h","h7l","start","bytes","hBytes","finalized","hashed","lastByteIndex"];for(t=0;t<r.length;++t)e[r[t]]=this[r[t]];for(t=0;t<this.blocks.length;++t)e.blocks[t]=this.blocks[t]},x.prototype=new v,x.prototype.finalize=function(){if(v.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();v.call(this,this.bits,this.sharedMemory),this.update(this.oKeyPad),this.update(e),v.prototype.finalize.call(this)}},x.prototype.clone=function(){var e=new x([],this.bits,!1);this.copyTo(e),e.inner=this.inner;for(var t=0;t<this.oKeyPad.length;++t)e.oKeyPad[t]=this.oKeyPad[t];return e};var A=y(512);A.sha512=A,A.sha384=y(384),A.sha512_256=y(256),A.sha512_224=y(224),A.sha512.hmac=b(512),A.sha384.hmac=b(384),A.sha512_256.hmac=b(256),A.sha512_224.hmac=b(224),a?e.exports=A:(i.sha512=A.sha512,i.sha384=A.sha384,i.sha512_256=A.sha512_256,i.sha512_224=A.sha512_224,c&&(void 0===(n=function(){return A}.call(A,r,A,e))||(e.exports=n)))}()},360:(e,t,r)=>{var n=r(592).stringify,s=r(385);e.exports=function(e){return{parse:s(e),stringify:n}},e.exports.parse=s(),e.exports.stringify=n},385:(e,t,r)=>{var n=null;const s=/(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/,i=/(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/;e.exports=function(e){"use strict";var t={strict:!1,storeAsString:!1,alwaysParseAsBig:!1,useNativeBigInt:!1,protoAction:"error",constructorAction:"error"};if(null!=e){if(!0===e.strict&&(t.strict=!0),!0===e.storeAsString&&(t.storeAsString=!0),t.alwaysParseAsBig=!0===e.alwaysParseAsBig&&e.alwaysParseAsBig,t.useNativeBigInt=!0===e.useNativeBigInt&&e.useNativeBigInt,void 0!==e.constructorAction){if("error"!==e.constructorAction&&"ignore"!==e.constructorAction&&"preserve"!==e.constructorAction)throw new Error(`Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${e.constructorAction}`);t.constructorAction=e.constructorAction}if(void 0!==e.protoAction){if("error"!==e.protoAction&&"ignore"!==e.protoAction&&"preserve"!==e.protoAction)throw new Error(`Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${e.protoAction}`);t.protoAction=e.protoAction}}var o,a,c,u,l={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},h=function(e){throw{name:"SyntaxError",message:e,at:o,text:c}},d=function(e){return e&&e!==a&&h("Expected '"+e+"' instead of '"+a+"'"),a=c.charAt(o),o+=1,a},p=function(){var e,s="";for("-"===a&&(s="-",d("-"));a>="0"&&a<="9";)s+=a,d();if("."===a)for(s+=".";d()&&a>="0"&&a<="9";)s+=a;if("e"===a||"E"===a)for(s+=a,d(),"-"!==a&&"+"!==a||(s+=a,d());a>="0"&&a<="9";)s+=a,d();if(e=+s,isFinite(e))return null==n&&(n=r(117)),s.length>15?t.storeAsString?s:t.useNativeBigInt?BigInt(s):new n(s):t.alwaysParseAsBig?t.useNativeBigInt?BigInt(e):new n(e):e;h("Bad number")},f=function(){var e,t,r,n="";if('"'===a)for(var s=o;d();){if('"'===a)return o-1>s&&(n+=c.substring(s,o-1)),d(),n;if("\\"===a){if(o-1>s&&(n+=c.substring(s,o-1)),d(),"u"===a){for(r=0,t=0;t<4&&(e=parseInt(d(),16),isFinite(e));t+=1)r=16*r+e;n+=String.fromCharCode(r)}else{if("string"!=typeof l[a])break;n+=l[a]}s=o}}h("Bad string")},g=function(){for(;a&&a<=" ";)d()};return u=function(){switch(g(),a){case"{":return function(){var e,r=Object.create(null);if("{"===a){if(d("{"),g(),"}"===a)return d("}"),r;for(;a;){if(e=f(),g(),d(":"),!0===t.strict&&Object.hasOwnProperty.call(r,e)&&h('Duplicate key "'+e+'"'),!0===s.test(e)?"error"===t.protoAction?h("Object contains forbidden prototype property"):"ignore"===t.protoAction?u():r[e]=u():!0===i.test(e)?"error"===t.constructorAction?h("Object contains forbidden constructor property"):"ignore"===t.constructorAction?u():r[e]=u():r[e]=u(),g(),"}"===a)return d("}"),r;d(","),g()}}h("Bad object")}();case"[":return function(){var e=[];if("["===a){if(d("["),g(),"]"===a)return d("]"),e;for(;a;){if(e.push(u()),g(),"]"===a)return d("]"),e;d(","),g()}}h("Bad array")}();case'"':return f();case"-":return p();default:return a>="0"&&a<="9"?p():function(){switch(a){case"t":return d("t"),d("r"),d("u"),d("e"),!0;case"f":return d("f"),d("a"),d("l"),d("s"),d("e"),!1;case"n":return d("n"),d("u"),d("l"),d("l"),null}h("Unexpected '"+a+"'")}()}},function(e,t){var r;return c=e+"",o=0,a=" ",r=u(),g(),a&&h("Syntax error"),"function"==typeof t?function e(r,n){var s,i=r[n];return i&&"object"==typeof i&&Object.keys(i).forEach((function(t){void 0!==(s=e(i,t))?i[t]=s:delete i[t]})),t.call(r,n,i)}({"":r},""):r}}},592:(e,t,r)=>{var n=r(117),s=e.exports;!function(){"use strict";var e,t,r,i=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,o={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function a(e){return i.lastIndex=0,i.test(e)?'"'+e.replace(i,(function(e){var t=o[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}function c(s,i){var o,u,l,h,d,p=e,f=i[s],g=null!=f&&(f instanceof n||n.isBigNumber(f));switch(f&&"object"==typeof f&&"function"==typeof f.toJSON&&(f=f.toJSON(s)),"function"==typeof r&&(f=r.call(i,s,f)),typeof f){case"string":return g?f:a(f);case"number":return isFinite(f)?String(f):"null";case"boolean":case"null":case"bigint":return String(f);case"object":if(!f)return"null";if(e+=t,d=[],"[object Array]"===Object.prototype.toString.apply(f)){for(h=f.length,o=0;o<h;o+=1)d[o]=c(o,f)||"null";return l=0===d.length?"[]":e?"[\n"+e+d.join(",\n"+e)+"\n"+p+"]":"["+d.join(",")+"]",e=p,l}if(r&&"object"==typeof r)for(h=r.length,o=0;o<h;o+=1)"string"==typeof r[o]&&(l=c(u=r[o],f))&&d.push(a(u)+(e?": ":":")+l);else Object.keys(f).forEach((function(t){var r=c(t,f);r&&d.push(a(t)+(e?": ":":")+r)}));return l=0===d.length?"{}":e?"{\n"+e+d.join(",\n"+e)+"\n"+p+"}":"{"+d.join(",")+"}",e=p,l}}"function"!=typeof s.stringify&&(s.stringify=function(n,s,i){var o;if(e="",t="","number"==typeof i)for(o=0;o<i;o+=1)t+=" ";else"string"==typeof i&&(t=i);if(r=s,s&&"function"!=typeof s&&("object"!=typeof s||"number"!=typeof s.length))throw new Error("JSON.stringify");return c("",{"":n})})}()},765:function(e,t){!function(e){"use strict";var t=function(e){var t,r=new Float64Array(16);if(e)for(t=0;t<e.length;t++)r[t]=e[t];return r},r=function(){throw new Error("no PRNG")},n=new Uint8Array(16),s=new Uint8Array(32);s[0]=9;var i=t(),o=t([1]),a=t([56129,1]),c=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),u=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),l=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),h=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),d=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function p(e,t,r,n){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r,e[t+4]=n>>24&255,e[t+5]=n>>16&255,e[t+6]=n>>8&255,e[t+7]=255&n}function f(e,t,r,n,s){var i,o=0;for(i=0;i<s;i++)o|=e[t+i]^r[n+i];return(1&o-1>>>8)-1}function g(e,t,r,n){return f(e,t,r,n,16)}function m(e,t,r,n){return f(e,t,r,n,32)}function y(e,t,r,n){!function(e,t,r,n){for(var s,i=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,o=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,c=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,u=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,h=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,d=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,p=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,f=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,g=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,m=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,y=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,w=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,b=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,v=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,x=i,A=o,_=a,E=c,T=u,S=l,k=h,R=d,I=p,B=f,U=g,P=m,j=y,q=w,D=b,$=v,O=0;O<20;O+=2)x^=(s=(j^=(s=(I^=(s=(T^=(s=x+j|0)<<7|s>>>25)+x|0)<<9|s>>>23)+T|0)<<13|s>>>19)+I|0)<<18|s>>>14,S^=(s=(A^=(s=(q^=(s=(B^=(s=S+A|0)<<7|s>>>25)+S|0)<<9|s>>>23)+B|0)<<13|s>>>19)+q|0)<<18|s>>>14,U^=(s=(k^=(s=(_^=(s=(D^=(s=U+k|0)<<7|s>>>25)+U|0)<<9|s>>>23)+D|0)<<13|s>>>19)+_|0)<<18|s>>>14,$^=(s=(P^=(s=(R^=(s=(E^=(s=$+P|0)<<7|s>>>25)+$|0)<<9|s>>>23)+E|0)<<13|s>>>19)+R|0)<<18|s>>>14,x^=(s=(E^=(s=(_^=(s=(A^=(s=x+E|0)<<7|s>>>25)+x|0)<<9|s>>>23)+A|0)<<13|s>>>19)+_|0)<<18|s>>>14,S^=(s=(T^=(s=(R^=(s=(k^=(s=S+T|0)<<7|s>>>25)+S|0)<<9|s>>>23)+k|0)<<13|s>>>19)+R|0)<<18|s>>>14,U^=(s=(B^=(s=(I^=(s=(P^=(s=U+B|0)<<7|s>>>25)+U|0)<<9|s>>>23)+P|0)<<13|s>>>19)+I|0)<<18|s>>>14,$^=(s=(D^=(s=(q^=(s=(j^=(s=$+D|0)<<7|s>>>25)+$|0)<<9|s>>>23)+j|0)<<13|s>>>19)+q|0)<<18|s>>>14;x=x+i|0,A=A+o|0,_=_+a|0,E=E+c|0,T=T+u|0,S=S+l|0,k=k+h|0,R=R+d|0,I=I+p|0,B=B+f|0,U=U+g|0,P=P+m|0,j=j+y|0,q=q+w|0,D=D+b|0,$=$+v|0,e[0]=x>>>0&255,e[1]=x>>>8&255,e[2]=x>>>16&255,e[3]=x>>>24&255,e[4]=A>>>0&255,e[5]=A>>>8&255,e[6]=A>>>16&255,e[7]=A>>>24&255,e[8]=_>>>0&255,e[9]=_>>>8&255,e[10]=_>>>16&255,e[11]=_>>>24&255,e[12]=E>>>0&255,e[13]=E>>>8&255,e[14]=E>>>16&255,e[15]=E>>>24&255,e[16]=T>>>0&255,e[17]=T>>>8&255,e[18]=T>>>16&255,e[19]=T>>>24&255,e[20]=S>>>0&255,e[21]=S>>>8&255,e[22]=S>>>16&255,e[23]=S>>>24&255,e[24]=k>>>0&255,e[25]=k>>>8&255,e[26]=k>>>16&255,e[27]=k>>>24&255,e[28]=R>>>0&255,e[29]=R>>>8&255,e[30]=R>>>16&255,e[31]=R>>>24&255,e[32]=I>>>0&255,e[33]=I>>>8&255,e[34]=I>>>16&255,e[35]=I>>>24&255,e[36]=B>>>0&255,e[37]=B>>>8&255,e[38]=B>>>16&255,e[39]=B>>>24&255,e[40]=U>>>0&255,e[41]=U>>>8&255,e[42]=U>>>16&255,e[43]=U>>>24&255,e[44]=P>>>0&255,e[45]=P>>>8&255,e[46]=P>>>16&255,e[47]=P>>>24&255,e[48]=j>>>0&255,e[49]=j>>>8&255,e[50]=j>>>16&255,e[51]=j>>>24&255,e[52]=q>>>0&255,e[53]=q>>>8&255,e[54]=q>>>16&255,e[55]=q>>>24&255,e[56]=D>>>0&255,e[57]=D>>>8&255,e[58]=D>>>16&255,e[59]=D>>>24&255,e[60]=$>>>0&255,e[61]=$>>>8&255,e[62]=$>>>16&255,e[63]=$>>>24&255}(e,t,r,n)}function w(e,t,r,n){!function(e,t,r,n){for(var s,i=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,o=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,c=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,u=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,h=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,d=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,p=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,f=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,g=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,m=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,y=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,w=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,b=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,v=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,x=0;x<20;x+=2)i^=(s=(y^=(s=(p^=(s=(u^=(s=i+y|0)<<7|s>>>25)+i|0)<<9|s>>>23)+u|0)<<13|s>>>19)+p|0)<<18|s>>>14,l^=(s=(o^=(s=(w^=(s=(f^=(s=l+o|0)<<7|s>>>25)+l|0)<<9|s>>>23)+f|0)<<13|s>>>19)+w|0)<<18|s>>>14,g^=(s=(h^=(s=(a^=(s=(b^=(s=g+h|0)<<7|s>>>25)+g|0)<<9|s>>>23)+b|0)<<13|s>>>19)+a|0)<<18|s>>>14,v^=(s=(m^=(s=(d^=(s=(c^=(s=v+m|0)<<7|s>>>25)+v|0)<<9|s>>>23)+c|0)<<13|s>>>19)+d|0)<<18|s>>>14,i^=(s=(c^=(s=(a^=(s=(o^=(s=i+c|0)<<7|s>>>25)+i|0)<<9|s>>>23)+o|0)<<13|s>>>19)+a|0)<<18|s>>>14,l^=(s=(u^=(s=(d^=(s=(h^=(s=l+u|0)<<7|s>>>25)+l|0)<<9|s>>>23)+h|0)<<13|s>>>19)+d|0)<<18|s>>>14,g^=(s=(f^=(s=(p^=(s=(m^=(s=g+f|0)<<7|s>>>25)+g|0)<<9|s>>>23)+m|0)<<13|s>>>19)+p|0)<<18|s>>>14,v^=(s=(b^=(s=(w^=(s=(y^=(s=v+b|0)<<7|s>>>25)+v|0)<<9|s>>>23)+y|0)<<13|s>>>19)+w|0)<<18|s>>>14;e[0]=i>>>0&255,e[1]=i>>>8&255,e[2]=i>>>16&255,e[3]=i>>>24&255,e[4]=l>>>0&255,e[5]=l>>>8&255,e[6]=l>>>16&255,e[7]=l>>>24&255,e[8]=g>>>0&255,e[9]=g>>>8&255,e[10]=g>>>16&255,e[11]=g>>>24&255,e[12]=v>>>0&255,e[13]=v>>>8&255,e[14]=v>>>16&255,e[15]=v>>>24&255,e[16]=h>>>0&255,e[17]=h>>>8&255,e[18]=h>>>16&255,e[19]=h>>>24&255,e[20]=d>>>0&255,e[21]=d>>>8&255,e[22]=d>>>16&255,e[23]=d>>>24&255,e[24]=p>>>0&255,e[25]=p>>>8&255,e[26]=p>>>16&255,e[27]=p>>>24&255,e[28]=f>>>0&255,e[29]=f>>>8&255,e[30]=f>>>16&255,e[31]=f>>>24&255}(e,t,r,n)}var b=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function v(e,t,r,n,s,i,o){var a,c,u=new Uint8Array(16),l=new Uint8Array(64);for(c=0;c<16;c++)u[c]=0;for(c=0;c<8;c++)u[c]=i[c];for(;s>=64;){for(y(l,u,o,b),c=0;c<64;c++)e[t+c]=r[n+c]^l[c];for(a=1,c=8;c<16;c++)a=a+(255&u[c])|0,u[c]=255&a,a>>>=8;s-=64,t+=64,n+=64}if(s>0)for(y(l,u,o,b),c=0;c<s;c++)e[t+c]=r[n+c]^l[c];return 0}function x(e,t,r,n,s){var i,o,a=new Uint8Array(16),c=new Uint8Array(64);for(o=0;o<16;o++)a[o]=0;for(o=0;o<8;o++)a[o]=n[o];for(;r>=64;){for(y(c,a,s,b),o=0;o<64;o++)e[t+o]=c[o];for(i=1,o=8;o<16;o++)i=i+(255&a[o])|0,a[o]=255&i,i>>>=8;r-=64,t+=64}if(r>0)for(y(c,a,s,b),o=0;o<r;o++)e[t+o]=c[o];return 0}function A(e,t,r,n,s){var i=new Uint8Array(32);w(i,n,s,b);for(var o=new Uint8Array(8),a=0;a<8;a++)o[a]=n[a+16];return x(e,t,r,o,i)}function _(e,t,r,n,s,i,o){var a=new Uint8Array(32);w(a,i,o,b);for(var c=new Uint8Array(8),u=0;u<8;u++)c[u]=i[u+16];return v(e,t,r,n,s,c,a)}var E=function(e){var t,r,n,s,i,o,a,c;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,t=255&e[0]|(255&e[1])<<8,this.r[0]=8191&t,r=255&e[2]|(255&e[3])<<8,this.r[1]=8191&(t>>>13|r<<3),n=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(r>>>10|n<<6),s=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(n>>>7|s<<9),i=255&e[8]|(255&e[9])<<8,this.r[4]=255&(s>>>4|i<<12),this.r[5]=i>>>1&8190,o=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(i>>>14|o<<2),a=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(o>>>11|a<<5),c=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(a>>>8|c<<8),this.r[9]=c>>>5&127,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};function T(e,t,r,n,s,i){var o=new E(i);return o.update(r,n,s),o.finish(e,t),0}function S(e,t,r,n,s,i){var o=new Uint8Array(16);return T(o,0,r,n,s,i),g(e,t,o,0)}function k(e,t,r,n,s){var i;if(r<32)return-1;for(_(e,0,t,0,r,n,s),T(e,16,e,32,r-32,e),i=0;i<16;i++)e[i]=0;return 0}function R(e,t,r,n,s){var i,o=new Uint8Array(32);if(r<32)return-1;if(A(o,0,32,n,s),0!==S(t,16,t,32,r-32,o))return-1;for(_(e,0,t,0,r,n,s),i=0;i<32;i++)e[i]=0;return 0}function I(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function B(e){var t,r,n=1;for(t=0;t<16;t++)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function U(e,t,r){for(var n,s=~(r-1),i=0;i<16;i++)n=s&(e[i]^t[i]),e[i]^=n,t[i]^=n}function P(e,r){var n,s,i,o=t(),a=t();for(n=0;n<16;n++)a[n]=r[n];for(B(a),B(a),B(a),s=0;s<2;s++){for(o[0]=a[0]-65517,n=1;n<15;n++)o[n]=a[n]-65535-(o[n-1]>>16&1),o[n-1]&=65535;o[15]=a[15]-32767-(o[14]>>16&1),i=o[15]>>16&1,o[14]&=65535,U(a,o,1-i)}for(n=0;n<16;n++)e[2*n]=255&a[n],e[2*n+1]=a[n]>>8}function j(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return P(r,e),P(n,t),m(r,0,n,0)}function q(e){var t=new Uint8Array(32);return P(t,e),1&t[0]}function D(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function $(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function O(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function C(e,t,r){var n,s,i=0,o=0,a=0,c=0,u=0,l=0,h=0,d=0,p=0,f=0,g=0,m=0,y=0,w=0,b=0,v=0,x=0,A=0,_=0,E=0,T=0,S=0,k=0,R=0,I=0,B=0,U=0,P=0,j=0,q=0,D=0,$=r[0],O=r[1],C=r[2],L=r[3],M=r[4],N=r[5],F=r[6],K=r[7],W=r[8],z=r[9],V=r[10],H=r[11],G=r[12],Y=r[13],J=r[14],X=r[15];i+=(n=t[0])*$,o+=n*O,a+=n*C,c+=n*L,u+=n*M,l+=n*N,h+=n*F,d+=n*K,p+=n*W,f+=n*z,g+=n*V,m+=n*H,y+=n*G,w+=n*Y,b+=n*J,v+=n*X,o+=(n=t[1])*$,a+=n*O,c+=n*C,u+=n*L,l+=n*M,h+=n*N,d+=n*F,p+=n*K,f+=n*W,g+=n*z,m+=n*V,y+=n*H,w+=n*G,b+=n*Y,v+=n*J,x+=n*X,a+=(n=t[2])*$,c+=n*O,u+=n*C,l+=n*L,h+=n*M,d+=n*N,p+=n*F,f+=n*K,g+=n*W,m+=n*z,y+=n*V,w+=n*H,b+=n*G,v+=n*Y,x+=n*J,A+=n*X,c+=(n=t[3])*$,u+=n*O,l+=n*C,h+=n*L,d+=n*M,p+=n*N,f+=n*F,g+=n*K,m+=n*W,y+=n*z,w+=n*V,b+=n*H,v+=n*G,x+=n*Y,A+=n*J,_+=n*X,u+=(n=t[4])*$,l+=n*O,h+=n*C,d+=n*L,p+=n*M,f+=n*N,g+=n*F,m+=n*K,y+=n*W,w+=n*z,b+=n*V,v+=n*H,x+=n*G,A+=n*Y,_+=n*J,E+=n*X,l+=(n=t[5])*$,h+=n*O,d+=n*C,p+=n*L,f+=n*M,g+=n*N,m+=n*F,y+=n*K,w+=n*W,b+=n*z,v+=n*V,x+=n*H,A+=n*G,_+=n*Y,E+=n*J,T+=n*X,h+=(n=t[6])*$,d+=n*O,p+=n*C,f+=n*L,g+=n*M,m+=n*N,y+=n*F,w+=n*K,b+=n*W,v+=n*z,x+=n*V,A+=n*H,_+=n*G,E+=n*Y,T+=n*J,S+=n*X,d+=(n=t[7])*$,p+=n*O,f+=n*C,g+=n*L,m+=n*M,y+=n*N,w+=n*F,b+=n*K,v+=n*W,x+=n*z,A+=n*V,_+=n*H,E+=n*G,T+=n*Y,S+=n*J,k+=n*X,p+=(n=t[8])*$,f+=n*O,g+=n*C,m+=n*L,y+=n*M,w+=n*N,b+=n*F,v+=n*K,x+=n*W,A+=n*z,_+=n*V,E+=n*H,T+=n*G,S+=n*Y,k+=n*J,R+=n*X,f+=(n=t[9])*$,g+=n*O,m+=n*C,y+=n*L,w+=n*M,b+=n*N,v+=n*F,x+=n*K,A+=n*W,_+=n*z,E+=n*V,T+=n*H,S+=n*G,k+=n*Y,R+=n*J,I+=n*X,g+=(n=t[10])*$,m+=n*O,y+=n*C,w+=n*L,b+=n*M,v+=n*N,x+=n*F,A+=n*K,_+=n*W,E+=n*z,T+=n*V,S+=n*H,k+=n*G,R+=n*Y,I+=n*J,B+=n*X,m+=(n=t[11])*$,y+=n*O,w+=n*C,b+=n*L,v+=n*M,x+=n*N,A+=n*F,_+=n*K,E+=n*W,T+=n*z,S+=n*V,k+=n*H,R+=n*G,I+=n*Y,B+=n*J,U+=n*X,y+=(n=t[12])*$,w+=n*O,b+=n*C,v+=n*L,x+=n*M,A+=n*N,_+=n*F,E+=n*K,T+=n*W,S+=n*z,k+=n*V,R+=n*H,I+=n*G,B+=n*Y,U+=n*J,P+=n*X,w+=(n=t[13])*$,b+=n*O,v+=n*C,x+=n*L,A+=n*M,_+=n*N,E+=n*F,T+=n*K,S+=n*W,k+=n*z,R+=n*V,I+=n*H,B+=n*G,U+=n*Y,P+=n*J,j+=n*X,b+=(n=t[14])*$,v+=n*O,x+=n*C,A+=n*L,_+=n*M,E+=n*N,T+=n*F,S+=n*K,k+=n*W,R+=n*z,I+=n*V,B+=n*H,U+=n*G,P+=n*Y,j+=n*J,q+=n*X,v+=(n=t[15])*$,o+=38*(A+=n*C),a+=38*(_+=n*L),c+=38*(E+=n*M),u+=38*(T+=n*N),l+=38*(S+=n*F),h+=38*(k+=n*K),d+=38*(R+=n*W),p+=38*(I+=n*z),f+=38*(B+=n*V),g+=38*(U+=n*H),m+=38*(P+=n*G),y+=38*(j+=n*Y),w+=38*(q+=n*J),b+=38*(D+=n*X),i=(n=(i+=38*(x+=n*O))+(s=1)+65535)-65536*(s=Math.floor(n/65536)),o=(n=o+s+65535)-65536*(s=Math.floor(n/65536)),a=(n=a+s+65535)-65536*(s=Math.floor(n/65536)),c=(n=c+s+65535)-65536*(s=Math.floor(n/65536)),u=(n=u+s+65535)-65536*(s=Math.floor(n/65536)),l=(n=l+s+65535)-65536*(s=Math.floor(n/65536)),h=(n=h+s+65535)-65536*(s=Math.floor(n/65536)),d=(n=d+s+65535)-65536*(s=Math.floor(n/65536)),p=(n=p+s+65535)-65536*(s=Math.floor(n/65536)),f=(n=f+s+65535)-65536*(s=Math.floor(n/65536)),g=(n=g+s+65535)-65536*(s=Math.floor(n/65536)),m=(n=m+s+65535)-65536*(s=Math.floor(n/65536)),y=(n=y+s+65535)-65536*(s=Math.floor(n/65536)),w=(n=w+s+65535)-65536*(s=Math.floor(n/65536)),b=(n=b+s+65535)-65536*(s=Math.floor(n/65536)),v=(n=v+s+65535)-65536*(s=Math.floor(n/65536)),i=(n=(i+=s-1+37*(s-1))+(s=1)+65535)-65536*(s=Math.floor(n/65536)),o=(n=o+s+65535)-65536*(s=Math.floor(n/65536)),a=(n=a+s+65535)-65536*(s=Math.floor(n/65536)),c=(n=c+s+65535)-65536*(s=Math.floor(n/65536)),u=(n=u+s+65535)-65536*(s=Math.floor(n/65536)),l=(n=l+s+65535)-65536*(s=Math.floor(n/65536)),h=(n=h+s+65535)-65536*(s=Math.floor(n/65536)),d=(n=d+s+65535)-65536*(s=Math.floor(n/65536)),p=(n=p+s+65535)-65536*(s=Math.floor(n/65536)),f=(n=f+s+65535)-65536*(s=Math.floor(n/65536)),g=(n=g+s+65535)-65536*(s=Math.floor(n/65536)),m=(n=m+s+65535)-65536*(s=Math.floor(n/65536)),y=(n=y+s+65535)-65536*(s=Math.floor(n/65536)),w=(n=w+s+65535)-65536*(s=Math.floor(n/65536)),b=(n=b+s+65535)-65536*(s=Math.floor(n/65536)),v=(n=v+s+65535)-65536*(s=Math.floor(n/65536)),i+=s-1+37*(s-1),e[0]=i,e[1]=o,e[2]=a,e[3]=c,e[4]=u,e[5]=l,e[6]=h,e[7]=d,e[8]=p,e[9]=f,e[10]=g,e[11]=m,e[12]=y,e[13]=w,e[14]=b,e[15]=v}function L(e,t){C(e,t,t)}function M(e,r){var n,s=t();for(n=0;n<16;n++)s[n]=r[n];for(n=253;n>=0;n--)L(s,s),2!==n&&4!==n&&C(s,s,r);for(n=0;n<16;n++)e[n]=s[n]}function N(e,r){var n,s=t();for(n=0;n<16;n++)s[n]=r[n];for(n=250;n>=0;n--)L(s,s),1!==n&&C(s,s,r);for(n=0;n<16;n++)e[n]=s[n]}function F(e,r,n){var s,i,o=new Uint8Array(32),c=new Float64Array(80),u=t(),l=t(),h=t(),d=t(),p=t(),f=t();for(i=0;i<31;i++)o[i]=r[i];for(o[31]=127&r[31]|64,o[0]&=248,D(c,n),i=0;i<16;i++)l[i]=c[i],d[i]=u[i]=h[i]=0;for(u[0]=d[0]=1,i=254;i>=0;--i)U(u,l,s=o[i>>>3]>>>(7&i)&1),U(h,d,s),$(p,u,h),O(u,u,h),$(h,l,d),O(l,l,d),L(d,p),L(f,u),C(u,h,u),C(h,l,p),$(p,u,h),O(u,u,h),L(l,u),O(h,d,f),C(u,h,a),$(u,u,d),C(h,h,u),C(u,d,f),C(d,l,c),L(l,p),U(u,l,s),U(h,d,s);for(i=0;i<16;i++)c[i+16]=u[i],c[i+32]=h[i],c[i+48]=l[i],c[i+64]=d[i];var g=c.subarray(32),m=c.subarray(16);return M(g,g),C(m,m,g),P(e,m),0}function K(e,t){return F(e,t,s)}function W(e,t){return r(t,32),K(e,t)}function z(e,t,r){var s=new Uint8Array(32);return F(s,r,t),w(e,n,s,b)}E.prototype.blocks=function(e,t,r){for(var n,s,i,o,a,c,u,l,h,d,p,f,g,m,y,w,b,v,x,A=this.fin?0:2048,_=this.h[0],E=this.h[1],T=this.h[2],S=this.h[3],k=this.h[4],R=this.h[5],I=this.h[6],B=this.h[7],U=this.h[8],P=this.h[9],j=this.r[0],q=this.r[1],D=this.r[2],$=this.r[3],O=this.r[4],C=this.r[5],L=this.r[6],M=this.r[7],N=this.r[8],F=this.r[9];r>=16;)d=h=0,d+=(_+=8191&(n=255&e[t+0]|(255&e[t+1])<<8))*j,d+=(E+=8191&(n>>>13|(s=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*F),d+=(T+=8191&(s>>>10|(i=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*N),d+=(S+=8191&(i>>>7|(o=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*M),h=(d+=(k+=8191&(o>>>4|(a=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*L))>>>13,d&=8191,d+=(R+=a>>>1&8191)*(5*C),d+=(I+=8191&(a>>>14|(c=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*O),d+=(B+=8191&(c>>>11|(u=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*$),d+=(U+=8191&(u>>>8|(l=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*D),p=h+=(d+=(P+=l>>>5|A)*(5*q))>>>13,p+=_*q,p+=E*j,p+=T*(5*F),p+=S*(5*N),h=(p+=k*(5*M))>>>13,p&=8191,p+=R*(5*L),p+=I*(5*C),p+=B*(5*O),p+=U*(5*$),h+=(p+=P*(5*D))>>>13,p&=8191,f=h,f+=_*D,f+=E*q,f+=T*j,f+=S*(5*F),h=(f+=k*(5*N))>>>13,f&=8191,f+=R*(5*M),f+=I*(5*L),f+=B*(5*C),f+=U*(5*O),g=h+=(f+=P*(5*$))>>>13,g+=_*$,g+=E*D,g+=T*q,g+=S*j,h=(g+=k*(5*F))>>>13,g&=8191,g+=R*(5*N),g+=I*(5*M),g+=B*(5*L),g+=U*(5*C),m=h+=(g+=P*(5*O))>>>13,m+=_*O,m+=E*$,m+=T*D,m+=S*q,h=(m+=k*j)>>>13,m&=8191,m+=R*(5*F),m+=I*(5*N),m+=B*(5*M),m+=U*(5*L),y=h+=(m+=P*(5*C))>>>13,y+=_*C,y+=E*O,y+=T*$,y+=S*D,h=(y+=k*q)>>>13,y&=8191,y+=R*j,y+=I*(5*F),y+=B*(5*N),y+=U*(5*M),w=h+=(y+=P*(5*L))>>>13,w+=_*L,w+=E*C,w+=T*O,w+=S*$,h=(w+=k*D)>>>13,w&=8191,w+=R*q,w+=I*j,w+=B*(5*F),w+=U*(5*N),b=h+=(w+=P*(5*M))>>>13,b+=_*M,b+=E*L,b+=T*C,b+=S*O,h=(b+=k*$)>>>13,b&=8191,b+=R*D,b+=I*q,b+=B*j,b+=U*(5*F),v=h+=(b+=P*(5*N))>>>13,v+=_*N,v+=E*M,v+=T*L,v+=S*C,h=(v+=k*O)>>>13,v&=8191,v+=R*$,v+=I*D,v+=B*q,v+=U*j,x=h+=(v+=P*(5*F))>>>13,x+=_*F,x+=E*N,x+=T*M,x+=S*L,h=(x+=k*C)>>>13,x&=8191,x+=R*O,x+=I*$,x+=B*D,x+=U*q,_=d=8191&(h=(h=((h+=(x+=P*j)>>>13)<<2)+h|0)+(d&=8191)|0),E=p+=h>>>=13,T=f&=8191,S=g&=8191,k=m&=8191,R=y&=8191,I=w&=8191,B=b&=8191,U=v&=8191,P=x&=8191,t+=16,r-=16;this.h[0]=_,this.h[1]=E,this.h[2]=T,this.h[3]=S,this.h[4]=k,this.h[5]=R,this.h[6]=I,this.h[7]=B,this.h[8]=U,this.h[9]=P},E.prototype.finish=function(e,t){var r,n,s,i,o=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;i<16;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,i=2;i<10;i++)this.h[i]+=r,r=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,o[0]=this.h[0]+5,r=o[0]>>>13,o[0]&=8191,i=1;i<10;i++)o[i]=this.h[i]+r,r=o[i]>>>13,o[i]&=8191;for(o[9]-=8192,n=(1^r)-1,i=0;i<10;i++)o[i]&=n;for(n=~n,i=0;i<10;i++)this.h[i]=this.h[i]&n|o[i];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,i=1;i<8;i++)s=(this.h[i]+this.pad[i]|0)+(s>>>16)|0,this.h[i]=65535&s;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},E.prototype.update=function(e,t,r){var n,s;if(this.leftover){for((s=16-this.leftover)>r&&(s=r),n=0;n<s;n++)this.buffer[this.leftover+n]=e[t+n];if(r-=s,t+=s,this.leftover+=s,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(r>=16&&(s=r-r%16,this.blocks(e,t,s),t+=s,r-=s),r){for(n=0;n<r;n++)this.buffer[this.leftover+n]=e[t+n];this.leftover+=r}};var V=k,H=R,G=[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];function Y(e,t,r,n){for(var s,i,o,a,c,u,l,h,d,p,f,g,m,y,w,b,v,x,A,_,E,T,S,k,R,I,B=new Int32Array(16),U=new Int32Array(16),P=e[0],j=e[1],q=e[2],D=e[3],$=e[4],O=e[5],C=e[6],L=e[7],M=t[0],N=t[1],F=t[2],K=t[3],W=t[4],z=t[5],V=t[6],H=t[7],Y=0;n>=128;){for(A=0;A<16;A++)_=8*A+Y,B[A]=r[_+0]<<24|r[_+1]<<16|r[_+2]<<8|r[_+3],U[A]=r[_+4]<<24|r[_+5]<<16|r[_+6]<<8|r[_+7];for(A=0;A<80;A++)if(s=P,i=j,o=q,a=D,c=$,u=O,l=C,d=M,p=N,f=F,g=K,m=W,y=z,w=V,S=65535&(T=H),k=T>>>16,R=65535&(E=L),I=E>>>16,S+=65535&(T=(W>>>14|$<<18)^(W>>>18|$<<14)^($>>>9|W<<23)),k+=T>>>16,R+=65535&(E=($>>>14|W<<18)^($>>>18|W<<14)^(W>>>9|$<<23)),I+=E>>>16,S+=65535&(T=W&z^~W&V),k+=T>>>16,R+=65535&(E=$&O^~$&C),I+=E>>>16,S+=65535&(T=G[2*A+1]),k+=T>>>16,R+=65535&(E=G[2*A]),I+=E>>>16,E=B[A%16],k+=(T=U[A%16])>>>16,R+=65535&E,I+=E>>>16,R+=(k+=(S+=65535&T)>>>16)>>>16,S=65535&(T=x=65535&S|k<<16),k=T>>>16,R=65535&(E=v=65535&R|(I+=R>>>16)<<16),I=E>>>16,S+=65535&(T=(M>>>28|P<<4)^(P>>>2|M<<30)^(P>>>7|M<<25)),k+=T>>>16,R+=65535&(E=(P>>>28|M<<4)^(M>>>2|P<<30)^(M>>>7|P<<25)),I+=E>>>16,k+=(T=M&N^M&F^N&F)>>>16,R+=65535&(E=P&j^P&q^j&q),I+=E>>>16,h=65535&(R+=(k+=(S+=65535&T)>>>16)>>>16)|(I+=R>>>16)<<16,b=65535&S|k<<16,S=65535&(T=g),k=T>>>16,R=65535&(E=a),I=E>>>16,k+=(T=x)>>>16,R+=65535&(E=v),I+=E>>>16,j=s,q=i,D=o,$=a=65535&(R+=(k+=(S+=65535&T)>>>16)>>>16)|(I+=R>>>16)<<16,O=c,C=u,L=l,P=h,N=d,F=p,K=f,W=g=65535&S|k<<16,z=m,V=y,H=w,M=b,A%16==15)for(_=0;_<16;_++)E=B[_],S=65535&(T=U[_]),k=T>>>16,R=65535&E,I=E>>>16,E=B[(_+9)%16],S+=65535&(T=U[(_+9)%16]),k+=T>>>16,R+=65535&E,I+=E>>>16,v=B[(_+1)%16],S+=65535&(T=((x=U[(_+1)%16])>>>1|v<<31)^(x>>>8|v<<24)^(x>>>7|v<<25)),k+=T>>>16,R+=65535&(E=(v>>>1|x<<31)^(v>>>8|x<<24)^v>>>7),I+=E>>>16,v=B[(_+14)%16],k+=(T=((x=U[(_+14)%16])>>>19|v<<13)^(v>>>29|x<<3)^(x>>>6|v<<26))>>>16,R+=65535&(E=(v>>>19|x<<13)^(x>>>29|v<<3)^v>>>6),I+=E>>>16,I+=(R+=(k+=(S+=65535&T)>>>16)>>>16)>>>16,B[_]=65535&R|I<<16,U[_]=65535&S|k<<16;S=65535&(T=M),k=T>>>16,R=65535&(E=P),I=E>>>16,E=e[0],k+=(T=t[0])>>>16,R+=65535&E,I+=E>>>16,I+=(R+=(k+=(S+=65535&T)>>>16)>>>16)>>>16,e[0]=P=65535&R|I<<16,t[0]=M=65535&S|k<<16,S=65535&(T=N),k=T>>>16,R=65535&(E=j),I=E>>>16,E=e[1],k+=(T=t[1])>>>16,R+=65535&E,I+=E>>>16,I+=(R+=(k+=(S+=65535&T)>>>16)>>>16)>>>16,e[1]=j=65535&R|I<<16,t[1]=N=65535&S|k<<16,S=65535&(T=F),k=T>>>16,R=65535&(E=q),I=E>>>16,E=e[2],k+=(T=t[2])>>>16,R+=65535&E,I+=E>>>16,I+=(R+=(k+=(S+=65535&T)>>>16)>>>16)>>>16,e[2]=q=65535&R|I<<16,t[2]=F=65535&S|k<<16,S=65535&(T=K),k=T>>>16,R=65535&(E=D),I=E>>>16,E=e[3],k+=(T=t[3])>>>16,R+=65535&E,I+=E>>>16,I+=(R+=(k+=(S+=65535&T)>>>16)>>>16)>>>16,e[3]=D=65535&R|I<<16,t[3]=K=65535&S|k<<16,S=65535&(T=W),k=T>>>16,R=65535&(E=$),I=E>>>16,E=e[4],k+=(T=t[4])>>>16,R+=65535&E,I+=E>>>16,I+=(R+=(k+=(S+=65535&T)>>>16)>>>16)>>>16,e[4]=$=65535&R|I<<16,t[4]=W=65535&S|k<<16,S=65535&(T=z),k=T>>>16,R=65535&(E=O),I=E>>>16,E=e[5],k+=(T=t[5])>>>16,R+=65535&E,I+=E>>>16,I+=(R+=(k+=(S+=65535&T)>>>16)>>>16)>>>16,e[5]=O=65535&R|I<<16,t[5]=z=65535&S|k<<16,S=65535&(T=V),k=T>>>16,R=65535&(E=C),I=E>>>16,E=e[6],k+=(T=t[6])>>>16,R+=65535&E,I+=E>>>16,I+=(R+=(k+=(S+=65535&T)>>>16)>>>16)>>>16,e[6]=C=65535&R|I<<16,t[6]=V=65535&S|k<<16,S=65535&(T=H),k=T>>>16,R=65535&(E=L),I=E>>>16,E=e[7],k+=(T=t[7])>>>16,R+=65535&E,I+=E>>>16,I+=(R+=(k+=(S+=65535&T)>>>16)>>>16)>>>16,e[7]=L=65535&R|I<<16,t[7]=H=65535&S|k<<16,Y+=128,n-=128}return n}function J(e,t,r){var n,s=new Int32Array(8),i=new Int32Array(8),o=new Uint8Array(256),a=r;for(s[0]=1779033703,s[1]=3144134277,s[2]=1013904242,s[3]=2773480762,s[4]=1359893119,s[5]=2600822924,s[6]=528734635,s[7]=1541459225,i[0]=4089235720,i[1]=2227873595,i[2]=4271175723,i[3]=1595750129,i[4]=2917565137,i[5]=725511199,i[6]=4215389547,i[7]=327033209,Y(s,i,t,r),r%=128,n=0;n<r;n++)o[n]=t[a-r+n];for(o[r]=128,o[(r=256-128*(r<112?1:0))-9]=0,p(o,r-8,a/536870912|0,a<<3),Y(s,i,o,r),n=0;n<8;n++)p(e,8*n,s[n],i[n]);return 0}function X(e,r){var n=t(),s=t(),i=t(),o=t(),a=t(),c=t(),l=t(),h=t(),d=t();O(n,e[1],e[0]),O(d,r[1],r[0]),C(n,n,d),$(s,e[0],e[1]),$(d,r[0],r[1]),C(s,s,d),C(i,e[3],r[3]),C(i,i,u),C(o,e[2],r[2]),$(o,o,o),O(a,s,n),O(c,o,i),$(l,o,i),$(h,s,n),C(e[0],a,c),C(e[1],h,l),C(e[2],l,c),C(e[3],a,h)}function Z(e,t,r){var n;for(n=0;n<4;n++)U(e[n],t[n],r)}function Q(e,r){var n=t(),s=t(),i=t();M(i,r[2]),C(n,r[0],i),C(s,r[1],i),P(e,s),e[31]^=q(n)<<7}function ee(e,t,r){var n,s;for(I(e[0],i),I(e[1],o),I(e[2],o),I(e[3],i),s=255;s>=0;--s)Z(e,t,n=r[s/8|0]>>(7&s)&1),X(t,e),X(e,e),Z(e,t,n)}function te(e,r){var n=[t(),t(),t(),t()];I(n[0],l),I(n[1],h),I(n[2],o),C(n[3],l,h),ee(e,n,r)}function re(e,n,s){var i,o=new Uint8Array(64),a=[t(),t(),t(),t()];for(s||r(n,32),J(o,n,32),o[0]&=248,o[31]&=127,o[31]|=64,te(a,o),Q(e,a),i=0;i<32;i++)n[i+32]=e[i];return 0}var ne=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function se(e,t){var r,n,s,i;for(n=63;n>=32;--n){for(r=0,s=n-32,i=n-12;s<i;++s)t[s]+=r-16*t[n]*ne[s-(n-32)],r=Math.floor((t[s]+128)/256),t[s]-=256*r;t[s]+=r,t[n]=0}for(r=0,s=0;s<32;s++)t[s]+=r-(t[31]>>4)*ne[s],r=t[s]>>8,t[s]&=255;for(s=0;s<32;s++)t[s]-=r*ne[s];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function ie(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;se(e,r)}function oe(e,r,n,s){var i,o,a=new Uint8Array(64),c=new Uint8Array(64),u=new Uint8Array(64),l=new Float64Array(64),h=[t(),t(),t(),t()];J(a,s,32),a[0]&=248,a[31]&=127,a[31]|=64;var d=n+64;for(i=0;i<n;i++)e[64+i]=r[i];for(i=0;i<32;i++)e[32+i]=a[32+i];for(J(u,e.subarray(32),n+32),ie(u),te(h,u),Q(e,h),i=32;i<64;i++)e[i]=s[i];for(J(c,e,n+64),ie(c),i=0;i<64;i++)l[i]=0;for(i=0;i<32;i++)l[i]=u[i];for(i=0;i<32;i++)for(o=0;o<32;o++)l[i+o]+=c[i]*a[o];return se(e.subarray(32),l),d}function ae(e,r,n,s){var a,u=new Uint8Array(32),l=new Uint8Array(64),h=[t(),t(),t(),t()],p=[t(),t(),t(),t()];if(n<64)return-1;if(function(e,r){var n=t(),s=t(),a=t(),u=t(),l=t(),h=t(),p=t();return I(e[2],o),D(e[1],r),L(a,e[1]),C(u,a,c),O(a,a,e[2]),$(u,e[2],u),L(l,u),L(h,l),C(p,h,l),C(n,p,a),C(n,n,u),N(n,n),C(n,n,a),C(n,n,u),C(n,n,u),C(e[0],n,u),L(s,e[0]),C(s,s,u),j(s,a)&&C(e[0],e[0],d),L(s,e[0]),C(s,s,u),j(s,a)?-1:(q(e[0])===r[31]>>7&&O(e[0],i,e[0]),C(e[3],e[0],e[1]),0)}(p,s))return-1;for(a=0;a<n;a++)e[a]=r[a];for(a=0;a<32;a++)e[a+32]=s[a];if(J(l,e,n),ie(l),ee(h,p,l),te(p,r.subarray(32)),X(h,p),Q(u,h),n-=64,m(r,0,u,0)){for(a=0;a<n;a++)e[a]=0;return-1}for(a=0;a<n;a++)e[a]=r[a+64];return n}var ce=64,ue=32,le=64;function he(e,t){if(32!==e.length)throw new Error("bad key size");if(24!==t.length)throw new Error("bad nonce size")}function de(){for(var e=0;e<arguments.length;e++)if(!(arguments[e]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function pe(e){for(var t=0;t<e.length;t++)e[t]=0}e.lowlevel={crypto_core_hsalsa20:w,crypto_stream_xor:_,crypto_stream:A,crypto_stream_salsa20_xor:v,crypto_stream_salsa20:x,crypto_onetimeauth:T,crypto_onetimeauth_verify:S,crypto_verify_16:g,crypto_verify_32:m,crypto_secretbox:k,crypto_secretbox_open:R,crypto_scalarmult:F,crypto_scalarmult_base:K,crypto_box_beforenm:z,crypto_box_afternm:V,crypto_box:function(e,t,r,n,s,i){var o=new Uint8Array(32);return z(o,s,i),V(e,t,r,n,o)},crypto_box_open:function(e,t,r,n,s,i){var o=new Uint8Array(32);return z(o,s,i),H(e,t,r,n,o)},crypto_box_keypair:W,crypto_hash:J,crypto_sign:oe,crypto_sign_keypair:re,crypto_sign_open:ae,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:16,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:ce,crypto_sign_PUBLICKEYBYTES:ue,crypto_sign_SECRETKEYBYTES:le,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:t,D:c,L:ne,pack25519:P,unpack25519:D,M:C,A:$,S:L,Z:O,pow2523:N,add:X,set25519:I,modL:se,scalarmult:ee,scalarbase:te},e.randomBytes=function(e){var t=new Uint8Array(e);return r(t,e),t},e.secretbox=function(e,t,r){de(e,t,r),he(r,t);for(var n=new Uint8Array(32+e.length),s=new Uint8Array(n.length),i=0;i<e.length;i++)n[i+32]=e[i];return k(s,n,n.length,t,r),s.subarray(16)},e.secretbox.open=function(e,t,r){de(e,t,r),he(r,t);for(var n=new Uint8Array(16+e.length),s=new Uint8Array(n.length),i=0;i<e.length;i++)n[i+16]=e[i];return n.length<32||0!==R(s,n,n.length,t,r)?null:s.subarray(32)},e.secretbox.keyLength=32,e.secretbox.nonceLength=24,e.secretbox.overheadLength=16,e.scalarMult=function(e,t){if(de(e,t),32!==e.length)throw new Error("bad n size");if(32!==t.length)throw new Error("bad p size");var r=new Uint8Array(32);return F(r,e,t),r},e.scalarMult.base=function(e){if(de(e),32!==e.length)throw new Error("bad n size");var t=new Uint8Array(32);return K(t,e),t},e.scalarMult.scalarLength=32,e.scalarMult.groupElementLength=32,e.box=function(t,r,n,s){var i=e.box.before(n,s);return e.secretbox(t,r,i)},e.box.before=function(e,t){de(e,t),function(e,t){if(32!==e.length)throw new Error("bad public key size");if(32!==t.length)throw new Error("bad secret key size")}(e,t);var r=new Uint8Array(32);return z(r,e,t),r},e.box.after=e.secretbox,e.box.open=function(t,r,n,s){var i=e.box.before(n,s);return e.secretbox.open(t,r,i)},e.box.open.after=e.secretbox.open,e.box.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(32);return W(e,t),{publicKey:e,secretKey:t}},e.box.keyPair.fromSecretKey=function(e){if(de(e),32!==e.length)throw new Error("bad secret key size");var t=new Uint8Array(32);return K(t,e),{publicKey:t,secretKey:new Uint8Array(e)}},e.box.publicKeyLength=32,e.box.secretKeyLength=32,e.box.sharedKeyLength=32,e.box.nonceLength=24,e.box.overheadLength=e.secretbox.overheadLength,e.sign=function(e,t){if(de(e,t),t.length!==le)throw new Error("bad secret key size");var r=new Uint8Array(ce+e.length);return oe(r,e,e.length,t),r},e.sign.open=function(e,t){if(de(e,t),t.length!==ue)throw new Error("bad public key size");var r=new Uint8Array(e.length),n=ae(r,e,e.length,t);if(n<0)return null;for(var s=new Uint8Array(n),i=0;i<s.length;i++)s[i]=r[i];return s},e.sign.detached=function(t,r){for(var n=e.sign(t,r),s=new Uint8Array(ce),i=0;i<s.length;i++)s[i]=n[i];return s},e.sign.detached.verify=function(e,t,r){if(de(e,t,r),t.length!==ce)throw new Error("bad signature size");if(r.length!==ue)throw new Error("bad public key size");var n,s=new Uint8Array(ce+e.length),i=new Uint8Array(ce+e.length);for(n=0;n<ce;n++)s[n]=t[n];for(n=0;n<e.length;n++)s[n+ce]=e[n];return ae(i,s,s.length,r)>=0},e.sign.keyPair=function(){var e=new Uint8Array(ue),t=new Uint8Array(le);return re(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(de(e),e.length!==le)throw new Error("bad secret key size");for(var t=new Uint8Array(ue),r=0;r<t.length;r++)t[r]=e[32+r];return{publicKey:t,secretKey:new Uint8Array(e)}},e.sign.keyPair.fromSeed=function(e){if(de(e),32!==e.length)throw new Error("bad seed size");for(var t=new Uint8Array(ue),r=new Uint8Array(le),n=0;n<32;n++)r[n]=e[n];return re(t,r,!0),{publicKey:t,secretKey:r}},e.sign.publicKeyLength=ue,e.sign.secretKeyLength=le,e.sign.seedLength=32,e.sign.signatureLength=ce,e.hash=function(e){de(e);var t=new Uint8Array(64);return J(t,e,e.length),t},e.hash.hashLength=64,e.verify=function(e,t){return de(e,t),0!==e.length&&0!==t.length&&e.length===t.length&&0===f(e,0,t,0,e.length)},e.setPRNG=function(e){r=e},function(){var t="undefined"!=typeof self?self.crypto||self.msCrypto:null;t&&t.getRandomValues?e.setPRNG((function(e,r){var n,s=new Uint8Array(r);for(n=0;n<r;n+=65536)t.getRandomValues(s.subarray(n,n+Math.min(r-n,65536)));for(n=0;n<r;n++)e[n]=s[n];pe(s)})):"undefined"!=typeof require&&(t=require("crypto"))&&t.randomBytes&&e.setPRNG((function(e,r){var n,s=t.randomBytes(r);for(n=0;n<r;n++)e[n]=s[n];pe(s)}))}()}(void 0!==e&&e.exports?e.exports:self.nacl=self.nacl||{})}},t={};function r(n){var s=t[n];if(void 0!==s)return s.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}r.amdO={},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{ABIAddressType:()=>Ws,ABIArrayDynamicType:()=>Ys,ABIArrayStaticType:()=>Gs,ABIBoolType:()=>zs,ABIByteType:()=>Vs,ABIContract:()=>oi,ABIInterface:()=>ai,ABIMethod:()=>si,ABIReferenceType:()=>ei,ABIStringType:()=>Hs,ABITransactionType:()=>Qs,ABITupleType:()=>Js,ABIType:()=>Ns,ABIUfixedType:()=>Ks,ABIUintType:()=>Fs,ADDR_BYTE_SIZE:()=>Ds,ALGORAND_MIN_TX_FEE:()=>K,Algodv2:()=>Tt,AtomicTransactionComposer:()=>hi,AtomicTransactionComposerStatus:()=>ui,DryrunResult:()=>es,ERROR_INVALID_MICROALGOS:()=>xi,ERROR_MULTISIG_BAD_SENDER:()=>vi,INVALID_MICROALGOS_ERROR_MSG:()=>Z,Indexer:()=>tn,IntDecoding:()=>_,Kmd:()=>St,LENGTH_ENCODE_BYTE_SIZE:()=>Cs,LogicSig:()=>jn,LogicSigAccount:()=>qn,MAX_LEN:()=>qs,MULTISIG_BAD_SENDER_ERROR_MSG:()=>pi,OnApplicationComplete:()=>L,SINGLE_BOOL_SIZE:()=>Os,SINGLE_BYTE_SIZE:()=>$s,SourceMap:()=>Wn,Transaction:()=>z,TransactionType:()=>C,abiCheckTransactionType:()=>ri,abiTypeIsReference:()=>ni,abiTypeIsTransaction:()=>ti,algosToMicroalgos:()=>ee,appendSignMultisigTransaction:()=>In,appendSignRawMultisigSignature:()=>Bn,assignGroupID:()=>vn,bigIntToBytes:()=>nn,bytesToBigInt:()=>sn,computeGroupID:()=>bn,createDryrun:()=>Vn,createMultisigTransaction:()=>_n,decodeAddress:()=>P,decodeObj:()=>bi,decodeSignedTransaction:()=>G,decodeUint64:()=>R,decodeUnsignedTransaction:()=>H,default:()=>Ai,encodeAddress:()=>q,encodeObj:()=>wi,encodeUint64:()=>k,encodeUnsignedTransaction:()=>V,generateAccount:()=>on,getApplicationAddress:()=>O,getMethodByName:()=>ii,indexerModels:()=>t,instantiateTxnIfNeeded:()=>Y,isTransactionWithSigner:()=>js,isValidAddress:()=>j,logicSigFromByte:()=>On,makeApplicationCallTxnFromObject:()=>Is,makeApplicationClearStateTxn:()=>Ts,makeApplicationClearStateTxnFromObject:()=>Ss,makeApplicationCloseOutTxn:()=>_s,makeApplicationCloseOutTxnFromObject:()=>Es,makeApplicationCreateTxn:()=>gs,makeApplicationCreateTxnFromObject:()=>ms,makeApplicationDeleteTxn:()=>bs,makeApplicationDeleteTxnFromObject:()=>vs,makeApplicationNoOpTxn:()=>ks,makeApplicationNoOpTxnFromObject:()=>Rs,makeApplicationOptInTxn:()=>xs,makeApplicationOptInTxnFromObject:()=>As,makeApplicationUpdateTxn:()=>ys,makeApplicationUpdateTxnFromObject:()=>ws,makeAssetConfigTxnWithSuggestedParams:()=>as,makeAssetConfigTxnWithSuggestedParamsFromObject:()=>cs,makeAssetCreateTxnWithSuggestedParams:()=>is,makeAssetCreateTxnWithSuggestedParamsFromObject:()=>os,makeAssetDestroyTxnWithSuggestedParams:()=>us,makeAssetDestroyTxnWithSuggestedParamsFromObject:()=>ls,makeAssetFreezeTxnWithSuggestedParams:()=>hs,makeAssetFreezeTxnWithSuggestedParamsFromObject:()=>ds,makeAssetTransferTxnWithSuggestedParams:()=>ps,makeAssetTransferTxnWithSuggestedParamsFromObject:()=>fs,makeBasicAccountTransactionSigner:()=>Bs,makeKeyRegistrationTxnWithSuggestedParams:()=>ns,makeKeyRegistrationTxnWithSuggestedParamsFromObject:()=>ss,makeLogicSigAccountTransactionSigner:()=>Us,makeMultiSigAccountTransactionSigner:()=>Ps,makePaymentTxnWithSuggestedParams:()=>ts,makePaymentTxnWithSuggestedParamsFromObject:()=>rs,masterDerivationKeyToMnemonic:()=>yn,mergeMultisigTransactions:()=>Sn,microalgosToAlgos:()=>Q,mnemonicFromSeed:()=>dn,mnemonicToMasterDerivationKey:()=>mn,mnemonicToSecretKey:()=>fn,modelsv2:()=>e,multisigAddress:()=>Un,secretKeyToMnemonic:()=>gn,seedFromMnemonic:()=>pn,signBid:()=>gi,signBytes:()=>mi,signLogicSigTransaction:()=>$n,signLogicSigTransactionObject:()=>Dn,signMultisigTransaction:()=>Rn,signTransaction:()=>fi,tealSign:()=>Ln,tealSignFromProgram:()=>Nn,verifyBytes:()=>yi,verifyMultisig:()=>kn,verifyTealSign:()=>Mn,waitForConfirmation:()=>rn});var e={};r.r(e),r.d(e,{Account:()=>xe,AccountApplicationResponse:()=>Ae,AccountAssetResponse:()=>_e,AccountParticipation:()=>Ee,AccountStateDelta:()=>Te,Application:()=>Se,ApplicationLocalState:()=>ke,ApplicationParams:()=>Re,ApplicationStateSchema:()=>Ie,Asset:()=>Be,AssetHolding:()=>Ue,AssetParams:()=>Pe,BlockHashResponse:()=>je,BlockResponse:()=>qe,Box:()=>De,BoxDescriptor:()=>$e,BoxesResponse:()=>Oe,BuildVersion:()=>Ce,CompileResponse:()=>Le,DisassembleResponse:()=>Me,DryrunRequest:()=>Ne,DryrunResponse:()=>Fe,DryrunSource:()=>Ke,DryrunState:()=>We,DryrunTxnResult:()=>ze,ErrorResponse:()=>Ve,EvalDelta:()=>He,EvalDeltaKeyValue:()=>Ge,LightBlockHeaderProof:()=>Ye,NodeStatusResponse:()=>Je,PendingTransactionResponse:()=>Xe,PendingTransactionsResponse:()=>Ze,PostTransactionsResponse:()=>Qe,StateProof:()=>et,StateProofMessage:()=>tt,SupplyResponse:()=>rt,TealKeyValue:()=>nt,TealValue:()=>st,TransactionParametersResponse:()=>it,TransactionProofResponse:()=>ot,Version:()=>at});var t={};r.r(t),r.d(t,{Account:()=>Ft,AccountParticipation:()=>Kt,AccountResponse:()=>Wt,AccountStateDelta:()=>zt,AccountsResponse:()=>Vt,Application:()=>Ht,ApplicationLocalState:()=>Gt,ApplicationLocalStatesResponse:()=>Yt,ApplicationLogData:()=>Jt,ApplicationLogsResponse:()=>Xt,ApplicationParams:()=>Zt,ApplicationResponse:()=>Qt,ApplicationStateSchema:()=>er,ApplicationsResponse:()=>tr,Asset:()=>rr,AssetBalancesResponse:()=>nr,AssetHolding:()=>sr,AssetHoldingsResponse:()=>ir,AssetParams:()=>or,AssetResponse:()=>ar,AssetsResponse:()=>cr,Block:()=>ur,BlockRewards:()=>lr,BlockUpgradeState:()=>hr,BlockUpgradeVote:()=>dr,Box:()=>pr,BoxDescriptor:()=>fr,BoxesResponse:()=>gr,ErrorResponse:()=>mr,EvalDelta:()=>yr,EvalDeltaKeyValue:()=>wr,HashFactory:()=>br,HealthCheck:()=>vr,IndexerStateProofMessage:()=>xr,MerkleArrayProof:()=>Ar,MiniAssetHolding:()=>_r,ParticipationUpdates:()=>Er,StateProofFields:()=>Tr,StateProofParticipant:()=>Sr,StateProofReveal:()=>kr,StateProofSigSlot:()=>Rr,StateProofSignature:()=>Ir,StateProofTracking:()=>Br,StateProofVerifier:()=>Ur,StateSchema:()=>Pr,TealKeyValue:()=>jr,TealValue:()=>qr,Transaction:()=>Dr,TransactionApplication:()=>$r,TransactionAssetConfig:()=>Or,TransactionAssetFreeze:()=>Cr,TransactionAssetTransfer:()=>Lr,TransactionKeyreg:()=>Mr,TransactionPayment:()=>Nr,TransactionResponse:()=>Fr,TransactionSignature:()=>Kr,TransactionSignatureLogicsig:()=>Wr,TransactionSignatureMultisig:()=>zr,TransactionSignatureMultisigSubsignature:()=>Vr,TransactionStateProof:()=>Hr,TransactionsResponse:()=>Gr});var s={};r.r(s),r.d(s,{ABIAddressType:()=>Ws,ABIArrayDynamicType:()=>Ys,ABIArrayStaticType:()=>Gs,ABIBoolType:()=>zs,ABIByteType:()=>Vs,ABIContract:()=>oi,ABIInterface:()=>ai,ABIMethod:()=>si,ABIReferenceType:()=>ei,ABIStringType:()=>Hs,ABITransactionType:()=>Qs,ABITupleType:()=>Js,ABIType:()=>Ns,ABIUfixedType:()=>Ks,ABIUintType:()=>Fs,ADDR_BYTE_SIZE:()=>Ds,ALGORAND_MIN_TX_FEE:()=>K,Algodv2:()=>Tt,AtomicTransactionComposer:()=>hi,AtomicTransactionComposerStatus:()=>ui,DryrunResult:()=>es,ERROR_INVALID_MICROALGOS:()=>xi,ERROR_MULTISIG_BAD_SENDER:()=>vi,INVALID_MICROALGOS_ERROR_MSG:()=>Z,Indexer:()=>tn,IntDecoding:()=>_,Kmd:()=>St,LENGTH_ENCODE_BYTE_SIZE:()=>Cs,LogicSig:()=>jn,LogicSigAccount:()=>qn,MAX_LEN:()=>qs,MULTISIG_BAD_SENDER_ERROR_MSG:()=>pi,OnApplicationComplete:()=>L,SINGLE_BOOL_SIZE:()=>Os,SINGLE_BYTE_SIZE:()=>$s,SourceMap:()=>Wn,Transaction:()=>z,TransactionType:()=>C,abiCheckTransactionType:()=>ri,abiTypeIsReference:()=>ni,abiTypeIsTransaction:()=>ti,algosToMicroalgos:()=>ee,appendSignMultisigTransaction:()=>In,appendSignRawMultisigSignature:()=>Bn,assignGroupID:()=>vn,bigIntToBytes:()=>nn,bytesToBigInt:()=>sn,computeGroupID:()=>bn,createDryrun:()=>Vn,createMultisigTransaction:()=>_n,decodeAddress:()=>P,decodeObj:()=>bi,decodeSignedTransaction:()=>G,decodeUint64:()=>R,decodeUnsignedTransaction:()=>H,encodeAddress:()=>q,encodeObj:()=>wi,encodeUint64:()=>k,encodeUnsignedTransaction:()=>V,generateAccount:()=>on,getApplicationAddress:()=>O,getMethodByName:()=>ii,indexerModels:()=>t,instantiateTxnIfNeeded:()=>Y,isTransactionWithSigner:()=>js,isValidAddress:()=>j,logicSigFromByte:()=>On,makeApplicationCallTxnFromObject:()=>Is,makeApplicationClearStateTxn:()=>Ts,makeApplicationClearStateTxnFromObject:()=>Ss,makeApplicationCloseOutTxn:()=>_s,makeApplicationCloseOutTxnFromObject:()=>Es,makeApplicationCreateTxn:()=>gs,makeApplicationCreateTxnFromObject:()=>ms,makeApplicationDeleteTxn:()=>bs,makeApplicationDeleteTxnFromObject:()=>vs,makeApplicationNoOpTxn:()=>ks,makeApplicationNoOpTxnFromObject:()=>Rs,makeApplicationOptInTxn:()=>xs,makeApplicationOptInTxnFromObject:()=>As,makeApplicationUpdateTxn:()=>ys,makeApplicationUpdateTxnFromObject:()=>ws,makeAssetConfigTxnWithSuggestedParams:()=>as,makeAssetConfigTxnWithSuggestedParamsFromObject:()=>cs,makeAssetCreateTxnWithSuggestedParams:()=>is,makeAssetCreateTxnWithSuggestedParamsFromObject:()=>os,makeAssetDestroyTxnWithSuggestedParams:()=>us,makeAssetDestroyTxnWithSuggestedParamsFromObject:()=>ls,makeAssetFreezeTxnWithSuggestedParams:()=>hs,makeAssetFreezeTxnWithSuggestedParamsFromObject:()=>ds,makeAssetTransferTxnWithSuggestedParams:()=>ps,makeAssetTransferTxnWithSuggestedParamsFromObject:()=>fs,makeBasicAccountTransactionSigner:()=>Bs,makeKeyRegistrationTxnWithSuggestedParams:()=>ns,makeKeyRegistrationTxnWithSuggestedParamsFromObject:()=>ss,makeLogicSigAccountTransactionSigner:()=>Us,makeMultiSigAccountTransactionSigner:()=>Ps,makePaymentTxnWithSuggestedParams:()=>ts,makePaymentTxnWithSuggestedParamsFromObject:()=>rs,masterDerivationKeyToMnemonic:()=>yn,mergeMultisigTransactions:()=>Sn,microalgosToAlgos:()=>Q,mnemonicFromSeed:()=>dn,mnemonicToMasterDerivationKey:()=>mn,mnemonicToSecretKey:()=>fn,modelsv2:()=>e,multisigAddress:()=>Un,secretKeyToMnemonic:()=>gn,seedFromMnemonic:()=>pn,signBid:()=>gi,signBytes:()=>mi,signLogicSigTransaction:()=>$n,signLogicSigTransactionObject:()=>Dn,signMultisigTransaction:()=>Rn,signTransaction:()=>fi,tealSign:()=>Ln,tealSignFromProgram:()=>Nn,verifyBytes:()=>yi,verifyMultisig:()=>kn,verifyTealSign:()=>Mn,waitForConfirmation:()=>rn});var i=r(486),o=r(765),a=r.n(o),c=r(757),u=r.n(c);function l(e){return u().sha512_256.array(e)}function h(e){return a().sign.keyPair.fromSeed(e)}function d(e){return e===a().sign.signatureLength}function p(e){return a().sign.keyPair.fromSecretKey(e)}function f(e,t){return a().sign.detached(e,t)}function g(e,t){return a().verify(e,t)}function m(e,t,r){return a().sign.detached.verify(e,t,r)}const y=a().sign.publicKeyLength;a().sign.secretKeyLength;var w,b=r(267),v=r.n(b),x=r(360),A=r.n(x);!function(e){e.DEFAULT="default",e.SAFE="safe",e.MIXED="mixed",e.BIGINT="bigint"}(w||(w={}));const _=w,E=A()({useNativeBigInt:!0,strict:!0});function T(e,t){return e.length===t.length&&Array.from(e).every(((e,r)=>e===t[r]))}function S(...e){const t=e.reduce(((e,t)=>e+t.length),0),r=new Uint8Array(t);let n=0;for(let t=0;t<e.length;t++)r.set(e[t],n),n+=e[t].length;return r}function k(e){if("bigint"!=typeof e&&!Number.isInteger(e)||e<0||e>BigInt("0xffffffffffffffff"))throw new Error("Input is not a 64-bit unsigned integer");const t=new Uint8Array(8);return new DataView(t.buffer).setBigUint64(0,BigInt(e)),t}function R(e,t="safe"){if("safe"!==t&&"mixed"!==t&&"bigint"!==t)throw new Error(`Unknown decodingMode option: ${t}`);if(0===e.byteLength||e.byteLength>8)throw new Error(`Data has unacceptable length. Expected length is between 1 and 8, got ${e.byteLength}`);const r=S(new Uint8Array(8-e.byteLength),e),n=new DataView(r.buffer).getBigUint64(0),s=n>BigInt(Number.MAX_SAFE_INTEGER);if("safe"===t){if(s)throw new Error(`Integer exceeds maximum safe integer: ${n.toString()}. Try decoding with "mixed" or "safe" decodingMode.`);return Number(n)}return"mixed"!==t||s?n:Number(n)}const I=new Uint8Array([77,117,108,116,105,115,105,103,65,100,100,114]),B=i.lW.from("appID"),U="address seems to be malformed";function P(e){if("string"!=typeof e||58!==e.length)throw new Error(U);const t=v().decode.asBytes(e.toString());if(36!==t.length)throw new Error(U);const r=new Uint8Array(t.slice(0,32)),n=new Uint8Array(t.slice(y,36));if(!T(l(r).slice(28,32),n))throw new Error("wrong checksum for address");return{publicKey:r,checksum:n}}function j(e){try{P(e)}catch(e){return!1}return!0}function q(e){const t=l(e).slice(y-4,y);return v().encode(S(e,t)).toString().slice(0,58)}function D({version:e,threshold:t,pks:r}){if(1!==e||e>255||e<0)throw new Error("invalid multisig version");if(0===t||0===r.length||t>r.length||t>255)throw new Error("bad multisig threshold");if(32!==y)throw new Error("nacl public key length is not 32 bytes");const n=new Uint8Array(I.length+2+32*r.length);n.set(I,0),n.set([e],I.length),n.set([t],I.length+1);for(let e=0;e<r.length;e++){if(32!==r[e].length)throw new Error("bad multisig public key - wrong length");n.set(r[e],I.length+2+32*e)}return new Uint8Array(l(n))}function $({version:e,threshold:t,addrs:r}){return q(D({version:e,threshold:t,pks:r.map((e=>P(e).publicKey))}))}function O(e){const t=l(S(B,k(e)));return q(new Uint8Array(t))}var C,L,M=r(406);function N(e){const t=function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&(!e[t]||0===e[t].length))return{containsEmpty:!0,firstEmptyKey:t};return{containsEmpty:!1,firstEmptyKey:void 0}}(e);if(t.containsEmpty)throw new Error("The object contains empty or 0 values. First empty or 0 value encountered during encoding: "+t.firstEmptyKey);return M.encode(e,{sortKeys:!0})}function F(e){return M.decode(e)}!function(e){e.pay="pay",e.keyreg="keyreg",e.acfg="acfg",e.axfer="axfer",e.afrz="afrz",e.appl="appl",e.stpf="stpf"}(C||(C={})),function(e){e[e.NoOpOC=0]="NoOpOC",e[e.OptInOC=1]="OptInOC",e[e.CloseOutOC=2]="CloseOutOC",e[e.ClearStateOC=3]="ClearStateOC",e[e.UpdateApplicationOC=4]="UpdateApplicationOC",e[e.DeleteApplicationOC=5]="DeleteApplicationOC"}(L||(L={}));const K=1e3;function W(e,t,r){if(null==e)return;let n;if("string"==typeof e?n=i.lW.from(e,"base64"):e.constructor===Uint8Array?n=i.lW.from(e):i.lW.isBuffer(e)&&(n=e),null==n||n.byteLength!==r)throw Error(`${t} must be a ${r} byte Uint8Array or Buffer or base64 string.`);return n}class z{constructor({...e}){this.name="Transaction",this.tag=i.lW.from("TX");const t={type:C.pay,flatFee:!1,nonParticipation:!1};if(void 0===e.type&&(e.type=t.type),void 0===e.flatFee&&(e.flatFee=t.flatFee),e.type===C.keyreg&&void 0!==e.voteKey&&void 0===e.nonParticipation&&(e.nonParticipation=t.nonParticipation),void 0!==e.suggestedParams){const t=e;t.genesisHash=t.suggestedParams.genesisHash,t.fee=t.suggestedParams.fee,void 0!==t.suggestedParams.flatFee&&(t.flatFee=t.suggestedParams.flatFee),t.firstRound=t.suggestedParams.firstRound,t.lastRound=t.suggestedParams.lastRound,t.genesisID=t.suggestedParams.genesisID}const r=e;if(r.from=P(r.from),void 0!==r.to&&(r.to=P(r.to)),void 0!==r.closeRemainderTo&&(r.closeRemainderTo=P(r.closeRemainderTo)),void 0!==r.assetManager&&(r.assetManager=P(r.assetManager)),void 0!==r.assetReserve&&(r.assetReserve=P(r.assetReserve)),void 0!==r.assetFreeze&&(r.assetFreeze=P(r.assetFreeze)),void 0!==r.assetClawback&&(r.assetClawback=P(r.assetClawback)),void 0!==r.assetRevocationTarget&&(r.assetRevocationTarget=P(r.assetRevocationTarget)),void 0!==r.freezeAccount&&(r.freezeAccount=P(r.freezeAccount)),void 0!==r.reKeyTo&&(r.reKeyTo=P(r.reKeyTo)),void 0===r.genesisHash)throw Error("genesis hash must be specified and in a base64 string.");if(r.genesisHash=i.lW.from(r.genesisHash,"base64"),void 0!==r.amount&&(!(Number.isSafeInteger(r.amount)||"bigint"==typeof r.amount&&r.amount<=BigInt("0xffffffffffffffff"))||r.amount<0))throw Error("Amount must be a positive number and smaller than 2^64-1. If the number is larger than 2^53-1, use bigint.");if(!Number.isSafeInteger(r.fee)||r.fee<0)throw Error("fee must be a positive number and smaller than 2^53-1");if(!Number.isSafeInteger(r.firstRound)||r.firstRound<0)throw Error("firstRound must be a positive number");if(!Number.isSafeInteger(r.lastRound)||r.lastRound<0)throw Error("lastRound must be a positive number");if(void 0!==r.extraPages&&(!Number.isInteger(r.extraPages)||r.extraPages<0||r.extraPages>3))throw Error("extraPages must be an Integer between and including 0 to 3");if(void 0!==r.assetTotal&&(!(Number.isSafeInteger(r.assetTotal)||"bigint"==typeof r.assetTotal&&r.assetTotal<=BigInt("0xffffffffffffffff"))||r.assetTotal<0))throw Error("Total asset issuance must be a positive number and smaller than 2^64-1. If the number is larger than 2^53-1, use bigint.");if(void 0!==r.assetDecimals&&(!Number.isSafeInteger(r.assetDecimals)||r.assetDecimals<0||r.assetDecimals>19))throw Error(`assetDecimals must be a positive number and smaller than ${19..toString()}`);if(void 0!==r.assetIndex&&(!Number.isSafeInteger(r.assetIndex)||r.assetIndex<0))throw Error("Asset index must be a positive number and smaller than 2^53-1");if(void 0!==r.appIndex&&(!Number.isSafeInteger(r.appIndex)||r.appIndex<0))throw Error("Application index must be a positive number and smaller than 2^53-1");if(void 0!==r.appLocalInts&&(!Number.isSafeInteger(r.appLocalInts)||r.appLocalInts<0))throw Error("Application local ints count must be a positive number and smaller than 2^53-1");if(void 0!==r.appLocalByteSlices&&(!Number.isSafeInteger(r.appLocalByteSlices)||r.appLocalByteSlices<0))throw Error("Application local byte slices count must be a positive number and smaller than 2^53-1");if(void 0!==r.appGlobalInts&&(!Number.isSafeInteger(r.appGlobalInts)||r.appGlobalInts<0))throw Error("Application global ints count must be a positive number and smaller than 2^53-1");if(void 0!==r.appGlobalByteSlices&&(!Number.isSafeInteger(r.appGlobalByteSlices)||r.appGlobalByteSlices<0))throw Error("Application global byte slices count must be a positive number and smaller than 2^53-1");if(void 0!==r.appApprovalProgram&&r.appApprovalProgram.constructor!==Uint8Array)throw Error("appApprovalProgram must be a Uint8Array.");if(void 0!==r.appClearProgram&&r.appClearProgram.constructor!==Uint8Array)throw Error("appClearProgram must be a Uint8Array.");if(void 0!==r.appArgs){if(!Array.isArray(r.appArgs))throw Error("appArgs must be an Array of Uint8Array.");r.appArgs=r.appArgs.slice(),r.appArgs.forEach((e=>{if(e.constructor!==Uint8Array)throw Error("each element of AppArgs must be a Uint8Array.")}))}else r.appArgs=[];if(void 0!==r.appAccounts){if(!Array.isArray(r.appAccounts))throw Error("appAccounts must be an Array of addresses.");r.appAccounts=r.appAccounts.map((e=>P(e)))}if(void 0!==r.appForeignApps){if(!Array.isArray(r.appForeignApps))throw Error("appForeignApps must be an Array of integers.");r.appForeignApps=r.appForeignApps.slice(),r.appForeignApps.forEach((e=>{if(!Number.isSafeInteger(e)||e<0)throw Error("each foreign application index must be a positive number and smaller than 2^53-1")}))}if(void 0!==r.appForeignAssets){if(!Array.isArray(r.appForeignAssets))throw Error("appForeignAssets must be an Array of integers.");r.appForeignAssets=r.appForeignAssets.slice(),r.appForeignAssets.forEach((e=>{if(!Number.isSafeInteger(e)||e<0)throw Error("each foreign asset index must be a positive number and smaller than 2^53-1")}))}if(void 0!==r.boxes){if(!Array.isArray(r.boxes))throw Error("boxes must be an Array of BoxReference.");r.boxes=r.boxes.slice(),r.boxes.forEach((e=>{if(!Number.isSafeInteger(e.appIndex)||e.name.constructor!==Uint8Array)throw Error("box app index must be a number and name must be an Uint8Array.")}))}if(void 0!==r.assetMetadataHash&&0!==r.assetMetadataHash.length){if("string"==typeof r.assetMetadataHash&&(r.assetMetadataHash=new Uint8Array(i.lW.from(r.assetMetadataHash))),r.assetMetadataHash.constructor!==Uint8Array||32!==r.assetMetadataHash.byteLength)throw Error("assetMetadataHash must be a 32 byte Uint8Array or string.");r.assetMetadataHash.every((e=>0===e))&&(r.assetMetadataHash=void 0)}else r.assetMetadataHash=void 0;if(void 0!==r.note){if(r.note.constructor!==Uint8Array)throw Error("note must be a Uint8Array.")}else r.note=new Uint8Array(0);if(void 0!==r.lease){if(r.lease.constructor!==Uint8Array)throw Error("lease must be a Uint8Array.");if(32!==r.lease.length)throw Error(`lease must be of length ${32..toString()}.`);r.lease.every((e=>0===e))&&(r.lease=new Uint8Array(0))}else r.lease=new Uint8Array(0);if(r.voteKey=W(r.voteKey,"voteKey",32),r.selectionKey=W(r.selectionKey,"selectionKey",32),r.stateProofKey=W(r.stateProofKey,"stateProofKey",64),r.nonParticipation&&(r.voteKey||r.selectionKey||r.voteFirst||r.stateProofKey||r.voteLast||r.voteKeyDilution))throw new Error("nonParticipation is true but participation params are present.");if(!r.nonParticipation&&(r.voteKey||r.selectionKey||r.stateProofKey||r.voteFirst||r.voteLast||r.voteKeyDilution)&&!(r.voteKey&&r.selectionKey&&r.voteFirst&&r.voteLast&&r.voteKeyDilution))throw new Error("online key registration missing at least one of the following fields: voteKey, selectionKey, voteFirst, voteLast, voteKeyDilution");if(delete r.suggestedParams,Object.assign(this,function(e){const t={...e};return Object.keys(t).forEach((e=>{void 0===t[e]&&delete t[e]})),t}(r)),r.flatFee||(this.fee*=this.estimateSize(),this.fee<K&&(this.fee=K)),this.group=void 0,void 0!==r.stateProofType&&(!Number.isSafeInteger(r.stateProofType)||r.stateProofType<0))throw Error("State Proof type must be a positive number and smaller than 2^53-1");if(void 0!==r.stateProofMessage){if(r.stateProofMessage.constructor!==Uint8Array)throw Error("stateProofMessage must be a Uint8Array.")}else r.stateProofMessage=new Uint8Array(0);if(void 0!==r.stateProof){if(r.stateProof.constructor!==Uint8Array)throw Error("stateProof must be a Uint8Array.")}else r.stateProof=new Uint8Array(0)}get_obj_for_encoding(){if("pay"===this.type){const e={amt:this.amount,fee:this.fee,fv:this.firstRound,lv:this.lastRound,note:i.lW.from(this.note),snd:i.lW.from(this.from.publicKey),type:"pay",gen:this.genesisID,gh:this.genesisHash,lx:i.lW.from(this.lease),grp:this.group};return void 0!==this.closeRemainderTo&&"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ"!==q(this.closeRemainderTo.publicKey)&&(e.close=i.lW.from(this.closeRemainderTo.publicKey)),void 0!==this.reKeyTo&&(e.rekey=i.lW.from(this.reKeyTo.publicKey)),void 0!==this.to&&(e.rcv=i.lW.from(this.to.publicKey)),e.note.length||delete e.note,e.amt||delete e.amt,e.fee||delete e.fee,e.fv||delete e.fv,e.gen||delete e.gen,void 0===e.grp&&delete e.grp,e.lx.length||delete e.lx,e.rekey||delete e.rekey,e}if("keyreg"===this.type){const e={fee:this.fee,fv:this.firstRound,lv:this.lastRound,note:i.lW.from(this.note),snd:i.lW.from(this.from.publicKey),type:this.type,gen:this.genesisID,gh:this.genesisHash,lx:i.lW.from(this.lease),grp:this.group,votekey:this.voteKey,selkey:this.selectionKey,sprfkey:this.stateProofKey,votefst:this.voteFirst,votelst:this.voteLast,votekd:this.voteKeyDilution};return e.note.length||delete e.note,e.lx.length||delete e.lx,e.fee||delete e.fee,e.fv||delete e.fv,e.gen||delete e.gen,void 0===e.grp&&delete e.grp,void 0!==this.reKeyTo&&(e.rekey=i.lW.from(this.reKeyTo.publicKey)),this.nonParticipation&&(e.nonpart=!0),e.selkey||delete e.selkey,e.votekey||delete e.votekey,e.sprfkey||delete e.sprfkey,e.votefst||delete e.votefst,e.votelst||delete e.votelst,e.votekd||delete e.votekd,e}if("acfg"===this.type){const e={fee:this.fee,fv:this.firstRound,lv:this.lastRound,note:i.lW.from(this.note),snd:i.lW.from(this.from.publicKey),type:this.type,gen:this.genesisID,gh:this.genesisHash,lx:i.lW.from(this.lease),grp:this.group,caid:this.assetIndex,apar:{t:this.assetTotal,df:this.assetDefaultFrozen,dc:this.assetDecimals}};return void 0!==this.assetManager&&(e.apar.m=i.lW.from(this.assetManager.publicKey)),void 0!==this.assetReserve&&(e.apar.r=i.lW.from(this.assetReserve.publicKey)),void 0!==this.assetFreeze&&(e.apar.f=i.lW.from(this.assetFreeze.publicKey)),void 0!==this.assetClawback&&(e.apar.c=i.lW.from(this.assetClawback.publicKey)),void 0!==this.assetName&&(e.apar.an=this.assetName),void 0!==this.assetUnitName&&(e.apar.un=this.assetUnitName),void 0!==this.assetURL&&(e.apar.au=this.assetURL),void 0!==this.assetMetadataHash&&(e.apar.am=i.lW.from(this.assetMetadataHash)),e.note.length||delete e.note,e.lx.length||delete e.lx,e.amt||delete e.amt,e.fee||delete e.fee,e.fv||delete e.fv,e.gen||delete e.gen,void 0!==this.reKeyTo&&(e.rekey=i.lW.from(this.reKeyTo.publicKey)),e.caid||delete e.caid,e.apar.t||e.apar.un||e.apar.an||e.apar.df||e.apar.m||e.apar.r||e.apar.f||e.apar.c||e.apar.au||e.apar.am||e.apar.dc?(e.apar.t||delete e.apar.t,e.apar.dc||delete e.apar.dc,e.apar.un||delete e.apar.un,e.apar.an||delete e.apar.an,e.apar.df||delete e.apar.df,e.apar.m||delete e.apar.m,e.apar.r||delete e.apar.r,e.apar.f||delete e.apar.f,e.apar.c||delete e.apar.c,e.apar.au||delete e.apar.au,e.apar.am||delete e.apar.am):delete e.apar,void 0===e.grp&&delete e.grp,e}if("axfer"===this.type){const e={aamt:this.amount,fee:this.fee,fv:this.firstRound,lv:this.lastRound,note:i.lW.from(this.note),snd:i.lW.from(this.from.publicKey),arcv:i.lW.from(this.to.publicKey),type:this.type,gen:this.genesisID,gh:this.genesisHash,lx:i.lW.from(this.lease),grp:this.group,xaid:this.assetIndex};return void 0!==this.closeRemainderTo&&(e.aclose=i.lW.from(this.closeRemainderTo.publicKey)),void 0!==this.assetRevocationTarget&&(e.asnd=i.lW.from(this.assetRevocationTarget.publicKey)),e.note.length||delete e.note,e.lx.length||delete e.lx,e.aamt||delete e.aamt,e.amt||delete e.amt,e.fee||delete e.fee,e.fv||delete e.fv,e.gen||delete e.gen,void 0===e.grp&&delete e.grp,e.aclose||delete e.aclose,e.asnd||delete e.asnd,e.rekey||delete e.rekey,void 0!==this.reKeyTo&&(e.rekey=i.lW.from(this.reKeyTo.publicKey)),e}if("afrz"===this.type){const e={fee:this.fee,fv:this.firstRound,lv:this.lastRound,note:i.lW.from(this.note),snd:i.lW.from(this.from.publicKey),type:this.type,gen:this.genesisID,gh:this.genesisHash,lx:i.lW.from(this.lease),grp:this.group,faid:this.assetIndex,afrz:this.freezeState};return void 0!==this.freezeAccount&&(e.fadd=i.lW.from(this.freezeAccount.publicKey)),e.note.length||delete e.note,e.lx.length||delete e.lx,e.amt||delete e.amt,e.fee||delete e.fee,e.fv||delete e.fv,e.gen||delete e.gen,e.afrz||delete e.afrz,void 0===e.grp&&delete e.grp,void 0!==this.reKeyTo&&(e.rekey=i.lW.from(this.reKeyTo.publicKey)),e}if("appl"===this.type){const n={fee:this.fee,fv:this.firstRound,lv:this.lastRound,note:i.lW.from(this.note),snd:i.lW.from(this.from.publicKey),type:this.type,gen:this.genesisID,gh:this.genesisHash,lx:i.lW.from(this.lease),grp:this.group,apid:this.appIndex,apan:this.appOnComplete,apls:{nui:this.appLocalInts,nbs:this.appLocalByteSlices},apgs:{nui:this.appGlobalInts,nbs:this.appGlobalByteSlices},apfa:this.appForeignApps,apas:this.appForeignAssets,apep:this.extraPages,apbx:(e=this.boxes,t=this.appForeignApps,r=this.appIndex,null==e?[]:e.map((e=>function(e,t,r){const n=e.appIndex,s=e.name,i=0===n||n===r;let o=0;if(null!=t&&(o=t.indexOf(n)+1),0===o&&!i)throw new Error(`Box ref with appId ${n} not in foreign-apps`);return{i:o,n:s}}(e,t,r))))};void 0!==this.reKeyTo&&(n.rekey=i.lW.from(this.reKeyTo.publicKey)),void 0!==this.appApprovalProgram&&(n.apap=i.lW.from(this.appApprovalProgram)),void 0!==this.appClearProgram&&(n.apsu=i.lW.from(this.appClearProgram)),void 0!==this.appArgs&&(n.apaa=this.appArgs.map((e=>i.lW.from(e)))),void 0!==this.appAccounts&&(n.apat=this.appAccounts.map((e=>i.lW.from(e.publicKey)))),n.note.length||delete n.note,n.lx.length||delete n.lx,n.amt||delete n.amt,n.fee||delete n.fee,n.fv||delete n.fv,n.gen||delete n.gen,n.apid||delete n.apid,n.apls.nui||delete n.apls.nui,n.apls.nbs||delete n.apls.nbs,n.apls.nui||n.apls.nbs||delete n.apls,n.apgs.nui||delete n.apgs.nui,n.apgs.nbs||delete n.apgs.nbs,n.apaa&&n.apaa.length||delete n.apaa,n.apgs.nui||n.apgs.nbs||delete n.apgs,n.apap||delete n.apap,n.apsu||delete n.apsu,n.apan||delete n.apan,n.apfa&&n.apfa.length||delete n.apfa,n.apas&&n.apas.length||delete n.apas;for(const e of n.apbx)e.i||delete e.i,e.n&&e.n.length||delete e.n;return n.apbx&&n.apbx.length||delete n.apbx,n.apat&&n.apat.length||delete n.apat,n.apep||delete n.apep,void 0===n.grp&&delete n.grp,n}var e,t,r;if("stpf"===this.type){const e={fee:this.fee,fv:this.firstRound,lv:this.lastRound,note:i.lW.from(this.note),snd:i.lW.from(this.from.publicKey),type:this.type,gen:this.genesisID,gh:this.genesisHash,lx:i.lW.from(this.lease),sptype:this.stateProofType,spmsg:i.lW.from(this.stateProofMessage),sp:i.lW.from(this.stateProof)};return e.sptype||delete e.sptype,e.note.length||delete e.note,e.lx.length||delete e.lx,e.amt||delete e.amt,e.fee||delete e.fee,e.fv||delete e.fv,e.gen||delete e.gen,e.apid||delete e.apid,e.apaa&&e.apaa.length||delete e.apaa,e.apap||delete e.apap,e.apsu||delete e.apsu,e.apan||delete e.apan,e.apfa&&e.apfa.length||delete e.apfa,e.apas&&e.apas.length||delete e.apas,e.apat&&e.apat.length||delete e.apat,e.apep||delete e.apep,void 0===e.grp&&delete e.grp,e}}static from_obj_for_encoding(e){const t=Object.create(this.prototype);if(t.name="Transaction",t.tag=i.lW.from("TX"),t.genesisID=e.gen,t.genesisHash=i.lW.from(e.gh),(r=e.type)!==C.pay&&r!==C.keyreg&&r!==C.acfg&&r!==C.axfer&&r!==C.afrz&&r!==C.appl&&r!==C.stpf)throw new Error(`Unrecognized transaction type: ${e.type}`);var r;return 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=P(q(new Uint8Array(e.snd))),void 0!==e.grp&&(t.group=i.lW.from(e.grp)),void 0!==e.rekey&&(t.reKeyTo=P(q(new Uint8Array(e.rekey)))),"pay"===e.type?(t.amount=e.amt,t.to=P(q(new Uint8Array(e.rcv))),void 0!==e.close&&(t.closeRemainderTo=P(q(e.close)))):"keyreg"===e.type?(void 0!==e.votekey&&(t.voteKey=i.lW.from(e.votekey)),void 0!==e.selkey&&(t.selectionKey=i.lW.from(e.selkey)),void 0!==e.sprfkey&&(t.stateProofKey=i.lW.from(e.sprfkey)),void 0!==e.votekd&&(t.voteKeyDilution=e.votekd),void 0!==e.votefst&&(t.voteFirst=e.votefst),void 0!==e.votelst&&(t.voteLast=e.votelst),void 0!==e.nonpart&&(t.nonParticipation=e.nonpart)):"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=P(q(new Uint8Array(e.apar.m)))),void 0!==e.apar.r&&(t.assetReserve=P(q(new Uint8Array(e.apar.r)))),void 0!==e.apar.f&&(t.assetFreeze=P(q(new Uint8Array(e.apar.f)))),void 0!==e.apar.c&&(t.assetClawback=P(q(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=P(q(new Uint8Array(e.aclose)))),void 0!==e.asnd&&(t.assetRevocationTarget=P(q(new Uint8Array(e.asnd)))),t.to=P(q(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=P(q(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.apep&&(t.extraPages=e.apep),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.map((e=>new Uint8Array(e)))),void 0!==e.apat&&(t.appAccounts=e.apat.map((e=>P(q(new Uint8Array(e)))))),void 0!==e.apfa&&(t.appForeignApps=e.apfa),void 0!==e.apas&&(t.appForeignAssets=e.apas),void 0!==e.apbx&&(t.boxes=e.apbx.map((e=>({appIndex:e.i?t.appForeignApps[e.i-1]:0,name:e.n}))))):"stpf"===e.type&&(void 0!==e.sptype&&(t.stateProofType=e.sptype),void 0!==e.sp&&(t.stateProof=e.sp),void 0!==e.spmsg&&(t.stateProofMessage=e.spmsg)),t}estimateSize(){return this.toByte().length+75}bytesToSign(){const e=this.toByte();return i.lW.from(S(this.tag,e))}toByte(){return N(this.get_obj_for_encoding())}rawSignTxn(e){const t=f(this.bytesToSign(),e);return i.lW.from(t)}signTxn(e){const t={sig:this.rawSignTxn(e),txn:this.get_obj_for_encoding()},r=p(e).publicKey;return q(r)!==q(this.from.publicKey)&&(t.sgnr=i.lW.from(r)),new Uint8Array(N(t))}attachSignature(e,t){if(!d(t.length))throw new Error("Invalid signature length");const r={sig:i.lW.from(t),txn:this.get_obj_for_encoding()};if(e!==q(this.from.publicKey)){const t=P(e).publicKey;r.sgnr=i.lW.from(t)}return new Uint8Array(N(r))}rawTxID(){const e=this.toByte(),t=i.lW.from(S(this.tag,e));return i.lW.from(l(t))}txID(){const e=this.rawTxID();return v().encode(e).slice(0,52)}addLease(e,t=0){let r;if(void 0!==e){if(e.constructor!==Uint8Array)throw Error("lease must be a Uint8Array.");if(32!==e.length)throw Error(`lease must be of length ${32..toString()}.`);r=new Uint8Array(e)}else r=new Uint8Array(0);this.lease=r,0!==t&&(this.fee+=37*t)}addRekey(e,t=0){void 0!==e&&(this.reKeyTo=P(e)),0!==t&&(this.fee+=37*t)}_getDictForDisplay(){const e={...this};return e.tag=e.tag.toString(),e.from=q(e.from.publicKey),void 0!==e.to&&(e.to=q(e.to.publicKey)),void 0!==e.freezeAccount&&(e.freezeAccount=q(e.freezeAccount.publicKey)),void 0!==e.closeRemainderTo&&(e.closeRemainderTo=q(e.closeRemainderTo.publicKey)),void 0!==e.assetManager&&(e.assetManager=q(e.assetManager.publicKey)),void 0!==e.assetReserve&&(e.assetReserve=q(e.assetReserve.publicKey)),void 0!==e.assetFreeze&&(e.assetFreeze=q(e.assetFreeze.publicKey)),void 0!==e.assetClawback&&(e.assetClawback=q(e.assetClawback.publicKey)),void 0!==e.assetRevocationTarget&&(e.assetRevocationTarget=q(e.assetRevocationTarget.publicKey)),void 0!==e.reKeyTo&&(e.reKeyTo=q(e.reKeyTo.publicKey)),e.genesisHash=e.genesisHash.toString("base64"),e}prettyPrint(){console.log(this._getDictForDisplay())}toString(){return JSON.stringify(this._getDictForDisplay())}}function V(e){return N(e.get_obj_for_encoding())}function H(e){const t=F(e);return z.from_obj_for_encoding(t)}function G(e){const t=F(e);return{...t,txn:z.from_obj_for_encoding(t.txn)}}function Y(e){return e instanceof z?e:new z(e)}class J{constructor({bidderKey:e,bidAmount:t,bidID:r,auctionKey:n,auctionID:s,maxPrice:o}){this.name="Bid",this.tag=i.lW.from([97,66]);const a=P(e),c=P(n);if(!Number.isSafeInteger(t)||t<0)throw Error("Bid amount must be positive and 2^53-1");if(!Number.isSafeInteger(r)||r<0)throw Error("BidID must be positive and 2^53-1");if(!Number.isSafeInteger(s)||s<0)throw Error("auctionID must be positive");Object.assign(this,{bidderKey:a,bidAmount:t,bidID:r,auctionKey:c,auctionID:s,maxPrice:o})}get_obj_for_encoding(){return{bidder:i.lW.from(this.bidderKey.publicKey),cur:this.bidAmount,price:this.maxPrice,id:this.bidID,auc:i.lW.from(this.auctionKey.publicKey),aid:this.auctionID}}signBid(e){const t=N(this.get_obj_for_encoding()),r=f(i.lW.from(S(this.tag,t)),e),n={sig:i.lW.from(r),bid:this.get_obj_for_encoding()};return new Uint8Array(N({t:"b",b:n}))}}const X=1e6,Z="Microalgos should be positive and less than 2^53 - 1.";function Q(e){if(e<0||!Number.isSafeInteger(e))throw new Error(Z);return e/X}function ee(e){const t=e*X;return Math.round(t)}var te=r(297);class re extends Error{constructor(e,t){super(e),this.response=t,this.name="URLTokenBaseHTTPError",this.response=t}}class ne{constructor(e,t,r,n={}){this.defaultHeaders=n;const s=t.endsWith("/")?t:`${t}/`,i=new URL(s);if(void 0!==r&&(i.port=r.toString()),0===i.protocol.length)throw new Error("Invalid base server URL, protocol must be defined.");this.baseURL=i,this.tokenHeader=e}getURL(e,t){let r;r=e.startsWith("./")?e:e.startsWith("/")?`.${e}`:`./${e}`;const n=new URL(r,this.baseURL);if(t)for(const[e,r]of Object.entries(t))n.searchParams.set(e,r);return n.toString()}static formatFetchResponseHeaders(e){const t={};return e.forEach(((e,r)=>{t[e]=r})),t}static async checkHttpError(e){if(e.ok)return;let t=null,r=null;try{t=new Uint8Array(await e.arrayBuffer());const n=JSON.parse(i.lW.from(t).toString());n.message&&(r=n.message)}catch(e){}let n=`Network request error. Received status ${e.status} (${e.statusText})`;throw r&&(n+=`: ${r}`),new re(n,{body:t,status:e.status,headers:ne.formatFetchResponseHeaders(e.headers)})}static async formatFetchResponse(e){return await this.checkHttpError(e),{body:new Uint8Array(await e.arrayBuffer()),status:e.status,headers:ne.formatFetchResponseHeaders(e.headers)}}async get(e,t,r={}){const n={...this.tokenHeader,...this.defaultHeaders,...r},s=await(0,te.fetch)(this.getURL(e,t),{mode:"cors",headers:n});return ne.formatFetchResponse(s)}async post(e,t,r,n={}){const s={...this.tokenHeader,...this.defaultHeaders,...n},i=await(0,te.fetch)(this.getURL(e,r),{method:"POST",mode:"cors",body:t,headers:s});return ne.formatFetchResponse(i)}async delete(e,t,r,n={}){const s={...this.tokenHeader,...this.defaultHeaders,...n},i=await(0,te.fetch)(this.getURL(e,r),{method:"DELETE",mode:"cors",body:t,headers:s});return ne.formatFetchResponse(i)}}function se(e){return Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{})}class ie{constructor(e,t,r,n={}){this.bc=void 0!==t?new ne(e,t,r,n):e}static parseJSON(e,t,r={}){try{return 0===Object.keys(r).length?e&&JSON.parse(e):e&&function(e,t){const r=t&&t.intDecoding?t.intDecoding:_.DEFAULT;return E.parse(e,((e,t)=>{if(null!=t&&"object"==typeof t&&null==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,Object.prototype),"bigint"==typeof t){if("safe"===r&&t>Number.MAX_SAFE_INTEGER)throw new Error(`Integer exceeds maximum safe integer: ${t.toString()}. Try parsing with a different intDecoding option.`);return"bigint"===r||"mixed"===r&&t>Number.MAX_SAFE_INTEGER?t:Number(t)}return"number"==typeof t&&"bigint"===r&&Number.isInteger(t)?BigInt(t):t}))}(e,r)}catch(r){const n=r;throw n.rawResponse=e||null,n.statusCode=t,n}}static serializeData(e,t){if(!e)return new Uint8Array(0);if("application/json"===t["content-type"])return new Uint8Array(i.lW.from(JSON.stringify(e)));if("string"==typeof e)return new Uint8Array(i.lW.from(e));if(e instanceof Uint8Array)return e;throw new Error("provided data is neither a string nor a Uint8Array and content-type is not application/json")}static prepareResponse(e,t,r,n={}){let s,{body:o}=e;return"application/msgpack"!==t&&(s=o&&i.lW.from(o).toString()||""),r&&"application/json"===t&&(o=ie.parseJSON(s,e.status,n)),{...e,body:o,text:s,ok:2===Math.trunc(e.status/100)}}static prepareResponseError(e){return e.response&&(e.response=ie.prepareResponse(e.response,"application/json",!0),e.status=e.response.status),e}async get(e,t,r={},n={},s=!0){const i=function(e){if(void 0===e||!Object.prototype.hasOwnProperty.call(e,"format"))return"application/json";switch(e.format){case"msgpack":return"application/msgpack";case"json":default:return"application/json"}}(t),o={...r,accept:i};try{const r=await this.bc.get(e,function(e){for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(e[t]&&0!==e[t].length||delete e[t]);return e}(t),o);return ie.prepareResponse(r,i,s,n)}catch(e){throw ie.prepareResponseError(e)}}async post(e,t,r={},n,s=!0){const i={"content-type":"application/json",...se(r)};try{const r=await this.bc.post(e,ie.serializeData(t,i),n,i);return ie.prepareResponse(r,"application/json",s)}catch(e){throw ie.prepareResponseError(e)}}async delete(e,t,r={},n=!0){const s={"content-type":"application/json",...se(r)},i=await this.bc.delete(e,ie.serializeData(t,s),void 0,s);return ie.prepareResponse(i,"application/json",n)}}class oe{constructor(e,t,r,n,s={}){if("function"==typeof t.get)this.c=new ie(t);else{let i;i="string"==typeof t?function(e="",t){const r={};return r[t]=e,r}(t,e):t,this.c=new ie(i,r,n,s)}this.intDecoding=_.DEFAULT}setIntEncoding(e){this.intDecoding=e}getIntEncoding(){return this.intDecoding}}class ae{constructor(e,t){this.c=e,this.query={},this.intDecoding=t||_.DEFAULT}prepare(e){return e}async do(e={}){const t={};"default"!==this.intDecoding&&(t.intDecoding=this.intDecoding);const r=await this.c.get(this.path(),this.query,e,t);return this.prepare(r.body)}async doRaw(e={}){return(await this.c.get(this.path(),this.query,e,{},!1)).body}setIntDecoding(e){if("default"!==e&&"safe"!==e&&"mixed"!==e&&"bigint"!==e)throw new Error(`Invalid method for int decoding: ${e}`);return this.intDecoding=e,this}}class ce extends ae{constructor(e,t,r){super(e,t),this.account=r,this.account=r}path(){return`/v2/accounts/${this.account}`}exclude(e){return this.query.exclude=e,this}}class ue extends ae{constructor(e,t,r,n){super(e,t),this.account=r,this.assetID=n,this.account=r,this.assetID=n}path(){return`/v2/accounts/${this.account}/assets/${this.assetID}`}}class le extends ae{constructor(e,t,r,n){super(e,t),this.account=r,this.applicationID=n,this.account=r,this.applicationID=n}path(){return`/v2/accounts/${this.account}/applications/${this.applicationID}`}}class he extends ae{constructor(e,t){if(super(e),!Number.isInteger(t))throw Error("roundNumber should be an integer");this.round=t,this.query={format:"msgpack"}}path(){return`/v2/blocks/${this.round}`}prepare(e){if(e&&e.byteLength>0)return F(e)}}function de(e={}){let t=e;return Object.keys(t).every((e=>"content-type"!==e.toLowerCase()))&&(t={...e},t["Content-Type"]="text/plain"),t}class pe extends ae{constructor(e,t){super(e),this.source=t,this.source=t}path(){return"/v2/teal/compile"}sourcemap(e=!0){return this.query.sourcemap=e,this}async do(e={}){const t=de(e);return(await this.c.post(this.path(),i.lW.from(this.source),t,this.query)).body}}class fe extends ae{constructor(e,t){super(e),this.blob=N(t.get_obj_for_encoding(!0))}path(){return"/v2/teal/dryrun"}async do(e={}){const t=de(e);return(await this.c.post(this.path(),i.lW.from(this.blob),t)).body}}class ge extends ae{path(){return"/genesis"}}class me extends ae{constructor(e,t,r){super(e,t),this.index=r,this.index=r}path(){return`/v2/assets/${this.index}`}}class ye extends ae{constructor(e,t,r){super(e,t),this.index=r,this.index=r}path(){return`/v2/applications/${this.index}`}}class we extends ae{constructor(e,t,r){if(super(e,t),!Number.isInteger(r))throw Error("roundNumber should be an integer");this.round=r}path(){return`/v2/blocks/${this.round}/hash`}}function be(e,t){let r;if(e instanceof Uint8Array)r=t?e:i.lW.from(e).toString("base64");else if("function"==typeof e.get_obj_for_encoding)r=e.get_obj_for_encoding(t);else if(Array.isArray(e)){r=[];for(const n of e)r.push(be(n,t))}else if("object"==typeof e){const n={};for(const r of Object.keys(e))n[r]=be(e[r],t);r=n}else{if(!function(e){return void 0===e||null==e||"object"!=typeof e&&"function"!=typeof e}(e))throw new Error(`Unsupported value: ${String(e)}`);r=e}return r}class ve{get_obj_for_encoding(e=!1){const t={};for(const r of Object.keys(this.attribute_map)){const n=this.attribute_map[r],s=this[r];void 0!==s&&(t[n]=null===s?null:be(s,e))}return t}}class xe extends ve{constructor({address:e,amount:t,amountWithoutPendingRewards:r,minBalance:n,pendingRewards:s,rewards:i,round:o,status:a,totalAppsOptedIn:c,totalAssetsOptedIn:u,totalCreatedApps:l,totalCreatedAssets:h,appsLocalState:d,appsTotalExtraPages:p,appsTotalSchema:f,assets:g,authAddr:m,createdApps:y,createdAssets:w,participation:b,rewardBase:v,sigType:x,totalBoxBytes:A,totalBoxes:_}){super(),this.address=e,this.amount=t,this.amountWithoutPendingRewards=r,this.minBalance=n,this.pendingRewards=s,this.rewards=i,this.round=o,this.status=a,this.totalAppsOptedIn=c,this.totalAssetsOptedIn=u,this.totalCreatedApps=l,this.totalCreatedAssets=h,this.appsLocalState=d,this.appsTotalExtraPages=p,this.appsTotalSchema=f,this.assets=g,this.authAddr=m,this.createdApps=y,this.createdAssets=w,this.participation=b,this.rewardBase=v,this.sigType=x,this.totalBoxBytes=A,this.totalBoxes=_,this.attribute_map={address:"address",amount:"amount",amountWithoutPendingRewards:"amount-without-pending-rewards",minBalance:"min-balance",pendingRewards:"pending-rewards",rewards:"rewards",round:"round",status:"status",totalAppsOptedIn:"total-apps-opted-in",totalAssetsOptedIn:"total-assets-opted-in",totalCreatedApps:"total-created-apps",totalCreatedAssets:"total-created-assets",appsLocalState:"apps-local-state",appsTotalExtraPages:"apps-total-extra-pages",appsTotalSchema:"apps-total-schema",assets:"assets",authAddr:"auth-addr",createdApps:"created-apps",createdAssets:"created-assets",participation:"participation",rewardBase:"reward-base",sigType:"sig-type",totalBoxBytes:"total-box-bytes",totalBoxes:"total-boxes"}}static from_obj_for_encoding(e){if(void 0===e.address)throw new Error(`Response is missing required field 'address': ${e}`);if(void 0===e.amount)throw new Error(`Response is missing required field 'amount': ${e}`);if(void 0===e["amount-without-pending-rewards"])throw new Error(`Response is missing required field 'amount-without-pending-rewards': ${e}`);if(void 0===e["min-balance"])throw new Error(`Response is missing required field 'min-balance': ${e}`);if(void 0===e["pending-rewards"])throw new Error(`Response is missing required field 'pending-rewards': ${e}`);if(void 0===e.rewards)throw new Error(`Response is missing required field 'rewards': ${e}`);if(void 0===e.round)throw new Error(`Response is missing required field 'round': ${e}`);if(void 0===e.status)throw new Error(`Response is missing required field 'status': ${e}`);if(void 0===e["total-apps-opted-in"])throw new Error(`Response is missing required field 'total-apps-opted-in': ${e}`);if(void 0===e["total-assets-opted-in"])throw new Error(`Response is missing required field 'total-assets-opted-in': ${e}`);if(void 0===e["total-created-apps"])throw new Error(`Response is missing required field 'total-created-apps': ${e}`);if(void 0===e["total-created-assets"])throw new Error(`Response is missing required field 'total-created-assets': ${e}`);return new xe({address:e.address,amount:e.amount,amountWithoutPendingRewards:e["amount-without-pending-rewards"],minBalance:e["min-balance"],pendingRewards:e["pending-rewards"],rewards:e.rewards,round:e.round,status:e.status,totalAppsOptedIn:e["total-apps-opted-in"],totalAssetsOptedIn:e["total-assets-opted-in"],totalCreatedApps:e["total-created-apps"],totalCreatedAssets:e["total-created-assets"],appsLocalState:void 0!==e["apps-local-state"]?e["apps-local-state"].map(ke.from_obj_for_encoding):void 0,appsTotalExtraPages:e["apps-total-extra-pages"],appsTotalSchema:void 0!==e["apps-total-schema"]?Ie.from_obj_for_encoding(e["apps-total-schema"]):void 0,assets:void 0!==e.assets?e.assets.map(Ue.from_obj_for_encoding):void 0,authAddr:e["auth-addr"],createdApps:void 0!==e["created-apps"]?e["created-apps"].map(Se.from_obj_for_encoding):void 0,createdAssets:void 0!==e["created-assets"]?e["created-assets"].map(Be.from_obj_for_encoding):void 0,participation:void 0!==e.participation?Ee.from_obj_for_encoding(e.participation):void 0,rewardBase:e["reward-base"],sigType:e["sig-type"],totalBoxBytes:e["total-box-bytes"],totalBoxes:e["total-boxes"]})}}class Ae extends ve{constructor({round:e,appLocalState:t,createdApp:r}){super(),this.round=e,this.appLocalState=t,this.createdApp=r,this.attribute_map={round:"round",appLocalState:"app-local-state",createdApp:"created-app"}}static from_obj_for_encoding(e){if(void 0===e.round)throw new Error(`Response is missing required field 'round': ${e}`);return new Ae({round:e.round,appLocalState:void 0!==e["app-local-state"]?ke.from_obj_for_encoding(e["app-local-state"]):void 0,createdApp:void 0!==e["created-app"]?Re.from_obj_for_encoding(e["created-app"]):void 0})}}class _e extends ve{constructor({round:e,assetHolding:t,createdAsset:r}){super(),this.round=e,this.assetHolding=t,this.createdAsset=r,this.attribute_map={round:"round",assetHolding:"asset-holding",createdAsset:"created-asset"}}static from_obj_for_encoding(e){if(void 0===e.round)throw new Error(`Response is missing required field 'round': ${e}`);return new _e({round:e.round,assetHolding:void 0!==e["asset-holding"]?Ue.from_obj_for_encoding(e["asset-holding"]):void 0,createdAsset:void 0!==e["created-asset"]?Pe.from_obj_for_encoding(e["created-asset"]):void 0})}}class Ee extends ve{constructor({selectionParticipationKey:e,voteFirstValid:t,voteKeyDilution:r,voteLastValid:n,voteParticipationKey:s,stateProofKey:o}){super(),this.selectionParticipationKey="string"==typeof e?new Uint8Array(i.lW.from(e,"base64")):e,this.voteFirstValid=t,this.voteKeyDilution=r,this.voteLastValid=n,this.voteParticipationKey="string"==typeof s?new Uint8Array(i.lW.from(s,"base64")):s,this.stateProofKey="string"==typeof o?new Uint8Array(i.lW.from(o,"base64")):o,this.attribute_map={selectionParticipationKey:"selection-participation-key",voteFirstValid:"vote-first-valid",voteKeyDilution:"vote-key-dilution",voteLastValid:"vote-last-valid",voteParticipationKey:"vote-participation-key",stateProofKey:"state-proof-key"}}static from_obj_for_encoding(e){if(void 0===e["selection-participation-key"])throw new Error(`Response is missing required field 'selection-participation-key': ${e}`);if(void 0===e["vote-first-valid"])throw new Error(`Response is missing required field 'vote-first-valid': ${e}`);if(void 0===e["vote-key-dilution"])throw new Error(`Response is missing required field 'vote-key-dilution': ${e}`);if(void 0===e["vote-last-valid"])throw new Error(`Response is missing required field 'vote-last-valid': ${e}`);if(void 0===e["vote-participation-key"])throw new Error(`Response is missing required field 'vote-participation-key': ${e}`);return new Ee({selectionParticipationKey:e["selection-participation-key"],voteFirstValid:e["vote-first-valid"],voteKeyDilution:e["vote-key-dilution"],voteLastValid:e["vote-last-valid"],voteParticipationKey:e["vote-participation-key"],stateProofKey:e["state-proof-key"]})}}class Te extends ve{constructor({address:e,delta:t}){super(),this.address=e,this.delta=t,this.attribute_map={address:"address",delta:"delta"}}static from_obj_for_encoding(e){if(void 0===e.address)throw new Error(`Response is missing required field 'address': ${e}`);if(!Array.isArray(e.delta))throw new Error(`Response is missing required array field 'delta': ${e}`);return new Te({address:e.address,delta:e.delta.map(Ge.from_obj_for_encoding)})}}class Se extends ve{constructor({id:e,params:t}){super(),this.id=e,this.params=t,this.attribute_map={id:"id",params:"params"}}static from_obj_for_encoding(e){if(void 0===e.id)throw new Error(`Response is missing required field 'id': ${e}`);if(void 0===e.params)throw new Error(`Response is missing required field 'params': ${e}`);return new Se({id:e.id,params:Re.from_obj_for_encoding(e.params)})}}class ke extends ve{constructor({id:e,schema:t,keyValue:r}){super(),this.id=e,this.schema=t,this.keyValue=r,this.attribute_map={id:"id",schema:"schema",keyValue:"key-value"}}static from_obj_for_encoding(e){if(void 0===e.id)throw new Error(`Response is missing required field 'id': ${e}`);if(void 0===e.schema)throw new Error(`Response is missing required field 'schema': ${e}`);return new ke({id:e.id,schema:Ie.from_obj_for_encoding(e.schema),keyValue:void 0!==e["key-value"]?e["key-value"].map(nt.from_obj_for_encoding):void 0})}}class Re extends ve{constructor({approvalProgram:e,clearStateProgram:t,creator:r,extraProgramPages:n,globalState:s,globalStateSchema:o,localStateSchema:a}){super(),this.approvalProgram="string"==typeof e?new Uint8Array(i.lW.from(e,"base64")):e,this.clearStateProgram="string"==typeof t?new Uint8Array(i.lW.from(t,"base64")):t,this.creator=r,this.extraProgramPages=n,this.globalState=s,this.globalStateSchema=o,this.localStateSchema=a,this.attribute_map={approvalProgram:"approval-program",clearStateProgram:"clear-state-program",creator:"creator",extraProgramPages:"extra-program-pages",globalState:"global-state",globalStateSchema:"global-state-schema",localStateSchema:"local-state-schema"}}static from_obj_for_encoding(e){if(void 0===e["approval-program"])throw new Error(`Response is missing required field 'approval-program': ${e}`);if(void 0===e["clear-state-program"])throw new Error(`Response is missing required field 'clear-state-program': ${e}`);if(void 0===e.creator)throw new Error(`Response is missing required field 'creator': ${e}`);return new Re({approvalProgram:e["approval-program"],clearStateProgram:e["clear-state-program"],creator:e.creator,extraProgramPages:e["extra-program-pages"],globalState:void 0!==e["global-state"]?e["global-state"].map(nt.from_obj_for_encoding):void 0,globalStateSchema:void 0!==e["global-state-schema"]?Ie.from_obj_for_encoding(e["global-state-schema"]):void 0,localStateSchema:void 0!==e["local-state-schema"]?Ie.from_obj_for_encoding(e["local-state-schema"]):void 0})}}class Ie extends ve{constructor({numUint:e,numByteSlice:t}){super(),this.numUint=e,this.numByteSlice=t,this.attribute_map={numUint:"num-uint",numByteSlice:"num-byte-slice"}}static from_obj_for_encoding(e){if(void 0===e["num-uint"])throw new Error(`Response is missing required field 'num-uint': ${e}`);if(void 0===e["num-byte-slice"])throw new Error(`Response is missing required field 'num-byte-slice': ${e}`);return new Ie({numUint:e["num-uint"],numByteSlice:e["num-byte-slice"]})}}class Be extends ve{constructor({index:e,params:t}){super(),this.index=e,this.params=t,this.attribute_map={index:"index",params:"params"}}static from_obj_for_encoding(e){if(void 0===e.index)throw new Error(`Response is missing required field 'index': ${e}`);if(void 0===e.params)throw new Error(`Response is missing required field 'params': ${e}`);return new Be({index:e.index,params:Pe.from_obj_for_encoding(e.params)})}}class Ue extends ve{constructor({amount:e,assetId:t,isFrozen:r}){super(),this.amount=e,this.assetId=t,this.isFrozen=r,this.attribute_map={amount:"amount",assetId:"asset-id",isFrozen:"is-frozen"}}static from_obj_for_encoding(e){if(void 0===e.amount)throw new Error(`Response is missing required field 'amount': ${e}`);if(void 0===e["asset-id"])throw new Error(`Response is missing required field 'asset-id': ${e}`);if(void 0===e["is-frozen"])throw new Error(`Response is missing required field 'is-frozen': ${e}`);return new Ue({amount:e.amount,assetId:e["asset-id"],isFrozen:e["is-frozen"]})}}class Pe extends ve{constructor({creator:e,decimals:t,total:r,clawback:n,defaultFrozen:s,freeze:o,manager:a,metadataHash:c,name:u,nameB64:l,reserve:h,unitName:d,unitNameB64:p,url:f,urlB64:g}){super(),this.creator=e,this.decimals=t,this.total=r,this.clawback=n,this.defaultFrozen=s,this.freeze=o,this.manager=a,this.metadataHash="string"==typeof c?new Uint8Array(i.lW.from(c,"base64")):c,this.name=u,this.nameB64="string"==typeof l?new Uint8Array(i.lW.from(l,"base64")):l,this.reserve=h,this.unitName=d,this.unitNameB64="string"==typeof p?new Uint8Array(i.lW.from(p,"base64")):p,this.url=f,this.urlB64="string"==typeof g?new Uint8Array(i.lW.from(g,"base64")):g,this.attribute_map={creator:"creator",decimals:"decimals",total:"total",clawback:"clawback",defaultFrozen:"default-frozen",freeze:"freeze",manager:"manager",metadataHash:"metadata-hash",name:"name",nameB64:"name-b64",reserve:"reserve",unitName:"unit-name",unitNameB64:"unit-name-b64",url:"url",urlB64:"url-b64"}}static from_obj_for_encoding(e){if(void 0===e.creator)throw new Error(`Response is missing required field 'creator': ${e}`);if(void 0===e.decimals)throw new Error(`Response is missing required field 'decimals': ${e}`);if(void 0===e.total)throw new Error(`Response is missing required field 'total': ${e}`);return new Pe({creator:e.creator,decimals:e.decimals,total:e.total,clawback:e.clawback,defaultFrozen:e["default-frozen"],freeze:e.freeze,manager:e.manager,metadataHash:e["metadata-hash"],name:e.name,nameB64:e["name-b64"],reserve:e.reserve,unitName:e["unit-name"],unitNameB64:e["unit-name-b64"],url:e.url,urlB64:e["url-b64"]})}}class je extends ve{constructor({blockhash:e}){super(),this.blockhash=e,this.attribute_map={blockhash:"blockHash"}}static from_obj_for_encoding(e){if(void 0===e.blockHash)throw new Error(`Response is missing required field 'blockHash': ${e}`);return new je({blockhash:e.blockHash})}}class qe extends ve{constructor({block:e,cert:t}){super(),this.block=e,this.cert=t,this.attribute_map={block:"block",cert:"cert"}}static from_obj_for_encoding(e){if(void 0===e.block)throw new Error(`Response is missing required field 'block': ${e}`);return new qe({block:e.block,cert:e.cert})}}class De extends ve{constructor({name:e,value:t}){super(),this.name="string"==typeof e?new Uint8Array(i.lW.from(e,"base64")):e,this.value="string"==typeof t?new Uint8Array(i.lW.from(t,"base64")):t,this.attribute_map={name:"name",value:"value"}}static from_obj_for_encoding(e){if(void 0===e.name)throw new Error(`Response is missing required field 'name': ${e}`);if(void 0===e.value)throw new Error(`Response is missing required field 'value': ${e}`);return new De({name:e.name,value:e.value})}}class $e extends ve{constructor({name:e}){super(),this.name="string"==typeof e?new Uint8Array(i.lW.from(e,"base64")):e,this.attribute_map={name:"name"}}static from_obj_for_encoding(e){if(void 0===e.name)throw new Error(`Response is missing required field 'name': ${e}`);return new $e({name:e.name})}}class Oe extends ve{constructor({boxes:e}){super(),this.boxes=e,this.attribute_map={boxes:"boxes"}}static from_obj_for_encoding(e){if(!Array.isArray(e.boxes))throw new Error(`Response is missing required array field 'boxes': ${e}`);return new Oe({boxes:e.boxes.map($e.from_obj_for_encoding)})}}class Ce extends ve{constructor({branch:e,buildNumber:t,channel:r,commitHash:n,major:s,minor:i}){super(),this.branch=e,this.buildNumber=t,this.channel=r,this.commitHash=n,this.major=s,this.minor=i,this.attribute_map={branch:"branch",buildNumber:"build_number",channel:"channel",commitHash:"commit_hash",major:"major",minor:"minor"}}static from_obj_for_encoding(e){if(void 0===e.branch)throw new Error(`Response is missing required field 'branch': ${e}`);if(void 0===e.build_number)throw new Error(`Response is missing required field 'build_number': ${e}`);if(void 0===e.channel)throw new Error(`Response is missing required field 'channel': ${e}`);if(void 0===e.commit_hash)throw new Error(`Response is missing required field 'commit_hash': ${e}`);if(void 0===e.major)throw new Error(`Response is missing required field 'major': ${e}`);if(void 0===e.minor)throw new Error(`Response is missing required field 'minor': ${e}`);return new Ce({branch:e.branch,buildNumber:e.build_number,channel:e.channel,commitHash:e.commit_hash,major:e.major,minor:e.minor})}}class Le extends ve{constructor({hash:e,result:t,sourcemap:r}){super(),this.hash=e,this.result=t,this.sourcemap=r,this.attribute_map={hash:"hash",result:"result",sourcemap:"sourcemap"}}static from_obj_for_encoding(e){if(void 0===e.hash)throw new Error(`Response is missing required field 'hash': ${e}`);if(void 0===e.result)throw new Error(`Response is missing required field 'result': ${e}`);return new Le({hash:e.hash,result:e.result,sourcemap:e.sourcemap})}}class Me extends ve{constructor({result:e}){super(),this.result=e,this.attribute_map={result:"result"}}static from_obj_for_encoding(e){if(void 0===e.result)throw new Error(`Response is missing required field 'result': ${e}`);return new Me({result:e.result})}}class Ne extends ve{constructor({accounts:e,apps:t,latestTimestamp:r,protocolVersion:n,round:s,sources:i,txns:o}){super(),this.accounts=e,this.apps=t,this.latestTimestamp=r,this.protocolVersion=n,this.round=s,this.sources=i,this.txns=o,this.attribute_map={accounts:"accounts",apps:"apps",latestTimestamp:"latest-timestamp",protocolVersion:"protocol-version",round:"round",sources:"sources",txns:"txns"}}static from_obj_for_encoding(e){if(!Array.isArray(e.accounts))throw new Error(`Response is missing required array field 'accounts': ${e}`);if(!Array.isArray(e.apps))throw new Error(`Response is missing required array field 'apps': ${e}`);if(void 0===e["latest-timestamp"])throw new Error(`Response is missing required field 'latest-timestamp': ${e}`);if(void 0===e["protocol-version"])throw new Error(`Response is missing required field 'protocol-version': ${e}`);if(void 0===e.round)throw new Error(`Response is missing required field 'round': ${e}`);if(!Array.isArray(e.sources))throw new Error(`Response is missing required array field 'sources': ${e}`);if(!Array.isArray(e.txns))throw new Error(`Response is missing required array field 'txns': ${e}`);return new Ne({accounts:e.accounts.map(xe.from_obj_for_encoding),apps:e.apps.map(Se.from_obj_for_encoding),latestTimestamp:e["latest-timestamp"],protocolVersion:e["protocol-version"],round:e.round,sources:e.sources.map(Ke.from_obj_for_encoding),txns:e.txns})}}class Fe extends ve{constructor({error:e,protocolVersion:t,txns:r}){super(),this.error=e,this.protocolVersion=t,this.txns=r,this.attribute_map={error:"error",protocolVersion:"protocol-version",txns:"txns"}}static from_obj_for_encoding(e){if(void 0===e.error)throw new Error(`Response is missing required field 'error': ${e}`);if(void 0===e["protocol-version"])throw new Error(`Response is missing required field 'protocol-version': ${e}`);if(!Array.isArray(e.txns))throw new Error(`Response is missing required array field 'txns': ${e}`);return new Fe({error:e.error,protocolVersion:e["protocol-version"],txns:e.txns.map(ze.from_obj_for_encoding)})}}class Ke extends ve{constructor({fieldName:e,source:t,txnIndex:r,appIndex:n}){super(),this.fieldName=e,this.source=t,this.txnIndex=r,this.appIndex=n,this.attribute_map={fieldName:"field-name",source:"source",txnIndex:"txn-index",appIndex:"app-index"}}static from_obj_for_encoding(e){if(void 0===e["field-name"])throw new Error(`Response is missing required field 'field-name': ${e}`);if(void 0===e.source)throw new Error(`Response is missing required field 'source': ${e}`);if(void 0===e["txn-index"])throw new Error(`Response is missing required field 'txn-index': ${e}`);if(void 0===e["app-index"])throw new Error(`Response is missing required field 'app-index': ${e}`);return new Ke({fieldName:e["field-name"],source:e.source,txnIndex:e["txn-index"],appIndex:e["app-index"]})}}class We extends ve{constructor({line:e,pc:t,stack:r,error:n,scratch:s}){super(),this.line=e,this.pc=t,this.stack=r,this.error=n,this.scratch=s,this.attribute_map={line:"line",pc:"pc",stack:"stack",error:"error",scratch:"scratch"}}static from_obj_for_encoding(e){if(void 0===e.line)throw new Error(`Response is missing required field 'line': ${e}`);if(void 0===e.pc)throw new Error(`Response is missing required field 'pc': ${e}`);if(!Array.isArray(e.stack))throw new Error(`Response is missing required array field 'stack': ${e}`);return new We({line:e.line,pc:e.pc,stack:e.stack.map(st.from_obj_for_encoding),error:e.error,scratch:void 0!==e.scratch?e.scratch.map(st.from_obj_for_encoding):void 0})}}class ze extends ve{constructor({disassembly:e,appCallMessages:t,appCallTrace:r,budgetAdded:n,budgetConsumed:s,globalDelta:i,localDeltas:o,logicSigDisassembly:a,logicSigMessages:c,logicSigTrace:u,logs:l}){super(),this.disassembly=e,this.appCallMessages=t,this.appCallTrace=r,this.budgetAdded=n,this.budgetConsumed=s,this.globalDelta=i,this.localDeltas=o,this.logicSigDisassembly=a,this.logicSigMessages=c,this.logicSigTrace=u,this.logs=l,this.attribute_map={disassembly:"disassembly",appCallMessages:"app-call-messages",appCallTrace:"app-call-trace",budgetAdded:"budget-added",budgetConsumed:"budget-consumed",globalDelta:"global-delta",localDeltas:"local-deltas",logicSigDisassembly:"logic-sig-disassembly",logicSigMessages:"logic-sig-messages",logicSigTrace:"logic-sig-trace",logs:"logs"}}static from_obj_for_encoding(e){if(!Array.isArray(e.disassembly))throw new Error(`Response is missing required array field 'disassembly': ${e}`);return new ze({disassembly:e.disassembly,appCallMessages:e["app-call-messages"],appCallTrace:void 0!==e["app-call-trace"]?e["app-call-trace"].map(We.from_obj_for_encoding):void 0,budgetAdded:e["budget-added"],budgetConsumed:e["budget-consumed"],globalDelta:void 0!==e["global-delta"]?e["global-delta"].map(Ge.from_obj_for_encoding):void 0,localDeltas:void 0!==e["local-deltas"]?e["local-deltas"].map(Te.from_obj_for_encoding):void 0,logicSigDisassembly:e["logic-sig-disassembly"],logicSigMessages:e["logic-sig-messages"],logicSigTrace:void 0!==e["logic-sig-trace"]?e["logic-sig-trace"].map(We.from_obj_for_encoding):void 0,logs:e.logs})}}class Ve extends ve{constructor({message:e,data:t}){super(),this.message=e,this.data=t,this.attribute_map={message:"message",data:"data"}}static from_obj_for_encoding(e){if(void 0===e.message)throw new Error(`Response is missing required field 'message': ${e}`);return new Ve({message:e.message,data:e.data})}}class He extends ve{constructor({action:e,bytes:t,uint:r}){super(),this.action=e,this.bytes=t,this.uint=r,this.attribute_map={action:"action",bytes:"bytes",uint:"uint"}}static from_obj_for_encoding(e){if(void 0===e.action)throw new Error(`Response is missing required field 'action': ${e}`);return new He({action:e.action,bytes:e.bytes,uint:e.uint})}}class Ge extends ve{constructor({key:e,value:t}){super(),this.key=e,this.value=t,this.attribute_map={key:"key",value:"value"}}static from_obj_for_encoding(e){if(void 0===e.key)throw new Error(`Response is missing required field 'key': ${e}`);if(void 0===e.value)throw new Error(`Response is missing required field 'value': ${e}`);return new Ge({key:e.key,value:He.from_obj_for_encoding(e.value)})}}class Ye extends ve{constructor({index:e,proof:t,treedepth:r}){super(),this.index=e,this.proof="string"==typeof t?new Uint8Array(i.lW.from(t,"base64")):t,this.treedepth=r,this.attribute_map={index:"index",proof:"proof",treedepth:"treedepth"}}static from_obj_for_encoding(e){if(void 0===e.index)throw new Error(`Response is missing required field 'index': ${e}`);if(void 0===e.proof)throw new Error(`Response is missing required field 'proof': ${e}`);if(void 0===e.treedepth)throw new Error(`Response is missing required field 'treedepth': ${e}`);return new Ye({index:e.index,proof:e.proof,treedepth:e.treedepth})}}class Je extends ve{constructor({catchupTime:e,lastRound:t,lastVersion:r,nextVersion:n,nextVersionRound:s,nextVersionSupported:i,stoppedAtUnsupportedRound:o,timeSinceLastRound:a,catchpoint:c,catchpointAcquiredBlocks:u,catchpointProcessedAccounts:l,catchpointProcessedKvs:h,catchpointTotalAccounts:d,catchpointTotalBlocks:p,catchpointTotalKvs:f,catchpointVerifiedAccounts:g,catchpointVerifiedKvs:m,lastCatchpoint:y}){super(),this.catchupTime=e,this.lastRound=t,this.lastVersion=r,this.nextVersion=n,this.nextVersionRound=s,this.nextVersionSupported=i,this.stoppedAtUnsupportedRound=o,this.timeSinceLastRound=a,this.catchpoint=c,this.catchpointAcquiredBlocks=u,this.catchpointProcessedAccounts=l,this.catchpointProcessedKvs=h,this.catchpointTotalAccounts=d,this.catchpointTotalBlocks=p,this.catchpointTotalKvs=f,this.catchpointVerifiedAccounts=g,this.catchpointVerifiedKvs=m,this.lastCatchpoint=y,this.attribute_map={catchupTime:"catchup-time",lastRound:"last-round",lastVersion:"last-version",nextVersion:"next-version",nextVersionRound:"next-version-round",nextVersionSupported:"next-version-supported",stoppedAtUnsupportedRound:"stopped-at-unsupported-round",timeSinceLastRound:"time-since-last-round",catchpoint:"catchpoint",catchpointAcquiredBlocks:"catchpoint-acquired-blocks",catchpointProcessedAccounts:"catchpoint-processed-accounts",catchpointProcessedKvs:"catchpoint-processed-kvs",catchpointTotalAccounts:"catchpoint-total-accounts",catchpointTotalBlocks:"catchpoint-total-blocks",catchpointTotalKvs:"catchpoint-total-kvs",catchpointVerifiedAccounts:"catchpoint-verified-accounts",catchpointVerifiedKvs:"catchpoint-verified-kvs",lastCatchpoint:"last-catchpoint"}}static from_obj_for_encoding(e){if(void 0===e["catchup-time"])throw new Error(`Response is missing required field 'catchup-time': ${e}`);if(void 0===e["last-round"])throw new Error(`Response is missing required field 'last-round': ${e}`);if(void 0===e["last-version"])throw new Error(`Response is missing required field 'last-version': ${e}`);if(void 0===e["next-version"])throw new Error(`Response is missing required field 'next-version': ${e}`);if(void 0===e["next-version-round"])throw new Error(`Response is missing required field 'next-version-round': ${e}`);if(void 0===e["next-version-supported"])throw new Error(`Response is missing required field 'next-version-supported': ${e}`);if(void 0===e["stopped-at-unsupported-round"])throw new Error(`Response is missing required field 'stopped-at-unsupported-round': ${e}`);if(void 0===e["time-since-last-round"])throw new Error(`Response is missing required field 'time-since-last-round': ${e}`);return new Je({catchupTime:e["catchup-time"],lastRound:e["last-round"],lastVersion:e["last-version"],nextVersion:e["next-version"],nextVersionRound:e["next-version-round"],nextVersionSupported:e["next-version-supported"],stoppedAtUnsupportedRound:e["stopped-at-unsupported-round"],timeSinceLastRound:e["time-since-last-round"],catchpoint:e.catchpoint,catchpointAcquiredBlocks:e["catchpoint-acquired-blocks"],catchpointProcessedAccounts:e["catchpoint-processed-accounts"],catchpointProcessedKvs:e["catchpoint-processed-kvs"],catchpointTotalAccounts:e["catchpoint-total-accounts"],catchpointTotalBlocks:e["catchpoint-total-blocks"],catchpointTotalKvs:e["catchpoint-total-kvs"],catchpointVerifiedAccounts:e["catchpoint-verified-accounts"],catchpointVerifiedKvs:e["catchpoint-verified-kvs"],lastCatchpoint:e["last-catchpoint"]})}}class Xe extends ve{constructor({poolError:e,txn:t,applicationIndex:r,assetClosingAmount:n,assetIndex:s,closeRewards:i,closingAmount:o,confirmedRound:a,globalStateDelta:c,innerTxns:u,localStateDelta:l,logs:h,receiverRewards:d,senderRewards:p}){super(),this.poolError=e,this.txn=t,this.applicationIndex=r,this.assetClosingAmount=n,this.assetIndex=s,this.closeRewards=i,this.closingAmount=o,this.confirmedRound=a,this.globalStateDelta=c,this.innerTxns=u,this.localStateDelta=l,this.logs=h,this.receiverRewards=d,this.senderRewards=p,this.attribute_map={poolError:"pool-error",txn:"txn",applicationIndex:"application-index",assetClosingAmount:"asset-closing-amount",assetIndex:"asset-index",closeRewards:"close-rewards",closingAmount:"closing-amount",confirmedRound:"confirmed-round",globalStateDelta:"global-state-delta",innerTxns:"inner-txns",localStateDelta:"local-state-delta",logs:"logs",receiverRewards:"receiver-rewards",senderRewards:"sender-rewards"}}static from_obj_for_encoding(e){if(void 0===e["pool-error"])throw new Error(`Response is missing required field 'pool-error': ${e}`);if(void 0===e.txn)throw new Error(`Response is missing required field 'txn': ${e}`);return new Xe({poolError:e["pool-error"],txn:e.txn,applicationIndex:e["application-index"],assetClosingAmount:e["asset-closing-amount"],assetIndex:e["asset-index"],closeRewards:e["close-rewards"],closingAmount:e["closing-amount"],confirmedRound:e["confirmed-round"],globalStateDelta:void 0!==e["global-state-delta"]?e["global-state-delta"].map(Ge.from_obj_for_encoding):void 0,innerTxns:void 0!==e["inner-txns"]?e["inner-txns"].map(Xe.from_obj_for_encoding):void 0,localStateDelta:void 0!==e["local-state-delta"]?e["local-state-delta"].map(Te.from_obj_for_encoding):void 0,logs:e.logs,receiverRewards:e["receiver-rewards"],senderRewards:e["sender-rewards"]})}}class Ze extends ve{constructor({topTransactions:e,totalTransactions:t}){super(),this.topTransactions=e,this.totalTransactions=t,this.attribute_map={topTransactions:"top-transactions",totalTransactions:"total-transactions"}}static from_obj_for_encoding(e){if(!Array.isArray(e["top-transactions"]))throw new Error(`Response is missing required array field 'top-transactions': ${e}`);if(void 0===e["total-transactions"])throw new Error(`Response is missing required field 'total-transactions': ${e}`);return new Ze({topTransactions:e["top-transactions"],totalTransactions:e["total-transactions"]})}}class Qe extends ve{constructor({txid:e}){super(),this.txid=e,this.attribute_map={txid:"txId"}}static from_obj_for_encoding(e){if(void 0===e.txId)throw new Error(`Response is missing required field 'txId': ${e}`);return new Qe({txid:e.txId})}}class et extends ve{constructor({message:e,stateproof:t}){super(),this.message=e,this.stateproof="string"==typeof t?new Uint8Array(i.lW.from(t,"base64")):t,this.attribute_map={message:"Message",stateproof:"StateProof"}}static from_obj_for_encoding(e){if(void 0===e.Message)throw new Error(`Response is missing required field 'Message': ${e}`);if(void 0===e.StateProof)throw new Error(`Response is missing required field 'StateProof': ${e}`);return new et({message:tt.from_obj_for_encoding(e.Message),stateproof:e.StateProof})}}class tt extends ve{constructor({blockheaderscommitment:e,firstattestedround:t,lastattestedround:r,lnprovenweight:n,voterscommitment:s}){super(),this.blockheaderscommitment="string"==typeof e?new Uint8Array(i.lW.from(e,"base64")):e,this.firstattestedround=t,this.lastattestedround=r,this.lnprovenweight=n,this.voterscommitment="string"==typeof s?new Uint8Array(i.lW.from(s,"base64")):s,this.attribute_map={blockheaderscommitment:"BlockHeadersCommitment",firstattestedround:"FirstAttestedRound",lastattestedround:"LastAttestedRound",lnprovenweight:"LnProvenWeight",voterscommitment:"VotersCommitment"}}static from_obj_for_encoding(e){if(void 0===e.BlockHeadersCommitment)throw new Error(`Response is missing required field 'BlockHeadersCommitment': ${e}`);if(void 0===e.FirstAttestedRound)throw new Error(`Response is missing required field 'FirstAttestedRound': ${e}`);if(void 0===e.LastAttestedRound)throw new Error(`Response is missing required field 'LastAttestedRound': ${e}`);if(void 0===e.LnProvenWeight)throw new Error(`Response is missing required field 'LnProvenWeight': ${e}`);if(void 0===e.VotersCommitment)throw new Error(`Response is missing required field 'VotersCommitment': ${e}`);return new tt({blockheaderscommitment:e.BlockHeadersCommitment,firstattestedround:e.FirstAttestedRound,lastattestedround:e.LastAttestedRound,lnprovenweight:e.LnProvenWeight,voterscommitment:e.VotersCommitment})}}class rt extends ve{constructor({currentRound:e,onlineMoney:t,totalMoney:r}){super(),this.currentRound=e,this.onlineMoney=t,this.totalMoney=r,this.attribute_map={currentRound:"current_round",onlineMoney:"online-money",totalMoney:"total-money"}}static from_obj_for_encoding(e){if(void 0===e.current_round)throw new Error(`Response is missing required field 'current_round': ${e}`);if(void 0===e["online-money"])throw new Error(`Response is missing required field 'online-money': ${e}`);if(void 0===e["total-money"])throw new Error(`Response is missing required field 'total-money': ${e}`);return new rt({currentRound:e.current_round,onlineMoney:e["online-money"],totalMoney:e["total-money"]})}}class nt extends ve{constructor({key:e,value:t}){super(),this.key=e,this.value=t,this.attribute_map={key:"key",value:"value"}}static from_obj_for_encoding(e){if(void 0===e.key)throw new Error(`Response is missing required field 'key': ${e}`);if(void 0===e.value)throw new Error(`Response is missing required field 'value': ${e}`);return new nt({key:e.key,value:st.from_obj_for_encoding(e.value)})}}class st extends ve{constructor({type:e,bytes:t,uint:r}){super(),this.type=e,this.bytes=t,this.uint=r,this.attribute_map={type:"type",bytes:"bytes",uint:"uint"}}static from_obj_for_encoding(e){if(void 0===e.type)throw new Error(`Response is missing required field 'type': ${e}`);if(void 0===e.bytes)throw new Error(`Response is missing required field 'bytes': ${e}`);if(void 0===e.uint)throw new Error(`Response is missing required field 'uint': ${e}`);return new st({type:e.type,bytes:e.bytes,uint:e.uint})}}class it extends ve{constructor({consensusVersion:e,fee:t,genesisHash:r,genesisId:n,lastRound:s,minFee:o}){super(),this.consensusVersion=e,this.fee=t,this.genesisHash="string"==typeof r?new Uint8Array(i.lW.from(r,"base64")):r,this.genesisId=n,this.lastRound=s,this.minFee=o,this.attribute_map={consensusVersion:"consensus-version",fee:"fee",genesisHash:"genesis-hash",genesisId:"genesis-id",lastRound:"last-round",minFee:"min-fee"}}static from_obj_for_encoding(e){if(void 0===e["consensus-version"])throw new Error(`Response is missing required field 'consensus-version': ${e}`);if(void 0===e.fee)throw new Error(`Response is missing required field 'fee': ${e}`);if(void 0===e["genesis-hash"])throw new Error(`Response is missing required field 'genesis-hash': ${e}`);if(void 0===e["genesis-id"])throw new Error(`Response is missing required field 'genesis-id': ${e}`);if(void 0===e["last-round"])throw new Error(`Response is missing required field 'last-round': ${e}`);if(void 0===e["min-fee"])throw new Error(`Response is missing required field 'min-fee': ${e}`);return new it({consensusVersion:e["consensus-version"],fee:e.fee,genesisHash:e["genesis-hash"],genesisId:e["genesis-id"],lastRound:e["last-round"],minFee:e["min-fee"]})}}class ot extends ve{constructor({idx:e,proof:t,stibhash:r,treedepth:n,hashtype:s}){super(),this.idx=e,this.proof="string"==typeof t?new Uint8Array(i.lW.from(t,"base64")):t,this.stibhash="string"==typeof r?new Uint8Array(i.lW.from(r,"base64")):r,this.treedepth=n,this.hashtype=s,this.attribute_map={idx:"idx",proof:"proof",stibhash:"stibhash",treedepth:"treedepth",hashtype:"hashtype"}}static from_obj_for_encoding(e){if(void 0===e.idx)throw new Error(`Response is missing required field 'idx': ${e}`);if(void 0===e.proof)throw new Error(`Response is missing required field 'proof': ${e}`);if(void 0===e.stibhash)throw new Error(`Response is missing required field 'stibhash': ${e}`);if(void 0===e.treedepth)throw new Error(`Response is missing required field 'treedepth': ${e}`);return new ot({idx:e.idx,proof:e.proof,stibhash:e.stibhash,treedepth:e.treedepth,hashtype:e.hashtype})}}class at extends ve{constructor({build:e,genesisHashB64:t,genesisId:r,versions:n}){super(),this.build=e,this.genesisHashB64="string"==typeof t?new Uint8Array(i.lW.from(t,"base64")):t,this.genesisId=r,this.versions=n,this.attribute_map={build:"build",genesisHashB64:"genesis_hash_b64",genesisId:"genesis_id",versions:"versions"}}static from_obj_for_encoding(e){if(void 0===e.build)throw new Error(`Response is missing required field 'build': ${e}`);if(void 0===e.genesis_hash_b64)throw new Error(`Response is missing required field 'genesis_hash_b64': ${e}`);if(void 0===e.genesis_id)throw new Error(`Response is missing required field 'genesis_id': ${e}`);if(!Array.isArray(e.versions))throw new Error(`Response is missing required array field 'versions': ${e}`);return new at({build:Ce.from_obj_for_encoding(e.build),genesisHashB64:e.genesis_hash_b64,genesisId:e.genesis_id,versions:e.versions})}}class ct extends ae{constructor(e,t,r,n){super(e,t),this.index=r,this.index=r;const s=i.lW.from(n).toString("base64");this.query.name=encodeURI(`b64:${s}`)}path(){return`/v2/applications/${this.index}/box`}prepare(e){return De.from_obj_for_encoding(e)}}class ut extends ae{constructor(e,t,r){super(e,t),this.index=r,this.index=r,this.query.max=0}path(){return`/v2/applications/${this.index}/boxes`}max(e){return this.query.max=e,this}prepare(e){return Oe.from_obj_for_encoding(e)}}class lt extends ae{path(){return"/health"}async do(e={}){const t=await this.c.get(this.path(),{},e);if(!t.ok)throw new Error(`Health response: ${t.status}`);return{}}}class ht extends ae{constructor(e,t){super(e),this.txid=t,this.txid=t,this.query.format="msgpack"}prepare(e){if(e&&e.byteLength>0)return F(e)}path(){return`/v2/transactions/pending/${this.txid}`}max(e){return this.query.max=e,this}}class dt extends ae{constructor(e){super(e),this.query.format="msgpack"}path(){return"/v2/transactions/pending"}prepare(e){if(e&&e.byteLength>0)return F(e)}max(e){return this.query.max=e,this}}class pt extends ae{constructor(e,t){super(e),this.address=t,this.address=t,this.query.format="msgpack"}prepare(e){if(e&&e.byteLength>0)return F(e)}path(){return`/v2/accounts/${this.address}/transactions/pending`}max(e){return this.query.max=e,this}}class ft extends ae{constructor(e,t,r,n){super(e,t),this.round=r,this.txID=n,this.round=r,this.txID=n}path(){return`/v2/blocks/${this.round}/transactions/${this.txID}/proof`}hashType(e){return this.query.hashtype=e,this}}function gt(e){return e&&void 0!==e.byteLength}class mt extends ae{constructor(e,t){super(e);let r=t;if(Array.isArray(t)){if(!t.every(gt))throw new TypeError("Array elements must be byte arrays");r=S(...t)}else if(!gt(r))throw new TypeError("Argument must be byte array");this.txnBytesToPost=r}path(){return"/v2/transactions"}async do(e={}){const t=function(e={}){let t=e;return Object.keys(t).every((e=>"content-type"!==e.toLowerCase()))&&(t={...e},t["Content-Type"]="application/x-binary"),t}(e);return(await this.c.post(this.path(),i.lW.from(this.txnBytesToPost),t)).body}}class yt extends ae{path(){return"/v2/status"}}class wt extends ae{constructor(e,t,r){if(super(e,t),this.round=r,!Number.isInteger(r))throw Error("round should be an integer");this.round=r}path(){return`/v2/status/wait-for-block-after/${this.round}`}}class bt extends ae{path(){return"/v2/transactions/params"}prepare(e){return{flatFee:!1,fee:e.fee,firstRound:e["last-round"],lastRound:e["last-round"]+1e3,genesisID:e["genesis-id"],genesisHash:e["genesis-hash"]}}}class vt extends ae{path(){return"/v2/ledger/supply"}}class xt extends ae{path(){return"/versions"}}class At extends ae{constructor(e,t,r){super(e,t),this.round=r,this.round=r}path(){return`/v2/blocks/${this.round}/lightheader/proof`}}class _t extends ae{constructor(e,t,r){super(e,t),this.round=r,this.round=r}path(){return`/v2/stateproofs/${this.round}`}}class Et extends ae{constructor(e,t){super(e),this.source=t,this.source=t}path(){return"/v2/teal/disassemble"}async do(e={}){const t=function(e={}){let t=e;return Object.keys(t).every((e=>"content-type"!==e.toLowerCase()))&&(t={...e},t["Content-Type"]="text/plain"),t}(e);return(await this.c.post(this.path(),i.lW.from(this.source),t,this.query)).body}}class Tt extends oe{constructor(e,t,r,n={}){super("X-Algo-API-Token",e,t,r,n)}healthCheck(){return new lt(this.c)}versionsCheck(){return new xt(this.c)}sendRawTransaction(e){return new mt(this.c,e)}accountInformation(e){return new ce(this.c,this.intDecoding,e)}accountAssetInformation(e,t){return new ue(this.c,this.intDecoding,e,t)}accountApplicationInformation(e,t){return new le(this.c,this.intDecoding,e,t)}block(e){return new he(this.c,e)}getBlockHash(e){return new we(this.c,this.intDecoding,e)}pendingTransactionInformation(e){return new ht(this.c,e)}pendingTransactionsInformation(){return new dt(this.c)}pendingTransactionByAddress(e){return new pt(this.c,e)}status(){return new yt(this.c,this.intDecoding)}statusAfterBlock(e){return new wt(this.c,this.intDecoding,e)}getTransactionParams(){return new bt(this.c)}supply(){return new vt(this.c,this.intDecoding)}compile(e){return new pe(this.c,e)}disassemble(e){return new Et(this.c,e)}dryrun(e){return new fe(this.c,e)}getAssetByID(e){return new me(this.c,this.intDecoding,e)}getApplicationByID(e){return new ye(this.c,this.intDecoding,e)}getApplicationBoxByName(e,t){return new ct(this.c,this.intDecoding,e,t)}getApplicationBoxes(e){return new ut(this.c,this.intDecoding,e)}genesis(){return new ge(this.c,this.intDecoding)}getTransactionProof(e,t){return new ft(this.c,this.intDecoding,e,t)}getLightBlockHeaderProof(e){return new At(this.c,this.intDecoding,e)}getStateProof(e){return new _t(this.c,this.intDecoding,e)}}class St extends oe{constructor(e,t="http://127.0.0.1",r=7833,n={}){super("X-KMD-API-Token",e,t,r,n)}async versions(){return(await this.c.get("/versions")).body}async listWallets(){return(await this.c.get("/v1/wallets")).body}async createWallet(e,t,r=new Uint8Array,n="sqlite"){const s={wallet_name:e,wallet_driver_name:n,wallet_password:t,master_derivation_key:i.lW.from(r).toString("base64")};return(await this.c.post("/v1/wallet",s)).body}async initWalletHandle(e,t){const r={wallet_id:e,wallet_password:t};return(await this.c.post("/v1/wallet/init",r)).body}async releaseWalletHandle(e){const t={wallet_handle_token:e};return(await this.c.post("/v1/wallet/release",t)).body}async renewWalletHandle(e){const t={wallet_handle_token:e};return(await this.c.post("/v1/wallet/renew",t)).body}async renameWallet(e,t,r){const n={wallet_id:e,wallet_password:t,wallet_name:r};return(await this.c.post("/v1/wallet/rename",n)).body}async getWallet(e){const t={wallet_handle_token:e};return(await this.c.post("/v1/wallet/info",t)).body}async exportMasterDerivationKey(e,t){const r={wallet_handle_token:e,wallet_password:t},n=await this.c.post("/v1/master-key/export",r);return{master_derivation_key:i.lW.from(n.body.master_derivation_key,"base64")}}async importKey(e,t){const r={wallet_handle_token:e,private_key:i.lW.from(t).toString("base64")};return(await this.c.post("/v1/key/import",r)).body}async exportKey(e,t,r){const n={wallet_handle_token:e,address:r,wallet_password:t},s=await this.c.post("/v1/key/export",n);return{private_key:i.lW.from(s.body.private_key,"base64")}}async generateKey(e){const t={wallet_handle_token:e,display_mnemonic:!1};return(await this.c.post("/v1/key",t)).body}async deleteKey(e,t,r){const n={wallet_handle_token:e,address:r,wallet_password:t};return(await this.c.delete("/v1/key",n)).body}async listKeys(e){const t={wallet_handle_token:e};return(await this.c.post("/v1/key/list",t)).body}async signTransaction(e,t,r){const n=Y(r),s={wallet_handle_token:e,wallet_password:t,transaction:i.lW.from(n.toByte()).toString("base64")},o=await this.c.post("/v1/transaction/sign",s);return 200===o.status?i.lW.from(o.body.signed_transaction,"base64"):o.body}async signTransactionWithSpecificPublicKey(e,t,r,n){const s=Y(r),o={wallet_handle_token:e,wallet_password:t,transaction:i.lW.from(s.toByte()).toString("base64"),public_key:i.lW.from(n).toString("base64")},a=await this.c.post("/v1/transaction/sign",o);return 200===a.status?i.lW.from(a.body.signed_transaction,"base64"):a.body}async listMultisig(e){const t={wallet_handle_token:e};return(await this.c.post("/v1/multisig/list",t)).body}async importMultisig(e,t,r,n){const s={wallet_handle_token:e,multisig_version:t,threshold:r,pks:n};return(await this.c.post("/v1/multisig/import",s)).body}async exportMultisig(e,t){const r={wallet_handle_token:e,address:t};return(await this.c.post("/v1/multisig/export",r)).body}async signMultisigTransaction(e,t,r,n,s){const o=Y(r),a={wallet_handle_token:e,transaction:i.lW.from(o.toByte()).toString("base64"),public_key:i.lW.from(n).toString("base64"),partial_multisig:s,wallet_password:t};return(await this.c.post("/v1/multisig/sign",a)).body}async deleteMultisig(e,t,r){const n={wallet_handle_token:e,address:r,wallet_password:t};return(await this.c.delete("/v1/multisig",n)).body}}class kt extends ae{path(){return"/health"}}class Rt extends ae{constructor(e,t,r){super(e,t),this.index=r,this.index=r}path(){return`/v2/assets/${this.index}/balances`}limit(e){return this.query.limit=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}includeAll(e=!0){return this.query["include-all"]=e,this}}function It(e){return"string"==typeof e?e:i.lW.from(e).toString("base64")}class Bt extends ae{constructor(e,t,r){super(e,t),this.account=r,this.account=r}path(){return`/v2/accounts/${this.account}/transactions`}notePrefix(e){return this.query["note-prefix"]=It(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}}class Ut extends ae{constructor(e,t,r){super(e,t),this.index=r,this.index=r}path(){return`/v2/assets/${this.index}/transactions`}notePrefix(e){return this.query["note-prefix"]=It(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}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}}class Pt extends ae{constructor(e,t,r){super(e,t),this.round=r,this.round=r}path(){return`/v2/blocks/${this.round}`}headerOnly(e){return this.query["header-only"]=e,this}}class jt extends ae{constructor(e,t,r){super(e,t),this.txID=r,this.txID=r}path(){return`/v2/transactions/${this.txID}`}}class qt extends ae{constructor(e,t,r){super(e,t),this.account=r,this.account=r}path(){return`/v2/accounts/${this.account}`}round(e){return this.query.round=e,this}includeAll(e=!0){return this.query["include-all"]=e,this}exclude(e){return this.query.exclude=e,this}}class Dt extends ae{constructor(e,t,r){super(e,t),this.account=r,this.account=r}path(){return`/v2/accounts/${this.account}/assets`}limit(e){return this.query.limit=e,this}round(e){return this.query.round=e,this}nextToken(e){return this.query.next=e,this}includeAll(e=!0){return this.query["include-all"]=e,this}assetId(e){return this.query["asset-id"]=e,this}}class $t extends ae{constructor(e,t,r){super(e,t),this.account=r,this.account=r}path(){return`/v2/accounts/${this.account}/created-assets`}limit(e){return this.query.limit=e,this}round(e){return this.query.round=e,this}nextToken(e){return this.query.next=e,this}includeAll(e=!0){return this.query["include-all"]=e,this}assetID(e){return this.query["asset-id"]=e,this}}class Ot extends ae{constructor(e,t,r){super(e,t),this.account=r,this.account=r}path(){return`/v2/accounts/${this.account}/apps-local-state`}limit(e){return this.query.limit=e,this}round(e){return this.query.round=e,this}nextToken(e){return this.query.next=e,this}includeAll(e=!0){return this.query["include-all"]=e,this}applicationID(e){return this.query["application-id"]=e,this}}class Ct extends ae{constructor(e,t,r){super(e,t),this.account=r,this.account=r}path(){return`/v2/accounts/${this.account}/created-applications`}limit(e){return this.query.limit=e,this}round(e){return this.query.round=e,this}nextToken(e){return this.query.next=e,this}includeAll(e=!0){return this.query["include-all"]=e,this}applicationID(e){return this.query["application-id"]=e,this}}class Lt extends ae{constructor(e,t,r){super(e,t),this.index=r,this.index=r}path(){return`/v2/assets/${this.index}`}includeAll(e=!0){return this.query["include-all"]=e,this}}class Mt extends ae{constructor(e,t,r){super(e,t),this.index=r,this.index=r}path(){return`/v2/applications/${this.index}`}includeAll(e=!0){return this.query["include-all"]=e,this}}class Nt extends ae{constructor(e,t,r){super(e,t),this.appID=r,this.appID=r}path(){return`/v2/applications/${this.appID}/logs`}limit(e){return this.query.limit=e,this}minRound(e){return this.query["min-round"]=e,this}maxRound(e){return this.query["max-round"]=e,this}nextToken(e){return this.query.next=e,this}sender(e){return this.query["sender-address"]=e,this}txid(e){return this.query.txid=e,this}}class Ft extends ve{constructor({address:e,amount:t,amountWithoutPendingRewards:r,pendingRewards:n,rewards:s,round:i,status:o,totalAppsOptedIn:a,totalAssetsOptedIn:c,totalBoxBytes:u,totalBoxes:l,totalCreatedApps:h,totalCreatedAssets:d,appsLocalState:p,appsTotalExtraPages:f,appsTotalSchema:g,assets:m,authAddr:y,closedAtRound:w,createdApps:b,createdAssets:v,createdAtRound:x,deleted:A,participation:_,rewardBase:E,sigType:T}){super(),this.address=e,this.amount=t,this.amountWithoutPendingRewards=r,this.pendingRewards=n,this.rewards=s,this.round=i,this.status=o,this.totalAppsOptedIn=a,this.totalAssetsOptedIn=c,this.totalBoxBytes=u,this.totalBoxes=l,this.totalCreatedApps=h,this.totalCreatedAssets=d,this.appsLocalState=p,this.appsTotalExtraPages=f,this.appsTotalSchema=g,this.assets=m,this.authAddr=y,this.closedAtRound=w,this.createdApps=b,this.createdAssets=v,this.createdAtRound=x,this.deleted=A,this.participation=_,this.rewardBase=E,this.sigType=T,this.attribute_map={address:"address",amount:"amount",amountWithoutPendingRewards:"amount-without-pending-rewards",pendingRewards:"pending-rewards",rewards:"rewards",round:"round",status:"status",totalAppsOptedIn:"total-apps-opted-in",totalAssetsOptedIn:"total-assets-opted-in",totalBoxBytes:"total-box-bytes",totalBoxes:"total-boxes",totalCreatedApps:"total-created-apps",totalCreatedAssets:"total-created-assets",appsLocalState:"apps-local-state",appsTotalExtraPages:"apps-total-extra-pages",appsTotalSchema:"apps-total-schema",assets:"assets",authAddr:"auth-addr",closedAtRound:"closed-at-round",createdApps:"created-apps",createdAssets:"created-assets",createdAtRound:"created-at-round",deleted:"deleted",participation:"participation",rewardBase:"reward-base",sigType:"sig-type"}}static from_obj_for_encoding(e){if(void 0===e.address)throw new Error(`Response is missing required field 'address': ${e}`);if(void 0===e.amount)throw new Error(`Response is missing required field 'amount': ${e}`);if(void 0===e["amount-without-pending-rewards"])throw new Error(`Response is missing required field 'amount-without-pending-rewards': ${e}`);if(void 0===e["pending-rewards"])throw new Error(`Response is missing required field 'pending-rewards': ${e}`);if(void 0===e.rewards)throw new Error(`Response is missing required field 'rewards': ${e}`);if(void 0===e.round)throw new Error(`Response is missing required field 'round': ${e}`);if(void 0===e.status)throw new Error(`Response is missing required field 'status': ${e}`);if(void 0===e["total-apps-opted-in"])throw new Error(`Response is missing required field 'total-apps-opted-in': ${e}`);if(void 0===e["total-assets-opted-in"])throw new Error(`Response is missing required field 'total-assets-opted-in': ${e}`);if(void 0===e["total-box-bytes"])throw new Error(`Response is missing required field 'total-box-bytes': ${e}`);if(void 0===e["total-boxes"])throw new Error(`Response is missing required field 'total-boxes': ${e}`);if(void 0===e["total-created-apps"])throw new Error(`Response is missing required field 'total-created-apps': ${e}`);if(void 0===e["total-created-assets"])throw new Error(`Response is missing required field 'total-created-assets': ${e}`);return new Ft({address:e.address,amount:e.amount,amountWithoutPendingRewards:e["amount-without-pending-rewards"],pendingRewards:e["pending-rewards"],rewards:e.rewards,round:e.round,status:e.status,totalAppsOptedIn:e["total-apps-opted-in"],totalAssetsOptedIn:e["total-assets-opted-in"],totalBoxBytes:e["total-box-bytes"],totalBoxes:e["total-boxes"],totalCreatedApps:e["total-created-apps"],totalCreatedAssets:e["total-created-assets"],appsLocalState:void 0!==e["apps-local-state"]?e["apps-local-state"].map(Gt.from_obj_for_encoding):void 0,appsTotalExtraPages:e["apps-total-extra-pages"],appsTotalSchema:void 0!==e["apps-total-schema"]?er.from_obj_for_encoding(e["apps-total-schema"]):void 0,assets:void 0!==e.assets?e.assets.map(sr.from_obj_for_encoding):void 0,authAddr:e["auth-addr"],closedAtRound:e["closed-at-round"],createdApps:void 0!==e["created-apps"]?e["created-apps"].map(Ht.from_obj_for_encoding):void 0,createdAssets:void 0!==e["created-assets"]?e["created-assets"].map(rr.from_obj_for_encoding):void 0,createdAtRound:e["created-at-round"],deleted:e.deleted,participation:void 0!==e.participation?Kt.from_obj_for_encoding(e.participation):void 0,rewardBase:e["reward-base"],sigType:e["sig-type"]})}}class Kt extends ve{constructor({selectionParticipationKey:e,voteFirstValid:t,voteKeyDilution:r,voteLastValid:n,voteParticipationKey:s,stateProofKey:o}){super(),this.selectionParticipationKey="string"==typeof e?new Uint8Array(i.lW.from(e,"base64")):e,this.voteFirstValid=t,this.voteKeyDilution=r,this.voteLastValid=n,this.voteParticipationKey="string"==typeof s?new Uint8Array(i.lW.from(s,"base64")):s,this.stateProofKey="string"==typeof o?new Uint8Array(i.lW.from(o,"base64")):o,this.attribute_map={selectionParticipationKey:"selection-participation-key",voteFirstValid:"vote-first-valid",voteKeyDilution:"vote-key-dilution",voteLastValid:"vote-last-valid",voteParticipationKey:"vote-participation-key",stateProofKey:"state-proof-key"}}static from_obj_for_encoding(e){if(void 0===e["selection-participation-key"])throw new Error(`Response is missing required field 'selection-participation-key': ${e}`);if(void 0===e["vote-first-valid"])throw new Error(`Response is missing required field 'vote-first-valid': ${e}`);if(void 0===e["vote-key-dilution"])throw new Error(`Response is missing required field 'vote-key-dilution': ${e}`);if(void 0===e["vote-last-valid"])throw new Error(`Response is missing required field 'vote-last-valid': ${e}`);if(void 0===e["vote-participation-key"])throw new Error(`Response is missing required field 'vote-participation-key': ${e}`);return new Kt({selectionParticipationKey:e["selection-participation-key"],voteFirstValid:e["vote-first-valid"],voteKeyDilution:e["vote-key-dilution"],voteLastValid:e["vote-last-valid"],voteParticipationKey:e["vote-participation-key"],stateProofKey:e["state-proof-key"]})}}class Wt extends ve{constructor({account:e,currentRound:t}){super(),this.account=e,this.currentRound=t,this.attribute_map={account:"account",currentRound:"current-round"}}static from_obj_for_encoding(e){if(void 0===e.account)throw new Error(`Response is missing required field 'account': ${e}`);if(void 0===e["current-round"])throw new Error(`Response is missing required field 'current-round': ${e}`);return new Wt({account:Ft.from_obj_for_encoding(e.account),currentRound:e["current-round"]})}}class zt extends ve{constructor({address:e,delta:t}){super(),this.address=e,this.delta=t,this.attribute_map={address:"address",delta:"delta"}}static from_obj_for_encoding(e){if(void 0===e.address)throw new Error(`Response is missing required field 'address': ${e}`);if(!Array.isArray(e.delta))throw new Error(`Response is missing required array field 'delta': ${e}`);return new zt({address:e.address,delta:e.delta.map(wr.from_obj_for_encoding)})}}class Vt extends ve{constructor({accounts:e,currentRound:t,nextToken:r}){super(),this.accounts=e,this.currentRound=t,this.nextToken=r,this.attribute_map={accounts:"accounts",currentRound:"current-round",nextToken:"next-token"}}static from_obj_for_encoding(e){if(!Array.isArray(e.accounts))throw new Error(`Response is missing required array field 'accounts': ${e}`);if(void 0===e["current-round"])throw new Error(`Response is missing required field 'current-round': ${e}`);return new Vt({accounts:e.accounts.map(Ft.from_obj_for_encoding),currentRound:e["current-round"],nextToken:e["next-token"]})}}class Ht extends ve{constructor({id:e,params:t,createdAtRound:r,deleted:n,deletedAtRound:s}){super(),this.id=e,this.params=t,this.createdAtRound=r,this.deleted=n,this.deletedAtRound=s,this.attribute_map={id:"id",params:"params",createdAtRound:"created-at-round",deleted:"deleted",deletedAtRound:"deleted-at-round"}}static from_obj_for_encoding(e){if(void 0===e.id)throw new Error(`Response is missing required field 'id': ${e}`);if(void 0===e.params)throw new Error(`Response is missing required field 'params': ${e}`);return new Ht({id:e.id,params:Zt.from_obj_for_encoding(e.params),createdAtRound:e["created-at-round"],deleted:e.deleted,deletedAtRound:e["deleted-at-round"]})}}class Gt extends ve{constructor({id:e,schema:t,closedOutAtRound:r,deleted:n,keyValue:s,optedInAtRound:i}){super(),this.id=e,this.schema=t,this.closedOutAtRound=r,this.deleted=n,this.keyValue=s,this.optedInAtRound=i,this.attribute_map={id:"id",schema:"schema",closedOutAtRound:"closed-out-at-round",deleted:"deleted",keyValue:"key-value",optedInAtRound:"opted-in-at-round"}}static from_obj_for_encoding(e){if(void 0===e.id)throw new Error(`Response is missing required field 'id': ${e}`);if(void 0===e.schema)throw new Error(`Response is missing required field 'schema': ${e}`);return new Gt({id:e.id,schema:er.from_obj_for_encoding(e.schema),closedOutAtRound:e["closed-out-at-round"],deleted:e.deleted,keyValue:void 0!==e["key-value"]?e["key-value"].map(jr.from_obj_for_encoding):void 0,optedInAtRound:e["opted-in-at-round"]})}}class Yt extends ve{constructor({appsLocalStates:e,currentRound:t,nextToken:r}){super(),this.appsLocalStates=e,this.currentRound=t,this.nextToken=r,this.attribute_map={appsLocalStates:"apps-local-states",currentRound:"current-round",nextToken:"next-token"}}static from_obj_for_encoding(e){if(!Array.isArray(e["apps-local-states"]))throw new Error(`Response is missing required array field 'apps-local-states': ${e}`);if(void 0===e["current-round"])throw new Error(`Response is missing required field 'current-round': ${e}`);return new Yt({appsLocalStates:e["apps-local-states"].map(Gt.from_obj_for_encoding),currentRound:e["current-round"],nextToken:e["next-token"]})}}class Jt extends ve{constructor({logs:e,txid:t}){super(),this.logs=e,this.txid=t,this.attribute_map={logs:"logs",txid:"txid"}}static from_obj_for_encoding(e){if(!Array.isArray(e.logs))throw new Error(`Response is missing required array field 'logs': ${e}`);if(void 0===e.txid)throw new Error(`Response is missing required field 'txid': ${e}`);return new Jt({logs:e.logs,txid:e.txid})}}class Xt extends ve{constructor({applicationId:e,currentRound:t,logData:r,nextToken:n}){super(),this.applicationId=e,this.currentRound=t,this.logData=r,this.nextToken=n,this.attribute_map={applicationId:"application-id",currentRound:"current-round",logData:"log-data",nextToken:"next-token"}}static from_obj_for_encoding(e){if(void 0===e["application-id"])throw new Error(`Response is missing required field 'application-id': ${e}`);if(void 0===e["current-round"])throw new Error(`Response is missing required field 'current-round': ${e}`);return new Xt({applicationId:e["application-id"],currentRound:e["current-round"],logData:void 0!==e["log-data"]?e["log-data"].map(Jt.from_obj_for_encoding):void 0,nextToken:e["next-token"]})}}class Zt extends ve{constructor({approvalProgram:e,clearStateProgram:t,creator:r,extraProgramPages:n,globalState:s,globalStateSchema:o,localStateSchema:a}){super(),this.approvalProgram="string"==typeof e?new Uint8Array(i.lW.from(e,"base64")):e,this.clearStateProgram="string"==typeof t?new Uint8Array(i.lW.from(t,"base64")):t,this.creator=r,this.extraProgramPages=n,this.globalState=s,this.globalStateSchema=o,this.localStateSchema=a,this.attribute_map={approvalProgram:"approval-program",clearStateProgram:"clear-state-program",creator:"creator",extraProgramPages:"extra-program-pages",globalState:"global-state",globalStateSchema:"global-state-schema",localStateSchema:"local-state-schema"}}static from_obj_for_encoding(e){if(void 0===e["approval-program"])throw new Error(`Response is missing required field 'approval-program': ${e}`);if(void 0===e["clear-state-program"])throw new Error(`Response is missing required field 'clear-state-program': ${e}`);return new Zt({approvalProgram:e["approval-program"],clearStateProgram:e["clear-state-program"],creator:e.creator,extraProgramPages:e["extra-program-pages"],globalState:void 0!==e["global-state"]?e["global-state"].map(jr.from_obj_for_encoding):void 0,globalStateSchema:void 0!==e["global-state-schema"]?er.from_obj_for_encoding(e["global-state-schema"]):void 0,localStateSchema:void 0!==e["local-state-schema"]?er.from_obj_for_encoding(e["local-state-schema"]):void 0})}}class Qt extends ve{constructor({currentRound:e,application:t}){super(),this.currentRound=e,this.application=t,this.attribute_map={currentRound:"current-round",application:"application"}}static from_obj_for_encoding(e){if(void 0===e["current-round"])throw new Error(`Response is missing required field 'current-round': ${e}`);return new Qt({currentRound:e["current-round"],application:void 0!==e.application?Ht.from_obj_for_encoding(e.application):void 0})}}class er extends ve{constructor({numByteSlice:e,numUint:t}){super(),this.numByteSlice=e,this.numUint=t,this.attribute_map={numByteSlice:"num-byte-slice",numUint:"num-uint"}}static from_obj_for_encoding(e){if(void 0===e["num-byte-slice"])throw new Error(`Response is missing required field 'num-byte-slice': ${e}`);if(void 0===e["num-uint"])throw new Error(`Response is missing required field 'num-uint': ${e}`);return new er({numByteSlice:e["num-byte-slice"],numUint:e["num-uint"]})}}class tr extends ve{constructor({applications:e,currentRound:t,nextToken:r}){super(),this.applications=e,this.currentRound=t,this.nextToken=r,this.attribute_map={applications:"applications",currentRound:"current-round",nextToken:"next-token"}}static from_obj_for_encoding(e){if(!Array.isArray(e.applications))throw new Error(`Response is missing required array field 'applications': ${e}`);if(void 0===e["current-round"])throw new Error(`Response is missing required field 'current-round': ${e}`);return new tr({applications:e.applications.map(Ht.from_obj_for_encoding),currentRound:e["current-round"],nextToken:e["next-token"]})}}class rr extends ve{constructor({index:e,params:t,createdAtRound:r,deleted:n,destroyedAtRound:s}){super(),this.index=e,this.params=t,this.createdAtRound=r,this.deleted=n,this.destroyedAtRound=s,this.attribute_map={index:"index",params:"params",createdAtRound:"created-at-round",deleted:"deleted",destroyedAtRound:"destroyed-at-round"}}static from_obj_for_encoding(e){if(void 0===e.index)throw new Error(`Response is missing required field 'index': ${e}`);if(void 0===e.params)throw new Error(`Response is missing required field 'params': ${e}`);return new rr({index:e.index,params:or.from_obj_for_encoding(e.params),createdAtRound:e["created-at-round"],deleted:e.deleted,destroyedAtRound:e["destroyed-at-round"]})}}class nr extends ve{constructor({balances:e,currentRound:t,nextToken:r}){super(),this.balances=e,this.currentRound=t,this.nextToken=r,this.attribute_map={balances:"balances",currentRound:"current-round",nextToken:"next-token"}}static from_obj_for_encoding(e){if(!Array.isArray(e.balances))throw new Error(`Response is missing required array field 'balances': ${e}`);if(void 0===e["current-round"])throw new Error(`Response is missing required field 'current-round': ${e}`);return new nr({balances:e.balances.map(_r.from_obj_for_encoding),currentRound:e["current-round"],nextToken:e["next-token"]})}}class sr extends ve{constructor({amount:e,assetId:t,isFrozen:r,deleted:n,optedInAtRound:s,optedOutAtRound:i}){super(),this.amount=e,this.assetId=t,this.isFrozen=r,this.deleted=n,this.optedInAtRound=s,this.optedOutAtRound=i,this.attribute_map={amount:"amount",assetId:"asset-id",isFrozen:"is-frozen",deleted:"deleted",optedInAtRound:"opted-in-at-round",optedOutAtRound:"opted-out-at-round"}}static from_obj_for_encoding(e){if(void 0===e.amount)throw new Error(`Response is missing required field 'amount': ${e}`);if(void 0===e["asset-id"])throw new Error(`Response is missing required field 'asset-id': ${e}`);if(void 0===e["is-frozen"])throw new Error(`Response is missing required field 'is-frozen': ${e}`);return new sr({amount:e.amount,assetId:e["asset-id"],isFrozen:e["is-frozen"],deleted:e.deleted,optedInAtRound:e["opted-in-at-round"],optedOutAtRound:e["opted-out-at-round"]})}}class ir extends ve{constructor({assets:e,currentRound:t,nextToken:r}){super(),this.assets=e,this.currentRound=t,this.nextToken=r,this.attribute_map={assets:"assets",currentRound:"current-round",nextToken:"next-token"}}static from_obj_for_encoding(e){if(!Array.isArray(e.assets))throw new Error(`Response is missing required array field 'assets': ${e}`);if(void 0===e["current-round"])throw new Error(`Response is missing required field 'current-round': ${e}`);return new ir({assets:e.assets.map(sr.from_obj_for_encoding),currentRound:e["current-round"],nextToken:e["next-token"]})}}class or extends ve{constructor({creator:e,decimals:t,total:r,clawback:n,defaultFrozen:s,freeze:o,manager:a,metadataHash:c,name:u,nameB64:l,reserve:h,unitName:d,unitNameB64:p,url:f,urlB64:g}){super(),this.creator=e,this.decimals=t,this.total=r,this.clawback=n,this.defaultFrozen=s,this.freeze=o,this.manager=a,this.metadataHash="string"==typeof c?new Uint8Array(i.lW.from(c,"base64")):c,this.name=u,this.nameB64="string"==typeof l?new Uint8Array(i.lW.from(l,"base64")):l,this.reserve=h,this.unitName=d,this.unitNameB64="string"==typeof p?new Uint8Array(i.lW.from(p,"base64")):p,this.url=f,this.urlB64="string"==typeof g?new Uint8Array(i.lW.from(g,"base64")):g,this.attribute_map={creator:"creator",decimals:"decimals",total:"total",clawback:"clawback",defaultFrozen:"default-frozen",freeze:"freeze",manager:"manager",metadataHash:"metadata-hash",name:"name",nameB64:"name-b64",reserve:"reserve",unitName:"unit-name",unitNameB64:"unit-name-b64",url:"url",urlB64:"url-b64"}}static from_obj_for_encoding(e){if(void 0===e.creator)throw new Error(`Response is missing required field 'creator': ${e}`);if(void 0===e.decimals)throw new Error(`Response is missing required field 'decimals': ${e}`);if(void 0===e.total)throw new Error(`Response is missing required field 'total': ${e}`);return new or({creator:e.creator,decimals:e.decimals,total:e.total,clawback:e.clawback,defaultFrozen:e["default-frozen"],freeze:e.freeze,manager:e.manager,metadataHash:e["metadata-hash"],name:e.name,nameB64:e["name-b64"],reserve:e.reserve,unitName:e["unit-name"],unitNameB64:e["unit-name-b64"],url:e.url,urlB64:e["url-b64"]})}}class ar extends ve{constructor({asset:e,currentRound:t}){super(),this.asset=e,this.currentRound=t,this.attribute_map={asset:"asset",currentRound:"current-round"}}static from_obj_for_encoding(e){if(void 0===e.asset)throw new Error(`Response is missing required field 'asset': ${e}`);if(void 0===e["current-round"])throw new Error(`Response is missing required field 'current-round': ${e}`);return new ar({asset:rr.from_obj_for_encoding(e.asset),currentRound:e["current-round"]})}}class cr extends ve{constructor({assets:e,currentRound:t,nextToken:r}){super(),this.assets=e,this.currentRound=t,this.nextToken=r,this.attribute_map={assets:"assets",currentRound:"current-round",nextToken:"next-token"}}static from_obj_for_encoding(e){if(!Array.isArray(e.assets))throw new Error(`Response is missing required array field 'assets': ${e}`);if(void 0===e["current-round"])throw new Error(`Response is missing required field 'current-round': ${e}`);return new cr({assets:e.assets.map(rr.from_obj_for_encoding),currentRound:e["current-round"],nextToken:e["next-token"]})}}class ur extends ve{constructor({genesisHash:e,genesisId:t,previousBlockHash:r,round:n,seed:s,timestamp:o,transactionsRoot:a,transactionsRootSha256:c,participationUpdates:u,rewards:l,stateProofTracking:h,transactions:d,txnCounter:p,upgradeState:f,upgradeVote:g}){super(),this.genesisHash="string"==typeof e?new Uint8Array(i.lW.from(e,"base64")):e,this.genesisId=t,this.previousBlockHash="string"==typeof r?new Uint8Array(i.lW.from(r,"base64")):r,this.round=n,this.seed="string"==typeof s?new Uint8Array(i.lW.from(s,"base64")):s,this.timestamp=o,this.transactionsRoot="string"==typeof a?new Uint8Array(i.lW.from(a,"base64")):a,this.transactionsRootSha256="string"==typeof c?new Uint8Array(i.lW.from(c,"base64")):c,this.participationUpdates=u,this.rewards=l,this.stateProofTracking=h,this.transactions=d,this.txnCounter=p,this.upgradeState=f,this.upgradeVote=g,this.attribute_map={genesisHash:"genesis-hash",genesisId:"genesis-id",previousBlockHash:"previous-block-hash",round:"round",seed:"seed",timestamp:"timestamp",transactionsRoot:"transactions-root",transactionsRootSha256:"transactions-root-sha256",participationUpdates:"participation-updates",rewards:"rewards",stateProofTracking:"state-proof-tracking",transactions:"transactions",txnCounter:"txn-counter",upgradeState:"upgrade-state",upgradeVote:"upgrade-vote"}}static from_obj_for_encoding(e){if(void 0===e["genesis-hash"])throw new Error(`Response is missing required field 'genesis-hash': ${e}`);if(void 0===e["genesis-id"])throw new Error(`Response is missing required field 'genesis-id': ${e}`);if(void 0===e["previous-block-hash"])throw new Error(`Response is missing required field 'previous-block-hash': ${e}`);if(void 0===e.round)throw new Error(`Response is missing required field 'round': ${e}`);if(void 0===e.seed)throw new Error(`Response is missing required field 'seed': ${e}`);if(void 0===e.timestamp)throw new Error(`Response is missing required field 'timestamp': ${e}`);if(void 0===e["transactions-root"])throw new Error(`Response is missing required field 'transactions-root': ${e}`);if(void 0===e["transactions-root-sha256"])throw new Error(`Response is missing required field 'transactions-root-sha256': ${e}`);return new ur({genesisHash:e["genesis-hash"],genesisId:e["genesis-id"],previousBlockHash:e["previous-block-hash"],round:e.round,seed:e.seed,timestamp:e.timestamp,transactionsRoot:e["transactions-root"],transactionsRootSha256:e["transactions-root-sha256"],participationUpdates:void 0!==e["participation-updates"]?Er.from_obj_for_encoding(e["participation-updates"]):void 0,rewards:void 0!==e.rewards?lr.from_obj_for_encoding(e.rewards):void 0,stateProofTracking:void 0!==e["state-proof-tracking"]?e["state-proof-tracking"].map(Br.from_obj_for_encoding):void 0,transactions:void 0!==e.transactions?e.transactions.map(Dr.from_obj_for_encoding):void 0,txnCounter:e["txn-counter"],upgradeState:void 0!==e["upgrade-state"]?hr.from_obj_for_encoding(e["upgrade-state"]):void 0,upgradeVote:void 0!==e["upgrade-vote"]?dr.from_obj_for_encoding(e["upgrade-vote"]):void 0})}}class lr extends ve{constructor({feeSink:e,rewardsCalculationRound:t,rewardsLevel:r,rewardsPool:n,rewardsRate:s,rewardsResidue:i}){super(),this.feeSink=e,this.rewardsCalculationRound=t,this.rewardsLevel=r,this.rewardsPool=n,this.rewardsRate=s,this.rewardsResidue=i,this.attribute_map={feeSink:"fee-sink",rewardsCalculationRound:"rewards-calculation-round",rewardsLevel:"rewards-level",rewardsPool:"rewards-pool",rewardsRate:"rewards-rate",rewardsResidue:"rewards-residue"}}static from_obj_for_encoding(e){if(void 0===e["fee-sink"])throw new Error(`Response is missing required field 'fee-sink': ${e}`);if(void 0===e["rewards-calculation-round"])throw new Error(`Response is missing required field 'rewards-calculation-round': ${e}`);if(void 0===e["rewards-level"])throw new Error(`Response is missing required field 'rewards-level': ${e}`);if(void 0===e["rewards-pool"])throw new Error(`Response is missing required field 'rewards-pool': ${e}`);if(void 0===e["rewards-rate"])throw new Error(`Response is missing required field 'rewards-rate': ${e}`);if(void 0===e["rewards-residue"])throw new Error(`Response is missing required field 'rewards-residue': ${e}`);return new lr({feeSink:e["fee-sink"],rewardsCalculationRound:e["rewards-calculation-round"],rewardsLevel:e["rewards-level"],rewardsPool:e["rewards-pool"],rewardsRate:e["rewards-rate"],rewardsResidue:e["rewards-residue"]})}}class hr extends ve{constructor({currentProtocol:e,nextProtocol:t,nextProtocolApprovals:r,nextProtocolSwitchOn:n,nextProtocolVoteBefore:s}){super(),this.currentProtocol=e,this.nextProtocol=t,this.nextProtocolApprovals=r,this.nextProtocolSwitchOn=n,this.nextProtocolVoteBefore=s,this.attribute_map={currentProtocol:"current-protocol",nextProtocol:"next-protocol",nextProtocolApprovals:"next-protocol-approvals",nextProtocolSwitchOn:"next-protocol-switch-on",nextProtocolVoteBefore:"next-protocol-vote-before"}}static from_obj_for_encoding(e){if(void 0===e["current-protocol"])throw new Error(`Response is missing required field 'current-protocol': ${e}`);return new hr({currentProtocol:e["current-protocol"],nextProtocol:e["next-protocol"],nextProtocolApprovals:e["next-protocol-approvals"],nextProtocolSwitchOn:e["next-protocol-switch-on"],nextProtocolVoteBefore:e["next-protocol-vote-before"]})}}class dr extends ve{constructor({upgradeApprove:e,upgradeDelay:t,upgradePropose:r}){super(),this.upgradeApprove=e,this.upgradeDelay=t,this.upgradePropose=r,this.attribute_map={upgradeApprove:"upgrade-approve",upgradeDelay:"upgrade-delay",upgradePropose:"upgrade-propose"}}static from_obj_for_encoding(e){return new dr({upgradeApprove:e["upgrade-approve"],upgradeDelay:e["upgrade-delay"],upgradePropose:e["upgrade-propose"]})}}class pr extends ve{constructor({name:e,value:t}){super(),this.name="string"==typeof e?new Uint8Array(i.lW.from(e,"base64")):e,this.value="string"==typeof t?new Uint8Array(i.lW.from(t,"base64")):t,this.attribute_map={name:"name",value:"value"}}static from_obj_for_encoding(e){if(void 0===e.name)throw new Error(`Response is missing required field 'name': ${e}`);if(void 0===e.value)throw new Error(`Response is missing required field 'value': ${e}`);return new pr({name:e.name,value:e.value})}}class fr extends ve{constructor({name:e}){super(),this.name="string"==typeof e?new Uint8Array(i.lW.from(e,"base64")):e,this.attribute_map={name:"name"}}static from_obj_for_encoding(e){if(void 0===e.name)throw new Error(`Response is missing required field 'name': ${e}`);return new fr({name:e.name})}}class gr extends ve{constructor({applicationId:e,boxes:t,nextToken:r}){super(),this.applicationId=e,this.boxes=t,this.nextToken=r,this.attribute_map={applicationId:"application-id",boxes:"boxes",nextToken:"next-token"}}static from_obj_for_encoding(e){if(void 0===e["application-id"])throw new Error(`Response is missing required field 'application-id': ${e}`);if(!Array.isArray(e.boxes))throw new Error(`Response is missing required array field 'boxes': ${e}`);return new gr({applicationId:e["application-id"],boxes:e.boxes.map(fr.from_obj_for_encoding),nextToken:e["next-token"]})}}class mr extends ve{constructor({message:e,data:t}){super(),this.message=e,this.data=t,this.attribute_map={message:"message",data:"data"}}static from_obj_for_encoding(e){if(void 0===e.message)throw new Error(`Response is missing required field 'message': ${e}`);return new mr({message:e.message,data:e.data})}}class yr extends ve{constructor({action:e,bytes:t,uint:r}){super(),this.action=e,this.bytes=t,this.uint=r,this.attribute_map={action:"action",bytes:"bytes",uint:"uint"}}static from_obj_for_encoding(e){if(void 0===e.action)throw new Error(`Response is missing required field 'action': ${e}`);return new yr({action:e.action,bytes:e.bytes,uint:e.uint})}}class wr extends ve{constructor({key:e,value:t}){super(),this.key=e,this.value=t,this.attribute_map={key:"key",value:"value"}}static from_obj_for_encoding(e){if(void 0===e.key)throw new Error(`Response is missing required field 'key': ${e}`);if(void 0===e.value)throw new Error(`Response is missing required field 'value': ${e}`);return new wr({key:e.key,value:yr.from_obj_for_encoding(e.value)})}}class br extends ve{constructor({hashType:e}){super(),this.hashType=e,this.attribute_map={hashType:"hash-type"}}static from_obj_for_encoding(e){return new br({hashType:e["hash-type"]})}}class vr extends ve{constructor({dbAvailable:e,isMigrating:t,message:r,round:n,version:s,data:i,errors:o}){super(),this.dbAvailable=e,this.isMigrating=t,this.message=r,this.round=n,this.version=s,this.data=i,this.errors=o,this.attribute_map={dbAvailable:"db-available",isMigrating:"is-migrating",message:"message",round:"round",version:"version",data:"data",errors:"errors"}}static from_obj_for_encoding(e){if(void 0===e["db-available"])throw new Error(`Response is missing required field 'db-available': ${e}`);if(void 0===e["is-migrating"])throw new Error(`Response is missing required field 'is-migrating': ${e}`);if(void 0===e.message)throw new Error(`Response is missing required field 'message': ${e}`);if(void 0===e.round)throw new Error(`Response is missing required field 'round': ${e}`);if(void 0===e.version)throw new Error(`Response is missing required field 'version': ${e}`);return new vr({dbAvailable:e["db-available"],isMigrating:e["is-migrating"],message:e.message,round:e.round,version:e.version,data:e.data,errors:e.errors})}}class xr extends ve{constructor({blockHeadersCommitment:e,firstAttestedRound:t,latestAttestedRound:r,lnProvenWeight:n,votersCommitment:s}){super(),this.blockHeadersCommitment="string"==typeof e?new Uint8Array(i.lW.from(e,"base64")):e,this.firstAttestedRound=t,this.latestAttestedRound=r,this.lnProvenWeight=n,this.votersCommitment="string"==typeof s?new Uint8Array(i.lW.from(s,"base64")):s,this.attribute_map={blockHeadersCommitment:"block-headers-commitment",firstAttestedRound:"first-attested-round",latestAttestedRound:"latest-attested-round",lnProvenWeight:"ln-proven-weight",votersCommitment:"voters-commitment"}}static from_obj_for_encoding(e){return new xr({blockHeadersCommitment:e["block-headers-commitment"],firstAttestedRound:e["first-attested-round"],latestAttestedRound:e["latest-attested-round"],lnProvenWeight:e["ln-proven-weight"],votersCommitment:e["voters-commitment"]})}}class Ar extends ve{constructor({hashFactory:e,path:t,treeDepth:r}){super(),this.hashFactory=e,this.path=t,this.treeDepth=r,this.attribute_map={hashFactory:"hash-factory",path:"path",treeDepth:"tree-depth"}}static from_obj_for_encoding(e){return new Ar({hashFactory:void 0!==e["hash-factory"]?br.from_obj_for_encoding(e["hash-factory"]):void 0,path:e.path,treeDepth:e["tree-depth"]})}}class _r extends ve{constructor({address:e,amount:t,isFrozen:r,deleted:n,optedInAtRound:s,optedOutAtRound:i}){super(),this.address=e,this.amount=t,this.isFrozen=r,this.deleted=n,this.optedInAtRound=s,this.optedOutAtRound=i,this.attribute_map={address:"address",amount:"amount",isFrozen:"is-frozen",deleted:"deleted",optedInAtRound:"opted-in-at-round",optedOutAtRound:"opted-out-at-round"}}static from_obj_for_encoding(e){if(void 0===e.address)throw new Error(`Response is missing required field 'address': ${e}`);if(void 0===e.amount)throw new Error(`Response is missing required field 'amount': ${e}`);if(void 0===e["is-frozen"])throw new Error(`Response is missing required field 'is-frozen': ${e}`);return new _r({address:e.address,amount:e.amount,isFrozen:e["is-frozen"],deleted:e.deleted,optedInAtRound:e["opted-in-at-round"],optedOutAtRound:e["opted-out-at-round"]})}}class Er extends ve{constructor({expiredParticipationAccounts:e}){super(),this.expiredParticipationAccounts=e,this.attribute_map={expiredParticipationAccounts:"expired-participation-accounts"}}static from_obj_for_encoding(e){return new Er({expiredParticipationAccounts:e["expired-participation-accounts"]})}}class Tr extends ve{constructor({partProofs:e,positionsToReveal:t,reveals:r,saltVersion:n,sigCommit:s,sigProofs:o,signedWeight:a}){super(),this.partProofs=e,this.positionsToReveal=t,this.reveals=r,this.saltVersion=n,this.sigCommit="string"==typeof s?new Uint8Array(i.lW.from(s,"base64")):s,this.sigProofs=o,this.signedWeight=a,this.attribute_map={partProofs:"part-proofs",positionsToReveal:"positions-to-reveal",reveals:"reveals",saltVersion:"salt-version",sigCommit:"sig-commit",sigProofs:"sig-proofs",signedWeight:"signed-weight"}}static from_obj_for_encoding(e){return new Tr({partProofs:void 0!==e["part-proofs"]?Ar.from_obj_for_encoding(e["part-proofs"]):void 0,positionsToReveal:e["positions-to-reveal"],reveals:void 0!==e.reveals?e.reveals.map(kr.from_obj_for_encoding):void 0,saltVersion:e["salt-version"],sigCommit:e["sig-commit"],sigProofs:void 0!==e["sig-proofs"]?Ar.from_obj_for_encoding(e["sig-proofs"]):void 0,signedWeight:e["signed-weight"]})}}class Sr extends ve{constructor({verifier:e,weight:t}){super(),this.verifier=e,this.weight=t,this.attribute_map={verifier:"verifier",weight:"weight"}}static from_obj_for_encoding(e){return new Sr({verifier:void 0!==e.verifier?Ur.from_obj_for_encoding(e.verifier):void 0,weight:e.weight})}}class kr extends ve{constructor({participant:e,position:t,sigSlot:r}){super(),this.participant=e,this.position=t,this.sigSlot=r,this.attribute_map={participant:"participant",position:"position",sigSlot:"sig-slot"}}static from_obj_for_encoding(e){return new kr({participant:void 0!==e.participant?Sr.from_obj_for_encoding(e.participant):void 0,position:e.position,sigSlot:void 0!==e["sig-slot"]?Rr.from_obj_for_encoding(e["sig-slot"]):void 0})}}class Rr extends ve{constructor({lowerSigWeight:e,signature:t}){super(),this.lowerSigWeight=e,this.signature=t,this.attribute_map={lowerSigWeight:"lower-sig-weight",signature:"signature"}}static from_obj_for_encoding(e){return new Rr({lowerSigWeight:e["lower-sig-weight"],signature:void 0!==e.signature?Ir.from_obj_for_encoding(e.signature):void 0})}}class Ir extends ve{constructor({falconSignature:e,merkleArrayIndex:t,proof:r,verifyingKey:n}){super(),this.falconSignature="string"==typeof e?new Uint8Array(i.lW.from(e,"base64")):e,this.merkleArrayIndex=t,this.proof=r,this.verifyingKey="string"==typeof n?new Uint8Array(i.lW.from(n,"base64")):n,this.attribute_map={falconSignature:"falcon-signature",merkleArrayIndex:"merkle-array-index",proof:"proof",verifyingKey:"verifying-key"}}static from_obj_for_encoding(e){return new Ir({falconSignature:e["falcon-signature"],merkleArrayIndex:e["merkle-array-index"],proof:void 0!==e.proof?Ar.from_obj_for_encoding(e.proof):void 0,verifyingKey:e["verifying-key"]})}}class Br extends ve{constructor({nextRound:e,onlineTotalWeight:t,type:r,votersCommitment:n}){super(),this.nextRound=e,this.onlineTotalWeight=t,this.type=r,this.votersCommitment="string"==typeof n?new Uint8Array(i.lW.from(n,"base64")):n,this.attribute_map={nextRound:"next-round",onlineTotalWeight:"online-total-weight",type:"type",votersCommitment:"voters-commitment"}}static from_obj_for_encoding(e){return new Br({nextRound:e["next-round"],onlineTotalWeight:e["online-total-weight"],type:e.type,votersCommitment:e["voters-commitment"]})}}class Ur extends ve{constructor({commitment:e,keyLifetime:t}){super(),this.commitment="string"==typeof e?new Uint8Array(i.lW.from(e,"base64")):e,this.keyLifetime=t,this.attribute_map={commitment:"commitment",keyLifetime:"key-lifetime"}}static from_obj_for_encoding(e){return new Ur({commitment:e.commitment,keyLifetime:e["key-lifetime"]})}}class Pr extends ve{constructor({numByteSlice:e,numUint:t}){super(),this.numByteSlice=e,this.numUint=t,this.attribute_map={numByteSlice:"num-byte-slice",numUint:"num-uint"}}static from_obj_for_encoding(e){if(void 0===e["num-byte-slice"])throw new Error(`Response is missing required field 'num-byte-slice': ${e}`);if(void 0===e["num-uint"])throw new Error(`Response is missing required field 'num-uint': ${e}`);return new Pr({numByteSlice:e["num-byte-slice"],numUint:e["num-uint"]})}}class jr extends ve{constructor({key:e,value:t}){super(),this.key=e,this.value=t,this.attribute_map={key:"key",value:"value"}}static from_obj_for_encoding(e){if(void 0===e.key)throw new Error(`Response is missing required field 'key': ${e}`);if(void 0===e.value)throw new Error(`Response is missing required field 'value': ${e}`);return new jr({key:e.key,value:qr.from_obj_for_encoding(e.value)})}}class qr extends ve{constructor({bytes:e,type:t,uint:r}){super(),this.bytes=e,this.type=t,this.uint=r,this.attribute_map={bytes:"bytes",type:"type",uint:"uint"}}static from_obj_for_encoding(e){if(void 0===e.bytes)throw new Error(`Response is missing required field 'bytes': ${e}`);if(void 0===e.type)throw new Error(`Response is missing required field 'type': ${e}`);if(void 0===e.uint)throw new Error(`Response is missing required field 'uint': ${e}`);return new qr({bytes:e.bytes,type:e.type,uint:e.uint})}}class Dr extends ve{constructor({fee:e,firstValid:t,lastValid:r,sender:n,applicationTransaction:s,assetConfigTransaction:o,assetFreezeTransaction:a,assetTransferTransaction:c,authAddr:u,closeRewards:l,closingAmount:h,confirmedRound:d,createdApplicationIndex:p,createdAssetIndex:f,genesisHash:g,genesisId:m,globalStateDelta:y,group:w,id:b,innerTxns:v,intraRoundOffset:x,keyregTransaction:A,lease:_,localStateDelta:E,logs:T,note:S,paymentTransaction:k,receiverRewards:R,rekeyTo:I,roundTime:B,senderRewards:U,signature:P,stateProofTransaction:j,txType:q}){super(),this.fee=e,this.firstValid=t,this.lastValid=r,this.sender=n,this.applicationTransaction=s,this.assetConfigTransaction=o,this.assetFreezeTransaction=a,this.assetTransferTransaction=c,this.authAddr=u,this.closeRewards=l,this.closingAmount=h,this.confirmedRound=d,this.createdApplicationIndex=p,this.createdAssetIndex=f,this.genesisHash="string"==typeof g?new Uint8Array(i.lW.from(g,"base64")):g,this.genesisId=m,this.globalStateDelta=y,this.group="string"==typeof w?new Uint8Array(i.lW.from(w,"base64")):w,this.id=b,this.innerTxns=v,this.intraRoundOffset=x,this.keyregTransaction=A,this.lease="string"==typeof _?new Uint8Array(i.lW.from(_,"base64")):_,this.localStateDelta=E,this.logs=T,this.note="string"==typeof S?new Uint8Array(i.lW.from(S,"base64")):S,this.paymentTransaction=k,this.receiverRewards=R,this.rekeyTo=I,this.roundTime=B,this.senderRewards=U,this.signature=P,this.stateProofTransaction=j,this.txType=q,this.attribute_map={fee:"fee",firstValid:"first-valid",lastValid:"last-valid",sender:"sender",applicationTransaction:"application-transaction",assetConfigTransaction:"asset-config-transaction",assetFreezeTransaction:"asset-freeze-transaction",assetTransferTransaction:"asset-transfer-transaction",authAddr:"auth-addr",closeRewards:"close-rewards",closingAmount:"closing-amount",confirmedRound:"confirmed-round",createdApplicationIndex:"created-application-index",createdAssetIndex:"created-asset-index",genesisHash:"genesis-hash",genesisId:"genesis-id",globalStateDelta:"global-state-delta",group:"group",id:"id",innerTxns:"inner-txns",intraRoundOffset:"intra-round-offset",keyregTransaction:"keyreg-transaction",lease:"lease",localStateDelta:"local-state-delta",logs:"logs",note:"note",paymentTransaction:"payment-transaction",receiverRewards:"receiver-rewards",rekeyTo:"rekey-to",roundTime:"round-time",senderRewards:"sender-rewards",signature:"signature",stateProofTransaction:"state-proof-transaction",txType:"tx-type"}}static from_obj_for_encoding(e){if(void 0===e.fee)throw new Error(`Response is missing required field 'fee': ${e}`);if(void 0===e["first-valid"])throw new Error(`Response is missing required field 'first-valid': ${e}`);if(void 0===e["last-valid"])throw new Error(`Response is missing required field 'last-valid': ${e}`);if(void 0===e.sender)throw new Error(`Response is missing required field 'sender': ${e}`);return new Dr({fee:e.fee,firstValid:e["first-valid"],lastValid:e["last-valid"],sender:e.sender,applicationTransaction:void 0!==e["application-transaction"]?$r.from_obj_for_encoding(e["application-transaction"]):void 0,assetConfigTransaction:void 0!==e["asset-config-transaction"]?Or.from_obj_for_encoding(e["asset-config-transaction"]):void 0,assetFreezeTransaction:void 0!==e["asset-freeze-transaction"]?Cr.from_obj_for_encoding(e["asset-freeze-transaction"]):void 0,assetTransferTransaction:void 0!==e["asset-transfer-transaction"]?Lr.from_obj_for_encoding(e["asset-transfer-transaction"]):void 0,authAddr:e["auth-addr"],closeRewards:e["close-rewards"],closingAmount:e["closing-amount"],confirmedRound:e["confirmed-round"],createdApplicationIndex:e["created-application-index"],createdAssetIndex:e["created-asset-index"],genesisHash:e["genesis-hash"],genesisId:e["genesis-id"],globalStateDelta:void 0!==e["global-state-delta"]?e["global-state-delta"].map(wr.from_obj_for_encoding):void 0,group:e.group,id:e.id,innerTxns:void 0!==e["inner-txns"]?e["inner-txns"].map(Dr.from_obj_for_encoding):void 0,intraRoundOffset:e["intra-round-offset"],keyregTransaction:void 0!==e["keyreg-transaction"]?Mr.from_obj_for_encoding(e["keyreg-transaction"]):void 0,lease:e.lease,localStateDelta:void 0!==e["local-state-delta"]?e["local-state-delta"].map(zt.from_obj_for_encoding):void 0,logs:e.logs,note:e.note,paymentTransaction:void 0!==e["payment-transaction"]?Nr.from_obj_for_encoding(e["payment-transaction"]):void 0,receiverRewards:e["receiver-rewards"],rekeyTo:e["rekey-to"],roundTime:e["round-time"],senderRewards:e["sender-rewards"],signature:void 0!==e.signature?Kr.from_obj_for_encoding(e.signature):void 0,stateProofTransaction:void 0!==e["state-proof-transaction"]?Hr.from_obj_for_encoding(e["state-proof-transaction"]):void 0,txType:e["tx-type"]})}}class $r extends ve{constructor({applicationId:e,accounts:t,applicationArgs:r,approvalProgram:n,clearStateProgram:s,extraProgramPages:o,foreignApps:a,foreignAssets:c,globalStateSchema:u,localStateSchema:l,onCompletion:h}){super(),this.applicationId=e,this.accounts=t,this.applicationArgs=r,this.approvalProgram="string"==typeof n?new Uint8Array(i.lW.from(n,"base64")):n,this.clearStateProgram="string"==typeof s?new Uint8Array(i.lW.from(s,"base64")):s,this.extraProgramPages=o,this.foreignApps=a,this.foreignAssets=c,this.globalStateSchema=u,this.localStateSchema=l,this.onCompletion=h,this.attribute_map={applicationId:"application-id",accounts:"accounts",applicationArgs:"application-args",approvalProgram:"approval-program",clearStateProgram:"clear-state-program",extraProgramPages:"extra-program-pages",foreignApps:"foreign-apps",foreignAssets:"foreign-assets",globalStateSchema:"global-state-schema",localStateSchema:"local-state-schema",onCompletion:"on-completion"}}static from_obj_for_encoding(e){if(void 0===e["application-id"])throw new Error(`Response is missing required field 'application-id': ${e}`);return new $r({applicationId:e["application-id"],accounts:e.accounts,applicationArgs:e["application-args"],approvalProgram:e["approval-program"],clearStateProgram:e["clear-state-program"],extraProgramPages:e["extra-program-pages"],foreignApps:e["foreign-apps"],foreignAssets:e["foreign-assets"],globalStateSchema:void 0!==e["global-state-schema"]?Pr.from_obj_for_encoding(e["global-state-schema"]):void 0,localStateSchema:void 0!==e["local-state-schema"]?Pr.from_obj_for_encoding(e["local-state-schema"]):void 0,onCompletion:e["on-completion"]})}}class Or extends ve{constructor({assetId:e,params:t}){super(),this.assetId=e,this.params=t,this.attribute_map={assetId:"asset-id",params:"params"}}static from_obj_for_encoding(e){return new Or({assetId:e["asset-id"],params:void 0!==e.params?or.from_obj_for_encoding(e.params):void 0})}}class Cr extends ve{constructor({address:e,assetId:t,newFreezeStatus:r}){super(),this.address=e,this.assetId=t,this.newFreezeStatus=r,this.attribute_map={address:"address",assetId:"asset-id",newFreezeStatus:"new-freeze-status"}}static from_obj_for_encoding(e){if(void 0===e.address)throw new Error(`Response is missing required field 'address': ${e}`);if(void 0===e["asset-id"])throw new Error(`Response is missing required field 'asset-id': ${e}`);if(void 0===e["new-freeze-status"])throw new Error(`Response is missing required field 'new-freeze-status': ${e}`);return new Cr({address:e.address,assetId:e["asset-id"],newFreezeStatus:e["new-freeze-status"]})}}class Lr extends ve{constructor({amount:e,assetId:t,receiver:r,closeAmount:n,closeTo:s,sender:i}){super(),this.amount=e,this.assetId=t,this.receiver=r,this.closeAmount=n,this.closeTo=s,this.sender=i,this.attribute_map={amount:"amount",assetId:"asset-id",receiver:"receiver",closeAmount:"close-amount",closeTo:"close-to",sender:"sender"}}static from_obj_for_encoding(e){if(void 0===e.amount)throw new Error(`Response is missing required field 'amount': ${e}`);if(void 0===e["asset-id"])throw new Error(`Response is missing required field 'asset-id': ${e}`);if(void 0===e.receiver)throw new Error(`Response is missing required field 'receiver': ${e}`);return new Lr({amount:e.amount,assetId:e["asset-id"],receiver:e.receiver,closeAmount:e["close-amount"],closeTo:e["close-to"],sender:e.sender})}}class Mr extends ve{constructor({nonParticipation:e,selectionParticipationKey:t,stateProofKey:r,voteFirstValid:n,voteKeyDilution:s,voteLastValid:o,voteParticipationKey:a}){super(),this.nonParticipation=e,this.selectionParticipationKey="string"==typeof t?new Uint8Array(i.lW.from(t,"base64")):t,this.stateProofKey="string"==typeof r?new Uint8Array(i.lW.from(r,"base64")):r,this.voteFirstValid=n,this.voteKeyDilution=s,this.voteLastValid=o,this.voteParticipationKey="string"==typeof a?new Uint8Array(i.lW.from(a,"base64")):a,this.attribute_map={nonParticipation:"non-participation",selectionParticipationKey:"selection-participation-key",stateProofKey:"state-proof-key",voteFirstValid:"vote-first-valid",voteKeyDilution:"vote-key-dilution",voteLastValid:"vote-last-valid",voteParticipationKey:"vote-participation-key"}}static from_obj_for_encoding(e){return new Mr({nonParticipation:e["non-participation"],selectionParticipationKey:e["selection-participation-key"],stateProofKey:e["state-proof-key"],voteFirstValid:e["vote-first-valid"],voteKeyDilution:e["vote-key-dilution"],voteLastValid:e["vote-last-valid"],voteParticipationKey:e["vote-participation-key"]})}}class Nr extends ve{constructor({amount:e,receiver:t,closeAmount:r,closeRemainderTo:n}){super(),this.amount=e,this.receiver=t,this.closeAmount=r,this.closeRemainderTo=n,this.attribute_map={amount:"amount",receiver:"receiver",closeAmount:"close-amount",closeRemainderTo:"close-remainder-to"}}static from_obj_for_encoding(e){if(void 0===e.amount)throw new Error(`Response is missing required field 'amount': ${e}`);if(void 0===e.receiver)throw new Error(`Response is missing required field 'receiver': ${e}`);return new Nr({amount:e.amount,receiver:e.receiver,closeAmount:e["close-amount"],closeRemainderTo:e["close-remainder-to"]})}}class Fr extends ve{constructor({currentRound:e,transaction:t}){super(),this.currentRound=e,this.transaction=t,this.attribute_map={currentRound:"current-round",transaction:"transaction"}}static from_obj_for_encoding(e){if(void 0===e["current-round"])throw new Error(`Response is missing required field 'current-round': ${e}`);if(void 0===e.transaction)throw new Error(`Response is missing required field 'transaction': ${e}`);return new Fr({currentRound:e["current-round"],transaction:Dr.from_obj_for_encoding(e.transaction)})}}class Kr extends ve{constructor({logicsig:e,multisig:t,sig:r}){super(),this.logicsig=e,this.multisig=t,this.sig="string"==typeof r?new Uint8Array(i.lW.from(r,"base64")):r,this.attribute_map={logicsig:"logicsig",multisig:"multisig",sig:"sig"}}static from_obj_for_encoding(e){return new Kr({logicsig:void 0!==e.logicsig?Wr.from_obj_for_encoding(e.logicsig):void 0,multisig:void 0!==e.multisig?zr.from_obj_for_encoding(e.multisig):void 0,sig:e.sig})}}class Wr extends ve{constructor({logic:e,args:t,multisigSignature:r,signature:n}){super(),this.logic="string"==typeof e?new Uint8Array(i.lW.from(e,"base64")):e,this.args=t,this.multisigSignature=r,this.signature="string"==typeof n?new Uint8Array(i.lW.from(n,"base64")):n,this.attribute_map={logic:"logic",args:"args",multisigSignature:"multisig-signature",signature:"signature"}}static from_obj_for_encoding(e){if(void 0===e.logic)throw new Error(`Response is missing required field 'logic': ${e}`);return new Wr({logic:e.logic,args:e.args,multisigSignature:void 0!==e["multisig-signature"]?zr.from_obj_for_encoding(e["multisig-signature"]):void 0,signature:e.signature})}}class zr extends ve{constructor({subsignature:e,threshold:t,version:r}){super(),this.subsignature=e,this.threshold=t,this.version=r,this.attribute_map={subsignature:"subsignature",threshold:"threshold",version:"version"}}static from_obj_for_encoding(e){return new zr({subsignature:void 0!==e.subsignature?e.subsignature.map(Vr.from_obj_for_encoding):void 0,threshold:e.threshold,version:e.version})}}class Vr extends ve{constructor({publicKey:e,signature:t}){super(),this.publicKey="string"==typeof e?new Uint8Array(i.lW.from(e,"base64")):e,this.signature="string"==typeof t?new Uint8Array(i.lW.from(t,"base64")):t,this.attribute_map={publicKey:"public-key",signature:"signature"}}static from_obj_for_encoding(e){return new Vr({publicKey:e["public-key"],signature:e.signature})}}class Hr extends ve{constructor({message:e,stateProof:t,stateProofType:r}){super(),this.message=e,this.stateProof=t,this.stateProofType=r,this.attribute_map={message:"message",stateProof:"state-proof",stateProofType:"state-proof-type"}}static from_obj_for_encoding(e){return new Hr({message:void 0!==e.message?xr.from_obj_for_encoding(e.message):void 0,stateProof:void 0!==e["state-proof"]?Tr.from_obj_for_encoding(e["state-proof"]):void 0,stateProofType:e["state-proof-type"]})}}class Gr extends ve{constructor({currentRound:e,transactions:t,nextToken:r}){super(),this.currentRound=e,this.transactions=t,this.nextToken=r,this.attribute_map={currentRound:"current-round",transactions:"transactions",nextToken:"next-token"}}static from_obj_for_encoding(e){if(void 0===e["current-round"])throw new Error(`Response is missing required field 'current-round': ${e}`);if(!Array.isArray(e.transactions))throw new Error(`Response is missing required array field 'transactions': ${e}`);return new Gr({currentRound:e["current-round"],transactions:e.transactions.map(Dr.from_obj_for_encoding),nextToken:e["next-token"]})}}class Yr extends ae{constructor(e,t,r,n){super(e,t),this.index=r,this.index=r;const s=i.lW.from(n).toString("base64");this.query.name=encodeURI(`b64:${s}`)}path(){return`/v2/applications/${this.index}/box`}prepare(e){return pr.from_obj_for_encoding(e)}}class Jr extends ae{path(){return"/v2/accounts"}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}includeAll(e=!0){return this.query["include-all"]=e,this}exclude(e){return this.query.exclude=e,this}}class Xr extends ae{path(){return"/v2/transactions"}notePrefix(e){return this.query["note-prefix"]=It(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}}class Zr extends ae{path(){return"/v2/assets"}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}includeAll(e=!0){return this.query["include-all"]=e,this}}class Qr extends ae{path(){return"/v2/applications"}index(e){return this.query["application-id"]=e,this}creator(e){return this.query.creator=e,this}nextToken(e){return this.query.next=e,this}limit(e){return this.query.limit=e,this}includeAll(e=!0){return this.query["include-all"]=e,this}}class en extends ae{constructor(e,t,r){super(e,t),this.index=r,this.index=r}path(){return`/v2/applications/${this.index}/boxes`}nextToken(e){return this.query.next=e,this}limit(e){return this.query.limit=e,this}prepare(e){return gr.from_obj_for_encoding(e)}}class tn extends oe{constructor(e,t="http://127.0.0.1",r=8080,n={}){super("X-Indexer-API-Token",e,t,r,n)}makeHealthCheck(){return new kt(this.c,this.intDecoding)}lookupAssetBalances(e){return new Rt(this.c,this.intDecoding,e)}lookupAssetTransactions(e){return new Ut(this.c,this.intDecoding,e)}lookupAccountTransactions(e){return new Bt(this.c,this.intDecoding,e)}lookupBlock(e){return new Pt(this.c,this.intDecoding,e)}lookupTransactionByID(e){return new jt(this.c,this.intDecoding,e)}lookupAccountByID(e){return new qt(this.c,this.intDecoding,e)}lookupAccountAssets(e){return new Dt(this.c,this.intDecoding,e)}lookupAccountCreatedAssets(e){return new $t(this.c,this.intDecoding,e)}lookupAccountAppLocalStates(e){return new Ot(this.c,this.intDecoding,e)}lookupAccountCreatedApplications(e){return new Ct(this.c,this.intDecoding,e)}lookupAssetByID(e){return new Lt(this.c,this.intDecoding,e)}lookupApplications(e){return new Mt(this.c,this.intDecoding,e)}lookupApplicationLogs(e){return new Nt(this.c,this.intDecoding,e)}searchAccounts(){return new Jr(this.c,this.intDecoding)}searchForTransactions(){return new Xr(this.c,this.intDecoding)}searchForAssets(){return new Zr(this.c,this.intDecoding)}searchForApplications(){return new Qr(this.c,this.intDecoding)}searchForApplicationBoxes(e){return new en(this.c,this.intDecoding,e)}lookupApplicationBoxByIDandName(e,t){return new Yr(this.c,this.intDecoding,e,t)}}async function rn(e,t,r){const n=await e.status().do();if(void 0===n)throw new Error("Unable to get node status");const s=n["last-round"]+1;let i=s;for(;i<s+r;){let r=!1;try{const n=await e.pendingTransactionInformation(t).do();if(n["confirmed-round"])return n;if(n["pool-error"])throw r=!0,new Error(`Transaction Rejected: ${n["pool-error"]}`)}catch(e){if(r)throw e}await e.statusAfterBlock(i).do(),i+=1}throw new Error(`Transaction not confirmed after ${r} rounds`)}function nn(e,t){let r=e.toString(16);r.length!==2*t&&(r=r.padStart(2*t,"0"));const n=new Uint8Array(r.length/2);for(let e=0,t=0;e<r.length/2;e++,t+=2)n[e]=parseInt(r.slice(t,t+2),16);return n}function sn(e){let t=BigInt(0);const r=i.lW.from(e);for(let n=0;n<e.length;n++)t=BigInt(Number(r.readUIntBE(n,1)))+t*BigInt(256);return t}function on(){const e=h((t=a().box.secretKeyLength,a().randomBytes(t)));var t;return{addr:q(e.publicKey),sk:e.secretKey}}const an=["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"],cn="failed to decode mnemonic";function un(e){const t=[];let r=0,n=0;return e.forEach((function(e){r|=e<<n,n+=8,n>=11&&(t.push(2047&r),r>>=11,n-=11)})),n&&t.push(r),t}function ln(e){return e.map((e=>an[e]))}function hn(e){return ln(un(l(e)))[0]}function dn(e){if(32!==e.length)throw new RangeError("Seed length must be 32");const t=ln(un(e)),r=hn(e);return`${t.join(" ")} ${r}`}function pn(e){const t=e.split(" "),r=t.slice(0,24);for(const e of r)if(-1===an.indexOf(e))throw new Error("the mnemonic contains a word that is not in the wordlist");const n=t[t.length-1];let s=function(e){const t=[];let r=0,n=0;return e.forEach((function(e){for(r|=e<<n,n+=11;n>=8;)t.push(255&r),r>>=8,n-=8})),n&&t.push(r),new Uint8Array(t)}(r.map((e=>an.indexOf(e))));if(33!==s.length)throw new Error(cn);if(0!==s[s.length-1])throw new Error(cn);if(s=s.slice(0,s.length-1),hn(s)===n)return s;throw new Error(cn)}function fn(e){const t=h(pn(e));return{addr:q(t.publicKey),sk:t.secretKey}}function gn(e){return dn(e.slice(0,32))}function mn(e){return pn(e)}function yn(e){return dn(e)}class wn{constructor(e){if(this.name="Transaction group",this.tag=i.lW.from("TG"),e.length>16){const t=`${e.length.toString()} transactions grouped together but max group size is ${16..toString()}`;throw Error(t)}this.txGroupHashes=e}get_obj_for_encoding(){return{txlist:this.txGroupHashes}}static from_obj_for_encoding(e){const t=Object.create(this.prototype);t.name="Transaction group",t.tag=i.lW.from("TG"),t.txGroupHashes=[];for(const r of e.txlist)t.txGroupHashes.push(i.lW.from(r));return t}toByte(){return N(this.get_obj_for_encoding())}}function bn(e){const t=[];for(const r of e){const e=Y(r);t.push(e.rawTxID())}const r=new wn(t),n=r.toByte(),s=l(i.lW.from(S(r.tag,n)));return i.lW.from(s)}function vn(e,t){const r=bn(e),n=[];for(const s of e){const e=Y(s);t&&q(e.from.publicKey)!==t||(e.group=r,n.push(e))}return n}const xn="Cannot merge txs. Multisig preimages differ",An="Cannot mutate a multisig field as it would invalidate all existing signatures.";function _n(e,{version:t,threshold:r,addrs:n}){const s=n.map((e=>P(e).publicKey)),o={v:t,thr:r,subsig:s.map((e=>({pk:i.lW.from(e)})))},a=e.get_obj_for_encoding(),c={msig:o,txn:a},u=D({version:t,threshold:r,pks:s});return q(a.snd)!==q(u)&&(c.sgnr=i.lW.from(u)),new Uint8Array(N(c))}function En(e,{rawSig:t,myPk:r},{version:n,threshold:s,pks:o}){const a=F(_n(e,{version:n,threshold:s,addrs:o.map((e=>q(e)))}));let c=!1;if(a.msig.subsig.forEach(((e,n)=>{g(e.pk,r)&&(c=!0,a.msig.subsig[n].s=t)})),!1===c)throw new Error("Key does not exist");const u=D({version:n,threshold:s,pks:o});return q(a.txn.snd)!==q(u)&&(a.sgnr=i.lW.from(u)),new Uint8Array(N(a))}class Tn extends z{addLease(){throw new Error(An)}addRekey(){throw new Error(An)}signTxn(e){throw new Error("Cannot sign a multisig transaction using `signTxn`. Use `partialSignTxn` instead.")}partialSignTxn({version:e,threshold:t,pks:r},n){const s=p(n).publicKey;return En(this,{rawSig:this.rawSignTxn(n),myPk:s},{version:e,threshold:t,pks:r})}partialSignWithMultisigSignature(e,t,r){if(!d(r.length))throw new Error("Cannot add multisig signature. Signature is not of the correct length.");return En(this,{rawSig:r,myPk:P(t).publicKey},e)}static from_obj_for_encoding(e){return super.from_obj_for_encoding(e)}}function Sn(e){if(e.length<2)throw new Error("Not enough multisig transactions to merge. Need at least two");const t=F(e[0]),r=Tn.from_obj_for_encoding(t.txn).txID(),n=t.sgnr?q(t.sgnr):void 0,s=q(D({version:t.msig.v,threshold:t.msig.thr,pks:t.msig.subsig.map((e=>e.pk))})),o=t.msig.subsig.map((e=>({...e})));for(let a=1;a<e.length;a++){const c=F(e[a]);if(Tn.from_obj_for_encoding(c.txn).txID()!==r)throw new Error("Cannot merge txs. txIDs differ");if(n!==(c.sgnr?q(c.sgnr):void 0))throw new Error("Cannot merge txs. Auth addrs differ");if(c.msig.subsig.length!==t.msig.subsig.length)throw new Error(xn);if(s!==q(D({version:c.msig.v,threshold:c.msig.thr,pks:c.msig.subsig.map((e=>e.pk))})))throw new Error(xn);c.msig.subsig.forEach(((e,t)=>{if(!e.s)return;const r=o[t];if(r.s&&0!==i.lW.compare(i.lW.from(e.s),i.lW.from(r.s)))throw new Error("Cannot merge txs. subsigs are mismatched.");r.s=e.s}))}const a={msig:{v:t.msig.v,thr:t.msig.thr,subsig:o},txn:t.txn};return void 0!==n&&(a.sgnr=i.lW.from(P(n).publicKey)),new Uint8Array(N(a))}function kn(e,t,r){const n=t.v,s=t.thr,i=t.subsig,o=i.map((e=>e.pk));if(t.subsig.length<s)return!1;let a;try{a=D({version:n,threshold:s,pks:o})}catch(e){return!1}if(!T(a,r))return!1;let c=0;for(const e of i)void 0!==e.s&&(c+=1);if(c<s)return!1;let u=0;for(const t of i)void 0!==t.s&&m(e,t.s,t.pk)&&(u+=1);return!(u<s)}function Rn(e,{version:t,threshold:r,addrs:n},s){const i=$({version:t,threshold:r,addrs:n});Object.prototype.hasOwnProperty.call(e,"from")||(e.from=i);const o=n.map((e=>P(e).publicKey));let a,c;return e instanceof z?(a=e,c=Tn.prototype.partialSignTxn.call(a,{version:t,threshold:r,pks:o},s)):(a=new Tn(e),c=a.partialSignTxn({version:t,threshold:r,pks:o},s)),{txID:a.txID().toString(),blob:c}}function In(e,{version:t,threshold:r,addrs:n},s){const i=n.map((e=>P(e).publicKey)),o=F(e),a=Tn.from_obj_for_encoding(o.txn),c=a.partialSignTxn({version:t,threshold:r,pks:i},s);return{txID:a.txID().toString(),blob:Sn([e,c])}}function Bn(e,{version:t,threshold:r,addrs:n},s,i){const o=n.map((e=>P(e).publicKey)),a=F(e),c=Tn.from_obj_for_encoding(a.txn),u=c.partialSignWithMultisigSignature({version:t,threshold:r,pks:o},s,i);return{txID:c.txID().toString(),blob:Sn([e,u])}}function Un({version:e,threshold:t,addrs:r}){return $({version:e,threshold:t,addrs:r})}function Pn(e){if(!e||0===e.length)throw new Error("empty program");const t="\n".charCodeAt(0),r=" ".charCodeAt(0),n="~".charCodeAt(0);if(e.every((e=>e===t||(e=>r<=e&&e<=n)(e)))){const t=i.lW.from(e).toString();if(j(t))throw new Error("requesting program bytes, get Algorand address");if(i.lW.from(t,"base64").toString("base64")===t)throw new Error("program should not be b64 encoded");throw new Error("program bytes are all ASCII printable characters, not looking like Teal byte code")}}class jn{constructor(e,t){if(this.tag=i.lW.from("Program"),t&&(!Array.isArray(t)||!t.every((e=>e.constructor===Uint8Array||i.lW.isBuffer(e)))))throw new TypeError("Invalid arguments");let r;null!=t&&(r=t.map((e=>new Uint8Array(e)))),Pn(e),this.logic=e,this.args=r,this.sig=void 0,this.msig=void 0}get_obj_for_encoding(){const e={l:this.logic};return this.args&&(e.arg=this.args),this.sig?e.sig=this.sig:this.msig&&(e.msig=this.msig),e}static from_obj_for_encoding(e){const t=new jn(e.l,e.arg);return t.sig=e.sig,t.msig=e.msig,t}verify(e){if(this.sig&&this.msig)return!1;try{Pn(this.logic)}catch(e){return!1}const t=S(this.tag,this.logic);return this.sig||this.msig?this.sig?m(t,this.sig,e):kn(t,this.msig,e):T(l(t),e)}address(){const e=l(S(this.tag,this.logic));return q(new Uint8Array(e))}sign(e,t){if(null==t)this.sig=this.signProgram(e);else{const r=t.addrs.map((e=>({pk:P(e).publicKey})));this.msig={v:t.version,thr:t.threshold,subsig:r};const[n,s]=this.singleSignMultisig(e,this.msig);this.msig.subsig[s].s=n}}appendToMultisig(e){if(void 0===this.msig)throw new Error("no multisig present");const[t,r]=this.singleSignMultisig(e,this.msig);this.msig.subsig[r].s=t}signProgram(e){return f(S(this.tag,this.logic),e)}singleSignMultisig(e,t){let r=-1;const n=p(e).publicKey;for(let e=0;e<t.subsig.length;e++){const{pk:s}=t.subsig[e];if(T(s,n)){r=e;break}}if(-1===r)throw new Error("invalid secret key");return[this.signProgram(e),r]}toByte(){return N(this.get_obj_for_encoding())}static fromByte(e){const t=F(e);return jn.from_obj_for_encoding(t)}}class qn{constructor(e,t){this.lsig=new jn(e,t),this.sigkey=void 0}get_obj_for_encoding(){const e={lsig:this.lsig.get_obj_for_encoding()};return this.sigkey&&(e.sigkey=this.sigkey),e}static from_obj_for_encoding(e){const t=new qn(e.lsig.l,e.lsig.arg);return t.lsig=jn.from_obj_for_encoding(e.lsig),t.sigkey=e.sigkey,t}toByte(){return N(this.get_obj_for_encoding())}static fromByte(e){const t=F(e);return qn.from_obj_for_encoding(t)}isDelegated(){return!(!this.lsig.sig&&!this.lsig.msig)}verify(){const e=this.address();return this.lsig.verify(P(e).publicKey)}address(){if(this.lsig.sig&&this.lsig.msig)throw new Error("LogicSig has too many signatures. At most one of sig or msig may be present");if(this.lsig.sig){if(!this.sigkey)throw new Error("Signing key for delegated account is missing");return q(this.sigkey)}return this.lsig.msig?q(D({version:this.lsig.msig.v,threshold:this.lsig.msig.thr,pks:this.lsig.msig.subsig.map((e=>e.pk))})):this.lsig.address()}signMultisig(e,t){this.lsig.sign(t,e)}appendToMultisig(e){this.lsig.appendToMultisig(e)}sign(e){this.lsig.sign(e),this.sigkey=p(e).publicKey}}function Dn(e,t){let r,n;return t instanceof qn?(r=t.lsig,n=P(t.address()).publicKey):(r=t,n=r.sig?e.from.publicKey:r.msig?D({version:r.msig.v,threshold:r.msig.thr,pks:r.msig.subsig.map((e=>e.pk))}):P(r.address()).publicKey),function(e,t,r){if(!t.verify(r))throw new Error("Logic signature verification failed. Ensure the program and signature are valid.");const n={lsig:t.get_obj_for_encoding(),txn:e.get_obj_for_encoding()};return g(r,e.from.publicKey)||(n.sgnr=i.lW.from(r)),{txID:e.txID().toString(),blob:N(n)}}(e,r,n)}function $n(e,t){return Dn(Y(e),t)}function On(e){return jn.fromByte(e)}const Cn=i.lW.from("ProgData");function Ln(e,t,r){const n=S(P(r).publicKey,t);return f(i.lW.from(S(Cn,n)),e)}function Mn(e,t,r,n){const s=S(P(t).publicKey,e);return m(i.lW.from(S(Cn,s)),r,n)}function Nn(e,t,r){return Ln(e,t,new jn(r).address())}let Fn={},Kn={};"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split("").forEach((function(e,t){Fn[e]=t,Kn[t]=e}));class Wn{constructor({version:e,sources:t,names:r,mappings:n}){if(this.version=e,this.sources=t,this.names=r,this.mappings=n,3!==this.version)throw new Error(`Only version 3 is supported, got ${this.version}`);if(void 0===this.mappings)throw new Error("mapping undefined, cannot build source map without `mapping`");const s=this.mappings.split(";").map((e=>{const t=function(e){let t=[],r=0,n=0;for(let s=0;s<e.length;s+=1){let i=Fn[e[s]];if(void 0===i)throw new Error("Invalid character ("+e[s]+")");const o=32&i;if(i&=31,n+=i<<r,o)r+=5;else{const e=1&n;n>>>=1,e?t.push(0===n?-2147483648:-n):t.push(n),n=r=0}}return t}(e);if(t.length>2)return t[2]}));this.pcToLine={},this.lineToPc={};let i=0;for(const[e,t]of s.entries())void 0!==t&&(i+=t),i in this.lineToPc||(this.lineToPc[i]=[]),this.lineToPc[i].push(e),this.pcToLine[e]=i}getLineForPc(e){return this.pcToLine[e]}getPcsForLine(e){return this.lineToPc[e]}}function zn(e){return e.params["approval-program"]=i.lW.from(e.params["approval-program"].toString(),"base64"),e.params["clear-state-program"]=i.lW.from(e.params["clear-state-program"].toString(),"base64"),e}async function Vn({client:e,txns:t,protocolVersion:r,latestTimestamp:n,round:s,sources:i}){const o=[],a=[],c=[],u=[],l=[];for(const e of t)e.txn.type===C.appl&&(l.push(q(e.txn.from.publicKey)),e.txn.appAccounts&&l.push(...e.txn.appAccounts.map((e=>q(e.publicKey)))),e.txn.appForeignApps&&(c.push(...e.txn.appForeignApps),l.push(...e.txn.appForeignApps.map((e=>O(e))))),e.txn.appForeignAssets&&u.push(...e.txn.appForeignAssets),void 0===e.txn.appIndex||0===e.txn.appIndex?o.push(new Se({id:1380011588,params:new Re({creator:q(e.txn.from.publicKey),approvalProgram:e.txn.appApprovalProgram,clearStateProgram:e.txn.appClearProgram,localStateSchema:new Ie({numUint:e.txn.appLocalInts,numByteSlice:e.txn.appLocalByteSlices}),globalStateSchema:new Ie({numUint:e.txn.appGlobalInts,numByteSlice:e.txn.appGlobalByteSlices})})})):(c.push(e.txn.appIndex),l.push(O(e.txn.appIndex))));const h=[];for(const t of[...new Set(u)])h.push(e.getAssetByID(t).do().then((e=>{l.push(e.params.creator)})));await Promise.all(h);const d=[];for(const t of[...new Set(c)])d.push(e.getApplicationByID(t).do().then((e=>{const t=zn(e);o.push(t),l.push(t.params.creator)})));await Promise.all(d);const p=[];for(const t of[...new Set(l)])p.push(e.accountInformation(t).do().then((e=>{"created-apps"in e&&(e["created-apps"]=e["created-apps"].map((e=>zn(e)))),a.push(e)})));return await Promise.all(p),new Ne({txns:t.map((e=>({...e,txn:e.txn.get_obj_for_encoding()}))),accounts:a,apps:o,latestTimestamp:n,round:s,protocolVersion:r,sources:i})}class Hn{constructor(e){this.type=0,this.bytes="",this.uint=0,this.type=e.type,this.bytes=e.bytes,this.uint=e.uint}toString(){return 1===this.type?`0x${i.lW.from(this.bytes,"base64").toString("hex")}`:this.uint.toString()}}class Gn{constructor(e){this.error="",this.line=0,this.pc=0,this.scratch=[],this.stack=[],this.error=void 0===e.error?"":e.error,this.line=e.line,this.pc=e.pc,this.scratch=e.scratch,this.stack=e.stack.map((e=>new Hn(e)))}}class Yn{constructor(e){this.trace=[],null!=e&&(this.trace=e.map((e=>new Gn(e))))}}function Jn(e,t){return e.length>t&&t>0?`${e.slice(0,t)}...`:e}function Xn(e,t){if(0===t.length)return"";let r=null;for(let n=0;n<t.length;n++)(n>e.length||JSON.stringify(e[n])!==JSON.stringify(t[n]))&&(r=n);if(null==r)return"";const n=t[r];return n.bytes.length>0?`${r} = 0x${i.lW.from(n.bytes,"base64").toString("hex")}`:`${r} = ${n.uint.toString()}`}function Zn(e,t){return`[${(t?e.reverse():e).map((e=>{switch(e.type){case 1:return`0x${i.lW.from(e.bytes,"base64").toString("hex")}`;case 2:return`${e.uint.toString()}`;default:return""}})).join(", ")}]`}class Qn{constructor(e){this.disassembly=[],this.appCallMessages=[],this.localDeltas=[],this.globalDelta=[],this.cost=0,this.logicSigMessages=[],this.logicSigDisassembly=[],this.logs=[],this.appCallTrace=void 0,this.logicSigTrace=void 0,this.required=["disassembly"],this.optionals=["app-call-messages","local-deltas","global-delta","cost","logic-sig-messages","logic-sig-disassembly","logs"],this.traces=["app-call-trace","logic-sig-trace"],this.disassembly=e.disassembly,this.appCallMessages=e["app-call-messages"],this.localDeltas=e["local-deltas"],this.globalDelta=e["global-delta"],this.cost=e.cost,this.logicSigMessages=e["logic-sig-messages"],this.logicSigDisassembly=e["logic-sig-disassembly"],this.logs=e.logs,this.appCallTrace=new Yn(e["app-call-trace"]),this.logicSigTrace=new Yn(e["logic-sig-trace"])}appCallRejected(){return void 0!==this.appCallMessages&&this.appCallMessages.includes("REJECT")}logicSigRejected(){return void 0!==this.logicSigMessages&&this.logicSigMessages.includes("REJECT")}static trace(e,t,r){const n=r.maxValueWidth||30,s=[["pc#","ln#","source","scratch","stack"]];for(let i=0;i<e.trace.length;i++){const{line:o,error:a,pc:c,scratch:u,stack:l}=e.trace[i],h=void 0!==u?u:[],d=i>0&&void 0!==e.trace[i-1].scratch?e.trace[i-1].scratch:[],p=""===a?t[o]:`!! ${a} !!`;s.push([c.toString().padEnd(3," "),o.toString().padEnd(3," "),Jn(p,n),Jn(Xn(d,h),n),Jn(Zn(l,r.topOfStackFirst),n)])}const i=s.reduce(((e,t)=>{const r=new Array(s[0].length).fill(0);for(let n=0;n<e.length;n++)r[n]=t[n].length>e[n]?t[n].length:e[n];return r}),new Array(s[0].length).fill(0));return`${s.map((e=>e.map(((e,t)=>e.padEnd(i[t]+1," "))).join("|").trim())).join("\n")}\n`}appTrace(e){if(void 0===this.appCallTrace||!this.disassembly)return"";let t=e;return void 0===e&&(t={maxValueWidth:30,topOfStackFirst:!1}),Qn.trace(this.appCallTrace,this.disassembly,t)}lsigTrace(e){if(void 0===this.logicSigTrace||void 0===this.logicSigDisassembly)return"";let t=e;return void 0===e&&(t={maxValueWidth:30,topOfStackFirst:!0}),Qn.trace(this.logicSigTrace,this.logicSigDisassembly,t)}}class es{constructor(e){this.error="",this.protocolVersion="",this.txns=[],this.error=e.error,this.protocolVersion=e["protocol-version"],this.txns=e.txns.map((e=>new Qn(e)))}}function ts(e,t,r,n,s,i,o){const a={from:e,to:t,amount:r,closeRemainderTo:n,note:s,suggestedParams:i,type:C.pay,reKeyTo:o};return new z(a)}function rs(e){return ts(e.from,e.to,e.amount,e.closeRemainderTo,e.note,e.suggestedParams,e.rekeyTo)}function ns(e,t,r,n,s,i,o,a,c,u=!1,l){const h={from:e,note:t,voteKey:r,selectionKey:n,voteFirst:s,voteLast:i,voteKeyDilution:o,suggestedParams:a,type:C.keyreg,reKeyTo:c,nonParticipation:u,stateProofKey:l};return new z(h)}function ss(e){return ns(e.from,e.note,e.voteKey,e.selectionKey,e.voteFirst,e.voteLast,e.voteKeyDilution,e.suggestedParams,e.rekeyTo,e.nonParticipation,e.stateProofKey)}function is(e,t,r,n,s,i,o,a,c,u,l,h,d,p,f){const g={from:e,note:t,suggestedParams:p,assetTotal:r,assetDecimals:n,assetDefaultFrozen:s,assetUnitName:u,assetName:l,assetURL:h,assetMetadataHash:d,assetManager:i,assetReserve:o,assetFreeze:a,assetClawback:c,type:C.acfg,reKeyTo:f};return new z(g)}function os(e){return is(e.from,e.note,e.total,e.decimals,e.defaultFrozen,e.manager,e.reserve,e.freeze,e.clawback,e.unitName,e.assetName,e.assetURL,e.assetMetadataHash,e.suggestedParams,e.rekeyTo)}function as(e,t,r,n,s,i,o,a,c=!0,u){if(c&&(void 0===n||void 0===s||void 0===i||void 0===o))throw Error("strict empty address checking was turned on, but at least one empty address was provided");const l={from:e,suggestedParams:a,assetIndex:r,assetManager:n,assetReserve:s,assetFreeze:i,assetClawback:o,type:C.acfg,note:t,reKeyTo:u};return new z(l)}function cs(e){return as(e.from,e.note,e.assetIndex,e.manager,e.reserve,e.freeze,e.clawback,e.suggestedParams,e.strictEmptyAddressChecking,e.rekeyTo)}function us(e,t,r,n,s){const i={from:e,suggestedParams:n,assetIndex:r,type:C.acfg,note:t,reKeyTo:s};return new z(i)}function ls(e){return us(e.from,e.note,e.assetIndex,e.suggestedParams,e.rekeyTo)}function hs(e,t,r,n,s,i,o){const a={from:e,type:C.afrz,freezeAccount:n,assetIndex:r,freezeState:s,note:t,suggestedParams:i,reKeyTo:o};return new z(a)}function ds(e){return hs(e.from,e.note,e.assetIndex,e.freezeTarget,e.freezeState,e.suggestedParams,e.rekeyTo)}function ps(e,t,r,n,s,i,o,a,c){const u={type:C.axfer,from:e,to:t,amount:s,suggestedParams:a,assetIndex:o,note:i,assetRevocationTarget:n,closeRemainderTo:r,reKeyTo:c};return new z(u)}function fs(e){return ps(e.from,e.to,e.closeRemainderTo,e.revocationTarget,e.amount,e.note,e.assetIndex,e.suggestedParams,e.rekeyTo)}function gs(e,t,r,n,s,i,o,a,c,u,l,h,d,p,f,g,m,y){const w={type:C.appl,from:e,suggestedParams:t,appIndex:0,appOnComplete:r,appLocalInts:i,appLocalByteSlices:o,appGlobalInts:a,appGlobalByteSlices:c,appApprovalProgram:n,appClearProgram:s,appArgs:u,appAccounts:l,appForeignApps:h,appForeignAssets:d,boxes:y,note:p,lease:f,reKeyTo:g,extraPages:m};return new z(w)}function ms(e){return gs(e.from,e.suggestedParams,e.onComplete,e.approvalProgram,e.clearProgram,e.numLocalInts,e.numLocalByteSlices,e.numGlobalInts,e.numGlobalByteSlices,e.appArgs,e.accounts,e.foreignApps,e.foreignAssets,e.note,e.lease,e.rekeyTo,e.extraPages,e.boxes)}function ys(e,t,r,n,s,i,o,a,c,u,l,h,d){const p={type:C.appl,from:e,suggestedParams:t,appIndex:r,appApprovalProgram:n,appOnComplete:L.UpdateApplicationOC,appClearProgram:s,appArgs:i,appAccounts:o,appForeignApps:a,appForeignAssets:c,boxes:d,note:u,lease:l,reKeyTo:h};return new z(p)}function ws(e){return ys(e.from,e.suggestedParams,e.appIndex,e.approvalProgram,e.clearProgram,e.appArgs,e.accounts,e.foreignApps,e.foreignAssets,e.note,e.lease,e.rekeyTo,e.boxes)}function bs(e,t,r,n,s,i,o,a,c,u,l){const h={type:C.appl,from:e,suggestedParams:t,appIndex:r,appOnComplete:L.DeleteApplicationOC,appArgs:n,appAccounts:s,appForeignApps:i,appForeignAssets:o,boxes:l,note:a,lease:c,reKeyTo:u};return new z(h)}function vs(e){return bs(e.from,e.suggestedParams,e.appIndex,e.appArgs,e.accounts,e.foreignApps,e.foreignAssets,e.note,e.lease,e.rekeyTo,e.boxes)}function xs(e,t,r,n,s,i,o,a,c,u,l){const h={type:C.appl,from:e,suggestedParams:t,appIndex:r,appOnComplete:L.OptInOC,appArgs:n,appAccounts:s,appForeignApps:i,appForeignAssets:o,boxes:l,note:a,lease:c,reKeyTo:u};return new z(h)}function As(e){return xs(e.from,e.suggestedParams,e.appIndex,e.appArgs,e.accounts,e.foreignApps,e.foreignAssets,e.note,e.lease,e.rekeyTo,e.boxes)}function _s(e,t,r,n,s,i,o,a,c,u,l){const h={type:C.appl,from:e,suggestedParams:t,appIndex:r,appOnComplete:L.CloseOutOC,appArgs:n,appAccounts:s,appForeignApps:i,appForeignAssets:o,boxes:l,note:a,lease:c,reKeyTo:u};return new z(h)}function Es(e){return _s(e.from,e.suggestedParams,e.appIndex,e.appArgs,e.accounts,e.foreignApps,e.foreignAssets,e.note,e.lease,e.rekeyTo,e.boxes)}function Ts(e,t,r,n,s,i,o,a,c,u,l){const h={type:C.appl,from:e,suggestedParams:t,appIndex:r,appOnComplete:L.ClearStateOC,appArgs:n,appAccounts:s,appForeignApps:i,appForeignAssets:o,boxes:l,note:a,lease:c,reKeyTo:u};return new z(h)}function Ss(e){return Ts(e.from,e.suggestedParams,e.appIndex,e.appArgs,e.accounts,e.foreignApps,e.foreignAssets,e.note,e.lease,e.rekeyTo,e.boxes)}function ks(e,t,r,n,s,i,o,a,c,u,l){const h={type:C.appl,from:e,suggestedParams:t,appIndex:r,appOnComplete:L.NoOpOC,appArgs:n,appAccounts:s,appForeignApps:i,appForeignAssets:o,boxes:l,note:a,lease:c,reKeyTo:u};return new z(h)}function Rs(e){return ks(e.from,e.suggestedParams,e.appIndex,e.appArgs,e.accounts,e.foreignApps,e.foreignAssets,e.note,e.lease,e.rekeyTo,e.boxes)}function Is(e){const t={type:C.appl,from:e.from,suggestedParams:e.suggestedParams,appIndex:e.appIndex,appOnComplete:e.onComplete,appLocalInts:e.numLocalInts,appLocalByteSlices:e.numLocalByteSlices,appGlobalInts:e.numGlobalInts,appGlobalByteSlices:e.numGlobalByteSlices,appApprovalProgram:e.approvalProgram,appClearProgram:e.clearProgram,appArgs:e.appArgs,appAccounts:e.accounts,appForeignApps:e.foreignApps,appForeignAssets:e.foreignAssets,boxes:e.boxes,note:e.note,lease:e.lease,reKeyTo:e.rekeyTo,extraPages:e.extraPages};return new z(t)}function Bs(e){return(t,r)=>{const n=[];for(const s of r)n.push(t[s].signTxn(e.sk));return Promise.resolve(n)}}function Us(e){return(t,r)=>{const n=[];for(const s of r){const{blob:r}=Dn(t[s],e);n.push(r)}return Promise.resolve(n)}}function Ps(e,t){return(r,n)=>{const s=[];for(const i of n){const n=r[i],o=[];for(const r of t){const{blob:t}=Rn(n,e,r);o.push(t)}s.push(Sn(o))}return Promise.resolve(s)}}function js(e){return"object"==typeof e&&2===Object.keys(e).length&&"object"==typeof e.txn&&"function"==typeof e.signer}const qs=65535,Ds=32,$s=1,Os=1,Cs=2,Ls=/^([a-z\d[\](),]+)\[(0|[1-9][\d]*)]$/,Ms=/^ufixed([1-9][\d]*)x([1-9][\d]*)$/;class Ns{static from(e){if(e.endsWith("[]")){const t=Ns.from(e.slice(0,e.length-2));return new Ys(t)}if(e.endsWith("]")){const t=e.match(Ls);if(3!==t.length)throw new Error(`malformed static array string: ${e}`);const r=t[2],n=parseInt(r,10);if(n>qs)throw new Error(`array length exceeds limit ${qs}`);const s=Ns.from(t[1]);return new Gs(s,n)}if(e.startsWith("uint")){const t=e=>[...e].every((e=>"0123456789".includes(e))),r=e.slice(4,e.length);if(!t(r))throw new Error(`malformed uint string: ${r}`);const n=parseInt(r,10);if(n>qs)throw new Error(`malformed uint string: ${n}`);return new Fs(n)}if("byte"===e)return new Vs;if(e.startsWith("ufixed")){const t=e.match(Ms);if(3!==t.length)throw new Error(`malformed ufixed type: ${e}`);const r=parseInt(t[1],10),n=parseInt(t[2],10);return new Ks(r,n)}if("bool"===e)return new zs;if("address"===e)return new Ws;if("string"===e)return new Hs;if(e.length>=2&&"("===e[0]&&")"===e[e.length-1]){const t=Js.parseTupleContent(e.slice(1,e.length-1)),r=[];for(let e=0;e<t.length;e++){const n=Ns.from(t[e]);r.push(n)}return new Js(r)}throw new Error(`cannot convert a string ${e} to an ABI type`)}}class Fs extends Ns{constructor(e){if(super(),e%8!=0||e<8||e>512)throw new Error(`unsupported uint type bitSize: ${e}`);this.bitSize=e}toString(){return`uint${this.bitSize}`}equals(e){return e instanceof Fs&&this.bitSize===e.bitSize}isDynamic(){return!1}byteLen(){return this.bitSize/8}encode(e){if("bigint"!=typeof e&&"number"!=typeof e)throw new Error(`Cannot encode value as uint${this.bitSize}: ${e}`);if(e>=BigInt(2**this.bitSize)||e<BigInt(0))throw new Error(`${e} is not a non-negative int or too big to fit in size uint${this.bitSize}`);if("number"==typeof e&&!Number.isSafeInteger(e))throw new Error(`${e} should be converted into a BigInt before it is encoded`);return nn(e,this.bitSize/8)}decode(e){if(e.length!==this.bitSize/8)throw new Error(`byte string must correspond to a uint${this.bitSize}`);return sn(e)}}class Ks extends Ns{constructor(e,t){if(super(),e%8!=0||e<8||e>512)throw new Error(`unsupported ufixed type bitSize: ${e}`);if(t>160||t<1)throw new Error(`unsupported ufixed type precision: ${t}`);this.bitSize=e,this.precision=t}toString(){return`ufixed${this.bitSize}x${this.precision}`}equals(e){return e instanceof Ks&&this.bitSize===e.bitSize&&this.precision===e.precision}isDynamic(){return!1}byteLen(){return this.bitSize/8}encode(e){if("bigint"!=typeof e&&"number"!=typeof e)throw new Error(`Cannot encode value as ${this.toString()}: ${e}`);if(e>=BigInt(2**this.bitSize)||e<BigInt(0))throw new Error(`${e} is not a non-negative int or too big to fit in size ${this.toString()}`);if("number"==typeof e&&!Number.isSafeInteger(e))throw new Error(`${e} should be converted into a BigInt before it is encoded`);return nn(e,this.bitSize/8)}decode(e){if(e.length!==this.bitSize/8)throw new Error(`byte string must correspond to a ${this.toString()}`);return sn(e)}}class Ws extends Ns{toString(){return"address"}equals(e){return e instanceof Ws}isDynamic(){return!1}byteLen(){return Ds}encode(e){if("string"!=typeof e&&!(e instanceof Uint8Array))throw new Error(`Cannot encode value as ${this.toString()}: ${e}`);if("string"==typeof e)return P(e).publicKey;if(32!==e.byteLength)throw new Error("byte string must be 32 bytes long for an address");return e}decode(e){if(32!==e.byteLength)throw new Error("byte string must be 32 bytes long for an address");return q(e)}}class zs extends Ns{toString(){return"bool"}equals(e){return e instanceof zs}isDynamic(){return!1}byteLen(){return Os}encode(e){if("boolean"!=typeof e)throw new Error(`Cannot encode value as bool: ${e}`);return e?new Uint8Array([128]):new Uint8Array([0])}decode(e){if(1!==e.byteLength)throw new Error("bool string must be 1 byte long");const t=e[0];if(128===t)return!0;if(0===t)return!1;throw new Error("boolean could not be decoded from the byte string")}}class Vs extends Ns{toString(){return"byte"}equals(e){return e instanceof Vs}isDynamic(){return!1}byteLen(){return $s}encode(e){if("number"!=typeof e&&"bigint"!=typeof e)throw new Error(`Cannot encode value as byte: ${e}`);if("bigint"==typeof e&&(e=Number(e)),e<0||e>255)throw new Error(`${e} cannot be encoded into a byte`);return new Uint8Array([e])}decode(e){if(1!==e.byteLength)throw new Error("byte string must be 1 byte long");return e[0]}}class Hs extends Ns{toString(){return"string"}equals(e){return e instanceof Hs}isDynamic(){return!0}byteLen(){throw new Error(`${this.toString()} is a dynamic type`)}encode(e){if("string"!=typeof e&&!(e instanceof Uint8Array))throw new Error(`Cannot encode value as string: ${e}`);const t=i.lW.from(e),r=nn(t.length,Cs),n=new Uint8Array(t.length+Cs);return n.set(r),n.set(t,Cs),n}decode(e){if(e.length<Cs)throw new Error(`byte string is too short to be decoded. Actual length is ${e.length}, but expected at least ${Cs}`);const t=i.lW.from(e).readUIntBE(0,Cs),r=e.slice(Cs,e.length);if(t!==r.length)throw new Error(`string length bytes do not match the actual length of string. Expected ${t}, got ${r.length}`);return i.lW.from(r).toString("utf-8")}}class Gs extends Ns{constructor(e,t){if(super(),t<0)throw new Error(`static array must have a non negative length: ${t}`);this.childType=e,this.staticLength=t}toString(){return`${this.childType.toString()}[${this.staticLength}]`}equals(e){return e instanceof Gs&&this.staticLength===e.staticLength&&this.childType.equals(e.childType)}isDynamic(){return this.childType.isDynamic()}byteLen(){return this.childType.constructor===zs?Math.ceil(this.staticLength/8):this.staticLength*this.childType.byteLen()}encode(e){if(!(Array.isArray(e)||e instanceof Uint8Array))throw new Error(`Cannot encode value as ${this.toString()}: ${e}`);if(e.length!==this.staticLength)throw new Error(`Value array does not match static array length. Expected ${this.staticLength}, got ${e.length}`);return this.toABITupleType().encode(e)}decode(e){return this.toABITupleType().decode(e)}toABITupleType(){return new Js(Array(this.staticLength).fill(this.childType))}}class Ys extends Ns{constructor(e){super(),this.childType=e}toString(){return`${this.childType.toString()}[]`}equals(e){return e instanceof Ys&&this.childType.equals(e.childType)}isDynamic(){return!0}byteLen(){throw new Error(`${this.toString()} is a dynamic type`)}encode(e){if(!(Array.isArray(e)||e instanceof Uint8Array))throw new Error(`Cannot encode value as ${this.toString()}: ${e}`);const t=this.toABITupleType(e.length),r=t.encode(e);return S(nn(t.childTypes.length,Cs),r)}decode(e){const t=i.lW.from(e).readUIntBE(0,Cs);return this.toABITupleType(t).decode(e.slice(Cs,e.length))}toABITupleType(e){return new Js(Array(e).fill(this.childType))}}class Js extends Ns{constructor(e){if(super(),e.length>=qs)throw new Error("tuple type child type number larger than maximum uint16 error");this.childTypes=e}toString(){const e=[];for(let t=0;t<this.childTypes.length;t++)e[t]=this.childTypes[t].toString();return`(${e.join(",")})`}equals(e){return e instanceof Js&&this.childTypes.length===e.childTypes.length&&this.childTypes.every(((t,r)=>t.equals(e.childTypes[r])))}isDynamic(){return this.childTypes.some((e=>e.isDynamic()))}byteLen(){let e=0;for(let t=0;t<this.childTypes.length;t++)if(this.childTypes[t].constructor===zs){const r=Zs(this.childTypes,t,1),n=r+1;t+=r,e+=Math.trunc((n+7)/8)}else e+=this.childTypes[t].byteLen();return e}encode(e){if(!(Array.isArray(e)||e instanceof Uint8Array))throw new Error(`Cannot encode value as ${this.toString()}: ${e}`);const t=Array.from(e);if(e.length>qs)throw new Error("length of tuple array should not exceed a uint16");const r=this.childTypes,n=[],s=[],i=new Map;let o=0;for(;o<r.length;){const e=r[o];if(e.isDynamic())i.set(n.length,!0),n.push(new Uint8Array([0,0])),s.push(e.encode(t[o]));else{if(e.constructor===zs){const e=Zs(r,o,-1);let s=Zs(r,o,1);if(e%8!=0)throw new Error("expected before index should have number of bool mod 8 equal 0");s=Math.min(7,s);const i=Xs(t.slice(o,o+s+1));n.push(nn(i,1)),o+=s}else{const r=e.encode(t[o]);n.push(r)}i.set(o,!1),s.push(new Uint8Array)}o+=1}let a=0;for(const e of n)a+=e.length;let c=0;for(let e=0;e<n.length;e++){if(i.get(e)){const t=a+c;if(t>qs)throw new Error(`byte length of ${t} should not exceed a uint16`);n[e]=nn(t,Cs)}c+=s[e].length}return S(...n,...s)}decode(e){const t=this.childTypes,r=[],n=[];let s=0,o=0;const a=i.lW.from(e);for(;s<t.length;){const i=t[s];if(i.isDynamic()){if(e.slice(o,e.length).length<Cs)throw new Error("dynamic type in tuple is too short to be decoded");const t=a.readUIntBE(o,Cs);if(r.length>0&&(r[r.length-1].right=t,t<r[r.length-1].left))throw new Error("dynamic index segment miscalculation: left is greater than right index");const s={left:t,right:-1};r.push(s),n.push(null),o+=Cs}else if(i.constructor===zs){const t=Zs(this.childTypes,s,-1);let r=Zs(this.childTypes,s,1);if(t%8!=0)throw new Error("expected before bool number mod 8 === 0");r=Math.min(7,r);for(let t=0;t<=r;t++){const r=128>>t;(e[o]&r)>0?n.push(new Uint8Array([128])):n.push(new Uint8Array([0]))}s+=r,o+=1}else{const t=i.byteLen();n.push(e.slice(o,o+t)),o+=t}if(s!==t.length-1&&o>=e.length)throw new Error("input byte not enough to decode");s+=1}if(r.length>0&&(r[r.length-1].right=e.length,o=e.length),o<e.length)throw new Error("input byte not fully consumed");for(let e=0;e<r.length;e++){const t=r[e];if(t.left>t.right)throw new Error("dynamic segment should display a [l, r] space with l <= r");if(e!==r.length-1&&t.right!==r[e+1].left)throw new Error("dynamic segment should be consecutive")}let c=0;for(let s=0;s<t.length;s++)t[s].isDynamic()&&(n[s]=e.slice(r[c].left,r[c].right),c+=1);const u=[];for(let e=0;e<t.length;e++){const r=t[e].decode(n[e]);u.push(r)}return u}static parseTupleContent(e){if(0===e.length)return[];if(e.endsWith(",")||e.startsWith(","))throw new Error("tuple string should not start with comma");if(e.includes(",,"))throw new Error("tuple string should not have consecutive commas");const t=[];let r=0,n="";for(const s of e)n+=s,"("===s?r+=1:")"===s?r-=1:","===s&&0===r&&(t.push(n.slice(0,n.length-1)),n="");if(0!==n.length&&t.push(n),0!==r)throw new Error("tuple string has mismatched parentheses");return t}}function Xs(e){let t=0;if(e.length>8)throw new Error("value list passed in should be no greater than length 8");for(let r=0;r<e.length;r++){const n=e[r];if("boolean"!=typeof n)throw new Error("non-boolean values cannot be compressed into a byte");n&&(t|=1<<7-r)}return t}function Zs(e,t,r){let n=0;for(;;){const s=t+r*n;if(e[s].constructor!==zs){n-=1;break}if(s!==e.length-1&&1===r)n+=1;else{if(!(s>0&&-1===r))break;n+=1}}return n}var Qs,ei;function ti(e){return e===Qs.any||e===Qs.pay||e===Qs.keyreg||e===Qs.acfg||e===Qs.axfer||e===Qs.afrz||e===Qs.appl}function ri(e,t){return e===Qs.any||t.type&&t.type.toString()===e.toString()}function ni(e){return e===ei.account||e===ei.application||e===ei.asset}!function(e){e.any="txn",e.pay="pay",e.keyreg="keyreg",e.acfg="acfg",e.axfer="axfer",e.afrz="afrz",e.appl="appl"}(Qs||(Qs={})),function(e){e.account="account",e.application="application",e.asset="asset"}(ei||(ei={}));class si{constructor(e){if("string"!=typeof e.name||"object"!=typeof e.returns||!Array.isArray(e.args))throw new Error("Invalid ABIMethod parameters");this.name=e.name,this.description=e.desc,this.args=e.args.map((({type:e,name:t,desc:r})=>ti(e)||ni(e)?{type:e,name:t,description:r}:{type:Ns.from(e),name:t,description:r})),this.returns={type:"void"===e.returns.type?e.returns.type:Ns.from(e.returns.type),description:e.returns.desc}}getSignature(){const e=this.args.map((e=>e.type.toString())).join(","),t=this.returns.type.toString();return`${this.name}(${e})${t}`}getSelector(){const e=l(this.getSignature());return new Uint8Array(e.slice(0,4))}txnCount(){let e=1;for(const t of this.args)"string"==typeof t.type&&ti(t.type)&&(e+=1);return e}toJSON(){return{name:this.name,desc:this.description,args:this.args.map((({type:e,name:t,description:r})=>({type:e.toString(),name:t,desc:r}))),returns:{type:this.returns.type.toString(),desc:this.returns.description}}}static fromSignature(e){const{name:t,args:r,returns:n}=function(e){const t=e.indexOf("(");if(-1===t)throw new Error(`Invalid method signature: ${e}`);let r=-1,n=0;for(let s=t;s<e.length;s++){const t=e[s];if("("===t)n+=1;else if(")"===t){if(0===n)break;if(n-=1,0===n){r=s;break}}}if(-1===r)throw new Error(`Invalid method signature: ${e}`);return{name:e.slice(0,t),args:Js.parseTupleContent(e.slice(t+1,r)),returns:e.slice(r+1)}}(e);return new si({name:t,args:r.map((e=>({type:e}))),returns:{type:n}})}}function ii(e,t){if(null===e||!Array.isArray(e)||!e.every((e=>e instanceof si)))throw new Error("Methods list provided is null or not the correct type");const r=e.filter((e=>e.name===t));if(r.length>1)throw new Error(`found ${r.length} methods with the same name ${r.map((e=>e.getSignature())).join(",")}`);if(0===r.length)throw new Error(`found 0 methods with the name ${t}`);return r[0]}class oi{constructor(e){if("string"!=typeof e.name||!Array.isArray(e.methods)||e.networks&&"object"!=typeof e.networks)throw new Error("Invalid ABIContract parameters");this.name=e.name,this.description=e.desc,this.networks=e.networks?{...e.networks}:{},this.methods=e.methods.map((e=>new si(e)))}toJSON(){return{name:this.name,desc:this.description,networks:this.networks,methods:this.methods.map((e=>e.toJSON()))}}getMethodByName(e){return ii(this.methods,e)}}class ai{constructor(e){if("string"!=typeof e.name||!Array.isArray(e.methods))throw new Error("Invalid ABIInterface parameters");this.name=e.name,this.description=e.desc,this.methods=e.methods.map((e=>new si(e)))}toJSON(){return{name:this.name,desc:this.description,methods:this.methods.map((e=>e.toJSON()))}}getMethodByName(e){return ii(this.methods,e)}}const ci=i.lW.from([21,31,124,117]);var ui;function li(e,t,r){if(null!=r&&e===r)return 0;const n=null==r?0:1;for(let r=0;r<t.length;r++)if(e===t[r])return r+n;return t.push(e),t.length-1+n}!function(e){e[e.BUILDING=0]="BUILDING",e[e.BUILT=1]="BUILT",e[e.SIGNED=2]="SIGNED",e[e.SUBMITTED=3]="SUBMITTED",e[e.COMMITTED=4]="COMMITTED"}(ui||(ui={}));class hi{constructor(){this.status=ui.BUILDING,this.transactions=[],this.methodCalls=new Map,this.signedTxns=[],this.txIDs=[]}getStatus(){return this.status}count(){return this.transactions.length}clone(){const e=new hi;return e.transactions=this.transactions.map((({txn:e,signer:t})=>({txn:z.from_obj_for_encoding({...e.get_obj_for_encoding(),grp:void 0}),signer:t}))),e.methodCalls=new Map(this.methodCalls),e}addTransaction(e){if(this.status!==ui.BUILDING)throw new Error("Cannot add transactions when composer status is not BUILDING");if(this.transactions.length===hi.MAX_GROUP_SIZE)throw new Error(`Adding an additional transaction exceeds the maximum atomic group size of ${hi.MAX_GROUP_SIZE}`);if(e.txn.group&&e.txn.group.some((e=>0!==e)))throw new Error("Cannot add a transaction with nonzero group ID");this.transactions.push(e)}addMethodCall({appID:e,method:t,methodArgs:r,sender:n,suggestedParams:s,onComplete:i,approvalProgram:o,clearProgram:a,numGlobalInts:c,numGlobalByteSlices:u,numLocalInts:l,numLocalByteSlices:h,extraPages:d,appAccounts:p,appForeignApps:f,appForeignAssets:g,boxes:m,note:y,lease:w,rekeyTo:b,signer:v}){if(this.status!==ui.BUILDING)throw new Error("Cannot add transactions when composer status is not BUILDING");if(this.transactions.length+t.txnCount()>hi.MAX_GROUP_SIZE)throw new Error(`Adding additional transactions exceeds the maximum atomic group size of ${hi.MAX_GROUP_SIZE}`);if(0===e){if(null==o||null==a||null==c||null==u||null==l||null==h)throw new Error("One of the following required parameters for application creation is missing: approvalProgram, clearProgram, numGlobalInts, numGlobalByteSlices, numLocalInts, numLocalByteSlices")}else if(i===L.UpdateApplicationOC){if(null==o||null==a)throw new Error("One of the following required parameters for OnApplicationComplete.UpdateApplicationOC is missing: approvalProgram, clearProgram");if(null!=c||null!=u||null!=l||null!=h||null!=d)throw new Error("One of the following application creation parameters were set on a non-creation call: numGlobalInts, numGlobalByteSlices, numLocalInts, numLocalByteSlices, extraPages")}else if(null!=o||null!=a||null!=c||null!=u||null!=l||null!=h||null!=d)throw new Error("One of the following application creation parameters were set on a non-creation call: approvalProgram, clearProgram, numGlobalInts, numGlobalByteSlices, numLocalInts, numLocalByteSlices, extraPages");if(null==r&&(r=[]),r.length!==t.args.length)throw new Error(`Incorrect number of method arguments. Expected ${t.args.length}, got ${r.length}`);let x=[],A=[];const _=[],E=[],T=[],S=new Map,k=m||[];for(let e=0;e<r.length;e++){let n=t.args[e].type;const s=r[e];if(ti(n)){if(!js(s)||!ri(n,s.txn))throw new Error(`Expected ${n} transaction for argument at index ${e}`);if(s.txn.group&&s.txn.group.some((e=>0!==e)))throw new Error("Cannot add a transaction with nonzero group ID");_.push(s)}else{if(js(s))throw new Error(`Expected non-transaction value for argument at index ${e}`);if(ni(n)&&(S.set(E.length,x.length),E.push(n),T.push(s),n=new Fs(8)),"string"==typeof n)throw new Error(`Unknown ABI type: ${n}`);x.push(n),A.push(s)}}const R=[],I=null==p?[]:p.slice(),B=null==f?[]:f.slice(),U=null==g?[]:g.slice();for(let t=0;t<E.length;t++){const r=E[t],s=T[t];let i=0;switch(r){case ei.account:{const e=new Ws;i=li(e.decode(e.encode(s)),I,n);break}case ei.application:{const t=new Fs(64),r=t.decode(t.encode(s));if(r>Number.MAX_SAFE_INTEGER)throw new Error(`Expected safe integer for application value, got ${r}`);i=li(Number(r),B,e);break}case ei.asset:{const e=new Fs(64),t=e.decode(e.encode(s));if(t>Number.MAX_SAFE_INTEGER)throw new Error(`Expected safe integer for asset value, got ${t}`);i=li(Number(t),U);break}default:throw new Error(`Unknown reference type: ${r}`)}R.push(i)}for(let e=0;e<R.length;e++)A[S.get(e)]=R[e];if(x.length>15){const e=x.slice(14),t=A.slice(14);x=x.slice(0,14),A=A.slice(0,14),x.push(new Js(e)),A.push(t)}const P=[t.getSelector()];for(let e=0;e<x.length;e++)P.push(x[e].encode(A[e]));const j={txn:Is({from:n,appIndex:e,appArgs:P,accounts:I,foreignApps:B,foreignAssets:U,boxes:k,onComplete:null==i?L.NoOpOC:i,approvalProgram:o,clearProgram:a,numGlobalInts:c,numGlobalByteSlices:u,numLocalInts:l,numLocalByteSlices:h,extraPages:d,lease:w,note:y,rekeyTo:b,suggestedParams:s}),signer:v};this.transactions.push(..._,j),this.methodCalls.set(this.transactions.length-1,t)}buildGroup(){if(this.status===ui.BUILDING){if(0===this.transactions.length)throw new Error("Cannot build a group with 0 transactions");this.transactions.length>1&&vn(this.transactions.map((e=>e.txn))),this.status=ui.BUILT}return this.transactions}async gatherSignatures(){if(this.status>=ui.SIGNED)return this.signedTxns;const e=this.buildGroup(),t=e.map((e=>e.txn)),r=new Map;for(let t=0;t<e.length;t++){const{signer:n}=e[t];r.has(n)||r.set(n,[]),r.get(n).push(t)}const n=Array.from(r),s=await Promise.all(n.map((([e,r])=>e(t,r)))),i=e.map((()=>null));for(let e=0;e<n.length;e++){const t=n[e][1],r=s[e];for(let e=0;e<t.length;e++)i[t[e]]=r[e]}if(!i.every((e=>null!=e)))throw new Error(`Missing signatures. Got ${i}`);const o=i.map(((e,t)=>{try{return G(e).txn.txID()}catch(e){throw new Error(`Cannot decode signed transaction at index ${t}. ${e}`)}}));return this.signedTxns=i,this.txIDs=o,this.status=ui.SIGNED,i}async submit(e){if(this.status>ui.SUBMITTED)throw new Error("Transaction group cannot be resubmitted");const t=await this.gatherSignatures();return await e.sendRawTransaction(t).do(),this.status=ui.SUBMITTED,this.txIDs}async execute(e,t){if(this.status===ui.COMMITTED)throw new Error("Transaction group has already been executed successfully");const r=await this.submit(e);this.status=ui.SUBMITTED;const n=this.transactions.findIndex(((e,t)=>this.methodCalls.has(t))),s=-1===n?0:n,o=await rn(e,r[s],t);this.status=ui.COMMITTED;const a=o["confirmed-round"],c=[];for(const[t,s]of this.methodCalls){const a=r[t],u={txID:a,rawReturnValue:new Uint8Array,method:s};try{const r=t===n?o:await e.pendingTransactionInformation(a).do();if(u.txInfo=r,"void"!==s.returns.type){const e=r.logs||[];if(0===e.length)throw new Error("App call transaction did not log a return value");const t=i.lW.from(e[e.length-1],"base64");if(t.byteLength<4||!t.slice(0,4).equals(ci))throw new Error("App call transaction did not log a return value");u.rawReturnValue=new Uint8Array(t.slice(4)),u.returnValue=s.returns.type.decode(u.rawReturnValue)}}catch(e){u.decodeError=e}c.push(u)}return{confirmedRound:a,txIDs:r,methodResults:c}}}hi.MAX_GROUP_SIZE=16;const di=i.lW.from([77,88]),pi="The transaction sender address and multisig preimage do not match.";function fi(e,t){if(void 0===e.from){const r=p(t);e.from=q(r.publicKey)}const r=Y(e);return{txID:r.txID().toString(),blob:r.signTxn(t)}}function gi(e,t){return new J(e).signBid(t)}function mi(e,t){return f(i.lW.from(S(di,e)),t)}function yi(e,t,r){return m(i.lW.from(S(di,e)),t,P(r).publicKey)}function wi(e){return new Uint8Array(N(e))}function bi(e){return F(e)}const vi=new Error(pi),xi=new Error(Z),Ai=s})(),n})()));
|
|
3
3
|
//# sourceMappingURL=algosdk.min.js.map
|