@swapkit/core 1.0.0-rc.0 → 1.0.0-rc.2
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/dist/index.cjs +2 -2
- package/dist/index.es.js +124 -114
- package/package.json +13 -7
- package/dist/index.es-320ea117.js +0 -13836
- package/dist/index.es-66e7d15a.js +0 -11436
- package/dist/index.es-8503fb04-8503fb04.js +0 -34669
- package/dist/index.es-8503fb04-903b9173.cjs +0 -1
- package/dist/index.es-c82b553a.cjs +0 -14
- package/dist/index.es-e22f22e9.cjs +0 -1
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const index=require("./index.cjs");var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getAugmentedNamespace(i){if(i.__esModule)return i;var n=i.default;if(typeof n=="function"){var a=function u(){return this instanceof u?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};a.prototype=n.prototype}else a={};return Object.defineProperty(a,"__esModule",{value:!0}),Object.keys(i).forEach(function(u){var l=Object.getOwnPropertyDescriptor(i,u);Object.defineProperty(a,u,l.get?l:{enumerable:!0,get:function(){return i[u]}})}),a}var protocolBuffersEncodings={},encode_1=encode$1,MSB$1=128,REST$1=127,MSBALL=~REST$1,INT=Math.pow(2,31);function encode$1(i,n,a){n=n||[],a=a||0;for(var u=a;i>=INT;)n[a++]=i&255|MSB$1,i/=128;for(;i&MSBALL;)n[a++]=i&255|MSB$1,i>>>=7;return n[a]=i|0,encode$1.bytes=a-u+1,n}var decode$1=read,MSB=128,REST=127;function read(i,u){var a=0,u=u||0,l=0,c=u,S,I=i.length;do{if(c>=I)throw read.bytes=0,new RangeError("Could not decode varint");S=i[c++],a+=l<28?(S&REST)<<l:(S&REST)*Math.pow(2,l),l+=7}while(S>=MSB);return read.bytes=c-u,a}var N1=Math.pow(2,7),N2=Math.pow(2,14),N3=Math.pow(2,21),N4=Math.pow(2,28),N5=Math.pow(2,35),N6=Math.pow(2,42),N7=Math.pow(2,49),N8=Math.pow(2,56),N9=Math.pow(2,63),length=function(i){return i<N1?1:i<N2?2:i<N3?3:i<N4?4:i<N5?5:i<N6?6:i<N7?7:i<N8?8:i<N9?9:10},varint$1={encode:encode_1,decode:decode$1,encodingLength:length},signedVarint={},varint=varint$1;signedVarint.encode=function i(n,a,u){n=n>=0?n*2:n*-2-1;var l=varint.encode(n,a,u);return i.bytes=varint.encode.bytes,l};signedVarint.decode=function i(n,a){var u=varint.decode(n,a);return i.bytes=varint.decode.bytes,u&1?(u+1)/-2:u/2};signedVarint.encodingLength=function(i){return varint.encodingLength(i>=0?i*2:i*-2-1)};var browser={exports:{}};function byteLength$5(i){return i.length}function toString$4(i){const n=i.byteLength;let a="";for(let u=0;u<n;u++)a+=String.fromCharCode(i[u]);return a}function write$4(i,n,a=0,u=byteLength$5(n)){const l=Math.min(u,i.byteLength-a);for(let c=0;c<l;c++)i[a+c]=n.charCodeAt(c);return l}var ascii$1={byteLength:byteLength$5,toString:toString$4,write:write$4};const alphabet$1="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",codes=new Uint8Array(256);for(let i=0;i<alphabet$1.length;i++)codes[alphabet$1.charCodeAt(i)]=i;codes[45]=62;codes[95]=63;function byteLength$4(i){let n=i.length;return i.charCodeAt(n-1)===61&&n--,n>1&&i.charCodeAt(n-1)===61&&n--,n*3>>>2}function toString$3(i){const n=i.byteLength;let a="";for(let u=0;u<n;u+=3)a+=alphabet$1[i[u]>>2]+alphabet$1[(i[u]&3)<<4|i[u+1]>>4]+alphabet$1[(i[u+1]&15)<<2|i[u+2]>>6]+alphabet$1[i[u+2]&63];return n%3===2?a=a.substring(0,a.length-1)+"=":n%3===1&&(a=a.substring(0,a.length-2)+"=="),a}function write$3(i,n,a=0,u=byteLength$4(n)){const l=Math.min(u,i.byteLength-a);for(let c=0,S=0;S<l;c+=4){const I=codes[n.charCodeAt(c)],y=codes[n.charCodeAt(c+1)],g=codes[n.charCodeAt(c+2)],N=codes[n.charCodeAt(c+3)];i[S++]=I<<2|y>>4,i[S++]=(y&15)<<4|g>>2,i[S++]=(g&3)<<6|N&63}return l}var base64$4={byteLength:byteLength$4,toString:toString$3,write:write$3};function byteLength$3(i){return i.length>>>1}function toString$2(i){const n=i.byteLength;i=new DataView(i.buffer,i.byteOffset,n);let a="",u=0;for(let l=n-n%4;u<l;u+=4)a+=i.getUint32(u).toString(16).padStart(8,"0");for(;u<n;u++)a+=i.getUint8(u).toString(16).padStart(2,"0");return a}function write$2(i,n,a=0,u=byteLength$3(n)){const l=Math.min(u,i.byteLength-a);for(let c=0;c<l;c++){const S=hexValue(n.charCodeAt(c*2)),I=hexValue(n.charCodeAt(c*2+1));if(S===void 0||I===void 0)return i.subarray(0,c);i[a+c]=S<<4|I}return l}var hex$1={byteLength:byteLength$3,toString:toString$2,write:write$2};function hexValue(i){if(i>=48&&i<=57)return i-48;if(i>=65&&i<=70)return i-65+10;if(i>=97&&i<=102)return i-97+10}function byteLength$2(i){let n=0;for(let a=0,u=i.length;a<u;a++){const l=i.charCodeAt(a);if(l>=55296&&l<=56319&&a+1<u){const c=i.charCodeAt(a+1);if(c>=56320&&c<=57343){n+=4,a++;continue}}l<=127?n+=1:l<=2047?n+=2:n+=3}return n}let toString$1;if(typeof TextDecoder<"u"){const i=new TextDecoder;toString$1=function(n){return i.decode(n)}}else toString$1=function(i){const n=i.byteLength;let a="",u=0;for(;u<n;){let l=i[u];if(l<=127){a+=String.fromCharCode(l),u++;continue}let c=0,S=0;if(l<=223?(c=1,S=l&31):l<=239?(c=2,S=l&15):l<=244&&(c=3,S=l&7),n-u-c>0){let I=0;for(;I<c;)l=i[u+I+1],S=S<<6|l&63,I+=1}else S=65533,c=n-u;a+=String.fromCodePoint(S),u+=c+1}return a};let write$1;if(typeof TextEncoder<"u"){const i=new TextEncoder;write$1=function(n,a,u=0,l=byteLength$2(a)){const c=Math.min(l,n.byteLength-u);return i.encodeInto(a,n.subarray(u,u+c)),c}}else write$1=function(i,n,a=0,u=byteLength$2(n)){const l=Math.min(u,i.byteLength-a);i=i.subarray(a,a+l);let c=0,S=0;for(;c<n.length;){const I=n.codePointAt(c);if(I<=127){i[S++]=I,c++;continue}let y=0,g=0;for(I<=2047?(y=6,g=192):I<=65535?(y=12,g=224):I<=2097151&&(y=18,g=240),i[S++]=g|I>>y,y-=6;y>=0;)i[S++]=128|I>>y&63,y-=6;c+=I>=65536?2:1}return l};var utf8$4={byteLength:byteLength$2,toString:toString$1,write:write$1};function byteLength$1(i){return i.length*2}function toString(i){const n=i.byteLength;let a="";for(let u=0;u<n-1;u+=2)a+=String.fromCharCode(i[u]+i[u+1]*256);return a}function write(i,n,a=0,u=byteLength$1(n)){const l=Math.min(u,i.byteLength-a);let c=l;for(let S=0;S<n.length&&!((c-=2)<0);++S){const I=n.charCodeAt(S),y=I>>8,g=I%256;i[a+S*2]=g,i[a+S*2+1]=y}return l}var utf16le={byteLength:byteLength$1,toString,write};(function(i,n){const a=ascii$1,u=base64$4,l=hex$1,c=utf8$4,S=utf16le,I=new Uint8Array(Uint16Array.of(255).buffer)[0]===255;function y(J){switch(J){case"ascii":return a;case"base64":return u;case"hex":return l;case"utf8":case"utf-8":case void 0:return c;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S;default:throw new Error(`Unknown encoding: ${J}`)}}function g(J){return J instanceof Uint8Array}function N(J){try{return y(J),!0}catch{return!1}}function F(J,it,ot){const at=new Uint8Array(J);return it!==void 0&&n.fill(at,it,0,at.byteLength,ot),at}function H(J){return new Uint8Array(J)}function G(J){return new Uint8Array(J)}function q(J,it){return y(it).byteLength(J)}function X(J,it){if(J===it)return 0;const ot=Math.min(J.byteLength,it.byteLength);J=new DataView(J.buffer,J.byteOffset,J.byteLength),it=new DataView(it.buffer,it.byteOffset,it.byteLength);let at=0;for(let ut=ot-ot%4;at<ut;at+=4){const ct=J.getUint32(at,I),ft=it.getUint32(at,I);if(ct!==ft)break}for(;at<ot;at++){const ut=J.getUint8(at),ct=it.getUint8(at);if(ut<ct)return-1;if(ut>ct)return 1}return J.byteLength>it.byteLength?1:J.byteLength<it.byteLength?-1:0}function U(J,it){it===void 0&&(it=J.reduce((ut,ct)=>ut+ct.byteLength,0));const ot=new Uint8Array(it);let at=0;for(const ut of J){if(at+ut.byteLength>ot.byteLength){const ct=ut.subarray(0,ot.byteLength-at);return ot.set(ct,at),ot}ot.set(ut,at),at+=ut.byteLength}return ot}function V(J,it,ot=0,at=0,ut=J.byteLength){if(ut>0&&ut<at||ut===at||J.byteLength===0||it.byteLength===0)return 0;if(ot<0)throw new RangeError("targetStart is out of range");if(at<0||at>=J.byteLength)throw new RangeError("sourceStart is out of range");if(ut<0)throw new RangeError("sourceEnd is out of range");ot>=it.byteLength&&(ot=it.byteLength),ut>J.byteLength&&(ut=J.byteLength),it.byteLength-ot<ut-at&&(ut=it.length-ot+at);const ct=ut-at;return J===it?it.copyWithin(ot,at,ut):it.set(J.subarray(at,ut),ot),ct}function j(J,it){if(J===it)return!0;if(J.byteLength!==it.byteLength)return!1;const ot=J.byteLength;J=new DataView(J.buffer,J.byteOffset,J.byteLength),it=new DataView(it.buffer,it.byteOffset,it.byteLength);let at=0;for(let ut=ot-ot%4;at<ut;at+=4)if(J.getUint32(at,I)!==it.getUint32(at,I))return!1;for(;at<ot;at++)if(J.getUint8(at)!==it.getUint8(at))return!1;return!0}function Z(J,it,ot,at,ut){if(typeof it=="string"?typeof ot=="string"?(ut=ot,ot=0,at=J.byteLength):typeof at=="string"&&(ut=at,at=J.byteLength):typeof it=="number"?it=it&255:typeof it=="boolean"&&(it=+it),ot<0||J.byteLength<ot||J.byteLength<at)throw new RangeError("Out of range index");if(ot===void 0&&(ot=0),at===void 0&&(at=J.byteLength),at<=ot)return J;if(it||(it=0),typeof it=="number")for(let ct=ot;ct<at;++ct)J[ct]=it;else{it=g(it)?it:Y(it,ut);const ct=it.byteLength;for(let ft=0;ft<at-ot;++ft)J[ft+ot]=it[ft%ct]}return J}function Y(J,it,ot){return typeof J=="string"?rt(J,it):Array.isArray(J)?nt(J):ArrayBuffer.isView(J)?M(J):k(J,it,ot)}function rt(J,it){const ot=y(it),at=new Uint8Array(ot.byteLength(J));return ot.write(at,J,0,at.byteLength),at}function nt(J){const it=new Uint8Array(J.length);return it.set(J),it}function M(J){const it=new Uint8Array(J.byteLength);return it.set(J),it}function k(J,it,ot){return new Uint8Array(J,it,ot)}function W(J,it,ot,at){return d(J,it,ot,at)!==-1}function Q(J,it,ot,at,ut){if(J.byteLength===0)return-1;if(typeof ot=="string"?(at=ot,ot=0):ot===void 0?ot=ut?0:J.length-1:ot<0&&(ot+=J.byteLength),ot>=J.byteLength){if(ut)return-1;ot=J.byteLength-1}else if(ot<0)if(ut)ot=0;else return-1;if(typeof it=="string")it=Y(it,at);else if(typeof it=="number")return it=it&255,ut?J.indexOf(it,ot):J.lastIndexOf(it,ot);if(it.byteLength===0)return-1;if(ut){let ct=-1;for(let ft=ot;ft<J.byteLength;ft++)if(J[ft]===it[ct===-1?0:ft-ct]){if(ct===-1&&(ct=ft),ft-ct+1===it.byteLength)return ct}else ct!==-1&&(ft-=ft-ct),ct=-1}else{ot+it.byteLength>J.byteLength&&(ot=J.byteLength-it.byteLength);for(let ct=ot;ct>=0;ct--){let ft=!0;for(let $t=0;$t<it.byteLength;$t++)if(J[ct+$t]!==it[$t]){ft=!1;break}if(ft)return ct}}return-1}function d(J,it,ot,at){return Q(J,it,ot,at,!0)}function E(J,it,ot,at){return Q(J,it,ot,at,!1)}function h(J,it,ot){const at=J[it];J[it]=J[ot],J[ot]=at}function b(J){const it=J.byteLength;if(it%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let ot=0;ot<it;ot+=2)h(J,ot,ot+1);return J}function w(J){const it=J.byteLength;if(it%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let ot=0;ot<it;ot+=4)h(J,ot,ot+3),h(J,ot+1,ot+2);return J}function P(J){const it=J.byteLength;if(it%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let ot=0;ot<it;ot+=8)h(J,ot,ot+7),h(J,ot+1,ot+6),h(J,ot+2,ot+5),h(J,ot+3,ot+4);return J}function L(J){return J}function $(J,it,ot=0,at=J.byteLength){const ut=J.byteLength;return ot>=ut||at<=ot?"":(ot<0&&(ot=0),at>ut&&(at=ut),(ot!==0||at<ut)&&(J=J.subarray(ot,at)),y(it).toString(J))}function m(J,it,ot,at,ut){return ot===void 0?ut="utf8":at===void 0&&typeof ot=="string"?(ut=ot,ot=void 0):ut===void 0&&typeof at=="string"&&(ut=at,at=void 0),y(ut).write(J,it,ot,at)}function B(J,it,ot){return ot===void 0&&(ot=0),new DataView(J.buffer,J.byteOffset,J.byteLength).setFloat64(ot,it,!0),ot+8}function _(J,it,ot){return ot===void 0&&(ot=0),new DataView(J.buffer,J.byteOffset,J.byteLength).setFloat32(ot,it,!0),ot+4}function x(J,it,ot){return ot===void 0&&(ot=0),new DataView(J.buffer,J.byteOffset,J.byteLength).setUint32(ot,it,!0),ot+4}function et(J,it,ot){return ot===void 0&&(ot=0),new DataView(J.buffer,J.byteOffset,J.byteLength).setInt32(ot,it,!0),ot+4}function tt(J,it){return it===void 0&&(it=0),new DataView(J.buffer,J.byteOffset,J.byteLength).getFloat64(it,!0)}function st(J,it){return it===void 0&&(it=0),new DataView(J.buffer,J.byteOffset,J.byteLength).getFloat32(it,!0)}function ht(J,it){return it===void 0&&(it=0),new DataView(J.buffer,J.byteOffset,J.byteLength).getUint32(it,!0)}function dt(J,it){return it===void 0&&(it=0),new DataView(J.buffer,J.byteOffset,J.byteLength).getInt32(it,!0)}i.exports=n={isBuffer:g,isEncoding:N,alloc:F,allocUnsafe:H,allocUnsafeSlow:G,byteLength:q,compare:X,concat:U,copy:V,equals:j,fill:Z,from:Y,includes:W,indexOf:d,lastIndexOf:E,swap16:b,swap32:w,swap64:P,toBuffer:L,toString:$,write:m,writeDoubleLE:B,writeFloatLE:_,writeUInt32LE:x,writeInt32LE:et,readDoubleLE:tt,readFloatLE:st,readUInt32LE:ht,readInt32LE:dt}})(browser,browser.exports);var browserExports=browser.exports;(function(i){var n=varint$1,a=signedVarint,u=browserExports;i.make=l,i.name=function(S){for(var I=Object.keys(i),y=0;y<I.length;y++)if(i[I[y]]===S)return I[y];return null},i.skip=function(S,I,y){switch(S){case 0:return n.decode(I,y),y+n.decode.bytes;case 1:return y+8;case 2:var g=n.decode(I,y);return y+n.decode.bytes+g;case 3:case 4:throw new Error("Groups are not supported");case 5:return y+4}throw new Error("Unknown wire type: "+S)},i.bytes=l(2,function S(I,y,g){var N=g,F=c(I);return n.encode(F,y,g),g+=n.encode.bytes,u.isBuffer(I)?u.copy(I,y,g):u.write(y,I,g,F),g+=F,S.bytes=g-N,y},function S(I,y){var g=y,N=n.decode(I,y);y+=n.decode.bytes;var F=I.subarray(y,y+N);return y+=F.length,S.bytes=y-g,F},function(S){var I=c(S);return n.encodingLength(I)+I}),i.string=l(2,function S(I,y,g){var N=g,F=u.byteLength(I);return n.encode(F,y,g,"utf-8"),g+=n.encode.bytes,u.write(y,I,g,F),g+=F,S.bytes=g-N,y},function S(I,y){var g=y,N=n.decode(I,y);y+=n.decode.bytes;var F=u.toString(I,"utf-8",y,y+N);return y+=N,S.bytes=y-g,F},function(S){var I=u.byteLength(S);return n.encodingLength(I)+I}),i.bool=l(0,function S(I,y,g){return y[g]=I?1:0,S.bytes=1,y},function S(I,y){var g=I[y]>0;return S.bytes=1,g},function(){return 1}),i.int32=l(0,function S(I,y,g){return n.encode(I<0?I+4294967296:I,y,g),S.bytes=n.encode.bytes,y},function S(I,y){var g=n.decode(I,y);return S.bytes=n.decode.bytes,g>2147483647?g-4294967296:g},function(S){return n.encodingLength(S<0?S+4294967296:S)}),i.int64=l(0,function S(I,y,g){if(I<0){var N=g+9;for(n.encode(I*-1,y,g),g+=n.encode.bytes-1,y[g]=y[g]|128;g<N-1;)g++,y[g]=255;y[N]=1,S.bytes=10}else n.encode(I,y,g),S.bytes=n.encode.bytes;return y},function S(I,y){var g=n.decode(I,y);if(g>=Math.pow(2,63)){for(var N=9;I[y+N-1]===255;)N--;N=N||9;var F=u.allocUnsafe(N);u.copy(I,F,0,y,y+N),F[N-1]=F[N-1]&127,g=-1*n.decode(F,0),S.bytes=10}else S.bytes=n.decode.bytes;return g},function(S){return S<0?10:n.encodingLength(S)}),i.sint32=i.sint64=l(0,a.encode,a.decode,a.encodingLength),i.uint32=i.uint64=i.enum=i.varint=l(0,n.encode,n.decode,n.encodingLength),i.fixed64=i.sfixed64=l(1,function S(I,y,g){return u.copy(I,y,g),S.bytes=8,y},function S(I,y){var g=I.subarray(y,y+8);return S.bytes=8,g},function(){return 8}),i.double=l(1,function S(I,y,g){return u.writeDoubleLE(y,I,g),S.bytes=8,y},function S(I,y){var g=u.readDoubleLE(I,y);return S.bytes=8,g},function(){return 8}),i.fixed32=l(5,function S(I,y,g){return u.writeUInt32LE(y,I,g),S.bytes=4,y},function S(I,y){var g=u.readUInt32LE(I,y);return S.bytes=4,g},function(){return 4}),i.sfixed32=l(5,function S(I,y,g){return u.writeInt32LE(y,I,g),S.bytes=4,y},function S(I,y){var g=u.readInt32LE(I,y);return S.bytes=4,g},function(){return 4}),i.float=l(5,function S(I,y,g){return u.writeFloatLE(y,I,g),S.bytes=4,y},function S(I,y){var g=u.readFloatLE(I,y);return S.bytes=4,g},function(){return 4});function l(S,I,y,g){return I.bytes=y.bytes=0,{type:S,encode:I,decode:y,encodingLength:g}}function c(S){return u.isBuffer(S)?S.length:u.byteLength(S)}})(protocolBuffersEncodings);var bn$1={exports:{}};const __viteBrowserExternal={},__viteBrowserExternal$1=Object.freeze(Object.defineProperty({__proto__:null,default:__viteBrowserExternal},Symbol.toStringTag,{value:"Module"})),require$$3=getAugmentedNamespace(__viteBrowserExternal$1);(function(i){(function(n,a){function u(h,b){if(!h)throw new Error(b||"Assertion failed")}function l(h,b){h.super_=b;var w=function(){};w.prototype=b.prototype,h.prototype=new w,h.prototype.constructor=h}function c(h,b,w){if(c.isBN(h))return h;this.negative=0,this.words=null,this.length=0,this.red=null,h!==null&&((b==="le"||b==="be")&&(w=b,b=10),this._init(h||0,b||10,w||"be"))}typeof n=="object"?n.exports=c:a.BN=c,c.BN=c,c.wordSize=26;var S;try{typeof window<"u"&&typeof window.Buffer<"u"?S=window.Buffer:S=require$$3.Buffer}catch{}c.isBN=function(h){return h instanceof c?!0:h!==null&&typeof h=="object"&&h.constructor.wordSize===c.wordSize&&Array.isArray(h.words)},c.max=function(h,b){return h.cmp(b)>0?h:b},c.min=function(h,b){return h.cmp(b)<0?h:b},c.prototype._init=function(h,b,w){if(typeof h=="number")return this._initNumber(h,b,w);if(typeof h=="object")return this._initArray(h,b,w);b==="hex"&&(b=16),u(b===(b|0)&&b>=2&&b<=36),h=h.toString().replace(/\s+/g,"");var P=0;h[0]==="-"&&(P++,this.negative=1),P<h.length&&(b===16?this._parseHex(h,P,w):(this._parseBase(h,b,P),w==="le"&&this._initArray(this.toArray(),b,w)))},c.prototype._initNumber=function(h,b,w){h<0&&(this.negative=1,h=-h),h<67108864?(this.words=[h&67108863],this.length=1):h<4503599627370496?(this.words=[h&67108863,h/67108864&67108863],this.length=2):(u(h<9007199254740992),this.words=[h&67108863,h/67108864&67108863,1],this.length=3),w==="le"&&this._initArray(this.toArray(),b,w)},c.prototype._initArray=function(h,b,w){if(u(typeof h.length=="number"),h.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(h.length/3),this.words=new Array(this.length);for(var P=0;P<this.length;P++)this.words[P]=0;var L,$,m=0;if(w==="be")for(P=h.length-1,L=0;P>=0;P-=3)$=h[P]|h[P-1]<<8|h[P-2]<<16,this.words[L]|=$<<m&67108863,this.words[L+1]=$>>>26-m&67108863,m+=24,m>=26&&(m-=26,L++);else if(w==="le")for(P=0,L=0;P<h.length;P+=3)$=h[P]|h[P+1]<<8|h[P+2]<<16,this.words[L]|=$<<m&67108863,this.words[L+1]=$>>>26-m&67108863,m+=24,m>=26&&(m-=26,L++);return this._strip()};function I(h,b){var w=h.charCodeAt(b);if(w>=48&&w<=57)return w-48;if(w>=65&&w<=70)return w-55;if(w>=97&&w<=102)return w-87;u(!1,"Invalid character in "+h)}function y(h,b,w){var P=I(h,w);return w-1>=b&&(P|=I(h,w-1)<<4),P}c.prototype._parseHex=function(h,b,w){this.length=Math.ceil((h.length-b)/6),this.words=new Array(this.length);for(var P=0;P<this.length;P++)this.words[P]=0;var L=0,$=0,m;if(w==="be")for(P=h.length-1;P>=b;P-=2)m=y(h,b,P)<<L,this.words[$]|=m&67108863,L>=18?(L-=18,$+=1,this.words[$]|=m>>>26):L+=8;else{var B=h.length-b;for(P=B%2===0?b+1:b;P<h.length;P+=2)m=y(h,b,P)<<L,this.words[$]|=m&67108863,L>=18?(L-=18,$+=1,this.words[$]|=m>>>26):L+=8}this._strip()};function g(h,b,w,P){for(var L=0,$=0,m=Math.min(h.length,w),B=b;B<m;B++){var _=h.charCodeAt(B)-48;L*=P,_>=49?$=_-49+10:_>=17?$=_-17+10:$=_,u(_>=0&&$<P,"Invalid character"),L+=$}return L}c.prototype._parseBase=function(h,b,w){this.words=[0],this.length=1;for(var P=0,L=1;L<=67108863;L*=b)P++;P--,L=L/b|0;for(var $=h.length-w,m=$%P,B=Math.min($,$-m)+w,_=0,x=w;x<B;x+=P)_=g(h,x,x+P,b),this.imuln(L),this.words[0]+_<67108864?this.words[0]+=_:this._iaddn(_);if(m!==0){var et=1;for(_=g(h,x,h.length,b),x=0;x<m;x++)et*=b;this.imuln(et),this.words[0]+_<67108864?this.words[0]+=_:this._iaddn(_)}this._strip()},c.prototype.copy=function(h){h.words=new Array(this.length);for(var b=0;b<this.length;b++)h.words[b]=this.words[b];h.length=this.length,h.negative=this.negative,h.red=this.red};function N(h,b){h.words=b.words,h.length=b.length,h.negative=b.negative,h.red=b.red}if(c.prototype._move=function(h){N(h,this)},c.prototype.clone=function(){var h=new c(null);return this.copy(h),h},c.prototype._expand=function(h){for(;this.length<h;)this.words[this.length++]=0;return this},c.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},c.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{c.prototype[Symbol.for("nodejs.util.inspect.custom")]=F}catch{c.prototype.inspect=F}else c.prototype.inspect=F;function F(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var H=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],G=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],q=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];c.prototype.toString=function(h,b){h=h||10,b=b|0||1;var w;if(h===16||h==="hex"){w="";for(var P=0,L=0,$=0;$<this.length;$++){var m=this.words[$],B=((m<<P|L)&16777215).toString(16);L=m>>>24-P&16777215,P+=2,P>=26&&(P-=26,$--),L!==0||$!==this.length-1?w=H[6-B.length]+B+w:w=B+w}for(L!==0&&(w=L.toString(16)+w);w.length%b!==0;)w="0"+w;return this.negative!==0&&(w="-"+w),w}if(h===(h|0)&&h>=2&&h<=36){var _=G[h],x=q[h];w="";var et=this.clone();for(et.negative=0;!et.isZero();){var tt=et.modrn(x).toString(h);et=et.idivn(x),et.isZero()?w=tt+w:w=H[_-tt.length]+tt+w}for(this.isZero()&&(w="0"+w);w.length%b!==0;)w="0"+w;return this.negative!==0&&(w="-"+w),w}u(!1,"Base should be between 2 and 36")},c.prototype.toNumber=function(){var h=this.words[0];return this.length===2?h+=this.words[1]*67108864:this.length===3&&this.words[2]===1?h+=4503599627370496+this.words[1]*67108864:this.length>2&&u(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-h:h},c.prototype.toJSON=function(){return this.toString(16,2)},S&&(c.prototype.toBuffer=function(h,b){return this.toArrayLike(S,h,b)}),c.prototype.toArray=function(h,b){return this.toArrayLike(Array,h,b)};var X=function(h,b){return h.allocUnsafe?h.allocUnsafe(b):new h(b)};c.prototype.toArrayLike=function(h,b,w){this._strip();var P=this.byteLength(),L=w||Math.max(1,P);u(P<=L,"byte array longer than desired length"),u(L>0,"Requested array length <= 0");var $=X(h,L),m=b==="le"?"LE":"BE";return this["_toArrayLike"+m]($,P),$},c.prototype._toArrayLikeLE=function(h,b){for(var w=0,P=0,L=0,$=0;L<this.length;L++){var m=this.words[L]<<$|P;h[w++]=m&255,w<h.length&&(h[w++]=m>>8&255),w<h.length&&(h[w++]=m>>16&255),$===6?(w<h.length&&(h[w++]=m>>24&255),P=0,$=0):(P=m>>>24,$+=2)}if(w<h.length)for(h[w++]=P;w<h.length;)h[w++]=0},c.prototype._toArrayLikeBE=function(h,b){for(var w=h.length-1,P=0,L=0,$=0;L<this.length;L++){var m=this.words[L]<<$|P;h[w--]=m&255,w>=0&&(h[w--]=m>>8&255),w>=0&&(h[w--]=m>>16&255),$===6?(w>=0&&(h[w--]=m>>24&255),P=0,$=0):(P=m>>>24,$+=2)}if(w>=0)for(h[w--]=P;w>=0;)h[w--]=0},Math.clz32?c.prototype._countBits=function(h){return 32-Math.clz32(h)}:c.prototype._countBits=function(h){var b=h,w=0;return b>=4096&&(w+=13,b>>>=13),b>=64&&(w+=7,b>>>=7),b>=8&&(w+=4,b>>>=4),b>=2&&(w+=2,b>>>=2),w+b},c.prototype._zeroBits=function(h){if(h===0)return 26;var b=h,w=0;return b&8191||(w+=13,b>>>=13),b&127||(w+=7,b>>>=7),b&15||(w+=4,b>>>=4),b&3||(w+=2,b>>>=2),b&1||w++,w},c.prototype.bitLength=function(){var h=this.words[this.length-1],b=this._countBits(h);return(this.length-1)*26+b};function U(h){for(var b=new Array(h.bitLength()),w=0;w<b.length;w++){var P=w/26|0,L=w%26;b[w]=h.words[P]>>>L&1}return b}c.prototype.zeroBits=function(){if(this.isZero())return 0;for(var h=0,b=0;b<this.length;b++){var w=this._zeroBits(this.words[b]);if(h+=w,w!==26)break}return h},c.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},c.prototype.toTwos=function(h){return this.negative!==0?this.abs().inotn(h).iaddn(1):this.clone()},c.prototype.fromTwos=function(h){return this.testn(h-1)?this.notn(h).iaddn(1).ineg():this.clone()},c.prototype.isNeg=function(){return this.negative!==0},c.prototype.neg=function(){return this.clone().ineg()},c.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},c.prototype.iuor=function(h){for(;this.length<h.length;)this.words[this.length++]=0;for(var b=0;b<h.length;b++)this.words[b]=this.words[b]|h.words[b];return this._strip()},c.prototype.ior=function(h){return u((this.negative|h.negative)===0),this.iuor(h)},c.prototype.or=function(h){return this.length>h.length?this.clone().ior(h):h.clone().ior(this)},c.prototype.uor=function(h){return this.length>h.length?this.clone().iuor(h):h.clone().iuor(this)},c.prototype.iuand=function(h){var b;this.length>h.length?b=h:b=this;for(var w=0;w<b.length;w++)this.words[w]=this.words[w]&h.words[w];return this.length=b.length,this._strip()},c.prototype.iand=function(h){return u((this.negative|h.negative)===0),this.iuand(h)},c.prototype.and=function(h){return this.length>h.length?this.clone().iand(h):h.clone().iand(this)},c.prototype.uand=function(h){return this.length>h.length?this.clone().iuand(h):h.clone().iuand(this)},c.prototype.iuxor=function(h){var b,w;this.length>h.length?(b=this,w=h):(b=h,w=this);for(var P=0;P<w.length;P++)this.words[P]=b.words[P]^w.words[P];if(this!==b)for(;P<b.length;P++)this.words[P]=b.words[P];return this.length=b.length,this._strip()},c.prototype.ixor=function(h){return u((this.negative|h.negative)===0),this.iuxor(h)},c.prototype.xor=function(h){return this.length>h.length?this.clone().ixor(h):h.clone().ixor(this)},c.prototype.uxor=function(h){return this.length>h.length?this.clone().iuxor(h):h.clone().iuxor(this)},c.prototype.inotn=function(h){u(typeof h=="number"&&h>=0);var b=Math.ceil(h/26)|0,w=h%26;this._expand(b),w>0&&b--;for(var P=0;P<b;P++)this.words[P]=~this.words[P]&67108863;return w>0&&(this.words[P]=~this.words[P]&67108863>>26-w),this._strip()},c.prototype.notn=function(h){return this.clone().inotn(h)},c.prototype.setn=function(h,b){u(typeof h=="number"&&h>=0);var w=h/26|0,P=h%26;return this._expand(w+1),b?this.words[w]=this.words[w]|1<<P:this.words[w]=this.words[w]&~(1<<P),this._strip()},c.prototype.iadd=function(h){var b;if(this.negative!==0&&h.negative===0)return this.negative=0,b=this.isub(h),this.negative^=1,this._normSign();if(this.negative===0&&h.negative!==0)return h.negative=0,b=this.isub(h),h.negative=1,b._normSign();var w,P;this.length>h.length?(w=this,P=h):(w=h,P=this);for(var L=0,$=0;$<P.length;$++)b=(w.words[$]|0)+(P.words[$]|0)+L,this.words[$]=b&67108863,L=b>>>26;for(;L!==0&&$<w.length;$++)b=(w.words[$]|0)+L,this.words[$]=b&67108863,L=b>>>26;if(this.length=w.length,L!==0)this.words[this.length]=L,this.length++;else if(w!==this)for(;$<w.length;$++)this.words[$]=w.words[$];return this},c.prototype.add=function(h){var b;return h.negative!==0&&this.negative===0?(h.negative=0,b=this.sub(h),h.negative^=1,b):h.negative===0&&this.negative!==0?(this.negative=0,b=h.sub(this),this.negative=1,b):this.length>h.length?this.clone().iadd(h):h.clone().iadd(this)},c.prototype.isub=function(h){if(h.negative!==0){h.negative=0;var b=this.iadd(h);return h.negative=1,b._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(h),this.negative=1,this._normSign();var w=this.cmp(h);if(w===0)return this.negative=0,this.length=1,this.words[0]=0,this;var P,L;w>0?(P=this,L=h):(P=h,L=this);for(var $=0,m=0;m<L.length;m++)b=(P.words[m]|0)-(L.words[m]|0)+$,$=b>>26,this.words[m]=b&67108863;for(;$!==0&&m<P.length;m++)b=(P.words[m]|0)+$,$=b>>26,this.words[m]=b&67108863;if($===0&&m<P.length&&P!==this)for(;m<P.length;m++)this.words[m]=P.words[m];return this.length=Math.max(this.length,m),P!==this&&(this.negative=1),this._strip()},c.prototype.sub=function(h){return this.clone().isub(h)};function V(h,b,w){w.negative=b.negative^h.negative;var P=h.length+b.length|0;w.length=P,P=P-1|0;var L=h.words[0]|0,$=b.words[0]|0,m=L*$,B=m&67108863,_=m/67108864|0;w.words[0]=B;for(var x=1;x<P;x++){for(var et=_>>>26,tt=_&67108863,st=Math.min(x,b.length-1),ht=Math.max(0,x-h.length+1);ht<=st;ht++){var dt=x-ht|0;L=h.words[dt]|0,$=b.words[ht]|0,m=L*$+tt,et+=m/67108864|0,tt=m&67108863}w.words[x]=tt|0,_=et|0}return _!==0?w.words[x]=_|0:w.length--,w._strip()}var j=function(h,b,w){var P=h.words,L=b.words,$=w.words,m=0,B,_,x,et=P[0]|0,tt=et&8191,st=et>>>13,ht=P[1]|0,dt=ht&8191,J=ht>>>13,it=P[2]|0,ot=it&8191,at=it>>>13,ut=P[3]|0,ct=ut&8191,ft=ut>>>13,$t=P[4]|0,Lt=$t&8191,vt=$t>>>13,xt=P[5]|0,Tt=xt&8191,mt=xt>>>13,Ot=P[6]|0,Nt=Ot&8191,lt=Ot>>>13,Ct=P[7]|0,kt=Ct&8191,bt=Ct>>>13,Dt=P[8]|0,qt=Dt&8191,yt=Dt>>>13,Ut=P[9]|0,Pt=Ut&8191,gt=Ut>>>13,Vt=L[0]|0,Ht=Vt&8191,_t=Vt>>>13,Jt=L[1]|0,Zt=Jt&8191,wt=Jt>>>13,Yt=L[2]|0,zt=Yt&8191,St=Yt>>>13,Ft=L[3]|0,Xt=Ft&8191,Mt=Ft>>>13,Qt=L[4]|0,Wt=Qt&8191,At=Qt>>>13,te=L[5]|0,Gt=te&8191,Et=te>>>13,jt=L[6]|0,Bt=jt&8191,pt=jt>>>13,Kt=L[7]|0,ee=Kt&8191,It=Kt>>>13,ne=L[8]|0,oe=ne&8191,Rt=ne>>>13,ae=L[9]|0,re=ae&8191,ie=ae>>>13;w.negative=h.negative^b.negative,w.length=19,B=Math.imul(tt,Ht),_=Math.imul(tt,_t),_=_+Math.imul(st,Ht)|0,x=Math.imul(st,_t);var se=(m+B|0)+((_&8191)<<13)|0;m=(x+(_>>>13)|0)+(se>>>26)|0,se&=67108863,B=Math.imul(dt,Ht),_=Math.imul(dt,_t),_=_+Math.imul(J,Ht)|0,x=Math.imul(J,_t),B=B+Math.imul(tt,Zt)|0,_=_+Math.imul(tt,wt)|0,_=_+Math.imul(st,Zt)|0,x=x+Math.imul(st,wt)|0;var ue=(m+B|0)+((_&8191)<<13)|0;m=(x+(_>>>13)|0)+(ue>>>26)|0,ue&=67108863,B=Math.imul(ot,Ht),_=Math.imul(ot,_t),_=_+Math.imul(at,Ht)|0,x=Math.imul(at,_t),B=B+Math.imul(dt,Zt)|0,_=_+Math.imul(dt,wt)|0,_=_+Math.imul(J,Zt)|0,x=x+Math.imul(J,wt)|0,B=B+Math.imul(tt,zt)|0,_=_+Math.imul(tt,St)|0,_=_+Math.imul(st,zt)|0,x=x+Math.imul(st,St)|0;var fe=(m+B|0)+((_&8191)<<13)|0;m=(x+(_>>>13)|0)+(fe>>>26)|0,fe&=67108863,B=Math.imul(ct,Ht),_=Math.imul(ct,_t),_=_+Math.imul(ft,Ht)|0,x=Math.imul(ft,_t),B=B+Math.imul(ot,Zt)|0,_=_+Math.imul(ot,wt)|0,_=_+Math.imul(at,Zt)|0,x=x+Math.imul(at,wt)|0,B=B+Math.imul(dt,zt)|0,_=_+Math.imul(dt,St)|0,_=_+Math.imul(J,zt)|0,x=x+Math.imul(J,St)|0,B=B+Math.imul(tt,Xt)|0,_=_+Math.imul(tt,Mt)|0,_=_+Math.imul(st,Xt)|0,x=x+Math.imul(st,Mt)|0;var he=(m+B|0)+((_&8191)<<13)|0;m=(x+(_>>>13)|0)+(he>>>26)|0,he&=67108863,B=Math.imul(Lt,Ht),_=Math.imul(Lt,_t),_=_+Math.imul(vt,Ht)|0,x=Math.imul(vt,_t),B=B+Math.imul(ct,Zt)|0,_=_+Math.imul(ct,wt)|0,_=_+Math.imul(ft,Zt)|0,x=x+Math.imul(ft,wt)|0,B=B+Math.imul(ot,zt)|0,_=_+Math.imul(ot,St)|0,_=_+Math.imul(at,zt)|0,x=x+Math.imul(at,St)|0,B=B+Math.imul(dt,Xt)|0,_=_+Math.imul(dt,Mt)|0,_=_+Math.imul(J,Xt)|0,x=x+Math.imul(J,Mt)|0,B=B+Math.imul(tt,Wt)|0,_=_+Math.imul(tt,At)|0,_=_+Math.imul(st,Wt)|0,x=x+Math.imul(st,At)|0;var ce=(m+B|0)+((_&8191)<<13)|0;m=(x+(_>>>13)|0)+(ce>>>26)|0,ce&=67108863,B=Math.imul(Tt,Ht),_=Math.imul(Tt,_t),_=_+Math.imul(mt,Ht)|0,x=Math.imul(mt,_t),B=B+Math.imul(Lt,Zt)|0,_=_+Math.imul(Lt,wt)|0,_=_+Math.imul(vt,Zt)|0,x=x+Math.imul(vt,wt)|0,B=B+Math.imul(ct,zt)|0,_=_+Math.imul(ct,St)|0,_=_+Math.imul(ft,zt)|0,x=x+Math.imul(ft,St)|0,B=B+Math.imul(ot,Xt)|0,_=_+Math.imul(ot,Mt)|0,_=_+Math.imul(at,Xt)|0,x=x+Math.imul(at,Mt)|0,B=B+Math.imul(dt,Wt)|0,_=_+Math.imul(dt,At)|0,_=_+Math.imul(J,Wt)|0,x=x+Math.imul(J,At)|0,B=B+Math.imul(tt,Gt)|0,_=_+Math.imul(tt,Et)|0,_=_+Math.imul(st,Gt)|0,x=x+Math.imul(st,Et)|0;var de=(m+B|0)+((_&8191)<<13)|0;m=(x+(_>>>13)|0)+(de>>>26)|0,de&=67108863,B=Math.imul(Nt,Ht),_=Math.imul(Nt,_t),_=_+Math.imul(lt,Ht)|0,x=Math.imul(lt,_t),B=B+Math.imul(Tt,Zt)|0,_=_+Math.imul(Tt,wt)|0,_=_+Math.imul(mt,Zt)|0,x=x+Math.imul(mt,wt)|0,B=B+Math.imul(Lt,zt)|0,_=_+Math.imul(Lt,St)|0,_=_+Math.imul(vt,zt)|0,x=x+Math.imul(vt,St)|0,B=B+Math.imul(ct,Xt)|0,_=_+Math.imul(ct,Mt)|0,_=_+Math.imul(ft,Xt)|0,x=x+Math.imul(ft,Mt)|0,B=B+Math.imul(ot,Wt)|0,_=_+Math.imul(ot,At)|0,_=_+Math.imul(at,Wt)|0,x=x+Math.imul(at,At)|0,B=B+Math.imul(dt,Gt)|0,_=_+Math.imul(dt,Et)|0,_=_+Math.imul(J,Gt)|0,x=x+Math.imul(J,Et)|0,B=B+Math.imul(tt,Bt)|0,_=_+Math.imul(tt,pt)|0,_=_+Math.imul(st,Bt)|0,x=x+Math.imul(st,pt)|0;var le=(m+B|0)+((_&8191)<<13)|0;m=(x+(_>>>13)|0)+(le>>>26)|0,le&=67108863,B=Math.imul(kt,Ht),_=Math.imul(kt,_t),_=_+Math.imul(bt,Ht)|0,x=Math.imul(bt,_t),B=B+Math.imul(Nt,Zt)|0,_=_+Math.imul(Nt,wt)|0,_=_+Math.imul(lt,Zt)|0,x=x+Math.imul(lt,wt)|0,B=B+Math.imul(Tt,zt)|0,_=_+Math.imul(Tt,St)|0,_=_+Math.imul(mt,zt)|0,x=x+Math.imul(mt,St)|0,B=B+Math.imul(Lt,Xt)|0,_=_+Math.imul(Lt,Mt)|0,_=_+Math.imul(vt,Xt)|0,x=x+Math.imul(vt,Mt)|0,B=B+Math.imul(ct,Wt)|0,_=_+Math.imul(ct,At)|0,_=_+Math.imul(ft,Wt)|0,x=x+Math.imul(ft,At)|0,B=B+Math.imul(ot,Gt)|0,_=_+Math.imul(ot,Et)|0,_=_+Math.imul(at,Gt)|0,x=x+Math.imul(at,Et)|0,B=B+Math.imul(dt,Bt)|0,_=_+Math.imul(dt,pt)|0,_=_+Math.imul(J,Bt)|0,x=x+Math.imul(J,pt)|0,B=B+Math.imul(tt,ee)|0,_=_+Math.imul(tt,It)|0,_=_+Math.imul(st,ee)|0,x=x+Math.imul(st,It)|0;var pe=(m+B|0)+((_&8191)<<13)|0;m=(x+(_>>>13)|0)+(pe>>>26)|0,pe&=67108863,B=Math.imul(qt,Ht),_=Math.imul(qt,_t),_=_+Math.imul(yt,Ht)|0,x=Math.imul(yt,_t),B=B+Math.imul(kt,Zt)|0,_=_+Math.imul(kt,wt)|0,_=_+Math.imul(bt,Zt)|0,x=x+Math.imul(bt,wt)|0,B=B+Math.imul(Nt,zt)|0,_=_+Math.imul(Nt,St)|0,_=_+Math.imul(lt,zt)|0,x=x+Math.imul(lt,St)|0,B=B+Math.imul(Tt,Xt)|0,_=_+Math.imul(Tt,Mt)|0,_=_+Math.imul(mt,Xt)|0,x=x+Math.imul(mt,Mt)|0,B=B+Math.imul(Lt,Wt)|0,_=_+Math.imul(Lt,At)|0,_=_+Math.imul(vt,Wt)|0,x=x+Math.imul(vt,At)|0,B=B+Math.imul(ct,Gt)|0,_=_+Math.imul(ct,Et)|0,_=_+Math.imul(ft,Gt)|0,x=x+Math.imul(ft,Et)|0,B=B+Math.imul(ot,Bt)|0,_=_+Math.imul(ot,pt)|0,_=_+Math.imul(at,Bt)|0,x=x+Math.imul(at,pt)|0,B=B+Math.imul(dt,ee)|0,_=_+Math.imul(dt,It)|0,_=_+Math.imul(J,ee)|0,x=x+Math.imul(J,It)|0,B=B+Math.imul(tt,oe)|0,_=_+Math.imul(tt,Rt)|0,_=_+Math.imul(st,oe)|0,x=x+Math.imul(st,Rt)|0;var be=(m+B|0)+((_&8191)<<13)|0;m=(x+(_>>>13)|0)+(be>>>26)|0,be&=67108863,B=Math.imul(Pt,Ht),_=Math.imul(Pt,_t),_=_+Math.imul(gt,Ht)|0,x=Math.imul(gt,_t),B=B+Math.imul(qt,Zt)|0,_=_+Math.imul(qt,wt)|0,_=_+Math.imul(yt,Zt)|0,x=x+Math.imul(yt,wt)|0,B=B+Math.imul(kt,zt)|0,_=_+Math.imul(kt,St)|0,_=_+Math.imul(bt,zt)|0,x=x+Math.imul(bt,St)|0,B=B+Math.imul(Nt,Xt)|0,_=_+Math.imul(Nt,Mt)|0,_=_+Math.imul(lt,Xt)|0,x=x+Math.imul(lt,Mt)|0,B=B+Math.imul(Tt,Wt)|0,_=_+Math.imul(Tt,At)|0,_=_+Math.imul(mt,Wt)|0,x=x+Math.imul(mt,At)|0,B=B+Math.imul(Lt,Gt)|0,_=_+Math.imul(Lt,Et)|0,_=_+Math.imul(vt,Gt)|0,x=x+Math.imul(vt,Et)|0,B=B+Math.imul(ct,Bt)|0,_=_+Math.imul(ct,pt)|0,_=_+Math.imul(ft,Bt)|0,x=x+Math.imul(ft,pt)|0,B=B+Math.imul(ot,ee)|0,_=_+Math.imul(ot,It)|0,_=_+Math.imul(at,ee)|0,x=x+Math.imul(at,It)|0,B=B+Math.imul(dt,oe)|0,_=_+Math.imul(dt,Rt)|0,_=_+Math.imul(J,oe)|0,x=x+Math.imul(J,Rt)|0,B=B+Math.imul(tt,re)|0,_=_+Math.imul(tt,ie)|0,_=_+Math.imul(st,re)|0,x=x+Math.imul(st,ie)|0;var me=(m+B|0)+((_&8191)<<13)|0;m=(x+(_>>>13)|0)+(me>>>26)|0,me&=67108863,B=Math.imul(Pt,Zt),_=Math.imul(Pt,wt),_=_+Math.imul(gt,Zt)|0,x=Math.imul(gt,wt),B=B+Math.imul(qt,zt)|0,_=_+Math.imul(qt,St)|0,_=_+Math.imul(yt,zt)|0,x=x+Math.imul(yt,St)|0,B=B+Math.imul(kt,Xt)|0,_=_+Math.imul(kt,Mt)|0,_=_+Math.imul(bt,Xt)|0,x=x+Math.imul(bt,Mt)|0,B=B+Math.imul(Nt,Wt)|0,_=_+Math.imul(Nt,At)|0,_=_+Math.imul(lt,Wt)|0,x=x+Math.imul(lt,At)|0,B=B+Math.imul(Tt,Gt)|0,_=_+Math.imul(Tt,Et)|0,_=_+Math.imul(mt,Gt)|0,x=x+Math.imul(mt,Et)|0,B=B+Math.imul(Lt,Bt)|0,_=_+Math.imul(Lt,pt)|0,_=_+Math.imul(vt,Bt)|0,x=x+Math.imul(vt,pt)|0,B=B+Math.imul(ct,ee)|0,_=_+Math.imul(ct,It)|0,_=_+Math.imul(ft,ee)|0,x=x+Math.imul(ft,It)|0,B=B+Math.imul(ot,oe)|0,_=_+Math.imul(ot,Rt)|0,_=_+Math.imul(at,oe)|0,x=x+Math.imul(at,Rt)|0,B=B+Math.imul(dt,re)|0,_=_+Math.imul(dt,ie)|0,_=_+Math.imul(J,re)|0,x=x+Math.imul(J,ie)|0;var ge=(m+B|0)+((_&8191)<<13)|0;m=(x+(_>>>13)|0)+(ge>>>26)|0,ge&=67108863,B=Math.imul(Pt,zt),_=Math.imul(Pt,St),_=_+Math.imul(gt,zt)|0,x=Math.imul(gt,St),B=B+Math.imul(qt,Xt)|0,_=_+Math.imul(qt,Mt)|0,_=_+Math.imul(yt,Xt)|0,x=x+Math.imul(yt,Mt)|0,B=B+Math.imul(kt,Wt)|0,_=_+Math.imul(kt,At)|0,_=_+Math.imul(bt,Wt)|0,x=x+Math.imul(bt,At)|0,B=B+Math.imul(Nt,Gt)|0,_=_+Math.imul(Nt,Et)|0,_=_+Math.imul(lt,Gt)|0,x=x+Math.imul(lt,Et)|0,B=B+Math.imul(Tt,Bt)|0,_=_+Math.imul(Tt,pt)|0,_=_+Math.imul(mt,Bt)|0,x=x+Math.imul(mt,pt)|0,B=B+Math.imul(Lt,ee)|0,_=_+Math.imul(Lt,It)|0,_=_+Math.imul(vt,ee)|0,x=x+Math.imul(vt,It)|0,B=B+Math.imul(ct,oe)|0,_=_+Math.imul(ct,Rt)|0,_=_+Math.imul(ft,oe)|0,x=x+Math.imul(ft,Rt)|0,B=B+Math.imul(ot,re)|0,_=_+Math.imul(ot,ie)|0,_=_+Math.imul(at,re)|0,x=x+Math.imul(at,ie)|0;var ve=(m+B|0)+((_&8191)<<13)|0;m=(x+(_>>>13)|0)+(ve>>>26)|0,ve&=67108863,B=Math.imul(Pt,Xt),_=Math.imul(Pt,Mt),_=_+Math.imul(gt,Xt)|0,x=Math.imul(gt,Mt),B=B+Math.imul(qt,Wt)|0,_=_+Math.imul(qt,At)|0,_=_+Math.imul(yt,Wt)|0,x=x+Math.imul(yt,At)|0,B=B+Math.imul(kt,Gt)|0,_=_+Math.imul(kt,Et)|0,_=_+Math.imul(bt,Gt)|0,x=x+Math.imul(bt,Et)|0,B=B+Math.imul(Nt,Bt)|0,_=_+Math.imul(Nt,pt)|0,_=_+Math.imul(lt,Bt)|0,x=x+Math.imul(lt,pt)|0,B=B+Math.imul(Tt,ee)|0,_=_+Math.imul(Tt,It)|0,_=_+Math.imul(mt,ee)|0,x=x+Math.imul(mt,It)|0,B=B+Math.imul(Lt,oe)|0,_=_+Math.imul(Lt,Rt)|0,_=_+Math.imul(vt,oe)|0,x=x+Math.imul(vt,Rt)|0,B=B+Math.imul(ct,re)|0,_=_+Math.imul(ct,ie)|0,_=_+Math.imul(ft,re)|0,x=x+Math.imul(ft,ie)|0;var ye=(m+B|0)+((_&8191)<<13)|0;m=(x+(_>>>13)|0)+(ye>>>26)|0,ye&=67108863,B=Math.imul(Pt,Wt),_=Math.imul(Pt,At),_=_+Math.imul(gt,Wt)|0,x=Math.imul(gt,At),B=B+Math.imul(qt,Gt)|0,_=_+Math.imul(qt,Et)|0,_=_+Math.imul(yt,Gt)|0,x=x+Math.imul(yt,Et)|0,B=B+Math.imul(kt,Bt)|0,_=_+Math.imul(kt,pt)|0,_=_+Math.imul(bt,Bt)|0,x=x+Math.imul(bt,pt)|0,B=B+Math.imul(Nt,ee)|0,_=_+Math.imul(Nt,It)|0,_=_+Math.imul(lt,ee)|0,x=x+Math.imul(lt,It)|0,B=B+Math.imul(Tt,oe)|0,_=_+Math.imul(Tt,Rt)|0,_=_+Math.imul(mt,oe)|0,x=x+Math.imul(mt,Rt)|0,B=B+Math.imul(Lt,re)|0,_=_+Math.imul(Lt,ie)|0,_=_+Math.imul(vt,re)|0,x=x+Math.imul(vt,ie)|0;var _e=(m+B|0)+((_&8191)<<13)|0;m=(x+(_>>>13)|0)+(_e>>>26)|0,_e&=67108863,B=Math.imul(Pt,Gt),_=Math.imul(Pt,Et),_=_+Math.imul(gt,Gt)|0,x=Math.imul(gt,Et),B=B+Math.imul(qt,Bt)|0,_=_+Math.imul(qt,pt)|0,_=_+Math.imul(yt,Bt)|0,x=x+Math.imul(yt,pt)|0,B=B+Math.imul(kt,ee)|0,_=_+Math.imul(kt,It)|0,_=_+Math.imul(bt,ee)|0,x=x+Math.imul(bt,It)|0,B=B+Math.imul(Nt,oe)|0,_=_+Math.imul(Nt,Rt)|0,_=_+Math.imul(lt,oe)|0,x=x+Math.imul(lt,Rt)|0,B=B+Math.imul(Tt,re)|0,_=_+Math.imul(Tt,ie)|0,_=_+Math.imul(mt,re)|0,x=x+Math.imul(mt,ie)|0;var we=(m+B|0)+((_&8191)<<13)|0;m=(x+(_>>>13)|0)+(we>>>26)|0,we&=67108863,B=Math.imul(Pt,Bt),_=Math.imul(Pt,pt),_=_+Math.imul(gt,Bt)|0,x=Math.imul(gt,pt),B=B+Math.imul(qt,ee)|0,_=_+Math.imul(qt,It)|0,_=_+Math.imul(yt,ee)|0,x=x+Math.imul(yt,It)|0,B=B+Math.imul(kt,oe)|0,_=_+Math.imul(kt,Rt)|0,_=_+Math.imul(bt,oe)|0,x=x+Math.imul(bt,Rt)|0,B=B+Math.imul(Nt,re)|0,_=_+Math.imul(Nt,ie)|0,_=_+Math.imul(lt,re)|0,x=x+Math.imul(lt,ie)|0;var Se=(m+B|0)+((_&8191)<<13)|0;m=(x+(_>>>13)|0)+(Se>>>26)|0,Se&=67108863,B=Math.imul(Pt,ee),_=Math.imul(Pt,It),_=_+Math.imul(gt,ee)|0,x=Math.imul(gt,It),B=B+Math.imul(qt,oe)|0,_=_+Math.imul(qt,Rt)|0,_=_+Math.imul(yt,oe)|0,x=x+Math.imul(yt,Rt)|0,B=B+Math.imul(kt,re)|0,_=_+Math.imul(kt,ie)|0,_=_+Math.imul(bt,re)|0,x=x+Math.imul(bt,ie)|0;var Me=(m+B|0)+((_&8191)<<13)|0;m=(x+(_>>>13)|0)+(Me>>>26)|0,Me&=67108863,B=Math.imul(Pt,oe),_=Math.imul(Pt,Rt),_=_+Math.imul(gt,oe)|0,x=Math.imul(gt,Rt),B=B+Math.imul(qt,re)|0,_=_+Math.imul(qt,ie)|0,_=_+Math.imul(yt,re)|0,x=x+Math.imul(yt,ie)|0;var Ae=(m+B|0)+((_&8191)<<13)|0;m=(x+(_>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,B=Math.imul(Pt,re),_=Math.imul(Pt,ie),_=_+Math.imul(gt,re)|0,x=Math.imul(gt,ie);var Ee=(m+B|0)+((_&8191)<<13)|0;return m=(x+(_>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,$[0]=se,$[1]=ue,$[2]=fe,$[3]=he,$[4]=ce,$[5]=de,$[6]=le,$[7]=pe,$[8]=be,$[9]=me,$[10]=ge,$[11]=ve,$[12]=ye,$[13]=_e,$[14]=we,$[15]=Se,$[16]=Me,$[17]=Ae,$[18]=Ee,m!==0&&($[19]=m,w.length++),w};Math.imul||(j=V);function Z(h,b,w){w.negative=b.negative^h.negative,w.length=h.length+b.length;for(var P=0,L=0,$=0;$<w.length-1;$++){var m=L;L=0;for(var B=P&67108863,_=Math.min($,b.length-1),x=Math.max(0,$-h.length+1);x<=_;x++){var et=$-x,tt=h.words[et]|0,st=b.words[x]|0,ht=tt*st,dt=ht&67108863;m=m+(ht/67108864|0)|0,dt=dt+B|0,B=dt&67108863,m=m+(dt>>>26)|0,L+=m>>>26,m&=67108863}w.words[$]=B,P=m,m=L}return P!==0?w.words[$]=P:w.length--,w._strip()}function Y(h,b,w){return Z(h,b,w)}c.prototype.mulTo=function(h,b){var w,P=this.length+h.length;return this.length===10&&h.length===10?w=j(this,h,b):P<63?w=V(this,h,b):P<1024?w=Z(this,h,b):w=Y(this,h,b),w},c.prototype.mul=function(h){var b=new c(null);return b.words=new Array(this.length+h.length),this.mulTo(h,b)},c.prototype.mulf=function(h){var b=new c(null);return b.words=new Array(this.length+h.length),Y(this,h,b)},c.prototype.imul=function(h){return this.clone().mulTo(h,this)},c.prototype.imuln=function(h){var b=h<0;b&&(h=-h),u(typeof h=="number"),u(h<67108864);for(var w=0,P=0;P<this.length;P++){var L=(this.words[P]|0)*h,$=(L&67108863)+(w&67108863);w>>=26,w+=L/67108864|0,w+=$>>>26,this.words[P]=$&67108863}return w!==0&&(this.words[P]=w,this.length++),b?this.ineg():this},c.prototype.muln=function(h){return this.clone().imuln(h)},c.prototype.sqr=function(){return this.mul(this)},c.prototype.isqr=function(){return this.imul(this.clone())},c.prototype.pow=function(h){var b=U(h);if(b.length===0)return new c(1);for(var w=this,P=0;P<b.length&&b[P]===0;P++,w=w.sqr());if(++P<b.length)for(var L=w.sqr();P<b.length;P++,L=L.sqr())b[P]!==0&&(w=w.mul(L));return w},c.prototype.iushln=function(h){u(typeof h=="number"&&h>=0);var b=h%26,w=(h-b)/26,P=67108863>>>26-b<<26-b,L;if(b!==0){var $=0;for(L=0;L<this.length;L++){var m=this.words[L]&P,B=(this.words[L]|0)-m<<b;this.words[L]=B|$,$=m>>>26-b}$&&(this.words[L]=$,this.length++)}if(w!==0){for(L=this.length-1;L>=0;L--)this.words[L+w]=this.words[L];for(L=0;L<w;L++)this.words[L]=0;this.length+=w}return this._strip()},c.prototype.ishln=function(h){return u(this.negative===0),this.iushln(h)},c.prototype.iushrn=function(h,b,w){u(typeof h=="number"&&h>=0);var P;b?P=(b-b%26)/26:P=0;var L=h%26,$=Math.min((h-L)/26,this.length),m=67108863^67108863>>>L<<L,B=w;if(P-=$,P=Math.max(0,P),B){for(var _=0;_<$;_++)B.words[_]=this.words[_];B.length=$}if($!==0)if(this.length>$)for(this.length-=$,_=0;_<this.length;_++)this.words[_]=this.words[_+$];else this.words[0]=0,this.length=1;var x=0;for(_=this.length-1;_>=0&&(x!==0||_>=P);_--){var et=this.words[_]|0;this.words[_]=x<<26-L|et>>>L,x=et&m}return B&&x!==0&&(B.words[B.length++]=x),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},c.prototype.ishrn=function(h,b,w){return u(this.negative===0),this.iushrn(h,b,w)},c.prototype.shln=function(h){return this.clone().ishln(h)},c.prototype.ushln=function(h){return this.clone().iushln(h)},c.prototype.shrn=function(h){return this.clone().ishrn(h)},c.prototype.ushrn=function(h){return this.clone().iushrn(h)},c.prototype.testn=function(h){u(typeof h=="number"&&h>=0);var b=h%26,w=(h-b)/26,P=1<<b;if(this.length<=w)return!1;var L=this.words[w];return!!(L&P)},c.prototype.imaskn=function(h){u(typeof h=="number"&&h>=0);var b=h%26,w=(h-b)/26;if(u(this.negative===0,"imaskn works only with positive numbers"),this.length<=w)return this;if(b!==0&&w++,this.length=Math.min(w,this.length),b!==0){var P=67108863^67108863>>>b<<b;this.words[this.length-1]&=P}return this._strip()},c.prototype.maskn=function(h){return this.clone().imaskn(h)},c.prototype.iaddn=function(h){return u(typeof h=="number"),u(h<67108864),h<0?this.isubn(-h):this.negative!==0?this.length===1&&(this.words[0]|0)<=h?(this.words[0]=h-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(h),this.negative=1,this):this._iaddn(h)},c.prototype._iaddn=function(h){this.words[0]+=h;for(var b=0;b<this.length&&this.words[b]>=67108864;b++)this.words[b]-=67108864,b===this.length-1?this.words[b+1]=1:this.words[b+1]++;return this.length=Math.max(this.length,b+1),this},c.prototype.isubn=function(h){if(u(typeof h=="number"),u(h<67108864),h<0)return this.iaddn(-h);if(this.negative!==0)return this.negative=0,this.iaddn(h),this.negative=1,this;if(this.words[0]-=h,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var b=0;b<this.length&&this.words[b]<0;b++)this.words[b]+=67108864,this.words[b+1]-=1;return this._strip()},c.prototype.addn=function(h){return this.clone().iaddn(h)},c.prototype.subn=function(h){return this.clone().isubn(h)},c.prototype.iabs=function(){return this.negative=0,this},c.prototype.abs=function(){return this.clone().iabs()},c.prototype._ishlnsubmul=function(h,b,w){var P=h.length+w,L;this._expand(P);var $,m=0;for(L=0;L<h.length;L++){$=(this.words[L+w]|0)+m;var B=(h.words[L]|0)*b;$-=B&67108863,m=($>>26)-(B/67108864|0),this.words[L+w]=$&67108863}for(;L<this.length-w;L++)$=(this.words[L+w]|0)+m,m=$>>26,this.words[L+w]=$&67108863;if(m===0)return this._strip();for(u(m===-1),m=0,L=0;L<this.length;L++)$=-(this.words[L]|0)+m,m=$>>26,this.words[L]=$&67108863;return this.negative=1,this._strip()},c.prototype._wordDiv=function(h,b){var w=this.length-h.length,P=this.clone(),L=h,$=L.words[L.length-1]|0,m=this._countBits($);w=26-m,w!==0&&(L=L.ushln(w),P.iushln(w),$=L.words[L.length-1]|0);var B=P.length-L.length,_;if(b!=="mod"){_=new c(null),_.length=B+1,_.words=new Array(_.length);for(var x=0;x<_.length;x++)_.words[x]=0}var et=P.clone()._ishlnsubmul(L,1,B);et.negative===0&&(P=et,_&&(_.words[B]=1));for(var tt=B-1;tt>=0;tt--){var st=(P.words[L.length+tt]|0)*67108864+(P.words[L.length+tt-1]|0);for(st=Math.min(st/$|0,67108863),P._ishlnsubmul(L,st,tt);P.negative!==0;)st--,P.negative=0,P._ishlnsubmul(L,1,tt),P.isZero()||(P.negative^=1);_&&(_.words[tt]=st)}return _&&_._strip(),P._strip(),b!=="div"&&w!==0&&P.iushrn(w),{div:_||null,mod:P}},c.prototype.divmod=function(h,b,w){if(u(!h.isZero()),this.isZero())return{div:new c(0),mod:new c(0)};var P,L,$;return this.negative!==0&&h.negative===0?($=this.neg().divmod(h,b),b!=="mod"&&(P=$.div.neg()),b!=="div"&&(L=$.mod.neg(),w&&L.negative!==0&&L.iadd(h)),{div:P,mod:L}):this.negative===0&&h.negative!==0?($=this.divmod(h.neg(),b),b!=="mod"&&(P=$.div.neg()),{div:P,mod:$.mod}):this.negative&h.negative?($=this.neg().divmod(h.neg(),b),b!=="div"&&(L=$.mod.neg(),w&&L.negative!==0&&L.isub(h)),{div:$.div,mod:L}):h.length>this.length||this.cmp(h)<0?{div:new c(0),mod:this}:h.length===1?b==="div"?{div:this.divn(h.words[0]),mod:null}:b==="mod"?{div:null,mod:new c(this.modrn(h.words[0]))}:{div:this.divn(h.words[0]),mod:new c(this.modrn(h.words[0]))}:this._wordDiv(h,b)},c.prototype.div=function(h){return this.divmod(h,"div",!1).div},c.prototype.mod=function(h){return this.divmod(h,"mod",!1).mod},c.prototype.umod=function(h){return this.divmod(h,"mod",!0).mod},c.prototype.divRound=function(h){var b=this.divmod(h);if(b.mod.isZero())return b.div;var w=b.div.negative!==0?b.mod.isub(h):b.mod,P=h.ushrn(1),L=h.andln(1),$=w.cmp(P);return $<0||L===1&&$===0?b.div:b.div.negative!==0?b.div.isubn(1):b.div.iaddn(1)},c.prototype.modrn=function(h){var b=h<0;b&&(h=-h),u(h<=67108863);for(var w=(1<<26)%h,P=0,L=this.length-1;L>=0;L--)P=(w*P+(this.words[L]|0))%h;return b?-P:P},c.prototype.modn=function(h){return this.modrn(h)},c.prototype.idivn=function(h){var b=h<0;b&&(h=-h),u(h<=67108863);for(var w=0,P=this.length-1;P>=0;P--){var L=(this.words[P]|0)+w*67108864;this.words[P]=L/h|0,w=L%h}return this._strip(),b?this.ineg():this},c.prototype.divn=function(h){return this.clone().idivn(h)},c.prototype.egcd=function(h){u(h.negative===0),u(!h.isZero());var b=this,w=h.clone();b.negative!==0?b=b.umod(h):b=b.clone();for(var P=new c(1),L=new c(0),$=new c(0),m=new c(1),B=0;b.isEven()&&w.isEven();)b.iushrn(1),w.iushrn(1),++B;for(var _=w.clone(),x=b.clone();!b.isZero();){for(var et=0,tt=1;!(b.words[0]&tt)&&et<26;++et,tt<<=1);if(et>0)for(b.iushrn(et);et-- >0;)(P.isOdd()||L.isOdd())&&(P.iadd(_),L.isub(x)),P.iushrn(1),L.iushrn(1);for(var st=0,ht=1;!(w.words[0]&ht)&&st<26;++st,ht<<=1);if(st>0)for(w.iushrn(st);st-- >0;)($.isOdd()||m.isOdd())&&($.iadd(_),m.isub(x)),$.iushrn(1),m.iushrn(1);b.cmp(w)>=0?(b.isub(w),P.isub($),L.isub(m)):(w.isub(b),$.isub(P),m.isub(L))}return{a:$,b:m,gcd:w.iushln(B)}},c.prototype._invmp=function(h){u(h.negative===0),u(!h.isZero());var b=this,w=h.clone();b.negative!==0?b=b.umod(h):b=b.clone();for(var P=new c(1),L=new c(0),$=w.clone();b.cmpn(1)>0&&w.cmpn(1)>0;){for(var m=0,B=1;!(b.words[0]&B)&&m<26;++m,B<<=1);if(m>0)for(b.iushrn(m);m-- >0;)P.isOdd()&&P.iadd($),P.iushrn(1);for(var _=0,x=1;!(w.words[0]&x)&&_<26;++_,x<<=1);if(_>0)for(w.iushrn(_);_-- >0;)L.isOdd()&&L.iadd($),L.iushrn(1);b.cmp(w)>=0?(b.isub(w),P.isub(L)):(w.isub(b),L.isub(P))}var et;return b.cmpn(1)===0?et=P:et=L,et.cmpn(0)<0&&et.iadd(h),et},c.prototype.gcd=function(h){if(this.isZero())return h.abs();if(h.isZero())return this.abs();var b=this.clone(),w=h.clone();b.negative=0,w.negative=0;for(var P=0;b.isEven()&&w.isEven();P++)b.iushrn(1),w.iushrn(1);do{for(;b.isEven();)b.iushrn(1);for(;w.isEven();)w.iushrn(1);var L=b.cmp(w);if(L<0){var $=b;b=w,w=$}else if(L===0||w.cmpn(1)===0)break;b.isub(w)}while(!0);return w.iushln(P)},c.prototype.invm=function(h){return this.egcd(h).a.umod(h)},c.prototype.isEven=function(){return(this.words[0]&1)===0},c.prototype.isOdd=function(){return(this.words[0]&1)===1},c.prototype.andln=function(h){return this.words[0]&h},c.prototype.bincn=function(h){u(typeof h=="number");var b=h%26,w=(h-b)/26,P=1<<b;if(this.length<=w)return this._expand(w+1),this.words[w]|=P,this;for(var L=P,$=w;L!==0&&$<this.length;$++){var m=this.words[$]|0;m+=L,L=m>>>26,m&=67108863,this.words[$]=m}return L!==0&&(this.words[$]=L,this.length++),this},c.prototype.isZero=function(){return this.length===1&&this.words[0]===0},c.prototype.cmpn=function(h){var b=h<0;if(this.negative!==0&&!b)return-1;if(this.negative===0&&b)return 1;this._strip();var w;if(this.length>1)w=1;else{b&&(h=-h),u(h<=67108863,"Number is too big");var P=this.words[0]|0;w=P===h?0:P<h?-1:1}return this.negative!==0?-w|0:w},c.prototype.cmp=function(h){if(this.negative!==0&&h.negative===0)return-1;if(this.negative===0&&h.negative!==0)return 1;var b=this.ucmp(h);return this.negative!==0?-b|0:b},c.prototype.ucmp=function(h){if(this.length>h.length)return 1;if(this.length<h.length)return-1;for(var b=0,w=this.length-1;w>=0;w--){var P=this.words[w]|0,L=h.words[w]|0;if(P!==L){P<L?b=-1:P>L&&(b=1);break}}return b},c.prototype.gtn=function(h){return this.cmpn(h)===1},c.prototype.gt=function(h){return this.cmp(h)===1},c.prototype.gten=function(h){return this.cmpn(h)>=0},c.prototype.gte=function(h){return this.cmp(h)>=0},c.prototype.ltn=function(h){return this.cmpn(h)===-1},c.prototype.lt=function(h){return this.cmp(h)===-1},c.prototype.lten=function(h){return this.cmpn(h)<=0},c.prototype.lte=function(h){return this.cmp(h)<=0},c.prototype.eqn=function(h){return this.cmpn(h)===0},c.prototype.eq=function(h){return this.cmp(h)===0},c.red=function(h){return new d(h)},c.prototype.toRed=function(h){return u(!this.red,"Already a number in reduction context"),u(this.negative===0,"red works only with positives"),h.convertTo(this)._forceRed(h)},c.prototype.fromRed=function(){return u(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},c.prototype._forceRed=function(h){return this.red=h,this},c.prototype.forceRed=function(h){return u(!this.red,"Already a number in reduction context"),this._forceRed(h)},c.prototype.redAdd=function(h){return u(this.red,"redAdd works only with red numbers"),this.red.add(this,h)},c.prototype.redIAdd=function(h){return u(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,h)},c.prototype.redSub=function(h){return u(this.red,"redSub works only with red numbers"),this.red.sub(this,h)},c.prototype.redISub=function(h){return u(this.red,"redISub works only with red numbers"),this.red.isub(this,h)},c.prototype.redShl=function(h){return u(this.red,"redShl works only with red numbers"),this.red.shl(this,h)},c.prototype.redMul=function(h){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,h),this.red.mul(this,h)},c.prototype.redIMul=function(h){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,h),this.red.imul(this,h)},c.prototype.redSqr=function(){return u(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},c.prototype.redISqr=function(){return u(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},c.prototype.redSqrt=function(){return u(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},c.prototype.redInvm=function(){return u(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},c.prototype.redNeg=function(){return u(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},c.prototype.redPow=function(h){return u(this.red&&!h.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,h)};var rt={k256:null,p224:null,p192:null,p25519:null};function nt(h,b){this.name=h,this.p=new c(b,16),this.n=this.p.bitLength(),this.k=new c(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}nt.prototype._tmp=function(){var h=new c(null);return h.words=new Array(Math.ceil(this.n/13)),h},nt.prototype.ireduce=function(h){var b=h,w;do this.split(b,this.tmp),b=this.imulK(b),b=b.iadd(this.tmp),w=b.bitLength();while(w>this.n);var P=w<this.n?-1:b.ucmp(this.p);return P===0?(b.words[0]=0,b.length=1):P>0?b.isub(this.p):b.strip!==void 0?b.strip():b._strip(),b},nt.prototype.split=function(h,b){h.iushrn(this.n,0,b)},nt.prototype.imulK=function(h){return h.imul(this.k)};function M(){nt.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}l(M,nt),M.prototype.split=function(h,b){for(var w=4194303,P=Math.min(h.length,9),L=0;L<P;L++)b.words[L]=h.words[L];if(b.length=P,h.length<=9){h.words[0]=0,h.length=1;return}var $=h.words[9];for(b.words[b.length++]=$&w,L=10;L<h.length;L++){var m=h.words[L]|0;h.words[L-10]=(m&w)<<4|$>>>22,$=m}$>>>=22,h.words[L-10]=$,$===0&&h.length>10?h.length-=10:h.length-=9},M.prototype.imulK=function(h){h.words[h.length]=0,h.words[h.length+1]=0,h.length+=2;for(var b=0,w=0;w<h.length;w++){var P=h.words[w]|0;b+=P*977,h.words[w]=b&67108863,b=P*64+(b/67108864|0)}return h.words[h.length-1]===0&&(h.length--,h.words[h.length-1]===0&&h.length--),h};function k(){nt.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}l(k,nt);function W(){nt.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}l(W,nt);function Q(){nt.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}l(Q,nt),Q.prototype.imulK=function(h){for(var b=0,w=0;w<h.length;w++){var P=(h.words[w]|0)*19+b,L=P&67108863;P>>>=26,h.words[w]=L,b=P}return b!==0&&(h.words[h.length++]=b),h},c._prime=function(h){if(rt[h])return rt[h];var b;if(h==="k256")b=new M;else if(h==="p224")b=new k;else if(h==="p192")b=new W;else if(h==="p25519")b=new Q;else throw new Error("Unknown prime "+h);return rt[h]=b,b};function d(h){if(typeof h=="string"){var b=c._prime(h);this.m=b.p,this.prime=b}else u(h.gtn(1),"modulus must be greater than 1"),this.m=h,this.prime=null}d.prototype._verify1=function(h){u(h.negative===0,"red works only with positives"),u(h.red,"red works only with red numbers")},d.prototype._verify2=function(h,b){u((h.negative|b.negative)===0,"red works only with positives"),u(h.red&&h.red===b.red,"red works only with red numbers")},d.prototype.imod=function(h){return this.prime?this.prime.ireduce(h)._forceRed(this):(N(h,h.umod(this.m)._forceRed(this)),h)},d.prototype.neg=function(h){return h.isZero()?h.clone():this.m.sub(h)._forceRed(this)},d.prototype.add=function(h,b){this._verify2(h,b);var w=h.add(b);return w.cmp(this.m)>=0&&w.isub(this.m),w._forceRed(this)},d.prototype.iadd=function(h,b){this._verify2(h,b);var w=h.iadd(b);return w.cmp(this.m)>=0&&w.isub(this.m),w},d.prototype.sub=function(h,b){this._verify2(h,b);var w=h.sub(b);return w.cmpn(0)<0&&w.iadd(this.m),w._forceRed(this)},d.prototype.isub=function(h,b){this._verify2(h,b);var w=h.isub(b);return w.cmpn(0)<0&&w.iadd(this.m),w},d.prototype.shl=function(h,b){return this._verify1(h),this.imod(h.ushln(b))},d.prototype.imul=function(h,b){return this._verify2(h,b),this.imod(h.imul(b))},d.prototype.mul=function(h,b){return this._verify2(h,b),this.imod(h.mul(b))},d.prototype.isqr=function(h){return this.imul(h,h.clone())},d.prototype.sqr=function(h){return this.mul(h,h)},d.prototype.sqrt=function(h){if(h.isZero())return h.clone();var b=this.m.andln(3);if(u(b%2===1),b===3){var w=this.m.add(new c(1)).iushrn(2);return this.pow(h,w)}for(var P=this.m.subn(1),L=0;!P.isZero()&&P.andln(1)===0;)L++,P.iushrn(1);u(!P.isZero());var $=new c(1).toRed(this),m=$.redNeg(),B=this.m.subn(1).iushrn(1),_=this.m.bitLength();for(_=new c(2*_*_).toRed(this);this.pow(_,B).cmp(m)!==0;)_.redIAdd(m);for(var x=this.pow(_,P),et=this.pow(h,P.addn(1).iushrn(1)),tt=this.pow(h,P),st=L;tt.cmp($)!==0;){for(var ht=tt,dt=0;ht.cmp($)!==0;dt++)ht=ht.redSqr();u(dt<st);var J=this.pow(x,new c(1).iushln(st-dt-1));et=et.redMul(J),x=J.redSqr(),tt=tt.redMul(x),st=dt}return et},d.prototype.invm=function(h){var b=h._invmp(this.m);return b.negative!==0?(b.negative=0,this.imod(b).redNeg()):this.imod(b)},d.prototype.pow=function(h,b){if(b.isZero())return new c(1).toRed(this);if(b.cmpn(1)===0)return h.clone();var w=4,P=new Array(1<<w);P[0]=new c(1).toRed(this),P[1]=h;for(var L=2;L<P.length;L++)P[L]=this.mul(P[L-1],h);var $=P[0],m=0,B=0,_=b.bitLength()%26;for(_===0&&(_=26),L=b.length-1;L>=0;L--){for(var x=b.words[L],et=_-1;et>=0;et--){var tt=x>>et&1;if($!==P[0]&&($=this.sqr($)),tt===0&&m===0){B=0;continue}m<<=1,m|=tt,B++,!(B!==w&&(L!==0||et!==0))&&($=this.mul($,P[m]),B=0,m=0)}_=26}return $},d.prototype.convertTo=function(h){var b=h.umod(this.m);return b===h?b.clone():b},d.prototype.convertFrom=function(h){var b=h.clone();return b.red=null,b},c.mont=function(h){return new E(h)};function E(h){d.call(this,h),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new c(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}l(E,d),E.prototype.convertTo=function(h){return this.imod(h.ushln(this.shift))},E.prototype.convertFrom=function(h){var b=this.imod(h.mul(this.rinv));return b.red=null,b},E.prototype.imul=function(h,b){if(h.isZero()||b.isZero())return h.words[0]=0,h.length=1,h;var w=h.imul(b),P=w.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),L=w.isub(P).iushrn(this.shift),$=L;return L.cmp(this.m)>=0?$=L.isub(this.m):L.cmpn(0)<0&&($=L.iadd(this.m)),$._forceRed(this)},E.prototype.mul=function(h,b){if(h.isZero()||b.isZero())return new c(0)._forceRed(this);var w=h.mul(b),P=w.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),L=w.isub(P).iushrn(this.shift),$=L;return L.cmp(this.m)>=0?$=L.isub(this.m):L.cmpn(0)<0&&($=L.iadd(this.m)),$._forceRed(this)},E.prototype.invm=function(h){var b=this.imod(h._invmp(this.m).mul(this.r2));return b._forceRed(this)}})(i,commonjsGlobal)})(bn$1);var build={},ascii={};Object.defineProperty(ascii,"__esModule",{value:!0});ascii.fromAscii=ascii.toAscii=void 0;function toAscii(i){const n=a=>a.split("").map(u=>{const l=u.charCodeAt(0);if(l<32||l>126)throw new Error("Cannot encode character that is out of printable ASCII range: "+l);return l});return Uint8Array.from(n(i))}ascii.toAscii=toAscii;function fromAscii(i){return(n=>n.map(a=>{if(a<32||a>126)throw new Error("Cannot decode character that is out of printable ASCII range: "+a);return String.fromCharCode(a)}))(Array.from(i)).join("")}ascii.fromAscii=fromAscii;var base64$3={},base64Js={};base64Js.byteLength=byteLength;base64Js.toByteArray=toByteArray;base64Js.fromByteArray=fromByteArray;var lookup=[],revLookup=[],Arr=typeof Uint8Array<"u"?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var i$2=0,len=code.length;i$2<len;++i$2)lookup[i$2]=code[i$2],revLookup[code.charCodeAt(i$2)]=i$2;revLookup["-".charCodeAt(0)]=62;revLookup["_".charCodeAt(0)]=63;function getLens(i){var n=i.length;if(n%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var a=i.indexOf("=");a===-1&&(a=n);var u=a===n?0:4-a%4;return[a,u]}function byteLength(i){var n=getLens(i),a=n[0],u=n[1];return(a+u)*3/4-u}function _byteLength(i,n,a){return(n+a)*3/4-a}function toByteArray(i){var n,a=getLens(i),u=a[0],l=a[1],c=new Arr(_byteLength(i,u,l)),S=0,I=l>0?u-4:u,y;for(y=0;y<I;y+=4)n=revLookup[i.charCodeAt(y)]<<18|revLookup[i.charCodeAt(y+1)]<<12|revLookup[i.charCodeAt(y+2)]<<6|revLookup[i.charCodeAt(y+3)],c[S++]=n>>16&255,c[S++]=n>>8&255,c[S++]=n&255;return l===2&&(n=revLookup[i.charCodeAt(y)]<<2|revLookup[i.charCodeAt(y+1)]>>4,c[S++]=n&255),l===1&&(n=revLookup[i.charCodeAt(y)]<<10|revLookup[i.charCodeAt(y+1)]<<4|revLookup[i.charCodeAt(y+2)]>>2,c[S++]=n>>8&255,c[S++]=n&255),c}function tripletToBase64(i){return lookup[i>>18&63]+lookup[i>>12&63]+lookup[i>>6&63]+lookup[i&63]}function encodeChunk(i,n,a){for(var u,l=[],c=n;c<a;c+=3)u=(i[c]<<16&16711680)+(i[c+1]<<8&65280)+(i[c+2]&255),l.push(tripletToBase64(u));return l.join("")}function fromByteArray(i){for(var n,a=i.length,u=a%3,l=[],c=16383,S=0,I=a-u;S<I;S+=c)l.push(encodeChunk(i,S,S+c>I?I:S+c));return u===1?(n=i[a-1],l.push(lookup[n>>2]+lookup[n<<4&63]+"==")):u===2&&(n=(i[a-2]<<8)+i[a-1],l.push(lookup[n>>10]+lookup[n>>4&63]+lookup[n<<2&63]+"=")),l.join("")}var __createBinding$5=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(i,n,a,u){u===void 0&&(u=a);var l=Object.getOwnPropertyDescriptor(n,a);(!l||("get"in l?!n.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return n[a]}}),Object.defineProperty(i,u,l)}:function(i,n,a,u){u===void 0&&(u=a),i[u]=n[a]}),__setModuleDefault$5=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(i,n){Object.defineProperty(i,"default",{enumerable:!0,value:n})}:function(i,n){i.default=n}),__importStar$5=commonjsGlobal&&commonjsGlobal.__importStar||function(i){if(i&&i.__esModule)return i;var n={};if(i!=null)for(var a in i)a!=="default"&&Object.prototype.hasOwnProperty.call(i,a)&&__createBinding$5(n,i,a);return __setModuleDefault$5(n,i),n};Object.defineProperty(base64$3,"__esModule",{value:!0});base64$3.fromBase64=base64$3.toBase64=void 0;const base64js=__importStar$5(base64Js);function toBase64(i){return base64js.fromByteArray(i)}base64$3.toBase64=toBase64;function fromBase64(i){if(!i.match(/^[a-zA-Z0-9+/]*={0,2}$/))throw new Error("Invalid base64 string format");return base64js.toByteArray(i)}base64$3.fromBase64=fromBase64;var bech32$3={},ALPHABET="qpzry9x8gf2tvdw0s3jn54khce6mua7l",ALPHABET_MAP={};for(var z=0;z<ALPHABET.length;z++){var x$1=ALPHABET.charAt(z);if(ALPHABET_MAP[x$1]!==void 0)throw new TypeError(x$1+" is ambiguous");ALPHABET_MAP[x$1]=z}function polymodStep(i){var n=i>>25;return(i&33554431)<<5^-(n>>0&1)&996825010^-(n>>1&1)&642813549^-(n>>2&1)&513874426^-(n>>3&1)&1027748829^-(n>>4&1)&705979059}function prefixChk(i){for(var n=1,a=0;a<i.length;++a){var u=i.charCodeAt(a);if(u<33||u>126)return"Invalid prefix ("+i+")";n=polymodStep(n)^u>>5}for(n=polymodStep(n),a=0;a<i.length;++a){var l=i.charCodeAt(a);n=polymodStep(n)^l&31}return n}function encode(i,n,a){if(a=a||90,i.length+7+n.length>a)throw new TypeError("Exceeds length limit");i=i.toLowerCase();var u=prefixChk(i);if(typeof u=="string")throw new Error(u);for(var l=i+"1",c=0;c<n.length;++c){var S=n[c];if(S>>5)throw new Error("Non 5-bit word");u=polymodStep(u)^S,l+=ALPHABET.charAt(S)}for(c=0;c<6;++c)u=polymodStep(u);for(u^=1,c=0;c<6;++c){var I=u>>(5-c)*5&31;l+=ALPHABET.charAt(I)}return l}function __decode(i,n){if(n=n||90,i.length<8)return i+" too short";if(i.length>n)return"Exceeds length limit";var a=i.toLowerCase(),u=i.toUpperCase();if(i!==a&&i!==u)return"Mixed-case string "+i;i=a;var l=i.lastIndexOf("1");if(l===-1)return"No separator character for "+i;if(l===0)return"Missing prefix for "+i;var c=i.slice(0,l),S=i.slice(l+1);if(S.length<6)return"Data too short";var I=prefixChk(c);if(typeof I=="string")return I;for(var y=[],g=0;g<S.length;++g){var N=S.charAt(g),F=ALPHABET_MAP[N];if(F===void 0)return"Unknown character "+N;I=polymodStep(I)^F,!(g+6>=S.length)&&y.push(F)}return I!==1?"Invalid checksum for "+i:{prefix:c,words:y}}function decodeUnsafe(){var i=__decode.apply(null,arguments);if(typeof i=="object")return i}function decode(i){var n=__decode.apply(null,arguments);if(typeof n=="object")return n;throw new Error(n)}function convert(i,n,a,u){for(var l=0,c=0,S=(1<<a)-1,I=[],y=0;y<i.length;++y)for(l=l<<n|i[y],c+=n;c>=a;)c-=a,I.push(l>>c&S);if(u)c>0&&I.push(l<<a-c&S);else{if(c>=n)return"Excess padding";if(l<<a-c&S)return"Non-zero padding"}return I}function toWordsUnsafe(i){var n=convert(i,8,5,!0);if(Array.isArray(n))return n}function toWords(i){var n=convert(i,8,5,!0);if(Array.isArray(n))return n;throw new Error(n)}function fromWordsUnsafe(i){var n=convert(i,5,8,!1);if(Array.isArray(n))return n}function fromWords(i){var n=convert(i,5,8,!1);if(Array.isArray(n))return n;throw new Error(n)}var bech32$2={decodeUnsafe,decode,encode,toWordsUnsafe,toWords,fromWordsUnsafe,fromWords},__createBinding$4=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(i,n,a,u){u===void 0&&(u=a);var l=Object.getOwnPropertyDescriptor(n,a);(!l||("get"in l?!n.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return n[a]}}),Object.defineProperty(i,u,l)}:function(i,n,a,u){u===void 0&&(u=a),i[u]=n[a]}),__setModuleDefault$4=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(i,n){Object.defineProperty(i,"default",{enumerable:!0,value:n})}:function(i,n){i.default=n}),__importStar$4=commonjsGlobal&&commonjsGlobal.__importStar||function(i){if(i&&i.__esModule)return i;var n={};if(i!=null)for(var a in i)a!=="default"&&Object.prototype.hasOwnProperty.call(i,a)&&__createBinding$4(n,i,a);return __setModuleDefault$4(n,i),n};Object.defineProperty(bech32$3,"__esModule",{value:!0});bech32$3.normalizeBech32=bech32$3.fromBech32=bech32$3.toBech32=void 0;const bech32$1=__importStar$4(bech32$2);function toBech32(i,n,a){return bech32$1.encode(i,bech32$1.toWords(n),a)}bech32$3.toBech32=toBech32;function fromBech32(i,n=1/0){const a=bech32$1.decode(i,n);return{prefix:a.prefix,data:new Uint8Array(bech32$1.fromWords(a.words))}}bech32$3.fromBech32=fromBech32;function normalizeBech32(i){const{prefix:n,data:a}=fromBech32(i);return toBech32(n,a)}bech32$3.normalizeBech32=normalizeBech32;var hex={};Object.defineProperty(hex,"__esModule",{value:!0});hex.fromHex=hex.toHex=void 0;function toHex$1(i){let n="";for(const a of i)n+=("0"+a.toString(16)).slice(-2);return n}hex.toHex=toHex$1;function fromHex(i){if(i.length%2!==0)throw new Error("hex string length must be a multiple of 2");const n=new Uint8Array(i.length/2);for(let a=0;a<n.length;a++){const u=2*a,l=i.slice(u,u+2);if(!l.match(/[0-9a-f]{2}/i))throw new Error("hex string contains invalid characters");n[a]=parseInt(l,16)}return n}hex.fromHex=fromHex;var rfc3339={};Object.defineProperty(rfc3339,"__esModule",{value:!0});rfc3339.toRfc3339=rfc3339.fromRfc3339=void 0;const rfc3339Matcher=/^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2}):(\d{2})(\.\d{1,9})?((?:[+-]\d{2}:\d{2})|Z)$/;function padded(i,n=2){return i.toString().padStart(n,"0")}function fromRfc3339(i){const n=rfc3339Matcher.exec(i);if(!n)throw new Error("Date string is not in RFC3339 format");const a=+n[1],u=+n[2],l=+n[3],c=+n[4],S=+n[5],I=+n[6],y=n[7]?Math.floor(+n[7]*1e3):0;let g,N,F;n[8]==="Z"?(g=1,N=0,F=0):(g=n[8].substring(0,1)==="-"?-1:1,N=+n[8].substring(1,3),F=+n[8].substring(4,6));const H=g*(N*60+F)*60,G=Date.UTC(a,u-1,l,c,S,I,y)-H*1e3;return new Date(G)}rfc3339.fromRfc3339=fromRfc3339;function toRfc3339(i){const n=i.getUTCFullYear(),a=padded(i.getUTCMonth()+1),u=padded(i.getUTCDate()),l=padded(i.getUTCHours()),c=padded(i.getUTCMinutes()),S=padded(i.getUTCSeconds()),I=padded(i.getUTCMilliseconds(),3);return`${n}-${a}-${u}T${l}:${c}:${S}.${I}Z`}rfc3339.toRfc3339=toRfc3339;var utf8$3={};Object.defineProperty(utf8$3,"__esModule",{value:!0});utf8$3.fromUtf8=utf8$3.toUtf8=void 0;function toUtf8(i){return new TextEncoder().encode(i)}utf8$3.toUtf8=toUtf8;function fromUtf8(i,n=!1){const a=!n;return new TextDecoder("utf-8",{fatal:a}).decode(i)}utf8$3.fromUtf8=fromUtf8;(function(i){Object.defineProperty(i,"__esModule",{value:!0}),i.toUtf8=i.fromUtf8=i.toRfc3339=i.fromRfc3339=i.toHex=i.fromHex=i.toBech32=i.normalizeBech32=i.fromBech32=i.toBase64=i.fromBase64=i.toAscii=i.fromAscii=void 0;var n=ascii;Object.defineProperty(i,"fromAscii",{enumerable:!0,get:function(){return n.fromAscii}}),Object.defineProperty(i,"toAscii",{enumerable:!0,get:function(){return n.toAscii}});var a=base64$3;Object.defineProperty(i,"fromBase64",{enumerable:!0,get:function(){return a.fromBase64}}),Object.defineProperty(i,"toBase64",{enumerable:!0,get:function(){return a.toBase64}});var u=bech32$3;Object.defineProperty(i,"fromBech32",{enumerable:!0,get:function(){return u.fromBech32}}),Object.defineProperty(i,"normalizeBech32",{enumerable:!0,get:function(){return u.normalizeBech32}}),Object.defineProperty(i,"toBech32",{enumerable:!0,get:function(){return u.toBech32}});var l=hex;Object.defineProperty(i,"fromHex",{enumerable:!0,get:function(){return l.fromHex}}),Object.defineProperty(i,"toHex",{enumerable:!0,get:function(){return l.toHex}});var c=rfc3339;Object.defineProperty(i,"fromRfc3339",{enumerable:!0,get:function(){return c.fromRfc3339}}),Object.defineProperty(i,"toRfc3339",{enumerable:!0,get:function(){return c.toRfc3339}});var S=utf8$3;Object.defineProperty(i,"fromUtf8",{enumerable:!0,get:function(){return S.fromUtf8}}),Object.defineProperty(i,"toUtf8",{enumerable:!0,get:function(){return S.toUtf8}})})(build);var t=(i=>(i.INVALID_INPUT_PARAMETERS="1000",i.UNKNOWN_PROVIDERS="1001",i.CANNOT_FIND_INBOUND_ADDRESS="1002",i.NO_INBOUND_ADDRESSES="1003",i.CHAIN_HALTED_OR_UNSUPPORTED="1004",i.MISSING_INPUT_PARAMETER="1005",i.INVALID_TYPE_GENERIC="1100",i.INVALID_NUMBER_STRING="1101",i.INVALID_NUMBER="1102",i.INVALID_BOOLEAN="1103",i.INVALID_OBJECT="1104",i.INVALID_ARRAY="1105",i.SELL_AMOUNT_MUST_BE_POSITIVE_INTEGER="2000",i.SELL_BUY_ASSETS_ARE_THE_SAME="2001",i.MISSING_SOURCE_ADDRESS_FOR_SYNTH="2002",i.AFF_ADDRESS_AND_BPS_OR_NEITHER="2003",i.AFF_ADDRESS_TOO_LONG="2004",i.AFF_BPS_INTEGER_0_100="2005",i.SOURCE_ADDRESS_INVALID_FOR_SELL_CHAIN="2006",i.DESTINATION_ADDRESS_INVALID_FOR_BUY_CHAIN="2007",i.PREFERRED_PROFVIDER_NOT_SUPPORTED="2008",i.DESTINATION_ADDRESS_SMART_CONTRACT="2009",i.BUY_AMOUNT_MUST_BE_POSITIVE_INTEGER="2010",i.SOURCE_ADDRESS_SMART_CONTRACT="2011",i.INVALID_PROVIDER="2100",i.MISSING_CROSS_CHAIN_PROVIDER="2101",i.MISSING_AVAX_PROVIDER="2102",i.MISSING_BSC_PROVIDER="2103",i.MISSING_ETH_PROVIDER="2104",i.INVALID_PROVIDER_FOR_SWAP_OUT="2105",i.MISSING_ARB_PROVIDER="2106",i.INVALID_CHAIN="2200",i.INVALID_ASSET="2201",i.INVALID_ASSET_IDENTIFIER="2202",i.UNSUPPORTED_CHAIN="2204",i.UNSUPPORTED_ASSET="2203",i.UNSUPPORTED_ASSET_FOR_SWAPOUT="2205",i.INVALID_SOURCE_ADDRESS="2300",i.INVALID_DESTINATION_ADDRESS="2301",i.THORNODE_QUOTE_GENERIC_ERROR="3000",i.NOT_ENOUGH_SYNTH_BALANCE="3001",i.SYNTH_MINTING_CAP_REACHED="3002",i.INVALID_QUOTE_MODE="4000",i.NO_QUOTES="4001",i.SERVICE_UNAVAILABLE_GENERIC="5000",i.MISSING_GAS_DATA_GENERIC="5100",i.MISSING_TOKEN_INFO_GENERIC="5200",i.CANT_FIND_TOKEN_LIST="5201",i.NO_PRICE="5202",i.PRICE_IS_STALE="5203",i.ADDRESS_NOT_WHITELISTED="6000",i.ADDRESS_ALREADY_CLAIMED="6001",i.TEMPORARY_ERROR="9999",i))(t||{});t.INVALID_INPUT_PARAMETERS+"",t.UNKNOWN_PROVIDERS+"",t.CANNOT_FIND_INBOUND_ADDRESS+"",t.NO_INBOUND_ADDRESSES+"",t.CHAIN_HALTED_OR_UNSUPPORTED+"",t.MISSING_INPUT_PARAMETER+"",t.INVALID_TYPE_GENERIC+"",t.INVALID_NUMBER_STRING+"",t.INVALID_NUMBER+"",t.INVALID_BOOLEAN+"",t.INVALID_OBJECT+"",t.INVALID_ARRAY+"",t.SELL_AMOUNT_MUST_BE_POSITIVE_INTEGER+"",t.SELL_BUY_ASSETS_ARE_THE_SAME+"",t.MISSING_SOURCE_ADDRESS_FOR_SYNTH+"",t.AFF_ADDRESS_AND_BPS_OR_NEITHER+"",t.AFF_ADDRESS_TOO_LONG+"",t.AFF_BPS_INTEGER_0_100+"",t.SOURCE_ADDRESS_INVALID_FOR_SELL_CHAIN+"",t.DESTINATION_ADDRESS_INVALID_FOR_BUY_CHAIN+"",t.PREFERRED_PROFVIDER_NOT_SUPPORTED+"",t.DESTINATION_ADDRESS_SMART_CONTRACT+"",t.BUY_AMOUNT_MUST_BE_POSITIVE_INTEGER+"",t.INVALID_PROVIDER+"",t.MISSING_CROSS_CHAIN_PROVIDER+"",t.MISSING_AVAX_PROVIDER+"",t.MISSING_BSC_PROVIDER+"",t.MISSING_ETH_PROVIDER+"",t.MISSING_ARB_PROVIDER+"",t.INVALID_PROVIDER_FOR_SWAP_OUT+"",t.INVALID_CHAIN+"",t.INVALID_ASSET+"",t.UNSUPPORTED_CHAIN+"",t.UNSUPPORTED_ASSET+"",t.UNSUPPORTED_ASSET_FOR_SWAPOUT+"",t.THORNODE_QUOTE_GENERIC_ERROR+"",t.INVALID_SOURCE_ADDRESS+"",t.INVALID_DESTINATION_ADDRESS+"",t.NOT_ENOUGH_SYNTH_BALANCE+"",t.SYNTH_MINTING_CAP_REACHED+"",t.INVALID_QUOTE_MODE+"",t.NO_QUOTES+"",t.SERVICE_UNAVAILABLE_GENERIC+"",t.MISSING_GAS_DATA_GENERIC+"",t.MISSING_TOKEN_INFO_GENERIC+"",t.CANT_FIND_TOKEN_LIST+"",t.NO_PRICE+"",t.PRICE_IS_STALE+"",t.ADDRESS_NOT_WHITELISTED+"",t.ADDRESS_ALREADY_CLAIMED+"";var i$1=(i=>(i.Arbitrum="ARB",i.Avalanche="AVAX",i.Binance="BNB",i.BinanceSmartChain="BSC",i.Bitcoin="BTC",i.BitcoinCash="BCH",i.Cosmos="GAIA",i.Dogecoin="DOGE",i.Ethereum="ETH",i.Litecoin="LTC",i.Maya="MAYA",i.Optimism="OP",i.Polygon="MATIC",i.THORChain="THOR",i))(i$1||{}),T$1=(i=>(i.Arbitrum="42161",i.ArbitrumHex="0xa4b1",i.Avalanche="43114",i.AvalancheHex="0xa86a",i.Binance="Binance-Chain-Tigris",i.BinanceSmartChain="56",i.BinanceSmartChainHex="0x38",i.Bitcoin="bitcoin",i.BitcoinCash="bitcoincash",i.Cosmos="cosmoshub-4",i.Dogecoin="dogecoin",i.Ethereum="1",i.EthereumHex="0x1",i.Litecoin="litecoin",i.Maya="mayachain-mainnet-v1",i.MayaStagenet="mayachain-stagenet-v1",i.Optimism="10",i.OptimismHex="0xa",i.Polygon="137",i.PolygonHex="0x89",i.THORChain="thorchain-mainnet-v1",i.THORChainStagenet="thorchain-stagenet-v2",i))(T$1||{}),I$1=(i=>(i.Arbitrum="https://arb1.arbitrum.io/rpc",i.Avalanche="https://node-router.thorswap.net/avalanche-c",i.Binance="",i.BinanceSmartChain="https://bsc-dataseed.binance.org",i.Bitcoin="https://node-router.thorswap.net/bitcoin",i.BitcoinCash="https://node-router.thorswap.net/bitcoin-cash",i.Cosmos="https://node-router.thorswap.net/cosmos/rpc",i.Dogecoin="https://node-router.thorswap.net/dogecoin",i.Ethereum="https://node-router.thorswap.net/ethereum",i.Litecoin="https://node-router.thorswap.net/litecoin",i.Maya="https://tendermint.mayachain.info",i.MayaStagenet="https://stagenet.tendermint.mayachain.info",i.Optimism="https://mainnet.optimism.io",i.Polygon="https://polygon-rpc.com",i.THORChain="https://rpc.thorswap.net",i.THORChainStagenet="https://stagenet-rpc.ninerealms.com",i))(I$1||{});const p=Object.values(i$1),v=Object.keys(i$1),o=p.reduce((i,n)=>{const a=v.find(u=>i$1[u]===n);return a&&(i[n]=a),i},{});p.reduce((i,n)=>(i[n]=T$1[o[n]],i),{});p.reduce((i,n)=>(i[n]=I$1[o[n]],i),{});p.reduce((i,n)=>{const a=`${o[n]}Hex`;return i[n]=T$1[a],i},{});var R=(i=>(i.Average="average",i.Fast="fast",i.Fastest="fastest",i))(R||{}),elliptic={};const name="elliptic",version="6.5.4",description="EC cryptography",main="lib/elliptic.js",files=["lib"],scripts={lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository={type:"git",url:"git@github.com:indutny/elliptic"},keywords=["EC","Elliptic","curve","Cryptography"],author="Fedor Indutny <fedor@indutny.com>",license="MIT",bugs={url:"https://github.com/indutny/elliptic/issues"},homepage="https://github.com/indutny/elliptic",devDependencies={brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies={"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"},require$$0={name,version,description,main,files,scripts,repository,keywords,author,license,bugs,homepage,devDependencies,dependencies};var utils$m={},bn={exports:{}};(function(i){(function(n,a){function u(d,E){if(!d)throw new Error(E||"Assertion failed")}function l(d,E){d.super_=E;var h=function(){};h.prototype=E.prototype,d.prototype=new h,d.prototype.constructor=d}function c(d,E,h){if(c.isBN(d))return d;this.negative=0,this.words=null,this.length=0,this.red=null,d!==null&&((E==="le"||E==="be")&&(h=E,E=10),this._init(d||0,E||10,h||"be"))}typeof n=="object"?n.exports=c:a.BN=c,c.BN=c,c.wordSize=26;var S;try{typeof window<"u"&&typeof window.Buffer<"u"?S=window.Buffer:S=require$$3.Buffer}catch{}c.isBN=function(d){return d instanceof c?!0:d!==null&&typeof d=="object"&&d.constructor.wordSize===c.wordSize&&Array.isArray(d.words)},c.max=function(d,E){return d.cmp(E)>0?d:E},c.min=function(d,E){return d.cmp(E)<0?d:E},c.prototype._init=function(d,E,h){if(typeof d=="number")return this._initNumber(d,E,h);if(typeof d=="object")return this._initArray(d,E,h);E==="hex"&&(E=16),u(E===(E|0)&&E>=2&&E<=36),d=d.toString().replace(/\s+/g,"");var b=0;d[0]==="-"&&(b++,this.negative=1),b<d.length&&(E===16?this._parseHex(d,b,h):(this._parseBase(d,E,b),h==="le"&&this._initArray(this.toArray(),E,h)))},c.prototype._initNumber=function(d,E,h){d<0&&(this.negative=1,d=-d),d<67108864?(this.words=[d&67108863],this.length=1):d<4503599627370496?(this.words=[d&67108863,d/67108864&67108863],this.length=2):(u(d<9007199254740992),this.words=[d&67108863,d/67108864&67108863,1],this.length=3),h==="le"&&this._initArray(this.toArray(),E,h)},c.prototype._initArray=function(d,E,h){if(u(typeof d.length=="number"),d.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(d.length/3),this.words=new Array(this.length);for(var b=0;b<this.length;b++)this.words[b]=0;var w,P,L=0;if(h==="be")for(b=d.length-1,w=0;b>=0;b-=3)P=d[b]|d[b-1]<<8|d[b-2]<<16,this.words[w]|=P<<L&67108863,this.words[w+1]=P>>>26-L&67108863,L+=24,L>=26&&(L-=26,w++);else if(h==="le")for(b=0,w=0;b<d.length;b+=3)P=d[b]|d[b+1]<<8|d[b+2]<<16,this.words[w]|=P<<L&67108863,this.words[w+1]=P>>>26-L&67108863,L+=24,L>=26&&(L-=26,w++);return this.strip()};function I(d,E){var h=d.charCodeAt(E);return h>=65&&h<=70?h-55:h>=97&&h<=102?h-87:h-48&15}function y(d,E,h){var b=I(d,h);return h-1>=E&&(b|=I(d,h-1)<<4),b}c.prototype._parseHex=function(d,E,h){this.length=Math.ceil((d.length-E)/6),this.words=new Array(this.length);for(var b=0;b<this.length;b++)this.words[b]=0;var w=0,P=0,L;if(h==="be")for(b=d.length-1;b>=E;b-=2)L=y(d,E,b)<<w,this.words[P]|=L&67108863,w>=18?(w-=18,P+=1,this.words[P]|=L>>>26):w+=8;else{var $=d.length-E;for(b=$%2===0?E+1:E;b<d.length;b+=2)L=y(d,E,b)<<w,this.words[P]|=L&67108863,w>=18?(w-=18,P+=1,this.words[P]|=L>>>26):w+=8}this.strip()};function g(d,E,h,b){for(var w=0,P=Math.min(d.length,h),L=E;L<P;L++){var $=d.charCodeAt(L)-48;w*=b,$>=49?w+=$-49+10:$>=17?w+=$-17+10:w+=$}return w}c.prototype._parseBase=function(d,E,h){this.words=[0],this.length=1;for(var b=0,w=1;w<=67108863;w*=E)b++;b--,w=w/E|0;for(var P=d.length-h,L=P%b,$=Math.min(P,P-L)+h,m=0,B=h;B<$;B+=b)m=g(d,B,B+b,E),this.imuln(w),this.words[0]+m<67108864?this.words[0]+=m:this._iaddn(m);if(L!==0){var _=1;for(m=g(d,B,d.length,E),B=0;B<L;B++)_*=E;this.imuln(_),this.words[0]+m<67108864?this.words[0]+=m:this._iaddn(m)}this.strip()},c.prototype.copy=function(d){d.words=new Array(this.length);for(var E=0;E<this.length;E++)d.words[E]=this.words[E];d.length=this.length,d.negative=this.negative,d.red=this.red},c.prototype.clone=function(){var d=new c(null);return this.copy(d),d},c.prototype._expand=function(d){for(;this.length<d;)this.words[this.length++]=0;return this},c.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},c.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},c.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var N=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],F=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],H=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];c.prototype.toString=function(d,E){d=d||10,E=E|0||1;var h;if(d===16||d==="hex"){h="";for(var b=0,w=0,P=0;P<this.length;P++){var L=this.words[P],$=((L<<b|w)&16777215).toString(16);w=L>>>24-b&16777215,w!==0||P!==this.length-1?h=N[6-$.length]+$+h:h=$+h,b+=2,b>=26&&(b-=26,P--)}for(w!==0&&(h=w.toString(16)+h);h.length%E!==0;)h="0"+h;return this.negative!==0&&(h="-"+h),h}if(d===(d|0)&&d>=2&&d<=36){var m=F[d],B=H[d];h="";var _=this.clone();for(_.negative=0;!_.isZero();){var x=_.modn(B).toString(d);_=_.idivn(B),_.isZero()?h=x+h:h=N[m-x.length]+x+h}for(this.isZero()&&(h="0"+h);h.length%E!==0;)h="0"+h;return this.negative!==0&&(h="-"+h),h}u(!1,"Base should be between 2 and 36")},c.prototype.toNumber=function(){var d=this.words[0];return this.length===2?d+=this.words[1]*67108864:this.length===3&&this.words[2]===1?d+=4503599627370496+this.words[1]*67108864:this.length>2&&u(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-d:d},c.prototype.toJSON=function(){return this.toString(16)},c.prototype.toBuffer=function(d,E){return u(typeof S<"u"),this.toArrayLike(S,d,E)},c.prototype.toArray=function(d,E){return this.toArrayLike(Array,d,E)},c.prototype.toArrayLike=function(d,E,h){var b=this.byteLength(),w=h||Math.max(1,b);u(b<=w,"byte array longer than desired length"),u(w>0,"Requested array length <= 0"),this.strip();var P=E==="le",L=new d(w),$,m,B=this.clone();if(P){for(m=0;!B.isZero();m++)$=B.andln(255),B.iushrn(8),L[m]=$;for(;m<w;m++)L[m]=0}else{for(m=0;m<w-b;m++)L[m]=0;for(m=0;!B.isZero();m++)$=B.andln(255),B.iushrn(8),L[w-m-1]=$}return L},Math.clz32?c.prototype._countBits=function(d){return 32-Math.clz32(d)}:c.prototype._countBits=function(d){var E=d,h=0;return E>=4096&&(h+=13,E>>>=13),E>=64&&(h+=7,E>>>=7),E>=8&&(h+=4,E>>>=4),E>=2&&(h+=2,E>>>=2),h+E},c.prototype._zeroBits=function(d){if(d===0)return 26;var E=d,h=0;return E&8191||(h+=13,E>>>=13),E&127||(h+=7,E>>>=7),E&15||(h+=4,E>>>=4),E&3||(h+=2,E>>>=2),E&1||h++,h},c.prototype.bitLength=function(){var d=this.words[this.length-1],E=this._countBits(d);return(this.length-1)*26+E};function G(d){for(var E=new Array(d.bitLength()),h=0;h<E.length;h++){var b=h/26|0,w=h%26;E[h]=(d.words[b]&1<<w)>>>w}return E}c.prototype.zeroBits=function(){if(this.isZero())return 0;for(var d=0,E=0;E<this.length;E++){var h=this._zeroBits(this.words[E]);if(d+=h,h!==26)break}return d},c.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},c.prototype.toTwos=function(d){return this.negative!==0?this.abs().inotn(d).iaddn(1):this.clone()},c.prototype.fromTwos=function(d){return this.testn(d-1)?this.notn(d).iaddn(1).ineg():this.clone()},c.prototype.isNeg=function(){return this.negative!==0},c.prototype.neg=function(){return this.clone().ineg()},c.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},c.prototype.iuor=function(d){for(;this.length<d.length;)this.words[this.length++]=0;for(var E=0;E<d.length;E++)this.words[E]=this.words[E]|d.words[E];return this.strip()},c.prototype.ior=function(d){return u((this.negative|d.negative)===0),this.iuor(d)},c.prototype.or=function(d){return this.length>d.length?this.clone().ior(d):d.clone().ior(this)},c.prototype.uor=function(d){return this.length>d.length?this.clone().iuor(d):d.clone().iuor(this)},c.prototype.iuand=function(d){var E;this.length>d.length?E=d:E=this;for(var h=0;h<E.length;h++)this.words[h]=this.words[h]&d.words[h];return this.length=E.length,this.strip()},c.prototype.iand=function(d){return u((this.negative|d.negative)===0),this.iuand(d)},c.prototype.and=function(d){return this.length>d.length?this.clone().iand(d):d.clone().iand(this)},c.prototype.uand=function(d){return this.length>d.length?this.clone().iuand(d):d.clone().iuand(this)},c.prototype.iuxor=function(d){var E,h;this.length>d.length?(E=this,h=d):(E=d,h=this);for(var b=0;b<h.length;b++)this.words[b]=E.words[b]^h.words[b];if(this!==E)for(;b<E.length;b++)this.words[b]=E.words[b];return this.length=E.length,this.strip()},c.prototype.ixor=function(d){return u((this.negative|d.negative)===0),this.iuxor(d)},c.prototype.xor=function(d){return this.length>d.length?this.clone().ixor(d):d.clone().ixor(this)},c.prototype.uxor=function(d){return this.length>d.length?this.clone().iuxor(d):d.clone().iuxor(this)},c.prototype.inotn=function(d){u(typeof d=="number"&&d>=0);var E=Math.ceil(d/26)|0,h=d%26;this._expand(E),h>0&&E--;for(var b=0;b<E;b++)this.words[b]=~this.words[b]&67108863;return h>0&&(this.words[b]=~this.words[b]&67108863>>26-h),this.strip()},c.prototype.notn=function(d){return this.clone().inotn(d)},c.prototype.setn=function(d,E){u(typeof d=="number"&&d>=0);var h=d/26|0,b=d%26;return this._expand(h+1),E?this.words[h]=this.words[h]|1<<b:this.words[h]=this.words[h]&~(1<<b),this.strip()},c.prototype.iadd=function(d){var E;if(this.negative!==0&&d.negative===0)return this.negative=0,E=this.isub(d),this.negative^=1,this._normSign();if(this.negative===0&&d.negative!==0)return d.negative=0,E=this.isub(d),d.negative=1,E._normSign();var h,b;this.length>d.length?(h=this,b=d):(h=d,b=this);for(var w=0,P=0;P<b.length;P++)E=(h.words[P]|0)+(b.words[P]|0)+w,this.words[P]=E&67108863,w=E>>>26;for(;w!==0&&P<h.length;P++)E=(h.words[P]|0)+w,this.words[P]=E&67108863,w=E>>>26;if(this.length=h.length,w!==0)this.words[this.length]=w,this.length++;else if(h!==this)for(;P<h.length;P++)this.words[P]=h.words[P];return this},c.prototype.add=function(d){var E;return d.negative!==0&&this.negative===0?(d.negative=0,E=this.sub(d),d.negative^=1,E):d.negative===0&&this.negative!==0?(this.negative=0,E=d.sub(this),this.negative=1,E):this.length>d.length?this.clone().iadd(d):d.clone().iadd(this)},c.prototype.isub=function(d){if(d.negative!==0){d.negative=0;var E=this.iadd(d);return d.negative=1,E._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(d),this.negative=1,this._normSign();var h=this.cmp(d);if(h===0)return this.negative=0,this.length=1,this.words[0]=0,this;var b,w;h>0?(b=this,w=d):(b=d,w=this);for(var P=0,L=0;L<w.length;L++)E=(b.words[L]|0)-(w.words[L]|0)+P,P=E>>26,this.words[L]=E&67108863;for(;P!==0&&L<b.length;L++)E=(b.words[L]|0)+P,P=E>>26,this.words[L]=E&67108863;if(P===0&&L<b.length&&b!==this)for(;L<b.length;L++)this.words[L]=b.words[L];return this.length=Math.max(this.length,L),b!==this&&(this.negative=1),this.strip()},c.prototype.sub=function(d){return this.clone().isub(d)};function q(d,E,h){h.negative=E.negative^d.negative;var b=d.length+E.length|0;h.length=b,b=b-1|0;var w=d.words[0]|0,P=E.words[0]|0,L=w*P,$=L&67108863,m=L/67108864|0;h.words[0]=$;for(var B=1;B<b;B++){for(var _=m>>>26,x=m&67108863,et=Math.min(B,E.length-1),tt=Math.max(0,B-d.length+1);tt<=et;tt++){var st=B-tt|0;w=d.words[st]|0,P=E.words[tt]|0,L=w*P+x,_+=L/67108864|0,x=L&67108863}h.words[B]=x|0,m=_|0}return m!==0?h.words[B]=m|0:h.length--,h.strip()}var X=function(d,E,h){var b=d.words,w=E.words,P=h.words,L=0,$,m,B,_=b[0]|0,x=_&8191,et=_>>>13,tt=b[1]|0,st=tt&8191,ht=tt>>>13,dt=b[2]|0,J=dt&8191,it=dt>>>13,ot=b[3]|0,at=ot&8191,ut=ot>>>13,ct=b[4]|0,ft=ct&8191,$t=ct>>>13,Lt=b[5]|0,vt=Lt&8191,xt=Lt>>>13,Tt=b[6]|0,mt=Tt&8191,Ot=Tt>>>13,Nt=b[7]|0,lt=Nt&8191,Ct=Nt>>>13,kt=b[8]|0,bt=kt&8191,Dt=kt>>>13,qt=b[9]|0,yt=qt&8191,Ut=qt>>>13,Pt=w[0]|0,gt=Pt&8191,Vt=Pt>>>13,Ht=w[1]|0,_t=Ht&8191,Jt=Ht>>>13,Zt=w[2]|0,wt=Zt&8191,Yt=Zt>>>13,zt=w[3]|0,St=zt&8191,Ft=zt>>>13,Xt=w[4]|0,Mt=Xt&8191,Qt=Xt>>>13,Wt=w[5]|0,At=Wt&8191,te=Wt>>>13,Gt=w[6]|0,Et=Gt&8191,jt=Gt>>>13,Bt=w[7]|0,pt=Bt&8191,Kt=Bt>>>13,ee=w[8]|0,It=ee&8191,ne=ee>>>13,oe=w[9]|0,Rt=oe&8191,ae=oe>>>13;h.negative=d.negative^E.negative,h.length=19,$=Math.imul(x,gt),m=Math.imul(x,Vt),m=m+Math.imul(et,gt)|0,B=Math.imul(et,Vt);var re=(L+$|0)+((m&8191)<<13)|0;L=(B+(m>>>13)|0)+(re>>>26)|0,re&=67108863,$=Math.imul(st,gt),m=Math.imul(st,Vt),m=m+Math.imul(ht,gt)|0,B=Math.imul(ht,Vt),$=$+Math.imul(x,_t)|0,m=m+Math.imul(x,Jt)|0,m=m+Math.imul(et,_t)|0,B=B+Math.imul(et,Jt)|0;var ie=(L+$|0)+((m&8191)<<13)|0;L=(B+(m>>>13)|0)+(ie>>>26)|0,ie&=67108863,$=Math.imul(J,gt),m=Math.imul(J,Vt),m=m+Math.imul(it,gt)|0,B=Math.imul(it,Vt),$=$+Math.imul(st,_t)|0,m=m+Math.imul(st,Jt)|0,m=m+Math.imul(ht,_t)|0,B=B+Math.imul(ht,Jt)|0,$=$+Math.imul(x,wt)|0,m=m+Math.imul(x,Yt)|0,m=m+Math.imul(et,wt)|0,B=B+Math.imul(et,Yt)|0;var se=(L+$|0)+((m&8191)<<13)|0;L=(B+(m>>>13)|0)+(se>>>26)|0,se&=67108863,$=Math.imul(at,gt),m=Math.imul(at,Vt),m=m+Math.imul(ut,gt)|0,B=Math.imul(ut,Vt),$=$+Math.imul(J,_t)|0,m=m+Math.imul(J,Jt)|0,m=m+Math.imul(it,_t)|0,B=B+Math.imul(it,Jt)|0,$=$+Math.imul(st,wt)|0,m=m+Math.imul(st,Yt)|0,m=m+Math.imul(ht,wt)|0,B=B+Math.imul(ht,Yt)|0,$=$+Math.imul(x,St)|0,m=m+Math.imul(x,Ft)|0,m=m+Math.imul(et,St)|0,B=B+Math.imul(et,Ft)|0;var ue=(L+$|0)+((m&8191)<<13)|0;L=(B+(m>>>13)|0)+(ue>>>26)|0,ue&=67108863,$=Math.imul(ft,gt),m=Math.imul(ft,Vt),m=m+Math.imul($t,gt)|0,B=Math.imul($t,Vt),$=$+Math.imul(at,_t)|0,m=m+Math.imul(at,Jt)|0,m=m+Math.imul(ut,_t)|0,B=B+Math.imul(ut,Jt)|0,$=$+Math.imul(J,wt)|0,m=m+Math.imul(J,Yt)|0,m=m+Math.imul(it,wt)|0,B=B+Math.imul(it,Yt)|0,$=$+Math.imul(st,St)|0,m=m+Math.imul(st,Ft)|0,m=m+Math.imul(ht,St)|0,B=B+Math.imul(ht,Ft)|0,$=$+Math.imul(x,Mt)|0,m=m+Math.imul(x,Qt)|0,m=m+Math.imul(et,Mt)|0,B=B+Math.imul(et,Qt)|0;var fe=(L+$|0)+((m&8191)<<13)|0;L=(B+(m>>>13)|0)+(fe>>>26)|0,fe&=67108863,$=Math.imul(vt,gt),m=Math.imul(vt,Vt),m=m+Math.imul(xt,gt)|0,B=Math.imul(xt,Vt),$=$+Math.imul(ft,_t)|0,m=m+Math.imul(ft,Jt)|0,m=m+Math.imul($t,_t)|0,B=B+Math.imul($t,Jt)|0,$=$+Math.imul(at,wt)|0,m=m+Math.imul(at,Yt)|0,m=m+Math.imul(ut,wt)|0,B=B+Math.imul(ut,Yt)|0,$=$+Math.imul(J,St)|0,m=m+Math.imul(J,Ft)|0,m=m+Math.imul(it,St)|0,B=B+Math.imul(it,Ft)|0,$=$+Math.imul(st,Mt)|0,m=m+Math.imul(st,Qt)|0,m=m+Math.imul(ht,Mt)|0,B=B+Math.imul(ht,Qt)|0,$=$+Math.imul(x,At)|0,m=m+Math.imul(x,te)|0,m=m+Math.imul(et,At)|0,B=B+Math.imul(et,te)|0;var he=(L+$|0)+((m&8191)<<13)|0;L=(B+(m>>>13)|0)+(he>>>26)|0,he&=67108863,$=Math.imul(mt,gt),m=Math.imul(mt,Vt),m=m+Math.imul(Ot,gt)|0,B=Math.imul(Ot,Vt),$=$+Math.imul(vt,_t)|0,m=m+Math.imul(vt,Jt)|0,m=m+Math.imul(xt,_t)|0,B=B+Math.imul(xt,Jt)|0,$=$+Math.imul(ft,wt)|0,m=m+Math.imul(ft,Yt)|0,m=m+Math.imul($t,wt)|0,B=B+Math.imul($t,Yt)|0,$=$+Math.imul(at,St)|0,m=m+Math.imul(at,Ft)|0,m=m+Math.imul(ut,St)|0,B=B+Math.imul(ut,Ft)|0,$=$+Math.imul(J,Mt)|0,m=m+Math.imul(J,Qt)|0,m=m+Math.imul(it,Mt)|0,B=B+Math.imul(it,Qt)|0,$=$+Math.imul(st,At)|0,m=m+Math.imul(st,te)|0,m=m+Math.imul(ht,At)|0,B=B+Math.imul(ht,te)|0,$=$+Math.imul(x,Et)|0,m=m+Math.imul(x,jt)|0,m=m+Math.imul(et,Et)|0,B=B+Math.imul(et,jt)|0;var ce=(L+$|0)+((m&8191)<<13)|0;L=(B+(m>>>13)|0)+(ce>>>26)|0,ce&=67108863,$=Math.imul(lt,gt),m=Math.imul(lt,Vt),m=m+Math.imul(Ct,gt)|0,B=Math.imul(Ct,Vt),$=$+Math.imul(mt,_t)|0,m=m+Math.imul(mt,Jt)|0,m=m+Math.imul(Ot,_t)|0,B=B+Math.imul(Ot,Jt)|0,$=$+Math.imul(vt,wt)|0,m=m+Math.imul(vt,Yt)|0,m=m+Math.imul(xt,wt)|0,B=B+Math.imul(xt,Yt)|0,$=$+Math.imul(ft,St)|0,m=m+Math.imul(ft,Ft)|0,m=m+Math.imul($t,St)|0,B=B+Math.imul($t,Ft)|0,$=$+Math.imul(at,Mt)|0,m=m+Math.imul(at,Qt)|0,m=m+Math.imul(ut,Mt)|0,B=B+Math.imul(ut,Qt)|0,$=$+Math.imul(J,At)|0,m=m+Math.imul(J,te)|0,m=m+Math.imul(it,At)|0,B=B+Math.imul(it,te)|0,$=$+Math.imul(st,Et)|0,m=m+Math.imul(st,jt)|0,m=m+Math.imul(ht,Et)|0,B=B+Math.imul(ht,jt)|0,$=$+Math.imul(x,pt)|0,m=m+Math.imul(x,Kt)|0,m=m+Math.imul(et,pt)|0,B=B+Math.imul(et,Kt)|0;var de=(L+$|0)+((m&8191)<<13)|0;L=(B+(m>>>13)|0)+(de>>>26)|0,de&=67108863,$=Math.imul(bt,gt),m=Math.imul(bt,Vt),m=m+Math.imul(Dt,gt)|0,B=Math.imul(Dt,Vt),$=$+Math.imul(lt,_t)|0,m=m+Math.imul(lt,Jt)|0,m=m+Math.imul(Ct,_t)|0,B=B+Math.imul(Ct,Jt)|0,$=$+Math.imul(mt,wt)|0,m=m+Math.imul(mt,Yt)|0,m=m+Math.imul(Ot,wt)|0,B=B+Math.imul(Ot,Yt)|0,$=$+Math.imul(vt,St)|0,m=m+Math.imul(vt,Ft)|0,m=m+Math.imul(xt,St)|0,B=B+Math.imul(xt,Ft)|0,$=$+Math.imul(ft,Mt)|0,m=m+Math.imul(ft,Qt)|0,m=m+Math.imul($t,Mt)|0,B=B+Math.imul($t,Qt)|0,$=$+Math.imul(at,At)|0,m=m+Math.imul(at,te)|0,m=m+Math.imul(ut,At)|0,B=B+Math.imul(ut,te)|0,$=$+Math.imul(J,Et)|0,m=m+Math.imul(J,jt)|0,m=m+Math.imul(it,Et)|0,B=B+Math.imul(it,jt)|0,$=$+Math.imul(st,pt)|0,m=m+Math.imul(st,Kt)|0,m=m+Math.imul(ht,pt)|0,B=B+Math.imul(ht,Kt)|0,$=$+Math.imul(x,It)|0,m=m+Math.imul(x,ne)|0,m=m+Math.imul(et,It)|0,B=B+Math.imul(et,ne)|0;var le=(L+$|0)+((m&8191)<<13)|0;L=(B+(m>>>13)|0)+(le>>>26)|0,le&=67108863,$=Math.imul(yt,gt),m=Math.imul(yt,Vt),m=m+Math.imul(Ut,gt)|0,B=Math.imul(Ut,Vt),$=$+Math.imul(bt,_t)|0,m=m+Math.imul(bt,Jt)|0,m=m+Math.imul(Dt,_t)|0,B=B+Math.imul(Dt,Jt)|0,$=$+Math.imul(lt,wt)|0,m=m+Math.imul(lt,Yt)|0,m=m+Math.imul(Ct,wt)|0,B=B+Math.imul(Ct,Yt)|0,$=$+Math.imul(mt,St)|0,m=m+Math.imul(mt,Ft)|0,m=m+Math.imul(Ot,St)|0,B=B+Math.imul(Ot,Ft)|0,$=$+Math.imul(vt,Mt)|0,m=m+Math.imul(vt,Qt)|0,m=m+Math.imul(xt,Mt)|0,B=B+Math.imul(xt,Qt)|0,$=$+Math.imul(ft,At)|0,m=m+Math.imul(ft,te)|0,m=m+Math.imul($t,At)|0,B=B+Math.imul($t,te)|0,$=$+Math.imul(at,Et)|0,m=m+Math.imul(at,jt)|0,m=m+Math.imul(ut,Et)|0,B=B+Math.imul(ut,jt)|0,$=$+Math.imul(J,pt)|0,m=m+Math.imul(J,Kt)|0,m=m+Math.imul(it,pt)|0,B=B+Math.imul(it,Kt)|0,$=$+Math.imul(st,It)|0,m=m+Math.imul(st,ne)|0,m=m+Math.imul(ht,It)|0,B=B+Math.imul(ht,ne)|0,$=$+Math.imul(x,Rt)|0,m=m+Math.imul(x,ae)|0,m=m+Math.imul(et,Rt)|0,B=B+Math.imul(et,ae)|0;var pe=(L+$|0)+((m&8191)<<13)|0;L=(B+(m>>>13)|0)+(pe>>>26)|0,pe&=67108863,$=Math.imul(yt,_t),m=Math.imul(yt,Jt),m=m+Math.imul(Ut,_t)|0,B=Math.imul(Ut,Jt),$=$+Math.imul(bt,wt)|0,m=m+Math.imul(bt,Yt)|0,m=m+Math.imul(Dt,wt)|0,B=B+Math.imul(Dt,Yt)|0,$=$+Math.imul(lt,St)|0,m=m+Math.imul(lt,Ft)|0,m=m+Math.imul(Ct,St)|0,B=B+Math.imul(Ct,Ft)|0,$=$+Math.imul(mt,Mt)|0,m=m+Math.imul(mt,Qt)|0,m=m+Math.imul(Ot,Mt)|0,B=B+Math.imul(Ot,Qt)|0,$=$+Math.imul(vt,At)|0,m=m+Math.imul(vt,te)|0,m=m+Math.imul(xt,At)|0,B=B+Math.imul(xt,te)|0,$=$+Math.imul(ft,Et)|0,m=m+Math.imul(ft,jt)|0,m=m+Math.imul($t,Et)|0,B=B+Math.imul($t,jt)|0,$=$+Math.imul(at,pt)|0,m=m+Math.imul(at,Kt)|0,m=m+Math.imul(ut,pt)|0,B=B+Math.imul(ut,Kt)|0,$=$+Math.imul(J,It)|0,m=m+Math.imul(J,ne)|0,m=m+Math.imul(it,It)|0,B=B+Math.imul(it,ne)|0,$=$+Math.imul(st,Rt)|0,m=m+Math.imul(st,ae)|0,m=m+Math.imul(ht,Rt)|0,B=B+Math.imul(ht,ae)|0;var be=(L+$|0)+((m&8191)<<13)|0;L=(B+(m>>>13)|0)+(be>>>26)|0,be&=67108863,$=Math.imul(yt,wt),m=Math.imul(yt,Yt),m=m+Math.imul(Ut,wt)|0,B=Math.imul(Ut,Yt),$=$+Math.imul(bt,St)|0,m=m+Math.imul(bt,Ft)|0,m=m+Math.imul(Dt,St)|0,B=B+Math.imul(Dt,Ft)|0,$=$+Math.imul(lt,Mt)|0,m=m+Math.imul(lt,Qt)|0,m=m+Math.imul(Ct,Mt)|0,B=B+Math.imul(Ct,Qt)|0,$=$+Math.imul(mt,At)|0,m=m+Math.imul(mt,te)|0,m=m+Math.imul(Ot,At)|0,B=B+Math.imul(Ot,te)|0,$=$+Math.imul(vt,Et)|0,m=m+Math.imul(vt,jt)|0,m=m+Math.imul(xt,Et)|0,B=B+Math.imul(xt,jt)|0,$=$+Math.imul(ft,pt)|0,m=m+Math.imul(ft,Kt)|0,m=m+Math.imul($t,pt)|0,B=B+Math.imul($t,Kt)|0,$=$+Math.imul(at,It)|0,m=m+Math.imul(at,ne)|0,m=m+Math.imul(ut,It)|0,B=B+Math.imul(ut,ne)|0,$=$+Math.imul(J,Rt)|0,m=m+Math.imul(J,ae)|0,m=m+Math.imul(it,Rt)|0,B=B+Math.imul(it,ae)|0;var me=(L+$|0)+((m&8191)<<13)|0;L=(B+(m>>>13)|0)+(me>>>26)|0,me&=67108863,$=Math.imul(yt,St),m=Math.imul(yt,Ft),m=m+Math.imul(Ut,St)|0,B=Math.imul(Ut,Ft),$=$+Math.imul(bt,Mt)|0,m=m+Math.imul(bt,Qt)|0,m=m+Math.imul(Dt,Mt)|0,B=B+Math.imul(Dt,Qt)|0,$=$+Math.imul(lt,At)|0,m=m+Math.imul(lt,te)|0,m=m+Math.imul(Ct,At)|0,B=B+Math.imul(Ct,te)|0,$=$+Math.imul(mt,Et)|0,m=m+Math.imul(mt,jt)|0,m=m+Math.imul(Ot,Et)|0,B=B+Math.imul(Ot,jt)|0,$=$+Math.imul(vt,pt)|0,m=m+Math.imul(vt,Kt)|0,m=m+Math.imul(xt,pt)|0,B=B+Math.imul(xt,Kt)|0,$=$+Math.imul(ft,It)|0,m=m+Math.imul(ft,ne)|0,m=m+Math.imul($t,It)|0,B=B+Math.imul($t,ne)|0,$=$+Math.imul(at,Rt)|0,m=m+Math.imul(at,ae)|0,m=m+Math.imul(ut,Rt)|0,B=B+Math.imul(ut,ae)|0;var ge=(L+$|0)+((m&8191)<<13)|0;L=(B+(m>>>13)|0)+(ge>>>26)|0,ge&=67108863,$=Math.imul(yt,Mt),m=Math.imul(yt,Qt),m=m+Math.imul(Ut,Mt)|0,B=Math.imul(Ut,Qt),$=$+Math.imul(bt,At)|0,m=m+Math.imul(bt,te)|0,m=m+Math.imul(Dt,At)|0,B=B+Math.imul(Dt,te)|0,$=$+Math.imul(lt,Et)|0,m=m+Math.imul(lt,jt)|0,m=m+Math.imul(Ct,Et)|0,B=B+Math.imul(Ct,jt)|0,$=$+Math.imul(mt,pt)|0,m=m+Math.imul(mt,Kt)|0,m=m+Math.imul(Ot,pt)|0,B=B+Math.imul(Ot,Kt)|0,$=$+Math.imul(vt,It)|0,m=m+Math.imul(vt,ne)|0,m=m+Math.imul(xt,It)|0,B=B+Math.imul(xt,ne)|0,$=$+Math.imul(ft,Rt)|0,m=m+Math.imul(ft,ae)|0,m=m+Math.imul($t,Rt)|0,B=B+Math.imul($t,ae)|0;var ve=(L+$|0)+((m&8191)<<13)|0;L=(B+(m>>>13)|0)+(ve>>>26)|0,ve&=67108863,$=Math.imul(yt,At),m=Math.imul(yt,te),m=m+Math.imul(Ut,At)|0,B=Math.imul(Ut,te),$=$+Math.imul(bt,Et)|0,m=m+Math.imul(bt,jt)|0,m=m+Math.imul(Dt,Et)|0,B=B+Math.imul(Dt,jt)|0,$=$+Math.imul(lt,pt)|0,m=m+Math.imul(lt,Kt)|0,m=m+Math.imul(Ct,pt)|0,B=B+Math.imul(Ct,Kt)|0,$=$+Math.imul(mt,It)|0,m=m+Math.imul(mt,ne)|0,m=m+Math.imul(Ot,It)|0,B=B+Math.imul(Ot,ne)|0,$=$+Math.imul(vt,Rt)|0,m=m+Math.imul(vt,ae)|0,m=m+Math.imul(xt,Rt)|0,B=B+Math.imul(xt,ae)|0;var ye=(L+$|0)+((m&8191)<<13)|0;L=(B+(m>>>13)|0)+(ye>>>26)|0,ye&=67108863,$=Math.imul(yt,Et),m=Math.imul(yt,jt),m=m+Math.imul(Ut,Et)|0,B=Math.imul(Ut,jt),$=$+Math.imul(bt,pt)|0,m=m+Math.imul(bt,Kt)|0,m=m+Math.imul(Dt,pt)|0,B=B+Math.imul(Dt,Kt)|0,$=$+Math.imul(lt,It)|0,m=m+Math.imul(lt,ne)|0,m=m+Math.imul(Ct,It)|0,B=B+Math.imul(Ct,ne)|0,$=$+Math.imul(mt,Rt)|0,m=m+Math.imul(mt,ae)|0,m=m+Math.imul(Ot,Rt)|0,B=B+Math.imul(Ot,ae)|0;var _e=(L+$|0)+((m&8191)<<13)|0;L=(B+(m>>>13)|0)+(_e>>>26)|0,_e&=67108863,$=Math.imul(yt,pt),m=Math.imul(yt,Kt),m=m+Math.imul(Ut,pt)|0,B=Math.imul(Ut,Kt),$=$+Math.imul(bt,It)|0,m=m+Math.imul(bt,ne)|0,m=m+Math.imul(Dt,It)|0,B=B+Math.imul(Dt,ne)|0,$=$+Math.imul(lt,Rt)|0,m=m+Math.imul(lt,ae)|0,m=m+Math.imul(Ct,Rt)|0,B=B+Math.imul(Ct,ae)|0;var we=(L+$|0)+((m&8191)<<13)|0;L=(B+(m>>>13)|0)+(we>>>26)|0,we&=67108863,$=Math.imul(yt,It),m=Math.imul(yt,ne),m=m+Math.imul(Ut,It)|0,B=Math.imul(Ut,ne),$=$+Math.imul(bt,Rt)|0,m=m+Math.imul(bt,ae)|0,m=m+Math.imul(Dt,Rt)|0,B=B+Math.imul(Dt,ae)|0;var Se=(L+$|0)+((m&8191)<<13)|0;L=(B+(m>>>13)|0)+(Se>>>26)|0,Se&=67108863,$=Math.imul(yt,Rt),m=Math.imul(yt,ae),m=m+Math.imul(Ut,Rt)|0,B=Math.imul(Ut,ae);var Me=(L+$|0)+((m&8191)<<13)|0;return L=(B+(m>>>13)|0)+(Me>>>26)|0,Me&=67108863,P[0]=re,P[1]=ie,P[2]=se,P[3]=ue,P[4]=fe,P[5]=he,P[6]=ce,P[7]=de,P[8]=le,P[9]=pe,P[10]=be,P[11]=me,P[12]=ge,P[13]=ve,P[14]=ye,P[15]=_e,P[16]=we,P[17]=Se,P[18]=Me,L!==0&&(P[19]=L,h.length++),h};Math.imul||(X=q);function U(d,E,h){h.negative=E.negative^d.negative,h.length=d.length+E.length;for(var b=0,w=0,P=0;P<h.length-1;P++){var L=w;w=0;for(var $=b&67108863,m=Math.min(P,E.length-1),B=Math.max(0,P-d.length+1);B<=m;B++){var _=P-B,x=d.words[_]|0,et=E.words[B]|0,tt=x*et,st=tt&67108863;L=L+(tt/67108864|0)|0,st=st+$|0,$=st&67108863,L=L+(st>>>26)|0,w+=L>>>26,L&=67108863}h.words[P]=$,b=L,L=w}return b!==0?h.words[P]=b:h.length--,h.strip()}function V(d,E,h){var b=new j;return b.mulp(d,E,h)}c.prototype.mulTo=function(d,E){var h,b=this.length+d.length;return this.length===10&&d.length===10?h=X(this,d,E):b<63?h=q(this,d,E):b<1024?h=U(this,d,E):h=V(this,d,E),h};function j(d,E){this.x=d,this.y=E}j.prototype.makeRBT=function(d){for(var E=new Array(d),h=c.prototype._countBits(d)-1,b=0;b<d;b++)E[b]=this.revBin(b,h,d);return E},j.prototype.revBin=function(d,E,h){if(d===0||d===h-1)return d;for(var b=0,w=0;w<E;w++)b|=(d&1)<<E-w-1,d>>=1;return b},j.prototype.permute=function(d,E,h,b,w,P){for(var L=0;L<P;L++)b[L]=E[d[L]],w[L]=h[d[L]]},j.prototype.transform=function(d,E,h,b,w,P){this.permute(P,d,E,h,b,w);for(var L=1;L<w;L<<=1)for(var $=L<<1,m=Math.cos(2*Math.PI/$),B=Math.sin(2*Math.PI/$),_=0;_<w;_+=$)for(var x=m,et=B,tt=0;tt<L;tt++){var st=h[_+tt],ht=b[_+tt],dt=h[_+tt+L],J=b[_+tt+L],it=x*dt-et*J;J=x*J+et*dt,dt=it,h[_+tt]=st+dt,b[_+tt]=ht+J,h[_+tt+L]=st-dt,b[_+tt+L]=ht-J,tt!==$&&(it=m*x-B*et,et=m*et+B*x,x=it)}},j.prototype.guessLen13b=function(d,E){var h=Math.max(E,d)|1,b=h&1,w=0;for(h=h/2|0;h;h=h>>>1)w++;return 1<<w+1+b},j.prototype.conjugate=function(d,E,h){if(!(h<=1))for(var b=0;b<h/2;b++){var w=d[b];d[b]=d[h-b-1],d[h-b-1]=w,w=E[b],E[b]=-E[h-b-1],E[h-b-1]=-w}},j.prototype.normalize13b=function(d,E){for(var h=0,b=0;b<E/2;b++){var w=Math.round(d[2*b+1]/E)*8192+Math.round(d[2*b]/E)+h;d[b]=w&67108863,w<67108864?h=0:h=w/67108864|0}return d},j.prototype.convert13b=function(d,E,h,b){for(var w=0,P=0;P<E;P++)w=w+(d[P]|0),h[2*P]=w&8191,w=w>>>13,h[2*P+1]=w&8191,w=w>>>13;for(P=2*E;P<b;++P)h[P]=0;u(w===0),u((w&-8192)===0)},j.prototype.stub=function(d){for(var E=new Array(d),h=0;h<d;h++)E[h]=0;return E},j.prototype.mulp=function(d,E,h){var b=2*this.guessLen13b(d.length,E.length),w=this.makeRBT(b),P=this.stub(b),L=new Array(b),$=new Array(b),m=new Array(b),B=new Array(b),_=new Array(b),x=new Array(b),et=h.words;et.length=b,this.convert13b(d.words,d.length,L,b),this.convert13b(E.words,E.length,B,b),this.transform(L,P,$,m,b,w),this.transform(B,P,_,x,b,w);for(var tt=0;tt<b;tt++){var st=$[tt]*_[tt]-m[tt]*x[tt];m[tt]=$[tt]*x[tt]+m[tt]*_[tt],$[tt]=st}return this.conjugate($,m,b),this.transform($,m,et,P,b,w),this.conjugate(et,P,b),this.normalize13b(et,b),h.negative=d.negative^E.negative,h.length=d.length+E.length,h.strip()},c.prototype.mul=function(d){var E=new c(null);return E.words=new Array(this.length+d.length),this.mulTo(d,E)},c.prototype.mulf=function(d){var E=new c(null);return E.words=new Array(this.length+d.length),V(this,d,E)},c.prototype.imul=function(d){return this.clone().mulTo(d,this)},c.prototype.imuln=function(d){u(typeof d=="number"),u(d<67108864);for(var E=0,h=0;h<this.length;h++){var b=(this.words[h]|0)*d,w=(b&67108863)+(E&67108863);E>>=26,E+=b/67108864|0,E+=w>>>26,this.words[h]=w&67108863}return E!==0&&(this.words[h]=E,this.length++),this},c.prototype.muln=function(d){return this.clone().imuln(d)},c.prototype.sqr=function(){return this.mul(this)},c.prototype.isqr=function(){return this.imul(this.clone())},c.prototype.pow=function(d){var E=G(d);if(E.length===0)return new c(1);for(var h=this,b=0;b<E.length&&E[b]===0;b++,h=h.sqr());if(++b<E.length)for(var w=h.sqr();b<E.length;b++,w=w.sqr())E[b]!==0&&(h=h.mul(w));return h},c.prototype.iushln=function(d){u(typeof d=="number"&&d>=0);var E=d%26,h=(d-E)/26,b=67108863>>>26-E<<26-E,w;if(E!==0){var P=0;for(w=0;w<this.length;w++){var L=this.words[w]&b,$=(this.words[w]|0)-L<<E;this.words[w]=$|P,P=L>>>26-E}P&&(this.words[w]=P,this.length++)}if(h!==0){for(w=this.length-1;w>=0;w--)this.words[w+h]=this.words[w];for(w=0;w<h;w++)this.words[w]=0;this.length+=h}return this.strip()},c.prototype.ishln=function(d){return u(this.negative===0),this.iushln(d)},c.prototype.iushrn=function(d,E,h){u(typeof d=="number"&&d>=0);var b;E?b=(E-E%26)/26:b=0;var w=d%26,P=Math.min((d-w)/26,this.length),L=67108863^67108863>>>w<<w,$=h;if(b-=P,b=Math.max(0,b),$){for(var m=0;m<P;m++)$.words[m]=this.words[m];$.length=P}if(P!==0)if(this.length>P)for(this.length-=P,m=0;m<this.length;m++)this.words[m]=this.words[m+P];else this.words[0]=0,this.length=1;var B=0;for(m=this.length-1;m>=0&&(B!==0||m>=b);m--){var _=this.words[m]|0;this.words[m]=B<<26-w|_>>>w,B=_&L}return $&&B!==0&&($.words[$.length++]=B),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},c.prototype.ishrn=function(d,E,h){return u(this.negative===0),this.iushrn(d,E,h)},c.prototype.shln=function(d){return this.clone().ishln(d)},c.prototype.ushln=function(d){return this.clone().iushln(d)},c.prototype.shrn=function(d){return this.clone().ishrn(d)},c.prototype.ushrn=function(d){return this.clone().iushrn(d)},c.prototype.testn=function(d){u(typeof d=="number"&&d>=0);var E=d%26,h=(d-E)/26,b=1<<E;if(this.length<=h)return!1;var w=this.words[h];return!!(w&b)},c.prototype.imaskn=function(d){u(typeof d=="number"&&d>=0);var E=d%26,h=(d-E)/26;if(u(this.negative===0,"imaskn works only with positive numbers"),this.length<=h)return this;if(E!==0&&h++,this.length=Math.min(h,this.length),E!==0){var b=67108863^67108863>>>E<<E;this.words[this.length-1]&=b}return this.strip()},c.prototype.maskn=function(d){return this.clone().imaskn(d)},c.prototype.iaddn=function(d){return u(typeof d=="number"),u(d<67108864),d<0?this.isubn(-d):this.negative!==0?this.length===1&&(this.words[0]|0)<d?(this.words[0]=d-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(d),this.negative=1,this):this._iaddn(d)},c.prototype._iaddn=function(d){this.words[0]+=d;for(var E=0;E<this.length&&this.words[E]>=67108864;E++)this.words[E]-=67108864,E===this.length-1?this.words[E+1]=1:this.words[E+1]++;return this.length=Math.max(this.length,E+1),this},c.prototype.isubn=function(d){if(u(typeof d=="number"),u(d<67108864),d<0)return this.iaddn(-d);if(this.negative!==0)return this.negative=0,this.iaddn(d),this.negative=1,this;if(this.words[0]-=d,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var E=0;E<this.length&&this.words[E]<0;E++)this.words[E]+=67108864,this.words[E+1]-=1;return this.strip()},c.prototype.addn=function(d){return this.clone().iaddn(d)},c.prototype.subn=function(d){return this.clone().isubn(d)},c.prototype.iabs=function(){return this.negative=0,this},c.prototype.abs=function(){return this.clone().iabs()},c.prototype._ishlnsubmul=function(d,E,h){var b=d.length+h,w;this._expand(b);var P,L=0;for(w=0;w<d.length;w++){P=(this.words[w+h]|0)+L;var $=(d.words[w]|0)*E;P-=$&67108863,L=(P>>26)-($/67108864|0),this.words[w+h]=P&67108863}for(;w<this.length-h;w++)P=(this.words[w+h]|0)+L,L=P>>26,this.words[w+h]=P&67108863;if(L===0)return this.strip();for(u(L===-1),L=0,w=0;w<this.length;w++)P=-(this.words[w]|0)+L,L=P>>26,this.words[w]=P&67108863;return this.negative=1,this.strip()},c.prototype._wordDiv=function(d,E){var h=this.length-d.length,b=this.clone(),w=d,P=w.words[w.length-1]|0,L=this._countBits(P);h=26-L,h!==0&&(w=w.ushln(h),b.iushln(h),P=w.words[w.length-1]|0);var $=b.length-w.length,m;if(E!=="mod"){m=new c(null),m.length=$+1,m.words=new Array(m.length);for(var B=0;B<m.length;B++)m.words[B]=0}var _=b.clone()._ishlnsubmul(w,1,$);_.negative===0&&(b=_,m&&(m.words[$]=1));for(var x=$-1;x>=0;x--){var et=(b.words[w.length+x]|0)*67108864+(b.words[w.length+x-1]|0);for(et=Math.min(et/P|0,67108863),b._ishlnsubmul(w,et,x);b.negative!==0;)et--,b.negative=0,b._ishlnsubmul(w,1,x),b.isZero()||(b.negative^=1);m&&(m.words[x]=et)}return m&&m.strip(),b.strip(),E!=="div"&&h!==0&&b.iushrn(h),{div:m||null,mod:b}},c.prototype.divmod=function(d,E,h){if(u(!d.isZero()),this.isZero())return{div:new c(0),mod:new c(0)};var b,w,P;return this.negative!==0&&d.negative===0?(P=this.neg().divmod(d,E),E!=="mod"&&(b=P.div.neg()),E!=="div"&&(w=P.mod.neg(),h&&w.negative!==0&&w.iadd(d)),{div:b,mod:w}):this.negative===0&&d.negative!==0?(P=this.divmod(d.neg(),E),E!=="mod"&&(b=P.div.neg()),{div:b,mod:P.mod}):this.negative&d.negative?(P=this.neg().divmod(d.neg(),E),E!=="div"&&(w=P.mod.neg(),h&&w.negative!==0&&w.isub(d)),{div:P.div,mod:w}):d.length>this.length||this.cmp(d)<0?{div:new c(0),mod:this}:d.length===1?E==="div"?{div:this.divn(d.words[0]),mod:null}:E==="mod"?{div:null,mod:new c(this.modn(d.words[0]))}:{div:this.divn(d.words[0]),mod:new c(this.modn(d.words[0]))}:this._wordDiv(d,E)},c.prototype.div=function(d){return this.divmod(d,"div",!1).div},c.prototype.mod=function(d){return this.divmod(d,"mod",!1).mod},c.prototype.umod=function(d){return this.divmod(d,"mod",!0).mod},c.prototype.divRound=function(d){var E=this.divmod(d);if(E.mod.isZero())return E.div;var h=E.div.negative!==0?E.mod.isub(d):E.mod,b=d.ushrn(1),w=d.andln(1),P=h.cmp(b);return P<0||w===1&&P===0?E.div:E.div.negative!==0?E.div.isubn(1):E.div.iaddn(1)},c.prototype.modn=function(d){u(d<=67108863);for(var E=(1<<26)%d,h=0,b=this.length-1;b>=0;b--)h=(E*h+(this.words[b]|0))%d;return h},c.prototype.idivn=function(d){u(d<=67108863);for(var E=0,h=this.length-1;h>=0;h--){var b=(this.words[h]|0)+E*67108864;this.words[h]=b/d|0,E=b%d}return this.strip()},c.prototype.divn=function(d){return this.clone().idivn(d)},c.prototype.egcd=function(d){u(d.negative===0),u(!d.isZero());var E=this,h=d.clone();E.negative!==0?E=E.umod(d):E=E.clone();for(var b=new c(1),w=new c(0),P=new c(0),L=new c(1),$=0;E.isEven()&&h.isEven();)E.iushrn(1),h.iushrn(1),++$;for(var m=h.clone(),B=E.clone();!E.isZero();){for(var _=0,x=1;!(E.words[0]&x)&&_<26;++_,x<<=1);if(_>0)for(E.iushrn(_);_-- >0;)(b.isOdd()||w.isOdd())&&(b.iadd(m),w.isub(B)),b.iushrn(1),w.iushrn(1);for(var et=0,tt=1;!(h.words[0]&tt)&&et<26;++et,tt<<=1);if(et>0)for(h.iushrn(et);et-- >0;)(P.isOdd()||L.isOdd())&&(P.iadd(m),L.isub(B)),P.iushrn(1),L.iushrn(1);E.cmp(h)>=0?(E.isub(h),b.isub(P),w.isub(L)):(h.isub(E),P.isub(b),L.isub(w))}return{a:P,b:L,gcd:h.iushln($)}},c.prototype._invmp=function(d){u(d.negative===0),u(!d.isZero());var E=this,h=d.clone();E.negative!==0?E=E.umod(d):E=E.clone();for(var b=new c(1),w=new c(0),P=h.clone();E.cmpn(1)>0&&h.cmpn(1)>0;){for(var L=0,$=1;!(E.words[0]&$)&&L<26;++L,$<<=1);if(L>0)for(E.iushrn(L);L-- >0;)b.isOdd()&&b.iadd(P),b.iushrn(1);for(var m=0,B=1;!(h.words[0]&B)&&m<26;++m,B<<=1);if(m>0)for(h.iushrn(m);m-- >0;)w.isOdd()&&w.iadd(P),w.iushrn(1);E.cmp(h)>=0?(E.isub(h),b.isub(w)):(h.isub(E),w.isub(b))}var _;return E.cmpn(1)===0?_=b:_=w,_.cmpn(0)<0&&_.iadd(d),_},c.prototype.gcd=function(d){if(this.isZero())return d.abs();if(d.isZero())return this.abs();var E=this.clone(),h=d.clone();E.negative=0,h.negative=0;for(var b=0;E.isEven()&&h.isEven();b++)E.iushrn(1),h.iushrn(1);do{for(;E.isEven();)E.iushrn(1);for(;h.isEven();)h.iushrn(1);var w=E.cmp(h);if(w<0){var P=E;E=h,h=P}else if(w===0||h.cmpn(1)===0)break;E.isub(h)}while(!0);return h.iushln(b)},c.prototype.invm=function(d){return this.egcd(d).a.umod(d)},c.prototype.isEven=function(){return(this.words[0]&1)===0},c.prototype.isOdd=function(){return(this.words[0]&1)===1},c.prototype.andln=function(d){return this.words[0]&d},c.prototype.bincn=function(d){u(typeof d=="number");var E=d%26,h=(d-E)/26,b=1<<E;if(this.length<=h)return this._expand(h+1),this.words[h]|=b,this;for(var w=b,P=h;w!==0&&P<this.length;P++){var L=this.words[P]|0;L+=w,w=L>>>26,L&=67108863,this.words[P]=L}return w!==0&&(this.words[P]=w,this.length++),this},c.prototype.isZero=function(){return this.length===1&&this.words[0]===0},c.prototype.cmpn=function(d){var E=d<0;if(this.negative!==0&&!E)return-1;if(this.negative===0&&E)return 1;this.strip();var h;if(this.length>1)h=1;else{E&&(d=-d),u(d<=67108863,"Number is too big");var b=this.words[0]|0;h=b===d?0:b<d?-1:1}return this.negative!==0?-h|0:h},c.prototype.cmp=function(d){if(this.negative!==0&&d.negative===0)return-1;if(this.negative===0&&d.negative!==0)return 1;var E=this.ucmp(d);return this.negative!==0?-E|0:E},c.prototype.ucmp=function(d){if(this.length>d.length)return 1;if(this.length<d.length)return-1;for(var E=0,h=this.length-1;h>=0;h--){var b=this.words[h]|0,w=d.words[h]|0;if(b!==w){b<w?E=-1:b>w&&(E=1);break}}return E},c.prototype.gtn=function(d){return this.cmpn(d)===1},c.prototype.gt=function(d){return this.cmp(d)===1},c.prototype.gten=function(d){return this.cmpn(d)>=0},c.prototype.gte=function(d){return this.cmp(d)>=0},c.prototype.ltn=function(d){return this.cmpn(d)===-1},c.prototype.lt=function(d){return this.cmp(d)===-1},c.prototype.lten=function(d){return this.cmpn(d)<=0},c.prototype.lte=function(d){return this.cmp(d)<=0},c.prototype.eqn=function(d){return this.cmpn(d)===0},c.prototype.eq=function(d){return this.cmp(d)===0},c.red=function(d){return new W(d)},c.prototype.toRed=function(d){return u(!this.red,"Already a number in reduction context"),u(this.negative===0,"red works only with positives"),d.convertTo(this)._forceRed(d)},c.prototype.fromRed=function(){return u(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},c.prototype._forceRed=function(d){return this.red=d,this},c.prototype.forceRed=function(d){return u(!this.red,"Already a number in reduction context"),this._forceRed(d)},c.prototype.redAdd=function(d){return u(this.red,"redAdd works only with red numbers"),this.red.add(this,d)},c.prototype.redIAdd=function(d){return u(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,d)},c.prototype.redSub=function(d){return u(this.red,"redSub works only with red numbers"),this.red.sub(this,d)},c.prototype.redISub=function(d){return u(this.red,"redISub works only with red numbers"),this.red.isub(this,d)},c.prototype.redShl=function(d){return u(this.red,"redShl works only with red numbers"),this.red.shl(this,d)},c.prototype.redMul=function(d){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,d),this.red.mul(this,d)},c.prototype.redIMul=function(d){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,d),this.red.imul(this,d)},c.prototype.redSqr=function(){return u(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},c.prototype.redISqr=function(){return u(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},c.prototype.redSqrt=function(){return u(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},c.prototype.redInvm=function(){return u(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},c.prototype.redNeg=function(){return u(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},c.prototype.redPow=function(d){return u(this.red&&!d.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,d)};var Z={k256:null,p224:null,p192:null,p25519:null};function Y(d,E){this.name=d,this.p=new c(E,16),this.n=this.p.bitLength(),this.k=new c(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}Y.prototype._tmp=function(){var d=new c(null);return d.words=new Array(Math.ceil(this.n/13)),d},Y.prototype.ireduce=function(d){var E=d,h;do this.split(E,this.tmp),E=this.imulK(E),E=E.iadd(this.tmp),h=E.bitLength();while(h>this.n);var b=h<this.n?-1:E.ucmp(this.p);return b===0?(E.words[0]=0,E.length=1):b>0?E.isub(this.p):E.strip!==void 0?E.strip():E._strip(),E},Y.prototype.split=function(d,E){d.iushrn(this.n,0,E)},Y.prototype.imulK=function(d){return d.imul(this.k)};function rt(){Y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}l(rt,Y),rt.prototype.split=function(d,E){for(var h=4194303,b=Math.min(d.length,9),w=0;w<b;w++)E.words[w]=d.words[w];if(E.length=b,d.length<=9){d.words[0]=0,d.length=1;return}var P=d.words[9];for(E.words[E.length++]=P&h,w=10;w<d.length;w++){var L=d.words[w]|0;d.words[w-10]=(L&h)<<4|P>>>22,P=L}P>>>=22,d.words[w-10]=P,P===0&&d.length>10?d.length-=10:d.length-=9},rt.prototype.imulK=function(d){d.words[d.length]=0,d.words[d.length+1]=0,d.length+=2;for(var E=0,h=0;h<d.length;h++){var b=d.words[h]|0;E+=b*977,d.words[h]=E&67108863,E=b*64+(E/67108864|0)}return d.words[d.length-1]===0&&(d.length--,d.words[d.length-1]===0&&d.length--),d};function nt(){Y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}l(nt,Y);function M(){Y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}l(M,Y);function k(){Y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}l(k,Y),k.prototype.imulK=function(d){for(var E=0,h=0;h<d.length;h++){var b=(d.words[h]|0)*19+E,w=b&67108863;b>>>=26,d.words[h]=w,E=b}return E!==0&&(d.words[d.length++]=E),d},c._prime=function(d){if(Z[d])return Z[d];var E;if(d==="k256")E=new rt;else if(d==="p224")E=new nt;else if(d==="p192")E=new M;else if(d==="p25519")E=new k;else throw new Error("Unknown prime "+d);return Z[d]=E,E};function W(d){if(typeof d=="string"){var E=c._prime(d);this.m=E.p,this.prime=E}else u(d.gtn(1),"modulus must be greater than 1"),this.m=d,this.prime=null}W.prototype._verify1=function(d){u(d.negative===0,"red works only with positives"),u(d.red,"red works only with red numbers")},W.prototype._verify2=function(d,E){u((d.negative|E.negative)===0,"red works only with positives"),u(d.red&&d.red===E.red,"red works only with red numbers")},W.prototype.imod=function(d){return this.prime?this.prime.ireduce(d)._forceRed(this):d.umod(this.m)._forceRed(this)},W.prototype.neg=function(d){return d.isZero()?d.clone():this.m.sub(d)._forceRed(this)},W.prototype.add=function(d,E){this._verify2(d,E);var h=d.add(E);return h.cmp(this.m)>=0&&h.isub(this.m),h._forceRed(this)},W.prototype.iadd=function(d,E){this._verify2(d,E);var h=d.iadd(E);return h.cmp(this.m)>=0&&h.isub(this.m),h},W.prototype.sub=function(d,E){this._verify2(d,E);var h=d.sub(E);return h.cmpn(0)<0&&h.iadd(this.m),h._forceRed(this)},W.prototype.isub=function(d,E){this._verify2(d,E);var h=d.isub(E);return h.cmpn(0)<0&&h.iadd(this.m),h},W.prototype.shl=function(d,E){return this._verify1(d),this.imod(d.ushln(E))},W.prototype.imul=function(d,E){return this._verify2(d,E),this.imod(d.imul(E))},W.prototype.mul=function(d,E){return this._verify2(d,E),this.imod(d.mul(E))},W.prototype.isqr=function(d){return this.imul(d,d.clone())},W.prototype.sqr=function(d){return this.mul(d,d)},W.prototype.sqrt=function(d){if(d.isZero())return d.clone();var E=this.m.andln(3);if(u(E%2===1),E===3){var h=this.m.add(new c(1)).iushrn(2);return this.pow(d,h)}for(var b=this.m.subn(1),w=0;!b.isZero()&&b.andln(1)===0;)w++,b.iushrn(1);u(!b.isZero());var P=new c(1).toRed(this),L=P.redNeg(),$=this.m.subn(1).iushrn(1),m=this.m.bitLength();for(m=new c(2*m*m).toRed(this);this.pow(m,$).cmp(L)!==0;)m.redIAdd(L);for(var B=this.pow(m,b),_=this.pow(d,b.addn(1).iushrn(1)),x=this.pow(d,b),et=w;x.cmp(P)!==0;){for(var tt=x,st=0;tt.cmp(P)!==0;st++)tt=tt.redSqr();u(st<et);var ht=this.pow(B,new c(1).iushln(et-st-1));_=_.redMul(ht),B=ht.redSqr(),x=x.redMul(B),et=st}return _},W.prototype.invm=function(d){var E=d._invmp(this.m);return E.negative!==0?(E.negative=0,this.imod(E).redNeg()):this.imod(E)},W.prototype.pow=function(d,E){if(E.isZero())return new c(1).toRed(this);if(E.cmpn(1)===0)return d.clone();var h=4,b=new Array(1<<h);b[0]=new c(1).toRed(this),b[1]=d;for(var w=2;w<b.length;w++)b[w]=this.mul(b[w-1],d);var P=b[0],L=0,$=0,m=E.bitLength()%26;for(m===0&&(m=26),w=E.length-1;w>=0;w--){for(var B=E.words[w],_=m-1;_>=0;_--){var x=B>>_&1;if(P!==b[0]&&(P=this.sqr(P)),x===0&&L===0){$=0;continue}L<<=1,L|=x,$++,!($!==h&&(w!==0||_!==0))&&(P=this.mul(P,b[L]),$=0,L=0)}m=26}return P},W.prototype.convertTo=function(d){var E=d.umod(this.m);return E===d?E.clone():E},W.prototype.convertFrom=function(d){var E=d.clone();return E.red=null,E},c.mont=function(d){return new Q(d)};function Q(d){W.call(this,d),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new c(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}l(Q,W),Q.prototype.convertTo=function(d){return this.imod(d.ushln(this.shift))},Q.prototype.convertFrom=function(d){var E=this.imod(d.mul(this.rinv));return E.red=null,E},Q.prototype.imul=function(d,E){if(d.isZero()||E.isZero())return d.words[0]=0,d.length=1,d;var h=d.imul(E),b=h.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),w=h.isub(b).iushrn(this.shift),P=w;return w.cmp(this.m)>=0?P=w.isub(this.m):w.cmpn(0)<0&&(P=w.iadd(this.m)),P._forceRed(this)},Q.prototype.mul=function(d,E){if(d.isZero()||E.isZero())return new c(0)._forceRed(this);var h=d.mul(E),b=h.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),w=h.isub(b).iushrn(this.shift),P=w;return w.cmp(this.m)>=0?P=w.isub(this.m):w.cmpn(0)<0&&(P=w.iadd(this.m)),P._forceRed(this)},Q.prototype.invm=function(d){var E=this.imod(d._invmp(this.m).mul(this.r2));return E._forceRed(this)}})(i,commonjsGlobal)})(bn);var bnExports=bn.exports,minimalisticAssert=assert$f;function assert$f(i,n){if(!i)throw new Error(n||"Assertion failed")}assert$f.equal=function(i,n,a){if(i!=n)throw new Error(a||"Assertion failed: "+i+" != "+n)};var utils$l={};(function(i){var n=i;function a(c,S){if(Array.isArray(c))return c.slice();if(!c)return[];var I=[];if(typeof c!="string"){for(var y=0;y<c.length;y++)I[y]=c[y]|0;return I}if(S==="hex"){c=c.replace(/[^a-z0-9]+/ig,""),c.length%2!==0&&(c="0"+c);for(var y=0;y<c.length;y+=2)I.push(parseInt(c[y]+c[y+1],16))}else for(var y=0;y<c.length;y++){var g=c.charCodeAt(y),N=g>>8,F=g&255;N?I.push(N,F):I.push(F)}return I}n.toArray=a;function u(c){return c.length===1?"0"+c:c}n.zero2=u;function l(c){for(var S="",I=0;I<c.length;I++)S+=u(c[I].toString(16));return S}n.toHex=l,n.encode=function(c,S){return S==="hex"?l(c):c}})(utils$l);(function(i){var n=i,a=bnExports,u=minimalisticAssert,l=utils$l;n.assert=u,n.toArray=l.toArray,n.zero2=l.zero2,n.toHex=l.toHex,n.encode=l.encode;function c(N,F,H){var G=new Array(Math.max(N.bitLength(),H)+1);G.fill(0);for(var q=1<<F+1,X=N.clone(),U=0;U<G.length;U++){var V,j=X.andln(q-1);X.isOdd()?(j>(q>>1)-1?V=(q>>1)-j:V=j,X.isubn(V)):V=0,G[U]=V,X.iushrn(1)}return G}n.getNAF=c;function S(N,F){var H=[[],[]];N=N.clone(),F=F.clone();for(var G=0,q=0,X;N.cmpn(-G)>0||F.cmpn(-q)>0;){var U=N.andln(3)+G&3,V=F.andln(3)+q&3;U===3&&(U=-1),V===3&&(V=-1);var j;U&1?(X=N.andln(7)+G&7,(X===3||X===5)&&V===2?j=-U:j=U):j=0,H[0].push(j);var Z;V&1?(X=F.andln(7)+q&7,(X===3||X===5)&&U===2?Z=-V:Z=V):Z=0,H[1].push(Z),2*G===j+1&&(G=1-G),2*q===Z+1&&(q=1-q),N.iushrn(1),F.iushrn(1)}return H}n.getJSF=S;function I(N,F,H){var G="_"+F;N.prototype[F]=function(){return this[G]!==void 0?this[G]:this[G]=H.call(this)}}n.cachedProperty=I;function y(N){return typeof N=="string"?n.toArray(N,"hex"):N}n.parseBytes=y;function g(N){return new a(N,"hex","le")}n.intFromLE=g})(utils$m);var brorand={exports:{}},r$2;brorand.exports=function(i){return r$2||(r$2=new Rand(null)),r$2.generate(i)};function Rand(i){this.rand=i}brorand.exports.Rand=Rand;Rand.prototype.generate=function(i){return this._rand(i)};Rand.prototype._rand=function(i){if(this.rand.getBytes)return this.rand.getBytes(i);for(var n=new Uint8Array(i),a=0;a<n.length;a++)n[a]=this.rand.getByte();return n};if(typeof self=="object")self.crypto&&self.crypto.getRandomValues?Rand.prototype._rand=function(i){var n=new Uint8Array(i);return self.crypto.getRandomValues(n),n}:self.msCrypto&&self.msCrypto.getRandomValues?Rand.prototype._rand=function(i){var n=new Uint8Array(i);return self.msCrypto.getRandomValues(n),n}:typeof window=="object"&&(Rand.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var crypto=require$$3;if(typeof crypto.randomBytes!="function")throw new Error("Not supported");Rand.prototype._rand=function(i){return crypto.randomBytes(i)}}catch{}var brorandExports=brorand.exports,curve={},BN$7=bnExports,utils$k=utils$m,getNAF=utils$k.getNAF,getJSF=utils$k.getJSF,assert$e=utils$k.assert;function BaseCurve(i,n){this.type=i,this.p=new BN$7(n.p,16),this.red=n.prime?BN$7.red(n.prime):BN$7.mont(this.p),this.zero=new BN$7(0).toRed(this.red),this.one=new BN$7(1).toRed(this.red),this.two=new BN$7(2).toRed(this.red),this.n=n.n&&new BN$7(n.n,16),this.g=n.g&&this.pointFromJSON(n.g,n.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var a=this.n&&this.p.div(this.n);!a||a.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var base=BaseCurve;BaseCurve.prototype.point=function(){throw new Error("Not implemented")};BaseCurve.prototype.validate=function(){throw new Error("Not implemented")};BaseCurve.prototype._fixedNafMul=function(i,n){assert$e(i.precomputed);var a=i._getDoubles(),u=getNAF(n,1,this._bitLength),l=(1<<a.step+1)-(a.step%2===0?2:1);l/=3;var c=[],S,I;for(S=0;S<u.length;S+=a.step){I=0;for(var y=S+a.step-1;y>=S;y--)I=(I<<1)+u[y];c.push(I)}for(var g=this.jpoint(null,null,null),N=this.jpoint(null,null,null),F=l;F>0;F--){for(S=0;S<c.length;S++)I=c[S],I===F?N=N.mixedAdd(a.points[S]):I===-F&&(N=N.mixedAdd(a.points[S].neg()));g=g.add(N)}return g.toP()};BaseCurve.prototype._wnafMul=function(i,n){var a=4,u=i._getNAFPoints(a);a=u.wnd;for(var l=u.points,c=getNAF(n,a,this._bitLength),S=this.jpoint(null,null,null),I=c.length-1;I>=0;I--){for(var y=0;I>=0&&c[I]===0;I--)y++;if(I>=0&&y++,S=S.dblp(y),I<0)break;var g=c[I];assert$e(g!==0),i.type==="affine"?g>0?S=S.mixedAdd(l[g-1>>1]):S=S.mixedAdd(l[-g-1>>1].neg()):g>0?S=S.add(l[g-1>>1]):S=S.add(l[-g-1>>1].neg())}return i.type==="affine"?S.toP():S};BaseCurve.prototype._wnafMulAdd=function(i,n,a,u,l){var c=this._wnafT1,S=this._wnafT2,I=this._wnafT3,y=0,g,N,F;for(g=0;g<u;g++){F=n[g];var H=F._getNAFPoints(i);c[g]=H.wnd,S[g]=H.points}for(g=u-1;g>=1;g-=2){var G=g-1,q=g;if(c[G]!==1||c[q]!==1){I[G]=getNAF(a[G],c[G],this._bitLength),I[q]=getNAF(a[q],c[q],this._bitLength),y=Math.max(I[G].length,y),y=Math.max(I[q].length,y);continue}var X=[n[G],null,null,n[q]];n[G].y.cmp(n[q].y)===0?(X[1]=n[G].add(n[q]),X[2]=n[G].toJ().mixedAdd(n[q].neg())):n[G].y.cmp(n[q].y.redNeg())===0?(X[1]=n[G].toJ().mixedAdd(n[q]),X[2]=n[G].add(n[q].neg())):(X[1]=n[G].toJ().mixedAdd(n[q]),X[2]=n[G].toJ().mixedAdd(n[q].neg()));var U=[-3,-1,-5,-7,0,7,5,1,3],V=getJSF(a[G],a[q]);for(y=Math.max(V[0].length,y),I[G]=new Array(y),I[q]=new Array(y),N=0;N<y;N++){var j=V[0][N]|0,Z=V[1][N]|0;I[G][N]=U[(j+1)*3+(Z+1)],I[q][N]=0,S[G]=X}}var Y=this.jpoint(null,null,null),rt=this._wnafT4;for(g=y;g>=0;g--){for(var nt=0;g>=0;){var M=!0;for(N=0;N<u;N++)rt[N]=I[N][g]|0,rt[N]!==0&&(M=!1);if(!M)break;nt++,g--}if(g>=0&&nt++,Y=Y.dblp(nt),g<0)break;for(N=0;N<u;N++){var k=rt[N];k!==0&&(k>0?F=S[N][k-1>>1]:k<0&&(F=S[N][-k-1>>1].neg()),F.type==="affine"?Y=Y.mixedAdd(F):Y=Y.add(F))}}for(g=0;g<u;g++)S[g]=null;return l?Y:Y.toP()};function BasePoint(i,n){this.curve=i,this.type=n,this.precomputed=null}BaseCurve.BasePoint=BasePoint;BasePoint.prototype.eq=function(){throw new Error("Not implemented")};BasePoint.prototype.validate=function(){return this.curve.validate(this)};BaseCurve.prototype.decodePoint=function(i,n){i=utils$k.toArray(i,n);var a=this.p.byteLength();if((i[0]===4||i[0]===6||i[0]===7)&&i.length-1===2*a){i[0]===6?assert$e(i[i.length-1]%2===0):i[0]===7&&assert$e(i[i.length-1]%2===1);var u=this.point(i.slice(1,1+a),i.slice(1+a,1+2*a));return u}else if((i[0]===2||i[0]===3)&&i.length-1===a)return this.pointFromX(i.slice(1,1+a),i[0]===3);throw new Error("Unknown point format")};BasePoint.prototype.encodeCompressed=function(i){return this.encode(i,!0)};BasePoint.prototype._encode=function(i){var n=this.curve.p.byteLength(),a=this.getX().toArray("be",n);return i?[this.getY().isEven()?2:3].concat(a):[4].concat(a,this.getY().toArray("be",n))};BasePoint.prototype.encode=function(i,n){return utils$k.encode(this._encode(n),i)};BasePoint.prototype.precompute=function(i){if(this.precomputed)return this;var n={doubles:null,naf:null,beta:null};return n.naf=this._getNAFPoints(8),n.doubles=this._getDoubles(4,i),n.beta=this._getBeta(),this.precomputed=n,this};BasePoint.prototype._hasDoubles=function(i){if(!this.precomputed)return!1;var n=this.precomputed.doubles;return n?n.points.length>=Math.ceil((i.bitLength()+1)/n.step):!1};BasePoint.prototype._getDoubles=function(i,n){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var a=[this],u=this,l=0;l<n;l+=i){for(var c=0;c<i;c++)u=u.dbl();a.push(u)}return{step:i,points:a}};BasePoint.prototype._getNAFPoints=function(i){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var n=[this],a=(1<<i)-1,u=a===1?null:this.dbl(),l=1;l<a;l++)n[l]=n[l-1].add(u);return{wnd:i,points:n}};BasePoint.prototype._getBeta=function(){return null};BasePoint.prototype.dblp=function(i){for(var n=this,a=0;a<i;a++)n=n.dbl();return n};var inherits_browser={exports:{}};typeof Object.create=="function"?inherits_browser.exports=function(i,n){n&&(i.super_=n,i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}))}:inherits_browser.exports=function(i,n){if(n){i.super_=n;var a=function(){};a.prototype=n.prototype,i.prototype=new a,i.prototype.constructor=i}};var inherits_browserExports=inherits_browser.exports,utils$j=utils$m,BN$6=bnExports,inherits$3=inherits_browserExports,Base$2=base,assert$d=utils$j.assert;function ShortCurve(i){Base$2.call(this,"short",i),this.a=new BN$6(i.a,16).toRed(this.red),this.b=new BN$6(i.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(i),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}inherits$3(ShortCurve,Base$2);var short=ShortCurve;ShortCurve.prototype._getEndomorphism=function(i){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var n,a;if(i.beta)n=new BN$6(i.beta,16).toRed(this.red);else{var u=this._getEndoRoots(this.p);n=u[0].cmp(u[1])<0?u[0]:u[1],n=n.toRed(this.red)}if(i.lambda)a=new BN$6(i.lambda,16);else{var l=this._getEndoRoots(this.n);this.g.mul(l[0]).x.cmp(this.g.x.redMul(n))===0?a=l[0]:(a=l[1],assert$d(this.g.mul(a).x.cmp(this.g.x.redMul(n))===0))}var c;return i.basis?c=i.basis.map(function(S){return{a:new BN$6(S.a,16),b:new BN$6(S.b,16)}}):c=this._getEndoBasis(a),{beta:n,lambda:a,basis:c}}};ShortCurve.prototype._getEndoRoots=function(i){var n=i===this.p?this.red:BN$6.mont(i),a=new BN$6(2).toRed(n).redInvm(),u=a.redNeg(),l=new BN$6(3).toRed(n).redNeg().redSqrt().redMul(a),c=u.redAdd(l).fromRed(),S=u.redSub(l).fromRed();return[c,S]};ShortCurve.prototype._getEndoBasis=function(i){for(var n=this.n.ushrn(Math.floor(this.n.bitLength()/2)),a=i,u=this.n.clone(),l=new BN$6(1),c=new BN$6(0),S=new BN$6(0),I=new BN$6(1),y,g,N,F,H,G,q,X=0,U,V;a.cmpn(0)!==0;){var j=u.div(a);U=u.sub(j.mul(a)),V=S.sub(j.mul(l));var Z=I.sub(j.mul(c));if(!N&&U.cmp(n)<0)y=q.neg(),g=l,N=U.neg(),F=V;else if(N&&++X===2)break;q=U,u=a,a=U,S=l,l=V,I=c,c=Z}H=U.neg(),G=V;var Y=N.sqr().add(F.sqr()),rt=H.sqr().add(G.sqr());return rt.cmp(Y)>=0&&(H=y,G=g),N.negative&&(N=N.neg(),F=F.neg()),H.negative&&(H=H.neg(),G=G.neg()),[{a:N,b:F},{a:H,b:G}]};ShortCurve.prototype._endoSplit=function(i){var n=this.endo.basis,a=n[0],u=n[1],l=u.b.mul(i).divRound(this.n),c=a.b.neg().mul(i).divRound(this.n),S=l.mul(a.a),I=c.mul(u.a),y=l.mul(a.b),g=c.mul(u.b),N=i.sub(S).sub(I),F=y.add(g).neg();return{k1:N,k2:F}};ShortCurve.prototype.pointFromX=function(i,n){i=new BN$6(i,16),i.red||(i=i.toRed(this.red));var a=i.redSqr().redMul(i).redIAdd(i.redMul(this.a)).redIAdd(this.b),u=a.redSqrt();if(u.redSqr().redSub(a).cmp(this.zero)!==0)throw new Error("invalid point");var l=u.fromRed().isOdd();return(n&&!l||!n&&l)&&(u=u.redNeg()),this.point(i,u)};ShortCurve.prototype.validate=function(i){if(i.inf)return!0;var n=i.x,a=i.y,u=this.a.redMul(n),l=n.redSqr().redMul(n).redIAdd(u).redIAdd(this.b);return a.redSqr().redISub(l).cmpn(0)===0};ShortCurve.prototype._endoWnafMulAdd=function(i,n,a){for(var u=this._endoWnafT1,l=this._endoWnafT2,c=0;c<i.length;c++){var S=this._endoSplit(n[c]),I=i[c],y=I._getBeta();S.k1.negative&&(S.k1.ineg(),I=I.neg(!0)),S.k2.negative&&(S.k2.ineg(),y=y.neg(!0)),u[c*2]=I,u[c*2+1]=y,l[c*2]=S.k1,l[c*2+1]=S.k2}for(var g=this._wnafMulAdd(1,u,l,c*2,a),N=0;N<c*2;N++)u[N]=null,l[N]=null;return g};function Point$2(i,n,a,u){Base$2.BasePoint.call(this,i,"affine"),n===null&&a===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new BN$6(n,16),this.y=new BN$6(a,16),u&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}inherits$3(Point$2,Base$2.BasePoint);ShortCurve.prototype.point=function(i,n,a){return new Point$2(this,i,n,a)};ShortCurve.prototype.pointFromJSON=function(i,n){return Point$2.fromJSON(this,i,n)};Point$2.prototype._getBeta=function(){if(this.curve.endo){var i=this.precomputed;if(i&&i.beta)return i.beta;var n=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(i){var a=this.curve,u=function(l){return a.point(l.x.redMul(a.endo.beta),l.y)};i.beta=n,n.precomputed={beta:null,naf:i.naf&&{wnd:i.naf.wnd,points:i.naf.points.map(u)},doubles:i.doubles&&{step:i.doubles.step,points:i.doubles.points.map(u)}}}return n}};Point$2.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]};Point$2.fromJSON=function(i,n,a){typeof n=="string"&&(n=JSON.parse(n));var u=i.point(n[0],n[1],a);if(!n[2])return u;function l(S){return i.point(S[0],S[1],a)}var c=n[2];return u.precomputed={beta:null,doubles:c.doubles&&{step:c.doubles.step,points:[u].concat(c.doubles.points.map(l))},naf:c.naf&&{wnd:c.naf.wnd,points:[u].concat(c.naf.points.map(l))}},u};Point$2.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"};Point$2.prototype.isInfinity=function(){return this.inf};Point$2.prototype.add=function(i){if(this.inf)return i;if(i.inf)return this;if(this.eq(i))return this.dbl();if(this.neg().eq(i))return this.curve.point(null,null);if(this.x.cmp(i.x)===0)return this.curve.point(null,null);var n=this.y.redSub(i.y);n.cmpn(0)!==0&&(n=n.redMul(this.x.redSub(i.x).redInvm()));var a=n.redSqr().redISub(this.x).redISub(i.x),u=n.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,u)};Point$2.prototype.dbl=function(){if(this.inf)return this;var i=this.y.redAdd(this.y);if(i.cmpn(0)===0)return this.curve.point(null,null);var n=this.curve.a,a=this.x.redSqr(),u=i.redInvm(),l=a.redAdd(a).redIAdd(a).redIAdd(n).redMul(u),c=l.redSqr().redISub(this.x.redAdd(this.x)),S=l.redMul(this.x.redSub(c)).redISub(this.y);return this.curve.point(c,S)};Point$2.prototype.getX=function(){return this.x.fromRed()};Point$2.prototype.getY=function(){return this.y.fromRed()};Point$2.prototype.mul=function(i){return i=new BN$6(i,16),this.isInfinity()?this:this._hasDoubles(i)?this.curve._fixedNafMul(this,i):this.curve.endo?this.curve._endoWnafMulAdd([this],[i]):this.curve._wnafMul(this,i)};Point$2.prototype.mulAdd=function(i,n,a){var u=[this,n],l=[i,a];return this.curve.endo?this.curve._endoWnafMulAdd(u,l):this.curve._wnafMulAdd(1,u,l,2)};Point$2.prototype.jmulAdd=function(i,n,a){var u=[this,n],l=[i,a];return this.curve.endo?this.curve._endoWnafMulAdd(u,l,!0):this.curve._wnafMulAdd(1,u,l,2,!0)};Point$2.prototype.eq=function(i){return this===i||this.inf===i.inf&&(this.inf||this.x.cmp(i.x)===0&&this.y.cmp(i.y)===0)};Point$2.prototype.neg=function(i){if(this.inf)return this;var n=this.curve.point(this.x,this.y.redNeg());if(i&&this.precomputed){var a=this.precomputed,u=function(l){return l.neg()};n.precomputed={naf:a.naf&&{wnd:a.naf.wnd,points:a.naf.points.map(u)},doubles:a.doubles&&{step:a.doubles.step,points:a.doubles.points.map(u)}}}return n};Point$2.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var i=this.curve.jpoint(this.x,this.y,this.curve.one);return i};function JPoint(i,n,a,u){Base$2.BasePoint.call(this,i,"jacobian"),n===null&&a===null&&u===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new BN$6(0)):(this.x=new BN$6(n,16),this.y=new BN$6(a,16),this.z=new BN$6(u,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}inherits$3(JPoint,Base$2.BasePoint);ShortCurve.prototype.jpoint=function(i,n,a){return new JPoint(this,i,n,a)};JPoint.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var i=this.z.redInvm(),n=i.redSqr(),a=this.x.redMul(n),u=this.y.redMul(n).redMul(i);return this.curve.point(a,u)};JPoint.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};JPoint.prototype.add=function(i){if(this.isInfinity())return i;if(i.isInfinity())return this;var n=i.z.redSqr(),a=this.z.redSqr(),u=this.x.redMul(n),l=i.x.redMul(a),c=this.y.redMul(n.redMul(i.z)),S=i.y.redMul(a.redMul(this.z)),I=u.redSub(l),y=c.redSub(S);if(I.cmpn(0)===0)return y.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var g=I.redSqr(),N=g.redMul(I),F=u.redMul(g),H=y.redSqr().redIAdd(N).redISub(F).redISub(F),G=y.redMul(F.redISub(H)).redISub(c.redMul(N)),q=this.z.redMul(i.z).redMul(I);return this.curve.jpoint(H,G,q)};JPoint.prototype.mixedAdd=function(i){if(this.isInfinity())return i.toJ();if(i.isInfinity())return this;var n=this.z.redSqr(),a=this.x,u=i.x.redMul(n),l=this.y,c=i.y.redMul(n).redMul(this.z),S=a.redSub(u),I=l.redSub(c);if(S.cmpn(0)===0)return I.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var y=S.redSqr(),g=y.redMul(S),N=a.redMul(y),F=I.redSqr().redIAdd(g).redISub(N).redISub(N),H=I.redMul(N.redISub(F)).redISub(l.redMul(g)),G=this.z.redMul(S);return this.curve.jpoint(F,H,G)};JPoint.prototype.dblp=function(i){if(i===0)return this;if(this.isInfinity())return this;if(!i)return this.dbl();var n;if(this.curve.zeroA||this.curve.threeA){var a=this;for(n=0;n<i;n++)a=a.dbl();return a}var u=this.curve.a,l=this.curve.tinv,c=this.x,S=this.y,I=this.z,y=I.redSqr().redSqr(),g=S.redAdd(S);for(n=0;n<i;n++){var N=c.redSqr(),F=g.redSqr(),H=F.redSqr(),G=N.redAdd(N).redIAdd(N).redIAdd(u.redMul(y)),q=c.redMul(F),X=G.redSqr().redISub(q.redAdd(q)),U=q.redISub(X),V=G.redMul(U);V=V.redIAdd(V).redISub(H);var j=g.redMul(I);n+1<i&&(y=y.redMul(H)),c=X,I=j,g=V}return this.curve.jpoint(c,g.redMul(l),I)};JPoint.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()};JPoint.prototype._zeroDbl=function(){var i,n,a;if(this.zOne){var u=this.x.redSqr(),l=this.y.redSqr(),c=l.redSqr(),S=this.x.redAdd(l).redSqr().redISub(u).redISub(c);S=S.redIAdd(S);var I=u.redAdd(u).redIAdd(u),y=I.redSqr().redISub(S).redISub(S),g=c.redIAdd(c);g=g.redIAdd(g),g=g.redIAdd(g),i=y,n=I.redMul(S.redISub(y)).redISub(g),a=this.y.redAdd(this.y)}else{var N=this.x.redSqr(),F=this.y.redSqr(),H=F.redSqr(),G=this.x.redAdd(F).redSqr().redISub(N).redISub(H);G=G.redIAdd(G);var q=N.redAdd(N).redIAdd(N),X=q.redSqr(),U=H.redIAdd(H);U=U.redIAdd(U),U=U.redIAdd(U),i=X.redISub(G).redISub(G),n=q.redMul(G.redISub(i)).redISub(U),a=this.y.redMul(this.z),a=a.redIAdd(a)}return this.curve.jpoint(i,n,a)};JPoint.prototype._threeDbl=function(){var i,n,a;if(this.zOne){var u=this.x.redSqr(),l=this.y.redSqr(),c=l.redSqr(),S=this.x.redAdd(l).redSqr().redISub(u).redISub(c);S=S.redIAdd(S);var I=u.redAdd(u).redIAdd(u).redIAdd(this.curve.a),y=I.redSqr().redISub(S).redISub(S);i=y;var g=c.redIAdd(c);g=g.redIAdd(g),g=g.redIAdd(g),n=I.redMul(S.redISub(y)).redISub(g),a=this.y.redAdd(this.y)}else{var N=this.z.redSqr(),F=this.y.redSqr(),H=this.x.redMul(F),G=this.x.redSub(N).redMul(this.x.redAdd(N));G=G.redAdd(G).redIAdd(G);var q=H.redIAdd(H);q=q.redIAdd(q);var X=q.redAdd(q);i=G.redSqr().redISub(X),a=this.y.redAdd(this.z).redSqr().redISub(F).redISub(N);var U=F.redSqr();U=U.redIAdd(U),U=U.redIAdd(U),U=U.redIAdd(U),n=G.redMul(q.redISub(i)).redISub(U)}return this.curve.jpoint(i,n,a)};JPoint.prototype._dbl=function(){var i=this.curve.a,n=this.x,a=this.y,u=this.z,l=u.redSqr().redSqr(),c=n.redSqr(),S=a.redSqr(),I=c.redAdd(c).redIAdd(c).redIAdd(i.redMul(l)),y=n.redAdd(n);y=y.redIAdd(y);var g=y.redMul(S),N=I.redSqr().redISub(g.redAdd(g)),F=g.redISub(N),H=S.redSqr();H=H.redIAdd(H),H=H.redIAdd(H),H=H.redIAdd(H);var G=I.redMul(F).redISub(H),q=a.redAdd(a).redMul(u);return this.curve.jpoint(N,G,q)};JPoint.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var i=this.x.redSqr(),n=this.y.redSqr(),a=this.z.redSqr(),u=n.redSqr(),l=i.redAdd(i).redIAdd(i),c=l.redSqr(),S=this.x.redAdd(n).redSqr().redISub(i).redISub(u);S=S.redIAdd(S),S=S.redAdd(S).redIAdd(S),S=S.redISub(c);var I=S.redSqr(),y=u.redIAdd(u);y=y.redIAdd(y),y=y.redIAdd(y),y=y.redIAdd(y);var g=l.redIAdd(S).redSqr().redISub(c).redISub(I).redISub(y),N=n.redMul(g);N=N.redIAdd(N),N=N.redIAdd(N);var F=this.x.redMul(I).redISub(N);F=F.redIAdd(F),F=F.redIAdd(F);var H=this.y.redMul(g.redMul(y.redISub(g)).redISub(S.redMul(I)));H=H.redIAdd(H),H=H.redIAdd(H),H=H.redIAdd(H);var G=this.z.redAdd(S).redSqr().redISub(a).redISub(I);return this.curve.jpoint(F,H,G)};JPoint.prototype.mul=function(i,n){return i=new BN$6(i,n),this.curve._wnafMul(this,i)};JPoint.prototype.eq=function(i){if(i.type==="affine")return this.eq(i.toJ());if(this===i)return!0;var n=this.z.redSqr(),a=i.z.redSqr();if(this.x.redMul(a).redISub(i.x.redMul(n)).cmpn(0)!==0)return!1;var u=n.redMul(this.z),l=a.redMul(i.z);return this.y.redMul(l).redISub(i.y.redMul(u)).cmpn(0)===0};JPoint.prototype.eqXToP=function(i){var n=this.z.redSqr(),a=i.toRed(this.curve.red).redMul(n);if(this.x.cmp(a)===0)return!0;for(var u=i.clone(),l=this.curve.redN.redMul(n);;){if(u.iadd(this.curve.n),u.cmp(this.curve.p)>=0)return!1;if(a.redIAdd(l),this.x.cmp(a)===0)return!0}};JPoint.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"};JPoint.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var BN$5=bnExports,inherits$2=inherits_browserExports,Base$1=base,utils$i=utils$m;function MontCurve(i){Base$1.call(this,"mont",i),this.a=new BN$5(i.a,16).toRed(this.red),this.b=new BN$5(i.b,16).toRed(this.red),this.i4=new BN$5(4).toRed(this.red).redInvm(),this.two=new BN$5(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}inherits$2(MontCurve,Base$1);var mont=MontCurve;MontCurve.prototype.validate=function(i){var n=i.normalize().x,a=n.redSqr(),u=a.redMul(n).redAdd(a.redMul(this.a)).redAdd(n),l=u.redSqrt();return l.redSqr().cmp(u)===0};function Point$1(i,n,a){Base$1.BasePoint.call(this,i,"projective"),n===null&&a===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new BN$5(n,16),this.z=new BN$5(a,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}inherits$2(Point$1,Base$1.BasePoint);MontCurve.prototype.decodePoint=function(i,n){return this.point(utils$i.toArray(i,n),1)};MontCurve.prototype.point=function(i,n){return new Point$1(this,i,n)};MontCurve.prototype.pointFromJSON=function(i){return Point$1.fromJSON(this,i)};Point$1.prototype.precompute=function(){};Point$1.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())};Point$1.fromJSON=function(i,n){return new Point$1(i,n[0],n[1]||i.one)};Point$1.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"};Point$1.prototype.isInfinity=function(){return this.z.cmpn(0)===0};Point$1.prototype.dbl=function(){var i=this.x.redAdd(this.z),n=i.redSqr(),a=this.x.redSub(this.z),u=a.redSqr(),l=n.redSub(u),c=n.redMul(u),S=l.redMul(u.redAdd(this.curve.a24.redMul(l)));return this.curve.point(c,S)};Point$1.prototype.add=function(){throw new Error("Not supported on Montgomery curve")};Point$1.prototype.diffAdd=function(i,n){var a=this.x.redAdd(this.z),u=this.x.redSub(this.z),l=i.x.redAdd(i.z),c=i.x.redSub(i.z),S=c.redMul(a),I=l.redMul(u),y=n.z.redMul(S.redAdd(I).redSqr()),g=n.x.redMul(S.redISub(I).redSqr());return this.curve.point(y,g)};Point$1.prototype.mul=function(i){for(var n=i.clone(),a=this,u=this.curve.point(null,null),l=this,c=[];n.cmpn(0)!==0;n.iushrn(1))c.push(n.andln(1));for(var S=c.length-1;S>=0;S--)c[S]===0?(a=a.diffAdd(u,l),u=u.dbl()):(u=a.diffAdd(u,l),a=a.dbl());return u};Point$1.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")};Point$1.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")};Point$1.prototype.eq=function(i){return this.getX().cmp(i.getX())===0};Point$1.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this};Point$1.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var utils$h=utils$m,BN$4=bnExports,inherits$1=inherits_browserExports,Base=base,assert$c=utils$h.assert;function EdwardsCurve(i){this.twisted=(i.a|0)!==1,this.mOneA=this.twisted&&(i.a|0)===-1,this.extended=this.mOneA,Base.call(this,"edwards",i),this.a=new BN$4(i.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new BN$4(i.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new BN$4(i.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),assert$c(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(i.c|0)===1}inherits$1(EdwardsCurve,Base);var edwards=EdwardsCurve;EdwardsCurve.prototype._mulA=function(i){return this.mOneA?i.redNeg():this.a.redMul(i)};EdwardsCurve.prototype._mulC=function(i){return this.oneC?i:this.c.redMul(i)};EdwardsCurve.prototype.jpoint=function(i,n,a,u){return this.point(i,n,a,u)};EdwardsCurve.prototype.pointFromX=function(i,n){i=new BN$4(i,16),i.red||(i=i.toRed(this.red));var a=i.redSqr(),u=this.c2.redSub(this.a.redMul(a)),l=this.one.redSub(this.c2.redMul(this.d).redMul(a)),c=u.redMul(l.redInvm()),S=c.redSqrt();if(S.redSqr().redSub(c).cmp(this.zero)!==0)throw new Error("invalid point");var I=S.fromRed().isOdd();return(n&&!I||!n&&I)&&(S=S.redNeg()),this.point(i,S)};EdwardsCurve.prototype.pointFromY=function(i,n){i=new BN$4(i,16),i.red||(i=i.toRed(this.red));var a=i.redSqr(),u=a.redSub(this.c2),l=a.redMul(this.d).redMul(this.c2).redSub(this.a),c=u.redMul(l.redInvm());if(c.cmp(this.zero)===0){if(n)throw new Error("invalid point");return this.point(this.zero,i)}var S=c.redSqrt();if(S.redSqr().redSub(c).cmp(this.zero)!==0)throw new Error("invalid point");return S.fromRed().isOdd()!==n&&(S=S.redNeg()),this.point(S,i)};EdwardsCurve.prototype.validate=function(i){if(i.isInfinity())return!0;i.normalize();var n=i.x.redSqr(),a=i.y.redSqr(),u=n.redMul(this.a).redAdd(a),l=this.c2.redMul(this.one.redAdd(this.d.redMul(n).redMul(a)));return u.cmp(l)===0};function Point(i,n,a,u,l){Base.BasePoint.call(this,i,"projective"),n===null&&a===null&&u===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new BN$4(n,16),this.y=new BN$4(a,16),this.z=u?new BN$4(u,16):this.curve.one,this.t=l&&new BN$4(l,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}inherits$1(Point,Base.BasePoint);EdwardsCurve.prototype.pointFromJSON=function(i){return Point.fromJSON(this,i)};EdwardsCurve.prototype.point=function(i,n,a,u){return new Point(this,i,n,a,u)};Point.fromJSON=function(i,n){return new Point(i,n[0],n[1],n[2])};Point.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"};Point.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)};Point.prototype._extDbl=function(){var i=this.x.redSqr(),n=this.y.redSqr(),a=this.z.redSqr();a=a.redIAdd(a);var u=this.curve._mulA(i),l=this.x.redAdd(this.y).redSqr().redISub(i).redISub(n),c=u.redAdd(n),S=c.redSub(a),I=u.redSub(n),y=l.redMul(S),g=c.redMul(I),N=l.redMul(I),F=S.redMul(c);return this.curve.point(y,g,F,N)};Point.prototype._projDbl=function(){var i=this.x.redAdd(this.y).redSqr(),n=this.x.redSqr(),a=this.y.redSqr(),u,l,c,S,I,y;if(this.curve.twisted){S=this.curve._mulA(n);var g=S.redAdd(a);this.zOne?(u=i.redSub(n).redSub(a).redMul(g.redSub(this.curve.two)),l=g.redMul(S.redSub(a)),c=g.redSqr().redSub(g).redSub(g)):(I=this.z.redSqr(),y=g.redSub(I).redISub(I),u=i.redSub(n).redISub(a).redMul(y),l=g.redMul(S.redSub(a)),c=g.redMul(y))}else S=n.redAdd(a),I=this.curve._mulC(this.z).redSqr(),y=S.redSub(I).redSub(I),u=this.curve._mulC(i.redISub(S)).redMul(y),l=this.curve._mulC(S).redMul(n.redISub(a)),c=S.redMul(y);return this.curve.point(u,l,c)};Point.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()};Point.prototype._extAdd=function(i){var n=this.y.redSub(this.x).redMul(i.y.redSub(i.x)),a=this.y.redAdd(this.x).redMul(i.y.redAdd(i.x)),u=this.t.redMul(this.curve.dd).redMul(i.t),l=this.z.redMul(i.z.redAdd(i.z)),c=a.redSub(n),S=l.redSub(u),I=l.redAdd(u),y=a.redAdd(n),g=c.redMul(S),N=I.redMul(y),F=c.redMul(y),H=S.redMul(I);return this.curve.point(g,N,H,F)};Point.prototype._projAdd=function(i){var n=this.z.redMul(i.z),a=n.redSqr(),u=this.x.redMul(i.x),l=this.y.redMul(i.y),c=this.curve.d.redMul(u).redMul(l),S=a.redSub(c),I=a.redAdd(c),y=this.x.redAdd(this.y).redMul(i.x.redAdd(i.y)).redISub(u).redISub(l),g=n.redMul(S).redMul(y),N,F;return this.curve.twisted?(N=n.redMul(I).redMul(l.redSub(this.curve._mulA(u))),F=S.redMul(I)):(N=n.redMul(I).redMul(l.redSub(u)),F=this.curve._mulC(S).redMul(I)),this.curve.point(g,N,F)};Point.prototype.add=function(i){return this.isInfinity()?i:i.isInfinity()?this:this.curve.extended?this._extAdd(i):this._projAdd(i)};Point.prototype.mul=function(i){return this._hasDoubles(i)?this.curve._fixedNafMul(this,i):this.curve._wnafMul(this,i)};Point.prototype.mulAdd=function(i,n,a){return this.curve._wnafMulAdd(1,[this,n],[i,a],2,!1)};Point.prototype.jmulAdd=function(i,n,a){return this.curve._wnafMulAdd(1,[this,n],[i,a],2,!0)};Point.prototype.normalize=function(){if(this.zOne)return this;var i=this.z.redInvm();return this.x=this.x.redMul(i),this.y=this.y.redMul(i),this.t&&(this.t=this.t.redMul(i)),this.z=this.curve.one,this.zOne=!0,this};Point.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())};Point.prototype.getX=function(){return this.normalize(),this.x.fromRed()};Point.prototype.getY=function(){return this.normalize(),this.y.fromRed()};Point.prototype.eq=function(i){return this===i||this.getX().cmp(i.getX())===0&&this.getY().cmp(i.getY())===0};Point.prototype.eqXToP=function(i){var n=i.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(n)===0)return!0;for(var a=i.clone(),u=this.curve.redN.redMul(this.z);;){if(a.iadd(this.curve.n),a.cmp(this.curve.p)>=0)return!1;if(n.redIAdd(u),this.x.cmp(n)===0)return!0}};Point.prototype.toP=Point.prototype.normalize;Point.prototype.mixedAdd=Point.prototype.add;(function(i){var n=i;n.base=base,n.short=short,n.mont=mont,n.edwards=edwards})(curve);var curves$2={},hash$2={},utils$g={},assert$b=minimalisticAssert,inherits=inherits_browserExports;utils$g.inherits=inherits;function isSurrogatePair(i,n){return(i.charCodeAt(n)&64512)!==55296||n<0||n+1>=i.length?!1:(i.charCodeAt(n+1)&64512)===56320}function toArray(i,n){if(Array.isArray(i))return i.slice();if(!i)return[];var a=[];if(typeof i=="string")if(n){if(n==="hex")for(i=i.replace(/[^a-z0-9]+/ig,""),i.length%2!==0&&(i="0"+i),l=0;l<i.length;l+=2)a.push(parseInt(i[l]+i[l+1],16))}else for(var u=0,l=0;l<i.length;l++){var c=i.charCodeAt(l);c<128?a[u++]=c:c<2048?(a[u++]=c>>6|192,a[u++]=c&63|128):isSurrogatePair(i,l)?(c=65536+((c&1023)<<10)+(i.charCodeAt(++l)&1023),a[u++]=c>>18|240,a[u++]=c>>12&63|128,a[u++]=c>>6&63|128,a[u++]=c&63|128):(a[u++]=c>>12|224,a[u++]=c>>6&63|128,a[u++]=c&63|128)}else for(l=0;l<i.length;l++)a[l]=i[l]|0;return a}utils$g.toArray=toArray;function toHex(i){for(var n="",a=0;a<i.length;a++)n+=zero2(i[a].toString(16));return n}utils$g.toHex=toHex;function htonl(i){var n=i>>>24|i>>>8&65280|i<<8&16711680|(i&255)<<24;return n>>>0}utils$g.htonl=htonl;function toHex32(i,n){for(var a="",u=0;u<i.length;u++){var l=i[u];n==="little"&&(l=htonl(l)),a+=zero8(l.toString(16))}return a}utils$g.toHex32=toHex32;function zero2(i){return i.length===1?"0"+i:i}utils$g.zero2=zero2;function zero8(i){return i.length===7?"0"+i:i.length===6?"00"+i:i.length===5?"000"+i:i.length===4?"0000"+i:i.length===3?"00000"+i:i.length===2?"000000"+i:i.length===1?"0000000"+i:i}utils$g.zero8=zero8;function join32(i,n,a,u){var l=a-n;assert$b(l%4===0);for(var c=new Array(l/4),S=0,I=n;S<c.length;S++,I+=4){var y;u==="big"?y=i[I]<<24|i[I+1]<<16|i[I+2]<<8|i[I+3]:y=i[I+3]<<24|i[I+2]<<16|i[I+1]<<8|i[I],c[S]=y>>>0}return c}utils$g.join32=join32;function split32(i,n){for(var a=new Array(i.length*4),u=0,l=0;u<i.length;u++,l+=4){var c=i[u];n==="big"?(a[l]=c>>>24,a[l+1]=c>>>16&255,a[l+2]=c>>>8&255,a[l+3]=c&255):(a[l+3]=c>>>24,a[l+2]=c>>>16&255,a[l+1]=c>>>8&255,a[l]=c&255)}return a}utils$g.split32=split32;function rotr32$1(i,n){return i>>>n|i<<32-n}utils$g.rotr32=rotr32$1;function rotl32$2(i,n){return i<<n|i>>>32-n}utils$g.rotl32=rotl32$2;function sum32$3(i,n){return i+n>>>0}utils$g.sum32=sum32$3;function sum32_3$1(i,n,a){return i+n+a>>>0}utils$g.sum32_3=sum32_3$1;function sum32_4$2(i,n,a,u){return i+n+a+u>>>0}utils$g.sum32_4=sum32_4$2;function sum32_5$2(i,n,a,u,l){return i+n+a+u+l>>>0}utils$g.sum32_5=sum32_5$2;function sum64$1(i,n,a,u){var l=i[n],c=i[n+1],S=u+c>>>0,I=(S<u?1:0)+a+l;i[n]=I>>>0,i[n+1]=S}utils$g.sum64=sum64$1;function sum64_hi$1(i,n,a,u){var l=n+u>>>0,c=(l<n?1:0)+i+a;return c>>>0}utils$g.sum64_hi=sum64_hi$1;function sum64_lo$1(i,n,a,u){var l=n+u;return l>>>0}utils$g.sum64_lo=sum64_lo$1;function sum64_4_hi$1(i,n,a,u,l,c,S,I){var y=0,g=n;g=g+u>>>0,y+=g<n?1:0,g=g+c>>>0,y+=g<c?1:0,g=g+I>>>0,y+=g<I?1:0;var N=i+a+l+S+y;return N>>>0}utils$g.sum64_4_hi=sum64_4_hi$1;function sum64_4_lo$1(i,n,a,u,l,c,S,I){var y=n+u+c+I;return y>>>0}utils$g.sum64_4_lo=sum64_4_lo$1;function sum64_5_hi$1(i,n,a,u,l,c,S,I,y,g){var N=0,F=n;F=F+u>>>0,N+=F<n?1:0,F=F+c>>>0,N+=F<c?1:0,F=F+I>>>0,N+=F<I?1:0,F=F+g>>>0,N+=F<g?1:0;var H=i+a+l+S+y+N;return H>>>0}utils$g.sum64_5_hi=sum64_5_hi$1;function sum64_5_lo$1(i,n,a,u,l,c,S,I,y,g){var N=n+u+c+I+g;return N>>>0}utils$g.sum64_5_lo=sum64_5_lo$1;function rotr64_hi$1(i,n,a){var u=n<<32-a|i>>>a;return u>>>0}utils$g.rotr64_hi=rotr64_hi$1;function rotr64_lo$1(i,n,a){var u=i<<32-a|n>>>a;return u>>>0}utils$g.rotr64_lo=rotr64_lo$1;function shr64_hi$1(i,n,a){return i>>>a}utils$g.shr64_hi=shr64_hi$1;function shr64_lo$1(i,n,a){var u=i<<32-a|n>>>a;return u>>>0}utils$g.shr64_lo=shr64_lo$1;var common$5={},utils$f=utils$g,assert$a=minimalisticAssert;function BlockHash$4(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}common$5.BlockHash=BlockHash$4;BlockHash$4.prototype.update=function(i,n){if(i=utils$f.toArray(i,n),this.pending?this.pending=this.pending.concat(i):this.pending=i,this.pendingTotal+=i.length,this.pending.length>=this._delta8){i=this.pending;var a=i.length%this._delta8;this.pending=i.slice(i.length-a,i.length),this.pending.length===0&&(this.pending=null),i=utils$f.join32(i,0,i.length-a,this.endian);for(var u=0;u<i.length;u+=this._delta32)this._update(i,u,u+this._delta32)}return this};BlockHash$4.prototype.digest=function(i){return this.update(this._pad()),assert$a(this.pending===null),this._digest(i)};BlockHash$4.prototype._pad=function(){var i=this.pendingTotal,n=this._delta8,a=n-(i+this.padLength)%n,u=new Array(a+this.padLength);u[0]=128;for(var l=1;l<a;l++)u[l]=0;if(i<<=3,this.endian==="big"){for(var c=8;c<this.padLength;c++)u[l++]=0;u[l++]=0,u[l++]=0,u[l++]=0,u[l++]=0,u[l++]=i>>>24&255,u[l++]=i>>>16&255,u[l++]=i>>>8&255,u[l++]=i&255}else for(u[l++]=i&255,u[l++]=i>>>8&255,u[l++]=i>>>16&255,u[l++]=i>>>24&255,u[l++]=0,u[l++]=0,u[l++]=0,u[l++]=0,c=8;c<this.padLength;c++)u[l++]=0;return u};var sha={},common$4={},utils$e=utils$g,rotr32=utils$e.rotr32;function ft_1$1(i,n,a,u){if(i===0)return ch32$1(n,a,u);if(i===1||i===3)return p32(n,a,u);if(i===2)return maj32$1(n,a,u)}common$4.ft_1=ft_1$1;function ch32$1(i,n,a){return i&n^~i&a}common$4.ch32=ch32$1;function maj32$1(i,n,a){return i&n^i&a^n&a}common$4.maj32=maj32$1;function p32(i,n,a){return i^n^a}common$4.p32=p32;function s0_256$1(i){return rotr32(i,2)^rotr32(i,13)^rotr32(i,22)}common$4.s0_256=s0_256$1;function s1_256$1(i){return rotr32(i,6)^rotr32(i,11)^rotr32(i,25)}common$4.s1_256=s1_256$1;function g0_256$1(i){return rotr32(i,7)^rotr32(i,18)^i>>>3}common$4.g0_256=g0_256$1;function g1_256$1(i){return rotr32(i,17)^rotr32(i,19)^i>>>10}common$4.g1_256=g1_256$1;var utils$d=utils$g,common$3=common$5,shaCommon$1=common$4,rotl32$1=utils$d.rotl32,sum32$2=utils$d.sum32,sum32_5$1=utils$d.sum32_5,ft_1=shaCommon$1.ft_1,BlockHash$3=common$3.BlockHash,sha1_K=[1518500249,1859775393,2400959708,3395469782];function SHA1(){if(!(this instanceof SHA1))return new SHA1;BlockHash$3.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}utils$d.inherits(SHA1,BlockHash$3);var _1=SHA1;SHA1.blockSize=512;SHA1.outSize=160;SHA1.hmacStrength=80;SHA1.padLength=64;SHA1.prototype._update=function(i,n){for(var a=this.W,u=0;u<16;u++)a[u]=i[n+u];for(;u<a.length;u++)a[u]=rotl32$1(a[u-3]^a[u-8]^a[u-14]^a[u-16],1);var l=this.h[0],c=this.h[1],S=this.h[2],I=this.h[3],y=this.h[4];for(u=0;u<a.length;u++){var g=~~(u/20),N=sum32_5$1(rotl32$1(l,5),ft_1(g,c,S,I),y,a[u],sha1_K[g]);y=I,I=S,S=rotl32$1(c,30),c=l,l=N}this.h[0]=sum32$2(this.h[0],l),this.h[1]=sum32$2(this.h[1],c),this.h[2]=sum32$2(this.h[2],S),this.h[3]=sum32$2(this.h[3],I),this.h[4]=sum32$2(this.h[4],y)};SHA1.prototype._digest=function(i){return i==="hex"?utils$d.toHex32(this.h,"big"):utils$d.split32(this.h,"big")};var utils$c=utils$g,common$2=common$5,shaCommon=common$4,assert$9=minimalisticAssert,sum32$1=utils$c.sum32,sum32_4$1=utils$c.sum32_4,sum32_5=utils$c.sum32_5,ch32=shaCommon.ch32,maj32=shaCommon.maj32,s0_256=shaCommon.s0_256,s1_256=shaCommon.s1_256,g0_256=shaCommon.g0_256,g1_256=shaCommon.g1_256,BlockHash$2=common$2.BlockHash,sha256_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];function SHA256$1(){if(!(this instanceof SHA256$1))return new SHA256$1;BlockHash$2.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=sha256_K,this.W=new Array(64)}utils$c.inherits(SHA256$1,BlockHash$2);var _256=SHA256$1;SHA256$1.blockSize=512;SHA256$1.outSize=256;SHA256$1.hmacStrength=192;SHA256$1.padLength=64;SHA256$1.prototype._update=function(i,n){for(var a=this.W,u=0;u<16;u++)a[u]=i[n+u];for(;u<a.length;u++)a[u]=sum32_4$1(g1_256(a[u-2]),a[u-7],g0_256(a[u-15]),a[u-16]);var l=this.h[0],c=this.h[1],S=this.h[2],I=this.h[3],y=this.h[4],g=this.h[5],N=this.h[6],F=this.h[7];for(assert$9(this.k.length===a.length),u=0;u<a.length;u++){var H=sum32_5(F,s1_256(y),ch32(y,g,N),this.k[u],a[u]),G=sum32$1(s0_256(l),maj32(l,c,S));F=N,N=g,g=y,y=sum32$1(I,H),I=S,S=c,c=l,l=sum32$1(H,G)}this.h[0]=sum32$1(this.h[0],l),this.h[1]=sum32$1(this.h[1],c),this.h[2]=sum32$1(this.h[2],S),this.h[3]=sum32$1(this.h[3],I),this.h[4]=sum32$1(this.h[4],y),this.h[5]=sum32$1(this.h[5],g),this.h[6]=sum32$1(this.h[6],N),this.h[7]=sum32$1(this.h[7],F)};SHA256$1.prototype._digest=function(i){return i==="hex"?utils$c.toHex32(this.h,"big"):utils$c.split32(this.h,"big")};var utils$b=utils$g,SHA256=_256;function SHA224(){if(!(this instanceof SHA224))return new SHA224;SHA256.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}utils$b.inherits(SHA224,SHA256);var _224=SHA224;SHA224.blockSize=512;SHA224.outSize=224;SHA224.hmacStrength=192;SHA224.padLength=64;SHA224.prototype._digest=function(i){return i==="hex"?utils$b.toHex32(this.h.slice(0,7),"big"):utils$b.split32(this.h.slice(0,7),"big")};var utils$a=utils$g,common$1=common$5,assert$8=minimalisticAssert,rotr64_hi=utils$a.rotr64_hi,rotr64_lo=utils$a.rotr64_lo,shr64_hi=utils$a.shr64_hi,shr64_lo=utils$a.shr64_lo,sum64=utils$a.sum64,sum64_hi=utils$a.sum64_hi,sum64_lo=utils$a.sum64_lo,sum64_4_hi=utils$a.sum64_4_hi,sum64_4_lo=utils$a.sum64_4_lo,sum64_5_hi=utils$a.sum64_5_hi,sum64_5_lo=utils$a.sum64_5_lo,BlockHash$1=common$1.BlockHash,sha512_K=[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 SHA512$1(){if(!(this instanceof SHA512$1))return new SHA512$1;BlockHash$1.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=sha512_K,this.W=new Array(160)}utils$a.inherits(SHA512$1,BlockHash$1);var _512=SHA512$1;SHA512$1.blockSize=1024;SHA512$1.outSize=512;SHA512$1.hmacStrength=192;SHA512$1.padLength=128;SHA512$1.prototype._prepareBlock=function(i,n){for(var a=this.W,u=0;u<32;u++)a[u]=i[n+u];for(;u<a.length;u+=2){var l=g1_512_hi(a[u-4],a[u-3]),c=g1_512_lo(a[u-4],a[u-3]),S=a[u-14],I=a[u-13],y=g0_512_hi(a[u-30],a[u-29]),g=g0_512_lo(a[u-30],a[u-29]),N=a[u-32],F=a[u-31];a[u]=sum64_4_hi(l,c,S,I,y,g,N,F),a[u+1]=sum64_4_lo(l,c,S,I,y,g,N,F)}};SHA512$1.prototype._update=function(i,n){this._prepareBlock(i,n);var a=this.W,u=this.h[0],l=this.h[1],c=this.h[2],S=this.h[3],I=this.h[4],y=this.h[5],g=this.h[6],N=this.h[7],F=this.h[8],H=this.h[9],G=this.h[10],q=this.h[11],X=this.h[12],U=this.h[13],V=this.h[14],j=this.h[15];assert$8(this.k.length===a.length);for(var Z=0;Z<a.length;Z+=2){var Y=V,rt=j,nt=s1_512_hi(F,H),M=s1_512_lo(F,H),k=ch64_hi(F,H,G,q,X),W=ch64_lo(F,H,G,q,X,U),Q=this.k[Z],d=this.k[Z+1],E=a[Z],h=a[Z+1],b=sum64_5_hi(Y,rt,nt,M,k,W,Q,d,E,h),w=sum64_5_lo(Y,rt,nt,M,k,W,Q,d,E,h);Y=s0_512_hi(u,l),rt=s0_512_lo(u,l),nt=maj64_hi(u,l,c,S,I),M=maj64_lo(u,l,c,S,I,y);var P=sum64_hi(Y,rt,nt,M),L=sum64_lo(Y,rt,nt,M);V=X,j=U,X=G,U=q,G=F,q=H,F=sum64_hi(g,N,b,w),H=sum64_lo(N,N,b,w),g=I,N=y,I=c,y=S,c=u,S=l,u=sum64_hi(b,w,P,L),l=sum64_lo(b,w,P,L)}sum64(this.h,0,u,l),sum64(this.h,2,c,S),sum64(this.h,4,I,y),sum64(this.h,6,g,N),sum64(this.h,8,F,H),sum64(this.h,10,G,q),sum64(this.h,12,X,U),sum64(this.h,14,V,j)};SHA512$1.prototype._digest=function(i){return i==="hex"?utils$a.toHex32(this.h,"big"):utils$a.split32(this.h,"big")};function ch64_hi(i,n,a,u,l){var c=i&a^~i&l;return c<0&&(c+=4294967296),c}function ch64_lo(i,n,a,u,l,c){var S=n&u^~n&c;return S<0&&(S+=4294967296),S}function maj64_hi(i,n,a,u,l){var c=i&a^i&l^a&l;return c<0&&(c+=4294967296),c}function maj64_lo(i,n,a,u,l,c){var S=n&u^n&c^u&c;return S<0&&(S+=4294967296),S}function s0_512_hi(i,n){var a=rotr64_hi(i,n,28),u=rotr64_hi(n,i,2),l=rotr64_hi(n,i,7),c=a^u^l;return c<0&&(c+=4294967296),c}function s0_512_lo(i,n){var a=rotr64_lo(i,n,28),u=rotr64_lo(n,i,2),l=rotr64_lo(n,i,7),c=a^u^l;return c<0&&(c+=4294967296),c}function s1_512_hi(i,n){var a=rotr64_hi(i,n,14),u=rotr64_hi(i,n,18),l=rotr64_hi(n,i,9),c=a^u^l;return c<0&&(c+=4294967296),c}function s1_512_lo(i,n){var a=rotr64_lo(i,n,14),u=rotr64_lo(i,n,18),l=rotr64_lo(n,i,9),c=a^u^l;return c<0&&(c+=4294967296),c}function g0_512_hi(i,n){var a=rotr64_hi(i,n,1),u=rotr64_hi(i,n,8),l=shr64_hi(i,n,7),c=a^u^l;return c<0&&(c+=4294967296),c}function g0_512_lo(i,n){var a=rotr64_lo(i,n,1),u=rotr64_lo(i,n,8),l=shr64_lo(i,n,7),c=a^u^l;return c<0&&(c+=4294967296),c}function g1_512_hi(i,n){var a=rotr64_hi(i,n,19),u=rotr64_hi(n,i,29),l=shr64_hi(i,n,6),c=a^u^l;return c<0&&(c+=4294967296),c}function g1_512_lo(i,n){var a=rotr64_lo(i,n,19),u=rotr64_lo(n,i,29),l=shr64_lo(i,n,6),c=a^u^l;return c<0&&(c+=4294967296),c}var utils$9=utils$g,SHA512=_512;function SHA384(){if(!(this instanceof SHA384))return new SHA384;SHA512.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}utils$9.inherits(SHA384,SHA512);var _384=SHA384;SHA384.blockSize=1024;SHA384.outSize=384;SHA384.hmacStrength=192;SHA384.padLength=128;SHA384.prototype._digest=function(i){return i==="hex"?utils$9.toHex32(this.h.slice(0,12),"big"):utils$9.split32(this.h.slice(0,12),"big")};sha.sha1=_1;sha.sha224=_224;sha.sha256=_256;sha.sha384=_384;sha.sha512=_512;var ripemd={},utils$8=utils$g,common=common$5,rotl32=utils$8.rotl32,sum32=utils$8.sum32,sum32_3=utils$8.sum32_3,sum32_4=utils$8.sum32_4,BlockHash=common.BlockHash;function RIPEMD160(){if(!(this instanceof RIPEMD160))return new RIPEMD160;BlockHash.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}utils$8.inherits(RIPEMD160,BlockHash);ripemd.ripemd160=RIPEMD160;RIPEMD160.blockSize=512;RIPEMD160.outSize=160;RIPEMD160.hmacStrength=192;RIPEMD160.padLength=64;RIPEMD160.prototype._update=function(i,n){for(var a=this.h[0],u=this.h[1],l=this.h[2],c=this.h[3],S=this.h[4],I=a,y=u,g=l,N=c,F=S,H=0;H<80;H++){var G=sum32(rotl32(sum32_4(a,f(H,u,l,c),i[r$1[H]+n],K(H)),s$1[H]),S);a=S,S=c,c=rotl32(l,10),l=u,u=G,G=sum32(rotl32(sum32_4(I,f(79-H,y,g,N),i[rh[H]+n],Kh(H)),sh[H]),F),I=F,F=N,N=rotl32(g,10),g=y,y=G}G=sum32_3(this.h[1],l,N),this.h[1]=sum32_3(this.h[2],c,F),this.h[2]=sum32_3(this.h[3],S,I),this.h[3]=sum32_3(this.h[4],a,y),this.h[4]=sum32_3(this.h[0],u,g),this.h[0]=G};RIPEMD160.prototype._digest=function(i){return i==="hex"?utils$8.toHex32(this.h,"little"):utils$8.split32(this.h,"little")};function f(i,n,a,u){return i<=15?n^a^u:i<=31?n&a|~n&u:i<=47?(n|~a)^u:i<=63?n&u|a&~u:n^(a|~u)}function K(i){return i<=15?0:i<=31?1518500249:i<=47?1859775393:i<=63?2400959708:2840853838}function Kh(i){return i<=15?1352829926:i<=31?1548603684:i<=47?1836072691:i<=63?2053994217:0}var r$1=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],rh=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],s$1=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],sh=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],utils$7=utils$g,assert$7=minimalisticAssert;function Hmac(i,n,a){if(!(this instanceof Hmac))return new Hmac(i,n,a);this.Hash=i,this.blockSize=i.blockSize/8,this.outSize=i.outSize/8,this.inner=null,this.outer=null,this._init(utils$7.toArray(n,a))}var hmac$1=Hmac;Hmac.prototype._init=function(i){i.length>this.blockSize&&(i=new this.Hash().update(i).digest()),assert$7(i.length<=this.blockSize);for(var n=i.length;n<this.blockSize;n++)i.push(0);for(n=0;n<i.length;n++)i[n]^=54;for(this.inner=new this.Hash().update(i),n=0;n<i.length;n++)i[n]^=106;this.outer=new this.Hash().update(i)};Hmac.prototype.update=function(i,n){return this.inner.update(i,n),this};Hmac.prototype.digest=function(i){return this.outer.update(this.inner.digest()),this.outer.digest(i)};(function(i){var n=i;n.utils=utils$g,n.common=common$5,n.sha=sha,n.ripemd=ripemd,n.hmac=hmac$1,n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160})(hash$2);var secp256k1,hasRequiredSecp256k1;function requireSecp256k1(){return hasRequiredSecp256k1||(hasRequiredSecp256k1=1,secp256k1={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}),secp256k1}(function(i){var n=i,a=hash$2,u=curve,l=utils$m,c=l.assert;function S(g){g.type==="short"?this.curve=new u.short(g):g.type==="edwards"?this.curve=new u.edwards(g):this.curve=new u.mont(g),this.g=this.curve.g,this.n=this.curve.n,this.hash=g.hash,c(this.g.validate(),"Invalid curve"),c(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}n.PresetCurve=S;function I(g,N){Object.defineProperty(n,g,{configurable:!0,enumerable:!0,get:function(){var F=new S(N);return Object.defineProperty(n,g,{configurable:!0,enumerable:!0,value:F}),F}})}I("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:a.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),I("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:a.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),I("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:a.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),I("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:a.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),I("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:a.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),I("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["9"]}),I("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var y;try{y=requireSecp256k1()}catch{y=void 0}I("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:a.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",y]})})(curves$2);var hash$1=hash$2,utils$6=utils$l,assert$6=minimalisticAssert;function HmacDRBG$1(i){if(!(this instanceof HmacDRBG$1))return new HmacDRBG$1(i);this.hash=i.hash,this.predResist=!!i.predResist,this.outLen=this.hash.outSize,this.minEntropy=i.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var n=utils$6.toArray(i.entropy,i.entropyEnc||"hex"),a=utils$6.toArray(i.nonce,i.nonceEnc||"hex"),u=utils$6.toArray(i.pers,i.persEnc||"hex");assert$6(n.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(n,a,u)}var hmacDrbg=HmacDRBG$1;HmacDRBG$1.prototype._init=function(i,n,a){var u=i.concat(n).concat(a);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var l=0;l<this.V.length;l++)this.K[l]=0,this.V[l]=1;this._update(u),this._reseed=1,this.reseedInterval=281474976710656};HmacDRBG$1.prototype._hmac=function(){return new hash$1.hmac(this.hash,this.K)};HmacDRBG$1.prototype._update=function(i){var n=this._hmac().update(this.V).update([0]);i&&(n=n.update(i)),this.K=n.digest(),this.V=this._hmac().update(this.V).digest(),i&&(this.K=this._hmac().update(this.V).update([1]).update(i).digest(),this.V=this._hmac().update(this.V).digest())};HmacDRBG$1.prototype.reseed=function(i,n,a,u){typeof n!="string"&&(u=a,a=n,n=null),i=utils$6.toArray(i,n),a=utils$6.toArray(a,u),assert$6(i.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(i.concat(a||[])),this._reseed=1};HmacDRBG$1.prototype.generate=function(i,n,a,u){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof n!="string"&&(u=a,a=n,n=null),a&&(a=utils$6.toArray(a,u||"hex"),this._update(a));for(var l=[];l.length<i;)this.V=this._hmac().update(this.V).digest(),l=l.concat(this.V);var c=l.slice(0,i);return this._update(a),this._reseed++,utils$6.encode(c,n)};var BN$3=bnExports,utils$5=utils$m,assert$5=utils$5.assert;function KeyPair$3(i,n){this.ec=i,this.priv=null,this.pub=null,n.priv&&this._importPrivate(n.priv,n.privEnc),n.pub&&this._importPublic(n.pub,n.pubEnc)}var key$1=KeyPair$3;KeyPair$3.fromPublic=function(i,n,a){return n instanceof KeyPair$3?n:new KeyPair$3(i,{pub:n,pubEnc:a})};KeyPair$3.fromPrivate=function(i,n,a){return n instanceof KeyPair$3?n:new KeyPair$3(i,{priv:n,privEnc:a})};KeyPair$3.prototype.validate=function(){var i=this.getPublic();return i.isInfinity()?{result:!1,reason:"Invalid public key"}:i.validate()?i.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}};KeyPair$3.prototype.getPublic=function(i,n){return typeof i=="string"&&(n=i,i=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),n?this.pub.encode(n,i):this.pub};KeyPair$3.prototype.getPrivate=function(i){return i==="hex"?this.priv.toString(16,2):this.priv};KeyPair$3.prototype._importPrivate=function(i,n){this.priv=new BN$3(i,n||16),this.priv=this.priv.umod(this.ec.curve.n)};KeyPair$3.prototype._importPublic=function(i,n){if(i.x||i.y){this.ec.curve.type==="mont"?assert$5(i.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&assert$5(i.x&&i.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(i.x,i.y);return}this.pub=this.ec.curve.decodePoint(i,n)};KeyPair$3.prototype.derive=function(i){return i.validate()||assert$5(i.validate(),"public point not validated"),i.mul(this.priv).getX()};KeyPair$3.prototype.sign=function(i,n,a){return this.ec.sign(i,this,n,a)};KeyPair$3.prototype.verify=function(i,n){return this.ec.verify(i,n,this)};KeyPair$3.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var BN$2=bnExports,utils$4=utils$m,assert$4=utils$4.assert;function Signature$3(i,n){if(i instanceof Signature$3)return i;this._importDER(i,n)||(assert$4(i.r&&i.s,"Signature without r or s"),this.r=new BN$2(i.r,16),this.s=new BN$2(i.s,16),i.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=i.recoveryParam)}var signature$1=Signature$3;function Position(){this.place=0}function getLength(i,n){var a=i[n.place++];if(!(a&128))return a;var u=a&15;if(u===0||u>4)return!1;for(var l=0,c=0,S=n.place;c<u;c++,S++)l<<=8,l|=i[S],l>>>=0;return l<=127?!1:(n.place=S,l)}function rmPadding(i){for(var n=0,a=i.length-1;!i[n]&&!(i[n+1]&128)&&n<a;)n++;return n===0?i:i.slice(n)}Signature$3.prototype._importDER=function(i,n){i=utils$4.toArray(i,n);var a=new Position;if(i[a.place++]!==48)return!1;var u=getLength(i,a);if(u===!1||u+a.place!==i.length||i[a.place++]!==2)return!1;var l=getLength(i,a);if(l===!1)return!1;var c=i.slice(a.place,l+a.place);if(a.place+=l,i[a.place++]!==2)return!1;var S=getLength(i,a);if(S===!1||i.length!==S+a.place)return!1;var I=i.slice(a.place,S+a.place);if(c[0]===0)if(c[1]&128)c=c.slice(1);else return!1;if(I[0]===0)if(I[1]&128)I=I.slice(1);else return!1;return this.r=new BN$2(c),this.s=new BN$2(I),this.recoveryParam=null,!0};function constructLength(i,n){if(n<128){i.push(n);return}var a=1+(Math.log(n)/Math.LN2>>>3);for(i.push(a|128);--a;)i.push(n>>>(a<<3)&255);i.push(n)}Signature$3.prototype.toDER=function(i){var n=this.r.toArray(),a=this.s.toArray();for(n[0]&128&&(n=[0].concat(n)),a[0]&128&&(a=[0].concat(a)),n=rmPadding(n),a=rmPadding(a);!a[0]&&!(a[1]&128);)a=a.slice(1);var u=[2];constructLength(u,n.length),u=u.concat(n),u.push(2),constructLength(u,a.length);var l=u.concat(a),c=[48];return constructLength(c,l.length),c=c.concat(l),utils$4.encode(c,i)};var BN$1=bnExports,HmacDRBG=hmacDrbg,utils$3=utils$m,curves$1=curves$2,rand=brorandExports,assert$3=utils$3.assert,KeyPair$2=key$1,Signature$2=signature$1;function EC(i){if(!(this instanceof EC))return new EC(i);typeof i=="string"&&(assert$3(Object.prototype.hasOwnProperty.call(curves$1,i),"Unknown curve "+i),i=curves$1[i]),i instanceof curves$1.PresetCurve&&(i={curve:i}),this.curve=i.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=i.curve.g,this.g.precompute(i.curve.n.bitLength()+1),this.hash=i.hash||i.curve.hash}var ec=EC;EC.prototype.keyPair=function(i){return new KeyPair$2(this,i)};EC.prototype.keyFromPrivate=function(i,n){return KeyPair$2.fromPrivate(this,i,n)};EC.prototype.keyFromPublic=function(i,n){return KeyPair$2.fromPublic(this,i,n)};EC.prototype.genKeyPair=function(i){i||(i={});for(var n=new HmacDRBG({hash:this.hash,pers:i.pers,persEnc:i.persEnc||"utf8",entropy:i.entropy||rand(this.hash.hmacStrength),entropyEnc:i.entropy&&i.entropyEnc||"utf8",nonce:this.n.toArray()}),a=this.n.byteLength(),u=this.n.sub(new BN$1(2));;){var l=new BN$1(n.generate(a));if(!(l.cmp(u)>0))return l.iaddn(1),this.keyFromPrivate(l)}};EC.prototype._truncateToN=function(i,n){var a=i.byteLength()*8-this.n.bitLength();return a>0&&(i=i.ushrn(a)),!n&&i.cmp(this.n)>=0?i.sub(this.n):i};EC.prototype.sign=function(i,n,a,u){typeof a=="object"&&(u=a,a=null),u||(u={}),n=this.keyFromPrivate(n,a),i=this._truncateToN(new BN$1(i,16));for(var l=this.n.byteLength(),c=n.getPrivate().toArray("be",l),S=i.toArray("be",l),I=new HmacDRBG({hash:this.hash,entropy:c,nonce:S,pers:u.pers,persEnc:u.persEnc||"utf8"}),y=this.n.sub(new BN$1(1)),g=0;;g++){var N=u.k?u.k(g):new BN$1(I.generate(this.n.byteLength()));if(N=this._truncateToN(N,!0),!(N.cmpn(1)<=0||N.cmp(y)>=0)){var F=this.g.mul(N);if(!F.isInfinity()){var H=F.getX(),G=H.umod(this.n);if(G.cmpn(0)!==0){var q=N.invm(this.n).mul(G.mul(n.getPrivate()).iadd(i));if(q=q.umod(this.n),q.cmpn(0)!==0){var X=(F.getY().isOdd()?1:0)|(H.cmp(G)!==0?2:0);return u.canonical&&q.cmp(this.nh)>0&&(q=this.n.sub(q),X^=1),new Signature$2({r:G,s:q,recoveryParam:X})}}}}}};EC.prototype.verify=function(i,n,a,u){i=this._truncateToN(new BN$1(i,16)),a=this.keyFromPublic(a,u),n=new Signature$2(n,"hex");var l=n.r,c=n.s;if(l.cmpn(1)<0||l.cmp(this.n)>=0||c.cmpn(1)<0||c.cmp(this.n)>=0)return!1;var S=c.invm(this.n),I=S.mul(i).umod(this.n),y=S.mul(l).umod(this.n),g;return this.curve._maxwellTrick?(g=this.g.jmulAdd(I,a.getPublic(),y),g.isInfinity()?!1:g.eqXToP(l)):(g=this.g.mulAdd(I,a.getPublic(),y),g.isInfinity()?!1:g.getX().umod(this.n).cmp(l)===0)};EC.prototype.recoverPubKey=function(i,n,a,u){assert$3((3&a)===a,"The recovery param is more than two bits"),n=new Signature$2(n,u);var l=this.n,c=new BN$1(i),S=n.r,I=n.s,y=a&1,g=a>>1;if(S.cmp(this.curve.p.umod(this.curve.n))>=0&&g)throw new Error("Unable to find sencond key candinate");g?S=this.curve.pointFromX(S.add(this.curve.n),y):S=this.curve.pointFromX(S,y);var N=n.r.invm(l),F=l.sub(c).mul(N).umod(l),H=I.mul(N).umod(l);return this.g.mulAdd(F,S,H)};EC.prototype.getKeyRecoveryParam=function(i,n,a,u){if(n=new Signature$2(n,u),n.recoveryParam!==null)return n.recoveryParam;for(var l=0;l<4;l++){var c;try{c=this.recoverPubKey(i,n,l)}catch{continue}if(c.eq(a))return l}throw new Error("Unable to find valid recovery factor")};var utils$2=utils$m,assert$2=utils$2.assert,parseBytes$2=utils$2.parseBytes,cachedProperty$1=utils$2.cachedProperty;function KeyPair$1(i,n){this.eddsa=i,this._secret=parseBytes$2(n.secret),i.isPoint(n.pub)?this._pub=n.pub:this._pubBytes=parseBytes$2(n.pub)}KeyPair$1.fromPublic=function(i,n){return n instanceof KeyPair$1?n:new KeyPair$1(i,{pub:n})};KeyPair$1.fromSecret=function(i,n){return n instanceof KeyPair$1?n:new KeyPair$1(i,{secret:n})};KeyPair$1.prototype.secret=function(){return this._secret};cachedProperty$1(KeyPair$1,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())});cachedProperty$1(KeyPair$1,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())});cachedProperty$1(KeyPair$1,"privBytes",function(){var i=this.eddsa,n=this.hash(),a=i.encodingLength-1,u=n.slice(0,i.encodingLength);return u[0]&=248,u[a]&=127,u[a]|=64,u});cachedProperty$1(KeyPair$1,"priv",function(){return this.eddsa.decodeInt(this.privBytes())});cachedProperty$1(KeyPair$1,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()});cachedProperty$1(KeyPair$1,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)});KeyPair$1.prototype.sign=function(i){return assert$2(this._secret,"KeyPair can only verify"),this.eddsa.sign(i,this)};KeyPair$1.prototype.verify=function(i,n){return this.eddsa.verify(i,n,this)};KeyPair$1.prototype.getSecret=function(i){return assert$2(this._secret,"KeyPair is public only"),utils$2.encode(this.secret(),i)};KeyPair$1.prototype.getPublic=function(i){return utils$2.encode(this.pubBytes(),i)};var key=KeyPair$1,BN=bnExports,utils$1=utils$m,assert$1=utils$1.assert,cachedProperty=utils$1.cachedProperty,parseBytes$1=utils$1.parseBytes;function Signature$1(i,n){this.eddsa=i,typeof n!="object"&&(n=parseBytes$1(n)),Array.isArray(n)&&(n={R:n.slice(0,i.encodingLength),S:n.slice(i.encodingLength)}),assert$1(n.R&&n.S,"Signature without R or S"),i.isPoint(n.R)&&(this._R=n.R),n.S instanceof BN&&(this._S=n.S),this._Rencoded=Array.isArray(n.R)?n.R:n.Rencoded,this._Sencoded=Array.isArray(n.S)?n.S:n.Sencoded}cachedProperty(Signature$1,"S",function(){return this.eddsa.decodeInt(this.Sencoded())});cachedProperty(Signature$1,"R",function(){return this.eddsa.decodePoint(this.Rencoded())});cachedProperty(Signature$1,"Rencoded",function(){return this.eddsa.encodePoint(this.R())});cachedProperty(Signature$1,"Sencoded",function(){return this.eddsa.encodeInt(this.S())});Signature$1.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())};Signature$1.prototype.toHex=function(){return utils$1.encode(this.toBytes(),"hex").toUpperCase()};var signature=Signature$1,hash=hash$2,curves=curves$2,utils=utils$m,assert=utils.assert,parseBytes=utils.parseBytes,KeyPair=key,Signature=signature;function EDDSA(i){if(assert(i==="ed25519","only tested with ed25519 so far"),!(this instanceof EDDSA))return new EDDSA(i);i=curves[i].curve,this.curve=i,this.g=i.g,this.g.precompute(i.n.bitLength()+1),this.pointClass=i.point().constructor,this.encodingLength=Math.ceil(i.n.bitLength()/8),this.hash=hash.sha512}var eddsa=EDDSA;EDDSA.prototype.sign=function(i,n){i=parseBytes(i);var a=this.keyFromSecret(n),u=this.hashInt(a.messagePrefix(),i),l=this.g.mul(u),c=this.encodePoint(l),S=this.hashInt(c,a.pubBytes(),i).mul(a.priv()),I=u.add(S).umod(this.curve.n);return this.makeSignature({R:l,S:I,Rencoded:c})};EDDSA.prototype.verify=function(i,n,a){i=parseBytes(i),n=this.makeSignature(n);var u=this.keyFromPublic(a),l=this.hashInt(n.Rencoded(),u.pubBytes(),i),c=this.g.mul(n.S()),S=n.R().add(u.pub().mul(l));return S.eq(c)};EDDSA.prototype.hashInt=function(){for(var i=this.hash(),n=0;n<arguments.length;n++)i.update(arguments[n]);return utils.intFromLE(i.digest()).umod(this.curve.n)};EDDSA.prototype.keyFromPublic=function(i){return KeyPair.fromPublic(this,i)};EDDSA.prototype.keyFromSecret=function(i){return KeyPair.fromSecret(this,i)};EDDSA.prototype.makeSignature=function(i){return i instanceof Signature?i:new Signature(this,i)};EDDSA.prototype.encodePoint=function(i){var n=i.getY().toArray("le",this.encodingLength);return n[this.encodingLength-1]|=i.getX().isOdd()?128:0,n};EDDSA.prototype.decodePoint=function(i){i=utils.parseBytes(i);var n=i.length-1,a=i.slice(0,n).concat(i[n]&-129),u=(i[n]&128)!==0,l=utils.intFromLE(a);return this.curve.pointFromY(l,u)};EDDSA.prototype.encodeInt=function(i){return i.toArray("le",this.encodingLength)};EDDSA.prototype.decodeInt=function(i){return utils.intFromLE(i)};EDDSA.prototype.isPoint=function(i){return i instanceof this.pointClass};(function(i){var n=i;n.version=require$$0.version,n.utils=utils$m,n.rand=brorandExports,n.curve=curve,n.curves=curves$2,n.ec=ec,n.eddsa=eddsa})(elliptic);var cryptoJs={exports:{}};function commonjsRequire(i){throw new Error('Could not dynamically require "'+i+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var core={exports:{}},hasRequiredCore;function requireCore(){return hasRequiredCore||(hasRequiredCore=1,function(i,n){(function(a,u){i.exports=u()})(commonjsGlobal,function(){var a=a||function(u,l){var c;if(typeof window<"u"&&window.crypto&&(c=window.crypto),typeof self<"u"&&self.crypto&&(c=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(c=globalThis.crypto),!c&&typeof window<"u"&&window.msCrypto&&(c=window.msCrypto),!c&&typeof commonjsGlobal<"u"&&commonjsGlobal.crypto&&(c=commonjsGlobal.crypto),!c&&typeof commonjsRequire=="function")try{c=require$$3}catch{}var S=function(){if(c){if(typeof c.getRandomValues=="function")try{return c.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof c.randomBytes=="function")try{return c.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},I=Object.create||function(){function j(){}return function(Z){var Y;return j.prototype=Z,Y=new j,j.prototype=null,Y}}(),y={},g=y.lib={},N=g.Base=function(){return{extend:function(j){var Z=I(this);return j&&Z.mixIn(j),(!Z.hasOwnProperty("init")||this.init===Z.init)&&(Z.init=function(){Z.$super.init.apply(this,arguments)}),Z.init.prototype=Z,Z.$super=this,Z},create:function(){var j=this.extend();return j.init.apply(j,arguments),j},init:function(){},mixIn:function(j){for(var Z in j)j.hasOwnProperty(Z)&&(this[Z]=j[Z]);j.hasOwnProperty("toString")&&(this.toString=j.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),F=g.WordArray=N.extend({init:function(j,Z){j=this.words=j||[],Z!=l?this.sigBytes=Z:this.sigBytes=j.length*4},toString:function(j){return(j||G).stringify(this)},concat:function(j){var Z=this.words,Y=j.words,rt=this.sigBytes,nt=j.sigBytes;if(this.clamp(),rt%4)for(var M=0;M<nt;M++){var k=Y[M>>>2]>>>24-M%4*8&255;Z[rt+M>>>2]|=k<<24-(rt+M)%4*8}else for(var W=0;W<nt;W+=4)Z[rt+W>>>2]=Y[W>>>2];return this.sigBytes+=nt,this},clamp:function(){var j=this.words,Z=this.sigBytes;j[Z>>>2]&=4294967295<<32-Z%4*8,j.length=u.ceil(Z/4)},clone:function(){var j=N.clone.call(this);return j.words=this.words.slice(0),j},random:function(j){for(var Z=[],Y=0;Y<j;Y+=4)Z.push(S());return new F.init(Z,j)}}),H=y.enc={},G=H.Hex={stringify:function(j){for(var Z=j.words,Y=j.sigBytes,rt=[],nt=0;nt<Y;nt++){var M=Z[nt>>>2]>>>24-nt%4*8&255;rt.push((M>>>4).toString(16)),rt.push((M&15).toString(16))}return rt.join("")},parse:function(j){for(var Z=j.length,Y=[],rt=0;rt<Z;rt+=2)Y[rt>>>3]|=parseInt(j.substr(rt,2),16)<<24-rt%8*4;return new F.init(Y,Z/2)}},q=H.Latin1={stringify:function(j){for(var Z=j.words,Y=j.sigBytes,rt=[],nt=0;nt<Y;nt++){var M=Z[nt>>>2]>>>24-nt%4*8&255;rt.push(String.fromCharCode(M))}return rt.join("")},parse:function(j){for(var Z=j.length,Y=[],rt=0;rt<Z;rt++)Y[rt>>>2]|=(j.charCodeAt(rt)&255)<<24-rt%4*8;return new F.init(Y,Z)}},X=H.Utf8={stringify:function(j){try{return decodeURIComponent(escape(q.stringify(j)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(j){return q.parse(unescape(encodeURIComponent(j)))}},U=g.BufferedBlockAlgorithm=N.extend({reset:function(){this._data=new F.init,this._nDataBytes=0},_append:function(j){typeof j=="string"&&(j=X.parse(j)),this._data.concat(j),this._nDataBytes+=j.sigBytes},_process:function(j){var Z,Y=this._data,rt=Y.words,nt=Y.sigBytes,M=this.blockSize,k=M*4,W=nt/k;j?W=u.ceil(W):W=u.max((W|0)-this._minBufferSize,0);var Q=W*M,d=u.min(Q*4,nt);if(Q){for(var E=0;E<Q;E+=M)this._doProcessBlock(rt,E);Z=rt.splice(0,Q),Y.sigBytes-=d}return new F.init(Z,d)},clone:function(){var j=N.clone.call(this);return j._data=this._data.clone(),j},_minBufferSize:0});g.Hasher=U.extend({cfg:N.extend(),init:function(j){this.cfg=this.cfg.extend(j),this.reset()},reset:function(){U.reset.call(this),this._doReset()},update:function(j){return this._append(j),this._process(),this},finalize:function(j){j&&this._append(j);var Z=this._doFinalize();return Z},blockSize:16,_createHelper:function(j){return function(Z,Y){return new j.init(Y).finalize(Z)}},_createHmacHelper:function(j){return function(Z,Y){return new V.HMAC.init(j,Y).finalize(Z)}}});var V=y.algo={};return y}(Math);return a})}(core)),core.exports}var x64Core={exports:{}},hasRequiredX64Core;function requireX64Core(){return hasRequiredX64Core||(hasRequiredX64Core=1,function(i,n){(function(a,u){i.exports=u(requireCore())})(commonjsGlobal,function(a){return function(u){var l=a,c=l.lib,S=c.Base,I=c.WordArray,y=l.x64={};y.Word=S.extend({init:function(g,N){this.high=g,this.low=N}}),y.WordArray=S.extend({init:function(g,N){g=this.words=g||[],N!=u?this.sigBytes=N:this.sigBytes=g.length*8},toX32:function(){for(var g=this.words,N=g.length,F=[],H=0;H<N;H++){var G=g[H];F.push(G.high),F.push(G.low)}return I.create(F,this.sigBytes)},clone:function(){for(var g=S.clone.call(this),N=g.words=this.words.slice(0),F=N.length,H=0;H<F;H++)N[H]=N[H].clone();return g}})}(),a})}(x64Core)),x64Core.exports}var libTypedarrays={exports:{}},hasRequiredLibTypedarrays;function requireLibTypedarrays(){return hasRequiredLibTypedarrays||(hasRequiredLibTypedarrays=1,function(i,n){(function(a,u){i.exports=u(requireCore())})(commonjsGlobal,function(a){return function(){if(typeof ArrayBuffer=="function"){var u=a,l=u.lib,c=l.WordArray,S=c.init,I=c.init=function(y){if(y instanceof ArrayBuffer&&(y=new Uint8Array(y)),(y instanceof Int8Array||typeof Uint8ClampedArray<"u"&&y instanceof Uint8ClampedArray||y instanceof Int16Array||y instanceof Uint16Array||y instanceof Int32Array||y instanceof Uint32Array||y instanceof Float32Array||y instanceof Float64Array)&&(y=new Uint8Array(y.buffer,y.byteOffset,y.byteLength)),y instanceof Uint8Array){for(var g=y.byteLength,N=[],F=0;F<g;F++)N[F>>>2]|=y[F]<<24-F%4*8;S.call(this,N,g)}else S.apply(this,arguments)};I.prototype=c}}(),a.lib.WordArray})}(libTypedarrays)),libTypedarrays.exports}var encUtf16={exports:{}},hasRequiredEncUtf16;function requireEncUtf16(){return hasRequiredEncUtf16||(hasRequiredEncUtf16=1,function(i,n){(function(a,u){i.exports=u(requireCore())})(commonjsGlobal,function(a){return function(){var u=a,l=u.lib,c=l.WordArray,S=u.enc;S.Utf16=S.Utf16BE={stringify:function(y){for(var g=y.words,N=y.sigBytes,F=[],H=0;H<N;H+=2){var G=g[H>>>2]>>>16-H%4*8&65535;F.push(String.fromCharCode(G))}return F.join("")},parse:function(y){for(var g=y.length,N=[],F=0;F<g;F++)N[F>>>1]|=y.charCodeAt(F)<<16-F%2*16;return c.create(N,g*2)}},S.Utf16LE={stringify:function(y){for(var g=y.words,N=y.sigBytes,F=[],H=0;H<N;H+=2){var G=I(g[H>>>2]>>>16-H%4*8&65535);F.push(String.fromCharCode(G))}return F.join("")},parse:function(y){for(var g=y.length,N=[],F=0;F<g;F++)N[F>>>1]|=I(y.charCodeAt(F)<<16-F%2*16);return c.create(N,g*2)}};function I(y){return y<<8&4278255360|y>>>8&16711935}}(),a.enc.Utf16})}(encUtf16)),encUtf16.exports}var encBase64={exports:{}},hasRequiredEncBase64;function requireEncBase64(){return hasRequiredEncBase64||(hasRequiredEncBase64=1,function(i,n){(function(a,u){i.exports=u(requireCore())})(commonjsGlobal,function(a){return function(){var u=a,l=u.lib,c=l.WordArray,S=u.enc;S.Base64={stringify:function(y){var g=y.words,N=y.sigBytes,F=this._map;y.clamp();for(var H=[],G=0;G<N;G+=3)for(var q=g[G>>>2]>>>24-G%4*8&255,X=g[G+1>>>2]>>>24-(G+1)%4*8&255,U=g[G+2>>>2]>>>24-(G+2)%4*8&255,V=q<<16|X<<8|U,j=0;j<4&&G+j*.75<N;j++)H.push(F.charAt(V>>>6*(3-j)&63));var Z=F.charAt(64);if(Z)for(;H.length%4;)H.push(Z);return H.join("")},parse:function(y){var g=y.length,N=this._map,F=this._reverseMap;if(!F){F=this._reverseMap=[];for(var H=0;H<N.length;H++)F[N.charCodeAt(H)]=H}var G=N.charAt(64);if(G){var q=y.indexOf(G);q!==-1&&(g=q)}return I(y,g,F)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function I(y,g,N){for(var F=[],H=0,G=0;G<g;G++)if(G%4){var q=N[y.charCodeAt(G-1)]<<G%4*2,X=N[y.charCodeAt(G)]>>>6-G%4*2,U=q|X;F[H>>>2]|=U<<24-H%4*8,H++}return c.create(F,H)}}(),a.enc.Base64})}(encBase64)),encBase64.exports}var encBase64url={exports:{}},hasRequiredEncBase64url;function requireEncBase64url(){return hasRequiredEncBase64url||(hasRequiredEncBase64url=1,function(i,n){(function(a,u){i.exports=u(requireCore())})(commonjsGlobal,function(a){return function(){var u=a,l=u.lib,c=l.WordArray,S=u.enc;S.Base64url={stringify:function(y,g=!0){var N=y.words,F=y.sigBytes,H=g?this._safe_map:this._map;y.clamp();for(var G=[],q=0;q<F;q+=3)for(var X=N[q>>>2]>>>24-q%4*8&255,U=N[q+1>>>2]>>>24-(q+1)%4*8&255,V=N[q+2>>>2]>>>24-(q+2)%4*8&255,j=X<<16|U<<8|V,Z=0;Z<4&&q+Z*.75<F;Z++)G.push(H.charAt(j>>>6*(3-Z)&63));var Y=H.charAt(64);if(Y)for(;G.length%4;)G.push(Y);return G.join("")},parse:function(y,g=!0){var N=y.length,F=g?this._safe_map:this._map,H=this._reverseMap;if(!H){H=this._reverseMap=[];for(var G=0;G<F.length;G++)H[F.charCodeAt(G)]=G}var q=F.charAt(64);if(q){var X=y.indexOf(q);X!==-1&&(N=X)}return I(y,N,H)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function I(y,g,N){for(var F=[],H=0,G=0;G<g;G++)if(G%4){var q=N[y.charCodeAt(G-1)]<<G%4*2,X=N[y.charCodeAt(G)]>>>6-G%4*2,U=q|X;F[H>>>2]|=U<<24-H%4*8,H++}return c.create(F,H)}}(),a.enc.Base64url})}(encBase64url)),encBase64url.exports}var md5={exports:{}},hasRequiredMd5;function requireMd5(){return hasRequiredMd5||(hasRequiredMd5=1,function(i,n){(function(a,u){i.exports=u(requireCore())})(commonjsGlobal,function(a){return function(u){var l=a,c=l.lib,S=c.WordArray,I=c.Hasher,y=l.algo,g=[];(function(){for(var X=0;X<64;X++)g[X]=u.abs(u.sin(X+1))*4294967296|0})();var N=y.MD5=I.extend({_doReset:function(){this._hash=new S.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(X,U){for(var V=0;V<16;V++){var j=U+V,Z=X[j];X[j]=(Z<<8|Z>>>24)&16711935|(Z<<24|Z>>>8)&4278255360}var Y=this._hash.words,rt=X[U+0],nt=X[U+1],M=X[U+2],k=X[U+3],W=X[U+4],Q=X[U+5],d=X[U+6],E=X[U+7],h=X[U+8],b=X[U+9],w=X[U+10],P=X[U+11],L=X[U+12],$=X[U+13],m=X[U+14],B=X[U+15],_=Y[0],x=Y[1],et=Y[2],tt=Y[3];_=F(_,x,et,tt,rt,7,g[0]),tt=F(tt,_,x,et,nt,12,g[1]),et=F(et,tt,_,x,M,17,g[2]),x=F(x,et,tt,_,k,22,g[3]),_=F(_,x,et,tt,W,7,g[4]),tt=F(tt,_,x,et,Q,12,g[5]),et=F(et,tt,_,x,d,17,g[6]),x=F(x,et,tt,_,E,22,g[7]),_=F(_,x,et,tt,h,7,g[8]),tt=F(tt,_,x,et,b,12,g[9]),et=F(et,tt,_,x,w,17,g[10]),x=F(x,et,tt,_,P,22,g[11]),_=F(_,x,et,tt,L,7,g[12]),tt=F(tt,_,x,et,$,12,g[13]),et=F(et,tt,_,x,m,17,g[14]),x=F(x,et,tt,_,B,22,g[15]),_=H(_,x,et,tt,nt,5,g[16]),tt=H(tt,_,x,et,d,9,g[17]),et=H(et,tt,_,x,P,14,g[18]),x=H(x,et,tt,_,rt,20,g[19]),_=H(_,x,et,tt,Q,5,g[20]),tt=H(tt,_,x,et,w,9,g[21]),et=H(et,tt,_,x,B,14,g[22]),x=H(x,et,tt,_,W,20,g[23]),_=H(_,x,et,tt,b,5,g[24]),tt=H(tt,_,x,et,m,9,g[25]),et=H(et,tt,_,x,k,14,g[26]),x=H(x,et,tt,_,h,20,g[27]),_=H(_,x,et,tt,$,5,g[28]),tt=H(tt,_,x,et,M,9,g[29]),et=H(et,tt,_,x,E,14,g[30]),x=H(x,et,tt,_,L,20,g[31]),_=G(_,x,et,tt,Q,4,g[32]),tt=G(tt,_,x,et,h,11,g[33]),et=G(et,tt,_,x,P,16,g[34]),x=G(x,et,tt,_,m,23,g[35]),_=G(_,x,et,tt,nt,4,g[36]),tt=G(tt,_,x,et,W,11,g[37]),et=G(et,tt,_,x,E,16,g[38]),x=G(x,et,tt,_,w,23,g[39]),_=G(_,x,et,tt,$,4,g[40]),tt=G(tt,_,x,et,rt,11,g[41]),et=G(et,tt,_,x,k,16,g[42]),x=G(x,et,tt,_,d,23,g[43]),_=G(_,x,et,tt,b,4,g[44]),tt=G(tt,_,x,et,L,11,g[45]),et=G(et,tt,_,x,B,16,g[46]),x=G(x,et,tt,_,M,23,g[47]),_=q(_,x,et,tt,rt,6,g[48]),tt=q(tt,_,x,et,E,10,g[49]),et=q(et,tt,_,x,m,15,g[50]),x=q(x,et,tt,_,Q,21,g[51]),_=q(_,x,et,tt,L,6,g[52]),tt=q(tt,_,x,et,k,10,g[53]),et=q(et,tt,_,x,w,15,g[54]),x=q(x,et,tt,_,nt,21,g[55]),_=q(_,x,et,tt,h,6,g[56]),tt=q(tt,_,x,et,B,10,g[57]),et=q(et,tt,_,x,d,15,g[58]),x=q(x,et,tt,_,$,21,g[59]),_=q(_,x,et,tt,W,6,g[60]),tt=q(tt,_,x,et,P,10,g[61]),et=q(et,tt,_,x,M,15,g[62]),x=q(x,et,tt,_,b,21,g[63]),Y[0]=Y[0]+_|0,Y[1]=Y[1]+x|0,Y[2]=Y[2]+et|0,Y[3]=Y[3]+tt|0},_doFinalize:function(){var X=this._data,U=X.words,V=this._nDataBytes*8,j=X.sigBytes*8;U[j>>>5]|=128<<24-j%32;var Z=u.floor(V/4294967296),Y=V;U[(j+64>>>9<<4)+15]=(Z<<8|Z>>>24)&16711935|(Z<<24|Z>>>8)&4278255360,U[(j+64>>>9<<4)+14]=(Y<<8|Y>>>24)&16711935|(Y<<24|Y>>>8)&4278255360,X.sigBytes=(U.length+1)*4,this._process();for(var rt=this._hash,nt=rt.words,M=0;M<4;M++){var k=nt[M];nt[M]=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360}return rt},clone:function(){var X=I.clone.call(this);return X._hash=this._hash.clone(),X}});function F(X,U,V,j,Z,Y,rt){var nt=X+(U&V|~U&j)+Z+rt;return(nt<<Y|nt>>>32-Y)+U}function H(X,U,V,j,Z,Y,rt){var nt=X+(U&j|V&~j)+Z+rt;return(nt<<Y|nt>>>32-Y)+U}function G(X,U,V,j,Z,Y,rt){var nt=X+(U^V^j)+Z+rt;return(nt<<Y|nt>>>32-Y)+U}function q(X,U,V,j,Z,Y,rt){var nt=X+(V^(U|~j))+Z+rt;return(nt<<Y|nt>>>32-Y)+U}l.MD5=I._createHelper(N),l.HmacMD5=I._createHmacHelper(N)}(Math),a.MD5})}(md5)),md5.exports}var sha1={exports:{}},hasRequiredSha1;function requireSha1(){return hasRequiredSha1||(hasRequiredSha1=1,function(i,n){(function(a,u){i.exports=u(requireCore())})(commonjsGlobal,function(a){return function(){var u=a,l=u.lib,c=l.WordArray,S=l.Hasher,I=u.algo,y=[],g=I.SHA1=S.extend({_doReset:function(){this._hash=new c.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(N,F){for(var H=this._hash.words,G=H[0],q=H[1],X=H[2],U=H[3],V=H[4],j=0;j<80;j++){if(j<16)y[j]=N[F+j]|0;else{var Z=y[j-3]^y[j-8]^y[j-14]^y[j-16];y[j]=Z<<1|Z>>>31}var Y=(G<<5|G>>>27)+V+y[j];j<20?Y+=(q&X|~q&U)+1518500249:j<40?Y+=(q^X^U)+1859775393:j<60?Y+=(q&X|q&U|X&U)-1894007588:Y+=(q^X^U)-899497514,V=U,U=X,X=q<<30|q>>>2,q=G,G=Y}H[0]=H[0]+G|0,H[1]=H[1]+q|0,H[2]=H[2]+X|0,H[3]=H[3]+U|0,H[4]=H[4]+V|0},_doFinalize:function(){var N=this._data,F=N.words,H=this._nDataBytes*8,G=N.sigBytes*8;return F[G>>>5]|=128<<24-G%32,F[(G+64>>>9<<4)+14]=Math.floor(H/4294967296),F[(G+64>>>9<<4)+15]=H,N.sigBytes=F.length*4,this._process(),this._hash},clone:function(){var N=S.clone.call(this);return N._hash=this._hash.clone(),N}});u.SHA1=S._createHelper(g),u.HmacSHA1=S._createHmacHelper(g)}(),a.SHA1})}(sha1)),sha1.exports}var sha256$1={exports:{}},hasRequiredSha256;function requireSha256(){return hasRequiredSha256||(hasRequiredSha256=1,function(i,n){(function(a,u){i.exports=u(requireCore())})(commonjsGlobal,function(a){return function(u){var l=a,c=l.lib,S=c.WordArray,I=c.Hasher,y=l.algo,g=[],N=[];(function(){function G(V){for(var j=u.sqrt(V),Z=2;Z<=j;Z++)if(!(V%Z))return!1;return!0}function q(V){return(V-(V|0))*4294967296|0}for(var X=2,U=0;U<64;)G(X)&&(U<8&&(g[U]=q(u.pow(X,1/2))),N[U]=q(u.pow(X,1/3)),U++),X++})();var F=[],H=y.SHA256=I.extend({_doReset:function(){this._hash=new S.init(g.slice(0))},_doProcessBlock:function(G,q){for(var X=this._hash.words,U=X[0],V=X[1],j=X[2],Z=X[3],Y=X[4],rt=X[5],nt=X[6],M=X[7],k=0;k<64;k++){if(k<16)F[k]=G[q+k]|0;else{var W=F[k-15],Q=(W<<25|W>>>7)^(W<<14|W>>>18)^W>>>3,d=F[k-2],E=(d<<15|d>>>17)^(d<<13|d>>>19)^d>>>10;F[k]=Q+F[k-7]+E+F[k-16]}var h=Y&rt^~Y&nt,b=U&V^U&j^V&j,w=(U<<30|U>>>2)^(U<<19|U>>>13)^(U<<10|U>>>22),P=(Y<<26|Y>>>6)^(Y<<21|Y>>>11)^(Y<<7|Y>>>25),L=M+P+h+N[k]+F[k],$=w+b;M=nt,nt=rt,rt=Y,Y=Z+L|0,Z=j,j=V,V=U,U=L+$|0}X[0]=X[0]+U|0,X[1]=X[1]+V|0,X[2]=X[2]+j|0,X[3]=X[3]+Z|0,X[4]=X[4]+Y|0,X[5]=X[5]+rt|0,X[6]=X[6]+nt|0,X[7]=X[7]+M|0},_doFinalize:function(){var G=this._data,q=G.words,X=this._nDataBytes*8,U=G.sigBytes*8;return q[U>>>5]|=128<<24-U%32,q[(U+64>>>9<<4)+14]=u.floor(X/4294967296),q[(U+64>>>9<<4)+15]=X,G.sigBytes=q.length*4,this._process(),this._hash},clone:function(){var G=I.clone.call(this);return G._hash=this._hash.clone(),G}});l.SHA256=I._createHelper(H),l.HmacSHA256=I._createHmacHelper(H)}(Math),a.SHA256})}(sha256$1)),sha256$1.exports}var sha224={exports:{}},hasRequiredSha224;function requireSha224(){return hasRequiredSha224||(hasRequiredSha224=1,function(i,n){(function(a,u,l){i.exports=u(requireCore(),requireSha256())})(commonjsGlobal,function(a){return function(){var u=a,l=u.lib,c=l.WordArray,S=u.algo,I=S.SHA256,y=S.SHA224=I.extend({_doReset:function(){this._hash=new c.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var g=I._doFinalize.call(this);return g.sigBytes-=4,g}});u.SHA224=I._createHelper(y),u.HmacSHA224=I._createHmacHelper(y)}(),a.SHA224})}(sha224)),sha224.exports}var sha512={exports:{}},hasRequiredSha512;function requireSha512(){return hasRequiredSha512||(hasRequiredSha512=1,function(i,n){(function(a,u,l){i.exports=u(requireCore(),requireX64Core())})(commonjsGlobal,function(a){return function(){var u=a,l=u.lib,c=l.Hasher,S=u.x64,I=S.Word,y=S.WordArray,g=u.algo;function N(){return I.create.apply(I,arguments)}var F=[N(1116352408,3609767458),N(1899447441,602891725),N(3049323471,3964484399),N(3921009573,2173295548),N(961987163,4081628472),N(1508970993,3053834265),N(2453635748,2937671579),N(2870763221,3664609560),N(3624381080,2734883394),N(310598401,1164996542),N(607225278,1323610764),N(1426881987,3590304994),N(1925078388,4068182383),N(2162078206,991336113),N(2614888103,633803317),N(3248222580,3479774868),N(3835390401,2666613458),N(4022224774,944711139),N(264347078,2341262773),N(604807628,2007800933),N(770255983,1495990901),N(1249150122,1856431235),N(1555081692,3175218132),N(1996064986,2198950837),N(2554220882,3999719339),N(2821834349,766784016),N(2952996808,2566594879),N(3210313671,3203337956),N(3336571891,1034457026),N(3584528711,2466948901),N(113926993,3758326383),N(338241895,168717936),N(666307205,1188179964),N(773529912,1546045734),N(1294757372,1522805485),N(1396182291,2643833823),N(1695183700,2343527390),N(1986661051,1014477480),N(2177026350,1206759142),N(2456956037,344077627),N(2730485921,1290863460),N(2820302411,3158454273),N(3259730800,3505952657),N(3345764771,106217008),N(3516065817,3606008344),N(3600352804,1432725776),N(4094571909,1467031594),N(275423344,851169720),N(430227734,3100823752),N(506948616,1363258195),N(659060556,3750685593),N(883997877,3785050280),N(958139571,3318307427),N(1322822218,3812723403),N(1537002063,2003034995),N(1747873779,3602036899),N(1955562222,1575990012),N(2024104815,1125592928),N(2227730452,2716904306),N(2361852424,442776044),N(2428436474,593698344),N(2756734187,3733110249),N(3204031479,2999351573),N(3329325298,3815920427),N(3391569614,3928383900),N(3515267271,566280711),N(3940187606,3454069534),N(4118630271,4000239992),N(116418474,1914138554),N(174292421,2731055270),N(289380356,3203993006),N(460393269,320620315),N(685471733,587496836),N(852142971,1086792851),N(1017036298,365543100),N(1126000580,2618297676),N(1288033470,3409855158),N(1501505948,4234509866),N(1607167915,987167468),N(1816402316,1246189591)],H=[];(function(){for(var q=0;q<80;q++)H[q]=N()})();var G=g.SHA512=c.extend({_doReset:function(){this._hash=new y.init([new I.init(1779033703,4089235720),new I.init(3144134277,2227873595),new I.init(1013904242,4271175723),new I.init(2773480762,1595750129),new I.init(1359893119,2917565137),new I.init(2600822924,725511199),new I.init(528734635,4215389547),new I.init(1541459225,327033209)])},_doProcessBlock:function(q,X){for(var U=this._hash.words,V=U[0],j=U[1],Z=U[2],Y=U[3],rt=U[4],nt=U[5],M=U[6],k=U[7],W=V.high,Q=V.low,d=j.high,E=j.low,h=Z.high,b=Z.low,w=Y.high,P=Y.low,L=rt.high,$=rt.low,m=nt.high,B=nt.low,_=M.high,x=M.low,et=k.high,tt=k.low,st=W,ht=Q,dt=d,J=E,it=h,ot=b,at=w,ut=P,ct=L,ft=$,$t=m,Lt=B,vt=_,xt=x,Tt=et,mt=tt,Ot=0;Ot<80;Ot++){var Nt,lt,Ct=H[Ot];if(Ot<16)lt=Ct.high=q[X+Ot*2]|0,Nt=Ct.low=q[X+Ot*2+1]|0;else{var kt=H[Ot-15],bt=kt.high,Dt=kt.low,qt=(bt>>>1|Dt<<31)^(bt>>>8|Dt<<24)^bt>>>7,yt=(Dt>>>1|bt<<31)^(Dt>>>8|bt<<24)^(Dt>>>7|bt<<25),Ut=H[Ot-2],Pt=Ut.high,gt=Ut.low,Vt=(Pt>>>19|gt<<13)^(Pt<<3|gt>>>29)^Pt>>>6,Ht=(gt>>>19|Pt<<13)^(gt<<3|Pt>>>29)^(gt>>>6|Pt<<26),_t=H[Ot-7],Jt=_t.high,Zt=_t.low,wt=H[Ot-16],Yt=wt.high,zt=wt.low;Nt=yt+Zt,lt=qt+Jt+(Nt>>>0<yt>>>0?1:0),Nt=Nt+Ht,lt=lt+Vt+(Nt>>>0<Ht>>>0?1:0),Nt=Nt+zt,lt=lt+Yt+(Nt>>>0<zt>>>0?1:0),Ct.high=lt,Ct.low=Nt}var St=ct&$t^~ct&vt,Ft=ft&Lt^~ft&xt,Xt=st&dt^st&it^dt&it,Mt=ht&J^ht&ot^J&ot,Qt=(st>>>28|ht<<4)^(st<<30|ht>>>2)^(st<<25|ht>>>7),Wt=(ht>>>28|st<<4)^(ht<<30|st>>>2)^(ht<<25|st>>>7),At=(ct>>>14|ft<<18)^(ct>>>18|ft<<14)^(ct<<23|ft>>>9),te=(ft>>>14|ct<<18)^(ft>>>18|ct<<14)^(ft<<23|ct>>>9),Gt=F[Ot],Et=Gt.high,jt=Gt.low,Bt=mt+te,pt=Tt+At+(Bt>>>0<mt>>>0?1:0),Bt=Bt+Ft,pt=pt+St+(Bt>>>0<Ft>>>0?1:0),Bt=Bt+jt,pt=pt+Et+(Bt>>>0<jt>>>0?1:0),Bt=Bt+Nt,pt=pt+lt+(Bt>>>0<Nt>>>0?1:0),Kt=Wt+Mt,ee=Qt+Xt+(Kt>>>0<Wt>>>0?1:0);Tt=vt,mt=xt,vt=$t,xt=Lt,$t=ct,Lt=ft,ft=ut+Bt|0,ct=at+pt+(ft>>>0<ut>>>0?1:0)|0,at=it,ut=ot,it=dt,ot=J,dt=st,J=ht,ht=Bt+Kt|0,st=pt+ee+(ht>>>0<Bt>>>0?1:0)|0}Q=V.low=Q+ht,V.high=W+st+(Q>>>0<ht>>>0?1:0),E=j.low=E+J,j.high=d+dt+(E>>>0<J>>>0?1:0),b=Z.low=b+ot,Z.high=h+it+(b>>>0<ot>>>0?1:0),P=Y.low=P+ut,Y.high=w+at+(P>>>0<ut>>>0?1:0),$=rt.low=$+ft,rt.high=L+ct+($>>>0<ft>>>0?1:0),B=nt.low=B+Lt,nt.high=m+$t+(B>>>0<Lt>>>0?1:0),x=M.low=x+xt,M.high=_+vt+(x>>>0<xt>>>0?1:0),tt=k.low=tt+mt,k.high=et+Tt+(tt>>>0<mt>>>0?1:0)},_doFinalize:function(){var q=this._data,X=q.words,U=this._nDataBytes*8,V=q.sigBytes*8;X[V>>>5]|=128<<24-V%32,X[(V+128>>>10<<5)+30]=Math.floor(U/4294967296),X[(V+128>>>10<<5)+31]=U,q.sigBytes=X.length*4,this._process();var j=this._hash.toX32();return j},clone:function(){var q=c.clone.call(this);return q._hash=this._hash.clone(),q},blockSize:1024/32});u.SHA512=c._createHelper(G),u.HmacSHA512=c._createHmacHelper(G)}(),a.SHA512})}(sha512)),sha512.exports}var sha384={exports:{}},hasRequiredSha384;function requireSha384(){return hasRequiredSha384||(hasRequiredSha384=1,function(i,n){(function(a,u,l){i.exports=u(requireCore(),requireX64Core(),requireSha512())})(commonjsGlobal,function(a){return function(){var u=a,l=u.x64,c=l.Word,S=l.WordArray,I=u.algo,y=I.SHA512,g=I.SHA384=y.extend({_doReset:function(){this._hash=new S.init([new c.init(3418070365,3238371032),new c.init(1654270250,914150663),new c.init(2438529370,812702999),new c.init(355462360,4144912697),new c.init(1731405415,4290775857),new c.init(2394180231,1750603025),new c.init(3675008525,1694076839),new c.init(1203062813,3204075428)])},_doFinalize:function(){var N=y._doFinalize.call(this);return N.sigBytes-=16,N}});u.SHA384=y._createHelper(g),u.HmacSHA384=y._createHmacHelper(g)}(),a.SHA384})}(sha384)),sha384.exports}var sha3={exports:{}},hasRequiredSha3;function requireSha3(){return hasRequiredSha3||(hasRequiredSha3=1,function(i,n){(function(a,u,l){i.exports=u(requireCore(),requireX64Core())})(commonjsGlobal,function(a){return function(u){var l=a,c=l.lib,S=c.WordArray,I=c.Hasher,y=l.x64,g=y.Word,N=l.algo,F=[],H=[],G=[];(function(){for(var U=1,V=0,j=0;j<24;j++){F[U+5*V]=(j+1)*(j+2)/2%64;var Z=V%5,Y=(2*U+3*V)%5;U=Z,V=Y}for(var U=0;U<5;U++)for(var V=0;V<5;V++)H[U+5*V]=V+(2*U+3*V)%5*5;for(var rt=1,nt=0;nt<24;nt++){for(var M=0,k=0,W=0;W<7;W++){if(rt&1){var Q=(1<<W)-1;Q<32?k^=1<<Q:M^=1<<Q-32}rt&128?rt=rt<<1^113:rt<<=1}G[nt]=g.create(M,k)}})();var q=[];(function(){for(var U=0;U<25;U++)q[U]=g.create()})();var X=N.SHA3=I.extend({cfg:I.cfg.extend({outputLength:512}),_doReset:function(){for(var U=this._state=[],V=0;V<25;V++)U[V]=new g.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(U,V){for(var j=this._state,Z=this.blockSize/2,Y=0;Y<Z;Y++){var rt=U[V+2*Y],nt=U[V+2*Y+1];rt=(rt<<8|rt>>>24)&16711935|(rt<<24|rt>>>8)&4278255360,nt=(nt<<8|nt>>>24)&16711935|(nt<<24|nt>>>8)&4278255360;var M=j[Y];M.high^=nt,M.low^=rt}for(var k=0;k<24;k++){for(var W=0;W<5;W++){for(var Q=0,d=0,E=0;E<5;E++){var M=j[W+5*E];Q^=M.high,d^=M.low}var h=q[W];h.high=Q,h.low=d}for(var W=0;W<5;W++)for(var b=q[(W+4)%5],w=q[(W+1)%5],P=w.high,L=w.low,Q=b.high^(P<<1|L>>>31),d=b.low^(L<<1|P>>>31),E=0;E<5;E++){var M=j[W+5*E];M.high^=Q,M.low^=d}for(var $=1;$<25;$++){var Q,d,M=j[$],m=M.high,B=M.low,_=F[$];_<32?(Q=m<<_|B>>>32-_,d=B<<_|m>>>32-_):(Q=B<<_-32|m>>>64-_,d=m<<_-32|B>>>64-_);var x=q[H[$]];x.high=Q,x.low=d}var et=q[0],tt=j[0];et.high=tt.high,et.low=tt.low;for(var W=0;W<5;W++)for(var E=0;E<5;E++){var $=W+5*E,M=j[$],st=q[$],ht=q[(W+1)%5+5*E],dt=q[(W+2)%5+5*E];M.high=st.high^~ht.high&dt.high,M.low=st.low^~ht.low&dt.low}var M=j[0],J=G[k];M.high^=J.high,M.low^=J.low}},_doFinalize:function(){var U=this._data,V=U.words;this._nDataBytes*8;var j=U.sigBytes*8,Z=this.blockSize*32;V[j>>>5]|=1<<24-j%32,V[(u.ceil((j+1)/Z)*Z>>>5)-1]|=128,U.sigBytes=V.length*4,this._process();for(var Y=this._state,rt=this.cfg.outputLength/8,nt=rt/8,M=[],k=0;k<nt;k++){var W=Y[k],Q=W.high,d=W.low;Q=(Q<<8|Q>>>24)&16711935|(Q<<24|Q>>>8)&4278255360,d=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360,M.push(d),M.push(Q)}return new S.init(M,rt)},clone:function(){for(var U=I.clone.call(this),V=U._state=this._state.slice(0),j=0;j<25;j++)V[j]=V[j].clone();return U}});l.SHA3=I._createHelper(X),l.HmacSHA3=I._createHmacHelper(X)}(Math),a.SHA3})}(sha3)),sha3.exports}var ripemd160={exports:{}},hasRequiredRipemd160;function requireRipemd160(){return hasRequiredRipemd160||(hasRequiredRipemd160=1,function(i,n){(function(a,u){i.exports=u(requireCore())})(commonjsGlobal,function(a){/** @preserve
|
|
2
|
-
(c) 2012 by Cédric Mesnil. All rights reserved.
|
|
3
|
-
|
|
4
|
-
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
5
|
-
|
|
6
|
-
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
7
|
-
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
8
|
-
|
|
9
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
10
|
-
*/return function(u){var l=a,c=l.lib,S=c.WordArray,I=c.Hasher,y=l.algo,g=S.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),N=S.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),F=S.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),H=S.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),G=S.create([0,1518500249,1859775393,2400959708,2840853838]),q=S.create([1352829926,1548603684,1836072691,2053994217,0]),X=y.RIPEMD160=I.extend({_doReset:function(){this._hash=S.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(nt,M){for(var k=0;k<16;k++){var W=M+k,Q=nt[W];nt[W]=(Q<<8|Q>>>24)&16711935|(Q<<24|Q>>>8)&4278255360}var d=this._hash.words,E=G.words,h=q.words,b=g.words,w=N.words,P=F.words,L=H.words,$,m,B,_,x,et,tt,st,ht,dt;et=$=d[0],tt=m=d[1],st=B=d[2],ht=_=d[3],dt=x=d[4];for(var J,k=0;k<80;k+=1)J=$+nt[M+b[k]]|0,k<16?J+=U(m,B,_)+E[0]:k<32?J+=V(m,B,_)+E[1]:k<48?J+=j(m,B,_)+E[2]:k<64?J+=Z(m,B,_)+E[3]:J+=Y(m,B,_)+E[4],J=J|0,J=rt(J,P[k]),J=J+x|0,$=x,x=_,_=rt(B,10),B=m,m=J,J=et+nt[M+w[k]]|0,k<16?J+=Y(tt,st,ht)+h[0]:k<32?J+=Z(tt,st,ht)+h[1]:k<48?J+=j(tt,st,ht)+h[2]:k<64?J+=V(tt,st,ht)+h[3]:J+=U(tt,st,ht)+h[4],J=J|0,J=rt(J,L[k]),J=J+dt|0,et=dt,dt=ht,ht=rt(st,10),st=tt,tt=J;J=d[1]+B+ht|0,d[1]=d[2]+_+dt|0,d[2]=d[3]+x+et|0,d[3]=d[4]+$+tt|0,d[4]=d[0]+m+st|0,d[0]=J},_doFinalize:function(){var nt=this._data,M=nt.words,k=this._nDataBytes*8,W=nt.sigBytes*8;M[W>>>5]|=128<<24-W%32,M[(W+64>>>9<<4)+14]=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360,nt.sigBytes=(M.length+1)*4,this._process();for(var Q=this._hash,d=Q.words,E=0;E<5;E++){var h=d[E];d[E]=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360}return Q},clone:function(){var nt=I.clone.call(this);return nt._hash=this._hash.clone(),nt}});function U(nt,M,k){return nt^M^k}function V(nt,M,k){return nt&M|~nt&k}function j(nt,M,k){return(nt|~M)^k}function Z(nt,M,k){return nt&k|M&~k}function Y(nt,M,k){return nt^(M|~k)}function rt(nt,M){return nt<<M|nt>>>32-M}l.RIPEMD160=I._createHelper(X),l.HmacRIPEMD160=I._createHmacHelper(X)}(),a.RIPEMD160})}(ripemd160)),ripemd160.exports}var hmac={exports:{}},hasRequiredHmac;function requireHmac(){return hasRequiredHmac||(hasRequiredHmac=1,function(i,n){(function(a,u){i.exports=u(requireCore())})(commonjsGlobal,function(a){(function(){var u=a,l=u.lib,c=l.Base,S=u.enc,I=S.Utf8,y=u.algo;y.HMAC=c.extend({init:function(g,N){g=this._hasher=new g.init,typeof N=="string"&&(N=I.parse(N));var F=g.blockSize,H=F*4;N.sigBytes>H&&(N=g.finalize(N)),N.clamp();for(var G=this._oKey=N.clone(),q=this._iKey=N.clone(),X=G.words,U=q.words,V=0;V<F;V++)X[V]^=1549556828,U[V]^=909522486;G.sigBytes=q.sigBytes=H,this.reset()},reset:function(){var g=this._hasher;g.reset(),g.update(this._iKey)},update:function(g){return this._hasher.update(g),this},finalize:function(g){var N=this._hasher,F=N.finalize(g);N.reset();var H=N.finalize(this._oKey.clone().concat(F));return H}})})()})}(hmac)),hmac.exports}var pbkdf2={exports:{}},hasRequiredPbkdf2;function requirePbkdf2(){return hasRequiredPbkdf2||(hasRequiredPbkdf2=1,function(i,n){(function(a,u,l){i.exports=u(requireCore(),requireSha1(),requireHmac())})(commonjsGlobal,function(a){return function(){var u=a,l=u.lib,c=l.Base,S=l.WordArray,I=u.algo,y=I.SHA1,g=I.HMAC,N=I.PBKDF2=c.extend({cfg:c.extend({keySize:128/32,hasher:y,iterations:1}),init:function(F){this.cfg=this.cfg.extend(F)},compute:function(F,H){for(var G=this.cfg,q=g.create(G.hasher,F),X=S.create(),U=S.create([1]),V=X.words,j=U.words,Z=G.keySize,Y=G.iterations;V.length<Z;){var rt=q.update(H).finalize(U);q.reset();for(var nt=rt.words,M=nt.length,k=rt,W=1;W<Y;W++){k=q.finalize(k),q.reset();for(var Q=k.words,d=0;d<M;d++)nt[d]^=Q[d]}X.concat(rt),j[0]++}return X.sigBytes=Z*4,X}});u.PBKDF2=function(F,H,G){return N.create(G).compute(F,H)}}(),a.PBKDF2})}(pbkdf2)),pbkdf2.exports}var evpkdf={exports:{}},hasRequiredEvpkdf;function requireEvpkdf(){return hasRequiredEvpkdf||(hasRequiredEvpkdf=1,function(i,n){(function(a,u,l){i.exports=u(requireCore(),requireSha1(),requireHmac())})(commonjsGlobal,function(a){return function(){var u=a,l=u.lib,c=l.Base,S=l.WordArray,I=u.algo,y=I.MD5,g=I.EvpKDF=c.extend({cfg:c.extend({keySize:128/32,hasher:y,iterations:1}),init:function(N){this.cfg=this.cfg.extend(N)},compute:function(N,F){for(var H,G=this.cfg,q=G.hasher.create(),X=S.create(),U=X.words,V=G.keySize,j=G.iterations;U.length<V;){H&&q.update(H),H=q.update(N).finalize(F),q.reset();for(var Z=1;Z<j;Z++)H=q.finalize(H),q.reset();X.concat(H)}return X.sigBytes=V*4,X}});u.EvpKDF=function(N,F,H){return g.create(H).compute(N,F)}}(),a.EvpKDF})}(evpkdf)),evpkdf.exports}var cipherCore={exports:{}},hasRequiredCipherCore;function requireCipherCore(){return hasRequiredCipherCore||(hasRequiredCipherCore=1,function(i,n){(function(a,u,l){i.exports=u(requireCore(),requireEvpkdf())})(commonjsGlobal,function(a){a.lib.Cipher||function(u){var l=a,c=l.lib,S=c.Base,I=c.WordArray,y=c.BufferedBlockAlgorithm,g=l.enc;g.Utf8;var N=g.Base64,F=l.algo,H=F.EvpKDF,G=c.Cipher=y.extend({cfg:S.extend(),createEncryptor:function(Q,d){return this.create(this._ENC_XFORM_MODE,Q,d)},createDecryptor:function(Q,d){return this.create(this._DEC_XFORM_MODE,Q,d)},init:function(Q,d,E){this.cfg=this.cfg.extend(E),this._xformMode=Q,this._key=d,this.reset()},reset:function(){y.reset.call(this),this._doReset()},process:function(Q){return this._append(Q),this._process()},finalize:function(Q){Q&&this._append(Q);var d=this._doFinalize();return d},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function Q(d){return typeof d=="string"?W:nt}return function(d){return{encrypt:function(E,h,b){return Q(h).encrypt(d,E,h,b)},decrypt:function(E,h,b){return Q(h).decrypt(d,E,h,b)}}}}()});c.StreamCipher=G.extend({_doFinalize:function(){var Q=this._process(!0);return Q},blockSize:1});var q=l.mode={},X=c.BlockCipherMode=S.extend({createEncryptor:function(Q,d){return this.Encryptor.create(Q,d)},createDecryptor:function(Q,d){return this.Decryptor.create(Q,d)},init:function(Q,d){this._cipher=Q,this._iv=d}}),U=q.CBC=function(){var Q=X.extend();Q.Encryptor=Q.extend({processBlock:function(E,h){var b=this._cipher,w=b.blockSize;d.call(this,E,h,w),b.encryptBlock(E,h),this._prevBlock=E.slice(h,h+w)}}),Q.Decryptor=Q.extend({processBlock:function(E,h){var b=this._cipher,w=b.blockSize,P=E.slice(h,h+w);b.decryptBlock(E,h),d.call(this,E,h,w),this._prevBlock=P}});function d(E,h,b){var w,P=this._iv;P?(w=P,this._iv=u):w=this._prevBlock;for(var L=0;L<b;L++)E[h+L]^=w[L]}return Q}(),V=l.pad={},j=V.Pkcs7={pad:function(Q,d){for(var E=d*4,h=E-Q.sigBytes%E,b=h<<24|h<<16|h<<8|h,w=[],P=0;P<h;P+=4)w.push(b);var L=I.create(w,h);Q.concat(L)},unpad:function(Q){var d=Q.words[Q.sigBytes-1>>>2]&255;Q.sigBytes-=d}};c.BlockCipher=G.extend({cfg:G.cfg.extend({mode:U,padding:j}),reset:function(){var Q;G.reset.call(this);var d=this.cfg,E=d.iv,h=d.mode;this._xformMode==this._ENC_XFORM_MODE?Q=h.createEncryptor:(Q=h.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==Q?this._mode.init(this,E&&E.words):(this._mode=Q.call(h,this,E&&E.words),this._mode.__creator=Q)},_doProcessBlock:function(Q,d){this._mode.processBlock(Q,d)},_doFinalize:function(){var Q,d=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(d.pad(this._data,this.blockSize),Q=this._process(!0)):(Q=this._process(!0),d.unpad(Q)),Q},blockSize:128/32});var Z=c.CipherParams=S.extend({init:function(Q){this.mixIn(Q)},toString:function(Q){return(Q||this.formatter).stringify(this)}}),Y=l.format={},rt=Y.OpenSSL={stringify:function(Q){var d,E=Q.ciphertext,h=Q.salt;return h?d=I.create([1398893684,1701076831]).concat(h).concat(E):d=E,d.toString(N)},parse:function(Q){var d,E=N.parse(Q),h=E.words;return h[0]==1398893684&&h[1]==1701076831&&(d=I.create(h.slice(2,4)),h.splice(0,4),E.sigBytes-=16),Z.create({ciphertext:E,salt:d})}},nt=c.SerializableCipher=S.extend({cfg:S.extend({format:rt}),encrypt:function(Q,d,E,h){h=this.cfg.extend(h);var b=Q.createEncryptor(E,h),w=b.finalize(d),P=b.cfg;return Z.create({ciphertext:w,key:E,iv:P.iv,algorithm:Q,mode:P.mode,padding:P.padding,blockSize:Q.blockSize,formatter:h.format})},decrypt:function(Q,d,E,h){h=this.cfg.extend(h),d=this._parse(d,h.format);var b=Q.createDecryptor(E,h).finalize(d.ciphertext);return b},_parse:function(Q,d){return typeof Q=="string"?d.parse(Q,this):Q}}),M=l.kdf={},k=M.OpenSSL={execute:function(Q,d,E,h){h||(h=I.random(64/8));var b=H.create({keySize:d+E}).compute(Q,h),w=I.create(b.words.slice(d),E*4);return b.sigBytes=d*4,Z.create({key:b,iv:w,salt:h})}},W=c.PasswordBasedCipher=nt.extend({cfg:nt.cfg.extend({kdf:k}),encrypt:function(Q,d,E,h){h=this.cfg.extend(h);var b=h.kdf.execute(E,Q.keySize,Q.ivSize);h.iv=b.iv;var w=nt.encrypt.call(this,Q,d,b.key,h);return w.mixIn(b),w},decrypt:function(Q,d,E,h){h=this.cfg.extend(h),d=this._parse(d,h.format);var b=h.kdf.execute(E,Q.keySize,Q.ivSize,d.salt);h.iv=b.iv;var w=nt.decrypt.call(this,Q,d,b.key,h);return w}})}()})}(cipherCore)),cipherCore.exports}var modeCfb={exports:{}},hasRequiredModeCfb;function requireModeCfb(){return hasRequiredModeCfb||(hasRequiredModeCfb=1,function(i,n){(function(a,u,l){i.exports=u(requireCore(),requireCipherCore())})(commonjsGlobal,function(a){return a.mode.CFB=function(){var u=a.lib.BlockCipherMode.extend();u.Encryptor=u.extend({processBlock:function(c,S){var I=this._cipher,y=I.blockSize;l.call(this,c,S,y,I),this._prevBlock=c.slice(S,S+y)}}),u.Decryptor=u.extend({processBlock:function(c,S){var I=this._cipher,y=I.blockSize,g=c.slice(S,S+y);l.call(this,c,S,y,I),this._prevBlock=g}});function l(c,S,I,y){var g,N=this._iv;N?(g=N.slice(0),this._iv=void 0):g=this._prevBlock,y.encryptBlock(g,0);for(var F=0;F<I;F++)c[S+F]^=g[F]}return u}(),a.mode.CFB})}(modeCfb)),modeCfb.exports}var modeCtr={exports:{}},hasRequiredModeCtr;function requireModeCtr(){return hasRequiredModeCtr||(hasRequiredModeCtr=1,function(i,n){(function(a,u,l){i.exports=u(requireCore(),requireCipherCore())})(commonjsGlobal,function(a){return a.mode.CTR=function(){var u=a.lib.BlockCipherMode.extend(),l=u.Encryptor=u.extend({processBlock:function(c,S){var I=this._cipher,y=I.blockSize,g=this._iv,N=this._counter;g&&(N=this._counter=g.slice(0),this._iv=void 0);var F=N.slice(0);I.encryptBlock(F,0),N[y-1]=N[y-1]+1|0;for(var H=0;H<y;H++)c[S+H]^=F[H]}});return u.Decryptor=l,u}(),a.mode.CTR})}(modeCtr)),modeCtr.exports}var modeCtrGladman={exports:{}},hasRequiredModeCtrGladman;function requireModeCtrGladman(){return hasRequiredModeCtrGladman||(hasRequiredModeCtrGladman=1,function(i,n){(function(a,u,l){i.exports=u(requireCore(),requireCipherCore())})(commonjsGlobal,function(a){/** @preserve
|
|
11
|
-
* Counter block mode compatible with Dr Brian Gladman fileenc.c
|
|
12
|
-
* derived from CryptoJS.mode.CTR
|
|
13
|
-
* Jan Hruby jhruby.web@gmail.com
|
|
14
|
-
*/return a.mode.CTRGladman=function(){var u=a.lib.BlockCipherMode.extend();function l(I){if((I>>24&255)===255){var y=I>>16&255,g=I>>8&255,N=I&255;y===255?(y=0,g===255?(g=0,N===255?N=0:++N):++g):++y,I=0,I+=y<<16,I+=g<<8,I+=N}else I+=1<<24;return I}function c(I){return(I[0]=l(I[0]))===0&&(I[1]=l(I[1])),I}var S=u.Encryptor=u.extend({processBlock:function(I,y){var g=this._cipher,N=g.blockSize,F=this._iv,H=this._counter;F&&(H=this._counter=F.slice(0),this._iv=void 0),c(H);var G=H.slice(0);g.encryptBlock(G,0);for(var q=0;q<N;q++)I[y+q]^=G[q]}});return u.Decryptor=S,u}(),a.mode.CTRGladman})}(modeCtrGladman)),modeCtrGladman.exports}var modeOfb={exports:{}},hasRequiredModeOfb;function requireModeOfb(){return hasRequiredModeOfb||(hasRequiredModeOfb=1,function(i,n){(function(a,u,l){i.exports=u(requireCore(),requireCipherCore())})(commonjsGlobal,function(a){return a.mode.OFB=function(){var u=a.lib.BlockCipherMode.extend(),l=u.Encryptor=u.extend({processBlock:function(c,S){var I=this._cipher,y=I.blockSize,g=this._iv,N=this._keystream;g&&(N=this._keystream=g.slice(0),this._iv=void 0),I.encryptBlock(N,0);for(var F=0;F<y;F++)c[S+F]^=N[F]}});return u.Decryptor=l,u}(),a.mode.OFB})}(modeOfb)),modeOfb.exports}var modeEcb={exports:{}},hasRequiredModeEcb;function requireModeEcb(){return hasRequiredModeEcb||(hasRequiredModeEcb=1,function(i,n){(function(a,u,l){i.exports=u(requireCore(),requireCipherCore())})(commonjsGlobal,function(a){return a.mode.ECB=function(){var u=a.lib.BlockCipherMode.extend();return u.Encryptor=u.extend({processBlock:function(l,c){this._cipher.encryptBlock(l,c)}}),u.Decryptor=u.extend({processBlock:function(l,c){this._cipher.decryptBlock(l,c)}}),u}(),a.mode.ECB})}(modeEcb)),modeEcb.exports}var padAnsix923={exports:{}},hasRequiredPadAnsix923;function requirePadAnsix923(){return hasRequiredPadAnsix923||(hasRequiredPadAnsix923=1,function(i,n){(function(a,u,l){i.exports=u(requireCore(),requireCipherCore())})(commonjsGlobal,function(a){return a.pad.AnsiX923={pad:function(u,l){var c=u.sigBytes,S=l*4,I=S-c%S,y=c+I-1;u.clamp(),u.words[y>>>2]|=I<<24-y%4*8,u.sigBytes+=I},unpad:function(u){var l=u.words[u.sigBytes-1>>>2]&255;u.sigBytes-=l}},a.pad.Ansix923})}(padAnsix923)),padAnsix923.exports}var padIso10126={exports:{}},hasRequiredPadIso10126;function requirePadIso10126(){return hasRequiredPadIso10126||(hasRequiredPadIso10126=1,function(i,n){(function(a,u,l){i.exports=u(requireCore(),requireCipherCore())})(commonjsGlobal,function(a){return a.pad.Iso10126={pad:function(u,l){var c=l*4,S=c-u.sigBytes%c;u.concat(a.lib.WordArray.random(S-1)).concat(a.lib.WordArray.create([S<<24],1))},unpad:function(u){var l=u.words[u.sigBytes-1>>>2]&255;u.sigBytes-=l}},a.pad.Iso10126})}(padIso10126)),padIso10126.exports}var padIso97971={exports:{}},hasRequiredPadIso97971;function requirePadIso97971(){return hasRequiredPadIso97971||(hasRequiredPadIso97971=1,function(i,n){(function(a,u,l){i.exports=u(requireCore(),requireCipherCore())})(commonjsGlobal,function(a){return a.pad.Iso97971={pad:function(u,l){u.concat(a.lib.WordArray.create([2147483648],1)),a.pad.ZeroPadding.pad(u,l)},unpad:function(u){a.pad.ZeroPadding.unpad(u),u.sigBytes--}},a.pad.Iso97971})}(padIso97971)),padIso97971.exports}var padZeropadding={exports:{}},hasRequiredPadZeropadding;function requirePadZeropadding(){return hasRequiredPadZeropadding||(hasRequiredPadZeropadding=1,function(i,n){(function(a,u,l){i.exports=u(requireCore(),requireCipherCore())})(commonjsGlobal,function(a){return a.pad.ZeroPadding={pad:function(u,l){var c=l*4;u.clamp(),u.sigBytes+=c-(u.sigBytes%c||c)},unpad:function(u){for(var l=u.words,c=u.sigBytes-1,c=u.sigBytes-1;c>=0;c--)if(l[c>>>2]>>>24-c%4*8&255){u.sigBytes=c+1;break}}},a.pad.ZeroPadding})}(padZeropadding)),padZeropadding.exports}var padNopadding={exports:{}},hasRequiredPadNopadding;function requirePadNopadding(){return hasRequiredPadNopadding||(hasRequiredPadNopadding=1,function(i,n){(function(a,u,l){i.exports=u(requireCore(),requireCipherCore())})(commonjsGlobal,function(a){return a.pad.NoPadding={pad:function(){},unpad:function(){}},a.pad.NoPadding})}(padNopadding)),padNopadding.exports}var formatHex={exports:{}},hasRequiredFormatHex;function requireFormatHex(){return hasRequiredFormatHex||(hasRequiredFormatHex=1,function(i,n){(function(a,u,l){i.exports=u(requireCore(),requireCipherCore())})(commonjsGlobal,function(a){return function(u){var l=a,c=l.lib,S=c.CipherParams,I=l.enc,y=I.Hex,g=l.format;g.Hex={stringify:function(N){return N.ciphertext.toString(y)},parse:function(N){var F=y.parse(N);return S.create({ciphertext:F})}}}(),a.format.Hex})}(formatHex)),formatHex.exports}var aes={exports:{}},hasRequiredAes;function requireAes(){return hasRequiredAes||(hasRequiredAes=1,function(i,n){(function(a,u,l){i.exports=u(requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore())})(commonjsGlobal,function(a){return function(){var u=a,l=u.lib,c=l.BlockCipher,S=u.algo,I=[],y=[],g=[],N=[],F=[],H=[],G=[],q=[],X=[],U=[];(function(){for(var Z=[],Y=0;Y<256;Y++)Y<128?Z[Y]=Y<<1:Z[Y]=Y<<1^283;for(var rt=0,nt=0,Y=0;Y<256;Y++){var M=nt^nt<<1^nt<<2^nt<<3^nt<<4;M=M>>>8^M&255^99,I[rt]=M,y[M]=rt;var k=Z[rt],W=Z[k],Q=Z[W],d=Z[M]*257^M*16843008;g[rt]=d<<24|d>>>8,N[rt]=d<<16|d>>>16,F[rt]=d<<8|d>>>24,H[rt]=d;var d=Q*16843009^W*65537^k*257^rt*16843008;G[M]=d<<24|d>>>8,q[M]=d<<16|d>>>16,X[M]=d<<8|d>>>24,U[M]=d,rt?(rt=k^Z[Z[Z[Q^k]]],nt^=Z[Z[nt]]):rt=nt=1}})();var V=[0,1,2,4,8,16,32,64,128,27,54],j=S.AES=c.extend({_doReset:function(){var Z;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var Y=this._keyPriorReset=this._key,rt=Y.words,nt=Y.sigBytes/4,M=this._nRounds=nt+6,k=(M+1)*4,W=this._keySchedule=[],Q=0;Q<k;Q++)Q<nt?W[Q]=rt[Q]:(Z=W[Q-1],Q%nt?nt>6&&Q%nt==4&&(Z=I[Z>>>24]<<24|I[Z>>>16&255]<<16|I[Z>>>8&255]<<8|I[Z&255]):(Z=Z<<8|Z>>>24,Z=I[Z>>>24]<<24|I[Z>>>16&255]<<16|I[Z>>>8&255]<<8|I[Z&255],Z^=V[Q/nt|0]<<24),W[Q]=W[Q-nt]^Z);for(var d=this._invKeySchedule=[],E=0;E<k;E++){var Q=k-E;if(E%4)var Z=W[Q];else var Z=W[Q-4];E<4||Q<=4?d[E]=Z:d[E]=G[I[Z>>>24]]^q[I[Z>>>16&255]]^X[I[Z>>>8&255]]^U[I[Z&255]]}}},encryptBlock:function(Z,Y){this._doCryptBlock(Z,Y,this._keySchedule,g,N,F,H,I)},decryptBlock:function(Z,Y){var rt=Z[Y+1];Z[Y+1]=Z[Y+3],Z[Y+3]=rt,this._doCryptBlock(Z,Y,this._invKeySchedule,G,q,X,U,y);var rt=Z[Y+1];Z[Y+1]=Z[Y+3],Z[Y+3]=rt},_doCryptBlock:function(Z,Y,rt,nt,M,k,W,Q){for(var d=this._nRounds,E=Z[Y]^rt[0],h=Z[Y+1]^rt[1],b=Z[Y+2]^rt[2],w=Z[Y+3]^rt[3],P=4,L=1;L<d;L++){var $=nt[E>>>24]^M[h>>>16&255]^k[b>>>8&255]^W[w&255]^rt[P++],m=nt[h>>>24]^M[b>>>16&255]^k[w>>>8&255]^W[E&255]^rt[P++],B=nt[b>>>24]^M[w>>>16&255]^k[E>>>8&255]^W[h&255]^rt[P++],_=nt[w>>>24]^M[E>>>16&255]^k[h>>>8&255]^W[b&255]^rt[P++];E=$,h=m,b=B,w=_}var $=(Q[E>>>24]<<24|Q[h>>>16&255]<<16|Q[b>>>8&255]<<8|Q[w&255])^rt[P++],m=(Q[h>>>24]<<24|Q[b>>>16&255]<<16|Q[w>>>8&255]<<8|Q[E&255])^rt[P++],B=(Q[b>>>24]<<24|Q[w>>>16&255]<<16|Q[E>>>8&255]<<8|Q[h&255])^rt[P++],_=(Q[w>>>24]<<24|Q[E>>>16&255]<<16|Q[h>>>8&255]<<8|Q[b&255])^rt[P++];Z[Y]=$,Z[Y+1]=m,Z[Y+2]=B,Z[Y+3]=_},keySize:256/32});u.AES=c._createHelper(j)}(),a.AES})}(aes)),aes.exports}var tripledes={exports:{}},hasRequiredTripledes;function requireTripledes(){return hasRequiredTripledes||(hasRequiredTripledes=1,function(i,n){(function(a,u,l){i.exports=u(requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore())})(commonjsGlobal,function(a){return function(){var u=a,l=u.lib,c=l.WordArray,S=l.BlockCipher,I=u.algo,y=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],g=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],N=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],F=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],H=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],G=I.DES=S.extend({_doReset:function(){for(var V=this._key,j=V.words,Z=[],Y=0;Y<56;Y++){var rt=y[Y]-1;Z[Y]=j[rt>>>5]>>>31-rt%32&1}for(var nt=this._subKeys=[],M=0;M<16;M++){for(var k=nt[M]=[],W=N[M],Y=0;Y<24;Y++)k[Y/6|0]|=Z[(g[Y]-1+W)%28]<<31-Y%6,k[4+(Y/6|0)]|=Z[28+(g[Y+24]-1+W)%28]<<31-Y%6;k[0]=k[0]<<1|k[0]>>>31;for(var Y=1;Y<7;Y++)k[Y]=k[Y]>>>(Y-1)*4+3;k[7]=k[7]<<5|k[7]>>>27}for(var Q=this._invSubKeys=[],Y=0;Y<16;Y++)Q[Y]=nt[15-Y]},encryptBlock:function(V,j){this._doCryptBlock(V,j,this._subKeys)},decryptBlock:function(V,j){this._doCryptBlock(V,j,this._invSubKeys)},_doCryptBlock:function(V,j,Z){this._lBlock=V[j],this._rBlock=V[j+1],q.call(this,4,252645135),q.call(this,16,65535),X.call(this,2,858993459),X.call(this,8,16711935),q.call(this,1,1431655765);for(var Y=0;Y<16;Y++){for(var rt=Z[Y],nt=this._lBlock,M=this._rBlock,k=0,W=0;W<8;W++)k|=F[W][((M^rt[W])&H[W])>>>0];this._lBlock=M,this._rBlock=nt^k}var Q=this._lBlock;this._lBlock=this._rBlock,this._rBlock=Q,q.call(this,1,1431655765),X.call(this,8,16711935),X.call(this,2,858993459),q.call(this,16,65535),q.call(this,4,252645135),V[j]=this._lBlock,V[j+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function q(V,j){var Z=(this._lBlock>>>V^this._rBlock)&j;this._rBlock^=Z,this._lBlock^=Z<<V}function X(V,j){var Z=(this._rBlock>>>V^this._lBlock)&j;this._lBlock^=Z,this._rBlock^=Z<<V}u.DES=S._createHelper(G);var U=I.TripleDES=S.extend({_doReset:function(){var V=this._key,j=V.words;if(j.length!==2&&j.length!==4&&j.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var Z=j.slice(0,2),Y=j.length<4?j.slice(0,2):j.slice(2,4),rt=j.length<6?j.slice(0,2):j.slice(4,6);this._des1=G.createEncryptor(c.create(Z)),this._des2=G.createEncryptor(c.create(Y)),this._des3=G.createEncryptor(c.create(rt))},encryptBlock:function(V,j){this._des1.encryptBlock(V,j),this._des2.decryptBlock(V,j),this._des3.encryptBlock(V,j)},decryptBlock:function(V,j){this._des3.decryptBlock(V,j),this._des2.encryptBlock(V,j),this._des1.decryptBlock(V,j)},keySize:192/32,ivSize:64/32,blockSize:64/32});u.TripleDES=S._createHelper(U)}(),a.TripleDES})}(tripledes)),tripledes.exports}var rc4={exports:{}},hasRequiredRc4;function requireRc4(){return hasRequiredRc4||(hasRequiredRc4=1,function(i,n){(function(a,u,l){i.exports=u(requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore())})(commonjsGlobal,function(a){return function(){var u=a,l=u.lib,c=l.StreamCipher,S=u.algo,I=S.RC4=c.extend({_doReset:function(){for(var N=this._key,F=N.words,H=N.sigBytes,G=this._S=[],q=0;q<256;q++)G[q]=q;for(var q=0,X=0;q<256;q++){var U=q%H,V=F[U>>>2]>>>24-U%4*8&255;X=(X+G[q]+V)%256;var j=G[q];G[q]=G[X],G[X]=j}this._i=this._j=0},_doProcessBlock:function(N,F){N[F]^=y.call(this)},keySize:256/32,ivSize:0});function y(){for(var N=this._S,F=this._i,H=this._j,G=0,q=0;q<4;q++){F=(F+1)%256,H=(H+N[F])%256;var X=N[F];N[F]=N[H],N[H]=X,G|=N[(N[F]+N[H])%256]<<24-q*8}return this._i=F,this._j=H,G}u.RC4=c._createHelper(I);var g=S.RC4Drop=I.extend({cfg:I.cfg.extend({drop:192}),_doReset:function(){I._doReset.call(this);for(var N=this.cfg.drop;N>0;N--)y.call(this)}});u.RC4Drop=c._createHelper(g)}(),a.RC4})}(rc4)),rc4.exports}var rabbit={exports:{}},hasRequiredRabbit;function requireRabbit(){return hasRequiredRabbit||(hasRequiredRabbit=1,function(i,n){(function(a,u,l){i.exports=u(requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore())})(commonjsGlobal,function(a){return function(){var u=a,l=u.lib,c=l.StreamCipher,S=u.algo,I=[],y=[],g=[],N=S.Rabbit=c.extend({_doReset:function(){for(var H=this._key.words,G=this.cfg.iv,q=0;q<4;q++)H[q]=(H[q]<<8|H[q]>>>24)&16711935|(H[q]<<24|H[q]>>>8)&4278255360;var X=this._X=[H[0],H[3]<<16|H[2]>>>16,H[1],H[0]<<16|H[3]>>>16,H[2],H[1]<<16|H[0]>>>16,H[3],H[2]<<16|H[1]>>>16],U=this._C=[H[2]<<16|H[2]>>>16,H[0]&4294901760|H[1]&65535,H[3]<<16|H[3]>>>16,H[1]&4294901760|H[2]&65535,H[0]<<16|H[0]>>>16,H[2]&4294901760|H[3]&65535,H[1]<<16|H[1]>>>16,H[3]&4294901760|H[0]&65535];this._b=0;for(var q=0;q<4;q++)F.call(this);for(var q=0;q<8;q++)U[q]^=X[q+4&7];if(G){var V=G.words,j=V[0],Z=V[1],Y=(j<<8|j>>>24)&16711935|(j<<24|j>>>8)&4278255360,rt=(Z<<8|Z>>>24)&16711935|(Z<<24|Z>>>8)&4278255360,nt=Y>>>16|rt&4294901760,M=rt<<16|Y&65535;U[0]^=Y,U[1]^=nt,U[2]^=rt,U[3]^=M,U[4]^=Y,U[5]^=nt,U[6]^=rt,U[7]^=M;for(var q=0;q<4;q++)F.call(this)}},_doProcessBlock:function(H,G){var q=this._X;F.call(this),I[0]=q[0]^q[5]>>>16^q[3]<<16,I[1]=q[2]^q[7]>>>16^q[5]<<16,I[2]=q[4]^q[1]>>>16^q[7]<<16,I[3]=q[6]^q[3]>>>16^q[1]<<16;for(var X=0;X<4;X++)I[X]=(I[X]<<8|I[X]>>>24)&16711935|(I[X]<<24|I[X]>>>8)&4278255360,H[G+X]^=I[X]},blockSize:128/32,ivSize:64/32});function F(){for(var H=this._X,G=this._C,q=0;q<8;q++)y[q]=G[q];G[0]=G[0]+1295307597+this._b|0,G[1]=G[1]+3545052371+(G[0]>>>0<y[0]>>>0?1:0)|0,G[2]=G[2]+886263092+(G[1]>>>0<y[1]>>>0?1:0)|0,G[3]=G[3]+1295307597+(G[2]>>>0<y[2]>>>0?1:0)|0,G[4]=G[4]+3545052371+(G[3]>>>0<y[3]>>>0?1:0)|0,G[5]=G[5]+886263092+(G[4]>>>0<y[4]>>>0?1:0)|0,G[6]=G[6]+1295307597+(G[5]>>>0<y[5]>>>0?1:0)|0,G[7]=G[7]+3545052371+(G[6]>>>0<y[6]>>>0?1:0)|0,this._b=G[7]>>>0<y[7]>>>0?1:0;for(var q=0;q<8;q++){var X=H[q]+G[q],U=X&65535,V=X>>>16,j=((U*U>>>17)+U*V>>>15)+V*V,Z=((X&4294901760)*X|0)+((X&65535)*X|0);g[q]=j^Z}H[0]=g[0]+(g[7]<<16|g[7]>>>16)+(g[6]<<16|g[6]>>>16)|0,H[1]=g[1]+(g[0]<<8|g[0]>>>24)+g[7]|0,H[2]=g[2]+(g[1]<<16|g[1]>>>16)+(g[0]<<16|g[0]>>>16)|0,H[3]=g[3]+(g[2]<<8|g[2]>>>24)+g[1]|0,H[4]=g[4]+(g[3]<<16|g[3]>>>16)+(g[2]<<16|g[2]>>>16)|0,H[5]=g[5]+(g[4]<<8|g[4]>>>24)+g[3]|0,H[6]=g[6]+(g[5]<<16|g[5]>>>16)+(g[4]<<16|g[4]>>>16)|0,H[7]=g[7]+(g[6]<<8|g[6]>>>24)+g[5]|0}u.Rabbit=c._createHelper(N)}(),a.Rabbit})}(rabbit)),rabbit.exports}var rabbitLegacy={exports:{}},hasRequiredRabbitLegacy;function requireRabbitLegacy(){return hasRequiredRabbitLegacy||(hasRequiredRabbitLegacy=1,function(i,n){(function(a,u,l){i.exports=u(requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore())})(commonjsGlobal,function(a){return function(){var u=a,l=u.lib,c=l.StreamCipher,S=u.algo,I=[],y=[],g=[],N=S.RabbitLegacy=c.extend({_doReset:function(){var H=this._key.words,G=this.cfg.iv,q=this._X=[H[0],H[3]<<16|H[2]>>>16,H[1],H[0]<<16|H[3]>>>16,H[2],H[1]<<16|H[0]>>>16,H[3],H[2]<<16|H[1]>>>16],X=this._C=[H[2]<<16|H[2]>>>16,H[0]&4294901760|H[1]&65535,H[3]<<16|H[3]>>>16,H[1]&4294901760|H[2]&65535,H[0]<<16|H[0]>>>16,H[2]&4294901760|H[3]&65535,H[1]<<16|H[1]>>>16,H[3]&4294901760|H[0]&65535];this._b=0;for(var U=0;U<4;U++)F.call(this);for(var U=0;U<8;U++)X[U]^=q[U+4&7];if(G){var V=G.words,j=V[0],Z=V[1],Y=(j<<8|j>>>24)&16711935|(j<<24|j>>>8)&4278255360,rt=(Z<<8|Z>>>24)&16711935|(Z<<24|Z>>>8)&4278255360,nt=Y>>>16|rt&4294901760,M=rt<<16|Y&65535;X[0]^=Y,X[1]^=nt,X[2]^=rt,X[3]^=M,X[4]^=Y,X[5]^=nt,X[6]^=rt,X[7]^=M;for(var U=0;U<4;U++)F.call(this)}},_doProcessBlock:function(H,G){var q=this._X;F.call(this),I[0]=q[0]^q[5]>>>16^q[3]<<16,I[1]=q[2]^q[7]>>>16^q[5]<<16,I[2]=q[4]^q[1]>>>16^q[7]<<16,I[3]=q[6]^q[3]>>>16^q[1]<<16;for(var X=0;X<4;X++)I[X]=(I[X]<<8|I[X]>>>24)&16711935|(I[X]<<24|I[X]>>>8)&4278255360,H[G+X]^=I[X]},blockSize:128/32,ivSize:64/32});function F(){for(var H=this._X,G=this._C,q=0;q<8;q++)y[q]=G[q];G[0]=G[0]+1295307597+this._b|0,G[1]=G[1]+3545052371+(G[0]>>>0<y[0]>>>0?1:0)|0,G[2]=G[2]+886263092+(G[1]>>>0<y[1]>>>0?1:0)|0,G[3]=G[3]+1295307597+(G[2]>>>0<y[2]>>>0?1:0)|0,G[4]=G[4]+3545052371+(G[3]>>>0<y[3]>>>0?1:0)|0,G[5]=G[5]+886263092+(G[4]>>>0<y[4]>>>0?1:0)|0,G[6]=G[6]+1295307597+(G[5]>>>0<y[5]>>>0?1:0)|0,G[7]=G[7]+3545052371+(G[6]>>>0<y[6]>>>0?1:0)|0,this._b=G[7]>>>0<y[7]>>>0?1:0;for(var q=0;q<8;q++){var X=H[q]+G[q],U=X&65535,V=X>>>16,j=((U*U>>>17)+U*V>>>15)+V*V,Z=((X&4294901760)*X|0)+((X&65535)*X|0);g[q]=j^Z}H[0]=g[0]+(g[7]<<16|g[7]>>>16)+(g[6]<<16|g[6]>>>16)|0,H[1]=g[1]+(g[0]<<8|g[0]>>>24)+g[7]|0,H[2]=g[2]+(g[1]<<16|g[1]>>>16)+(g[0]<<16|g[0]>>>16)|0,H[3]=g[3]+(g[2]<<8|g[2]>>>24)+g[1]|0,H[4]=g[4]+(g[3]<<16|g[3]>>>16)+(g[2]<<16|g[2]>>>16)|0,H[5]=g[5]+(g[4]<<8|g[4]>>>24)+g[3]|0,H[6]=g[6]+(g[5]<<16|g[5]>>>16)+(g[4]<<16|g[4]>>>16)|0,H[7]=g[7]+(g[6]<<8|g[6]>>>24)+g[5]|0}u.RabbitLegacy=c._createHelper(N)}(),a.RabbitLegacy})}(rabbitLegacy)),rabbitLegacy.exports}(function(i,n){(function(a,u,l){i.exports=u(requireCore(),requireX64Core(),requireLibTypedarrays(),requireEncUtf16(),requireEncBase64(),requireEncBase64url(),requireMd5(),requireSha1(),requireSha256(),requireSha224(),requireSha512(),requireSha384(),requireSha3(),requireRipemd160(),requireHmac(),requirePbkdf2(),requireEvpkdf(),requireCipherCore(),requireModeCfb(),requireModeCtr(),requireModeCtrGladman(),requireModeOfb(),requireModeEcb(),requirePadAnsix923(),requirePadIso10126(),requirePadIso97971(),requirePadZeropadding(),requirePadNopadding(),requireFormatHex(),requireAes(),requireTripledes(),requireRc4(),requireRabbit(),requireRabbitLegacy())})(commonjsGlobal,function(a){return a})})(cryptoJs);const estimateMaxSendableAmount=async({from:i,toolbox:n,asset:a,feeOptionKey:u=R.Fast})=>{var l;const c=typeof a=="string"?await index.AssetValue.fromString(a):a,S=await n.getBalance(i),I=S.find(({symbol:g,chain:N})=>a?g===(c==null?void 0:c.symbol):g===index.AssetValue.fromChainOrSignature(N).symbol),y=await n.getFees();return I?I.sub(y[u].value):index.AssetValue.fromChainOrSignature((c==null?void 0:c.chain)||((l=S[0])==null?void 0:l.chain),0)};var A=(i=>(i.INVALID_INPUT_PARAMETERS="1000",i.UNKNOWN_PROVIDERS="1001",i.CANNOT_FIND_INBOUND_ADDRESS="1002",i.NO_INBOUND_ADDRESSES="1003",i.CHAIN_HALTED_OR_UNSUPPORTED="1004",i.MISSING_INPUT_PARAMETER="1005",i.INVALID_TYPE_GENERIC="1100",i.INVALID_NUMBER_STRING="1101",i.INVALID_NUMBER="1102",i.INVALID_BOOLEAN="1103",i.INVALID_OBJECT="1104",i.INVALID_ARRAY="1105",i.SELL_AMOUNT_MUST_BE_POSITIVE_INTEGER="2000",i.SELL_BUY_ASSETS_ARE_THE_SAME="2001",i.MISSING_SOURCE_ADDRESS_FOR_SYNTH="2002",i.AFF_ADDRESS_AND_BPS_OR_NEITHER="2003",i.AFF_ADDRESS_TOO_LONG="2004",i.AFF_BPS_INTEGER_0_100="2005",i.SOURCE_ADDRESS_INVALID_FOR_SELL_CHAIN="2006",i.DESTINATION_ADDRESS_INVALID_FOR_BUY_CHAIN="2007",i.PREFERRED_PROFVIDER_NOT_SUPPORTED="2008",i.DESTINATION_ADDRESS_SMART_CONTRACT="2009",i.BUY_AMOUNT_MUST_BE_POSITIVE_INTEGER="2010",i.SOURCE_ADDRESS_SMART_CONTRACT="2011",i.INVALID_PROVIDER="2100",i.MISSING_CROSS_CHAIN_PROVIDER="2101",i.MISSING_AVAX_PROVIDER="2102",i.MISSING_BSC_PROVIDER="2103",i.MISSING_ETH_PROVIDER="2104",i.INVALID_PROVIDER_FOR_SWAP_OUT="2105",i.MISSING_ARB_PROVIDER="2106",i.INVALID_CHAIN="2200",i.INVALID_ASSET="2201",i.INVALID_ASSET_IDENTIFIER="2202",i.UNSUPPORTED_CHAIN="2204",i.UNSUPPORTED_ASSET="2203",i.UNSUPPORTED_ASSET_FOR_SWAPOUT="2205",i.INVALID_SOURCE_ADDRESS="2300",i.INVALID_DESTINATION_ADDRESS="2301",i.THORNODE_QUOTE_GENERIC_ERROR="3000",i.NOT_ENOUGH_SYNTH_BALANCE="3001",i.SYNTH_MINTING_CAP_REACHED="3002",i.INVALID_QUOTE_MODE="4000",i.NO_QUOTES="4001",i.SERVICE_UNAVAILABLE_GENERIC="5000",i.MISSING_GAS_DATA_GENERIC="5100",i.MISSING_TOKEN_INFO_GENERIC="5200",i.CANT_FIND_TOKEN_LIST="5201",i.NO_PRICE="5202",i.PRICE_IS_STALE="5203",i.ADDRESS_NOT_WHITELISTED="6000",i.ADDRESS_ALREADY_CLAIMED="6001",i.TEMPORARY_ERROR="9999",i))(A||{});A.INVALID_INPUT_PARAMETERS+"",A.UNKNOWN_PROVIDERS+"",A.CANNOT_FIND_INBOUND_ADDRESS+"",A.NO_INBOUND_ADDRESSES+"",A.CHAIN_HALTED_OR_UNSUPPORTED+"",A.MISSING_INPUT_PARAMETER+"",A.INVALID_TYPE_GENERIC+"",A.INVALID_NUMBER_STRING+"",A.INVALID_NUMBER+"",A.INVALID_BOOLEAN+"",A.INVALID_OBJECT+"",A.INVALID_ARRAY+"",A.SELL_AMOUNT_MUST_BE_POSITIVE_INTEGER+"",A.SELL_BUY_ASSETS_ARE_THE_SAME+"",A.MISSING_SOURCE_ADDRESS_FOR_SYNTH+"",A.AFF_ADDRESS_AND_BPS_OR_NEITHER+"",A.AFF_ADDRESS_TOO_LONG+"",A.AFF_BPS_INTEGER_0_100+"",A.SOURCE_ADDRESS_INVALID_FOR_SELL_CHAIN+"",A.DESTINATION_ADDRESS_INVALID_FOR_BUY_CHAIN+"",A.PREFERRED_PROFVIDER_NOT_SUPPORTED+"",A.DESTINATION_ADDRESS_SMART_CONTRACT+"",A.BUY_AMOUNT_MUST_BE_POSITIVE_INTEGER+"",A.INVALID_PROVIDER+"",A.MISSING_CROSS_CHAIN_PROVIDER+"",A.MISSING_AVAX_PROVIDER+"",A.MISSING_BSC_PROVIDER+"",A.MISSING_ETH_PROVIDER+"",A.MISSING_ARB_PROVIDER+"",A.INVALID_PROVIDER_FOR_SWAP_OUT+"",A.INVALID_CHAIN+"",A.INVALID_ASSET+"",A.UNSUPPORTED_CHAIN+"",A.UNSUPPORTED_ASSET+"",A.UNSUPPORTED_ASSET_FOR_SWAPOUT+"",A.THORNODE_QUOTE_GENERIC_ERROR+"",A.INVALID_SOURCE_ADDRESS+"",A.INVALID_DESTINATION_ADDRESS+"",A.NOT_ENOUGH_SYNTH_BALANCE+"",A.SYNTH_MINTING_CAP_REACHED+"",A.INVALID_QUOTE_MODE+"",A.NO_QUOTES+"",A.SERVICE_UNAVAILABLE_GENERIC+"",A.MISSING_GAS_DATA_GENERIC+"",A.MISSING_TOKEN_INFO_GENERIC+"",A.CANT_FIND_TOKEN_LIST+"",A.NO_PRICE+"",A.PRICE_IS_STALE+"",A.ADDRESS_NOT_WHITELISTED+"",A.ADDRESS_ALREADY_CLAIMED+"";var e=(i=>(i.Arbitrum="ARB",i.Avalanche="AVAX",i.Binance="BNB",i.BinanceSmartChain="BSC",i.Bitcoin="BTC",i.BitcoinCash="BCH",i.Cosmos="GAIA",i.Dogecoin="DOGE",i.Ethereum="ETH",i.Litecoin="LTC",i.Maya="MAYA",i.Optimism="OP",i.Polygon="MATIC",i.THORChain="THOR",i))(e||{}),C=(i=>(i.Arbitrum="42161",i.ArbitrumHex="0xa4b1",i.Avalanche="43114",i.AvalancheHex="0xa86a",i.Binance="Binance-Chain-Tigris",i.BinanceSmartChain="56",i.BinanceSmartChainHex="0x38",i.Bitcoin="bitcoin",i.BitcoinCash="bitcoincash",i.Cosmos="cosmoshub-4",i.Dogecoin="dogecoin",i.Ethereum="1",i.EthereumHex="0x1",i.Litecoin="litecoin",i.Maya="mayachain-mainnet-v1",i.MayaStagenet="mayachain-stagenet-v1",i.Optimism="10",i.OptimismHex="0xa",i.Polygon="137",i.PolygonHex="0x89",i.THORChain="thorchain-mainnet-v1",i.THORChainStagenet="thorchain-stagenet-v2",i))(C||{}),D=(i=>(i.Arbitrum="https://arb1.arbitrum.io/rpc",i.Avalanche="https://node-router.thorswap.net/avalanche-c",i.Binance="",i.BinanceSmartChain="https://bsc-dataseed.binance.org",i.Bitcoin="https://node-router.thorswap.net/bitcoin",i.BitcoinCash="https://node-router.thorswap.net/bitcoin-cash",i.Cosmos="https://node-router.thorswap.net/cosmos/rpc",i.Dogecoin="https://node-router.thorswap.net/dogecoin",i.Ethereum="https://node-router.thorswap.net/ethereum",i.Litecoin="https://node-router.thorswap.net/litecoin",i.Maya="https://tendermint.mayachain.info",i.MayaStagenet="https://stagenet.tendermint.mayachain.info",i.Optimism="https://mainnet.optimism.io",i.Polygon="https://polygon-rpc.com",i.THORChain="https://rpc.thorswap.net",i.THORChainStagenet="https://stagenet-rpc.ninerealms.com",i))(D||{}),T=(i=>(i.Cosmos="https://node-router.thorswap.net/cosmos/rest",i.MayanodeMainnet="https://mayanode.mayachain.info",i.MayanodeStagenet="https://stagenet.mayanode.mayachain.info",i.ThornodeMainnet="https://thornode.thorswap.net",i.ThornodeStagenet="https://stagenet-thornode.ninerealms.com",i.ThorswapApi="https://api.thorswap.finance",i.ThorswapStatic="https://static.thorswap.net",i))(T||{});const r=Object.values(e),s=Object.keys(e),O=r.reduce((i,n)=>{const a=s.find(u=>e[u]===n);return a&&(i[n]=a),i},{});r.reduce((i,n)=>(i[n]=C[O[n]],i),{});r.reduce((i,n)=>(i[n]=D[O[n]],i),{});r.reduce((i,n)=>{const a=`${O[n]}Hex`;return i[n]=C[a],i},{});`${T.ThorswapApi}`,`${T.ThorswapApi}`,`${T.ThorswapApi}`,`${T.ThorswapApi}`,`${T.ThorswapApi}`,`${T.ThorswapStatic}`,`${T.ThorswapApi}`;var tx={},any={},indexMinimal={},minimal$1={},aspromise=asPromise;function asPromise(i,n){for(var a=new Array(arguments.length-1),u=0,l=2,c=!0;l<arguments.length;)a[u++]=arguments[l++];return new Promise(function(S,I){a[u]=function(y){if(c)if(c=!1,y)I(y);else{for(var g=new Array(arguments.length-1),N=0;N<g.length;)g[N++]=arguments[N];S.apply(null,g)}};try{i.apply(n||null,a)}catch(y){c&&(c=!1,I(y))}})}var base64$1={};(function(i){var n=i;n.length=function(S){var I=S.length;if(!I)return 0;for(var y=0;--I%4>1&&S.charAt(I)==="=";)++y;return Math.ceil(S.length*3)/4-y};for(var a=new Array(64),u=new Array(123),l=0;l<64;)u[a[l]=l<26?l+65:l<52?l+71:l<62?l-4:l-59|43]=l++;n.encode=function(S,I,y){for(var g=null,N=[],F=0,H=0,G;I<y;){var q=S[I++];switch(H){case 0:N[F++]=a[q>>2],G=(q&3)<<4,H=1;break;case 1:N[F++]=a[G|q>>4],G=(q&15)<<2,H=2;break;case 2:N[F++]=a[G|q>>6],N[F++]=a[q&63],H=0;break}F>8191&&((g||(g=[])).push(String.fromCharCode.apply(String,N)),F=0)}return H&&(N[F++]=a[G],N[F++]=61,H===1&&(N[F++]=61)),g?(F&&g.push(String.fromCharCode.apply(String,N.slice(0,F))),g.join("")):String.fromCharCode.apply(String,N.slice(0,F))};var c="invalid encoding";n.decode=function(S,I,y){for(var g=y,N=0,F,H=0;H<S.length;){var G=S.charCodeAt(H++);if(G===61&&N>1)break;if((G=u[G])===void 0)throw Error(c);switch(N){case 0:F=G,N=1;break;case 1:I[y++]=F<<2|(G&48)>>4,F=G,N=2;break;case 2:I[y++]=(F&15)<<4|(G&60)>>2,F=G,N=3;break;case 3:I[y++]=(F&3)<<6|G,N=0;break}}if(N===1)throw Error(c);return y-g},n.test=function(S){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(S)}})(base64$1);var eventemitter=EventEmitter;function EventEmitter(){this._listeners={}}EventEmitter.prototype.on=function(i,n,a){return(this._listeners[i]||(this._listeners[i]=[])).push({fn:n,ctx:a||this}),this};EventEmitter.prototype.off=function(i,n){if(i===void 0)this._listeners={};else if(n===void 0)this._listeners[i]=[];else for(var a=this._listeners[i],u=0;u<a.length;)a[u].fn===n?a.splice(u,1):++u;return this};EventEmitter.prototype.emit=function(i){var n=this._listeners[i];if(n){for(var a=[],u=1;u<arguments.length;)a.push(arguments[u++]);for(u=0;u<n.length;)n[u].fn.apply(n[u++].ctx,a)}return this};var float=factory(factory);function factory(i){return typeof Float32Array<"u"?function(){var n=new Float32Array([-0]),a=new Uint8Array(n.buffer),u=a[3]===128;function l(y,g,N){n[0]=y,g[N]=a[0],g[N+1]=a[1],g[N+2]=a[2],g[N+3]=a[3]}function c(y,g,N){n[0]=y,g[N]=a[3],g[N+1]=a[2],g[N+2]=a[1],g[N+3]=a[0]}i.writeFloatLE=u?l:c,i.writeFloatBE=u?c:l;function S(y,g){return a[0]=y[g],a[1]=y[g+1],a[2]=y[g+2],a[3]=y[g+3],n[0]}function I(y,g){return a[3]=y[g],a[2]=y[g+1],a[1]=y[g+2],a[0]=y[g+3],n[0]}i.readFloatLE=u?S:I,i.readFloatBE=u?I:S}():function(){function n(u,l,c,S){var I=l<0?1:0;if(I&&(l=-l),l===0)u(1/l>0?0:2147483648,c,S);else if(isNaN(l))u(2143289344,c,S);else if(l>34028234663852886e22)u((I<<31|2139095040)>>>0,c,S);else if(l<11754943508222875e-54)u((I<<31|Math.round(l/1401298464324817e-60))>>>0,c,S);else{var y=Math.floor(Math.log(l)/Math.LN2),g=Math.round(l*Math.pow(2,-y)*8388608)&8388607;u((I<<31|y+127<<23|g)>>>0,c,S)}}i.writeFloatLE=n.bind(null,writeUintLE),i.writeFloatBE=n.bind(null,writeUintBE);function a(u,l,c){var S=u(l,c),I=(S>>31)*2+1,y=S>>>23&255,g=S&8388607;return y===255?g?NaN:I*(1/0):y===0?I*1401298464324817e-60*g:I*Math.pow(2,y-150)*(g+8388608)}i.readFloatLE=a.bind(null,readUintLE),i.readFloatBE=a.bind(null,readUintBE)}(),typeof Float64Array<"u"?function(){var n=new Float64Array([-0]),a=new Uint8Array(n.buffer),u=a[7]===128;function l(y,g,N){n[0]=y,g[N]=a[0],g[N+1]=a[1],g[N+2]=a[2],g[N+3]=a[3],g[N+4]=a[4],g[N+5]=a[5],g[N+6]=a[6],g[N+7]=a[7]}function c(y,g,N){n[0]=y,g[N]=a[7],g[N+1]=a[6],g[N+2]=a[5],g[N+3]=a[4],g[N+4]=a[3],g[N+5]=a[2],g[N+6]=a[1],g[N+7]=a[0]}i.writeDoubleLE=u?l:c,i.writeDoubleBE=u?c:l;function S(y,g){return a[0]=y[g],a[1]=y[g+1],a[2]=y[g+2],a[3]=y[g+3],a[4]=y[g+4],a[5]=y[g+5],a[6]=y[g+6],a[7]=y[g+7],n[0]}function I(y,g){return a[7]=y[g],a[6]=y[g+1],a[5]=y[g+2],a[4]=y[g+3],a[3]=y[g+4],a[2]=y[g+5],a[1]=y[g+6],a[0]=y[g+7],n[0]}i.readDoubleLE=u?S:I,i.readDoubleBE=u?I:S}():function(){function n(u,l,c,S,I,y){var g=S<0?1:0;if(g&&(S=-S),S===0)u(0,I,y+l),u(1/S>0?0:2147483648,I,y+c);else if(isNaN(S))u(0,I,y+l),u(2146959360,I,y+c);else if(S>17976931348623157e292)u(0,I,y+l),u((g<<31|2146435072)>>>0,I,y+c);else{var N;if(S<22250738585072014e-324)N=S/5e-324,u(N>>>0,I,y+l),u((g<<31|N/4294967296)>>>0,I,y+c);else{var F=Math.floor(Math.log(S)/Math.LN2);F===1024&&(F=1023),N=S*Math.pow(2,-F),u(N*4503599627370496>>>0,I,y+l),u((g<<31|F+1023<<20|N*1048576&1048575)>>>0,I,y+c)}}}i.writeDoubleLE=n.bind(null,writeUintLE,0,4),i.writeDoubleBE=n.bind(null,writeUintBE,4,0);function a(u,l,c,S,I){var y=u(S,I+l),g=u(S,I+c),N=(g>>31)*2+1,F=g>>>20&2047,H=4294967296*(g&1048575)+y;return F===2047?H?NaN:N*(1/0):F===0?N*5e-324*H:N*Math.pow(2,F-1075)*(H+4503599627370496)}i.readDoubleLE=a.bind(null,readUintLE,0,4),i.readDoubleBE=a.bind(null,readUintBE,4,0)}(),i}function writeUintLE(i,n,a){n[a]=i&255,n[a+1]=i>>>8&255,n[a+2]=i>>>16&255,n[a+3]=i>>>24}function writeUintBE(i,n,a){n[a]=i>>>24,n[a+1]=i>>>16&255,n[a+2]=i>>>8&255,n[a+3]=i&255}function readUintLE(i,n){return(i[n]|i[n+1]<<8|i[n+2]<<16|i[n+3]<<24)>>>0}function readUintBE(i,n){return(i[n]<<24|i[n+1]<<16|i[n+2]<<8|i[n+3])>>>0}var inquire_1=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(i){}return null}var utf8$2={};(function(i){var n=i;n.length=function(a){for(var u=0,l=0,c=0;c<a.length;++c)l=a.charCodeAt(c),l<128?u+=1:l<2048?u+=2:(l&64512)===55296&&(a.charCodeAt(c+1)&64512)===56320?(++c,u+=4):u+=3;return u},n.read=function(a,u,l){var c=l-u;if(c<1)return"";for(var S=null,I=[],y=0,g;u<l;)g=a[u++],g<128?I[y++]=g:g>191&&g<224?I[y++]=(g&31)<<6|a[u++]&63:g>239&&g<365?(g=((g&7)<<18|(a[u++]&63)<<12|(a[u++]&63)<<6|a[u++]&63)-65536,I[y++]=55296+(g>>10),I[y++]=56320+(g&1023)):I[y++]=(g&15)<<12|(a[u++]&63)<<6|a[u++]&63,y>8191&&((S||(S=[])).push(String.fromCharCode.apply(String,I)),y=0);return S?(y&&S.push(String.fromCharCode.apply(String,I.slice(0,y))),S.join("")):String.fromCharCode.apply(String,I.slice(0,y))},n.write=function(a,u,l){for(var c=l,S,I,y=0;y<a.length;++y)S=a.charCodeAt(y),S<128?u[l++]=S:S<2048?(u[l++]=S>>6|192,u[l++]=S&63|128):(S&64512)===55296&&((I=a.charCodeAt(y+1))&64512)===56320?(S=65536+((S&1023)<<10)+(I&1023),++y,u[l++]=S>>18|240,u[l++]=S>>12&63|128,u[l++]=S>>6&63|128,u[l++]=S&63|128):(u[l++]=S>>12|224,u[l++]=S>>6&63|128,u[l++]=S&63|128);return l-c}})(utf8$2);var pool_1=pool;function pool(i,n,a){var u=a||8192,l=u>>>1,c=null,S=u;return function(I){if(I<1||I>l)return i(I);S+I>u&&(c=i(u),S=0);var y=n.call(c,S,S+=I);return S&7&&(S=(S|7)+1),y}}var longbits,hasRequiredLongbits;function requireLongbits(){if(hasRequiredLongbits)return longbits;hasRequiredLongbits=1,longbits=n;var i=requireMinimal();function n(c,S){this.lo=c>>>0,this.hi=S>>>0}var a=n.zero=new n(0,0);a.toNumber=function(){return 0},a.zzEncode=a.zzDecode=function(){return this},a.length=function(){return 1};var u=n.zeroHash="\0\0\0\0\0\0\0\0";n.fromNumber=function(c){if(c===0)return a;var S=c<0;S&&(c=-c);var I=c>>>0,y=(c-I)/4294967296>>>0;return S&&(y=~y>>>0,I=~I>>>0,++I>4294967295&&(I=0,++y>4294967295&&(y=0))),new n(I,y)},n.from=function(c){if(typeof c=="number")return n.fromNumber(c);if(i.isString(c))if(i.Long)c=i.Long.fromString(c);else return n.fromNumber(parseInt(c,10));return c.low||c.high?new n(c.low>>>0,c.high>>>0):a},n.prototype.toNumber=function(c){if(!c&&this.hi>>>31){var S=~this.lo+1>>>0,I=~this.hi>>>0;return S||(I=I+1>>>0),-(S+I*4294967296)}return this.lo+this.hi*4294967296},n.prototype.toLong=function(c){return i.Long?new i.Long(this.lo|0,this.hi|0,!!c):{low:this.lo|0,high:this.hi|0,unsigned:!!c}};var l=String.prototype.charCodeAt;return n.fromHash=function(c){return c===u?a:new n((l.call(c,0)|l.call(c,1)<<8|l.call(c,2)<<16|l.call(c,3)<<24)>>>0,(l.call(c,4)|l.call(c,5)<<8|l.call(c,6)<<16|l.call(c,7)<<24)>>>0)},n.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},n.prototype.zzEncode=function(){var c=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^c)>>>0,this.lo=(this.lo<<1^c)>>>0,this},n.prototype.zzDecode=function(){var c=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^c)>>>0,this.hi=(this.hi>>>1^c)>>>0,this},n.prototype.length=function(){var c=this.lo,S=(this.lo>>>28|this.hi<<4)>>>0,I=this.hi>>>24;return I===0?S===0?c<16384?c<128?1:2:c<2097152?3:4:S<16384?S<128?5:6:S<2097152?7:8:I<128?9:10},longbits}var hasRequiredMinimal;function requireMinimal(){return hasRequiredMinimal||(hasRequiredMinimal=1,function(i){var n=i;n.asPromise=aspromise,n.base64=base64$1,n.EventEmitter=eventemitter,n.float=float,n.inquire=inquire_1,n.utf8=utf8$2,n.pool=pool_1,n.LongBits=requireLongbits(),n.isNode=!!(typeof commonjsGlobal<"u"&&commonjsGlobal&&commonjsGlobal.process&&commonjsGlobal.process.versions&&commonjsGlobal.process.versions.node),n.global=n.isNode&&commonjsGlobal||typeof window<"u"&&window||typeof self<"u"&&self||commonjsGlobal,n.emptyArray=Object.freeze?Object.freeze([]):[],n.emptyObject=Object.freeze?Object.freeze({}):{},n.isInteger=Number.isInteger||function(l){return typeof l=="number"&&isFinite(l)&&Math.floor(l)===l},n.isString=function(l){return typeof l=="string"||l instanceof String},n.isObject=function(l){return l&&typeof l=="object"},n.isset=n.isSet=function(l,c){var S=l[c];return S!=null&&l.hasOwnProperty(c)?typeof S!="object"||(Array.isArray(S)?S.length:Object.keys(S).length)>0:!1},n.Buffer=function(){try{var l=n.inquire("buffer").Buffer;return l.prototype.utf8Write?l:null}catch{return null}}(),n._Buffer_from=null,n._Buffer_allocUnsafe=null,n.newBuffer=function(l){return typeof l=="number"?n.Buffer?n._Buffer_allocUnsafe(l):new n.Array(l):n.Buffer?n._Buffer_from(l):typeof Uint8Array>"u"?l:new Uint8Array(l)},n.Array=typeof Uint8Array<"u"?Uint8Array:Array,n.Long=n.global.dcodeIO&&n.global.dcodeIO.Long||n.global.Long||n.inquire("long"),n.key2Re=/^true|false|0|1$/,n.key32Re=/^-?(?:0|[1-9][0-9]*)$/,n.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,n.longToHash=function(l){return l?n.LongBits.from(l).toHash():n.LongBits.zeroHash},n.longFromHash=function(l,c){var S=n.LongBits.fromHash(l);return n.Long?n.Long.fromBits(S.lo,S.hi,c):S.toNumber(!!c)};function a(l,c,S){for(var I=Object.keys(c),y=0;y<I.length;++y)(l[I[y]]===void 0||!S)&&(l[I[y]]=c[I[y]]);return l}n.merge=a,n.lcFirst=function(l){return l.charAt(0).toLowerCase()+l.substring(1)};function u(l){function c(S,I){if(!(this instanceof c))return new c(S,I);Object.defineProperty(this,"message",{get:function(){return S}}),Error.captureStackTrace?Error.captureStackTrace(this,c):Object.defineProperty(this,"stack",{value:new Error().stack||""}),I&&a(this,I)}return(c.prototype=Object.create(Error.prototype)).constructor=c,Object.defineProperty(c.prototype,"name",{get:function(){return l}}),c.prototype.toString=function(){return this.name+": "+this.message},c}n.newError=u,n.ProtocolError=u("ProtocolError"),n.oneOfGetter=function(l){for(var c={},S=0;S<l.length;++S)c[l[S]]=1;return function(){for(var I=Object.keys(this),y=I.length-1;y>-1;--y)if(c[I[y]]===1&&this[I[y]]!==void 0&&this[I[y]]!==null)return I[y]}},n.oneOfSetter=function(l){return function(c){for(var S=0;S<l.length;++S)l[S]!==c&&delete this[l[S]]}},n.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},n._configure=function(){var l=n.Buffer;if(!l){n._Buffer_from=n._Buffer_allocUnsafe=null;return}n._Buffer_from=l.from!==Uint8Array.from&&l.from||function(c,S){return new l(c,S)},n._Buffer_allocUnsafe=l.allocUnsafe||function(c){return new l(c)}}}(minimal$1)),minimal$1}var writer=Writer$1,util$4=requireMinimal(),BufferWriter$1,LongBits$1=util$4.LongBits,base64=util$4.base64,utf8$1=util$4.utf8;function Op(i,n,a){this.fn=i,this.len=n,this.next=void 0,this.val=a}function noop(){}function State(i){this.head=i.head,this.tail=i.tail,this.len=i.len,this.next=i.states}function Writer$1(){this.len=0,this.head=new Op(noop,0,0),this.tail=this.head,this.states=null}var create$1=function i(){return util$4.Buffer?function(){return(Writer$1.create=function(){return new BufferWriter$1})()}:function(){return new Writer$1}};Writer$1.create=create$1();Writer$1.alloc=function i(n){return new util$4.Array(n)};util$4.Array!==Array&&(Writer$1.alloc=util$4.pool(Writer$1.alloc,util$4.Array.prototype.subarray));Writer$1.prototype._push=function i(n,a,u){return this.tail=this.tail.next=new Op(n,a,u),this.len+=a,this};function writeByte(i,n,a){n[a]=i&255}function writeVarint32(i,n,a){for(;i>127;)n[a++]=i&127|128,i>>>=7;n[a]=i}function VarintOp(i,n){this.len=i,this.next=void 0,this.val=n}VarintOp.prototype=Object.create(Op.prototype);VarintOp.prototype.fn=writeVarint32;Writer$1.prototype.uint32=function i(n){return this.len+=(this.tail=this.tail.next=new VarintOp((n=n>>>0)<128?1:n<16384?2:n<2097152?3:n<268435456?4:5,n)).len,this};Writer$1.prototype.int32=function i(n){return n<0?this._push(writeVarint64,10,LongBits$1.fromNumber(n)):this.uint32(n)};Writer$1.prototype.sint32=function i(n){return this.uint32((n<<1^n>>31)>>>0)};function writeVarint64(i,n,a){for(;i.hi;)n[a++]=i.lo&127|128,i.lo=(i.lo>>>7|i.hi<<25)>>>0,i.hi>>>=7;for(;i.lo>127;)n[a++]=i.lo&127|128,i.lo=i.lo>>>7;n[a++]=i.lo}Writer$1.prototype.uint64=function i(n){var a=LongBits$1.from(n);return this._push(writeVarint64,a.length(),a)};Writer$1.prototype.int64=Writer$1.prototype.uint64;Writer$1.prototype.sint64=function i(n){var a=LongBits$1.from(n).zzEncode();return this._push(writeVarint64,a.length(),a)};Writer$1.prototype.bool=function i(n){return this._push(writeByte,1,n?1:0)};function writeFixed32(i,n,a){n[a]=i&255,n[a+1]=i>>>8&255,n[a+2]=i>>>16&255,n[a+3]=i>>>24}Writer$1.prototype.fixed32=function i(n){return this._push(writeFixed32,4,n>>>0)};Writer$1.prototype.sfixed32=Writer$1.prototype.fixed32;Writer$1.prototype.fixed64=function i(n){var a=LongBits$1.from(n);return this._push(writeFixed32,4,a.lo)._push(writeFixed32,4,a.hi)};Writer$1.prototype.sfixed64=Writer$1.prototype.fixed64;Writer$1.prototype.float=function i(n){return this._push(util$4.float.writeFloatLE,4,n)};Writer$1.prototype.double=function i(n){return this._push(util$4.float.writeDoubleLE,8,n)};var writeBytes=util$4.Array.prototype.set?function i(n,a,u){a.set(n,u)}:function i(n,a,u){for(var l=0;l<n.length;++l)a[u+l]=n[l]};Writer$1.prototype.bytes=function i(n){var a=n.length>>>0;if(!a)return this._push(writeByte,1,0);if(util$4.isString(n)){var u=Writer$1.alloc(a=base64.length(n));base64.decode(n,u,0),n=u}return this.uint32(a)._push(writeBytes,a,n)};Writer$1.prototype.string=function i(n){var a=utf8$1.length(n);return a?this.uint32(a)._push(utf8$1.write,a,n):this._push(writeByte,1,0)};Writer$1.prototype.fork=function i(){return this.states=new State(this),this.head=this.tail=new Op(noop,0,0),this.len=0,this};Writer$1.prototype.reset=function i(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new Op(noop,0,0),this.len=0),this};Writer$1.prototype.ldelim=function i(){var n=this.head,a=this.tail,u=this.len;return this.reset().uint32(u),u&&(this.tail.next=n.next,this.tail=a,this.len+=u),this};Writer$1.prototype.finish=function i(){for(var n=this.head.next,a=this.constructor.alloc(this.len),u=0;n;)n.fn(n.val,a,u),u+=n.len,n=n.next;return a};Writer$1._configure=function(i){BufferWriter$1=i,Writer$1.create=create$1(),BufferWriter$1._configure()};var writer_buffer=BufferWriter,Writer=writer;(BufferWriter.prototype=Object.create(Writer.prototype)).constructor=BufferWriter;var util$3=requireMinimal();function BufferWriter(){Writer.call(this)}BufferWriter._configure=function(){BufferWriter.alloc=util$3._Buffer_allocUnsafe,BufferWriter.writeBytesBuffer=util$3.Buffer&&util$3.Buffer.prototype instanceof Uint8Array&&util$3.Buffer.prototype.set.name==="set"?function(i,n,a){n.set(i,a)}:function(i,n,a){if(i.copy)i.copy(n,a,0,i.length);else for(var u=0;u<i.length;)n[a++]=i[u++]}};BufferWriter.prototype.bytes=function i(n){util$3.isString(n)&&(n=util$3._Buffer_from(n,"base64"));var a=n.length>>>0;return this.uint32(a),a&&this._push(BufferWriter.writeBytesBuffer,a,n),this};function writeStringBuffer(i,n,a){i.length<40?util$3.utf8.write(i,n,a):n.utf8Write?n.utf8Write(i,a):n.write(i,a)}BufferWriter.prototype.string=function i(n){var a=util$3.Buffer.byteLength(n);return this.uint32(a),a&&this._push(writeStringBuffer,a,n),this};BufferWriter._configure();var reader=Reader$1,util$2=requireMinimal(),BufferReader$1,LongBits=util$2.LongBits,utf8=util$2.utf8;function indexOutOfRange(i,n){return RangeError("index out of range: "+i.pos+" + "+(n||1)+" > "+i.len)}function Reader$1(i){this.buf=i,this.pos=0,this.len=i.length}var create_array=typeof Uint8Array<"u"?function i(n){if(n instanceof Uint8Array||Array.isArray(n))return new Reader$1(n);throw Error("illegal buffer")}:function i(n){if(Array.isArray(n))return new Reader$1(n);throw Error("illegal buffer")},create=function i(){return util$2.Buffer?function(n){return(Reader$1.create=function(a){return util$2.Buffer.isBuffer(a)?new BufferReader$1(a):create_array(a)})(n)}:create_array};Reader$1.create=create();Reader$1.prototype._slice=util$2.Array.prototype.subarray||util$2.Array.prototype.slice;Reader$1.prototype.uint32=function i(){var n=4294967295;return function(){if(n=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(n=(n|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(n=(n|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(n=(n|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(n=(n|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return n;if((this.pos+=5)>this.len)throw this.pos=this.len,indexOutOfRange(this,10);return n}}();Reader$1.prototype.int32=function i(){return this.uint32()|0};Reader$1.prototype.sint32=function i(){var n=this.uint32();return n>>>1^-(n&1)|0};function readLongVarint(){var i=new LongBits(0,0),n=0;if(this.len-this.pos>4){for(;n<4;++n)if(i.lo=(i.lo|(this.buf[this.pos]&127)<<n*7)>>>0,this.buf[this.pos++]<128)return i;if(i.lo=(i.lo|(this.buf[this.pos]&127)<<28)>>>0,i.hi=(i.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return i;n=0}else{for(;n<3;++n){if(this.pos>=this.len)throw indexOutOfRange(this);if(i.lo=(i.lo|(this.buf[this.pos]&127)<<n*7)>>>0,this.buf[this.pos++]<128)return i}return i.lo=(i.lo|(this.buf[this.pos++]&127)<<n*7)>>>0,i}if(this.len-this.pos>4){for(;n<5;++n)if(i.hi=(i.hi|(this.buf[this.pos]&127)<<n*7+3)>>>0,this.buf[this.pos++]<128)return i}else for(;n<5;++n){if(this.pos>=this.len)throw indexOutOfRange(this);if(i.hi=(i.hi|(this.buf[this.pos]&127)<<n*7+3)>>>0,this.buf[this.pos++]<128)return i}throw Error("invalid varint encoding")}Reader$1.prototype.bool=function i(){return this.uint32()!==0};function readFixed32_end(i,n){return(i[n-4]|i[n-3]<<8|i[n-2]<<16|i[n-1]<<24)>>>0}Reader$1.prototype.fixed32=function i(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);return readFixed32_end(this.buf,this.pos+=4)};Reader$1.prototype.sfixed32=function i(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);return readFixed32_end(this.buf,this.pos+=4)|0};function readFixed64(){if(this.pos+8>this.len)throw indexOutOfRange(this,8);return new LongBits(readFixed32_end(this.buf,this.pos+=4),readFixed32_end(this.buf,this.pos+=4))}Reader$1.prototype.float=function i(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);var n=util$2.float.readFloatLE(this.buf,this.pos);return this.pos+=4,n};Reader$1.prototype.double=function i(){if(this.pos+8>this.len)throw indexOutOfRange(this,4);var n=util$2.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,n};Reader$1.prototype.bytes=function i(){var n=this.uint32(),a=this.pos,u=this.pos+n;if(u>this.len)throw indexOutOfRange(this,n);return this.pos+=n,Array.isArray(this.buf)?this.buf.slice(a,u):a===u?new this.buf.constructor(0):this._slice.call(this.buf,a,u)};Reader$1.prototype.string=function i(){var n=this.bytes();return utf8.read(n,0,n.length)};Reader$1.prototype.skip=function i(n){if(typeof n=="number"){if(this.pos+n>this.len)throw indexOutOfRange(this,n);this.pos+=n}else do if(this.pos>=this.len)throw indexOutOfRange(this);while(this.buf[this.pos++]&128);return this};Reader$1.prototype.skipType=function(i){switch(i){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(i=this.uint32()&7)!==4;)this.skipType(i);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+i+" at offset "+this.pos)}return this};Reader$1._configure=function(i){BufferReader$1=i,Reader$1.create=create(),BufferReader$1._configure();var n=util$2.Long?"toLong":"toNumber";util$2.merge(Reader$1.prototype,{int64:function(){return readLongVarint.call(this)[n](!1)},uint64:function(){return readLongVarint.call(this)[n](!0)},sint64:function(){return readLongVarint.call(this).zzDecode()[n](!1)},fixed64:function(){return readFixed64.call(this)[n](!0)},sfixed64:function(){return readFixed64.call(this)[n](!1)}})};var reader_buffer=BufferReader,Reader=reader;(BufferReader.prototype=Object.create(Reader.prototype)).constructor=BufferReader;var util$1=requireMinimal();function BufferReader(i){Reader.call(this,i)}BufferReader._configure=function(){util$1.Buffer&&(BufferReader.prototype._slice=util$1.Buffer.prototype.slice)};BufferReader.prototype.string=function i(){var n=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+n,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+n,this.len))};BufferReader._configure();var rpc={},service=Service,util=requireMinimal();(Service.prototype=Object.create(util.EventEmitter.prototype)).constructor=Service;function Service(i,n,a){if(typeof i!="function")throw TypeError("rpcImpl must be a function");util.EventEmitter.call(this),this.rpcImpl=i,this.requestDelimited=!!n,this.responseDelimited=!!a}Service.prototype.rpcCall=function i(n,a,u,l,c){if(!l)throw TypeError("request must be specified");var S=this;if(!c)return util.asPromise(i,S,n,a,u,l);if(!S.rpcImpl){setTimeout(function(){c(Error("already ended"))},0);return}try{return S.rpcImpl(n,a[S.requestDelimited?"encodeDelimited":"encode"](l).finish(),function(I,y){if(I)return S.emit("error",I,n),c(I);if(y===null){S.end(!0);return}if(!(y instanceof u))try{y=u[S.responseDelimited?"decodeDelimited":"decode"](y)}catch(g){return S.emit("error",g,n),c(g)}return S.emit("data",y,n),c(null,y)})}catch(I){S.emit("error",I,n),setTimeout(function(){c(I)},0);return}};Service.prototype.end=function i(n){return this.rpcImpl&&(n||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this};(function(i){var n=i;n.Service=service})(rpc);var roots={};(function(i){var n=i;n.build="minimal",n.Writer=writer,n.BufferWriter=writer_buffer,n.Reader=reader,n.BufferReader=reader_buffer,n.util=requireMinimal(),n.rpc=rpc,n.roots=roots,n.configure=a;function a(){n.util._configure(),n.Writer._configure(n.BufferWriter),n.Reader._configure(n.BufferReader)}a()})(indexMinimal);var minimal=indexMinimal,helpers={},long=Long,wasm=null;try{wasm=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(i){}function Long(i,n,a){this.low=i|0,this.high=n|0,this.unsigned=!!a}Long.prototype.__isLong__;Object.defineProperty(Long.prototype,"__isLong__",{value:!0});function isLong(i){return(i&&i.__isLong__)===!0}Long.isLong=isLong;var INT_CACHE={},UINT_CACHE={};function fromInt(i,n){var a,u,l;return n?(i>>>=0,(l=0<=i&&i<256)&&(u=UINT_CACHE[i],u)?u:(a=fromBits(i,(i|0)<0?-1:0,!0),l&&(UINT_CACHE[i]=a),a)):(i|=0,(l=-128<=i&&i<128)&&(u=INT_CACHE[i],u)?u:(a=fromBits(i,i<0?-1:0,!1),l&&(INT_CACHE[i]=a),a))}Long.fromInt=fromInt;function fromNumber(i,n){if(isNaN(i))return n?UZERO:ZERO;if(n){if(i<0)return UZERO;if(i>=TWO_PWR_64_DBL)return MAX_UNSIGNED_VALUE}else{if(i<=-TWO_PWR_63_DBL)return MIN_VALUE;if(i+1>=TWO_PWR_63_DBL)return MAX_VALUE}return i<0?fromNumber(-i,n).neg():fromBits(i%TWO_PWR_32_DBL|0,i/TWO_PWR_32_DBL|0,n)}Long.fromNumber=fromNumber;function fromBits(i,n,a){return new Long(i,n,a)}Long.fromBits=fromBits;var pow_dbl=Math.pow;function fromString(i,n,a){if(i.length===0)throw Error("empty string");if(i==="NaN"||i==="Infinity"||i==="+Infinity"||i==="-Infinity")return ZERO;if(typeof n=="number"?(a=n,n=!1):n=!!n,a=a||10,a<2||36<a)throw RangeError("radix");var u;if((u=i.indexOf("-"))>0)throw Error("interior hyphen");if(u===0)return fromString(i.substring(1),n,a).neg();for(var l=fromNumber(pow_dbl(a,8)),c=ZERO,S=0;S<i.length;S+=8){var I=Math.min(8,i.length-S),y=parseInt(i.substring(S,S+I),a);if(I<8){var g=fromNumber(pow_dbl(a,I));c=c.mul(g).add(fromNumber(y))}else c=c.mul(l),c=c.add(fromNumber(y))}return c.unsigned=n,c}Long.fromString=fromString;function fromValue(i,n){return typeof i=="number"?fromNumber(i,n):typeof i=="string"?fromString(i,n):fromBits(i.low,i.high,typeof n=="boolean"?n:i.unsigned)}Long.fromValue=fromValue;var TWO_PWR_16_DBL=65536,TWO_PWR_24_DBL=1<<24,TWO_PWR_32_DBL=TWO_PWR_16_DBL*TWO_PWR_16_DBL,TWO_PWR_64_DBL=TWO_PWR_32_DBL*TWO_PWR_32_DBL,TWO_PWR_63_DBL=TWO_PWR_64_DBL/2,TWO_PWR_24=fromInt(TWO_PWR_24_DBL),ZERO=fromInt(0);Long.ZERO=ZERO;var UZERO=fromInt(0,!0);Long.UZERO=UZERO;var ONE=fromInt(1);Long.ONE=ONE;var UONE=fromInt(1,!0);Long.UONE=UONE;var NEG_ONE=fromInt(-1);Long.NEG_ONE=NEG_ONE;var MAX_VALUE=fromBits(-1,2147483647,!1);Long.MAX_VALUE=MAX_VALUE;var MAX_UNSIGNED_VALUE=fromBits(-1,-1,!0);Long.MAX_UNSIGNED_VALUE=MAX_UNSIGNED_VALUE;var MIN_VALUE=fromBits(0,-2147483648,!1);Long.MIN_VALUE=MIN_VALUE;var LongPrototype=Long.prototype;LongPrototype.toInt=function i(){return this.unsigned?this.low>>>0:this.low};LongPrototype.toNumber=function i(){return this.unsigned?(this.high>>>0)*TWO_PWR_32_DBL+(this.low>>>0):this.high*TWO_PWR_32_DBL+(this.low>>>0)};LongPrototype.toString=function i(n){if(n=n||10,n<2||36<n)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(MIN_VALUE)){var a=fromNumber(n),u=this.div(a),l=u.mul(a).sub(this);return u.toString(n)+l.toInt().toString(n)}else return"-"+this.neg().toString(n);for(var c=fromNumber(pow_dbl(n,6),this.unsigned),S=this,I="";;){var y=S.div(c),g=S.sub(y.mul(c)).toInt()>>>0,N=g.toString(n);if(S=y,S.isZero())return N+I;for(;N.length<6;)N="0"+N;I=""+N+I}};LongPrototype.getHighBits=function i(){return this.high};LongPrototype.getHighBitsUnsigned=function i(){return this.high>>>0};LongPrototype.getLowBits=function i(){return this.low};LongPrototype.getLowBitsUnsigned=function i(){return this.low>>>0};LongPrototype.getNumBitsAbs=function i(){if(this.isNegative())return this.eq(MIN_VALUE)?64:this.neg().getNumBitsAbs();for(var n=this.high!=0?this.high:this.low,a=31;a>0&&!(n&1<<a);a--);return this.high!=0?a+33:a+1};LongPrototype.isZero=function i(){return this.high===0&&this.low===0};LongPrototype.eqz=LongPrototype.isZero;LongPrototype.isNegative=function i(){return!this.unsigned&&this.high<0};LongPrototype.isPositive=function i(){return this.unsigned||this.high>=0};LongPrototype.isOdd=function i(){return(this.low&1)===1};LongPrototype.isEven=function i(){return(this.low&1)===0};LongPrototype.equals=function i(n){return isLong(n)||(n=fromValue(n)),this.unsigned!==n.unsigned&&this.high>>>31===1&&n.high>>>31===1?!1:this.high===n.high&&this.low===n.low};LongPrototype.eq=LongPrototype.equals;LongPrototype.notEquals=function i(n){return!this.eq(n)};LongPrototype.neq=LongPrototype.notEquals;LongPrototype.ne=LongPrototype.notEquals;LongPrototype.lessThan=function i(n){return this.comp(n)<0};LongPrototype.lt=LongPrototype.lessThan;LongPrototype.lessThanOrEqual=function i(n){return this.comp(n)<=0};LongPrototype.lte=LongPrototype.lessThanOrEqual;LongPrototype.le=LongPrototype.lessThanOrEqual;LongPrototype.greaterThan=function i(n){return this.comp(n)>0};LongPrototype.gt=LongPrototype.greaterThan;LongPrototype.greaterThanOrEqual=function i(n){return this.comp(n)>=0};LongPrototype.gte=LongPrototype.greaterThanOrEqual;LongPrototype.ge=LongPrototype.greaterThanOrEqual;LongPrototype.compare=function i(n){if(isLong(n)||(n=fromValue(n)),this.eq(n))return 0;var a=this.isNegative(),u=n.isNegative();return a&&!u?-1:!a&&u?1:this.unsigned?n.high>>>0>this.high>>>0||n.high===this.high&&n.low>>>0>this.low>>>0?-1:1:this.sub(n).isNegative()?-1:1};LongPrototype.comp=LongPrototype.compare;LongPrototype.negate=function i(){return!this.unsigned&&this.eq(MIN_VALUE)?MIN_VALUE:this.not().add(ONE)};LongPrototype.neg=LongPrototype.negate;LongPrototype.add=function i(n){isLong(n)||(n=fromValue(n));var a=this.high>>>16,u=this.high&65535,l=this.low>>>16,c=this.low&65535,S=n.high>>>16,I=n.high&65535,y=n.low>>>16,g=n.low&65535,N=0,F=0,H=0,G=0;return G+=c+g,H+=G>>>16,G&=65535,H+=l+y,F+=H>>>16,H&=65535,F+=u+I,N+=F>>>16,F&=65535,N+=a+S,N&=65535,fromBits(H<<16|G,N<<16|F,this.unsigned)};LongPrototype.subtract=function i(n){return isLong(n)||(n=fromValue(n)),this.add(n.neg())};LongPrototype.sub=LongPrototype.subtract;LongPrototype.multiply=function i(n){if(this.isZero())return ZERO;if(isLong(n)||(n=fromValue(n)),wasm){var a=wasm.mul(this.low,this.high,n.low,n.high);return fromBits(a,wasm.get_high(),this.unsigned)}if(n.isZero())return ZERO;if(this.eq(MIN_VALUE))return n.isOdd()?MIN_VALUE:ZERO;if(n.eq(MIN_VALUE))return this.isOdd()?MIN_VALUE:ZERO;if(this.isNegative())return n.isNegative()?this.neg().mul(n.neg()):this.neg().mul(n).neg();if(n.isNegative())return this.mul(n.neg()).neg();if(this.lt(TWO_PWR_24)&&n.lt(TWO_PWR_24))return fromNumber(this.toNumber()*n.toNumber(),this.unsigned);var u=this.high>>>16,l=this.high&65535,c=this.low>>>16,S=this.low&65535,I=n.high>>>16,y=n.high&65535,g=n.low>>>16,N=n.low&65535,F=0,H=0,G=0,q=0;return q+=S*N,G+=q>>>16,q&=65535,G+=c*N,H+=G>>>16,G&=65535,G+=S*g,H+=G>>>16,G&=65535,H+=l*N,F+=H>>>16,H&=65535,H+=c*g,F+=H>>>16,H&=65535,H+=S*y,F+=H>>>16,H&=65535,F+=u*N+l*g+c*y+S*I,F&=65535,fromBits(G<<16|q,F<<16|H,this.unsigned)};LongPrototype.mul=LongPrototype.multiply;LongPrototype.divide=function i(n){if(isLong(n)||(n=fromValue(n)),n.isZero())throw Error("division by zero");if(wasm){if(!this.unsigned&&this.high===-2147483648&&n.low===-1&&n.high===-1)return this;var a=(this.unsigned?wasm.div_u:wasm.div_s)(this.low,this.high,n.low,n.high);return fromBits(a,wasm.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?UZERO:ZERO;var u,l,c;if(this.unsigned){if(n.unsigned||(n=n.toUnsigned()),n.gt(this))return UZERO;if(n.gt(this.shru(1)))return UONE;c=UZERO}else{if(this.eq(MIN_VALUE)){if(n.eq(ONE)||n.eq(NEG_ONE))return MIN_VALUE;if(n.eq(MIN_VALUE))return ONE;var S=this.shr(1);return u=S.div(n).shl(1),u.eq(ZERO)?n.isNegative()?ONE:NEG_ONE:(l=this.sub(n.mul(u)),c=u.add(l.div(n)),c)}else if(n.eq(MIN_VALUE))return this.unsigned?UZERO:ZERO;if(this.isNegative())return n.isNegative()?this.neg().div(n.neg()):this.neg().div(n).neg();if(n.isNegative())return this.div(n.neg()).neg();c=ZERO}for(l=this;l.gte(n);){u=Math.max(1,Math.floor(l.toNumber()/n.toNumber()));for(var I=Math.ceil(Math.log(u)/Math.LN2),y=I<=48?1:pow_dbl(2,I-48),g=fromNumber(u),N=g.mul(n);N.isNegative()||N.gt(l);)u-=y,g=fromNumber(u,this.unsigned),N=g.mul(n);g.isZero()&&(g=ONE),c=c.add(g),l=l.sub(N)}return c};LongPrototype.div=LongPrototype.divide;LongPrototype.modulo=function i(n){if(isLong(n)||(n=fromValue(n)),wasm){var a=(this.unsigned?wasm.rem_u:wasm.rem_s)(this.low,this.high,n.low,n.high);return fromBits(a,wasm.get_high(),this.unsigned)}return this.sub(this.div(n).mul(n))};LongPrototype.mod=LongPrototype.modulo;LongPrototype.rem=LongPrototype.modulo;LongPrototype.not=function i(){return fromBits(~this.low,~this.high,this.unsigned)};LongPrototype.and=function i(n){return isLong(n)||(n=fromValue(n)),fromBits(this.low&n.low,this.high&n.high,this.unsigned)};LongPrototype.or=function i(n){return isLong(n)||(n=fromValue(n)),fromBits(this.low|n.low,this.high|n.high,this.unsigned)};LongPrototype.xor=function i(n){return isLong(n)||(n=fromValue(n)),fromBits(this.low^n.low,this.high^n.high,this.unsigned)};LongPrototype.shiftLeft=function i(n){return isLong(n)&&(n=n.toInt()),(n&=63)===0?this:n<32?fromBits(this.low<<n,this.high<<n|this.low>>>32-n,this.unsigned):fromBits(0,this.low<<n-32,this.unsigned)};LongPrototype.shl=LongPrototype.shiftLeft;LongPrototype.shiftRight=function i(n){return isLong(n)&&(n=n.toInt()),(n&=63)===0?this:n<32?fromBits(this.low>>>n|this.high<<32-n,this.high>>n,this.unsigned):fromBits(this.high>>n-32,this.high>=0?0:-1,this.unsigned)};LongPrototype.shr=LongPrototype.shiftRight;LongPrototype.shiftRightUnsigned=function i(n){if(isLong(n)&&(n=n.toInt()),n&=63,n===0)return this;var a=this.high;if(n<32){var u=this.low;return fromBits(u>>>n|a<<32-n,a>>>n,this.unsigned)}else return n===32?fromBits(a,0,this.unsigned):fromBits(a>>>n-32,0,this.unsigned)};LongPrototype.shru=LongPrototype.shiftRightUnsigned;LongPrototype.shr_u=LongPrototype.shiftRightUnsigned;LongPrototype.toSigned=function i(){return this.unsigned?fromBits(this.low,this.high,!1):this};LongPrototype.toUnsigned=function i(){return this.unsigned?this:fromBits(this.low,this.high,!0)};LongPrototype.toBytes=function i(n){return n?this.toBytesLE():this.toBytesBE()};LongPrototype.toBytesLE=function i(){var n=this.high,a=this.low;return[a&255,a>>>8&255,a>>>16&255,a>>>24,n&255,n>>>8&255,n>>>16&255,n>>>24]};LongPrototype.toBytesBE=function i(){var n=this.high,a=this.low;return[n>>>24,n>>>16&255,n>>>8&255,n&255,a>>>24,a>>>16&255,a>>>8&255,a&255]};Long.fromBytes=function i(n,a,u){return u?Long.fromBytesLE(n,a):Long.fromBytesBE(n,a)};Long.fromBytesLE=function i(n,a){return new Long(n[0]|n[1]<<8|n[2]<<16|n[3]<<24,n[4]|n[5]<<8|n[6]<<16|n[7]<<24,a)};Long.fromBytesBE=function i(n,a){return new Long(n[4]<<24|n[5]<<16|n[6]<<8|n[7],n[0]<<24|n[1]<<16|n[2]<<8|n[3],a)};var __createBinding$3=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(i,n,a,u){u===void 0&&(u=a);var l=Object.getOwnPropertyDescriptor(n,a);(!l||("get"in l?!n.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return n[a]}}),Object.defineProperty(i,u,l)}:function(i,n,a,u){u===void 0&&(u=a),i[u]=n[a]}),__setModuleDefault$3=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(i,n){Object.defineProperty(i,"default",{enumerable:!0,value:n})}:function(i,n){i.default=n}),__importStar$3=commonjsGlobal&&commonjsGlobal.__importStar||function(i){if(i&&i.__esModule)return i;var n={};if(i!=null)for(var a in i)a!=="default"&&Object.prototype.hasOwnProperty.call(i,a)&&__createBinding$3(n,i,a);return __setModuleDefault$3(n,i),n},__importDefault=commonjsGlobal&&commonjsGlobal.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(helpers,"__esModule",{value:!0});helpers.fromJsonTimestamp=helpers.fromTimestamp=helpers.toTimestamp=helpers.setPaginationParams=helpers.isObject=helpers.isSet=helpers.fromDuration=helpers.toDuration=helpers.omitDefault=helpers.base64FromBytes=helpers.bytesFromBase64=helpers.Long=void 0;const _m0$3=__importStar$3(minimal),long_1=__importDefault(long);helpers.Long=long_1.default;_m0$3.util.Long!==long_1.default&&(_m0$3.util.Long=long_1.default,_m0$3.configure());var globalThis$1=(()=>{if(typeof globalThis$1<"u")return globalThis$1;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof commonjsGlobal<"u")return commonjsGlobal;throw"Unable to locate global object"})();const atob=globalThis$1.atob||(i=>globalThis$1.Buffer.from(i,"base64").toString("binary"));function bytesFromBase64(i){const n=atob(i),a=new Uint8Array(n.length);for(let u=0;u<n.length;++u)a[u]=n.charCodeAt(u);return a}helpers.bytesFromBase64=bytesFromBase64;const btoa=globalThis$1.btoa||(i=>globalThis$1.Buffer.from(i,"binary").toString("base64"));function base64FromBytes(i){const n=[];return i.forEach(a=>{n.push(String.fromCharCode(a))}),btoa(n.join(""))}helpers.base64FromBytes=base64FromBytes;function omitDefault(i){if(typeof i=="string")return i===""?void 0:i;if(typeof i=="number")return i===0?void 0:i;if(long_1.default.isLong(i))return i.isZero()?void 0:i;throw new Error(`Got unsupported type ${typeof i}`)}helpers.omitDefault=omitDefault;function toDuration(i){return{seconds:long_1.default.fromNumber(Math.floor(parseInt(i)/1e9)),nanos:parseInt(i)%1e9}}helpers.toDuration=toDuration;function fromDuration(i){return(parseInt(i.seconds.toString())*1e9+i.nanos).toString()}helpers.fromDuration=fromDuration;function isSet(i){return i!=null}helpers.isSet=isSet;function isObject(i){return typeof i=="object"&&i!==null}helpers.isObject=isObject;const setPaginationParams=(i,n)=>(n&&(typeof(n==null?void 0:n.countTotal)<"u"&&(i.params["pagination.count_total"]=n.countTotal),typeof(n==null?void 0:n.key)<"u"&&(i.params["pagination.key"]=Buffer.from(n.key).toString("base64")),typeof(n==null?void 0:n.limit)<"u"&&(i.params["pagination.limit"]=n.limit.toString()),typeof(n==null?void 0:n.offset)<"u"&&(i.params["pagination.offset"]=n.offset.toString()),typeof(n==null?void 0:n.reverse)<"u"&&(i.params["pagination.reverse"]=n.reverse)),i);helpers.setPaginationParams=setPaginationParams;function toTimestamp(i){const n=numberToLong(i.getTime()/1e3),a=i.getTime()%1e3*1e6;return{seconds:n,nanos:a}}helpers.toTimestamp=toTimestamp;function fromTimestamp(i){let n=i.seconds.toNumber()*1e3;return n+=i.nanos/1e6,new Date(n)}helpers.fromTimestamp=fromTimestamp;const timestampFromJSON=i=>({seconds:isSet(i.seconds)?long_1.default.fromValue(i.seconds):long_1.default.ZERO,nanos:isSet(i.nanos)?Number(i.nanos):0});function fromJsonTimestamp(i){return i instanceof Date?toTimestamp(i):typeof i=="string"?toTimestamp(new Date(i)):timestampFromJSON(i)}helpers.fromJsonTimestamp=fromJsonTimestamp;function numberToLong(i){return long_1.default.fromNumber(i)}var __createBinding$2=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(i,n,a,u){u===void 0&&(u=a);var l=Object.getOwnPropertyDescriptor(n,a);(!l||("get"in l?!n.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return n[a]}}),Object.defineProperty(i,u,l)}:function(i,n,a,u){u===void 0&&(u=a),i[u]=n[a]}),__setModuleDefault$2=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(i,n){Object.defineProperty(i,"default",{enumerable:!0,value:n})}:function(i,n){i.default=n}),__importStar$2=commonjsGlobal&&commonjsGlobal.__importStar||function(i){if(i&&i.__esModule)return i;var n={};if(i!=null)for(var a in i)a!=="default"&&Object.prototype.hasOwnProperty.call(i,a)&&__createBinding$2(n,i,a);return __setModuleDefault$2(n,i),n};Object.defineProperty(any,"__esModule",{value:!0});any.Any=any.protobufPackage=void 0;const _m0$2=__importStar$2(minimal),helpers_1$2=helpers;any.protobufPackage="google.protobuf";function createBaseAny(){return{typeUrl:"",value:new Uint8Array}}any.Any={encode(i,n=_m0$2.Writer.create()){return i.typeUrl!==""&&n.uint32(10).string(i.typeUrl),i.value.length!==0&&n.uint32(18).bytes(i.value),n},decode(i,n){const a=i instanceof _m0$2.Reader?i:new _m0$2.Reader(i);let u=n===void 0?a.len:a.pos+n;const l=createBaseAny();for(;a.pos<u;){const c=a.uint32();switch(c>>>3){case 1:l.typeUrl=a.string();break;case 2:l.value=a.bytes();break;default:a.skipType(c&7);break}}return l},fromJSON(i){return{typeUrl:(0,helpers_1$2.isSet)(i.typeUrl)?String(i.typeUrl):"",value:(0,helpers_1$2.isSet)(i.value)?(0,helpers_1$2.bytesFromBase64)(i.value):new Uint8Array}},toJSON(i){const n={};return i.typeUrl!==void 0&&(n.typeUrl=i.typeUrl),i.value!==void 0&&(n.value=(0,helpers_1$2.base64FromBytes)(i.value!==void 0?i.value:new Uint8Array)),n},fromPartial(i){const n=createBaseAny();return n.typeUrl=i.typeUrl??"",n.value=i.value??new Uint8Array,n}};var signing={},multisig={},__createBinding$1=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(i,n,a,u){u===void 0&&(u=a);var l=Object.getOwnPropertyDescriptor(n,a);(!l||("get"in l?!n.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return n[a]}}),Object.defineProperty(i,u,l)}:function(i,n,a,u){u===void 0&&(u=a),i[u]=n[a]}),__setModuleDefault$1=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(i,n){Object.defineProperty(i,"default",{enumerable:!0,value:n})}:function(i,n){i.default=n}),__importStar$1=commonjsGlobal&&commonjsGlobal.__importStar||function(i){if(i&&i.__esModule)return i;var n={};if(i!=null)for(var a in i)a!=="default"&&Object.prototype.hasOwnProperty.call(i,a)&&__createBinding$1(n,i,a);return __setModuleDefault$1(n,i),n};Object.defineProperty(multisig,"__esModule",{value:!0});multisig.CompactBitArray=multisig.MultiSignature=multisig.protobufPackage=void 0;const _m0$1=__importStar$1(minimal),helpers_1$1=helpers;multisig.protobufPackage="cosmos.crypto.multisig.v1beta1";function createBaseMultiSignature(){return{signatures:[]}}multisig.MultiSignature={encode(i,n=_m0$1.Writer.create()){for(const a of i.signatures)n.uint32(10).bytes(a);return n},decode(i,n){const a=i instanceof _m0$1.Reader?i:new _m0$1.Reader(i);let u=n===void 0?a.len:a.pos+n;const l=createBaseMultiSignature();for(;a.pos<u;){const c=a.uint32();switch(c>>>3){case 1:l.signatures.push(a.bytes());break;default:a.skipType(c&7);break}}return l},fromJSON(i){return{signatures:Array.isArray(i==null?void 0:i.signatures)?i.signatures.map(n=>(0,helpers_1$1.bytesFromBase64)(n)):[]}},toJSON(i){const n={};return i.signatures?n.signatures=i.signatures.map(a=>(0,helpers_1$1.base64FromBytes)(a!==void 0?a:new Uint8Array)):n.signatures=[],n},fromPartial(i){var n;const a=createBaseMultiSignature();return a.signatures=((n=i.signatures)==null?void 0:n.map(u=>u))||[],a}};function createBaseCompactBitArray(){return{extraBitsStored:0,elems:new Uint8Array}}multisig.CompactBitArray={encode(i,n=_m0$1.Writer.create()){return i.extraBitsStored!==0&&n.uint32(8).uint32(i.extraBitsStored),i.elems.length!==0&&n.uint32(18).bytes(i.elems),n},decode(i,n){const a=i instanceof _m0$1.Reader?i:new _m0$1.Reader(i);let u=n===void 0?a.len:a.pos+n;const l=createBaseCompactBitArray();for(;a.pos<u;){const c=a.uint32();switch(c>>>3){case 1:l.extraBitsStored=a.uint32();break;case 2:l.elems=a.bytes();break;default:a.skipType(c&7);break}}return l},fromJSON(i){return{extraBitsStored:(0,helpers_1$1.isSet)(i.extraBitsStored)?Number(i.extraBitsStored):0,elems:(0,helpers_1$1.isSet)(i.elems)?(0,helpers_1$1.bytesFromBase64)(i.elems):new Uint8Array}},toJSON(i){const n={};return i.extraBitsStored!==void 0&&(n.extraBitsStored=Math.round(i.extraBitsStored)),i.elems!==void 0&&(n.elems=(0,helpers_1$1.base64FromBytes)(i.elems!==void 0?i.elems:new Uint8Array)),n},fromPartial(i){const n=createBaseCompactBitArray();return n.extraBitsStored=i.extraBitsStored??0,n.elems=i.elems??new Uint8Array,n}};(function(i){var n=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(U,V,j,Z){Z===void 0&&(Z=j);var Y=Object.getOwnPropertyDescriptor(V,j);(!Y||("get"in Y?!V.__esModule:Y.writable||Y.configurable))&&(Y={enumerable:!0,get:function(){return V[j]}}),Object.defineProperty(U,Z,Y)}:function(U,V,j,Z){Z===void 0&&(Z=j),U[Z]=V[j]}),a=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(U,V){Object.defineProperty(U,"default",{enumerable:!0,value:V})}:function(U,V){U.default=V}),u=commonjsGlobal&&commonjsGlobal.__importStar||function(U){if(U&&U.__esModule)return U;var V={};if(U!=null)for(var j in U)j!=="default"&&Object.prototype.hasOwnProperty.call(U,j)&&n(V,U,j);return a(V,U),V};Object.defineProperty(i,"__esModule",{value:!0}),i.SignatureDescriptor_Data_Multi=i.SignatureDescriptor_Data_Single=i.SignatureDescriptor_Data=i.SignatureDescriptor=i.SignatureDescriptors=i.signModeToJSON=i.signModeFromJSON=i.SignMode=i.protobufPackage=void 0;const l=multisig,c=any,S=helpers,I=u(minimal);i.protobufPackage="cosmos.tx.signing.v1beta1";var y;(function(U){U[U.SIGN_MODE_UNSPECIFIED=0]="SIGN_MODE_UNSPECIFIED",U[U.SIGN_MODE_DIRECT=1]="SIGN_MODE_DIRECT",U[U.SIGN_MODE_TEXTUAL=2]="SIGN_MODE_TEXTUAL",U[U.SIGN_MODE_DIRECT_AUX=3]="SIGN_MODE_DIRECT_AUX",U[U.SIGN_MODE_LEGACY_AMINO_JSON=127]="SIGN_MODE_LEGACY_AMINO_JSON",U[U.SIGN_MODE_EIP_191=191]="SIGN_MODE_EIP_191",U[U.UNRECOGNIZED=-1]="UNRECOGNIZED"})(y=i.SignMode||(i.SignMode={}));function g(U){switch(U){case 0:case"SIGN_MODE_UNSPECIFIED":return y.SIGN_MODE_UNSPECIFIED;case 1:case"SIGN_MODE_DIRECT":return y.SIGN_MODE_DIRECT;case 2:case"SIGN_MODE_TEXTUAL":return y.SIGN_MODE_TEXTUAL;case 3:case"SIGN_MODE_DIRECT_AUX":return y.SIGN_MODE_DIRECT_AUX;case 127:case"SIGN_MODE_LEGACY_AMINO_JSON":return y.SIGN_MODE_LEGACY_AMINO_JSON;case 191:case"SIGN_MODE_EIP_191":return y.SIGN_MODE_EIP_191;case-1:case"UNRECOGNIZED":default:return y.UNRECOGNIZED}}i.signModeFromJSON=g;function N(U){switch(U){case y.SIGN_MODE_UNSPECIFIED:return"SIGN_MODE_UNSPECIFIED";case y.SIGN_MODE_DIRECT:return"SIGN_MODE_DIRECT";case y.SIGN_MODE_TEXTUAL:return"SIGN_MODE_TEXTUAL";case y.SIGN_MODE_DIRECT_AUX:return"SIGN_MODE_DIRECT_AUX";case y.SIGN_MODE_LEGACY_AMINO_JSON:return"SIGN_MODE_LEGACY_AMINO_JSON";case y.SIGN_MODE_EIP_191:return"SIGN_MODE_EIP_191";case y.UNRECOGNIZED:default:return"UNRECOGNIZED"}}i.signModeToJSON=N;function F(){return{signatures:[]}}i.SignatureDescriptors={encode(U,V=I.Writer.create()){for(const j of U.signatures)i.SignatureDescriptor.encode(j,V.uint32(10).fork()).ldelim();return V},decode(U,V){const j=U instanceof I.Reader?U:new I.Reader(U);let Z=V===void 0?j.len:j.pos+V;const Y=F();for(;j.pos<Z;){const rt=j.uint32();switch(rt>>>3){case 1:Y.signatures.push(i.SignatureDescriptor.decode(j,j.uint32()));break;default:j.skipType(rt&7);break}}return Y},fromJSON(U){return{signatures:Array.isArray(U==null?void 0:U.signatures)?U.signatures.map(V=>i.SignatureDescriptor.fromJSON(V)):[]}},toJSON(U){const V={};return U.signatures?V.signatures=U.signatures.map(j=>j?i.SignatureDescriptor.toJSON(j):void 0):V.signatures=[],V},fromPartial(U){var V;const j=F();return j.signatures=((V=U.signatures)==null?void 0:V.map(Z=>i.SignatureDescriptor.fromPartial(Z)))||[],j}};function H(){return{publicKey:void 0,data:void 0,sequence:S.Long.UZERO}}i.SignatureDescriptor={encode(U,V=I.Writer.create()){return U.publicKey!==void 0&&c.Any.encode(U.publicKey,V.uint32(10).fork()).ldelim(),U.data!==void 0&&i.SignatureDescriptor_Data.encode(U.data,V.uint32(18).fork()).ldelim(),U.sequence.isZero()||V.uint32(24).uint64(U.sequence),V},decode(U,V){const j=U instanceof I.Reader?U:new I.Reader(U);let Z=V===void 0?j.len:j.pos+V;const Y=H();for(;j.pos<Z;){const rt=j.uint32();switch(rt>>>3){case 1:Y.publicKey=c.Any.decode(j,j.uint32());break;case 2:Y.data=i.SignatureDescriptor_Data.decode(j,j.uint32());break;case 3:Y.sequence=j.uint64();break;default:j.skipType(rt&7);break}}return Y},fromJSON(U){return{publicKey:(0,S.isSet)(U.publicKey)?c.Any.fromJSON(U.publicKey):void 0,data:(0,S.isSet)(U.data)?i.SignatureDescriptor_Data.fromJSON(U.data):void 0,sequence:(0,S.isSet)(U.sequence)?S.Long.fromValue(U.sequence):S.Long.UZERO}},toJSON(U){const V={};return U.publicKey!==void 0&&(V.publicKey=U.publicKey?c.Any.toJSON(U.publicKey):void 0),U.data!==void 0&&(V.data=U.data?i.SignatureDescriptor_Data.toJSON(U.data):void 0),U.sequence!==void 0&&(V.sequence=(U.sequence||S.Long.UZERO).toString()),V},fromPartial(U){const V=H();return V.publicKey=U.publicKey!==void 0&&U.publicKey!==null?c.Any.fromPartial(U.publicKey):void 0,V.data=U.data!==void 0&&U.data!==null?i.SignatureDescriptor_Data.fromPartial(U.data):void 0,V.sequence=U.sequence!==void 0&&U.sequence!==null?S.Long.fromValue(U.sequence):S.Long.UZERO,V}};function G(){return{single:void 0,multi:void 0}}i.SignatureDescriptor_Data={encode(U,V=I.Writer.create()){return U.single!==void 0&&i.SignatureDescriptor_Data_Single.encode(U.single,V.uint32(10).fork()).ldelim(),U.multi!==void 0&&i.SignatureDescriptor_Data_Multi.encode(U.multi,V.uint32(18).fork()).ldelim(),V},decode(U,V){const j=U instanceof I.Reader?U:new I.Reader(U);let Z=V===void 0?j.len:j.pos+V;const Y=G();for(;j.pos<Z;){const rt=j.uint32();switch(rt>>>3){case 1:Y.single=i.SignatureDescriptor_Data_Single.decode(j,j.uint32());break;case 2:Y.multi=i.SignatureDescriptor_Data_Multi.decode(j,j.uint32());break;default:j.skipType(rt&7);break}}return Y},fromJSON(U){return{single:(0,S.isSet)(U.single)?i.SignatureDescriptor_Data_Single.fromJSON(U.single):void 0,multi:(0,S.isSet)(U.multi)?i.SignatureDescriptor_Data_Multi.fromJSON(U.multi):void 0}},toJSON(U){const V={};return U.single!==void 0&&(V.single=U.single?i.SignatureDescriptor_Data_Single.toJSON(U.single):void 0),U.multi!==void 0&&(V.multi=U.multi?i.SignatureDescriptor_Data_Multi.toJSON(U.multi):void 0),V},fromPartial(U){const V=G();return V.single=U.single!==void 0&&U.single!==null?i.SignatureDescriptor_Data_Single.fromPartial(U.single):void 0,V.multi=U.multi!==void 0&&U.multi!==null?i.SignatureDescriptor_Data_Multi.fromPartial(U.multi):void 0,V}};function q(){return{mode:0,signature:new Uint8Array}}i.SignatureDescriptor_Data_Single={encode(U,V=I.Writer.create()){return U.mode!==0&&V.uint32(8).int32(U.mode),U.signature.length!==0&&V.uint32(18).bytes(U.signature),V},decode(U,V){const j=U instanceof I.Reader?U:new I.Reader(U);let Z=V===void 0?j.len:j.pos+V;const Y=q();for(;j.pos<Z;){const rt=j.uint32();switch(rt>>>3){case 1:Y.mode=j.int32();break;case 2:Y.signature=j.bytes();break;default:j.skipType(rt&7);break}}return Y},fromJSON(U){return{mode:(0,S.isSet)(U.mode)?g(U.mode):0,signature:(0,S.isSet)(U.signature)?(0,S.bytesFromBase64)(U.signature):new Uint8Array}},toJSON(U){const V={};return U.mode!==void 0&&(V.mode=N(U.mode)),U.signature!==void 0&&(V.signature=(0,S.base64FromBytes)(U.signature!==void 0?U.signature:new Uint8Array)),V},fromPartial(U){const V=q();return V.mode=U.mode??0,V.signature=U.signature??new Uint8Array,V}};function X(){return{bitarray:void 0,signatures:[]}}i.SignatureDescriptor_Data_Multi={encode(U,V=I.Writer.create()){U.bitarray!==void 0&&l.CompactBitArray.encode(U.bitarray,V.uint32(10).fork()).ldelim();for(const j of U.signatures)i.SignatureDescriptor_Data.encode(j,V.uint32(18).fork()).ldelim();return V},decode(U,V){const j=U instanceof I.Reader?U:new I.Reader(U);let Z=V===void 0?j.len:j.pos+V;const Y=X();for(;j.pos<Z;){const rt=j.uint32();switch(rt>>>3){case 1:Y.bitarray=l.CompactBitArray.decode(j,j.uint32());break;case 2:Y.signatures.push(i.SignatureDescriptor_Data.decode(j,j.uint32()));break;default:j.skipType(rt&7);break}}return Y},fromJSON(U){return{bitarray:(0,S.isSet)(U.bitarray)?l.CompactBitArray.fromJSON(U.bitarray):void 0,signatures:Array.isArray(U==null?void 0:U.signatures)?U.signatures.map(V=>i.SignatureDescriptor_Data.fromJSON(V)):[]}},toJSON(U){const V={};return U.bitarray!==void 0&&(V.bitarray=U.bitarray?l.CompactBitArray.toJSON(U.bitarray):void 0),U.signatures?V.signatures=U.signatures.map(j=>j?i.SignatureDescriptor_Data.toJSON(j):void 0):V.signatures=[],V},fromPartial(U){var V;const j=X();return j.bitarray=U.bitarray!==void 0&&U.bitarray!==null?l.CompactBitArray.fromPartial(U.bitarray):void 0,j.signatures=((V=U.signatures)==null?void 0:V.map(Z=>i.SignatureDescriptor_Data.fromPartial(Z)))||[],j}}})(signing);var coin={},__createBinding=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(i,n,a,u){u===void 0&&(u=a);var l=Object.getOwnPropertyDescriptor(n,a);(!l||("get"in l?!n.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return n[a]}}),Object.defineProperty(i,u,l)}:function(i,n,a,u){u===void 0&&(u=a),i[u]=n[a]}),__setModuleDefault=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(i,n){Object.defineProperty(i,"default",{enumerable:!0,value:n})}:function(i,n){i.default=n}),__importStar=commonjsGlobal&&commonjsGlobal.__importStar||function(i){if(i&&i.__esModule)return i;var n={};if(i!=null)for(var a in i)a!=="default"&&Object.prototype.hasOwnProperty.call(i,a)&&__createBinding(n,i,a);return __setModuleDefault(n,i),n};Object.defineProperty(coin,"__esModule",{value:!0});coin.DecProto=coin.IntProto=coin.DecCoin=coin.Coin=coin.protobufPackage=void 0;const _m0=__importStar(minimal),helpers_1=helpers;coin.protobufPackage="cosmos.base.v1beta1";function createBaseCoin(){return{denom:"",amount:""}}coin.Coin={encode(i,n=_m0.Writer.create()){return i.denom!==""&&n.uint32(10).string(i.denom),i.amount!==""&&n.uint32(18).string(i.amount),n},decode(i,n){const a=i instanceof _m0.Reader?i:new _m0.Reader(i);let u=n===void 0?a.len:a.pos+n;const l=createBaseCoin();for(;a.pos<u;){const c=a.uint32();switch(c>>>3){case 1:l.denom=a.string();break;case 2:l.amount=a.string();break;default:a.skipType(c&7);break}}return l},fromJSON(i){return{denom:(0,helpers_1.isSet)(i.denom)?String(i.denom):"",amount:(0,helpers_1.isSet)(i.amount)?String(i.amount):""}},toJSON(i){const n={};return i.denom!==void 0&&(n.denom=i.denom),i.amount!==void 0&&(n.amount=i.amount),n},fromPartial(i){const n=createBaseCoin();return n.denom=i.denom??"",n.amount=i.amount??"",n}};function createBaseDecCoin(){return{denom:"",amount:""}}coin.DecCoin={encode(i,n=_m0.Writer.create()){return i.denom!==""&&n.uint32(10).string(i.denom),i.amount!==""&&n.uint32(18).string(i.amount),n},decode(i,n){const a=i instanceof _m0.Reader?i:new _m0.Reader(i);let u=n===void 0?a.len:a.pos+n;const l=createBaseDecCoin();for(;a.pos<u;){const c=a.uint32();switch(c>>>3){case 1:l.denom=a.string();break;case 2:l.amount=a.string();break;default:a.skipType(c&7);break}}return l},fromJSON(i){return{denom:(0,helpers_1.isSet)(i.denom)?String(i.denom):"",amount:(0,helpers_1.isSet)(i.amount)?String(i.amount):""}},toJSON(i){const n={};return i.denom!==void 0&&(n.denom=i.denom),i.amount!==void 0&&(n.amount=i.amount),n},fromPartial(i){const n=createBaseDecCoin();return n.denom=i.denom??"",n.amount=i.amount??"",n}};function createBaseIntProto(){return{int:""}}coin.IntProto={encode(i,n=_m0.Writer.create()){return i.int!==""&&n.uint32(10).string(i.int),n},decode(i,n){const a=i instanceof _m0.Reader?i:new _m0.Reader(i);let u=n===void 0?a.len:a.pos+n;const l=createBaseIntProto();for(;a.pos<u;){const c=a.uint32();switch(c>>>3){case 1:l.int=a.string();break;default:a.skipType(c&7);break}}return l},fromJSON(i){return{int:(0,helpers_1.isSet)(i.int)?String(i.int):""}},toJSON(i){const n={};return i.int!==void 0&&(n.int=i.int),n},fromPartial(i){const n=createBaseIntProto();return n.int=i.int??"",n}};function createBaseDecProto(){return{dec:""}}coin.DecProto={encode(i,n=_m0.Writer.create()){return i.dec!==""&&n.uint32(10).string(i.dec),n},decode(i,n){const a=i instanceof _m0.Reader?i:new _m0.Reader(i);let u=n===void 0?a.len:a.pos+n;const l=createBaseDecProto();for(;a.pos<u;){const c=a.uint32();switch(c>>>3){case 1:l.dec=a.string();break;default:a.skipType(c&7);break}}return l},fromJSON(i){return{dec:(0,helpers_1.isSet)(i.dec)?String(i.dec):""}},toJSON(i){const n={};return i.dec!==void 0&&(n.dec=i.dec),n},fromPartial(i){const n=createBaseDecProto();return n.dec=i.dec??"",n}};(function(i){var n=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(M,k,W,Q){Q===void 0&&(Q=W);var d=Object.getOwnPropertyDescriptor(k,W);(!d||("get"in d?!k.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return k[W]}}),Object.defineProperty(M,Q,d)}:function(M,k,W,Q){Q===void 0&&(Q=W),M[Q]=k[W]}),a=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(M,k){Object.defineProperty(M,"default",{enumerable:!0,value:k})}:function(M,k){M.default=k}),u=commonjsGlobal&&commonjsGlobal.__importStar||function(M){if(M&&M.__esModule)return M;var k={};if(M!=null)for(var W in M)W!=="default"&&Object.prototype.hasOwnProperty.call(M,W)&&n(k,M,W);return a(k,M),k};Object.defineProperty(i,"__esModule",{value:!0}),i.AuxSignerData=i.Tip=i.Fee=i.ModeInfo_Multi=i.ModeInfo_Single=i.ModeInfo=i.SignerInfo=i.AuthInfo=i.TxBody=i.SignDocDirectAux=i.SignDoc=i.TxRaw=i.Tx=i.protobufPackage=void 0;const l=any,c=signing,S=multisig,I=coin,y=helpers,g=u(minimal);i.protobufPackage="cosmos.tx.v1beta1";function N(){return{body:void 0,authInfo:void 0,signatures:[]}}i.Tx={encode(M,k=g.Writer.create()){M.body!==void 0&&i.TxBody.encode(M.body,k.uint32(10).fork()).ldelim(),M.authInfo!==void 0&&i.AuthInfo.encode(M.authInfo,k.uint32(18).fork()).ldelim();for(const W of M.signatures)k.uint32(26).bytes(W);return k},decode(M,k){const W=M instanceof g.Reader?M:new g.Reader(M);let Q=k===void 0?W.len:W.pos+k;const d=N();for(;W.pos<Q;){const E=W.uint32();switch(E>>>3){case 1:d.body=i.TxBody.decode(W,W.uint32());break;case 2:d.authInfo=i.AuthInfo.decode(W,W.uint32());break;case 3:d.signatures.push(W.bytes());break;default:W.skipType(E&7);break}}return d},fromJSON(M){return{body:(0,y.isSet)(M.body)?i.TxBody.fromJSON(M.body):void 0,authInfo:(0,y.isSet)(M.authInfo)?i.AuthInfo.fromJSON(M.authInfo):void 0,signatures:Array.isArray(M==null?void 0:M.signatures)?M.signatures.map(k=>(0,y.bytesFromBase64)(k)):[]}},toJSON(M){const k={};return M.body!==void 0&&(k.body=M.body?i.TxBody.toJSON(M.body):void 0),M.authInfo!==void 0&&(k.authInfo=M.authInfo?i.AuthInfo.toJSON(M.authInfo):void 0),M.signatures?k.signatures=M.signatures.map(W=>(0,y.base64FromBytes)(W!==void 0?W:new Uint8Array)):k.signatures=[],k},fromPartial(M){var k;const W=N();return W.body=M.body!==void 0&&M.body!==null?i.TxBody.fromPartial(M.body):void 0,W.authInfo=M.authInfo!==void 0&&M.authInfo!==null?i.AuthInfo.fromPartial(M.authInfo):void 0,W.signatures=((k=M.signatures)==null?void 0:k.map(Q=>Q))||[],W}};function F(){return{bodyBytes:new Uint8Array,authInfoBytes:new Uint8Array,signatures:[]}}i.TxRaw={encode(M,k=g.Writer.create()){M.bodyBytes.length!==0&&k.uint32(10).bytes(M.bodyBytes),M.authInfoBytes.length!==0&&k.uint32(18).bytes(M.authInfoBytes);for(const W of M.signatures)k.uint32(26).bytes(W);return k},decode(M,k){const W=M instanceof g.Reader?M:new g.Reader(M);let Q=k===void 0?W.len:W.pos+k;const d=F();for(;W.pos<Q;){const E=W.uint32();switch(E>>>3){case 1:d.bodyBytes=W.bytes();break;case 2:d.authInfoBytes=W.bytes();break;case 3:d.signatures.push(W.bytes());break;default:W.skipType(E&7);break}}return d},fromJSON(M){return{bodyBytes:(0,y.isSet)(M.bodyBytes)?(0,y.bytesFromBase64)(M.bodyBytes):new Uint8Array,authInfoBytes:(0,y.isSet)(M.authInfoBytes)?(0,y.bytesFromBase64)(M.authInfoBytes):new Uint8Array,signatures:Array.isArray(M==null?void 0:M.signatures)?M.signatures.map(k=>(0,y.bytesFromBase64)(k)):[]}},toJSON(M){const k={};return M.bodyBytes!==void 0&&(k.bodyBytes=(0,y.base64FromBytes)(M.bodyBytes!==void 0?M.bodyBytes:new Uint8Array)),M.authInfoBytes!==void 0&&(k.authInfoBytes=(0,y.base64FromBytes)(M.authInfoBytes!==void 0?M.authInfoBytes:new Uint8Array)),M.signatures?k.signatures=M.signatures.map(W=>(0,y.base64FromBytes)(W!==void 0?W:new Uint8Array)):k.signatures=[],k},fromPartial(M){var k;const W=F();return W.bodyBytes=M.bodyBytes??new Uint8Array,W.authInfoBytes=M.authInfoBytes??new Uint8Array,W.signatures=((k=M.signatures)==null?void 0:k.map(Q=>Q))||[],W}};function H(){return{bodyBytes:new Uint8Array,authInfoBytes:new Uint8Array,chainId:"",accountNumber:y.Long.UZERO}}i.SignDoc={encode(M,k=g.Writer.create()){return M.bodyBytes.length!==0&&k.uint32(10).bytes(M.bodyBytes),M.authInfoBytes.length!==0&&k.uint32(18).bytes(M.authInfoBytes),M.chainId!==""&&k.uint32(26).string(M.chainId),M.accountNumber.isZero()||k.uint32(32).uint64(M.accountNumber),k},decode(M,k){const W=M instanceof g.Reader?M:new g.Reader(M);let Q=k===void 0?W.len:W.pos+k;const d=H();for(;W.pos<Q;){const E=W.uint32();switch(E>>>3){case 1:d.bodyBytes=W.bytes();break;case 2:d.authInfoBytes=W.bytes();break;case 3:d.chainId=W.string();break;case 4:d.accountNumber=W.uint64();break;default:W.skipType(E&7);break}}return d},fromJSON(M){return{bodyBytes:(0,y.isSet)(M.bodyBytes)?(0,y.bytesFromBase64)(M.bodyBytes):new Uint8Array,authInfoBytes:(0,y.isSet)(M.authInfoBytes)?(0,y.bytesFromBase64)(M.authInfoBytes):new Uint8Array,chainId:(0,y.isSet)(M.chainId)?String(M.chainId):"",accountNumber:(0,y.isSet)(M.accountNumber)?y.Long.fromValue(M.accountNumber):y.Long.UZERO}},toJSON(M){const k={};return M.bodyBytes!==void 0&&(k.bodyBytes=(0,y.base64FromBytes)(M.bodyBytes!==void 0?M.bodyBytes:new Uint8Array)),M.authInfoBytes!==void 0&&(k.authInfoBytes=(0,y.base64FromBytes)(M.authInfoBytes!==void 0?M.authInfoBytes:new Uint8Array)),M.chainId!==void 0&&(k.chainId=M.chainId),M.accountNumber!==void 0&&(k.accountNumber=(M.accountNumber||y.Long.UZERO).toString()),k},fromPartial(M){const k=H();return k.bodyBytes=M.bodyBytes??new Uint8Array,k.authInfoBytes=M.authInfoBytes??new Uint8Array,k.chainId=M.chainId??"",k.accountNumber=M.accountNumber!==void 0&&M.accountNumber!==null?y.Long.fromValue(M.accountNumber):y.Long.UZERO,k}};function G(){return{bodyBytes:new Uint8Array,publicKey:void 0,chainId:"",accountNumber:y.Long.UZERO,sequence:y.Long.UZERO,tip:void 0}}i.SignDocDirectAux={encode(M,k=g.Writer.create()){return M.bodyBytes.length!==0&&k.uint32(10).bytes(M.bodyBytes),M.publicKey!==void 0&&l.Any.encode(M.publicKey,k.uint32(18).fork()).ldelim(),M.chainId!==""&&k.uint32(26).string(M.chainId),M.accountNumber.isZero()||k.uint32(32).uint64(M.accountNumber),M.sequence.isZero()||k.uint32(40).uint64(M.sequence),M.tip!==void 0&&i.Tip.encode(M.tip,k.uint32(50).fork()).ldelim(),k},decode(M,k){const W=M instanceof g.Reader?M:new g.Reader(M);let Q=k===void 0?W.len:W.pos+k;const d=G();for(;W.pos<Q;){const E=W.uint32();switch(E>>>3){case 1:d.bodyBytes=W.bytes();break;case 2:d.publicKey=l.Any.decode(W,W.uint32());break;case 3:d.chainId=W.string();break;case 4:d.accountNumber=W.uint64();break;case 5:d.sequence=W.uint64();break;case 6:d.tip=i.Tip.decode(W,W.uint32());break;default:W.skipType(E&7);break}}return d},fromJSON(M){return{bodyBytes:(0,y.isSet)(M.bodyBytes)?(0,y.bytesFromBase64)(M.bodyBytes):new Uint8Array,publicKey:(0,y.isSet)(M.publicKey)?l.Any.fromJSON(M.publicKey):void 0,chainId:(0,y.isSet)(M.chainId)?String(M.chainId):"",accountNumber:(0,y.isSet)(M.accountNumber)?y.Long.fromValue(M.accountNumber):y.Long.UZERO,sequence:(0,y.isSet)(M.sequence)?y.Long.fromValue(M.sequence):y.Long.UZERO,tip:(0,y.isSet)(M.tip)?i.Tip.fromJSON(M.tip):void 0}},toJSON(M){const k={};return M.bodyBytes!==void 0&&(k.bodyBytes=(0,y.base64FromBytes)(M.bodyBytes!==void 0?M.bodyBytes:new Uint8Array)),M.publicKey!==void 0&&(k.publicKey=M.publicKey?l.Any.toJSON(M.publicKey):void 0),M.chainId!==void 0&&(k.chainId=M.chainId),M.accountNumber!==void 0&&(k.accountNumber=(M.accountNumber||y.Long.UZERO).toString()),M.sequence!==void 0&&(k.sequence=(M.sequence||y.Long.UZERO).toString()),M.tip!==void 0&&(k.tip=M.tip?i.Tip.toJSON(M.tip):void 0),k},fromPartial(M){const k=G();return k.bodyBytes=M.bodyBytes??new Uint8Array,k.publicKey=M.publicKey!==void 0&&M.publicKey!==null?l.Any.fromPartial(M.publicKey):void 0,k.chainId=M.chainId??"",k.accountNumber=M.accountNumber!==void 0&&M.accountNumber!==null?y.Long.fromValue(M.accountNumber):y.Long.UZERO,k.sequence=M.sequence!==void 0&&M.sequence!==null?y.Long.fromValue(M.sequence):y.Long.UZERO,k.tip=M.tip!==void 0&&M.tip!==null?i.Tip.fromPartial(M.tip):void 0,k}};function q(){return{messages:[],memo:"",timeoutHeight:y.Long.UZERO,extensionOptions:[],nonCriticalExtensionOptions:[]}}i.TxBody={encode(M,k=g.Writer.create()){for(const W of M.messages)l.Any.encode(W,k.uint32(10).fork()).ldelim();M.memo!==""&&k.uint32(18).string(M.memo),M.timeoutHeight.isZero()||k.uint32(24).uint64(M.timeoutHeight);for(const W of M.extensionOptions)l.Any.encode(W,k.uint32(8186).fork()).ldelim();for(const W of M.nonCriticalExtensionOptions)l.Any.encode(W,k.uint32(16378).fork()).ldelim();return k},decode(M,k){const W=M instanceof g.Reader?M:new g.Reader(M);let Q=k===void 0?W.len:W.pos+k;const d=q();for(;W.pos<Q;){const E=W.uint32();switch(E>>>3){case 1:d.messages.push(l.Any.decode(W,W.uint32()));break;case 2:d.memo=W.string();break;case 3:d.timeoutHeight=W.uint64();break;case 1023:d.extensionOptions.push(l.Any.decode(W,W.uint32()));break;case 2047:d.nonCriticalExtensionOptions.push(l.Any.decode(W,W.uint32()));break;default:W.skipType(E&7);break}}return d},fromJSON(M){return{messages:Array.isArray(M==null?void 0:M.messages)?M.messages.map(k=>l.Any.fromJSON(k)):[],memo:(0,y.isSet)(M.memo)?String(M.memo):"",timeoutHeight:(0,y.isSet)(M.timeoutHeight)?y.Long.fromValue(M.timeoutHeight):y.Long.UZERO,extensionOptions:Array.isArray(M==null?void 0:M.extensionOptions)?M.extensionOptions.map(k=>l.Any.fromJSON(k)):[],nonCriticalExtensionOptions:Array.isArray(M==null?void 0:M.nonCriticalExtensionOptions)?M.nonCriticalExtensionOptions.map(k=>l.Any.fromJSON(k)):[]}},toJSON(M){const k={};return M.messages?k.messages=M.messages.map(W=>W?l.Any.toJSON(W):void 0):k.messages=[],M.memo!==void 0&&(k.memo=M.memo),M.timeoutHeight!==void 0&&(k.timeoutHeight=(M.timeoutHeight||y.Long.UZERO).toString()),M.extensionOptions?k.extensionOptions=M.extensionOptions.map(W=>W?l.Any.toJSON(W):void 0):k.extensionOptions=[],M.nonCriticalExtensionOptions?k.nonCriticalExtensionOptions=M.nonCriticalExtensionOptions.map(W=>W?l.Any.toJSON(W):void 0):k.nonCriticalExtensionOptions=[],k},fromPartial(M){var k,W,Q;const d=q();return d.messages=((k=M.messages)==null?void 0:k.map(E=>l.Any.fromPartial(E)))||[],d.memo=M.memo??"",d.timeoutHeight=M.timeoutHeight!==void 0&&M.timeoutHeight!==null?y.Long.fromValue(M.timeoutHeight):y.Long.UZERO,d.extensionOptions=((W=M.extensionOptions)==null?void 0:W.map(E=>l.Any.fromPartial(E)))||[],d.nonCriticalExtensionOptions=((Q=M.nonCriticalExtensionOptions)==null?void 0:Q.map(E=>l.Any.fromPartial(E)))||[],d}};function X(){return{signerInfos:[],fee:void 0,tip:void 0}}i.AuthInfo={encode(M,k=g.Writer.create()){for(const W of M.signerInfos)i.SignerInfo.encode(W,k.uint32(10).fork()).ldelim();return M.fee!==void 0&&i.Fee.encode(M.fee,k.uint32(18).fork()).ldelim(),M.tip!==void 0&&i.Tip.encode(M.tip,k.uint32(26).fork()).ldelim(),k},decode(M,k){const W=M instanceof g.Reader?M:new g.Reader(M);let Q=k===void 0?W.len:W.pos+k;const d=X();for(;W.pos<Q;){const E=W.uint32();switch(E>>>3){case 1:d.signerInfos.push(i.SignerInfo.decode(W,W.uint32()));break;case 2:d.fee=i.Fee.decode(W,W.uint32());break;case 3:d.tip=i.Tip.decode(W,W.uint32());break;default:W.skipType(E&7);break}}return d},fromJSON(M){return{signerInfos:Array.isArray(M==null?void 0:M.signerInfos)?M.signerInfos.map(k=>i.SignerInfo.fromJSON(k)):[],fee:(0,y.isSet)(M.fee)?i.Fee.fromJSON(M.fee):void 0,tip:(0,y.isSet)(M.tip)?i.Tip.fromJSON(M.tip):void 0}},toJSON(M){const k={};return M.signerInfos?k.signerInfos=M.signerInfos.map(W=>W?i.SignerInfo.toJSON(W):void 0):k.signerInfos=[],M.fee!==void 0&&(k.fee=M.fee?i.Fee.toJSON(M.fee):void 0),M.tip!==void 0&&(k.tip=M.tip?i.Tip.toJSON(M.tip):void 0),k},fromPartial(M){var k;const W=X();return W.signerInfos=((k=M.signerInfos)==null?void 0:k.map(Q=>i.SignerInfo.fromPartial(Q)))||[],W.fee=M.fee!==void 0&&M.fee!==null?i.Fee.fromPartial(M.fee):void 0,W.tip=M.tip!==void 0&&M.tip!==null?i.Tip.fromPartial(M.tip):void 0,W}};function U(){return{publicKey:void 0,modeInfo:void 0,sequence:y.Long.UZERO}}i.SignerInfo={encode(M,k=g.Writer.create()){return M.publicKey!==void 0&&l.Any.encode(M.publicKey,k.uint32(10).fork()).ldelim(),M.modeInfo!==void 0&&i.ModeInfo.encode(M.modeInfo,k.uint32(18).fork()).ldelim(),M.sequence.isZero()||k.uint32(24).uint64(M.sequence),k},decode(M,k){const W=M instanceof g.Reader?M:new g.Reader(M);let Q=k===void 0?W.len:W.pos+k;const d=U();for(;W.pos<Q;){const E=W.uint32();switch(E>>>3){case 1:d.publicKey=l.Any.decode(W,W.uint32());break;case 2:d.modeInfo=i.ModeInfo.decode(W,W.uint32());break;case 3:d.sequence=W.uint64();break;default:W.skipType(E&7);break}}return d},fromJSON(M){return{publicKey:(0,y.isSet)(M.publicKey)?l.Any.fromJSON(M.publicKey):void 0,modeInfo:(0,y.isSet)(M.modeInfo)?i.ModeInfo.fromJSON(M.modeInfo):void 0,sequence:(0,y.isSet)(M.sequence)?y.Long.fromValue(M.sequence):y.Long.UZERO}},toJSON(M){const k={};return M.publicKey!==void 0&&(k.publicKey=M.publicKey?l.Any.toJSON(M.publicKey):void 0),M.modeInfo!==void 0&&(k.modeInfo=M.modeInfo?i.ModeInfo.toJSON(M.modeInfo):void 0),M.sequence!==void 0&&(k.sequence=(M.sequence||y.Long.UZERO).toString()),k},fromPartial(M){const k=U();return k.publicKey=M.publicKey!==void 0&&M.publicKey!==null?l.Any.fromPartial(M.publicKey):void 0,k.modeInfo=M.modeInfo!==void 0&&M.modeInfo!==null?i.ModeInfo.fromPartial(M.modeInfo):void 0,k.sequence=M.sequence!==void 0&&M.sequence!==null?y.Long.fromValue(M.sequence):y.Long.UZERO,k}};function V(){return{single:void 0,multi:void 0}}i.ModeInfo={encode(M,k=g.Writer.create()){return M.single!==void 0&&i.ModeInfo_Single.encode(M.single,k.uint32(10).fork()).ldelim(),M.multi!==void 0&&i.ModeInfo_Multi.encode(M.multi,k.uint32(18).fork()).ldelim(),k},decode(M,k){const W=M instanceof g.Reader?M:new g.Reader(M);let Q=k===void 0?W.len:W.pos+k;const d=V();for(;W.pos<Q;){const E=W.uint32();switch(E>>>3){case 1:d.single=i.ModeInfo_Single.decode(W,W.uint32());break;case 2:d.multi=i.ModeInfo_Multi.decode(W,W.uint32());break;default:W.skipType(E&7);break}}return d},fromJSON(M){return{single:(0,y.isSet)(M.single)?i.ModeInfo_Single.fromJSON(M.single):void 0,multi:(0,y.isSet)(M.multi)?i.ModeInfo_Multi.fromJSON(M.multi):void 0}},toJSON(M){const k={};return M.single!==void 0&&(k.single=M.single?i.ModeInfo_Single.toJSON(M.single):void 0),M.multi!==void 0&&(k.multi=M.multi?i.ModeInfo_Multi.toJSON(M.multi):void 0),k},fromPartial(M){const k=V();return k.single=M.single!==void 0&&M.single!==null?i.ModeInfo_Single.fromPartial(M.single):void 0,k.multi=M.multi!==void 0&&M.multi!==null?i.ModeInfo_Multi.fromPartial(M.multi):void 0,k}};function j(){return{mode:0}}i.ModeInfo_Single={encode(M,k=g.Writer.create()){return M.mode!==0&&k.uint32(8).int32(M.mode),k},decode(M,k){const W=M instanceof g.Reader?M:new g.Reader(M);let Q=k===void 0?W.len:W.pos+k;const d=j();for(;W.pos<Q;){const E=W.uint32();switch(E>>>3){case 1:d.mode=W.int32();break;default:W.skipType(E&7);break}}return d},fromJSON(M){return{mode:(0,y.isSet)(M.mode)?(0,c.signModeFromJSON)(M.mode):0}},toJSON(M){const k={};return M.mode!==void 0&&(k.mode=(0,c.signModeToJSON)(M.mode)),k},fromPartial(M){const k=j();return k.mode=M.mode??0,k}};function Z(){return{bitarray:void 0,modeInfos:[]}}i.ModeInfo_Multi={encode(M,k=g.Writer.create()){M.bitarray!==void 0&&S.CompactBitArray.encode(M.bitarray,k.uint32(10).fork()).ldelim();for(const W of M.modeInfos)i.ModeInfo.encode(W,k.uint32(18).fork()).ldelim();return k},decode(M,k){const W=M instanceof g.Reader?M:new g.Reader(M);let Q=k===void 0?W.len:W.pos+k;const d=Z();for(;W.pos<Q;){const E=W.uint32();switch(E>>>3){case 1:d.bitarray=S.CompactBitArray.decode(W,W.uint32());break;case 2:d.modeInfos.push(i.ModeInfo.decode(W,W.uint32()));break;default:W.skipType(E&7);break}}return d},fromJSON(M){return{bitarray:(0,y.isSet)(M.bitarray)?S.CompactBitArray.fromJSON(M.bitarray):void 0,modeInfos:Array.isArray(M==null?void 0:M.modeInfos)?M.modeInfos.map(k=>i.ModeInfo.fromJSON(k)):[]}},toJSON(M){const k={};return M.bitarray!==void 0&&(k.bitarray=M.bitarray?S.CompactBitArray.toJSON(M.bitarray):void 0),M.modeInfos?k.modeInfos=M.modeInfos.map(W=>W?i.ModeInfo.toJSON(W):void 0):k.modeInfos=[],k},fromPartial(M){var k;const W=Z();return W.bitarray=M.bitarray!==void 0&&M.bitarray!==null?S.CompactBitArray.fromPartial(M.bitarray):void 0,W.modeInfos=((k=M.modeInfos)==null?void 0:k.map(Q=>i.ModeInfo.fromPartial(Q)))||[],W}};function Y(){return{amount:[],gasLimit:y.Long.UZERO,payer:"",granter:""}}i.Fee={encode(M,k=g.Writer.create()){for(const W of M.amount)I.Coin.encode(W,k.uint32(10).fork()).ldelim();return M.gasLimit.isZero()||k.uint32(16).uint64(M.gasLimit),M.payer!==""&&k.uint32(26).string(M.payer),M.granter!==""&&k.uint32(34).string(M.granter),k},decode(M,k){const W=M instanceof g.Reader?M:new g.Reader(M);let Q=k===void 0?W.len:W.pos+k;const d=Y();for(;W.pos<Q;){const E=W.uint32();switch(E>>>3){case 1:d.amount.push(I.Coin.decode(W,W.uint32()));break;case 2:d.gasLimit=W.uint64();break;case 3:d.payer=W.string();break;case 4:d.granter=W.string();break;default:W.skipType(E&7);break}}return d},fromJSON(M){return{amount:Array.isArray(M==null?void 0:M.amount)?M.amount.map(k=>I.Coin.fromJSON(k)):[],gasLimit:(0,y.isSet)(M.gasLimit)?y.Long.fromValue(M.gasLimit):y.Long.UZERO,payer:(0,y.isSet)(M.payer)?String(M.payer):"",granter:(0,y.isSet)(M.granter)?String(M.granter):""}},toJSON(M){const k={};return M.amount?k.amount=M.amount.map(W=>W?I.Coin.toJSON(W):void 0):k.amount=[],M.gasLimit!==void 0&&(k.gasLimit=(M.gasLimit||y.Long.UZERO).toString()),M.payer!==void 0&&(k.payer=M.payer),M.granter!==void 0&&(k.granter=M.granter),k},fromPartial(M){var k;const W=Y();return W.amount=((k=M.amount)==null?void 0:k.map(Q=>I.Coin.fromPartial(Q)))||[],W.gasLimit=M.gasLimit!==void 0&&M.gasLimit!==null?y.Long.fromValue(M.gasLimit):y.Long.UZERO,W.payer=M.payer??"",W.granter=M.granter??"",W}};function rt(){return{amount:[],tipper:""}}i.Tip={encode(M,k=g.Writer.create()){for(const W of M.amount)I.Coin.encode(W,k.uint32(10).fork()).ldelim();return M.tipper!==""&&k.uint32(18).string(M.tipper),k},decode(M,k){const W=M instanceof g.Reader?M:new g.Reader(M);let Q=k===void 0?W.len:W.pos+k;const d=rt();for(;W.pos<Q;){const E=W.uint32();switch(E>>>3){case 1:d.amount.push(I.Coin.decode(W,W.uint32()));break;case 2:d.tipper=W.string();break;default:W.skipType(E&7);break}}return d},fromJSON(M){return{amount:Array.isArray(M==null?void 0:M.amount)?M.amount.map(k=>I.Coin.fromJSON(k)):[],tipper:(0,y.isSet)(M.tipper)?String(M.tipper):""}},toJSON(M){const k={};return M.amount?k.amount=M.amount.map(W=>W?I.Coin.toJSON(W):void 0):k.amount=[],M.tipper!==void 0&&(k.tipper=M.tipper),k},fromPartial(M){var k;const W=rt();return W.amount=((k=M.amount)==null?void 0:k.map(Q=>I.Coin.fromPartial(Q)))||[],W.tipper=M.tipper??"",W}};function nt(){return{address:"",signDoc:void 0,mode:0,sig:new Uint8Array}}i.AuxSignerData={encode(M,k=g.Writer.create()){return M.address!==""&&k.uint32(10).string(M.address),M.signDoc!==void 0&&i.SignDocDirectAux.encode(M.signDoc,k.uint32(18).fork()).ldelim(),M.mode!==0&&k.uint32(24).int32(M.mode),M.sig.length!==0&&k.uint32(34).bytes(M.sig),k},decode(M,k){const W=M instanceof g.Reader?M:new g.Reader(M);let Q=k===void 0?W.len:W.pos+k;const d=nt();for(;W.pos<Q;){const E=W.uint32();switch(E>>>3){case 1:d.address=W.string();break;case 2:d.signDoc=i.SignDocDirectAux.decode(W,W.uint32());break;case 3:d.mode=W.int32();break;case 4:d.sig=W.bytes();break;default:W.skipType(E&7);break}}return d},fromJSON(M){return{address:(0,y.isSet)(M.address)?String(M.address):"",signDoc:(0,y.isSet)(M.signDoc)?i.SignDocDirectAux.fromJSON(M.signDoc):void 0,mode:(0,y.isSet)(M.mode)?(0,c.signModeFromJSON)(M.mode):0,sig:(0,y.isSet)(M.sig)?(0,y.bytesFromBase64)(M.sig):new Uint8Array}},toJSON(M){const k={};return M.address!==void 0&&(k.address=M.address),M.signDoc!==void 0&&(k.signDoc=M.signDoc?i.SignDocDirectAux.toJSON(M.signDoc):void 0),M.mode!==void 0&&(k.mode=(0,c.signModeToJSON)(M.mode)),M.sig!==void 0&&(k.sig=(0,y.base64FromBytes)(M.sig!==void 0?M.sig:new Uint8Array)),k},fromPartial(M){const k=nt();return k.address=M.address??"",k.signDoc=M.signDoc!==void 0&&M.signDoc!==null?i.SignDocDirectAux.fromPartial(M.signDoc):void 0,k.mode=M.mode??0,k.sig=M.sig??new Uint8Array,k}}})(tx);exports.estimateMaxSendableAmount=estimateMaxSendableAmount;
|