16 lines
786 KiB
JavaScript
16 lines
786 KiB
JavaScript
import{b as zp}from"./chunk-VQ6LHIGY.js";import{a as y3,b as b3,c as M3,d as w3,e as k3,f as S3}from"./chunk-IW7EDKR4.js";import{a as h3}from"./chunk-YHVKZE66.js";import{a as Jp,b as g3,m as v3,n as A3}from"./chunk-O5S4AKID.js";import{A as f3,D as c3,F as l3,G as m3,J as Wp,K as p3,d as $p,e as d3,f as u3,g as kf}from"./chunk-QO4BJAKR.js";import{c as L,g as Kp,o as B,p as C,q as R}from"./chunk-QTLWQ5AJ.js";var as=L(ge=>{"use strict";B();R();Object.defineProperty(ge,"__esModule",{value:!0});ge.bytes=ge.stringToBytes=ge.str=ge.bytesToString=ge.hex=ge.utf8=ge.bech32m=ge.bech32=ge.base58check=ge.base58xmr=ge.base58xrp=ge.base58flickr=ge.base58=ge.base64url=ge.base64=ge.base32crockford=ge.base32hex=ge.base32=ge.base16=ge.utils=ge.assertNumber=void 0;function Gi(e){if(!Number.isSafeInteger(e))throw new Error(`Wrong integer: ${e}`)}ge.assertNumber=Gi;function Gr(...e){let t=(r,o)=>f=>r(o(f)),n=Array.from(e).reverse().reduce((r,o)=>r?t(r,o.encode):o.encode,void 0),i=e.reduce((r,o)=>r?t(r,o.decode):o.decode,void 0);return{encode:n,decode:i}}function ui(e){return{encode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="number")throw new Error("alphabet.encode input should be an array of numbers");return t.map(n=>{if(Gi(n),n<0||n>=e.length)throw new Error(`Digit index outside alphabet: ${n} (alphabet: ${e.length})`);return e[n]})},decode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="string")throw new Error("alphabet.decode input should be array of strings");return t.map(n=>{if(typeof n!="string")throw new Error(`alphabet.decode: not string element=${n}`);let i=e.indexOf(n);if(i===-1)throw new Error(`Unknown letter: "${n}". Allowed: ${e}`);return i})}}}function fi(e=""){if(typeof e!="string")throw new Error("join separator should be string");return{encode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="string")throw new Error("join.encode input should be array of strings");for(let n of t)if(typeof n!="string")throw new Error(`join.encode: non-string input=${n}`);return t.join(e)},decode:t=>{if(typeof t!="string")throw new Error("join.decode input should be string");return t.split(e)}}}function Ya(e,t="="){if(Gi(e),typeof t!="string")throw new Error("padding chr should be string");return{encode(n){if(!Array.isArray(n)||n.length&&typeof n[0]!="string")throw new Error("padding.encode input should be array of strings");for(let i of n)if(typeof i!="string")throw new Error(`padding.encode: non-string input=${i}`);for(;n.length*e%8;)n.push(t);return n},decode(n){if(!Array.isArray(n)||n.length&&typeof n[0]!="string")throw new Error("padding.encode input should be array of strings");for(let r of n)if(typeof r!="string")throw new Error(`padding.decode: non-string input=${r}`);let i=n.length;if(i*e%8)throw new Error("Invalid padding: string should have whole number of bytes");for(;i>0&&n[i-1]===t;i--)if(!((i-1)*e%8))throw new Error("Invalid padding: string has too much padding");return n.slice(0,i)}}}function Qp(e){if(typeof e!="function")throw new Error("normalize fn should be function");return{encode:t=>t,decode:t=>e(t)}}function Zp(e,t,n){if(t<2)throw new Error(`convertRadix: wrong from=${t}, base cannot be less than 2`);if(n<2)throw new Error(`convertRadix: wrong to=${n}, base cannot be less than 2`);if(!Array.isArray(e))throw new Error("convertRadix: data should be array");if(!e.length)return[];let i=0,r=[],o=Array.from(e);for(o.forEach(f=>{if(Gi(f),f<0||f>=t)throw new Error(`Wrong integer: ${f}`)});;){let f=0,c=!0;for(let g=i;g<o.length;g++){let A=o[g],w=t*f+A;if(!Number.isSafeInteger(w)||t*f/t!==f||w-A!==t*f)throw new Error("convertRadix: carry overflow");if(f=w%n,o[g]=Math.floor(w/n),!Number.isSafeInteger(o[g])||o[g]*n+f!==w)throw new Error("convertRadix: carry overflow");if(c)o[g]?c=!1:i=g;else continue}if(r.push(f),c)break}for(let f=0;f<e.length-1&&e[f]===0;f++)r.push(0);return r.reverse()}var jp=(e,t)=>t?jp(t,e%t):e,Ld=(e,t)=>e+(t-jp(e,t));function Sf(e,t,n,i){if(!Array.isArray(e))throw new Error("convertRadix2: data should be array");if(t<=0||t>32)throw new Error(`convertRadix2: wrong from=${t}`);if(n<=0||n>32)throw new Error(`convertRadix2: wrong to=${n}`);if(Ld(t,n)>32)throw new Error(`convertRadix2: carry overflow from=${t} to=${n} carryBits=${Ld(t,n)}`);let r=0,o=0,f=2**n-1,c=[];for(let g of e){if(Gi(g),g>=2**t)throw new Error(`convertRadix2: invalid data word=${g} from=${t}`);if(r=r<<t|g,o+t>32)throw new Error(`convertRadix2: carry overflow pos=${o} from=${t}`);for(o+=t;o>=n;o-=n)c.push((r>>o-n&f)>>>0);r&=2**o-1}if(r=r<<n-o&f,!i&&o>=t)throw new Error("Excess padding");if(!i&&r)throw new Error(`Non-zero padding: ${r}`);return i&&o>0&&c.push(r>>>0),c}function eh(e){return Gi(e),{encode:t=>{if(!(t instanceof Uint8Array))throw new Error("radix.encode input should be Uint8Array");return Zp(Array.from(t),2**8,e)},decode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="number")throw new Error("radix.decode input should be array of strings");return Uint8Array.from(Zp(t,e,2**8))}}}function Ci(e,t=!1){if(Gi(e),e<=0||e>32)throw new Error("radix2: bits should be in (0..32]");if(Ld(8,e)>32||Ld(e,8)>32)throw new Error("radix2: carry overflow");return{encode:n=>{if(!(n instanceof Uint8Array))throw new Error("radix2.encode input should be Uint8Array");return Sf(Array.from(n),8,e,!t)},decode:n=>{if(!Array.isArray(n)||n.length&&typeof n[0]!="number")throw new Error("radix2.decode input should be array of strings");return Uint8Array.from(Sf(n,e,8,t))}}}function Vp(e){if(typeof e!="function")throw new Error("unsafeWrapper fn should be function");return function(...t){try{return e.apply(null,t)}catch{}}}function th(e,t){if(Gi(e),typeof t!="function")throw new Error("checksum fn should be function");return{encode(n){if(!(n instanceof Uint8Array))throw new Error("checksum.encode: input should be Uint8Array");let i=t(n).slice(0,e),r=new Uint8Array(n.length+e);return r.set(n),r.set(i,n.length),r},decode(n){if(!(n instanceof Uint8Array))throw new Error("checksum.decode: input should be Uint8Array");let i=n.slice(0,-e),r=t(i).slice(0,e),o=n.slice(-e);for(let f=0;f<e;f++)if(r[f]!==o[f])throw new Error("Invalid checksum");return i}}}ge.utils={alphabet:ui,chain:Gr,checksum:th,radix:eh,radix2:Ci,join:fi,padding:Ya};ge.base16=Gr(Ci(4),ui("0123456789ABCDEF"),fi(""));ge.base32=Gr(Ci(5),ui("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),Ya(5),fi(""));ge.base32hex=Gr(Ci(5),ui("0123456789ABCDEFGHIJKLMNOPQRSTUV"),Ya(5),fi(""));ge.base32crockford=Gr(Ci(5),ui("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),fi(""),Qp(e=>e.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1")));ge.base64=Gr(Ci(6),ui("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),Ya(6),fi(""));ge.base64url=Gr(Ci(6),ui("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),Ya(6),fi(""));var If=e=>Gr(eh(58),ui(e),fi(""));ge.base58=If("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");ge.base58flickr=If("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ");ge.base58xrp=If("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz");var Gp=[0,2,3,5,6,7,9,10,11];ge.base58xmr={encode(e){let t="";for(let n=0;n<e.length;n+=8){let i=e.subarray(n,n+8);t+=ge.base58.encode(i).padStart(Gp[i.length],"1")}return t},decode(e){let t=[];for(let n=0;n<e.length;n+=11){let i=e.slice(n,n+11),r=Gp.indexOf(i.length),o=ge.base58.decode(i);for(let f=0;f<o.length-r;f++)if(o[f]!==0)throw new Error("base58xmr: wrong padding");t=t.concat(Array.from(o.slice(o.length-r)))}return Uint8Array.from(t)}};var _3=e=>Gr(th(4,t=>e(e(t))),ge.base58);ge.base58check=_3;var _f=Gr(ui("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),fi("")),Yp=[996825010,642813549,513874426,1027748829,705979059];function Va(e){let t=e>>25,n=(e&33554431)<<5;for(let i=0;i<Yp.length;i++)(t>>i&1)===1&&(n^=Yp[i]);return n}function Xp(e,t,n=1){let i=e.length,r=1;for(let o=0;o<i;o++){let f=e.charCodeAt(o);if(f<33||f>126)throw new Error(`Invalid prefix (${e})`);r=Va(r)^f>>5}r=Va(r);for(let o=0;o<i;o++)r=Va(r)^e.charCodeAt(o)&31;for(let o of t)r=Va(r)^o;for(let o=0;o<6;o++)r=Va(r);return r^=n,_f.encode(Sf([r%2**30],30,5,!1))}function nh(e){let t=e==="bech32"?1:734539939,n=Ci(5),i=n.decode,r=n.encode,o=Vp(i);function f(w,M,P=90){if(typeof w!="string")throw new Error(`bech32.encode prefix should be string, not ${typeof w}`);if(!Array.isArray(M)||M.length&&typeof M[0]!="number")throw new Error(`bech32.encode words should be array of numbers, not ${typeof M}`);let x=w.length+7+M.length;if(P!==!1&&x>P)throw new TypeError(`Length ${x} exceeds limit ${P}`);return w=w.toLowerCase(),`${w}1${_f.encode(M)}${Xp(w,M,t)}`}function c(w,M=90){if(typeof w!="string")throw new Error(`bech32.decode input should be string, not ${typeof w}`);if(w.length<8||M!==!1&&w.length>M)throw new TypeError(`Wrong string length: ${w.length} (${w}). Expected (8..${M})`);let P=w.toLowerCase();if(w!==P&&w!==w.toUpperCase())throw new Error("String must be lowercase or uppercase");w=P;let x=w.lastIndexOf("1");if(x===0||x===-1)throw new Error('Letter "1" must be present between prefix and data only');let[U,_]=[w.slice(0,x),w.slice(x+1)];if(_.length<6)throw new Error("Data must be at least 6 characters long");let T=_f.decode(_).slice(0,-6),D=Xp(U,T,t);if(!_.endsWith(D))throw new Error(`Invalid checksum in ${w}: expected "${D}"`);return{prefix:U,words:T}}let g=Vp(c);function A(w){let{prefix:M,words:P}=c(w,!1);return{prefix:M,words:P,bytes:i(P)}}return{encode:f,decode:c,decodeToBytes:A,decodeUnsafe:g,fromWords:i,fromWordsUnsafe:o,toWords:r}}ge.bech32=nh("bech32");ge.bech32m=nh("bech32m");ge.utf8={encode:e=>new TextDecoder().decode(e),decode:e=>new TextEncoder().encode(e)};ge.hex=Gr(Ci(4),ui("0123456789abcdef"),fi(""),Qp(e=>{if(typeof e!="string"||e.length%2)throw new TypeError(`hex.decode: expected string, got ${typeof e} with length ${e.length}`);return e.toLowerCase()}));var Ga={utf8:ge.utf8,hex:ge.hex,base16:ge.base16,base32:ge.base32,base64:ge.base64,base64url:ge.base64url,base58:ge.base58,base58xmr:ge.base58xmr},rh=`Invalid encoding type. Available types: ${Object.keys(Ga).join(", ")}`,I3=(e,t)=>{if(typeof e!="string"||!Ga.hasOwnProperty(e))throw new TypeError(rh);if(!(t instanceof Uint8Array))throw new TypeError("bytesToString() expects Uint8Array");return Ga[e].encode(t)};ge.bytesToString=I3;ge.str=ge.bytesToString;var x3=(e,t)=>{if(!Ga.hasOwnProperty(e))throw new TypeError(rh);if(typeof t!="string")throw new TypeError("stringToBytes() expects string");return Ga[e].decode(t)};ge.stringToBytes=x3;ge.bytes=ge.stringToBytes});var ih=L(Yi=>{"use strict";B();R();Object.defineProperty(Yi,"__esModule",{value:!0});Yi.base58=Yi.fromBase58=Yi.toBase58=void 0;var xf=as();Object.defineProperty(Yi,"base58",{enumerable:!0,get:function(){return xf.base58}});function P3(e){let t=C.Buffer.from(e);return xf.base58.encode(Uint8Array.from(t))}Yi.toBase58=P3;function U3(e){return xf.base58.decode(e)}Yi.fromBase58=U3});var oh=L(qd=>{"use strict";B();R();Object.defineProperty(qd,"__esModule",{value:!0});qd.crypto=void 0;qd.crypto={node:void 0,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0}});var $n=L((ke,Xa)=>{"use strict";B();R();Object.defineProperty(ke,"__esModule",{value:!0});ke.randomBytes=ke.wrapConstructorWithOpts=ke.wrapConstructor=ke.checkOpts=ke.Hash=ke.assertHash=ke.assertBytes=ke.assertBool=ke.assertNumber=ke.concatBytes=ke.toBytes=ke.utf8ToBytes=ke.asyncLoop=ke.nextTick=ke.hexToBytes=ke.bytesToHex=ke.isLE=ke.rotr=ke.createView=ke.u32=ke.u8=void 0;var Fd=oh(),B3=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength);ke.u8=B3;var R3=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));ke.u32=R3;var C3=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);ke.createView=C3;var E3=(e,t)=>e<<32-t|e>>>t;ke.rotr=E3;ke.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!ke.isLE)throw new Error("Non little-endian hardware is not supported");var T3=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function O3(e){let t="";for(let n=0;n<e.length;n++)t+=T3[e[n]];return t}ke.bytesToHex=O3;function D3(e){if(typeof e!="string")throw new TypeError("hexToBytes: expected string, got "+typeof e);if(e.length%2)throw new Error("hexToBytes: received invalid unpadded hex");let t=new Uint8Array(e.length/2);for(let n=0;n<t.length;n++){let i=n*2,r=e.slice(i,i+2),o=Number.parseInt(r,16);if(Number.isNaN(o))throw new Error("Invalid byte sequence");t[n]=o}return t}ke.hexToBytes=D3;ke.nextTick=(()=>{let e=typeof Xa<"u"&&typeof Xa.require=="function"&&Xa.require.bind(Xa);try{if(e){let{setImmediate:t}=e("timers");return()=>new Promise(n=>t(n))}}catch{}return()=>new Promise(t=>setTimeout(t,0))})();async function N3(e,t,n){let i=Date.now();for(let r=0;r<e;r++){n(r);let o=Date.now()-i;o>=0&&o<t||(await(0,ke.nextTick)(),i+=o)}}ke.asyncLoop=N3;function sh(e){if(typeof e!="string")throw new TypeError(`utf8ToBytes expected string, got ${typeof e}`);return new TextEncoder().encode(e)}ke.utf8ToBytes=sh;function Bf(e){if(typeof e=="string"&&(e=sh(e)),!(e instanceof Uint8Array))throw new TypeError(`Expected input type is Uint8Array (got ${typeof e})`);return e}ke.toBytes=Bf;function L3(...e){if(!e.every(i=>i instanceof Uint8Array))throw new Error("Uint8Array list expected");if(e.length===1)return e[0];let t=e.reduce((i,r)=>i+r.length,0),n=new Uint8Array(t);for(let i=0,r=0;i<e.length;i++){let o=e[i];n.set(o,r),r+=o.length}return n}ke.concatBytes=L3;function Pf(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}ke.assertNumber=Pf;function q3(e){if(typeof e!="boolean")throw new Error(`Expected boolean, not ${e}`)}ke.assertBool=q3;function F3(e,...t){if(!(e instanceof Uint8Array&&(!t.length||t.includes(e.length))))throw new TypeError(`Expected ${t} bytes, not ${typeof e} with length=${e.length}`)}ke.assertBytes=F3;function H3(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Pf(e.outputLen),Pf(e.blockLen)}ke.assertHash=H3;var Uf=class{clone(){return this._cloneInto()}};ke.Hash=Uf;var K3=e=>Object.prototype.toString.call(e)==="[object Object]"&&e.constructor===Object;function $3(e,t){if(t!==void 0&&(typeof t!="object"||!K3(t)))throw new TypeError("Options should be object or undefined");return Object.assign(e,t)}ke.checkOpts=$3;function W3(e){let t=i=>e().update(Bf(i)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}ke.wrapConstructor=W3;function J3(e){let t=(i,r)=>e(r).update(Bf(i)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=i=>e(i),t}ke.wrapConstructorWithOpts=J3;function z3(e=32){if(Fd.crypto.web)return Fd.crypto.web.getRandomValues(new Uint8Array(e));if(Fd.crypto.node)return new Uint8Array(Fd.crypto.node.randomBytes(e).buffer);throw new Error("The environment doesn't have randomBytes function")}ke.randomBytes=z3});var Kd=L(Hd=>{"use strict";B();R();Object.defineProperty(Hd,"__esModule",{value:!0});Hd.SHA2=void 0;var Qa=$n();function Z3(e,t,n,i){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,i);let r=BigInt(32),o=BigInt(4294967295),f=Number(n>>r&o),c=Number(n&o),g=i?4:0,A=i?0:4;e.setUint32(t+g,f,i),e.setUint32(t+A,c,i)}var Rf=class extends Qa.Hash{constructor(t,n,i,r){super(),this.blockLen=t,this.outputLen=n,this.padOffset=i,this.isLE=r,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=(0,Qa.createView)(this.buffer)}update(t){if(this.destroyed)throw new Error("instance is destroyed");let{view:n,buffer:i,blockLen:r,finished:o}=this;if(o)throw new Error("digest() was already called");t=(0,Qa.toBytes)(t);let f=t.length;for(let c=0;c<f;){let g=Math.min(r-this.pos,f-c);if(g===r){let A=(0,Qa.createView)(t);for(;r<=f-c;c+=r)this.process(A,c);continue}i.set(t.subarray(c,c+g),this.pos),this.pos+=g,c+=g,this.pos===r&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){if(this.destroyed)throw new Error("instance is destroyed");if(!(t instanceof Uint8Array)||t.length<this.outputLen)throw new Error("_Sha2: Invalid output buffer");if(this.finished)throw new Error("digest() was already called");this.finished=!0;let{buffer:n,view:i,blockLen:r,isLE:o}=this,{pos:f}=this;n[f++]=128,this.buffer.subarray(f).fill(0),this.padOffset>r-f&&(this.process(i,0),f=0);for(let g=f;g<r;g++)n[g]=0;Z3(i,r-8,BigInt(this.length*8),o),this.process(i,0);let c=(0,Qa.createView)(t);this.get().forEach((g,A)=>c.setUint32(4*A,g,o))}digest(){let{buffer:t,outputLen:n}=this;this.digestInto(t);let i=t.slice(0,n);return this.destroy(),i}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());let{blockLen:n,buffer:i,length:r,finished:o,destroyed:f,pos:c}=this;return t.length=r,t.pos=c,t.finished=o,t.destroyed=f,r%n&&t.buffer.set(i),t}};Hd.SHA2=Rf});var Ns=L($d=>{"use strict";B();R();Object.defineProperty($d,"__esModule",{value:!0});$d.sha256=void 0;var V3=Kd(),Yr=$n(),G3=(e,t,n)=>e&t^~e&n,Y3=(e,t,n)=>e&t^e&n^t&n,X3=new Uint32Array([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]),Xi=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Qi=new Uint32Array(64),Cf=class extends V3.SHA2{constructor(){super(64,32,8,!1),this.A=Xi[0]|0,this.B=Xi[1]|0,this.C=Xi[2]|0,this.D=Xi[3]|0,this.E=Xi[4]|0,this.F=Xi[5]|0,this.G=Xi[6]|0,this.H=Xi[7]|0}get(){let{A:t,B:n,C:i,D:r,E:o,F:f,G:c,H:g}=this;return[t,n,i,r,o,f,c,g]}set(t,n,i,r,o,f,c,g){this.A=t|0,this.B=n|0,this.C=i|0,this.D=r|0,this.E=o|0,this.F=f|0,this.G=c|0,this.H=g|0}process(t,n){for(let M=0;M<16;M++,n+=4)Qi[M]=t.getUint32(n,!1);for(let M=16;M<64;M++){let P=Qi[M-15],x=Qi[M-2],U=(0,Yr.rotr)(P,7)^(0,Yr.rotr)(P,18)^P>>>3,_=(0,Yr.rotr)(x,17)^(0,Yr.rotr)(x,19)^x>>>10;Qi[M]=_+Qi[M-7]+U+Qi[M-16]|0}let{A:i,B:r,C:o,D:f,E:c,F:g,G:A,H:w}=this;for(let M=0;M<64;M++){let P=(0,Yr.rotr)(c,6)^(0,Yr.rotr)(c,11)^(0,Yr.rotr)(c,25),x=w+P+G3(c,g,A)+X3[M]+Qi[M]|0,_=((0,Yr.rotr)(i,2)^(0,Yr.rotr)(i,13)^(0,Yr.rotr)(i,22))+Y3(i,r,o)|0;w=A,A=g,g=c,c=f+x|0,f=o,o=r,r=i,i=x+_|0}i=i+this.A|0,r=r+this.B|0,o=o+this.C|0,f=f+this.D|0,c=c+this.E|0,g=g+this.F|0,A=A+this.G|0,w=w+this.H|0,this.set(i,r,o,f,c,g,A,w)}roundClean(){Qi.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};$d.sha256=(0,Yr.wrapConstructor)(()=>new Cf)});var Ls=L(Se=>{"use strict";B();R();Object.defineProperty(Se,"__esModule",{value:!0});Se.add5H=Se.add5L=Se.add4H=Se.add4L=Se.add3H=Se.add3L=Se.add=Se.rotlBL=Se.rotlBH=Se.rotlSL=Se.rotlSH=Se.rotr32L=Se.rotr32H=Se.rotrBL=Se.rotrBH=Se.rotrSL=Se.rotrSH=Se.shrSL=Se.shrSH=Se.toBig=Se.split=Se.fromBig=void 0;var Wd=BigInt(2**32-1),Ef=BigInt(32);function ah(e,t=!1){return t?{h:Number(e&Wd),l:Number(e>>Ef&Wd)}:{h:Number(e>>Ef&Wd)|0,l:Number(e&Wd)|0}}Se.fromBig=ah;function Q3(e,t=!1){let n=new Uint32Array(e.length),i=new Uint32Array(e.length);for(let r=0;r<e.length;r++){let{h:o,l:f}=ah(e[r],t);[n[r],i[r]]=[o,f]}return[n,i]}Se.split=Q3;var j3=(e,t)=>BigInt(e>>>0)<<Ef|BigInt(t>>>0);Se.toBig=j3;var eA=(e,t,n)=>e>>>n;Se.shrSH=eA;var tA=(e,t,n)=>e<<32-n|t>>>n;Se.shrSL=tA;var nA=(e,t,n)=>e>>>n|t<<32-n;Se.rotrSH=nA;var rA=(e,t,n)=>e<<32-n|t>>>n;Se.rotrSL=rA;var iA=(e,t,n)=>e<<64-n|t>>>n-32;Se.rotrBH=iA;var oA=(e,t,n)=>e>>>n-32|t<<64-n;Se.rotrBL=oA;var sA=(e,t)=>t;Se.rotr32H=sA;var aA=(e,t)=>e;Se.rotr32L=aA;var dA=(e,t,n)=>e<<n|t>>>32-n;Se.rotlSH=dA;var uA=(e,t,n)=>t<<n|e>>>32-n;Se.rotlSL=uA;var fA=(e,t,n)=>t<<n-32|e>>>64-n;Se.rotlBH=fA;var cA=(e,t,n)=>e<<n-32|t>>>64-n;Se.rotlBL=cA;function lA(e,t,n,i){let r=(t>>>0)+(i>>>0);return{h:e+n+(r/2**32|0)|0,l:r|0}}Se.add=lA;var mA=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0);Se.add3L=mA;var pA=(e,t,n,i)=>t+n+i+(e/2**32|0)|0;Se.add3H=pA;var hA=(e,t,n,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(i>>>0);Se.add4L=hA;var gA=(e,t,n,i,r)=>t+n+i+r+(e/2**32|0)|0;Se.add4H=gA;var yA=(e,t,n,i,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(i>>>0)+(r>>>0);Se.add5L=yA;var bA=(e,t,n,i,r,o)=>t+n+i+r+o+(e/2**32|0)|0;Se.add5H=bA});var Jd=L(Zn=>{"use strict";B();R();var vA=Zn&&Zn.__createBinding||(Object.create?function(e,t,n,i){i===void 0&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]}),AA=Zn&&Zn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),MA=Zn&&Zn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&vA(t,e,n);return AA(t,e),t};Object.defineProperty(Zn,"__esModule",{value:!0});Zn.sha384=Zn.sha512_256=Zn.sha512=Zn.SHA512=void 0;var wA=Kd(),ut=MA(Ls()),Df=$n(),[kA,SA]=ut.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),ji=new Uint32Array(80),eo=new Uint32Array(80),qs=class extends wA.SHA2{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){let{Ah:t,Al:n,Bh:i,Bl:r,Ch:o,Cl:f,Dh:c,Dl:g,Eh:A,El:w,Fh:M,Fl:P,Gh:x,Gl:U,Hh:_,Hl:T}=this;return[t,n,i,r,o,f,c,g,A,w,M,P,x,U,_,T]}set(t,n,i,r,o,f,c,g,A,w,M,P,x,U,_,T){this.Ah=t|0,this.Al=n|0,this.Bh=i|0,this.Bl=r|0,this.Ch=o|0,this.Cl=f|0,this.Dh=c|0,this.Dl=g|0,this.Eh=A|0,this.El=w|0,this.Fh=M|0,this.Fl=P|0,this.Gh=x|0,this.Gl=U|0,this.Hh=_|0,this.Hl=T|0}process(t,n){for(let N=0;N<16;N++,n+=4)ji[N]=t.getUint32(n),eo[N]=t.getUint32(n+=4);for(let N=16;N<80;N++){let Z=ji[N-15]|0,$=eo[N-15]|0,F=ut.rotrSH(Z,$,1)^ut.rotrSH(Z,$,8)^ut.shrSH(Z,$,7),Y=ut.rotrSL(Z,$,1)^ut.rotrSL(Z,$,8)^ut.shrSL(Z,$,7),G=ji[N-2]|0,ue=eo[N-2]|0,E=ut.rotrSH(G,ue,19)^ut.rotrBH(G,ue,61)^ut.shrSH(G,ue,6),d=ut.rotrSL(G,ue,19)^ut.rotrBL(G,ue,61)^ut.shrSL(G,ue,6),b=ut.add4L(Y,d,eo[N-7],eo[N-16]),l=ut.add4H(b,F,E,ji[N-7],ji[N-16]);ji[N]=l|0,eo[N]=b|0}let{Ah:i,Al:r,Bh:o,Bl:f,Ch:c,Cl:g,Dh:A,Dl:w,Eh:M,El:P,Fh:x,Fl:U,Gh:_,Gl:T,Hh:D,Hl:K}=this;for(let N=0;N<80;N++){let Z=ut.rotrSH(M,P,14)^ut.rotrSH(M,P,18)^ut.rotrBH(M,P,41),$=ut.rotrSL(M,P,14)^ut.rotrSL(M,P,18)^ut.rotrBL(M,P,41),F=M&x^~M&_,Y=P&U^~P&T,G=ut.add5L(K,$,Y,SA[N],eo[N]),ue=ut.add5H(G,D,Z,F,kA[N],ji[N]),E=G|0,d=ut.rotrSH(i,r,28)^ut.rotrBH(i,r,34)^ut.rotrBH(i,r,39),b=ut.rotrSL(i,r,28)^ut.rotrBL(i,r,34)^ut.rotrBL(i,r,39),l=i&o^i&c^o&c,s=r&f^r&g^f&g;D=_|0,K=T|0,_=x|0,T=U|0,x=M|0,U=P|0,{h:M,l:P}=ut.add(A|0,w|0,ue|0,E|0),A=c|0,w=g|0,c=o|0,g=f|0,o=i|0,f=r|0;let a=ut.add3L(E,b,s);i=ut.add3H(a,ue,d,l),r=a|0}({h:i,l:r}=ut.add(this.Ah|0,this.Al|0,i|0,r|0)),{h:o,l:f}=ut.add(this.Bh|0,this.Bl|0,o|0,f|0),{h:c,l:g}=ut.add(this.Ch|0,this.Cl|0,c|0,g|0),{h:A,l:w}=ut.add(this.Dh|0,this.Dl|0,A|0,w|0),{h:M,l:P}=ut.add(this.Eh|0,this.El|0,M|0,P|0),{h:x,l:U}=ut.add(this.Fh|0,this.Fl|0,x|0,U|0),{h:_,l:T}=ut.add(this.Gh|0,this.Gl|0,_|0,T|0),{h:D,l:K}=ut.add(this.Hh|0,this.Hl|0,D|0,K|0),this.set(i,r,o,f,c,g,A,w,M,P,x,U,_,T,D,K)}roundClean(){ji.fill(0),eo.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}};Zn.SHA512=qs;var Tf=class extends qs{constructor(){super(),this.Ah=573645204,this.Al=-64227540,this.Bh=-1621794909,this.Bl=-934517566,this.Ch=596883563,this.Cl=1867755857,this.Dh=-1774684391,this.Dl=1497426621,this.Eh=-1775747358,this.El=-1467023389,this.Fh=-1101128155,this.Fl=1401305490,this.Gh=721525244,this.Gl=746961066,this.Hh=246885852,this.Hl=-2117784414,this.outputLen=32}},Of=class extends qs{constructor(){super(),this.Ah=-876896931,this.Al=-1056596264,this.Bh=1654270250,this.Bl=914150663,this.Ch=-1856437926,this.Cl=812702999,this.Dh=355462360,this.Dl=-150054599,this.Eh=1731405415,this.El=-4191439,this.Fh=-1900787065,this.Fl=1750603025,this.Gh=-619958771,this.Gl=1694076839,this.Hh=1203062813,this.Hl=-1090891868,this.outputLen=48}};Zn.sha512=(0,Df.wrapConstructor)(()=>new qs);Zn.sha512_256=(0,Df.wrapConstructor)(()=>new Tf);Zn.sha384=(0,Df.wrapConstructor)(()=>new Of)});var qf=L(Fs=>{"use strict";B();R();Object.defineProperty(Fs,"__esModule",{value:!0});Fs.ripemd160=Fs.RIPEMD160=void 0;var _A=Kd(),IA=$n(),xA=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),uh=Uint8Array.from({length:16},(e,t)=>t),PA=uh.map(e=>(9*e+5)%16),Nf=[uh],Lf=[PA];for(let e=0;e<4;e++)for(let t of[Nf,Lf])t.push(t[e].map(n=>xA[n]));var fh=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(e=>new Uint8Array(e)),UA=Nf.map((e,t)=>e.map(n=>fh[t][n])),BA=Lf.map((e,t)=>e.map(n=>fh[t][n])),RA=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),CA=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),zd=(e,t)=>e<<t|e>>>32-t;function dh(e,t,n,i){return e===0?t^n^i:e===1?t&n|~t&i:e===2?(t|~n)^i:e===3?t&i|n&~i:t^(n|~i)}var Zd=new Uint32Array(16),Vd=class extends _A.SHA2{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){let{h0:t,h1:n,h2:i,h3:r,h4:o}=this;return[t,n,i,r,o]}set(t,n,i,r,o){this.h0=t|0,this.h1=n|0,this.h2=i|0,this.h3=r|0,this.h4=o|0}process(t,n){for(let x=0;x<16;x++,n+=4)Zd[x]=t.getUint32(n,!0);let i=this.h0|0,r=i,o=this.h1|0,f=o,c=this.h2|0,g=c,A=this.h3|0,w=A,M=this.h4|0,P=M;for(let x=0;x<5;x++){let U=4-x,_=RA[x],T=CA[x],D=Nf[x],K=Lf[x],N=UA[x],Z=BA[x];for(let $=0;$<16;$++){let F=zd(i+dh(x,o,c,A)+Zd[D[$]]+_,N[$])+M|0;i=M,M=A,A=zd(c,10)|0,c=o,o=F}for(let $=0;$<16;$++){let F=zd(r+dh(U,f,g,w)+Zd[K[$]]+T,Z[$])+P|0;r=P,P=w,w=zd(g,10)|0,g=f,f=F}}this.set(this.h1+c+w|0,this.h2+A+P|0,this.h3+M+r|0,this.h4+i+f|0,this.h0+o+g|0)}roundClean(){Zd.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}};Fs.RIPEMD160=Vd;Fs.ripemd160=(0,IA.wrapConstructor)(()=>new Vd)});var Gd=L(kt=>{"use strict";B();R();var EA=kt&&kt.__createBinding||(Object.create?function(e,t,n,i){i===void 0&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]}),TA=kt&&kt.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),OA=kt&&kt.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&EA(t,e,n);return TA(t,e),t};Object.defineProperty(kt,"__esModule",{value:!0});kt.shake256=kt.shake128=kt.keccak_512=kt.keccak_384=kt.keccak_256=kt.keccak_224=kt.sha3_512=kt.sha3_384=kt.sha3_256=kt.sha3_224=kt.Keccak=kt.keccakP=void 0;var ed=OA(Ls()),ds=$n(),[mh,ph,hh]=[[],[],[]],DA=BigInt(0),ja=BigInt(1),NA=BigInt(2),LA=BigInt(7),qA=BigInt(256),FA=BigInt(113);for(let e=0,t=ja,n=1,i=0;e<24;e++){[n,i]=[i,(2*n+3*i)%5],mh.push(2*(5*i+n)),ph.push((e+1)*(e+2)/2%64);let r=DA;for(let o=0;o<7;o++)t=(t<<ja^(t>>LA)*FA)%qA,t&NA&&(r^=ja<<(ja<<BigInt(o))-ja);hh.push(r)}var[HA,KA]=ed.split(hh,!0),ch=(e,t,n)=>n>32?ed.rotlBH(e,t,n):ed.rotlSH(e,t,n),lh=(e,t,n)=>n>32?ed.rotlBL(e,t,n):ed.rotlSL(e,t,n);function gh(e,t=24){let n=new Uint32Array(10);for(let i=24-t;i<24;i++){for(let f=0;f<10;f++)n[f]=e[f]^e[f+10]^e[f+20]^e[f+30]^e[f+40];for(let f=0;f<10;f+=2){let c=(f+8)%10,g=(f+2)%10,A=n[g],w=n[g+1],M=ch(A,w,1)^n[c],P=lh(A,w,1)^n[c+1];for(let x=0;x<50;x+=10)e[f+x]^=M,e[f+x+1]^=P}let r=e[2],o=e[3];for(let f=0;f<24;f++){let c=ph[f],g=ch(r,o,c),A=lh(r,o,c),w=mh[f];r=e[w],o=e[w+1],e[w]=g,e[w+1]=A}for(let f=0;f<50;f+=10){for(let c=0;c<10;c++)n[c]=e[f+c];for(let c=0;c<10;c++)e[f+c]^=~n[(c+2)%10]&n[(c+4)%10]}e[0]^=HA[i],e[1]^=KA[i]}n.fill(0)}kt.keccakP=gh;var us=class extends ds.Hash{constructor(t,n,i,r=!1,o=24){if(super(),this.blockLen=t,this.suffix=n,this.outputLen=i,this.enableXOF=r,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,ds.assertNumber)(i),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,ds.u32)(this.state)}keccak(){gh(this.state32,this.rounds),this.posOut=0,this.pos=0}update(t){if(this.destroyed)throw new Error("instance is destroyed");if(this.finished)throw new Error("digest() was already called");let{blockLen:n,state:i}=this;t=(0,ds.toBytes)(t);let r=t.length;for(let o=0;o<r;){let f=Math.min(n-this.pos,r-o);for(let c=0;c<f;c++)i[this.pos++]^=t[o++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:t,suffix:n,pos:i,blockLen:r}=this;t[i]^=n,(n&128)!==0&&i===r-1&&this.keccak(),t[r-1]^=128,this.keccak()}writeInto(t){if(this.destroyed)throw new Error("instance is destroyed");if(!(t instanceof Uint8Array))throw new Error("Keccak: invalid output buffer");this.finish();for(let n=0,i=t.length;n<i;){this.posOut>=this.blockLen&&this.keccak();let r=Math.min(this.blockLen-this.posOut,i-n);t.set(this.state.subarray(this.posOut,this.posOut+r),n),this.posOut+=r,n+=r}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return(0,ds.assertNumber)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(t.length<this.outputLen)throw new Error("Keccak: invalid output buffer");if(this.finished)throw new Error("digest() was already called");return this.finish(),this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){let{blockLen:n,suffix:i,outputLen:r,rounds:o,enableXOF:f}=this;return t||(t=new us(n,i,r,f,o)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=o,t.suffix=i,t.outputLen=r,t.enableXOF=f,t.destroyed=this.destroyed,t}};kt.Keccak=us;var to=(e,t,n)=>(0,ds.wrapConstructor)(()=>new us(t,e,n));kt.sha3_224=to(6,144,224/8);kt.sha3_256=to(6,136,256/8);kt.sha3_384=to(6,104,384/8);kt.sha3_512=to(6,72,512/8);kt.keccak_224=to(1,144,224/8);kt.keccak_256=to(1,136,256/8);kt.keccak_384=to(1,104,384/8);kt.keccak_512=to(1,72,512/8);var yh=(e,t,n)=>(0,ds.wrapConstructorWithOpts)((i={})=>new us(t,e,i.dkLen!==void 0?i.dkLen:n,!0));kt.shake128=yh(31,168,128/8);kt.shake256=yh(31,136,256/8)});var Yd=L(Hs=>{"use strict";B();R();Object.defineProperty(Hs,"__esModule",{value:!0});Hs.BLAKE2=Hs.SIGMA=void 0;var fs=$n();Hs.SIGMA=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3]);var Ff=class extends fs.Hash{constructor(t,n,i={},r,o,f){if(super(),this.blockLen=t,this.outputLen=n,this.length=0,this.pos=0,this.finished=!1,this.destroyed=!1,(0,fs.assertNumber)(t),(0,fs.assertNumber)(n),(0,fs.assertNumber)(r),n<0||n>r)throw new Error("Blake2: outputLen bigger than keyLen");if(i.key!==void 0&&(i.key.length<1||i.key.length>r))throw new Error(`Key should be up 1..${r} byte long or undefined`);if(i.salt!==void 0&&i.salt.length!==o)throw new Error(`Salt should be ${o} byte long or undefined`);if(i.personalization!==void 0&&i.personalization.length!==f)throw new Error(`Personalization should be ${f} byte long or undefined`);this.buffer32=(0,fs.u32)(this.buffer=new Uint8Array(t))}update(t){if(this.destroyed)throw new Error("instance is destroyed");let{finished:n,blockLen:i,buffer:r,buffer32:o}=this;if(n)throw new Error("digest() was already called");t=(0,fs.toBytes)(t);let f=t.length;for(let c=0;c<f;){this.pos===i&&(this.compress(o,0,!1),this.pos=0);let g=Math.min(i-this.pos,f-c),A=t.byteOffset+c;if(g===i&&!(A%4)&&c+g<f){let w=new Uint32Array(t.buffer,A,Math.floor((f-c)/4));for(let M=0;c+i<f;M+=o.length,c+=i)this.length+=i,this.compress(w,M,!1);continue}r.set(t.subarray(c,c+g),this.pos),this.pos+=g,this.length+=g,c+=g}return this}digestInto(t){if(this.destroyed)throw new Error("instance is destroyed");if(!(t instanceof Uint8Array)||t.length<this.outputLen)throw new Error("_Blake2: Invalid output buffer");let{finished:n,pos:i,buffer32:r}=this;if(n)throw new Error("digest() was already called");this.finished=!0,this.buffer.subarray(i).fill(0),this.compress(r,0,!0);let o=(0,fs.u32)(t);this.get().forEach((f,c)=>o[c]=f)}digest(){let{buffer:t,outputLen:n}=this;this.digestInto(t);let i=t.slice(0,n);return this.destroy(),i}_cloneInto(t){let{buffer:n,length:i,finished:r,destroyed:o,outputLen:f,pos:c}=this;return t||(t=new this.constructor({dkLen:f})),t.set(...this.get()),t.length=i,t.finished=r,t.destroyed=o,t.outputLen=f,t.buffer.set(n),t.pos=c,t}};Hs.BLAKE2=Ff});var Kf=L(ci=>{"use strict";B();R();var $A=ci&&ci.__createBinding||(Object.create?function(e,t,n,i){i===void 0&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]}),WA=ci&&ci.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),vh=ci&&ci.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&$A(t,e,n);return WA(t,e),t};Object.defineProperty(ci,"__esModule",{value:!0});ci.blake2b=void 0;var bh=vh(Yd()),tr=vh(Ls()),Ks=$n(),Pn=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),re=new Uint32Array(32);function no(e,t,n,i,r,o){let f=r[o],c=r[o+1],g=re[2*e],A=re[2*e+1],w=re[2*t],M=re[2*t+1],P=re[2*n],x=re[2*n+1],U=re[2*i],_=re[2*i+1],T=tr.add3L(g,w,f);A=tr.add3H(T,A,M,c),g=T|0,{Dh:_,Dl:U}={Dh:_^A,Dl:U^g},{Dh:_,Dl:U}={Dh:tr.rotr32H(_,U),Dl:tr.rotr32L(_,U)},{h:x,l:P}=tr.add(x,P,_,U),{Bh:M,Bl:w}={Bh:M^x,Bl:w^P},{Bh:M,Bl:w}={Bh:tr.rotrSH(M,w,24),Bl:tr.rotrSL(M,w,24)},re[2*e]=g,re[2*e+1]=A,re[2*t]=w,re[2*t+1]=M,re[2*n]=P,re[2*n+1]=x,re[2*i]=U,re[2*i+1]=_}function ro(e,t,n,i,r,o){let f=r[o],c=r[o+1],g=re[2*e],A=re[2*e+1],w=re[2*t],M=re[2*t+1],P=re[2*n],x=re[2*n+1],U=re[2*i],_=re[2*i+1],T=tr.add3L(g,w,f);A=tr.add3H(T,A,M,c),g=T|0,{Dh:_,Dl:U}={Dh:_^A,Dl:U^g},{Dh:_,Dl:U}={Dh:tr.rotrSH(_,U,16),Dl:tr.rotrSL(_,U,16)},{h:x,l:P}=tr.add(x,P,_,U),{Bh:M,Bl:w}={Bh:M^x,Bl:w^P},{Bh:M,Bl:w}={Bh:tr.rotrBH(M,w,63),Bl:tr.rotrBL(M,w,63)},re[2*e]=g,re[2*e+1]=A,re[2*t]=w,re[2*t+1]=M,re[2*n]=P,re[2*n+1]=x,re[2*i]=U,re[2*i+1]=_}var Hf=class extends bh.BLAKE2{constructor(t={}){super(128,t.dkLen===void 0?64:t.dkLen,t,64,16,16),this.v0l=Pn[0]|0,this.v0h=Pn[1]|0,this.v1l=Pn[2]|0,this.v1h=Pn[3]|0,this.v2l=Pn[4]|0,this.v2h=Pn[5]|0,this.v3l=Pn[6]|0,this.v3h=Pn[7]|0,this.v4l=Pn[8]|0,this.v4h=Pn[9]|0,this.v5l=Pn[10]|0,this.v5h=Pn[11]|0,this.v6l=Pn[12]|0,this.v6h=Pn[13]|0,this.v7l=Pn[14]|0,this.v7h=Pn[15]|0;let n=t.key?t.key.length:0;if(this.v0l^=this.outputLen|n<<8|1<<16|1<<24,t.salt){let i=(0,Ks.u32)((0,Ks.toBytes)(t.salt));this.v4l^=i[0],this.v4h^=i[1],this.v5l^=i[2],this.v5h^=i[3]}if(t.personalization){let i=(0,Ks.u32)((0,Ks.toBytes)(t.personalization));this.v6l^=i[0],this.v6h^=i[1],this.v7l^=i[2],this.v7h^=i[3]}if(t.key){let i=new Uint8Array(this.blockLen);i.set((0,Ks.toBytes)(t.key)),this.update(i)}}get(){let{v0l:t,v0h:n,v1l:i,v1h:r,v2l:o,v2h:f,v3l:c,v3h:g,v4l:A,v4h:w,v5l:M,v5h:P,v6l:x,v6h:U,v7l:_,v7h:T}=this;return[t,n,i,r,o,f,c,g,A,w,M,P,x,U,_,T]}set(t,n,i,r,o,f,c,g,A,w,M,P,x,U,_,T){this.v0l=t|0,this.v0h=n|0,this.v1l=i|0,this.v1h=r|0,this.v2l=o|0,this.v2h=f|0,this.v3l=c|0,this.v3h=g|0,this.v4l=A|0,this.v4h=w|0,this.v5l=M|0,this.v5h=P|0,this.v6l=x|0,this.v6h=U|0,this.v7l=_|0,this.v7h=T|0}compress(t,n,i){this.get().forEach((g,A)=>re[A]=g),re.set(Pn,16);let{h:r,l:o}=tr.fromBig(BigInt(this.length));re[24]=Pn[8]^o,re[25]=Pn[9]^r,i&&(re[28]=~re[28],re[29]=~re[29]);let f=0,c=bh.SIGMA;for(let g=0;g<12;g++)no(0,4,8,12,t,n+2*c[f++]),ro(0,4,8,12,t,n+2*c[f++]),no(1,5,9,13,t,n+2*c[f++]),ro(1,5,9,13,t,n+2*c[f++]),no(2,6,10,14,t,n+2*c[f++]),ro(2,6,10,14,t,n+2*c[f++]),no(3,7,11,15,t,n+2*c[f++]),ro(3,7,11,15,t,n+2*c[f++]),no(0,5,10,15,t,n+2*c[f++]),ro(0,5,10,15,t,n+2*c[f++]),no(1,6,11,12,t,n+2*c[f++]),ro(1,6,11,12,t,n+2*c[f++]),no(2,7,8,13,t,n+2*c[f++]),ro(2,7,8,13,t,n+2*c[f++]),no(3,4,9,14,t,n+2*c[f++]),ro(3,4,9,14,t,n+2*c[f++]);this.v0l^=re[0]^re[16],this.v0h^=re[1]^re[17],this.v1l^=re[2]^re[18],this.v1h^=re[3]^re[19],this.v2l^=re[4]^re[20],this.v2h^=re[5]^re[21],this.v3l^=re[6]^re[22],this.v3h^=re[7]^re[23],this.v4l^=re[8]^re[24],this.v4h^=re[9]^re[25],this.v5l^=re[10]^re[26],this.v5h^=re[11]^re[27],this.v6l^=re[12]^re[28],this.v6h^=re[13]^re[29],this.v7l^=re[14]^re[30],this.v7h^=re[15]^re[31],re.fill(0)}destroy(){this.destroyed=!0,this.buffer32.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}};ci.blake2b=(0,Ks.wrapConstructorWithOpts)(e=>new Hf(e))});var td=L(Jt=>{"use strict";B();R();Object.defineProperty(Jt,"__esModule",{value:!0});Jt.sha3_512=Jt.sha3_256=Jt.ripemd160=Jt.sha512=Jt.sha256=Jt.magicHash=Jt.blake2=Jt.keccak256=Jt.keccak=Jt.hash160=Jt.doubleSha256=void 0;var Xd=Ns();Object.defineProperty(Jt,"sha256",{enumerable:!0,get:function(){return Xd.sha256}});var JA=Jd();Object.defineProperty(Jt,"sha512",{enumerable:!0,get:function(){return JA.sha512}});var Mh=qf();Object.defineProperty(Jt,"ripemd160",{enumerable:!0,get:function(){return Mh.ripemd160}});var $s=Gd();Object.defineProperty(Jt,"sha3_256",{enumerable:!0,get:function(){return $s.sha3_256}});Object.defineProperty(Jt,"sha3_512",{enumerable:!0,get:function(){return $s.sha3_512}});var zA=Kf();function wh(e){let t=(0,Xd.sha256)(e);return(0,Xd.sha256)(t)}Jt.doubleSha256=wh;function ZA(e){let t=(0,Xd.sha256)(e);return(0,Mh.ripemd160)(t)}Jt.hash160=ZA;var VA=function(e,t=256){let n=C.Buffer.from(e);switch(t){case 224:return C.Buffer.from((0,$s.keccak_224)(n));case 256:return C.Buffer.from((0,$s.keccak_256)(n));case 384:return C.Buffer.from((0,$s.keccak_384)(n));case 512:return C.Buffer.from((0,$s.keccak_512)(n));default:throw new Error(`Invald algorithm: keccak${t}`)}};Jt.keccak=VA;var GA=function(e){return(0,Jt.keccak)(e)};Jt.keccak256=GA;function YA(e,t,n){let i=Math.ceil(t/8);return(0,zA.blake2b)(e,{dkLen:i,key:n})}Jt.blake2=YA;function Ah(e){let t;return e<253?(t=C.Buffer.alloc(1),t.writeUInt8(e,0)):e<65536?(t=C.Buffer.alloc(1+2),t.writeUInt8(253,0),t.writeUInt16LE(e,1)):e<4294967296?(t=C.Buffer.alloc(1+4),t.writeUInt8(254,0),t.writeUInt32LE(e,1)):(t=C.Buffer.alloc(1+8),t.writeUInt8(255,0),t.writeInt32LE(e&-1,1),t.writeUInt32LE(Math.floor(e/4294967296),5)),t}var XA=C.Buffer.from(`Bitcoin Signed Message:
|
||
`);function QA(e,t){let n=t?C.Buffer.from(t,"utf8"):XA,i=Ah(n.length),r=C.Buffer.from(e),o=Ah(r.length),f=C.Buffer.concat([i,n,o,r]);return wh(f)}Jt.magicHash=QA});var _h=L(Ws=>{"use strict";B();R();Object.defineProperty(Ws,"__esModule",{value:!0});Ws.fromBase58Check=Ws.toBase58Check=void 0;var kh=td(),WI=f3(),Sh=as();function jA(e){return(0,Sh.base58check)(kh.sha256).encode(C.Buffer.from(e))}Ws.toBase58Check=jA;function eM(e){let t=(0,Sh.base58check)(kh.sha256);return C.Buffer.from(t.decode(e))}Ws.fromBase58Check=eM});var Ih=L(Js=>{"use strict";B();R();Object.defineProperty(Js,"__esModule",{value:!0});Js.fromBech32=Js.toBech32=void 0;var Qd=as();function tM(e,t,n){let i=C.Buffer.from(t),r=Qd.bech32.toWords(Uint8Array.from(i));return Qd.bech32.encode(e,r,n)}Js.toBech32=tM;function nM(e,t){let n=Qd.bech32.decode(e,t),i=Qd.bech32.fromWords(n.words);return[n.prefix,C.Buffer.from(i)]}Js.fromBech32=nM});var xh=L(li=>{"use strict";B();R();Object.defineProperty(li,"__esModule",{value:!0});li.isHexPrefixed=li.stripHexPrefix=li.fromHex=li.toHex=void 0;function rM(e,t=!1){let n=C.Buffer.from(e);return t?"0x"+n.toString("hex"):n.toString("hex")}li.toHex=rM;function iM(e){return e.startsWith("0x")&&(e=e.substring(2)),C.Buffer.from(e,"hex")}li.fromHex=iM;function oM(e){return e.startsWith("0x")?e.substring(2):e}li.stripHexPrefix=oM;function sM(e){return e.startsWith("0x")}li.isHexPrefixed=sM});var Uh=L(zs=>{"use strict";B();R();Object.defineProperty(zs,"__esModule",{value:!0});zs.fromBase64=zs.toBase64=void 0;var Ph=as();function aM(e){let t=C.Buffer.from(e);return Ph.base64.encode(Uint8Array.from(t))}zs.toBase64=aM;function dM(e){return Ph.base64.decode(e)}zs.fromBase64=dM});var rd=L(nd=>{"use strict";B();R();Object.defineProperty(nd,"__esModule",{value:!0});nd.hmac=void 0;var jd=$n(),eu=class extends jd.Hash{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,(0,jd.assertHash)(t);let i=(0,jd.toBytes)(n);if(this.iHash=t.create(),!(this.iHash instanceof jd.Hash))throw new TypeError("Expected instance of class which extends utils.Hash");let r=this.blockLen=this.iHash.blockLen;this.outputLen=this.iHash.outputLen;let o=new Uint8Array(r);o.set(i.length>this.iHash.blockLen?t.create().update(i).digest():i);for(let f=0;f<o.length;f++)o[f]^=54;this.iHash.update(o),this.oHash=t.create();for(let f=0;f<o.length;f++)o[f]^=106;this.oHash.update(o),o.fill(0)}update(t){if(this.destroyed)throw new Error("instance is destroyed");return this.iHash.update(t),this}digestInto(t){if(this.destroyed)throw new Error("instance is destroyed");if(!(t instanceof Uint8Array)||t.length!==this.outputLen)throw new Error("HMAC: Invalid output buffer");if(this.finished)throw new Error("digest() was already called");this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){let t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));let{oHash:n,iHash:i,finished:r,destroyed:o,blockLen:f,outputLen:c}=this;return t=t,t.finished=r,t.destroyed=o,t.blockLen=f,t.outputLen=c,t.oHash=n._cloneInto(t.oHash),t.iHash=i._cloneInto(t.iHash),t}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}},uM=(e,t,n)=>new eu(e,t).update(n).digest();nd.hmac=uM;nd.hmac.create=(e,t)=>new eu(e,t)});var Ch=L(Zs=>{"use strict";B();R();Object.defineProperty(Zs,"__esModule",{value:!0});Zs.hmacSHA512=Zs.hmacSHA256=void 0;var Bh=rd(),Rh=td();function fM(e,t){return C.Buffer.from((0,Bh.hmac)(Rh.sha256,e,t))}Zs.hmacSHA256=fM;function cM(e,t){return C.Buffer.from((0,Bh.hmac)(Rh.sha512,e,t))}Zs.hmacSHA512=cM});var Eh=L(Vs=>{"use strict";B();R();Object.defineProperty(Vs,"__esModule",{value:!0});Vs.fromUtf8=Vs.toUtf8=void 0;function lM(e){return new TextEncoder().encode(e)}Vs.toUtf8=lM;function mM(e){return new TextDecoder("utf-8",{fatal:!0}).decode(e)}Vs.fromUtf8=mM});var Wf=L(io=>{"use strict";B();R();Object.defineProperty(io,"__esModule",{value:!0});io.checkIsUndefined=io.checkIsDefined=io.check=void 0;var $f=(e,t)=>{if(!e)throw t=t||"Invalid statement",t=t instanceof Error?t:new Error(t),t};io.check=$f;var pM=(e,t)=>($f(typeof e<"u",t||"Expect defined but actually undefined"),e);io.checkIsDefined=pM;var hM=(e,t)=>{$f(typeof e>"u",t||`Expect undefined but actually ${e}`)};io.checkIsUndefined=hM});var Oh=L(mi=>{"use strict";B();R();Object.defineProperty(mi,"__esModule",{value:!0});mi.string2BigNumber=mi.bigNumber2String=mi.fromBigIntHex=mi.toBigIntHex=void 0;var Th=xt(),gM=Wf(),yM=e=>{let t=e.integerValue().toString(16);return t="0x"+t,t};mi.toBigIntHex=yM;var bM=e=>((0,gM.check)(e&&e.startsWith("0x"),`Invalid hex string. value: ${e}`),new Th.BigNumber(e).integerValue());mi.fromBigIntHex=bM;var vM=(e,t)=>e.integerValue().toString(t);mi.bigNumber2String=vM;var AM=(e,t)=>new Th.BigNumber(e,t);mi.string2BigNumber=AM});var Un=L((Dh,Jf)=>{B();R();(function(e,t){"use strict";function n(E,d){if(!E)throw new Error(d||"Assertion failed")}function i(E,d){E.super_=d;var b=function(){};b.prototype=d.prototype,E.prototype=new b,E.prototype.constructor=E}function r(E,d,b){if(r.isBN(E))return E;this.negative=0,this.words=null,this.length=0,this.red=null,E!==null&&((d==="le"||d==="be")&&(b=d,d=10),this._init(E||0,d||10,b||"be"))}typeof e=="object"?e.exports=r:t.BN=r,r.BN=r,r.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=$p().Buffer}catch{}r.isBN=function(d){return d instanceof r?!0:d!==null&&typeof d=="object"&&d.constructor.wordSize===r.wordSize&&Array.isArray(d.words)},r.max=function(d,b){return d.cmp(b)>0?d:b},r.min=function(d,b){return d.cmp(b)<0?d:b},r.prototype._init=function(d,b,l){if(typeof d=="number")return this._initNumber(d,b,l);if(typeof d=="object")return this._initArray(d,b,l);b==="hex"&&(b=16),n(b===(b|0)&&b>=2&&b<=36),d=d.toString().replace(/\s+/g,"");var s=0;d[0]==="-"&&(s++,this.negative=1),s<d.length&&(b===16?this._parseHex(d,s,l):(this._parseBase(d,b,s),l==="le"&&this._initArray(this.toArray(),b,l)))},r.prototype._initNumber=function(d,b,l){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):(n(d<9007199254740992),this.words=[d&67108863,d/67108864&67108863,1],this.length=3),l==="le"&&this._initArray(this.toArray(),b,l)},r.prototype._initArray=function(d,b,l){if(n(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 s=0;s<this.length;s++)this.words[s]=0;var a,m,y=0;if(l==="be")for(s=d.length-1,a=0;s>=0;s-=3)m=d[s]|d[s-1]<<8|d[s-2]<<16,this.words[a]|=m<<y&67108863,this.words[a+1]=m>>>26-y&67108863,y+=24,y>=26&&(y-=26,a++);else if(l==="le")for(s=0,a=0;s<d.length;s+=3)m=d[s]|d[s+1]<<8|d[s+2]<<16,this.words[a]|=m<<y&67108863,this.words[a+1]=m>>>26-y&67108863,y+=24,y>=26&&(y-=26,a++);return this.strip()};function f(E,d){var b=E.charCodeAt(d);return b>=65&&b<=70?b-55:b>=97&&b<=102?b-87:b-48&15}function c(E,d,b){var l=f(E,b);return b-1>=d&&(l|=f(E,b-1)<<4),l}r.prototype._parseHex=function(d,b,l){this.length=Math.ceil((d.length-b)/6),this.words=new Array(this.length);for(var s=0;s<this.length;s++)this.words[s]=0;var a=0,m=0,y;if(l==="be")for(s=d.length-1;s>=b;s-=2)y=c(d,b,s)<<a,this.words[m]|=y&67108863,a>=18?(a-=18,m+=1,this.words[m]|=y>>>26):a+=8;else{var h=d.length-b;for(s=h%2===0?b+1:b;s<d.length;s+=2)y=c(d,b,s)<<a,this.words[m]|=y&67108863,a>=18?(a-=18,m+=1,this.words[m]|=y>>>26):a+=8}this.strip()};function g(E,d,b,l){for(var s=0,a=Math.min(E.length,b),m=d;m<a;m++){var y=E.charCodeAt(m)-48;s*=l,y>=49?s+=y-49+10:y>=17?s+=y-17+10:s+=y}return s}r.prototype._parseBase=function(d,b,l){this.words=[0],this.length=1;for(var s=0,a=1;a<=67108863;a*=b)s++;s--,a=a/b|0;for(var m=d.length-l,y=m%s,h=Math.min(m,m-y)+l,u=0,v=l;v<h;v+=s)u=g(d,v,v+s,b),this.imuln(a),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(y!==0){var k=1;for(u=g(d,v,d.length,b),v=0;v<y;v++)k*=b;this.imuln(k),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},r.prototype.copy=function(d){d.words=new Array(this.length);for(var b=0;b<this.length;b++)d.words[b]=this.words[b];d.length=this.length,d.negative=this.negative,d.red=this.red},r.prototype.clone=function(){var d=new r(null);return this.copy(d),d},r.prototype._expand=function(d){for(;this.length<d;)this.words[this.length++]=0;return this},r.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},r.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},r.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var A=["","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"],w=[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],M=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];r.prototype.toString=function(d,b){d=d||10,b=b|0||1;var l;if(d===16||d==="hex"){l="";for(var s=0,a=0,m=0;m<this.length;m++){var y=this.words[m],h=((y<<s|a)&16777215).toString(16);a=y>>>24-s&16777215,a!==0||m!==this.length-1?l=A[6-h.length]+h+l:l=h+l,s+=2,s>=26&&(s-=26,m--)}for(a!==0&&(l=a.toString(16)+l);l.length%b!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}if(d===(d|0)&&d>=2&&d<=36){var u=w[d],v=M[d];l="";var k=this.clone();for(k.negative=0;!k.isZero();){var p=k.modn(v).toString(d);k=k.idivn(v),k.isZero()?l=p+l:l=A[u-p.length]+p+l}for(this.isZero()&&(l="0"+l);l.length%b!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}n(!1,"Base should be between 2 and 36")},r.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&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-d:d},r.prototype.toJSON=function(){return this.toString(16)},r.prototype.toBuffer=function(d,b){return n(typeof o<"u"),this.toArrayLike(o,d,b)},r.prototype.toArray=function(d,b){return this.toArrayLike(Array,d,b)},r.prototype.toArrayLike=function(d,b,l){var s=this.byteLength(),a=l||Math.max(1,s);n(s<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var m=b==="le",y=new d(a),h,u,v=this.clone();if(m){for(u=0;!v.isZero();u++)h=v.andln(255),v.iushrn(8),y[u]=h;for(;u<a;u++)y[u]=0}else{for(u=0;u<a-s;u++)y[u]=0;for(u=0;!v.isZero();u++)h=v.andln(255),v.iushrn(8),y[a-u-1]=h}return y},Math.clz32?r.prototype._countBits=function(d){return 32-Math.clz32(d)}:r.prototype._countBits=function(d){var b=d,l=0;return b>=4096&&(l+=13,b>>>=13),b>=64&&(l+=7,b>>>=7),b>=8&&(l+=4,b>>>=4),b>=2&&(l+=2,b>>>=2),l+b},r.prototype._zeroBits=function(d){if(d===0)return 26;var b=d,l=0;return(b&8191)===0&&(l+=13,b>>>=13),(b&127)===0&&(l+=7,b>>>=7),(b&15)===0&&(l+=4,b>>>=4),(b&3)===0&&(l+=2,b>>>=2),(b&1)===0&&l++,l},r.prototype.bitLength=function(){var d=this.words[this.length-1],b=this._countBits(d);return(this.length-1)*26+b};function P(E){for(var d=new Array(E.bitLength()),b=0;b<d.length;b++){var l=b/26|0,s=b%26;d[b]=(E.words[l]&1<<s)>>>s}return d}r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var d=0,b=0;b<this.length;b++){var l=this._zeroBits(this.words[b]);if(d+=l,l!==26)break}return d},r.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},r.prototype.toTwos=function(d){return this.negative!==0?this.abs().inotn(d).iaddn(1):this.clone()},r.prototype.fromTwos=function(d){return this.testn(d-1)?this.notn(d).iaddn(1).ineg():this.clone()},r.prototype.isNeg=function(){return this.negative!==0},r.prototype.neg=function(){return this.clone().ineg()},r.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},r.prototype.iuor=function(d){for(;this.length<d.length;)this.words[this.length++]=0;for(var b=0;b<d.length;b++)this.words[b]=this.words[b]|d.words[b];return this.strip()},r.prototype.ior=function(d){return n((this.negative|d.negative)===0),this.iuor(d)},r.prototype.or=function(d){return this.length>d.length?this.clone().ior(d):d.clone().ior(this)},r.prototype.uor=function(d){return this.length>d.length?this.clone().iuor(d):d.clone().iuor(this)},r.prototype.iuand=function(d){var b;this.length>d.length?b=d:b=this;for(var l=0;l<b.length;l++)this.words[l]=this.words[l]&d.words[l];return this.length=b.length,this.strip()},r.prototype.iand=function(d){return n((this.negative|d.negative)===0),this.iuand(d)},r.prototype.and=function(d){return this.length>d.length?this.clone().iand(d):d.clone().iand(this)},r.prototype.uand=function(d){return this.length>d.length?this.clone().iuand(d):d.clone().iuand(this)},r.prototype.iuxor=function(d){var b,l;this.length>d.length?(b=this,l=d):(b=d,l=this);for(var s=0;s<l.length;s++)this.words[s]=b.words[s]^l.words[s];if(this!==b)for(;s<b.length;s++)this.words[s]=b.words[s];return this.length=b.length,this.strip()},r.prototype.ixor=function(d){return n((this.negative|d.negative)===0),this.iuxor(d)},r.prototype.xor=function(d){return this.length>d.length?this.clone().ixor(d):d.clone().ixor(this)},r.prototype.uxor=function(d){return this.length>d.length?this.clone().iuxor(d):d.clone().iuxor(this)},r.prototype.inotn=function(d){n(typeof d=="number"&&d>=0);var b=Math.ceil(d/26)|0,l=d%26;this._expand(b),l>0&&b--;for(var s=0;s<b;s++)this.words[s]=~this.words[s]&67108863;return l>0&&(this.words[s]=~this.words[s]&67108863>>26-l),this.strip()},r.prototype.notn=function(d){return this.clone().inotn(d)},r.prototype.setn=function(d,b){n(typeof d=="number"&&d>=0);var l=d/26|0,s=d%26;return this._expand(l+1),b?this.words[l]=this.words[l]|1<<s:this.words[l]=this.words[l]&~(1<<s),this.strip()},r.prototype.iadd=function(d){var b;if(this.negative!==0&&d.negative===0)return this.negative=0,b=this.isub(d),this.negative^=1,this._normSign();if(this.negative===0&&d.negative!==0)return d.negative=0,b=this.isub(d),d.negative=1,b._normSign();var l,s;this.length>d.length?(l=this,s=d):(l=d,s=this);for(var a=0,m=0;m<s.length;m++)b=(l.words[m]|0)+(s.words[m]|0)+a,this.words[m]=b&67108863,a=b>>>26;for(;a!==0&&m<l.length;m++)b=(l.words[m]|0)+a,this.words[m]=b&67108863,a=b>>>26;if(this.length=l.length,a!==0)this.words[this.length]=a,this.length++;else if(l!==this)for(;m<l.length;m++)this.words[m]=l.words[m];return this},r.prototype.add=function(d){var b;return d.negative!==0&&this.negative===0?(d.negative=0,b=this.sub(d),d.negative^=1,b):d.negative===0&&this.negative!==0?(this.negative=0,b=d.sub(this),this.negative=1,b):this.length>d.length?this.clone().iadd(d):d.clone().iadd(this)},r.prototype.isub=function(d){if(d.negative!==0){d.negative=0;var b=this.iadd(d);return d.negative=1,b._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(d),this.negative=1,this._normSign();var l=this.cmp(d);if(l===0)return this.negative=0,this.length=1,this.words[0]=0,this;var s,a;l>0?(s=this,a=d):(s=d,a=this);for(var m=0,y=0;y<a.length;y++)b=(s.words[y]|0)-(a.words[y]|0)+m,m=b>>26,this.words[y]=b&67108863;for(;m!==0&&y<s.length;y++)b=(s.words[y]|0)+m,m=b>>26,this.words[y]=b&67108863;if(m===0&&y<s.length&&s!==this)for(;y<s.length;y++)this.words[y]=s.words[y];return this.length=Math.max(this.length,y),s!==this&&(this.negative=1),this.strip()},r.prototype.sub=function(d){return this.clone().isub(d)};function x(E,d,b){b.negative=d.negative^E.negative;var l=E.length+d.length|0;b.length=l,l=l-1|0;var s=E.words[0]|0,a=d.words[0]|0,m=s*a,y=m&67108863,h=m/67108864|0;b.words[0]=y;for(var u=1;u<l;u++){for(var v=h>>>26,k=h&67108863,p=Math.min(u,d.length-1),I=Math.max(0,u-E.length+1);I<=p;I++){var W=u-I|0;s=E.words[W]|0,a=d.words[I]|0,m=s*a+k,v+=m/67108864|0,k=m&67108863}b.words[u]=k|0,h=v|0}return h!==0?b.words[u]=h|0:b.length--,b.strip()}var U=function(d,b,l){var s=d.words,a=b.words,m=l.words,y=0,h,u,v,k=s[0]|0,p=k&8191,I=k>>>13,W=s[1]|0,V=W&8191,X=W>>>13,de=s[2]|0,le=de&8191,pe=de>>>13,En=s[3]|0,be=En&8191,ye=En>>>13,Ir=s[4]|0,we=Ir&8191,xe=Ir>>>13,Vi=s[5]|0,Ce=Vi&8191,Ee=Vi>>>13,Ta=s[6]|0,Te=Ta&8191,Oe=Ta>>>13,Oa=s[7]|0,De=Oa&8191,Ne=Oa>>>13,Da=s[8]|0,Le=Da&8191,qe=Da>>>13,Na=s[9]|0,Fe=Na&8191,He=Na>>>13,La=a[0]|0,Ke=La&8191,$e=La>>>13,qa=a[1]|0,We=qa&8191,Je=qa>>>13,Fa=a[2]|0,ze=Fa&8191,Ze=Fa>>>13,Ha=a[3]|0,Ve=Ha&8191,Ge=Ha>>>13,Ka=a[4]|0,Ye=Ka&8191,Xe=Ka>>>13,$a=a[5]|0,Qe=$a&8191,je=$a>>>13,Wa=a[6]|0,et=Wa&8191,tt=Wa>>>13,Ja=a[7]|0,nt=Ja&8191,rt=Ja>>>13,za=a[8]|0,it=za&8191,ot=za>>>13,Za=a[9]|0,st=Za&8191,at=Za>>>13;l.negative=d.negative^b.negative,l.length=19,h=Math.imul(p,Ke),u=Math.imul(p,$e),u=u+Math.imul(I,Ke)|0,v=Math.imul(I,$e);var Ds=(y+h|0)+((u&8191)<<13)|0;y=(v+(u>>>13)|0)+(Ds>>>26)|0,Ds&=67108863,h=Math.imul(V,Ke),u=Math.imul(V,$e),u=u+Math.imul(X,Ke)|0,v=Math.imul(X,$e),h=h+Math.imul(p,We)|0,u=u+Math.imul(p,Je)|0,u=u+Math.imul(I,We)|0,v=v+Math.imul(I,Je)|0;var Vt=(y+h|0)+((u&8191)<<13)|0;y=(v+(u>>>13)|0)+(Vt>>>26)|0,Vt&=67108863,h=Math.imul(le,Ke),u=Math.imul(le,$e),u=u+Math.imul(pe,Ke)|0,v=Math.imul(pe,$e),h=h+Math.imul(V,We)|0,u=u+Math.imul(V,Je)|0,u=u+Math.imul(X,We)|0,v=v+Math.imul(X,Je)|0,h=h+Math.imul(p,ze)|0,u=u+Math.imul(p,Ze)|0,u=u+Math.imul(I,ze)|0,v=v+Math.imul(I,Ze)|0;var Gt=(y+h|0)+((u&8191)<<13)|0;y=(v+(u>>>13)|0)+(Gt>>>26)|0,Gt&=67108863,h=Math.imul(be,Ke),u=Math.imul(be,$e),u=u+Math.imul(ye,Ke)|0,v=Math.imul(ye,$e),h=h+Math.imul(le,We)|0,u=u+Math.imul(le,Je)|0,u=u+Math.imul(pe,We)|0,v=v+Math.imul(pe,Je)|0,h=h+Math.imul(V,ze)|0,u=u+Math.imul(V,Ze)|0,u=u+Math.imul(X,ze)|0,v=v+Math.imul(X,Ze)|0,h=h+Math.imul(p,Ve)|0,u=u+Math.imul(p,Ge)|0,u=u+Math.imul(I,Ve)|0,v=v+Math.imul(I,Ge)|0;var Jo=(y+h|0)+((u&8191)<<13)|0;y=(v+(u>>>13)|0)+(Jo>>>26)|0,Jo&=67108863,h=Math.imul(we,Ke),u=Math.imul(we,$e),u=u+Math.imul(xe,Ke)|0,v=Math.imul(xe,$e),h=h+Math.imul(be,We)|0,u=u+Math.imul(be,Je)|0,u=u+Math.imul(ye,We)|0,v=v+Math.imul(ye,Je)|0,h=h+Math.imul(le,ze)|0,u=u+Math.imul(le,Ze)|0,u=u+Math.imul(pe,ze)|0,v=v+Math.imul(pe,Ze)|0,h=h+Math.imul(V,Ve)|0,u=u+Math.imul(V,Ge)|0,u=u+Math.imul(X,Ve)|0,v=v+Math.imul(X,Ge)|0,h=h+Math.imul(p,Ye)|0,u=u+Math.imul(p,Xe)|0,u=u+Math.imul(I,Ye)|0,v=v+Math.imul(I,Xe)|0;var zo=(y+h|0)+((u&8191)<<13)|0;y=(v+(u>>>13)|0)+(zo>>>26)|0,zo&=67108863,h=Math.imul(Ce,Ke),u=Math.imul(Ce,$e),u=u+Math.imul(Ee,Ke)|0,v=Math.imul(Ee,$e),h=h+Math.imul(we,We)|0,u=u+Math.imul(we,Je)|0,u=u+Math.imul(xe,We)|0,v=v+Math.imul(xe,Je)|0,h=h+Math.imul(be,ze)|0,u=u+Math.imul(be,Ze)|0,u=u+Math.imul(ye,ze)|0,v=v+Math.imul(ye,Ze)|0,h=h+Math.imul(le,Ve)|0,u=u+Math.imul(le,Ge)|0,u=u+Math.imul(pe,Ve)|0,v=v+Math.imul(pe,Ge)|0,h=h+Math.imul(V,Ye)|0,u=u+Math.imul(V,Xe)|0,u=u+Math.imul(X,Ye)|0,v=v+Math.imul(X,Xe)|0,h=h+Math.imul(p,Qe)|0,u=u+Math.imul(p,je)|0,u=u+Math.imul(I,Qe)|0,v=v+Math.imul(I,je)|0;var Zo=(y+h|0)+((u&8191)<<13)|0;y=(v+(u>>>13)|0)+(Zo>>>26)|0,Zo&=67108863,h=Math.imul(Te,Ke),u=Math.imul(Te,$e),u=u+Math.imul(Oe,Ke)|0,v=Math.imul(Oe,$e),h=h+Math.imul(Ce,We)|0,u=u+Math.imul(Ce,Je)|0,u=u+Math.imul(Ee,We)|0,v=v+Math.imul(Ee,Je)|0,h=h+Math.imul(we,ze)|0,u=u+Math.imul(we,Ze)|0,u=u+Math.imul(xe,ze)|0,v=v+Math.imul(xe,Ze)|0,h=h+Math.imul(be,Ve)|0,u=u+Math.imul(be,Ge)|0,u=u+Math.imul(ye,Ve)|0,v=v+Math.imul(ye,Ge)|0,h=h+Math.imul(le,Ye)|0,u=u+Math.imul(le,Xe)|0,u=u+Math.imul(pe,Ye)|0,v=v+Math.imul(pe,Xe)|0,h=h+Math.imul(V,Qe)|0,u=u+Math.imul(V,je)|0,u=u+Math.imul(X,Qe)|0,v=v+Math.imul(X,je)|0,h=h+Math.imul(p,et)|0,u=u+Math.imul(p,tt)|0,u=u+Math.imul(I,et)|0,v=v+Math.imul(I,tt)|0;var Vo=(y+h|0)+((u&8191)<<13)|0;y=(v+(u>>>13)|0)+(Vo>>>26)|0,Vo&=67108863,h=Math.imul(De,Ke),u=Math.imul(De,$e),u=u+Math.imul(Ne,Ke)|0,v=Math.imul(Ne,$e),h=h+Math.imul(Te,We)|0,u=u+Math.imul(Te,Je)|0,u=u+Math.imul(Oe,We)|0,v=v+Math.imul(Oe,Je)|0,h=h+Math.imul(Ce,ze)|0,u=u+Math.imul(Ce,Ze)|0,u=u+Math.imul(Ee,ze)|0,v=v+Math.imul(Ee,Ze)|0,h=h+Math.imul(we,Ve)|0,u=u+Math.imul(we,Ge)|0,u=u+Math.imul(xe,Ve)|0,v=v+Math.imul(xe,Ge)|0,h=h+Math.imul(be,Ye)|0,u=u+Math.imul(be,Xe)|0,u=u+Math.imul(ye,Ye)|0,v=v+Math.imul(ye,Xe)|0,h=h+Math.imul(le,Qe)|0,u=u+Math.imul(le,je)|0,u=u+Math.imul(pe,Qe)|0,v=v+Math.imul(pe,je)|0,h=h+Math.imul(V,et)|0,u=u+Math.imul(V,tt)|0,u=u+Math.imul(X,et)|0,v=v+Math.imul(X,tt)|0,h=h+Math.imul(p,nt)|0,u=u+Math.imul(p,rt)|0,u=u+Math.imul(I,nt)|0,v=v+Math.imul(I,rt)|0;var Go=(y+h|0)+((u&8191)<<13)|0;y=(v+(u>>>13)|0)+(Go>>>26)|0,Go&=67108863,h=Math.imul(Le,Ke),u=Math.imul(Le,$e),u=u+Math.imul(qe,Ke)|0,v=Math.imul(qe,$e),h=h+Math.imul(De,We)|0,u=u+Math.imul(De,Je)|0,u=u+Math.imul(Ne,We)|0,v=v+Math.imul(Ne,Je)|0,h=h+Math.imul(Te,ze)|0,u=u+Math.imul(Te,Ze)|0,u=u+Math.imul(Oe,ze)|0,v=v+Math.imul(Oe,Ze)|0,h=h+Math.imul(Ce,Ve)|0,u=u+Math.imul(Ce,Ge)|0,u=u+Math.imul(Ee,Ve)|0,v=v+Math.imul(Ee,Ge)|0,h=h+Math.imul(we,Ye)|0,u=u+Math.imul(we,Xe)|0,u=u+Math.imul(xe,Ye)|0,v=v+Math.imul(xe,Xe)|0,h=h+Math.imul(be,Qe)|0,u=u+Math.imul(be,je)|0,u=u+Math.imul(ye,Qe)|0,v=v+Math.imul(ye,je)|0,h=h+Math.imul(le,et)|0,u=u+Math.imul(le,tt)|0,u=u+Math.imul(pe,et)|0,v=v+Math.imul(pe,tt)|0,h=h+Math.imul(V,nt)|0,u=u+Math.imul(V,rt)|0,u=u+Math.imul(X,nt)|0,v=v+Math.imul(X,rt)|0,h=h+Math.imul(p,it)|0,u=u+Math.imul(p,ot)|0,u=u+Math.imul(I,it)|0,v=v+Math.imul(I,ot)|0;var Yo=(y+h|0)+((u&8191)<<13)|0;y=(v+(u>>>13)|0)+(Yo>>>26)|0,Yo&=67108863,h=Math.imul(Fe,Ke),u=Math.imul(Fe,$e),u=u+Math.imul(He,Ke)|0,v=Math.imul(He,$e),h=h+Math.imul(Le,We)|0,u=u+Math.imul(Le,Je)|0,u=u+Math.imul(qe,We)|0,v=v+Math.imul(qe,Je)|0,h=h+Math.imul(De,ze)|0,u=u+Math.imul(De,Ze)|0,u=u+Math.imul(Ne,ze)|0,v=v+Math.imul(Ne,Ze)|0,h=h+Math.imul(Te,Ve)|0,u=u+Math.imul(Te,Ge)|0,u=u+Math.imul(Oe,Ve)|0,v=v+Math.imul(Oe,Ge)|0,h=h+Math.imul(Ce,Ye)|0,u=u+Math.imul(Ce,Xe)|0,u=u+Math.imul(Ee,Ye)|0,v=v+Math.imul(Ee,Xe)|0,h=h+Math.imul(we,Qe)|0,u=u+Math.imul(we,je)|0,u=u+Math.imul(xe,Qe)|0,v=v+Math.imul(xe,je)|0,h=h+Math.imul(be,et)|0,u=u+Math.imul(be,tt)|0,u=u+Math.imul(ye,et)|0,v=v+Math.imul(ye,tt)|0,h=h+Math.imul(le,nt)|0,u=u+Math.imul(le,rt)|0,u=u+Math.imul(pe,nt)|0,v=v+Math.imul(pe,rt)|0,h=h+Math.imul(V,it)|0,u=u+Math.imul(V,ot)|0,u=u+Math.imul(X,it)|0,v=v+Math.imul(X,ot)|0,h=h+Math.imul(p,st)|0,u=u+Math.imul(p,at)|0,u=u+Math.imul(I,st)|0,v=v+Math.imul(I,at)|0;var Xo=(y+h|0)+((u&8191)<<13)|0;y=(v+(u>>>13)|0)+(Xo>>>26)|0,Xo&=67108863,h=Math.imul(Fe,We),u=Math.imul(Fe,Je),u=u+Math.imul(He,We)|0,v=Math.imul(He,Je),h=h+Math.imul(Le,ze)|0,u=u+Math.imul(Le,Ze)|0,u=u+Math.imul(qe,ze)|0,v=v+Math.imul(qe,Ze)|0,h=h+Math.imul(De,Ve)|0,u=u+Math.imul(De,Ge)|0,u=u+Math.imul(Ne,Ve)|0,v=v+Math.imul(Ne,Ge)|0,h=h+Math.imul(Te,Ye)|0,u=u+Math.imul(Te,Xe)|0,u=u+Math.imul(Oe,Ye)|0,v=v+Math.imul(Oe,Xe)|0,h=h+Math.imul(Ce,Qe)|0,u=u+Math.imul(Ce,je)|0,u=u+Math.imul(Ee,Qe)|0,v=v+Math.imul(Ee,je)|0,h=h+Math.imul(we,et)|0,u=u+Math.imul(we,tt)|0,u=u+Math.imul(xe,et)|0,v=v+Math.imul(xe,tt)|0,h=h+Math.imul(be,nt)|0,u=u+Math.imul(be,rt)|0,u=u+Math.imul(ye,nt)|0,v=v+Math.imul(ye,rt)|0,h=h+Math.imul(le,it)|0,u=u+Math.imul(le,ot)|0,u=u+Math.imul(pe,it)|0,v=v+Math.imul(pe,ot)|0,h=h+Math.imul(V,st)|0,u=u+Math.imul(V,at)|0,u=u+Math.imul(X,st)|0,v=v+Math.imul(X,at)|0;var Qo=(y+h|0)+((u&8191)<<13)|0;y=(v+(u>>>13)|0)+(Qo>>>26)|0,Qo&=67108863,h=Math.imul(Fe,ze),u=Math.imul(Fe,Ze),u=u+Math.imul(He,ze)|0,v=Math.imul(He,Ze),h=h+Math.imul(Le,Ve)|0,u=u+Math.imul(Le,Ge)|0,u=u+Math.imul(qe,Ve)|0,v=v+Math.imul(qe,Ge)|0,h=h+Math.imul(De,Ye)|0,u=u+Math.imul(De,Xe)|0,u=u+Math.imul(Ne,Ye)|0,v=v+Math.imul(Ne,Xe)|0,h=h+Math.imul(Te,Qe)|0,u=u+Math.imul(Te,je)|0,u=u+Math.imul(Oe,Qe)|0,v=v+Math.imul(Oe,je)|0,h=h+Math.imul(Ce,et)|0,u=u+Math.imul(Ce,tt)|0,u=u+Math.imul(Ee,et)|0,v=v+Math.imul(Ee,tt)|0,h=h+Math.imul(we,nt)|0,u=u+Math.imul(we,rt)|0,u=u+Math.imul(xe,nt)|0,v=v+Math.imul(xe,rt)|0,h=h+Math.imul(be,it)|0,u=u+Math.imul(be,ot)|0,u=u+Math.imul(ye,it)|0,v=v+Math.imul(ye,ot)|0,h=h+Math.imul(le,st)|0,u=u+Math.imul(le,at)|0,u=u+Math.imul(pe,st)|0,v=v+Math.imul(pe,at)|0;var jo=(y+h|0)+((u&8191)<<13)|0;y=(v+(u>>>13)|0)+(jo>>>26)|0,jo&=67108863,h=Math.imul(Fe,Ve),u=Math.imul(Fe,Ge),u=u+Math.imul(He,Ve)|0,v=Math.imul(He,Ge),h=h+Math.imul(Le,Ye)|0,u=u+Math.imul(Le,Xe)|0,u=u+Math.imul(qe,Ye)|0,v=v+Math.imul(qe,Xe)|0,h=h+Math.imul(De,Qe)|0,u=u+Math.imul(De,je)|0,u=u+Math.imul(Ne,Qe)|0,v=v+Math.imul(Ne,je)|0,h=h+Math.imul(Te,et)|0,u=u+Math.imul(Te,tt)|0,u=u+Math.imul(Oe,et)|0,v=v+Math.imul(Oe,tt)|0,h=h+Math.imul(Ce,nt)|0,u=u+Math.imul(Ce,rt)|0,u=u+Math.imul(Ee,nt)|0,v=v+Math.imul(Ee,rt)|0,h=h+Math.imul(we,it)|0,u=u+Math.imul(we,ot)|0,u=u+Math.imul(xe,it)|0,v=v+Math.imul(xe,ot)|0,h=h+Math.imul(be,st)|0,u=u+Math.imul(be,at)|0,u=u+Math.imul(ye,st)|0,v=v+Math.imul(ye,at)|0;var es=(y+h|0)+((u&8191)<<13)|0;y=(v+(u>>>13)|0)+(es>>>26)|0,es&=67108863,h=Math.imul(Fe,Ye),u=Math.imul(Fe,Xe),u=u+Math.imul(He,Ye)|0,v=Math.imul(He,Xe),h=h+Math.imul(Le,Qe)|0,u=u+Math.imul(Le,je)|0,u=u+Math.imul(qe,Qe)|0,v=v+Math.imul(qe,je)|0,h=h+Math.imul(De,et)|0,u=u+Math.imul(De,tt)|0,u=u+Math.imul(Ne,et)|0,v=v+Math.imul(Ne,tt)|0,h=h+Math.imul(Te,nt)|0,u=u+Math.imul(Te,rt)|0,u=u+Math.imul(Oe,nt)|0,v=v+Math.imul(Oe,rt)|0,h=h+Math.imul(Ce,it)|0,u=u+Math.imul(Ce,ot)|0,u=u+Math.imul(Ee,it)|0,v=v+Math.imul(Ee,ot)|0,h=h+Math.imul(we,st)|0,u=u+Math.imul(we,at)|0,u=u+Math.imul(xe,st)|0,v=v+Math.imul(xe,at)|0;var ts=(y+h|0)+((u&8191)<<13)|0;y=(v+(u>>>13)|0)+(ts>>>26)|0,ts&=67108863,h=Math.imul(Fe,Qe),u=Math.imul(Fe,je),u=u+Math.imul(He,Qe)|0,v=Math.imul(He,je),h=h+Math.imul(Le,et)|0,u=u+Math.imul(Le,tt)|0,u=u+Math.imul(qe,et)|0,v=v+Math.imul(qe,tt)|0,h=h+Math.imul(De,nt)|0,u=u+Math.imul(De,rt)|0,u=u+Math.imul(Ne,nt)|0,v=v+Math.imul(Ne,rt)|0,h=h+Math.imul(Te,it)|0,u=u+Math.imul(Te,ot)|0,u=u+Math.imul(Oe,it)|0,v=v+Math.imul(Oe,ot)|0,h=h+Math.imul(Ce,st)|0,u=u+Math.imul(Ce,at)|0,u=u+Math.imul(Ee,st)|0,v=v+Math.imul(Ee,at)|0;var ns=(y+h|0)+((u&8191)<<13)|0;y=(v+(u>>>13)|0)+(ns>>>26)|0,ns&=67108863,h=Math.imul(Fe,et),u=Math.imul(Fe,tt),u=u+Math.imul(He,et)|0,v=Math.imul(He,tt),h=h+Math.imul(Le,nt)|0,u=u+Math.imul(Le,rt)|0,u=u+Math.imul(qe,nt)|0,v=v+Math.imul(qe,rt)|0,h=h+Math.imul(De,it)|0,u=u+Math.imul(De,ot)|0,u=u+Math.imul(Ne,it)|0,v=v+Math.imul(Ne,ot)|0,h=h+Math.imul(Te,st)|0,u=u+Math.imul(Te,at)|0,u=u+Math.imul(Oe,st)|0,v=v+Math.imul(Oe,at)|0;var rs=(y+h|0)+((u&8191)<<13)|0;y=(v+(u>>>13)|0)+(rs>>>26)|0,rs&=67108863,h=Math.imul(Fe,nt),u=Math.imul(Fe,rt),u=u+Math.imul(He,nt)|0,v=Math.imul(He,rt),h=h+Math.imul(Le,it)|0,u=u+Math.imul(Le,ot)|0,u=u+Math.imul(qe,it)|0,v=v+Math.imul(qe,ot)|0,h=h+Math.imul(De,st)|0,u=u+Math.imul(De,at)|0,u=u+Math.imul(Ne,st)|0,v=v+Math.imul(Ne,at)|0;var is=(y+h|0)+((u&8191)<<13)|0;y=(v+(u>>>13)|0)+(is>>>26)|0,is&=67108863,h=Math.imul(Fe,it),u=Math.imul(Fe,ot),u=u+Math.imul(He,it)|0,v=Math.imul(He,ot),h=h+Math.imul(Le,st)|0,u=u+Math.imul(Le,at)|0,u=u+Math.imul(qe,st)|0,v=v+Math.imul(qe,at)|0;var os=(y+h|0)+((u&8191)<<13)|0;y=(v+(u>>>13)|0)+(os>>>26)|0,os&=67108863,h=Math.imul(Fe,st),u=Math.imul(Fe,at),u=u+Math.imul(He,st)|0,v=Math.imul(He,at);var ss=(y+h|0)+((u&8191)<<13)|0;return y=(v+(u>>>13)|0)+(ss>>>26)|0,ss&=67108863,m[0]=Ds,m[1]=Vt,m[2]=Gt,m[3]=Jo,m[4]=zo,m[5]=Zo,m[6]=Vo,m[7]=Go,m[8]=Yo,m[9]=Xo,m[10]=Qo,m[11]=jo,m[12]=es,m[13]=ts,m[14]=ns,m[15]=rs,m[16]=is,m[17]=os,m[18]=ss,y!==0&&(m[19]=y,l.length++),l};Math.imul||(U=x);function _(E,d,b){b.negative=d.negative^E.negative,b.length=E.length+d.length;for(var l=0,s=0,a=0;a<b.length-1;a++){var m=s;s=0;for(var y=l&67108863,h=Math.min(a,d.length-1),u=Math.max(0,a-E.length+1);u<=h;u++){var v=a-u,k=E.words[v]|0,p=d.words[u]|0,I=k*p,W=I&67108863;m=m+(I/67108864|0)|0,W=W+y|0,y=W&67108863,m=m+(W>>>26)|0,s+=m>>>26,m&=67108863}b.words[a]=y,l=m,m=s}return l!==0?b.words[a]=l:b.length--,b.strip()}function T(E,d,b){var l=new D;return l.mulp(E,d,b)}r.prototype.mulTo=function(d,b){var l,s=this.length+d.length;return this.length===10&&d.length===10?l=U(this,d,b):s<63?l=x(this,d,b):s<1024?l=_(this,d,b):l=T(this,d,b),l};function D(E,d){this.x=E,this.y=d}D.prototype.makeRBT=function(d){for(var b=new Array(d),l=r.prototype._countBits(d)-1,s=0;s<d;s++)b[s]=this.revBin(s,l,d);return b},D.prototype.revBin=function(d,b,l){if(d===0||d===l-1)return d;for(var s=0,a=0;a<b;a++)s|=(d&1)<<b-a-1,d>>=1;return s},D.prototype.permute=function(d,b,l,s,a,m){for(var y=0;y<m;y++)s[y]=b[d[y]],a[y]=l[d[y]]},D.prototype.transform=function(d,b,l,s,a,m){this.permute(m,d,b,l,s,a);for(var y=1;y<a;y<<=1)for(var h=y<<1,u=Math.cos(2*Math.PI/h),v=Math.sin(2*Math.PI/h),k=0;k<a;k+=h)for(var p=u,I=v,W=0;W<y;W++){var V=l[k+W],X=s[k+W],de=l[k+W+y],le=s[k+W+y],pe=p*de-I*le;le=p*le+I*de,de=pe,l[k+W]=V+de,s[k+W]=X+le,l[k+W+y]=V-de,s[k+W+y]=X-le,W!==h&&(pe=u*p-v*I,I=u*I+v*p,p=pe)}},D.prototype.guessLen13b=function(d,b){var l=Math.max(b,d)|1,s=l&1,a=0;for(l=l/2|0;l;l=l>>>1)a++;return 1<<a+1+s},D.prototype.conjugate=function(d,b,l){if(!(l<=1))for(var s=0;s<l/2;s++){var a=d[s];d[s]=d[l-s-1],d[l-s-1]=a,a=b[s],b[s]=-b[l-s-1],b[l-s-1]=-a}},D.prototype.normalize13b=function(d,b){for(var l=0,s=0;s<b/2;s++){var a=Math.round(d[2*s+1]/b)*8192+Math.round(d[2*s]/b)+l;d[s]=a&67108863,a<67108864?l=0:l=a/67108864|0}return d},D.prototype.convert13b=function(d,b,l,s){for(var a=0,m=0;m<b;m++)a=a+(d[m]|0),l[2*m]=a&8191,a=a>>>13,l[2*m+1]=a&8191,a=a>>>13;for(m=2*b;m<s;++m)l[m]=0;n(a===0),n((a&-8192)===0)},D.prototype.stub=function(d){for(var b=new Array(d),l=0;l<d;l++)b[l]=0;return b},D.prototype.mulp=function(d,b,l){var s=2*this.guessLen13b(d.length,b.length),a=this.makeRBT(s),m=this.stub(s),y=new Array(s),h=new Array(s),u=new Array(s),v=new Array(s),k=new Array(s),p=new Array(s),I=l.words;I.length=s,this.convert13b(d.words,d.length,y,s),this.convert13b(b.words,b.length,v,s),this.transform(y,m,h,u,s,a),this.transform(v,m,k,p,s,a);for(var W=0;W<s;W++){var V=h[W]*k[W]-u[W]*p[W];u[W]=h[W]*p[W]+u[W]*k[W],h[W]=V}return this.conjugate(h,u,s),this.transform(h,u,I,m,s,a),this.conjugate(I,m,s),this.normalize13b(I,s),l.negative=d.negative^b.negative,l.length=d.length+b.length,l.strip()},r.prototype.mul=function(d){var b=new r(null);return b.words=new Array(this.length+d.length),this.mulTo(d,b)},r.prototype.mulf=function(d){var b=new r(null);return b.words=new Array(this.length+d.length),T(this,d,b)},r.prototype.imul=function(d){return this.clone().mulTo(d,this)},r.prototype.imuln=function(d){n(typeof d=="number"),n(d<67108864);for(var b=0,l=0;l<this.length;l++){var s=(this.words[l]|0)*d,a=(s&67108863)+(b&67108863);b>>=26,b+=s/67108864|0,b+=a>>>26,this.words[l]=a&67108863}return b!==0&&(this.words[l]=b,this.length++),this},r.prototype.muln=function(d){return this.clone().imuln(d)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(d){var b=P(d);if(b.length===0)return new r(1);for(var l=this,s=0;s<b.length&&b[s]===0;s++,l=l.sqr());if(++s<b.length)for(var a=l.sqr();s<b.length;s++,a=a.sqr())b[s]!==0&&(l=l.mul(a));return l},r.prototype.iushln=function(d){n(typeof d=="number"&&d>=0);var b=d%26,l=(d-b)/26,s=67108863>>>26-b<<26-b,a;if(b!==0){var m=0;for(a=0;a<this.length;a++){var y=this.words[a]&s,h=(this.words[a]|0)-y<<b;this.words[a]=h|m,m=y>>>26-b}m&&(this.words[a]=m,this.length++)}if(l!==0){for(a=this.length-1;a>=0;a--)this.words[a+l]=this.words[a];for(a=0;a<l;a++)this.words[a]=0;this.length+=l}return this.strip()},r.prototype.ishln=function(d){return n(this.negative===0),this.iushln(d)},r.prototype.iushrn=function(d,b,l){n(typeof d=="number"&&d>=0);var s;b?s=(b-b%26)/26:s=0;var a=d%26,m=Math.min((d-a)/26,this.length),y=67108863^67108863>>>a<<a,h=l;if(s-=m,s=Math.max(0,s),h){for(var u=0;u<m;u++)h.words[u]=this.words[u];h.length=m}if(m!==0)if(this.length>m)for(this.length-=m,u=0;u<this.length;u++)this.words[u]=this.words[u+m];else this.words[0]=0,this.length=1;var v=0;for(u=this.length-1;u>=0&&(v!==0||u>=s);u--){var k=this.words[u]|0;this.words[u]=v<<26-a|k>>>a,v=k&y}return h&&v!==0&&(h.words[h.length++]=v),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},r.prototype.ishrn=function(d,b,l){return n(this.negative===0),this.iushrn(d,b,l)},r.prototype.shln=function(d){return this.clone().ishln(d)},r.prototype.ushln=function(d){return this.clone().iushln(d)},r.prototype.shrn=function(d){return this.clone().ishrn(d)},r.prototype.ushrn=function(d){return this.clone().iushrn(d)},r.prototype.testn=function(d){n(typeof d=="number"&&d>=0);var b=d%26,l=(d-b)/26,s=1<<b;if(this.length<=l)return!1;var a=this.words[l];return!!(a&s)},r.prototype.imaskn=function(d){n(typeof d=="number"&&d>=0);var b=d%26,l=(d-b)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=l)return this;if(b!==0&&l++,this.length=Math.min(l,this.length),b!==0){var s=67108863^67108863>>>b<<b;this.words[this.length-1]&=s}return this.strip()},r.prototype.maskn=function(d){return this.clone().imaskn(d)},r.prototype.iaddn=function(d){return n(typeof d=="number"),n(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)},r.prototype._iaddn=function(d){this.words[0]+=d;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},r.prototype.isubn=function(d){if(n(typeof d=="number"),n(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 b=0;b<this.length&&this.words[b]<0;b++)this.words[b]+=67108864,this.words[b+1]-=1;return this.strip()},r.prototype.addn=function(d){return this.clone().iaddn(d)},r.prototype.subn=function(d){return this.clone().isubn(d)},r.prototype.iabs=function(){return this.negative=0,this},r.prototype.abs=function(){return this.clone().iabs()},r.prototype._ishlnsubmul=function(d,b,l){var s=d.length+l,a;this._expand(s);var m,y=0;for(a=0;a<d.length;a++){m=(this.words[a+l]|0)+y;var h=(d.words[a]|0)*b;m-=h&67108863,y=(m>>26)-(h/67108864|0),this.words[a+l]=m&67108863}for(;a<this.length-l;a++)m=(this.words[a+l]|0)+y,y=m>>26,this.words[a+l]=m&67108863;if(y===0)return this.strip();for(n(y===-1),y=0,a=0;a<this.length;a++)m=-(this.words[a]|0)+y,y=m>>26,this.words[a]=m&67108863;return this.negative=1,this.strip()},r.prototype._wordDiv=function(d,b){var l=this.length-d.length,s=this.clone(),a=d,m=a.words[a.length-1]|0,y=this._countBits(m);l=26-y,l!==0&&(a=a.ushln(l),s.iushln(l),m=a.words[a.length-1]|0);var h=s.length-a.length,u;if(b!=="mod"){u=new r(null),u.length=h+1,u.words=new Array(u.length);for(var v=0;v<u.length;v++)u.words[v]=0}var k=s.clone()._ishlnsubmul(a,1,h);k.negative===0&&(s=k,u&&(u.words[h]=1));for(var p=h-1;p>=0;p--){var I=(s.words[a.length+p]|0)*67108864+(s.words[a.length+p-1]|0);for(I=Math.min(I/m|0,67108863),s._ishlnsubmul(a,I,p);s.negative!==0;)I--,s.negative=0,s._ishlnsubmul(a,1,p),s.isZero()||(s.negative^=1);u&&(u.words[p]=I)}return u&&u.strip(),s.strip(),b!=="div"&&l!==0&&s.iushrn(l),{div:u||null,mod:s}},r.prototype.divmod=function(d,b,l){if(n(!d.isZero()),this.isZero())return{div:new r(0),mod:new r(0)};var s,a,m;return this.negative!==0&&d.negative===0?(m=this.neg().divmod(d,b),b!=="mod"&&(s=m.div.neg()),b!=="div"&&(a=m.mod.neg(),l&&a.negative!==0&&a.iadd(d)),{div:s,mod:a}):this.negative===0&&d.negative!==0?(m=this.divmod(d.neg(),b),b!=="mod"&&(s=m.div.neg()),{div:s,mod:m.mod}):(this.negative&d.negative)!==0?(m=this.neg().divmod(d.neg(),b),b!=="div"&&(a=m.mod.neg(),l&&a.negative!==0&&a.isub(d)),{div:m.div,mod:a}):d.length>this.length||this.cmp(d)<0?{div:new r(0),mod:this}:d.length===1?b==="div"?{div:this.divn(d.words[0]),mod:null}:b==="mod"?{div:null,mod:new r(this.modn(d.words[0]))}:{div:this.divn(d.words[0]),mod:new r(this.modn(d.words[0]))}:this._wordDiv(d,b)},r.prototype.div=function(d){return this.divmod(d,"div",!1).div},r.prototype.mod=function(d){return this.divmod(d,"mod",!1).mod},r.prototype.umod=function(d){return this.divmod(d,"mod",!0).mod},r.prototype.divRound=function(d){var b=this.divmod(d);if(b.mod.isZero())return b.div;var l=b.div.negative!==0?b.mod.isub(d):b.mod,s=d.ushrn(1),a=d.andln(1),m=l.cmp(s);return m<0||a===1&&m===0?b.div:b.div.negative!==0?b.div.isubn(1):b.div.iaddn(1)},r.prototype.modn=function(d){n(d<=67108863);for(var b=(1<<26)%d,l=0,s=this.length-1;s>=0;s--)l=(b*l+(this.words[s]|0))%d;return l},r.prototype.idivn=function(d){n(d<=67108863);for(var b=0,l=this.length-1;l>=0;l--){var s=(this.words[l]|0)+b*67108864;this.words[l]=s/d|0,b=s%d}return this.strip()},r.prototype.divn=function(d){return this.clone().idivn(d)},r.prototype.egcd=function(d){n(d.negative===0),n(!d.isZero());var b=this,l=d.clone();b.negative!==0?b=b.umod(d):b=b.clone();for(var s=new r(1),a=new r(0),m=new r(0),y=new r(1),h=0;b.isEven()&&l.isEven();)b.iushrn(1),l.iushrn(1),++h;for(var u=l.clone(),v=b.clone();!b.isZero();){for(var k=0,p=1;(b.words[0]&p)===0&&k<26;++k,p<<=1);if(k>0)for(b.iushrn(k);k-- >0;)(s.isOdd()||a.isOdd())&&(s.iadd(u),a.isub(v)),s.iushrn(1),a.iushrn(1);for(var I=0,W=1;(l.words[0]&W)===0&&I<26;++I,W<<=1);if(I>0)for(l.iushrn(I);I-- >0;)(m.isOdd()||y.isOdd())&&(m.iadd(u),y.isub(v)),m.iushrn(1),y.iushrn(1);b.cmp(l)>=0?(b.isub(l),s.isub(m),a.isub(y)):(l.isub(b),m.isub(s),y.isub(a))}return{a:m,b:y,gcd:l.iushln(h)}},r.prototype._invmp=function(d){n(d.negative===0),n(!d.isZero());var b=this,l=d.clone();b.negative!==0?b=b.umod(d):b=b.clone();for(var s=new r(1),a=new r(0),m=l.clone();b.cmpn(1)>0&&l.cmpn(1)>0;){for(var y=0,h=1;(b.words[0]&h)===0&&y<26;++y,h<<=1);if(y>0)for(b.iushrn(y);y-- >0;)s.isOdd()&&s.iadd(m),s.iushrn(1);for(var u=0,v=1;(l.words[0]&v)===0&&u<26;++u,v<<=1);if(u>0)for(l.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(m),a.iushrn(1);b.cmp(l)>=0?(b.isub(l),s.isub(a)):(l.isub(b),a.isub(s))}var k;return b.cmpn(1)===0?k=s:k=a,k.cmpn(0)<0&&k.iadd(d),k},r.prototype.gcd=function(d){if(this.isZero())return d.abs();if(d.isZero())return this.abs();var b=this.clone(),l=d.clone();b.negative=0,l.negative=0;for(var s=0;b.isEven()&&l.isEven();s++)b.iushrn(1),l.iushrn(1);do{for(;b.isEven();)b.iushrn(1);for(;l.isEven();)l.iushrn(1);var a=b.cmp(l);if(a<0){var m=b;b=l,l=m}else if(a===0||l.cmpn(1)===0)break;b.isub(l)}while(!0);return l.iushln(s)},r.prototype.invm=function(d){return this.egcd(d).a.umod(d)},r.prototype.isEven=function(){return(this.words[0]&1)===0},r.prototype.isOdd=function(){return(this.words[0]&1)===1},r.prototype.andln=function(d){return this.words[0]&d},r.prototype.bincn=function(d){n(typeof d=="number");var b=d%26,l=(d-b)/26,s=1<<b;if(this.length<=l)return this._expand(l+1),this.words[l]|=s,this;for(var a=s,m=l;a!==0&&m<this.length;m++){var y=this.words[m]|0;y+=a,a=y>>>26,y&=67108863,this.words[m]=y}return a!==0&&(this.words[m]=a,this.length++),this},r.prototype.isZero=function(){return this.length===1&&this.words[0]===0},r.prototype.cmpn=function(d){var b=d<0;if(this.negative!==0&&!b)return-1;if(this.negative===0&&b)return 1;this.strip();var l;if(this.length>1)l=1;else{b&&(d=-d),n(d<=67108863,"Number is too big");var s=this.words[0]|0;l=s===d?0:s<d?-1:1}return this.negative!==0?-l|0:l},r.prototype.cmp=function(d){if(this.negative!==0&&d.negative===0)return-1;if(this.negative===0&&d.negative!==0)return 1;var b=this.ucmp(d);return this.negative!==0?-b|0:b},r.prototype.ucmp=function(d){if(this.length>d.length)return 1;if(this.length<d.length)return-1;for(var b=0,l=this.length-1;l>=0;l--){var s=this.words[l]|0,a=d.words[l]|0;if(s!==a){s<a?b=-1:s>a&&(b=1);break}}return b},r.prototype.gtn=function(d){return this.cmpn(d)===1},r.prototype.gt=function(d){return this.cmp(d)===1},r.prototype.gten=function(d){return this.cmpn(d)>=0},r.prototype.gte=function(d){return this.cmp(d)>=0},r.prototype.ltn=function(d){return this.cmpn(d)===-1},r.prototype.lt=function(d){return this.cmp(d)===-1},r.prototype.lten=function(d){return this.cmpn(d)<=0},r.prototype.lte=function(d){return this.cmp(d)<=0},r.prototype.eqn=function(d){return this.cmpn(d)===0},r.prototype.eq=function(d){return this.cmp(d)===0},r.red=function(d){return new G(d)},r.prototype.toRed=function(d){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),d.convertTo(this)._forceRed(d)},r.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(d){return this.red=d,this},r.prototype.forceRed=function(d){return n(!this.red,"Already a number in reduction context"),this._forceRed(d)},r.prototype.redAdd=function(d){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,d)},r.prototype.redIAdd=function(d){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,d)},r.prototype.redSub=function(d){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,d)},r.prototype.redISub=function(d){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,d)},r.prototype.redShl=function(d){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,d)},r.prototype.redMul=function(d){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,d),this.red.mul(this,d)},r.prototype.redIMul=function(d){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,d),this.red.imul(this,d)},r.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(d){return n(this.red&&!d.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,d)};var K={k256:null,p224:null,p192:null,p25519:null};function N(E,d){this.name=E,this.p=new r(d,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}N.prototype._tmp=function(){var d=new r(null);return d.words=new Array(Math.ceil(this.n/13)),d},N.prototype.ireduce=function(d){var b=d,l;do this.split(b,this.tmp),b=this.imulK(b),b=b.iadd(this.tmp),l=b.bitLength();while(l>this.n);var s=l<this.n?-1:b.ucmp(this.p);return s===0?(b.words[0]=0,b.length=1):s>0?b.isub(this.p):b.strip!==void 0?b.strip():b._strip(),b},N.prototype.split=function(d,b){d.iushrn(this.n,0,b)},N.prototype.imulK=function(d){return d.imul(this.k)};function Z(){N.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(Z,N),Z.prototype.split=function(d,b){for(var l=4194303,s=Math.min(d.length,9),a=0;a<s;a++)b.words[a]=d.words[a];if(b.length=s,d.length<=9){d.words[0]=0,d.length=1;return}var m=d.words[9];for(b.words[b.length++]=m&l,a=10;a<d.length;a++){var y=d.words[a]|0;d.words[a-10]=(y&l)<<4|m>>>22,m=y}m>>>=22,d.words[a-10]=m,m===0&&d.length>10?d.length-=10:d.length-=9},Z.prototype.imulK=function(d){d.words[d.length]=0,d.words[d.length+1]=0,d.length+=2;for(var b=0,l=0;l<d.length;l++){var s=d.words[l]|0;b+=s*977,d.words[l]=b&67108863,b=s*64+(b/67108864|0)}return d.words[d.length-1]===0&&(d.length--,d.words[d.length-1]===0&&d.length--),d};function $(){N.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i($,N);function F(){N.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(F,N);function Y(){N.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(Y,N),Y.prototype.imulK=function(d){for(var b=0,l=0;l<d.length;l++){var s=(d.words[l]|0)*19+b,a=s&67108863;s>>>=26,d.words[l]=a,b=s}return b!==0&&(d.words[d.length++]=b),d},r._prime=function(d){if(K[d])return K[d];var b;if(d==="k256")b=new Z;else if(d==="p224")b=new $;else if(d==="p192")b=new F;else if(d==="p25519")b=new Y;else throw new Error("Unknown prime "+d);return K[d]=b,b};function G(E){if(typeof E=="string"){var d=r._prime(E);this.m=d.p,this.prime=d}else n(E.gtn(1),"modulus must be greater than 1"),this.m=E,this.prime=null}G.prototype._verify1=function(d){n(d.negative===0,"red works only with positives"),n(d.red,"red works only with red numbers")},G.prototype._verify2=function(d,b){n((d.negative|b.negative)===0,"red works only with positives"),n(d.red&&d.red===b.red,"red works only with red numbers")},G.prototype.imod=function(d){return this.prime?this.prime.ireduce(d)._forceRed(this):d.umod(this.m)._forceRed(this)},G.prototype.neg=function(d){return d.isZero()?d.clone():this.m.sub(d)._forceRed(this)},G.prototype.add=function(d,b){this._verify2(d,b);var l=d.add(b);return l.cmp(this.m)>=0&&l.isub(this.m),l._forceRed(this)},G.prototype.iadd=function(d,b){this._verify2(d,b);var l=d.iadd(b);return l.cmp(this.m)>=0&&l.isub(this.m),l},G.prototype.sub=function(d,b){this._verify2(d,b);var l=d.sub(b);return l.cmpn(0)<0&&l.iadd(this.m),l._forceRed(this)},G.prototype.isub=function(d,b){this._verify2(d,b);var l=d.isub(b);return l.cmpn(0)<0&&l.iadd(this.m),l},G.prototype.shl=function(d,b){return this._verify1(d),this.imod(d.ushln(b))},G.prototype.imul=function(d,b){return this._verify2(d,b),this.imod(d.imul(b))},G.prototype.mul=function(d,b){return this._verify2(d,b),this.imod(d.mul(b))},G.prototype.isqr=function(d){return this.imul(d,d.clone())},G.prototype.sqr=function(d){return this.mul(d,d)},G.prototype.sqrt=function(d){if(d.isZero())return d.clone();var b=this.m.andln(3);if(n(b%2===1),b===3){var l=this.m.add(new r(1)).iushrn(2);return this.pow(d,l)}for(var s=this.m.subn(1),a=0;!s.isZero()&&s.andln(1)===0;)a++,s.iushrn(1);n(!s.isZero());var m=new r(1).toRed(this),y=m.redNeg(),h=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new r(2*u*u).toRed(this);this.pow(u,h).cmp(y)!==0;)u.redIAdd(y);for(var v=this.pow(u,s),k=this.pow(d,s.addn(1).iushrn(1)),p=this.pow(d,s),I=a;p.cmp(m)!==0;){for(var W=p,V=0;W.cmp(m)!==0;V++)W=W.redSqr();n(V<I);var X=this.pow(v,new r(1).iushln(I-V-1));k=k.redMul(X),v=X.redSqr(),p=p.redMul(v),I=V}return k},G.prototype.invm=function(d){var b=d._invmp(this.m);return b.negative!==0?(b.negative=0,this.imod(b).redNeg()):this.imod(b)},G.prototype.pow=function(d,b){if(b.isZero())return new r(1).toRed(this);if(b.cmpn(1)===0)return d.clone();var l=4,s=new Array(1<<l);s[0]=new r(1).toRed(this),s[1]=d;for(var a=2;a<s.length;a++)s[a]=this.mul(s[a-1],d);var m=s[0],y=0,h=0,u=b.bitLength()%26;for(u===0&&(u=26),a=b.length-1;a>=0;a--){for(var v=b.words[a],k=u-1;k>=0;k--){var p=v>>k&1;if(m!==s[0]&&(m=this.sqr(m)),p===0&&y===0){h=0;continue}y<<=1,y|=p,h++,!(h!==l&&(a!==0||k!==0))&&(m=this.mul(m,s[y]),h=0,y=0)}u=26}return m},G.prototype.convertTo=function(d){var b=d.umod(this.m);return b===d?b.clone():b},G.prototype.convertFrom=function(d){var b=d.clone();return b.red=null,b},r.mont=function(d){return new ue(d)};function ue(E){G.call(this,E),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(ue,G),ue.prototype.convertTo=function(d){return this.imod(d.ushln(this.shift))},ue.prototype.convertFrom=function(d){var b=this.imod(d.mul(this.rinv));return b.red=null,b},ue.prototype.imul=function(d,b){if(d.isZero()||b.isZero())return d.words[0]=0,d.length=1,d;var l=d.imul(b),s=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=l.isub(s).iushrn(this.shift),m=a;return a.cmp(this.m)>=0?m=a.isub(this.m):a.cmpn(0)<0&&(m=a.iadd(this.m)),m._forceRed(this)},ue.prototype.mul=function(d,b){if(d.isZero()||b.isZero())return new r(0)._forceRed(this);var l=d.mul(b),s=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=l.isub(s).iushrn(this.shift),m=a;return a.cmp(this.m)>=0?m=a.isub(this.m):a.cmpn(0)<0&&(m=a.iadd(this.m)),m._forceRed(this)},ue.prototype.invm=function(d){var b=this.imod(d._invmp(this.m).mul(this.r2));return b._forceRed(this)}})(typeof Jf>"u"||Jf,Dh)});var Fh=L(ur=>{"use strict";B();R();var MM=ur&&ur.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ur,"__esModule",{value:!0});ur.stripHexPrefix=ur.isHexPrefixed=ur.getLength=ur.decode=ur.encode=void 0;var wM=MM(Un());function Lh(e){if(Array.isArray(e)){let t=[];for(let i=0;i<e.length;i++)t.push(Lh(e[i]));let n=C.Buffer.concat(t);return C.Buffer.concat([Nh(n.length,192),n])}else{let t=Yf(e);return t.length===1&&t[0]<128?t:C.Buffer.concat([Nh(t.length,128),t])}}ur.encode=Lh;function zf(e,t){if(e[0]==="0"&&e[1]==="0")throw new Error("invalid RLP: extra zeros");return parseInt(e,t)}function Nh(e,t){if(e<56)return C.Buffer.from([e+t]);{let n=Vf(e),i=n.length/2,r=Vf(t+55+i);return C.Buffer.from(r+n,"hex")}}function kM(e,t=!1){if(!e||e.length===0)return C.Buffer.from([]);let n=Yf(e),i=Zf(n);if(t)return i;if(i.remainder.length!==0)throw new Error("invalid remainder");return i.data}ur.decode=kM;function SM(e){if(!e||e.length===0)return C.Buffer.from([]);let t=Yf(e),n=t[0];if(n<=127)return t.length;if(n<=183)return n-127;if(n<=191)return n-182;if(n<=247)return n-191;{let i=n-246,r=zf(t.slice(1,i).toString("hex"),16);return i+r}}ur.getLength=SM;function Zf(e){let t,n,i,r,o,f=[],c=e[0];if(c<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(c<=183){if(t=c-127,c===128?i=C.Buffer.from([]):i=e.slice(1,t),t===2&&i[0]<128)throw new Error("invalid rlp encoding: byte must be less 0x80");return{data:i,remainder:e.slice(t)}}else if(c<=191){if(n=c-182,e.length-1<n)throw new Error("invalid RLP: not enough bytes for string length");if(t=zf(e.slice(1,n).toString("hex"),16),t<=55)throw new Error("invalid RLP: expected string length to be greater than 55");if(i=e.slice(n,t+n),i.length<t)throw new Error("invalid RLP: not enough bytes for string");return{data:i,remainder:e.slice(t+n)}}else if(c<=247){for(t=c-191,r=e.slice(1,t);r.length;)o=Zf(r),f.push(o.data),r=o.remainder;return{data:f,remainder:e.slice(t)}}else{n=c-246,t=zf(e.slice(1,n).toString("hex"),16);let g=n+t;if(g>e.length)throw new Error("invalid rlp: total length is larger than the data");if(r=e.slice(n,g),r.length===0)throw new Error("invalid rlp, List has a invalid length");for(;r.length;)o=Zf(r),f.push(o.data),r=o.remainder;return{data:f,remainder:e.slice(g)}}}function Gf(e){return e.slice(0,2)==="0x"}ur.isHexPrefixed=Gf;function qh(e){return Gf(e)?e.slice(2):e}ur.stripHexPrefix=qh;function Vf(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");let t=e.toString(16);return t.length%2?`0${t}`:t}function _M(e){return e.length%2?`0${e}`:e}function IM(e){let t=Vf(e);return C.Buffer.from(t,"hex")}function Yf(e){if(!C.Buffer.isBuffer(e)){if(typeof e=="string")return Gf(e)?C.Buffer.from(_M(qh(e)),"hex"):C.Buffer.from(e);if(typeof e=="number"||typeof e=="bigint")return e?IM(e):C.Buffer.from([]);if(e==null)return C.Buffer.from([]);if(e instanceof Uint8Array)return C.Buffer.from(e);if(wM.default.isBN(e))return C.Buffer.from(e.toArray());throw new Error("invalid type")}return e}});var Hh=L(Gs=>{"use strict";B();R();Object.defineProperty(Gs,"__esModule",{value:!0});Gs.validateHexString=Gs.isHexString=void 0;function xM(e,t){return e.match(/^0x[0-9A-Fa-f]*$/)?!(t&&e.length!==2+2*t):!1}Gs.isHexString=xM;function PM(e){if(!e)return!1;let t=e.toLowerCase().startsWith("0x")?e.substring(2).toLowerCase():e.toLowerCase();return!(t.length===0||t.length%2!==0||!t.match(/^[0-9A-Fa-f]*$/))}Gs.validateHexString=PM});var Kh=L(tu=>{"use strict";B();R();Object.defineProperty(tu,"__esModule",{value:!0});tu.encode=void 0;function UM(e){var t="0123456789abcdef";function n($){var F,Y="";for(F=0;F<=3;F++)Y+=t.charAt($>>F*8+4&15)+t.charAt($>>F*8&15);return Y}function i($,F){var Y=($&65535)+(F&65535),G=($>>16)+(F>>16)+(Y>>16);return G<<16|Y&65535}function r($,F){return $<<F|$>>>32-F}function o($,F,Y,G,ue,E){return i(r(i(i(F,$),i(G,E)),ue),Y)}function f($,F,Y,G,ue,E,d){return o(F&Y|~F&G,$,F,ue,E,d)}function c($,F,Y,G,ue,E,d){return o(F&G|Y&~G,$,F,ue,E,d)}function g($,F,Y,G,ue,E,d){return o(F^Y^G,$,F,ue,E,d)}function A($,F,Y,G,ue,E,d){return o(Y^(F|~G),$,F,ue,E,d)}function w($){var F,Y=($.length+8>>6)+1,G=new Array(Y*16);for(F=0;F<Y*16;F++)G[F]=0;for(F=0;F<$.length;F++)G[F>>2]|=$.charCodeAt(F)<<F%4*8;return G[F>>2]|=128<<F%4*8,G[Y*16-2]=$.length*8,G}var M,P=w(""+e),x=1732584193,U=-271733879,_=-1732584194,T=271733878,D,K,N,Z;for(M=0;M<P.length;M+=16)D=x,K=U,N=_,Z=T,x=f(x,U,_,T,P[M+0],7,-680876936),T=f(T,x,U,_,P[M+1],12,-389564586),_=f(_,T,x,U,P[M+2],17,606105819),U=f(U,_,T,x,P[M+3],22,-1044525330),x=f(x,U,_,T,P[M+4],7,-176418897),T=f(T,x,U,_,P[M+5],12,1200080426),_=f(_,T,x,U,P[M+6],17,-1473231341),U=f(U,_,T,x,P[M+7],22,-45705983),x=f(x,U,_,T,P[M+8],7,1770035416),T=f(T,x,U,_,P[M+9],12,-1958414417),_=f(_,T,x,U,P[M+10],17,-42063),U=f(U,_,T,x,P[M+11],22,-1990404162),x=f(x,U,_,T,P[M+12],7,1804603682),T=f(T,x,U,_,P[M+13],12,-40341101),_=f(_,T,x,U,P[M+14],17,-1502002290),U=f(U,_,T,x,P[M+15],22,1236535329),x=c(x,U,_,T,P[M+1],5,-165796510),T=c(T,x,U,_,P[M+6],9,-1069501632),_=c(_,T,x,U,P[M+11],14,643717713),U=c(U,_,T,x,P[M+0],20,-373897302),x=c(x,U,_,T,P[M+5],5,-701558691),T=c(T,x,U,_,P[M+10],9,38016083),_=c(_,T,x,U,P[M+15],14,-660478335),U=c(U,_,T,x,P[M+4],20,-405537848),x=c(x,U,_,T,P[M+9],5,568446438),T=c(T,x,U,_,P[M+14],9,-1019803690),_=c(_,T,x,U,P[M+3],14,-187363961),U=c(U,_,T,x,P[M+8],20,1163531501),x=c(x,U,_,T,P[M+13],5,-1444681467),T=c(T,x,U,_,P[M+2],9,-51403784),_=c(_,T,x,U,P[M+7],14,1735328473),U=c(U,_,T,x,P[M+12],20,-1926607734),x=g(x,U,_,T,P[M+5],4,-378558),T=g(T,x,U,_,P[M+8],11,-2022574463),_=g(_,T,x,U,P[M+11],16,1839030562),U=g(U,_,T,x,P[M+14],23,-35309556),x=g(x,U,_,T,P[M+1],4,-1530992060),T=g(T,x,U,_,P[M+4],11,1272893353),_=g(_,T,x,U,P[M+7],16,-155497632),U=g(U,_,T,x,P[M+10],23,-1094730640),x=g(x,U,_,T,P[M+13],4,681279174),T=g(T,x,U,_,P[M+0],11,-358537222),_=g(_,T,x,U,P[M+3],16,-722521979),U=g(U,_,T,x,P[M+6],23,76029189),x=g(x,U,_,T,P[M+9],4,-640364487),T=g(T,x,U,_,P[M+12],11,-421815835),_=g(_,T,x,U,P[M+15],16,530742520),U=g(U,_,T,x,P[M+2],23,-995338651),x=A(x,U,_,T,P[M+0],6,-198630844),T=A(T,x,U,_,P[M+7],10,1126891415),_=A(_,T,x,U,P[M+14],15,-1416354905),U=A(U,_,T,x,P[M+5],21,-57434055),x=A(x,U,_,T,P[M+12],6,1700485571),T=A(T,x,U,_,P[M+3],10,-1894986606),_=A(_,T,x,U,P[M+10],15,-1051523),U=A(U,_,T,x,P[M+1],21,-2054922799),x=A(x,U,_,T,P[M+8],6,1873313359),T=A(T,x,U,_,P[M+15],10,-30611744),_=A(_,T,x,U,P[M+6],15,-1560198380),U=A(U,_,T,x,P[M+13],21,1309151649),x=A(x,U,_,T,P[M+4],6,-145523070),T=A(T,x,U,_,P[M+11],10,-1120210379),_=A(_,T,x,U,P[M+2],15,718787259),U=A(U,_,T,x,P[M+9],21,-343485551),x=i(x,D),U=i(U,K),_=i(_,N),T=i(T,Z);return n(x)+n(U)+n(_)+n(T)}tu.encode=UM});var Qf=L(Pt=>{"use strict";B();R();var BM=Pt&&Pt.__createBinding||(Object.create?function(e,t,n,i){i===void 0&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]}),RM=Pt&&Pt.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Wh=Pt&&Pt.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&BM(t,e,n);return RM(t,e),t};Object.defineProperty(Pt,"__esModule",{value:!0});Pt.blake2s=Pt.compress=Pt.IV=void 0;var CM=Wh(Ls()),$h=Wh(Yd()),pi=$n();Pt.IV=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]);function oo(e,t,n,i,r){return e=e+t+r|0,i=(0,pi.rotr)(i^e,16),n=n+i|0,t=(0,pi.rotr)(t^n,12),{a:e,b:t,c:n,d:i}}function so(e,t,n,i,r){return e=e+t+r|0,i=(0,pi.rotr)(i^e,8),n=n+i|0,t=(0,pi.rotr)(t^n,7),{a:e,b:t,c:n,d:i}}function Jh(e,t,n,i,r,o,f,c,g,A,w,M,P,x,U,_,T,D,K,N){let Z=0;for(let $=0;$<i;$++)({a:r,b:g,c:P,d:T}=oo(r,g,P,T,n[t+e[Z++]])),{a:r,b:g,c:P,d:T}=so(r,g,P,T,n[t+e[Z++]]),{a:o,b:A,c:x,d:D}=oo(o,A,x,D,n[t+e[Z++]]),{a:o,b:A,c:x,d:D}=so(o,A,x,D,n[t+e[Z++]]),{a:f,b:w,c:U,d:K}=oo(f,w,U,K,n[t+e[Z++]]),{a:f,b:w,c:U,d:K}=so(f,w,U,K,n[t+e[Z++]]),{a:c,b:M,c:_,d:N}=oo(c,M,_,N,n[t+e[Z++]]),{a:c,b:M,c:_,d:N}=so(c,M,_,N,n[t+e[Z++]]),{a:r,b:A,c:U,d:N}=oo(r,A,U,N,n[t+e[Z++]]),{a:r,b:A,c:U,d:N}=so(r,A,U,N,n[t+e[Z++]]),{a:o,b:w,c:_,d:T}=oo(o,w,_,T,n[t+e[Z++]]),{a:o,b:w,c:_,d:T}=so(o,w,_,T,n[t+e[Z++]]),{a:f,b:M,c:P,d:D}=oo(f,M,P,D,n[t+e[Z++]]),{a:f,b:M,c:P,d:D}=so(f,M,P,D,n[t+e[Z++]]),{a:c,b:g,c:x,d:K}=oo(c,g,x,K,n[t+e[Z++]]),{a:c,b:g,c:x,d:K}=so(c,g,x,K,n[t+e[Z++]]);return{v0:r,v1:o,v2:f,v3:c,v4:g,v5:A,v6:w,v7:M,v8:P,v9:x,v10:U,v11:_,v12:T,v13:D,v14:K,v15:N}}Pt.compress=Jh;var Xf=class extends $h.BLAKE2{constructor(t={}){super(64,t.dkLen===void 0?32:t.dkLen,t,32,8,8),this.v0=Pt.IV[0]|0,this.v1=Pt.IV[1]|0,this.v2=Pt.IV[2]|0,this.v3=Pt.IV[3]|0,this.v4=Pt.IV[4]|0,this.v5=Pt.IV[5]|0,this.v6=Pt.IV[6]|0,this.v7=Pt.IV[7]|0;let n=t.key?t.key.length:0;if(this.v0^=this.outputLen|n<<8|1<<16|1<<24,t.salt){let i=(0,pi.u32)((0,pi.toBytes)(t.salt));this.v4^=i[0],this.v5^=i[1]}if(t.personalization){let i=(0,pi.u32)((0,pi.toBytes)(t.personalization));this.v6^=i[0],this.v7^=i[1]}if(t.key){let i=new Uint8Array(this.blockLen);i.set((0,pi.toBytes)(t.key)),this.update(i)}}get(){let{v0:t,v1:n,v2:i,v3:r,v4:o,v5:f,v6:c,v7:g}=this;return[t,n,i,r,o,f,c,g]}set(t,n,i,r,o,f,c,g){this.v0=t|0,this.v1=n|0,this.v2=i|0,this.v3=r|0,this.v4=o|0,this.v5=f|0,this.v6=c|0,this.v7=g|0}compress(t,n,i){let{h:r,l:o}=CM.fromBig(BigInt(this.length)),{v0:f,v1:c,v2:g,v3:A,v4:w,v5:M,v6:P,v7:x,v8:U,v9:_,v10:T,v11:D,v12:K,v13:N,v14:Z,v15:$}=Jh($h.SIGMA,n,t,10,this.v0,this.v1,this.v2,this.v3,this.v4,this.v5,this.v6,this.v7,Pt.IV[0],Pt.IV[1],Pt.IV[2],Pt.IV[3],o^Pt.IV[4],r^Pt.IV[5],i?~Pt.IV[6]:Pt.IV[6],Pt.IV[7]);this.v0^=f^U,this.v1^=c^_,this.v2^=g^T,this.v3^=A^D,this.v4^=w^K,this.v5^=M^N,this.v6^=P^Z,this.v7^=x^$}destroy(){this.destroyed=!0,this.buffer32.fill(0),this.set(0,0,0,0,0,0,0,0)}};Pt.blake2s=(0,pi.wrapConstructorWithOpts)(e=>new Xf(e))});var nu=L(Ys=>{"use strict";B();R();Object.defineProperty(Ys,"__esModule",{value:!0});Ys.pbkdf2Async=Ys.pbkdf2=void 0;var EM=rd(),hi=$n();function zh(e,t,n,i){(0,hi.assertHash)(e);let r=(0,hi.checkOpts)({dkLen:32,asyncTick:10},i),{c:o,dkLen:f,asyncTick:c}=r;if((0,hi.assertNumber)(o),(0,hi.assertNumber)(f),(0,hi.assertNumber)(c),o<1)throw new Error("PBKDF2: iterations (c) should be >= 1");let g=(0,hi.toBytes)(t),A=(0,hi.toBytes)(n),w=new Uint8Array(f),M=EM.hmac.create(e,g),P=M._cloneInto().update(A);return{c:o,dkLen:f,asyncTick:c,DK:w,PRF:M,PRFSalt:P}}function Zh(e,t,n,i,r){return e.destroy(),t.destroy(),i&&i.destroy(),r.fill(0),n}function TM(e,t,n,i){let{c:r,dkLen:o,DK:f,PRF:c,PRFSalt:g}=zh(e,t,n,i),A,w=new Uint8Array(4),M=(0,hi.createView)(w),P=new Uint8Array(c.outputLen);for(let x=1,U=0;U<o;x++,U+=c.outputLen){let _=f.subarray(U,U+c.outputLen);M.setInt32(0,x,!1),(A=g._cloneInto(A)).update(w).digestInto(P),_.set(P.subarray(0,_.length));for(let T=1;T<r;T++){c._cloneInto(A).update(P).digestInto(P);for(let D=0;D<_.length;D++)_[D]^=P[D]}}return Zh(c,g,f,A,P)}Ys.pbkdf2=TM;async function OM(e,t,n,i){let{c:r,dkLen:o,asyncTick:f,DK:c,PRF:g,PRFSalt:A}=zh(e,t,n,i),w,M=new Uint8Array(4),P=(0,hi.createView)(M),x=new Uint8Array(g.outputLen);for(let U=1,_=0;_<o;U++,_+=g.outputLen){let T=c.subarray(_,_+g.outputLen);P.setInt32(0,U,!1),(w=A._cloneInto(w)).update(M).digestInto(x),T.set(x.subarray(0,T.length)),await(0,hi.asyncLoop)(r-1,f,D=>{g._cloneInto(w).update(x).digestInto(x);for(let K=0;K<T.length;K++)T[K]^=x[K]})}return Zh(g,A,c,w,x)}Ys.pbkdf2Async=OM});var jh=L(Qs=>{"use strict";B();R();Object.defineProperty(Qs,"__esModule",{value:!0});Qs.scryptAsync=Qs.scrypt=void 0;var Gh=Ns(),Yh=nu(),xr=$n(),St=(e,t)=>e<<t|e>>>32-t;function Vh(e,t,n,i,r,o){let f=e[t++]^n[i++],c=e[t++]^n[i++],g=e[t++]^n[i++],A=e[t++]^n[i++],w=e[t++]^n[i++],M=e[t++]^n[i++],P=e[t++]^n[i++],x=e[t++]^n[i++],U=e[t++]^n[i++],_=e[t++]^n[i++],T=e[t++]^n[i++],D=e[t++]^n[i++],K=e[t++]^n[i++],N=e[t++]^n[i++],Z=e[t++]^n[i++],$=e[t++]^n[i++],F=f,Y=c,G=g,ue=A,E=w,d=M,b=P,l=x,s=U,a=_,m=T,y=D,h=K,u=N,v=Z,k=$;for(let p=0;p<8;p+=2)E^=St(F+h|0,7),s^=St(E+F|0,9),h^=St(s+E|0,13),F^=St(h+s|0,18),a^=St(d+Y|0,7),u^=St(a+d|0,9),Y^=St(u+a|0,13),d^=St(Y+u|0,18),v^=St(m+b|0,7),G^=St(v+m|0,9),b^=St(G+v|0,13),m^=St(b+G|0,18),ue^=St(k+y|0,7),l^=St(ue+k|0,9),y^=St(l+ue|0,13),k^=St(y+l|0,18),Y^=St(F+ue|0,7),G^=St(Y+F|0,9),ue^=St(G+Y|0,13),F^=St(ue+G|0,18),b^=St(d+E|0,7),l^=St(b+d|0,9),E^=St(l+b|0,13),d^=St(E+l|0,18),y^=St(m+a|0,7),s^=St(y+m|0,9),a^=St(s+y|0,13),m^=St(a+s|0,18),h^=St(k+v|0,7),u^=St(h+k|0,9),v^=St(u+h|0,13),k^=St(v+u|0,18);r[o++]=f+F|0,r[o++]=c+Y|0,r[o++]=g+G|0,r[o++]=A+ue|0,r[o++]=w+E|0,r[o++]=M+d|0,r[o++]=P+b|0,r[o++]=x+l|0,r[o++]=U+s|0,r[o++]=_+a|0,r[o++]=T+m|0,r[o++]=D+y|0,r[o++]=K+h|0,r[o++]=N+u|0,r[o++]=Z+v|0,r[o++]=$+k|0}function Xs(e,t,n,i,r){let o=i+0,f=i+16*r;for(let c=0;c<16;c++)n[f+c]=e[t+(2*r-1)*16+c];for(let c=0;c<r;c++,o+=16,t+=16)Vh(n,f,e,t,n,o),c>0&&(f+=16),Vh(n,o,e,t+=16,n,f)}function Xh(e,t,n){let i=(0,xr.checkOpts)({dkLen:32,asyncTick:10,maxmem:1073742848},n),{N:r,r:o,p:f,dkLen:c,asyncTick:g,maxmem:A,onProgress:w}=i;if((0,xr.assertNumber)(r),(0,xr.assertNumber)(o),(0,xr.assertNumber)(f),(0,xr.assertNumber)(c),(0,xr.assertNumber)(g),(0,xr.assertNumber)(A),w!==void 0&&typeof w!="function")throw new Error("progressCb should be function");let M=128*o,P=M/4;if(r<=1||(r&r-1)!==0||r>=2**(M/8)||r>2**32)throw new Error("Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32");if(f<0||f>(2**32-1)*32/M)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(c<0||c>(2**32-1)*32)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");let x=M*(r+f);if(x>A)throw new Error(`Scrypt: parameters too large, ${x} (128 * r * (N + p)) > ${A} (maxmem)`);let U=(0,Yh.pbkdf2)(Gh.sha256,e,t,{c:1,dkLen:M*f}),_=(0,xr.u32)(U),T=(0,xr.u32)(new Uint8Array(M*r)),D=(0,xr.u32)(new Uint8Array(M)),K=()=>{};if(w){let N=2*r*f,Z=Math.max(Math.floor(N/1e4),1),$=0;K=()=>{$++,w&&(!($%Z)||$===N)&&w($/N)}}return{N:r,r:o,p:f,dkLen:c,blockSize32:P,V:T,B32:_,B:U,tmp:D,blockMixCb:K,asyncTick:g}}function Qh(e,t,n,i,r){let o=(0,Yh.pbkdf2)(Gh.sha256,e,n,{c:1,dkLen:t});return n.fill(0),i.fill(0),r.fill(0),o}function DM(e,t,n){let{N:i,r,p:o,dkLen:f,blockSize32:c,V:g,B32:A,B:w,tmp:M,blockMixCb:P}=Xh(e,t,n);for(let x=0;x<o;x++){let U=c*x;for(let _=0;_<c;_++)g[_]=A[U+_];for(let _=0,T=0;_<i-1;_++)Xs(g,T,g,T+=c,r),P();Xs(g,(i-1)*c,A,U,r),P();for(let _=0;_<i;_++){let T=A[U+c-16]%i;for(let D=0;D<c;D++)M[D]=A[U+D]^g[T*c+D];Xs(M,0,A,U,r),P()}}return Qh(e,f,w,g,M)}Qs.scrypt=DM;async function NM(e,t,n){let{N:i,r,p:o,dkLen:f,blockSize32:c,V:g,B32:A,B:w,tmp:M,blockMixCb:P,asyncTick:x}=Xh(e,t,n);for(let U=0;U<o;U++){let _=c*U;for(let D=0;D<c;D++)g[D]=A[_+D];let T=0;await(0,xr.asyncLoop)(i-1,x,D=>{Xs(g,T,g,T+=c,r),P()}),Xs(g,(i-1)*c,A,_,r),P(),await(0,xr.asyncLoop)(i,x,D=>{let K=A[_+c-16]%i;for(let N=0;N<c;N++)M[N]=A[_+N]^g[K*c+N];Xs(M,0,A,_,r),P()})}return Qh(e,f,w,g,M)}Qs.scryptAsync=NM});var ng=L(gi=>{"use strict";B();R();var LM=gi&&gi.__createBinding||(Object.create?function(e,t,n,i){i===void 0&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]}),qM=gi&&gi.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),jf=gi&&gi.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&LM(t,e,n);return qM(t,e),t};Object.defineProperty(gi,"__esModule",{value:!0});gi.blake3=void 0;var eg=jf(Ls()),FM=jf(Yd()),Xr=jf(Qf()),cs=$n(),Pr;(function(e){e[e.CHUNK_START=1]="CHUNK_START",e[e.CHUNK_END=2]="CHUNK_END",e[e.PARENT=4]="PARENT",e[e.ROOT=8]="ROOT",e[e.KEYED_HASH=16]="KEYED_HASH",e[e.DERIVE_KEY_CONTEXT=32]="DERIVE_KEY_CONTEXT",e[e.DERIVE_KEY_MATERIAL=64]="DERIVE_KEY_MATERIAL"})(Pr||(Pr={}));var tg=(()=>{let e=Array.from({length:16},(i,r)=>r),t=i=>[2,6,3,10,7,0,4,13,1,11,12,5,9,14,15,8].map(r=>i[r]),n=[];for(let i=0,r=e;i<7;i++,r=t(r))n.push(...r);return Uint8Array.from(n)})(),id=class extends FM.BLAKE2{constructor(t={},n=0){if(super(64,t.dkLen===void 0?32:t.dkLen,{},Number.MAX_SAFE_INTEGER,0,0),this.flags=0,this.chunkPos=0,this.chunksDone=0,this.stack=[],this.posOut=0,this.bufferOut32=new Uint32Array(16),this.chunkOut=0,this.enableXOF=!0,this.outputLen=t.dkLen===void 0?32:t.dkLen,(0,cs.assertNumber)(this.outputLen),t.key!==void 0&&t.context!==void 0)throw new Error("Blake3: only key or context can be specified at same time");if(t.key!==void 0){let i=(0,cs.toBytes)(t.key);if(i.length!==32)throw new Error("Blake3: key should be 32 byte");this.IV=(0,cs.u32)(i),this.flags=n|Pr.KEYED_HASH}else if(t.context!==void 0){let i=new id({dkLen:32},Pr.DERIVE_KEY_CONTEXT).update(t.context).digest();this.IV=(0,cs.u32)(i),this.flags=n|Pr.DERIVE_KEY_MATERIAL}else this.IV=Xr.IV.slice(),this.flags=n;this.state=this.IV.slice(),this.bufferOut=(0,cs.u8)(this.bufferOut32)}get(){return[]}set(){}b2Compress(t,n,i,r=0){let{state:o,pos:f}=this,{h:c,l:g}=eg.fromBig(BigInt(t),!0),{v0:A,v1:w,v2:M,v3:P,v4:x,v5:U,v6:_,v7:T,v8:D,v9:K,v10:N,v11:Z,v12:$,v13:F,v14:Y,v15:G}=Xr.compress(tg,r,i,7,o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],Xr.IV[0],Xr.IV[1],Xr.IV[2],Xr.IV[3],c,g,f,n);o[0]=A^D,o[1]=w^K,o[2]=M^N,o[3]=P^Z,o[4]=x^$,o[5]=U^F,o[6]=_^Y,o[7]=T^G}compress(t,n=0,i=!1){let r=this.flags;if(this.chunkPos||(r|=Pr.CHUNK_START),(this.chunkPos===15||i)&&(r|=Pr.CHUNK_END),i||(this.pos=this.blockLen),this.b2Compress(this.chunksDone,r,t,n),this.chunkPos+=1,this.chunkPos===16||i){let o=this.state;this.state=this.IV.slice();for(let f,c=this.chunksDone+1;(i||!(c&1))&&(f=this.stack.pop());c>>=1)this.buffer32.set(f,0),this.buffer32.set(o,8),this.pos=this.blockLen,this.b2Compress(0,this.flags|Pr.PARENT,this.buffer32,0),o=this.state,this.state=this.IV.slice();this.chunksDone++,this.chunkPos=0,this.stack.push(o)}this.pos=0}_cloneInto(t){t=super._cloneInto(t);let{IV:n,flags:i,state:r,chunkPos:o,posOut:f,chunkOut:c,stack:g,chunksDone:A}=this;return t.state.set(r.slice()),t.stack=g.map(w=>Uint32Array.from(w)),t.IV.set(n),t.flags=i,t.chunkPos=o,t.chunksDone=A,t.posOut=f,t.chunkOut=c,t.enableXOF=this.enableXOF,t.bufferOut32.set(this.bufferOut32),t}destroy(){this.destroyed=!0,this.state.fill(0),this.buffer32.fill(0),this.IV.fill(0),this.bufferOut32.fill(0);for(let t of this.stack)t.fill(0)}b2CompressOut(){let{state:t,pos:n,flags:i,buffer32:r,bufferOut32:o}=this,{h:f,l:c}=eg.fromBig(BigInt(this.chunkOut++)),{v0:g,v1:A,v2:w,v3:M,v4:P,v5:x,v6:U,v7:_,v8:T,v9:D,v10:K,v11:N,v12:Z,v13:$,v14:F,v15:Y}=Xr.compress(tg,0,r,7,t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],Xr.IV[0],Xr.IV[1],Xr.IV[2],Xr.IV[3],c,f,n,i);o[0]=g^T,o[1]=A^D,o[2]=w^K,o[3]=M^N,o[4]=P^Z,o[5]=x^$,o[6]=U^F,o[7]=_^Y,o[8]=t[0]^T,o[9]=t[1]^D,o[10]=t[2]^K,o[11]=t[3]^N,o[12]=t[4]^Z,o[13]=t[5]^$,o[14]=t[6]^F,o[15]=t[7]^Y,this.posOut=0}finish(){if(this.finished)return;this.finished=!0,this.buffer.fill(0,this.pos);let t=this.flags|Pr.ROOT;this.stack.length?(t|=Pr.PARENT,this.compress(this.buffer32,0,!0),this.chunksDone=0,this.pos=this.blockLen):t|=(this.chunkPos?0:Pr.CHUNK_START)|Pr.CHUNK_END,this.flags=t,this.b2CompressOut()}writeInto(t){if(this.destroyed)throw new Error("instance is destroyed");if(!(t instanceof Uint8Array))throw new Error("Blake3: Invalid output buffer");this.finish();let{blockLen:n,bufferOut:i}=this;for(let r=0,o=t.length;r<o;){this.posOut>=n&&this.b2CompressOut();let f=Math.min(this.blockLen-this.posOut,o-r);t.set(i.subarray(this.posOut,this.posOut+f),r),this.posOut+=f,r+=f}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF impossible after digest call");return this.writeInto(t)}xof(t){return(0,cs.assertNumber)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(t.length<this.outputLen)throw new Error("Blake3: Invalid output buffer");if(this.finished)throw new Error("digest() was already called");return this.enableXOF=!1,this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}};gi.blake3=(0,cs.wrapConstructorWithOpts)(e=>new id(e))});var ls=L(Ue=>{"use strict";B();R();var rg=Ue&&Ue.__createBinding||(Object.create?function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]}),HM=Ue&&Ue.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),sn=Ue&&Ue.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&rg(t,e,n)},ec=Ue&&Ue.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&rg(t,e,n);return HM(t,e),t};Object.defineProperty(Ue,"__esModule",{value:!0});Ue.randomBytes=Ue.concatBytes=Ue.reverseBuffer=Ue.md5=Ue.rlp=void 0;sn(ih(),Ue);sn(_h(),Ue);sn(Ih(),Ue);sn(xh(),Ue);sn(Uh(),Ue);sn(td(),Ue);sn(Ch(),Ue);sn(Eh(),Ue);sn(Oh(),Ue);sn(Wf(),Ue);Ue.rlp=ec(Fh());sn(Hh(),Ue);Ue.md5=ec(Kh());sn(as(),Ue);sn(Ns(),Ue);sn(rd(),Ue);sn(qf(),Ue);sn(Jd(),Ue);sn(Gd(),Ue);sn(Kf(),Ue);sn(Qf(),Ue);sn(nu(),Ue);sn(jh(),Ue);sn(ng(),Ue);var KM=ec($n()),$M=u3();function WM(e){if(e.length<1)return e;let t=e.length-1,n=0;for(let i=0;i<e.length/2;i++)n=e[i],e[i]=e[t],e[t]=n,t--;return e}Ue.reverseBuffer=WM;function JM(e,t){return KM.concatBytes(Uint8Array.from(e),Uint8Array.from(t))}Ue.concatBytes=JM;function zM(e){return $M(e)}Ue.randomBytes=zM});var Mr=L(ig=>{"use strict";B();R();var Qr=ig,ZM=Un(),VM=c3(),ru=m3();Qr.assert=VM;Qr.toArray=ru.toArray;Qr.zero2=ru.zero2;Qr.toHex=ru.toHex;Qr.encode=ru.encode;function GM(e,t,n){var i=new Array(Math.max(e.bitLength(),n)+1);i.fill(0);for(var r=1<<t+1,o=e.clone(),f=0;f<i.length;f++){var c,g=o.andln(r-1);o.isOdd()?(g>(r>>1)-1?c=(r>>1)-g:c=g,o.isubn(c)):c=0,i[f]=c,o.iushrn(1)}return i}Qr.getNAF=GM;function YM(e,t){var n=[[],[]];e=e.clone(),t=t.clone();for(var i=0,r=0,o;e.cmpn(-i)>0||t.cmpn(-r)>0;){var f=e.andln(3)+i&3,c=t.andln(3)+r&3;f===3&&(f=-1),c===3&&(c=-1);var g;(f&1)===0?g=0:(o=e.andln(7)+i&7,(o===3||o===5)&&c===2?g=-f:g=f),n[0].push(g);var A;(c&1)===0?A=0:(o=t.andln(7)+r&7,(o===3||o===5)&&f===2?A=-c:A=c),n[1].push(A),2*i===g+1&&(i=1-i),2*r===A+1&&(r=1-r),e.iushrn(1),t.iushrn(1)}return n}Qr.getJSF=YM;function XM(e,t,n){var i="_"+t;e.prototype[t]=function(){return this[i]!==void 0?this[i]:this[i]=n.call(this)}}Qr.cachedProperty=XM;function QM(e){return typeof e=="string"?Qr.toArray(e,"hex"):e}Qr.parseBytes=QM;function jM(e){return new ZM(e,"hex","le")}Qr.intFromLE=jM});var sd=L((Z7,og)=>{"use strict";B();R();var od=Mr(),ms=Un(),iu=od.getNAF,ew=od.getJSF,ou=od.assert;function ao(e,t){this.type=e,this.p=new ms(t.p,16),this.red=t.prime?ms.red(t.prime):ms.mont(this.p),this.zero=new ms(0).toRed(this.red),this.one=new ms(1).toRed(this.red),this.two=new ms(2).toRed(this.red),this.n=t.n&&new ms(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.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 n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}og.exports=ao;ao.prototype.point=function(){throw new Error("Not implemented")};ao.prototype.validate=function(){throw new Error("Not implemented")};ao.prototype._fixedNafMul=function(t,n){ou(t.precomputed);var i=t._getDoubles(),r=iu(n,1,this._bitLength),o=(1<<i.step+1)-(i.step%2===0?2:1);o/=3;var f=[],c,g;for(c=0;c<r.length;c+=i.step){g=0;for(var A=c+i.step-1;A>=c;A--)g=(g<<1)+r[A];f.push(g)}for(var w=this.jpoint(null,null,null),M=this.jpoint(null,null,null),P=o;P>0;P--){for(c=0;c<f.length;c++)g=f[c],g===P?M=M.mixedAdd(i.points[c]):g===-P&&(M=M.mixedAdd(i.points[c].neg()));w=w.add(M)}return w.toP()};ao.prototype._wnafMul=function(t,n){var i=4,r=t._getNAFPoints(i);i=r.wnd;for(var o=r.points,f=iu(n,i,this._bitLength),c=this.jpoint(null,null,null),g=f.length-1;g>=0;g--){for(var A=0;g>=0&&f[g]===0;g--)A++;if(g>=0&&A++,c=c.dblp(A),g<0)break;var w=f[g];ou(w!==0),t.type==="affine"?w>0?c=c.mixedAdd(o[w-1>>1]):c=c.mixedAdd(o[-w-1>>1].neg()):w>0?c=c.add(o[w-1>>1]):c=c.add(o[-w-1>>1].neg())}return t.type==="affine"?c.toP():c};ao.prototype._wnafMulAdd=function(t,n,i,r,o){var f=this._wnafT1,c=this._wnafT2,g=this._wnafT3,A=0,w,M,P;for(w=0;w<r;w++){P=n[w];var x=P._getNAFPoints(t);f[w]=x.wnd,c[w]=x.points}for(w=r-1;w>=1;w-=2){var U=w-1,_=w;if(f[U]!==1||f[_]!==1){g[U]=iu(i[U],f[U],this._bitLength),g[_]=iu(i[_],f[_],this._bitLength),A=Math.max(g[U].length,A),A=Math.max(g[_].length,A);continue}var T=[n[U],null,null,n[_]];n[U].y.cmp(n[_].y)===0?(T[1]=n[U].add(n[_]),T[2]=n[U].toJ().mixedAdd(n[_].neg())):n[U].y.cmp(n[_].y.redNeg())===0?(T[1]=n[U].toJ().mixedAdd(n[_]),T[2]=n[U].add(n[_].neg())):(T[1]=n[U].toJ().mixedAdd(n[_]),T[2]=n[U].toJ().mixedAdd(n[_].neg()));var D=[-3,-1,-5,-7,0,7,5,1,3],K=ew(i[U],i[_]);for(A=Math.max(K[0].length,A),g[U]=new Array(A),g[_]=new Array(A),M=0;M<A;M++){var N=K[0][M]|0,Z=K[1][M]|0;g[U][M]=D[(N+1)*3+(Z+1)],g[_][M]=0,c[U]=T}}var $=this.jpoint(null,null,null),F=this._wnafT4;for(w=A;w>=0;w--){for(var Y=0;w>=0;){var G=!0;for(M=0;M<r;M++)F[M]=g[M][w]|0,F[M]!==0&&(G=!1);if(!G)break;Y++,w--}if(w>=0&&Y++,$=$.dblp(Y),w<0)break;for(M=0;M<r;M++){var ue=F[M];ue!==0&&(ue>0?P=c[M][ue-1>>1]:ue<0&&(P=c[M][-ue-1>>1].neg()),P.type==="affine"?$=$.mixedAdd(P):$=$.add(P))}}for(w=0;w<r;w++)c[w]=null;return o?$:$.toP()};function Ur(e,t){this.curve=e,this.type=t,this.precomputed=null}ao.BasePoint=Ur;Ur.prototype.eq=function(){throw new Error("Not implemented")};Ur.prototype.validate=function(){return this.curve.validate(this)};ao.prototype.decodePoint=function(t,n){t=od.toArray(t,n);var i=this.p.byteLength();if((t[0]===4||t[0]===6||t[0]===7)&&t.length-1===2*i){t[0]===6?ou(t[t.length-1]%2===0):t[0]===7&&ou(t[t.length-1]%2===1);var r=this.point(t.slice(1,1+i),t.slice(1+i,1+2*i));return r}else if((t[0]===2||t[0]===3)&&t.length-1===i)return this.pointFromX(t.slice(1,1+i),t[0]===3);throw new Error("Unknown point format")};Ur.prototype.encodeCompressed=function(t){return this.encode(t,!0)};Ur.prototype._encode=function(t){var n=this.curve.p.byteLength(),i=this.getX().toArray("be",n);return t?[this.getY().isEven()?2:3].concat(i):[4].concat(i,this.getY().toArray("be",n))};Ur.prototype.encode=function(t,n){return od.encode(this._encode(n),t)};Ur.prototype.precompute=function(t){if(this.precomputed)return this;var n={doubles:null,naf:null,beta:null};return n.naf=this._getNAFPoints(8),n.doubles=this._getDoubles(4,t),n.beta=this._getBeta(),this.precomputed=n,this};Ur.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var n=this.precomputed.doubles;return n?n.points.length>=Math.ceil((t.bitLength()+1)/n.step):!1};Ur.prototype._getDoubles=function(t,n){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var i=[this],r=this,o=0;o<n;o+=t){for(var f=0;f<t;f++)r=r.dbl();i.push(r)}return{step:t,points:i}};Ur.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var n=[this],i=(1<<t)-1,r=i===1?null:this.dbl(),o=1;o<i;o++)n[o]=n[o-1].add(r);return{wnd:t,points:n}};Ur.prototype._getBeta=function(){return null};Ur.prototype.dblp=function(t){for(var n=this,i=0;i<t;i++)n=n.dbl();return n}});var ag=L((Y7,sg)=>{"use strict";B();R();var tw=Mr(),an=Un(),tc=kf(),js=sd(),nw=tw.assert;function Br(e){js.call(this,"short",e),this.a=new an(e.a,16).toRed(this.red),this.b=new an(e.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(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}tc(Br,js);sg.exports=Br;Br.prototype._getEndomorphism=function(t){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var n,i;if(t.beta)n=new an(t.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);n=r[0].cmp(r[1])<0?r[0]:r[1],n=n.toRed(this.red)}if(t.lambda)i=new an(t.lambda,16);else{var o=this._getEndoRoots(this.n);this.g.mul(o[0]).x.cmp(this.g.x.redMul(n))===0?i=o[0]:(i=o[1],nw(this.g.mul(i).x.cmp(this.g.x.redMul(n))===0))}var f;return t.basis?f=t.basis.map(function(c){return{a:new an(c.a,16),b:new an(c.b,16)}}):f=this._getEndoBasis(i),{beta:n,lambda:i,basis:f}}};Br.prototype._getEndoRoots=function(t){var n=t===this.p?this.red:an.mont(t),i=new an(2).toRed(n).redInvm(),r=i.redNeg(),o=new an(3).toRed(n).redNeg().redSqrt().redMul(i),f=r.redAdd(o).fromRed(),c=r.redSub(o).fromRed();return[f,c]};Br.prototype._getEndoBasis=function(t){for(var n=this.n.ushrn(Math.floor(this.n.bitLength()/2)),i=t,r=this.n.clone(),o=new an(1),f=new an(0),c=new an(0),g=new an(1),A,w,M,P,x,U,_,T=0,D,K;i.cmpn(0)!==0;){var N=r.div(i);D=r.sub(N.mul(i)),K=c.sub(N.mul(o));var Z=g.sub(N.mul(f));if(!M&&D.cmp(n)<0)A=_.neg(),w=o,M=D.neg(),P=K;else if(M&&++T===2)break;_=D,r=i,i=D,c=o,o=K,g=f,f=Z}x=D.neg(),U=K;var $=M.sqr().add(P.sqr()),F=x.sqr().add(U.sqr());return F.cmp($)>=0&&(x=A,U=w),M.negative&&(M=M.neg(),P=P.neg()),x.negative&&(x=x.neg(),U=U.neg()),[{a:M,b:P},{a:x,b:U}]};Br.prototype._endoSplit=function(t){var n=this.endo.basis,i=n[0],r=n[1],o=r.b.mul(t).divRound(this.n),f=i.b.neg().mul(t).divRound(this.n),c=o.mul(i.a),g=f.mul(r.a),A=o.mul(i.b),w=f.mul(r.b),M=t.sub(c).sub(g),P=A.add(w).neg();return{k1:M,k2:P}};Br.prototype.pointFromX=function(t,n){t=new an(t,16),t.red||(t=t.toRed(this.red));var i=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),r=i.redSqrt();if(r.redSqr().redSub(i).cmp(this.zero)!==0)throw new Error("invalid point");var o=r.fromRed().isOdd();return(n&&!o||!n&&o)&&(r=r.redNeg()),this.point(t,r)};Br.prototype.validate=function(t){if(t.inf)return!0;var n=t.x,i=t.y,r=this.a.redMul(n),o=n.redSqr().redMul(n).redIAdd(r).redIAdd(this.b);return i.redSqr().redISub(o).cmpn(0)===0};Br.prototype._endoWnafMulAdd=function(t,n,i){for(var r=this._endoWnafT1,o=this._endoWnafT2,f=0;f<t.length;f++){var c=this._endoSplit(n[f]),g=t[f],A=g._getBeta();c.k1.negative&&(c.k1.ineg(),g=g.neg(!0)),c.k2.negative&&(c.k2.ineg(),A=A.neg(!0)),r[f*2]=g,r[f*2+1]=A,o[f*2]=c.k1,o[f*2+1]=c.k2}for(var w=this._wnafMulAdd(1,r,o,f*2,i),M=0;M<f*2;M++)r[M]=null,o[M]=null;return w};function Tn(e,t,n,i){js.BasePoint.call(this,e,"affine"),t===null&&n===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new an(t,16),this.y=new an(n,16),i&&(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)}tc(Tn,js.BasePoint);Br.prototype.point=function(t,n,i){return new Tn(this,t,n,i)};Br.prototype.pointFromJSON=function(t,n){return Tn.fromJSON(this,t,n)};Tn.prototype._getBeta=function(){if(!!this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var n=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var i=this.curve,r=function(o){return i.point(o.x.redMul(i.endo.beta),o.y)};t.beta=n,n.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(r)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(r)}}}return n}};Tn.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]};Tn.fromJSON=function(t,n,i){typeof n=="string"&&(n=JSON.parse(n));var r=t.point(n[0],n[1],i);if(!n[2])return r;function o(c){return t.point(c[0],c[1],i)}var f=n[2];return r.precomputed={beta:null,doubles:f.doubles&&{step:f.doubles.step,points:[r].concat(f.doubles.points.map(o))},naf:f.naf&&{wnd:f.naf.wnd,points:[r].concat(f.naf.points.map(o))}},r};Tn.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)+">"};Tn.prototype.isInfinity=function(){return this.inf};Tn.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(this.x.cmp(t.x)===0)return this.curve.point(null,null);var n=this.y.redSub(t.y);n.cmpn(0)!==0&&(n=n.redMul(this.x.redSub(t.x).redInvm()));var i=n.redSqr().redISub(this.x).redISub(t.x),r=n.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,r)};Tn.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(t.cmpn(0)===0)return this.curve.point(null,null);var n=this.curve.a,i=this.x.redSqr(),r=t.redInvm(),o=i.redAdd(i).redIAdd(i).redIAdd(n).redMul(r),f=o.redSqr().redISub(this.x.redAdd(this.x)),c=o.redMul(this.x.redSub(f)).redISub(this.y);return this.curve.point(f,c)};Tn.prototype.getX=function(){return this.x.fromRed()};Tn.prototype.getY=function(){return this.y.fromRed()};Tn.prototype.mul=function(t){return t=new an(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)};Tn.prototype.mulAdd=function(t,n,i){var r=[this,n],o=[t,i];return this.curve.endo?this.curve._endoWnafMulAdd(r,o):this.curve._wnafMulAdd(1,r,o,2)};Tn.prototype.jmulAdd=function(t,n,i){var r=[this,n],o=[t,i];return this.curve.endo?this.curve._endoWnafMulAdd(r,o,!0):this.curve._wnafMulAdd(1,r,o,2,!0)};Tn.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||this.x.cmp(t.x)===0&&this.y.cmp(t.y)===0)};Tn.prototype.neg=function(t){if(this.inf)return this;var n=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var i=this.precomputed,r=function(o){return o.neg()};n.precomputed={naf:i.naf&&{wnd:i.naf.wnd,points:i.naf.points.map(r)},doubles:i.doubles&&{step:i.doubles.step,points:i.doubles.points.map(r)}}}return n};Tn.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var t=this.curve.jpoint(this.x,this.y,this.curve.one);return t};function Wn(e,t,n,i){js.BasePoint.call(this,e,"jacobian"),t===null&&n===null&&i===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new an(0)):(this.x=new an(t,16),this.y=new an(n,16),this.z=new an(i,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}tc(Wn,js.BasePoint);Br.prototype.jpoint=function(t,n,i){return new Wn(this,t,n,i)};Wn.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),n=t.redSqr(),i=this.x.redMul(n),r=this.y.redMul(n).redMul(t);return this.curve.point(i,r)};Wn.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};Wn.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var n=t.z.redSqr(),i=this.z.redSqr(),r=this.x.redMul(n),o=t.x.redMul(i),f=this.y.redMul(n.redMul(t.z)),c=t.y.redMul(i.redMul(this.z)),g=r.redSub(o),A=f.redSub(c);if(g.cmpn(0)===0)return A.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var w=g.redSqr(),M=w.redMul(g),P=r.redMul(w),x=A.redSqr().redIAdd(M).redISub(P).redISub(P),U=A.redMul(P.redISub(x)).redISub(f.redMul(M)),_=this.z.redMul(t.z).redMul(g);return this.curve.jpoint(x,U,_)};Wn.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var n=this.z.redSqr(),i=this.x,r=t.x.redMul(n),o=this.y,f=t.y.redMul(n).redMul(this.z),c=i.redSub(r),g=o.redSub(f);if(c.cmpn(0)===0)return g.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var A=c.redSqr(),w=A.redMul(c),M=i.redMul(A),P=g.redSqr().redIAdd(w).redISub(M).redISub(M),x=g.redMul(M.redISub(P)).redISub(o.redMul(w)),U=this.z.redMul(c);return this.curve.jpoint(P,x,U)};Wn.prototype.dblp=function(t){if(t===0)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var n;if(this.curve.zeroA||this.curve.threeA){var i=this;for(n=0;n<t;n++)i=i.dbl();return i}var r=this.curve.a,o=this.curve.tinv,f=this.x,c=this.y,g=this.z,A=g.redSqr().redSqr(),w=c.redAdd(c);for(n=0;n<t;n++){var M=f.redSqr(),P=w.redSqr(),x=P.redSqr(),U=M.redAdd(M).redIAdd(M).redIAdd(r.redMul(A)),_=f.redMul(P),T=U.redSqr().redISub(_.redAdd(_)),D=_.redISub(T),K=U.redMul(D);K=K.redIAdd(K).redISub(x);var N=w.redMul(g);n+1<t&&(A=A.redMul(x)),f=T,g=N,w=K}return this.curve.jpoint(f,w.redMul(o),g)};Wn.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()};Wn.prototype._zeroDbl=function(){var t,n,i;if(this.zOne){var r=this.x.redSqr(),o=this.y.redSqr(),f=o.redSqr(),c=this.x.redAdd(o).redSqr().redISub(r).redISub(f);c=c.redIAdd(c);var g=r.redAdd(r).redIAdd(r),A=g.redSqr().redISub(c).redISub(c),w=f.redIAdd(f);w=w.redIAdd(w),w=w.redIAdd(w),t=A,n=g.redMul(c.redISub(A)).redISub(w),i=this.y.redAdd(this.y)}else{var M=this.x.redSqr(),P=this.y.redSqr(),x=P.redSqr(),U=this.x.redAdd(P).redSqr().redISub(M).redISub(x);U=U.redIAdd(U);var _=M.redAdd(M).redIAdd(M),T=_.redSqr(),D=x.redIAdd(x);D=D.redIAdd(D),D=D.redIAdd(D),t=T.redISub(U).redISub(U),n=_.redMul(U.redISub(t)).redISub(D),i=this.y.redMul(this.z),i=i.redIAdd(i)}return this.curve.jpoint(t,n,i)};Wn.prototype._threeDbl=function(){var t,n,i;if(this.zOne){var r=this.x.redSqr(),o=this.y.redSqr(),f=o.redSqr(),c=this.x.redAdd(o).redSqr().redISub(r).redISub(f);c=c.redIAdd(c);var g=r.redAdd(r).redIAdd(r).redIAdd(this.curve.a),A=g.redSqr().redISub(c).redISub(c);t=A;var w=f.redIAdd(f);w=w.redIAdd(w),w=w.redIAdd(w),n=g.redMul(c.redISub(A)).redISub(w),i=this.y.redAdd(this.y)}else{var M=this.z.redSqr(),P=this.y.redSqr(),x=this.x.redMul(P),U=this.x.redSub(M).redMul(this.x.redAdd(M));U=U.redAdd(U).redIAdd(U);var _=x.redIAdd(x);_=_.redIAdd(_);var T=_.redAdd(_);t=U.redSqr().redISub(T),i=this.y.redAdd(this.z).redSqr().redISub(P).redISub(M);var D=P.redSqr();D=D.redIAdd(D),D=D.redIAdd(D),D=D.redIAdd(D),n=U.redMul(_.redISub(t)).redISub(D)}return this.curve.jpoint(t,n,i)};Wn.prototype._dbl=function(){var t=this.curve.a,n=this.x,i=this.y,r=this.z,o=r.redSqr().redSqr(),f=n.redSqr(),c=i.redSqr(),g=f.redAdd(f).redIAdd(f).redIAdd(t.redMul(o)),A=n.redAdd(n);A=A.redIAdd(A);var w=A.redMul(c),M=g.redSqr().redISub(w.redAdd(w)),P=w.redISub(M),x=c.redSqr();x=x.redIAdd(x),x=x.redIAdd(x),x=x.redIAdd(x);var U=g.redMul(P).redISub(x),_=i.redAdd(i).redMul(r);return this.curve.jpoint(M,U,_)};Wn.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),n=this.y.redSqr(),i=this.z.redSqr(),r=n.redSqr(),o=t.redAdd(t).redIAdd(t),f=o.redSqr(),c=this.x.redAdd(n).redSqr().redISub(t).redISub(r);c=c.redIAdd(c),c=c.redAdd(c).redIAdd(c),c=c.redISub(f);var g=c.redSqr(),A=r.redIAdd(r);A=A.redIAdd(A),A=A.redIAdd(A),A=A.redIAdd(A);var w=o.redIAdd(c).redSqr().redISub(f).redISub(g).redISub(A),M=n.redMul(w);M=M.redIAdd(M),M=M.redIAdd(M);var P=this.x.redMul(g).redISub(M);P=P.redIAdd(P),P=P.redIAdd(P);var x=this.y.redMul(w.redMul(A.redISub(w)).redISub(c.redMul(g)));x=x.redIAdd(x),x=x.redIAdd(x),x=x.redIAdd(x);var U=this.z.redAdd(c).redSqr().redISub(i).redISub(g);return this.curve.jpoint(P,x,U)};Wn.prototype.mul=function(t,n){return t=new an(t,n),this.curve._wnafMul(this,t)};Wn.prototype.eq=function(t){if(t.type==="affine")return this.eq(t.toJ());if(this===t)return!0;var n=this.z.redSqr(),i=t.z.redSqr();if(this.x.redMul(i).redISub(t.x.redMul(n)).cmpn(0)!==0)return!1;var r=n.redMul(this.z),o=i.redMul(t.z);return this.y.redMul(o).redISub(t.y.redMul(r)).cmpn(0)===0};Wn.prototype.eqXToP=function(t){var n=this.z.redSqr(),i=t.toRed(this.curve.red).redMul(n);if(this.x.cmp(i)===0)return!0;for(var r=t.clone(),o=this.curve.redN.redMul(n);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(i.redIAdd(o),this.x.cmp(i)===0)return!0}};Wn.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)+">"};Wn.prototype.isInfinity=function(){return this.z.cmpn(0)===0}});var fg=L((j7,ug)=>{"use strict";B();R();var ea=Un(),dg=kf(),su=sd(),rw=Mr();function ta(e){su.call(this,"mont",e),this.a=new ea(e.a,16).toRed(this.red),this.b=new ea(e.b,16).toRed(this.red),this.i4=new ea(4).toRed(this.red).redInvm(),this.two=new ea(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}dg(ta,su);ug.exports=ta;ta.prototype.validate=function(t){var n=t.normalize().x,i=n.redSqr(),r=i.redMul(n).redAdd(i.redMul(this.a)).redAdd(n),o=r.redSqrt();return o.redSqr().cmp(r)===0};function On(e,t,n){su.BasePoint.call(this,e,"projective"),t===null&&n===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new ea(t,16),this.z=new ea(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}dg(On,su.BasePoint);ta.prototype.decodePoint=function(t,n){return this.point(rw.toArray(t,n),1)};ta.prototype.point=function(t,n){return new On(this,t,n)};ta.prototype.pointFromJSON=function(t){return On.fromJSON(this,t)};On.prototype.precompute=function(){};On.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())};On.fromJSON=function(t,n){return new On(t,n[0],n[1]||t.one)};On.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)+">"};On.prototype.isInfinity=function(){return this.z.cmpn(0)===0};On.prototype.dbl=function(){var t=this.x.redAdd(this.z),n=t.redSqr(),i=this.x.redSub(this.z),r=i.redSqr(),o=n.redSub(r),f=n.redMul(r),c=o.redMul(r.redAdd(this.curve.a24.redMul(o)));return this.curve.point(f,c)};On.prototype.add=function(){throw new Error("Not supported on Montgomery curve")};On.prototype.diffAdd=function(t,n){var i=this.x.redAdd(this.z),r=this.x.redSub(this.z),o=t.x.redAdd(t.z),f=t.x.redSub(t.z),c=f.redMul(i),g=o.redMul(r),A=n.z.redMul(c.redAdd(g).redSqr()),w=n.x.redMul(c.redISub(g).redSqr());return this.curve.point(A,w)};On.prototype.mul=function(t){for(var n=t.clone(),i=this,r=this.curve.point(null,null),o=this,f=[];n.cmpn(0)!==0;n.iushrn(1))f.push(n.andln(1));for(var c=f.length-1;c>=0;c--)f[c]===0?(i=i.diffAdd(r,o),r=r.dbl()):(r=i.diffAdd(r,o),i=i.dbl());return r};On.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")};On.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")};On.prototype.eq=function(t){return this.getX().cmp(t.getX())===0};On.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this};On.prototype.getX=function(){return this.normalize(),this.x.fromRed()}});var mg=L((nx,lg)=>{"use strict";B();R();var iw=Mr(),Ei=Un(),cg=kf(),au=sd(),ow=iw.assert;function yi(e){this.twisted=(e.a|0)!==1,this.mOneA=this.twisted&&(e.a|0)===-1,this.extended=this.mOneA,au.call(this,"edwards",e),this.a=new Ei(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new Ei(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new Ei(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),ow(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(e.c|0)===1}cg(yi,au);lg.exports=yi;yi.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)};yi.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)};yi.prototype.jpoint=function(t,n,i,r){return this.point(t,n,i,r)};yi.prototype.pointFromX=function(t,n){t=new Ei(t,16),t.red||(t=t.toRed(this.red));var i=t.redSqr(),r=this.c2.redSub(this.a.redMul(i)),o=this.one.redSub(this.c2.redMul(this.d).redMul(i)),f=r.redMul(o.redInvm()),c=f.redSqrt();if(c.redSqr().redSub(f).cmp(this.zero)!==0)throw new Error("invalid point");var g=c.fromRed().isOdd();return(n&&!g||!n&&g)&&(c=c.redNeg()),this.point(t,c)};yi.prototype.pointFromY=function(t,n){t=new Ei(t,16),t.red||(t=t.toRed(this.red));var i=t.redSqr(),r=i.redSub(this.c2),o=i.redMul(this.d).redMul(this.c2).redSub(this.a),f=r.redMul(o.redInvm());if(f.cmp(this.zero)===0){if(n)throw new Error("invalid point");return this.point(this.zero,t)}var c=f.redSqrt();if(c.redSqr().redSub(f).cmp(this.zero)!==0)throw new Error("invalid point");return c.fromRed().isOdd()!==n&&(c=c.redNeg()),this.point(c,t)};yi.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var n=t.x.redSqr(),i=t.y.redSqr(),r=n.redMul(this.a).redAdd(i),o=this.c2.redMul(this.one.redAdd(this.d.redMul(n).redMul(i)));return r.cmp(o)===0};function Ht(e,t,n,i,r){au.BasePoint.call(this,e,"projective"),t===null&&n===null&&i===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 Ei(t,16),this.y=new Ei(n,16),this.z=i?new Ei(i,16):this.curve.one,this.t=r&&new Ei(r,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()))))}cg(Ht,au.BasePoint);yi.prototype.pointFromJSON=function(t){return Ht.fromJSON(this,t)};yi.prototype.point=function(t,n,i,r){return new Ht(this,t,n,i,r)};Ht.fromJSON=function(t,n){return new Ht(t,n[0],n[1],n[2])};Ht.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)+">"};Ht.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)};Ht.prototype._extDbl=function(){var t=this.x.redSqr(),n=this.y.redSqr(),i=this.z.redSqr();i=i.redIAdd(i);var r=this.curve._mulA(t),o=this.x.redAdd(this.y).redSqr().redISub(t).redISub(n),f=r.redAdd(n),c=f.redSub(i),g=r.redSub(n),A=o.redMul(c),w=f.redMul(g),M=o.redMul(g),P=c.redMul(f);return this.curve.point(A,w,P,M)};Ht.prototype._projDbl=function(){var t=this.x.redAdd(this.y).redSqr(),n=this.x.redSqr(),i=this.y.redSqr(),r,o,f,c,g,A;if(this.curve.twisted){c=this.curve._mulA(n);var w=c.redAdd(i);this.zOne?(r=t.redSub(n).redSub(i).redMul(w.redSub(this.curve.two)),o=w.redMul(c.redSub(i)),f=w.redSqr().redSub(w).redSub(w)):(g=this.z.redSqr(),A=w.redSub(g).redISub(g),r=t.redSub(n).redISub(i).redMul(A),o=w.redMul(c.redSub(i)),f=w.redMul(A))}else c=n.redAdd(i),g=this.curve._mulC(this.z).redSqr(),A=c.redSub(g).redSub(g),r=this.curve._mulC(t.redISub(c)).redMul(A),o=this.curve._mulC(c).redMul(n.redISub(i)),f=c.redMul(A);return this.curve.point(r,o,f)};Ht.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()};Ht.prototype._extAdd=function(t){var n=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),i=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),r=this.t.redMul(this.curve.dd).redMul(t.t),o=this.z.redMul(t.z.redAdd(t.z)),f=i.redSub(n),c=o.redSub(r),g=o.redAdd(r),A=i.redAdd(n),w=f.redMul(c),M=g.redMul(A),P=f.redMul(A),x=c.redMul(g);return this.curve.point(w,M,x,P)};Ht.prototype._projAdd=function(t){var n=this.z.redMul(t.z),i=n.redSqr(),r=this.x.redMul(t.x),o=this.y.redMul(t.y),f=this.curve.d.redMul(r).redMul(o),c=i.redSub(f),g=i.redAdd(f),A=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(r).redISub(o),w=n.redMul(c).redMul(A),M,P;return this.curve.twisted?(M=n.redMul(g).redMul(o.redSub(this.curve._mulA(r))),P=c.redMul(g)):(M=n.redMul(g).redMul(o.redSub(r)),P=this.curve._mulC(c).redMul(g)),this.curve.point(w,M,P)};Ht.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)};Ht.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)};Ht.prototype.mulAdd=function(t,n,i){return this.curve._wnafMulAdd(1,[this,n],[t,i],2,!1)};Ht.prototype.jmulAdd=function(t,n,i){return this.curve._wnafMulAdd(1,[this,n],[t,i],2,!0)};Ht.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this};Ht.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())};Ht.prototype.getX=function(){return this.normalize(),this.x.fromRed()};Ht.prototype.getY=function(){return this.normalize(),this.y.fromRed()};Ht.prototype.eq=function(t){return this===t||this.getX().cmp(t.getX())===0&&this.getY().cmp(t.getY())===0};Ht.prototype.eqXToP=function(t){var n=t.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(n)===0)return!0;for(var i=t.clone(),r=this.curve.redN.redMul(this.z);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(n.redIAdd(r),this.x.cmp(n)===0)return!0}};Ht.prototype.toP=Ht.prototype.normalize;Ht.prototype.mixedAdd=Ht.prototype.add});var nc=L(pg=>{"use strict";B();R();var du=pg;du.base=sd();du.short=ag();du.mont=fg();du.edwards=mg()});var gg=L((dx,hg)=>{"use strict";B();R();hg.exports={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"]]}}});var uu=L(vg=>{"use strict";B();R();var ic=vg,uo=Wp(),rc=nc(),sw=Mr(),yg=sw.assert;function bg(e){e.type==="short"?this.curve=new rc.short(e):e.type==="edwards"?this.curve=new rc.edwards(e):this.curve=new rc.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,yg(this.g.validate(),"Invalid curve"),yg(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}ic.PresetCurve=bg;function fo(e,t){Object.defineProperty(ic,e,{configurable:!0,enumerable:!0,get:function(){var n=new bg(t);return Object.defineProperty(ic,e,{configurable:!0,enumerable:!0,value:n}),n}})}fo("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:uo.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]});fo("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:uo.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]});fo("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:uo.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]});fo("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:uo.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"]});fo("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:uo.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"]});fo("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:uo.sha256,gRed:!1,g:["9"]});fo("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:uo.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var oc;try{oc=gg()}catch{oc=void 0}fo("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:uo.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",oc]})});var Mg=L((px,Ag)=>{"use strict";B();R();var aw=Un(),dw=Mr(),sc=dw.assert;function Vn(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}Ag.exports=Vn;Vn.fromPublic=function(t,n,i){return n instanceof Vn?n:new Vn(t,{pub:n,pubEnc:i})};Vn.fromPrivate=function(t,n,i){return n instanceof Vn?n:new Vn(t,{priv:n,privEnc:i})};Vn.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.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"}};Vn.prototype.getPublic=function(t,n){return typeof t=="string"&&(n=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),n?this.pub.encode(n,t):this.pub};Vn.prototype.getPrivate=function(t){return t==="hex"?this.priv.toString(16,2):this.priv};Vn.prototype._importPrivate=function(t,n){this.priv=new aw(t,n||16),this.priv=this.priv.umod(this.ec.curve.n)};Vn.prototype._importPublic=function(t,n){if(t.x||t.y){this.ec.curve.type==="mont"?sc(t.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&sc(t.x&&t.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(t.x,t.y);return}this.pub=this.ec.curve.decodePoint(t,n)};Vn.prototype.derive=function(t){return t.validate()||sc(t.validate(),"public point not validated"),t.mul(this.priv).getX()};Vn.prototype.sign=function(t,n,i){return this.ec.sign(t,this,n,i)};Vn.prototype.verify=function(t,n){return this.ec.verify(t,n,this)};Vn.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}});var Sg=L((yx,kg)=>{"use strict";B();R();var fu=Un(),uc=Mr(),uw=uc.assert;function ad(e,t,n){if(t instanceof ad)return t;this._importDER(t,n)||(uw(t.r&&t.s,"Signature without r or s"),this.r=new fu(t.r,16),this.s=new fu(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam,this.curve=e,this.byteLength=this.curve.n.byteLength())}kg.exports=ad;function fw(){this.place=0}function ac(e,t){var n=e[t.place++];if(!(n&128))return n;var i=n&15;if(i===0||i>4)return!1;for(var r=0,o=0,f=t.place;o<i;o++,f++)r<<=8,r|=e[f],r>>>=0;return r<=127?!1:(t.place=f,r)}function wg(e){for(var t=0,n=e.length-1;!e[t]&&!(e[t+1]&128)&&t<n;)t++;return t===0?e:e.slice(t)}ad.prototype._importDER=function(t,n){t=uc.toArray(t,n);var i=new fw;if(t[i.place++]!==48)return!1;var r=ac(t,i);if(r===!1||r+i.place!==t.length||t[i.place++]!==2)return!1;var o=ac(t,i);if(o===!1)return!1;var f=t.slice(i.place,o+i.place);if(i.place+=o,t[i.place++]!==2)return!1;var c=ac(t,i);if(c===!1||t.length!==c+i.place)return!1;var g=t.slice(i.place,c+i.place);if(f[0]===0)if(f[1]&128)f=f.slice(1);else return!1;if(g[0]===0)if(g[1]&128)g=g.slice(1);else return!1;return this.r=new fu(f),this.s=new fu(g),this.recoveryParam=null,!0};function dc(e,t){if(t<128){e.push(t);return}var n=1+(Math.log(t)/Math.LN2>>>3);for(e.push(n|128);--n;)e.push(t>>>(n<<3)&255);e.push(t)}ad.prototype.toDER=function(t){var n=this.r.toArray(),i=this.s.toArray();for(n[0]&128&&(n=[0].concat(n)),i[0]&128&&(i=[0].concat(i)),n=wg(n),i=wg(i);!i[0]&&!(i[1]&128);)i=i.slice(1);var r=[2];dc(r,n.length),r=r.concat(n),r.push(2),dc(r,i.length);var o=r.concat(i),f=[48];return dc(f,o.length),f=f.concat(o),uc.encode(f,t)};ad.prototype.toBytes=function(){let t=this.r.toArray("be",this.byteLength),n=this.s.toArray("be",this.byteLength);return t.concat(n)}});var Pg=L((Ax,xg)=>{"use strict";B();R();var ps=Un(),_g=p3(),cw=Mr(),fc=uu(),lw=l3(),Ig=cw.assert,cc=Mg(),cu=Sg();function Rr(e){if(!(this instanceof Rr))return new Rr(e);typeof e=="string"&&(Ig(Object.prototype.hasOwnProperty.call(fc,e),"Unknown curve "+e),e=fc[e]),e instanceof fc.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}xg.exports=Rr;Rr.prototype.keyPair=function(t){return new cc(this,t)};Rr.prototype.keyFromPrivate=function(t,n){return cc.fromPrivate(this,t,n)};Rr.prototype.keyFromPublic=function(t,n){return cc.fromPublic(this,t,n)};Rr.prototype.genKeyPair=function(t){t||(t={});for(var n=new _g({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||lw(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),i=this.n.byteLength(),r=this.n.sub(new ps(2));;){var o=new ps(n.generate(i));if(!(o.cmp(r)>0))return o.iaddn(1),this.keyFromPrivate(o)}};Rr.prototype._truncateToN=function(t,n){var i=t.byteLength()*8-this.n.bitLength();return i>0&&(t=t.ushrn(i)),!n&&t.cmp(this.n)>=0?t.sub(this.n):t};Rr.prototype.sign=function(t,n,i,r){typeof i=="object"&&(r=i,i=null),r||(r={}),n=this.keyFromPrivate(n,i),t=this._truncateToN(new ps(t,16));for(var o=this.n.byteLength(),f=n.getPrivate().toArray("be",o),c=t.toArray("be",o),g=new _g({hash:this.hash,entropy:f,nonce:c,pers:r.pers,persEnc:r.persEnc||"utf8"}),A=this.n.sub(new ps(1)),w=0;;w++){var M=r.k?r.k(w):new ps(g.generate(this.n.byteLength()));if(M=this._truncateToN(M,!0),!(M.cmpn(1)<=0||M.cmp(A)>=0)){var P=this.g.mul(M);if(!P.isInfinity()){var x=P.getX(),U=x.umod(this.n);if(U.cmpn(0)!==0){var _=M.invm(this.n).mul(U.mul(n.getPrivate()).iadd(t));if(_=_.umod(this.n),_.cmpn(0)!==0){var T=(P.getY().isOdd()?1:0)|(x.cmp(U)!==0?2:0);return r.canonical&&_.cmp(this.nh)>0&&(_=this.n.sub(_),T^=1),new cu(this.curve,{r:U,s:_,recoveryParam:T})}}}}}};Rr.prototype.verify=function(t,n,i,r){t=this._truncateToN(new ps(t,16)),i=this.keyFromPublic(i,r),n=new cu(this.curve,n,"hex");var o=n.r,f=n.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0||f.cmpn(1)<0||f.cmp(this.n)>=0)return!1;var c=f.invm(this.n),g=c.mul(t).umod(this.n),A=c.mul(o).umod(this.n),w;return this.curve._maxwellTrick?(w=this.g.jmulAdd(g,i.getPublic(),A),w.isInfinity()?!1:w.eqXToP(o)):(w=this.g.mulAdd(g,i.getPublic(),A),w.isInfinity()?!1:w.getX().umod(this.n).cmp(o)===0)};Rr.prototype.recoverPubKey=function(e,t,n,i){Ig((3&n)===n,"The recovery param is more than two bits"),t=new cu(this.curve,t,i);var r=this.n,o=new ps(e),f=t.r,c=t.s,g=n&1,A=n>>1;if(f.cmp(this.curve.p.umod(this.curve.n))>=0&&A)throw new Error("Unable to find sencond key candinate");A?f=this.curve.pointFromX(f.add(this.curve.n),g):f=this.curve.pointFromX(f,g);var w=t.r.invm(r),M=r.sub(o).mul(w).umod(r),P=c.mul(w).umod(r);return this.g.mulAdd(M,f,P)};Rr.prototype.getKeyRecoveryParam=function(e,t,n,i){if(t=new cu(this.curve,t,i),t.recoveryParam!==null)return t.recoveryParam;for(var r=0;r<4;r++){var o;try{o=this.recoverPubKey(e,t,r)}catch{continue}if(o.eq(n))return r}throw new Error("Unable to find valid recovery factor")}});var Cg=L((kx,Rg)=>{"use strict";B();R();var dd=Mr(),Bg=dd.assert,Ug=dd.parseBytes,na=dd.cachedProperty;function Dn(e,t){this.eddsa=e,this._secret=Ug(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=Ug(t.pub)}Dn.fromPublic=function(t,n){return n instanceof Dn?n:new Dn(t,{pub:n})};Dn.fromSecret=function(t,n){return n instanceof Dn?n:new Dn(t,{secret:n})};Dn.prototype.secret=function(){return this._secret};na(Dn,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())});na(Dn,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())});na(Dn,"privBytes",function(){var t=this.eddsa,n=this.hash(),i=t.encodingLength-1,r=n.slice(0,t.encodingLength);return r[0]&=248,r[i]&=127,r[i]|=64,r});na(Dn,"priv",function(){return this.eddsa.decodeInt(this.privBytes())});na(Dn,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()});na(Dn,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)});Dn.prototype.sign=function(t){return Bg(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)};Dn.prototype.verify=function(t,n){return this.eddsa.verify(t,n,this)};Dn.prototype.getSecret=function(t){return Bg(this._secret,"KeyPair is public only"),dd.encode(this.secret(),t)};Dn.prototype.getPublic=function(t){return dd.encode(this.pubBytes(),t)};Rg.exports=Dn});var Tg=L((Ix,Eg)=>{"use strict";B();R();var mw=Un(),lu=Mr(),pw=lu.assert,mu=lu.cachedProperty,hw=lu.parseBytes;function hs(e,t){this.eddsa=e,typeof t!="object"&&(t=hw(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),pw(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof mw&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}mu(hs,"S",function(){return this.eddsa.decodeInt(this.Sencoded())});mu(hs,"R",function(){return this.eddsa.decodePoint(this.Rencoded())});mu(hs,"Rencoded",function(){return this.eddsa.encodePoint(this.R())});mu(hs,"Sencoded",function(){return this.eddsa.encodeInt(this.S())});hs.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())};hs.prototype.toHex=function(){return lu.encode(this.toBytes(),"hex").toUpperCase()};Eg.exports=hs});var qg=L((Ux,Lg)=>{"use strict";B();R();var gw=Wp(),yw=uu(),ra=Mr(),bw=ra.assert,Dg=ra.parseBytes,Ng=Cg(),Og=Tg();function fr(e){if(bw(e==="ed25519","only tested with ed25519 so far"),!(this instanceof fr))return new fr(e);e=yw[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=gw.sha512}Lg.exports=fr;fr.prototype.sign=function(t,n){t=Dg(t);var i=this.keyFromSecret(n),r=this.hashInt(i.messagePrefix(),t),o=this.g.mul(r),f=this.encodePoint(o),c=this.hashInt(f,i.pubBytes(),t).mul(i.priv()),g=r.add(c).umod(this.curve.n);return this.makeSignature({R:o,S:g,Rencoded:f})};fr.prototype.verify=function(t,n,i){t=Dg(t),n=this.makeSignature(n);var r=this.keyFromPublic(i),o=this.hashInt(n.Rencoded(),r.pubBytes(),t),f=this.g.mul(n.S()),c=n.R().add(r.pub().mul(o));return c.eq(f)};fr.prototype.hashInt=function(){for(var t=this.hash(),n=0;n<arguments.length;n++)t.update(arguments[n]);return ra.intFromLE(t.digest()).umod(this.curve.n)};fr.prototype.keyFromPublic=function(t){return Ng.fromPublic(this,t)};fr.prototype.keyFromSecret=function(t){return Ng.fromSecret(this,t)};fr.prototype.makeSignature=function(t){return t instanceof Og?t:new Og(this,t)};fr.prototype.encodePoint=function(t){var n=t.getY().toArray("le",this.encodingLength);return n[this.encodingLength-1]|=t.getX().isOdd()?128:0,n};fr.prototype.decodePoint=function(t){t=ra.parseBytes(t);var n=t.length-1,i=t.slice(0,n).concat(t[n]&-129),r=(t[n]&128)!==0,o=ra.intFromLE(i);return this.curve.pointFromY(o,r)};fr.prototype.encodeInt=function(t){return t.toArray("le",this.encodingLength)};fr.prototype.decodeInt=function(t){return ra.intFromLE(t)};fr.prototype.isPoint=function(t){return t instanceof this.pointClass}});var ia=L(Cr=>{"use strict";B();R();Object.defineProperty(Cr,"__esModule",{value:!0});Cr.utils=Cr.curves=Cr.curve=Cr.eddsa=Cr.ec=void 0;var vw=nc();Cr.curve=vw;var Aw=uu();Cr.curves=Aw;var Mw=Pg();Cr.ec=Mw;var ww=qg();Cr.eddsa=ww;var kw=Mr();Cr.utils=kw});var Kg=L((Fg,Hg)=>{"use strict";B();R();Object.defineProperty(Fg,"__esModule",{value:!0});var Sw=ia(),bi=new Sw.ec("secp256k1"),ht=bi.curve,Kt=Un();function _w(e,t){let n=new Kt(t);if(n.cmp(ht.p)>=0)return null;n=n.toRed(ht.red);let i=n.redSqr().redIMul(n).redIAdd(ht.b).redSqrt();e===3!==i.isOdd()&&(i=i.redNeg());let r=n.redSqr().redIMul(n);return i.redSqr().redISub(r.redIAdd(ht.b)).isZero()?bi.keyPair({pub:{x:n,y:i}}):null}function Iw(e,t,n){let i=new Kt(t),r=new Kt(n);if(i.cmp(ht.p)>=0||r.cmp(ht.p)>=0||(i=i.toRed(ht.red),r=r.toRed(ht.red),(e===6||e===7)&&r.isOdd()!==(e===7)))return null;let o=i.redSqr().redIMul(i);return r.redSqr().redISub(o.redIAdd(ht.b)).isZero()?bi.keyPair({pub:{x:i,y:r}}):null}function co(e){let t=e[0];switch(t){case 2:case 3:return e.length!==33?null:_w(t,e.subarray(1,33));case 4:case 6:case 7:return e.length!==65?null:Iw(t,e.subarray(1,33),e.subarray(33,65));default:return null}}Hg.exports={contextRandomize(){return 0},privateKeyVerify(e){let t=new Kt(e);return t.cmp(ht.n)<0&&!t.isZero()},privateKeyNegate(e){let t=new Kt(e);return C.Buffer.from(ht.n.sub(t).umod(ht.n).toArray("be",32))},privateKeyTweakAdd(e,t){let n=new Kt(t);return n.cmp(ht.n)>=0||(n.iadd(new Kt(e)),n.cmp(ht.n)>=0&&n.isub(ht.n),n.isZero())?null:C.Buffer.from(n.toArray("be",32))},privateKeyTweakMul(e,t){let n=new Kt(t);return n.cmp(ht.n)>=0||n.isZero()?1:(n.imul(new Kt(e)),n.cmp(ht.n)>=0&&(n=n.umod(ht.n)),C.Buffer.from(n.toArray("be",32)))},publicKeyVerify(e){let t=co(e);return t==null?null:t.validate().result},publicKeyCreate(e,t){let n=new Kt(e);if(n.cmp(ht.n)>=0||n.isZero())return null;let i=bi.keyFromPrivate(e,null).getPublic();return C.Buffer.from(i.encode(null,t))},publicKeyConvert(e,t){let i=co(e).getPublic();return C.Buffer.from(i.encode(null,t))},publicKeyNegate(e,t){let n=co(e);if(n===null)return 1;let i=n.getPublic();return i.y=i.y.redNeg(),C.Buffer.from(i.encode(null,t))},publicKeyCombine(e,t){let n=new Array(e.length);for(let r=0;r<e.length;++r)if(n[r]=co(e[r]),n[r]===null)return null;let i=n[0].getPublic();for(let r=1;r<n.length;++r)i=i.add(n[r].pub);return i.isInfinity()?null:C.Buffer.from(i.encode(null,t))},publicKeyTweakAdd(e,t,n){let i=co(e);if(i===null||new Kt(t).cmp(ht.n)>=0)return null;let o=i.getPublic().add(ht.g.mul(t));return o.isInfinity()?null:C.Buffer.from(o.encode(null,n))},publicKeyTweakMul(e,t,n){let i=co(e);if(i===null)return null;let r=new Kt(t);if(r.cmp(ht.n)>=0||r.isZero())return null;let o=i.getPublic().mul(t);return C.Buffer.from(o.encode(null,n))},signatureNormalize(e){let t=new Kt(e.subarray(0,32)),n=new Kt(e.subarray(32,64));return t.cmp(ht.n)>=0||n.cmp(ht.n)>=0?null:(n.cmp(bi.nh)===1&&e.set(ht.n.sub(n).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport(e,t){let n=t.subarray(0,32),i=t.subarray(32,64);if(new Kt(n).cmp(ht.n)>=0||new Kt(i).cmp(ht.n)>=0)return 1;let{output:r}=e,o=r.subarray(4,4+33);o[0]=0,o.set(n,1);let f=33,c=0;for(;f>1&&o[c]===0&&!(o[c+1]&128);--f,++c);if(o=o.subarray(c),o[0]&128||f>1&&o[0]===0&&!(o[1]&128))return 1;let g=r.subarray(6+33,6+33+33);g[0]=0,g.set(i,1);let A=33,w=0;for(;A>1&&g[w]===0&&!(g[w+1]&128);--A,++w);return g=g.subarray(w),g[0]&128||A>1&&g[0]===0&&!(g[1]&128)?1:(e.outputlen=6+f+A,r[0]=48,r[1]=e.outputlen-2,r[2]=2,r[3]=o.length,r.set(o,4),r[4+f]=2,r[5+f]=g.length,r.set(g,6+f),0)},signatureImport(e,t){if(t.length<8||t.length>72||t[0]!==48||t[1]!==t.length-2||t[2]!==2)return 1;let n=t[3];if(n===0||5+n>=t.length||t[4+n]!==2)return 1;let i=t[5+n];if(i===0||6+n+i!==t.length||t[4]&128||n>1&&t[4]===0&&!(t[5]&128)||t[n+6]&128||i>1&&t[n+6]===0&&!(t[n+7]&128))return 1;let r=t.subarray(4,4+n);if(r.length===33&&r[0]===0&&(r=r.subarray(1)),r.length>32)return 1;let o=t.subarray(6+n);if(o.length===33&&o[0]===0&&(o=o.slice(1)),o.length>32)throw new Error("S length is too long");let f=new Kt(r);f.cmp(ht.n)>=0&&(f=new Kt(0));let c=new Kt(t.subarray(6+n));return c.cmp(ht.n)>=0&&(c=new Kt(0)),e.set(f.toArrayLike(Uint8Array,"be",32),0),e.set(c.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign(e,t){let n=new Kt(t);return n.cmp(ht.n)>=0||n.isZero()?null:bi.sign(e,t,{canonical:!0}).toBytes()},ecdsaVerify(e,t,n){let i={r:e.subarray(0,32),s:e.subarray(32,64)},r=new Kt(i.r),o=new Kt(i.s);if(r.cmp(ht.n)>=0||o.cmp(ht.n)>=0)return 1;if(o.cmp(bi.nh)===1||r.isZero()||o.isZero())return 3;let f=co(n);if(f===null)return 2;let c=f.getPublic();return bi.verify(t,i,c)},ecdsaRecover(e,t,n,i){let r={r:e.slice(0,32),s:e.slice(32,64)},o=new Kt(r.r),f=new Kt(r.s);if(o.cmp(ht.n)>=0||f.cmp(ht.n)>=0)return 1;if(o.isZero()||f.isZero())return 2;let c;try{c=bi.recoverPubKey(n,r,t,null)}catch{return 2}return C.Buffer.from(c.encode(null,i))},ecdh(e,t,n,i,r,o,f){let c=co(t);if(c===null)return 1;let g=new Kt(n);if(g.cmp(ht.n)>=0||g.isZero())return 2;let A=c.getPublic().mul(g);if(r===void 0){let w=A.encode(null,!0),M=bi.hash().update(w).digest();for(let P=0;P<32;++P)e[P]=M[P]}else{o||(o=new Uint8Array(32));let w=A.getX().toArray("be",32);for(let U=0;U<32;++U)o[U]=w[U];f||(f=new Uint8Array(32));let M=A.getY().toArray("be",32);for(let U=0;U<32;++U)f[U]=M[U];let P=r(o,f,i);if(!(P instanceof Uint8Array&&P.length===e.length))return 2;e.set(P)}return 0}}});var Zg=L(Nn=>{"use strict";B();R();var xw=Nn&&Nn.__createBinding||(Object.create?function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]}),Pw=Nn&&Nn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Uw=Nn&&Nn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&xw(t,e,n);return Pw(t,e),t};Object.defineProperty(Nn,"__esModule",{value:!0});Nn.fromSeed=Nn.fromPublicKey=Nn.fromPrivateKey=Nn.fromBase58=Nn.tinySecp256k1Interface=void 0;var lc=Uw(ls()),Bw=as(),Rw=td(),Wg=(0,Bw.base58check)(Rw.sha256),Jg=Kg(),Jn=Jp(),Cw=g3();function Ew(e){return{isPoint:t=>e.publicKeyVerify(t),isPrivate:t=>e.privateKeyVerify(t),pointAddScalar:(t,n,i)=>e.publicKeyTweakAdd(t,n,i),pointFromScalar:(t,n)=>e.publicKeyCreate(t,n),privateAdd:(t,n)=>e.privateKeyTweakAdd(new Uint8Array(t),n),sign:(t,n)=>e.ecdsaSign(t,n),verify:(t,n,i)=>e.ecdsaVerify(i,t,n)}}function Tw(e){return{isPoint:t=>e.publicKeyVerify(t),pointCompress:(t,n)=>Uint8Array.from(e.publicKeyConvert(t,n??!0)),isPrivate:t=>e.privateKeyVerify(t),pointFromScalar:(t,n)=>{let i=e.publicKeyCreate(t,n??!0);return i==null?null:Uint8Array.from(i)},sign:(t,n,i)=>Uint8Array.from(e.ecdsaSign(t,n)),verify:(t,n,i,r)=>e.ecdsaVerify(i,t,n)}}var lo=Ew(Jg);Nn.tinySecp256k1Interface=Tw(Jg);var mc=Jn.BufferN(32),Ow=Jn.compile({wif:Jn.UInt8,bip32:{public:Jn.UInt32,private:Jn.UInt32}}),gu={messagePrefix:`Bitcoin Signed Message:
|
||
`,bech32:"bc",bip32:{public:76067358,private:76066276},pubKeyHash:0,scriptHash:5,wif:128},$g=2147483648,Dw=Math.pow(2,31)-1;function Nw(e){return Jn.String(e)&&e.match(/^(m\/)?(\d+'?\/)*\d+'?$/)!==null}function Lw(e){return Jn.UInt32(e)&&e<=Dw}var pu=class{constructor(t,n,i,r,o=0,f=0,c=0){this.__D=t,this.__Q=n,this.chainCode=i,this.network=r,this.__DEPTH=o,this.__INDEX=f,this.__PARENT_FINGERPRINT=c,Jn(Ow,r),this.lowR=!1}get depth(){return this.__DEPTH}get index(){return this.__INDEX}get parentFingerprint(){return this.__PARENT_FINGERPRINT}get publicKey(){return this.__Q===void 0&&(this.__Q=C.Buffer.from(lo.pointFromScalar(this.__D,!0))),this.__Q}get privateKey(){return this.__D}get identifier(){return C.Buffer.from(lc.hash160(this.publicKey))}get fingerprint(){return this.identifier.slice(0,4)}get compressed(){return!0}isNeutered(){return this.__D===void 0}neutered(){return hu(this.publicKey,this.chainCode,this.network,this.depth,this.index,this.parentFingerprint)}toBase58(){let t=this.network,n=this.isNeutered()?t.bip32.public:t.bip32.private,i=C.Buffer.allocUnsafe(78);return i.writeUInt32BE(n,0),i.writeUInt8(this.depth,4),i.writeUInt32BE(this.parentFingerprint,5),i.writeUInt32BE(this.index,9),this.chainCode.copy(i,13),this.isNeutered()?this.publicKey.copy(i,45):(i.writeUInt8(0,45),this.privateKey.copy(i,46)),Wg.encode(i)}toWIF(){if(!this.privateKey)throw new TypeError("Missing private key");return Cw.encode(this.network.wif,this.privateKey,!0)}derive(t){Jn(Jn.UInt32,t);let n=t>=$g,i=C.Buffer.allocUnsafe(37);if(n){if(this.isNeutered())throw new TypeError("Missing private key for hardened child key");i[0]=0,this.privateKey.copy(i,1),i.writeUInt32BE(t,33)}else this.publicKey.copy(i,0),i.writeUInt32BE(t,33);let r=lc.hmacSHA512(this.chainCode,i),o=r.slice(0,32),f=r.slice(32);if(!lo.isPrivate(o))return this.derive(t+1);let c;if(this.isNeutered()){let g=lo.pointAddScalar(this.publicKey,o,!0);if(g===null)return this.derive(t+1);c=hu(g,f,this.network,this.depth+1,t,this.fingerprint.readUInt32BE(0))}else{let g=lo.privateAdd(this.privateKey,o);if(g==null)return this.derive(t+1);c=pc(g,f,this.network,this.depth+1,t,this.fingerprint.readUInt32BE(0))}return c}deriveHardened(t){return Jn(Lw,t),this.derive(t+$g)}derivePath(t){Jn(Nw,t);let n=t.split("/");if(n[0]==="m"){if(this.parentFingerprint)throw new TypeError("Expected master, got child");n=n.slice(1)}return n.reduce((i,r)=>{let o;return r.slice(-1)==="'"?(o=parseInt(r.slice(0,-1),10),i.deriveHardened(o)):(o=parseInt(r,10),i.derive(o))},this)}sign(t){if(!this.privateKey)throw new Error("Missing private key");return lo.sign(t,this.privateKey)}verify(t,n){return lo.verify(t,this.publicKey,n)}};function qw(e,t){let n=C.Buffer.from(Wg.decode(e));if(n.length!==78)throw new TypeError("Invalid buffer length");t=t||gu;let i=n.readUInt32BE(0);if(i!==t.bip32.private&&i!==t.bip32.public)throw new TypeError("Invalid network version");let r=n[4],o=n.readUInt32BE(5);if(r===0&&o!==0)throw new TypeError("Invalid parent fingerprint");let f=n.readUInt32BE(9);if(r===0&&f!==0)throw new TypeError("Invalid index");let c=n.slice(13,45),g;if(i===t.bip32.private){if(n.readUInt8(45)!==0)throw new TypeError("Invalid private key");let A=n.slice(46,78);g=pc(A,c,t,r,f,o)}else{let A=n.slice(45,78);g=hu(A,c,t,r,f,o)}return g}Nn.fromBase58=qw;function zg(e,t,n){return pc(e,t,n)}Nn.fromPrivateKey=zg;function pc(e,t,n,i,r,o){if(Jn({privateKey:mc,chainCode:mc},{privateKey:e,chainCode:t}),n=n||gu,!lo.isPrivate(e))throw new TypeError("Private key not in range [1, n)");return new pu(e,void 0,t,n,i,r,o)}function Fw(e,t,n){return hu(e,t,n)}Nn.fromPublicKey=Fw;function hu(e,t,n,i,r,o){if(Jn({publicKey:Jn.BufferN(33),chainCode:mc},{publicKey:e,chainCode:t}),n=n||gu,!lo.isPoint(e))throw new TypeError("Point is not on the curve");return new pu(void 0,e,t,n,i,r,o)}function Hw(e,t){if(Jn(Jn.Buffer,e),e.length<16)throw new TypeError("Seed should be at least 128 bits");if(e.length>64)throw new TypeError("Seed should be at most 512 bits");t=t||gu;let n=lc.hmacSHA512(C.Buffer.from("Bitcoin seed","utf8"),e),i=n.slice(0,32),r=n.slice(32);return zg(i,r,t)}Nn.fromSeed=Hw});var Vg=L(Er=>{"use strict";B();R();Object.defineProperty(Er,"__esModule",{value:!0});Er.fromPrivateKey=Er.fromPublicKey=Er.fromBase58=Er.fromSeed=Er.tinySecp256k1Interface=void 0;var ud=Zg();Object.defineProperty(Er,"tinySecp256k1Interface",{enumerable:!0,get:function(){return ud.tinySecp256k1Interface}});Object.defineProperty(Er,"fromSeed",{enumerable:!0,get:function(){return ud.fromSeed}});Object.defineProperty(Er,"fromBase58",{enumerable:!0,get:function(){return ud.fromBase58}});Object.defineProperty(Er,"fromPublicKey",{enumerable:!0,get:function(){return ud.fromPublicKey}});Object.defineProperty(Er,"fromPrivateKey",{enumerable:!0,get:function(){return ud.fromPrivateKey}})});var Gg=L(($x,Kw)=>{Kw.exports=["abandon","ability","able","about","above","absent","absorb","abstract","absurd","abuse","access","accident","account","accuse","achieve","acid","acoustic","acquire","across","act","action","actor","actress","actual","adapt","add","addict","address","adjust","admit","adult","advance","advice","aerobic","affair","afford","afraid","again","age","agent","agree","ahead","aim","air","airport","aisle","alarm","album","alcohol","alert","alien","all","alley","allow","almost","alone","alpha","already","also","alter","always","amateur","amazing","among","amount","amused","analyst","anchor","ancient","anger","angle","angry","animal","ankle","announce","annual","another","answer","antenna","antique","anxiety","any","apart","apology","appear","apple","approve","april","arch","arctic","area","arena","argue","arm","armed","armor","army","around","arrange","arrest","arrive","arrow","art","artefact","artist","artwork","ask","aspect","assault","asset","assist","assume","asthma","athlete","atom","attack","attend","attitude","attract","auction","audit","august","aunt","author","auto","autumn","average","avocado","avoid","awake","aware","away","awesome","awful","awkward","axis","baby","bachelor","bacon","badge","bag","balance","balcony","ball","bamboo","banana","banner","bar","barely","bargain","barrel","base","basic","basket","battle","beach","bean","beauty","because","become","beef","before","begin","behave","behind","believe","below","belt","bench","benefit","best","betray","better","between","beyond","bicycle","bid","bike","bind","biology","bird","birth","bitter","black","blade","blame","blanket","blast","bleak","bless","blind","blood","blossom","blouse","blue","blur","blush","board","boat","body","boil","bomb","bone","bonus","book","boost","border","boring","borrow","boss","bottom","bounce","box","boy","bracket","brain","brand","brass","brave","bread","breeze","brick","bridge","brief","bright","bring","brisk","broccoli","broken","bronze","broom","brother","brown","brush","bubble","buddy","budget","buffalo","build","bulb","bulk","bullet","bundle","bunker","burden","burger","burst","bus","business","busy","butter","buyer","buzz","cabbage","cabin","cable","cactus","cage","cake","call","calm","camera","camp","can","canal","cancel","candy","cannon","canoe","canvas","canyon","capable","capital","captain","car","carbon","card","cargo","carpet","carry","cart","case","cash","casino","castle","casual","cat","catalog","catch","category","cattle","caught","cause","caution","cave","ceiling","celery","cement","census","century","cereal","certain","chair","chalk","champion","change","chaos","chapter","charge","chase","chat","cheap","check","cheese","chef","cherry","chest","chicken","chief","child","chimney","choice","choose","chronic","chuckle","chunk","churn","cigar","cinnamon","circle","citizen","city","civil","claim","clap","clarify","claw","clay","clean","clerk","clever","click","client","cliff","climb","clinic","clip","clock","clog","close","cloth","cloud","clown","club","clump","cluster","clutch","coach","coast","coconut","code","coffee","coil","coin","collect","color","column","combine","come","comfort","comic","common","company","concert","conduct","confirm","congress","connect","consider","control","convince","cook","cool","copper","copy","coral","core","corn","correct","cost","cotton","couch","country","couple","course","cousin","cover","coyote","crack","cradle","craft","cram","crane","crash","crater","crawl","crazy","cream","credit","creek","crew","cricket","crime","crisp","critic","crop","cross","crouch","crowd","crucial","cruel","cruise","crumble","crunch","crush","cry","crystal","cube","culture","cup","cupboard","curious","current","curtain","curve","cushion","custom","cute","cycle","dad","damage","damp","dance","danger","daring","dash","daughter","dawn","day","deal","debate","debris","decade","december","decide","decline","decorate","decrease","deer","defense","define","defy","degree","delay","deliver","demand","demise","denial","dentist","deny","depart","depend","deposit","depth","deputy","derive","describe","desert","design","desk","despair","destroy","detail","detect","develop","device","devote","diagram","dial","diamond","diary","dice","diesel","diet","differ","digital","dignity","dilemma","dinner","dinosaur","direct","dirt","disagree","discover","disease","dish","dismiss","disorder","display","distance","divert","divide","divorce","dizzy","doctor","document","dog","doll","dolphin","domain","donate","donkey","donor","door","dose","double","dove","draft","dragon","drama","drastic","draw","dream","dress","drift","drill","drink","drip","drive","drop","drum","dry","duck","dumb","dune","during","dust","dutch","duty","dwarf","dynamic","eager","eagle","early","earn","earth","easily","east","easy","echo","ecology","economy","edge","edit","educate","effort","egg","eight","either","elbow","elder","electric","elegant","element","elephant","elevator","elite","else","embark","embody","embrace","emerge","emotion","employ","empower","empty","enable","enact","end","endless","endorse","enemy","energy","enforce","engage","engine","enhance","enjoy","enlist","enough","enrich","enroll","ensure","enter","entire","entry","envelope","episode","equal","equip","era","erase","erode","erosion","error","erupt","escape","essay","essence","estate","eternal","ethics","evidence","evil","evoke","evolve","exact","example","excess","exchange","excite","exclude","excuse","execute","exercise","exhaust","exhibit","exile","exist","exit","exotic","expand","expect","expire","explain","expose","express","extend","extra","eye","eyebrow","fabric","face","faculty","fade","faint","faith","fall","false","fame","family","famous","fan","fancy","fantasy","farm","fashion","fat","fatal","father","fatigue","fault","favorite","feature","february","federal","fee","feed","feel","female","fence","festival","fetch","fever","few","fiber","fiction","field","figure","file","film","filter","final","find","fine","finger","finish","fire","firm","first","fiscal","fish","fit","fitness","fix","flag","flame","flash","flat","flavor","flee","flight","flip","float","flock","floor","flower","fluid","flush","fly","foam","focus","fog","foil","fold","follow","food","foot","force","forest","forget","fork","fortune","forum","forward","fossil","foster","found","fox","fragile","frame","frequent","fresh","friend","fringe","frog","front","frost","frown","frozen","fruit","fuel","fun","funny","furnace","fury","future","gadget","gain","galaxy","gallery","game","gap","garage","garbage","garden","garlic","garment","gas","gasp","gate","gather","gauge","gaze","general","genius","genre","gentle","genuine","gesture","ghost","giant","gift","giggle","ginger","giraffe","girl","give","glad","glance","glare","glass","glide","glimpse","globe","gloom","glory","glove","glow","glue","goat","goddess","gold","good","goose","gorilla","gospel","gossip","govern","gown","grab","grace","grain","grant","grape","grass","gravity","great","green","grid","grief","grit","grocery","group","grow","grunt","guard","guess","guide","guilt","guitar","gun","gym","habit","hair","half","hammer","hamster","hand","happy","harbor","hard","harsh","harvest","hat","have","hawk","hazard","head","health","heart","heavy","hedgehog","height","hello","helmet","help","hen","hero","hidden","high","hill","hint","hip","hire","history","hobby","hockey","hold","hole","holiday","hollow","home","honey","hood","hope","horn","horror","horse","hospital","host","hotel","hour","hover","hub","huge","human","humble","humor","hundred","hungry","hunt","hurdle","hurry","hurt","husband","hybrid","ice","icon","idea","identify","idle","ignore","ill","illegal","illness","image","imitate","immense","immune","impact","impose","improve","impulse","inch","include","income","increase","index","indicate","indoor","industry","infant","inflict","inform","inhale","inherit","initial","inject","injury","inmate","inner","innocent","input","inquiry","insane","insect","inside","inspire","install","intact","interest","into","invest","invite","involve","iron","island","isolate","issue","item","ivory","jacket","jaguar","jar","jazz","jealous","jeans","jelly","jewel","job","join","joke","journey","joy","judge","juice","jump","jungle","junior","junk","just","kangaroo","keen","keep","ketchup","key","kick","kid","kidney","kind","kingdom","kiss","kit","kitchen","kite","kitten","kiwi","knee","knife","knock","know","lab","label","labor","ladder","lady","lake","lamp","language","laptop","large","later","latin","laugh","laundry","lava","law","lawn","lawsuit","layer","lazy","leader","leaf","learn","leave","lecture","left","leg","legal","legend","leisure","lemon","lend","length","lens","leopard","lesson","letter","level","liar","liberty","library","license","life","lift","light","like","limb","limit","link","lion","liquid","list","little","live","lizard","load","loan","lobster","local","lock","logic","lonely","long","loop","lottery","loud","lounge","love","loyal","lucky","luggage","lumber","lunar","lunch","luxury","lyrics","machine","mad","magic","magnet","maid","mail","main","major","make","mammal","man","manage","mandate","mango","mansion","manual","maple","marble","march","margin","marine","market","marriage","mask","mass","master","match","material","math","matrix","matter","maximum","maze","meadow","mean","measure","meat","mechanic","medal","media","melody","melt","member","memory","mention","menu","mercy","merge","merit","merry","mesh","message","metal","method","middle","midnight","milk","million","mimic","mind","minimum","minor","minute","miracle","mirror","misery","miss","mistake","mix","mixed","mixture","mobile","model","modify","mom","moment","monitor","monkey","monster","month","moon","moral","more","morning","mosquito","mother","motion","motor","mountain","mouse","move","movie","much","muffin","mule","multiply","muscle","museum","mushroom","music","must","mutual","myself","mystery","myth","naive","name","napkin","narrow","nasty","nation","nature","near","neck","need","negative","neglect","neither","nephew","nerve","nest","net","network","neutral","never","news","next","nice","night","noble","noise","nominee","noodle","normal","north","nose","notable","note","nothing","notice","novel","now","nuclear","number","nurse","nut","oak","obey","object","oblige","obscure","observe","obtain","obvious","occur","ocean","october","odor","off","offer","office","often","oil","okay","old","olive","olympic","omit","once","one","onion","online","only","open","opera","opinion","oppose","option","orange","orbit","orchard","order","ordinary","organ","orient","original","orphan","ostrich","other","outdoor","outer","output","outside","oval","oven","over","own","owner","oxygen","oyster","ozone","pact","paddle","page","pair","palace","palm","panda","panel","panic","panther","paper","parade","parent","park","parrot","party","pass","patch","path","patient","patrol","pattern","pause","pave","payment","peace","peanut","pear","peasant","pelican","pen","penalty","pencil","people","pepper","perfect","permit","person","pet","phone","photo","phrase","physical","piano","picnic","picture","piece","pig","pigeon","pill","pilot","pink","pioneer","pipe","pistol","pitch","pizza","place","planet","plastic","plate","play","please","pledge","pluck","plug","plunge","poem","poet","point","polar","pole","police","pond","pony","pool","popular","portion","position","possible","post","potato","pottery","poverty","powder","power","practice","praise","predict","prefer","prepare","present","pretty","prevent","price","pride","primary","print","priority","prison","private","prize","problem","process","produce","profit","program","project","promote","proof","property","prosper","protect","proud","provide","public","pudding","pull","pulp","pulse","pumpkin","punch","pupil","puppy","purchase","purity","purpose","purse","push","put","puzzle","pyramid","quality","quantum","quarter","question","quick","quit","quiz","quote","rabbit","raccoon","race","rack","radar","radio","rail","rain","raise","rally","ramp","ranch","random","range","rapid","rare","rate","rather","raven","raw","razor","ready","real","reason","rebel","rebuild","recall","receive","recipe","record","recycle","reduce","reflect","reform","refuse","region","regret","regular","reject","relax","release","relief","rely","remain","remember","remind","remove","render","renew","rent","reopen","repair","repeat","replace","report","require","rescue","resemble","resist","resource","response","result","retire","retreat","return","reunion","reveal","review","reward","rhythm","rib","ribbon","rice","rich","ride","ridge","rifle","right","rigid","ring","riot","ripple","risk","ritual","rival","river","road","roast","robot","robust","rocket","romance","roof","rookie","room","rose","rotate","rough","round","route","royal","rubber","rude","rug","rule","run","runway","rural","sad","saddle","sadness","safe","sail","salad","salmon","salon","salt","salute","same","sample","sand","satisfy","satoshi","sauce","sausage","save","say","scale","scan","scare","scatter","scene","scheme","school","science","scissors","scorpion","scout","scrap","screen","script","scrub","sea","search","season","seat","second","secret","section","security","seed","seek","segment","select","sell","seminar","senior","sense","sentence","series","service","session","settle","setup","seven","shadow","shaft","shallow","share","shed","shell","sheriff","shield","shift","shine","ship","shiver","shock","shoe","shoot","shop","short","shoulder","shove","shrimp","shrug","shuffle","shy","sibling","sick","side","siege","sight","sign","silent","silk","silly","silver","similar","simple","since","sing","siren","sister","situate","six","size","skate","sketch","ski","skill","skin","skirt","skull","slab","slam","sleep","slender","slice","slide","slight","slim","slogan","slot","slow","slush","small","smart","smile","smoke","smooth","snack","snake","snap","sniff","snow","soap","soccer","social","sock","soda","soft","solar","soldier","solid","solution","solve","someone","song","soon","sorry","sort","soul","sound","soup","source","south","space","spare","spatial","spawn","speak","special","speed","spell","spend","sphere","spice","spider","spike","spin","spirit","split","spoil","sponsor","spoon","sport","spot","spray","spread","spring","spy","square","squeeze","squirrel","stable","stadium","staff","stage","stairs","stamp","stand","start","state","stay","steak","steel","stem","step","stereo","stick","still","sting","stock","stomach","stone","stool","story","stove","strategy","street","strike","strong","struggle","student","stuff","stumble","style","subject","submit","subway","success","such","sudden","suffer","sugar","suggest","suit","summer","sun","sunny","sunset","super","supply","supreme","sure","surface","surge","surprise","surround","survey","suspect","sustain","swallow","swamp","swap","swarm","swear","sweet","swift","swim","swing","switch","sword","symbol","symptom","syrup","system","table","tackle","tag","tail","talent","talk","tank","tape","target","task","taste","tattoo","taxi","teach","team","tell","ten","tenant","tennis","tent","term","test","text","thank","that","theme","then","theory","there","they","thing","this","thought","three","thrive","throw","thumb","thunder","ticket","tide","tiger","tilt","timber","time","tiny","tip","tired","tissue","title","toast","tobacco","today","toddler","toe","together","toilet","token","tomato","tomorrow","tone","tongue","tonight","tool","tooth","top","topic","topple","torch","tornado","tortoise","toss","total","tourist","toward","tower","town","toy","track","trade","traffic","tragic","train","transfer","trap","trash","travel","tray","treat","tree","trend","trial","tribe","trick","trigger","trim","trip","trophy","trouble","truck","true","truly","trumpet","trust","truth","try","tube","tuition","tumble","tuna","tunnel","turkey","turn","turtle","twelve","twenty","twice","twin","twist","two","type","typical","ugly","umbrella","unable","unaware","uncle","uncover","under","undo","unfair","unfold","unhappy","uniform","unique","unit","universe","unknown","unlock","until","unusual","unveil","update","upgrade","uphold","upon","upper","upset","urban","urge","usage","use","used","useful","useless","usual","utility","vacant","vacuum","vague","valid","valley","valve","van","vanish","vapor","various","vast","vault","vehicle","velvet","vendor","venture","venue","verb","verify","version","very","vessel","veteran","viable","vibrant","vicious","victory","video","view","village","vintage","violin","virtual","virus","visa","visit","visual","vital","vivid","vocal","voice","void","volcano","volume","vote","voyage","wage","wagon","wait","walk","wall","walnut","want","warfare","warm","warrior","wash","wasp","waste","water","wave","way","wealth","weapon","wear","weasel","weather","web","wedding","weekend","weird","welcome","west","wet","whale","what","wheat","wheel","when","where","whip","whisper","wide","width","wife","wild","will","win","window","wine","wing","wink","winner","winter","wire","wisdom","wise","wish","witness","wolf","woman","wonder","wood","wool","word","work","world","worry","worth","wrap","wreck","wrestle","wrist","write","wrong","yard","year","yellow","you","young","youth","zebra","zero","zone","zoo"]});var gc=L(gs=>{"use strict";B();R();Object.defineProperty(gs,"__esModule",{value:!0});gs._default=gs.wordlists=void 0;var hc={};gs.wordlists=hc;var yu;gs._default=yu;try{gs._default=yu=Gg(),hc.english=yu,hc.EN=yu}catch{}});var yc=L(gn=>{"use strict";B();R();Object.defineProperty(gn,"__esModule",{value:!0});gn.wordlists=gn.getDefaultWordlist=gn.setDefaultWordlist=gn.validateMnemonic=gn.generateMnemonic=gn.entropyToMnemonic=gn.mnemonicToEntropy=gn.mnemonicToSeed=gn.mnemonicToSeedSync=void 0;var Xg=ls(),Qg=nu(),bu=gc(),jg=Jd(),fd=bu._default,Yg="Invalid mnemonic",ys="Invalid entropy",$w="Invalid mnemonic checksum",ey=`A wordlist is required but a default could not be found.
|
||
Please pass a 2048 word array explicitly.`;function Ww(e,t,n,i,r){let o=(0,Qg.pbkdf2)(jg.sha512,e,t,{c:n,dkLen:i});return Promise.resolve(C.Buffer.from(o))}function cd(e){return(e||"").normalize("NFKD")}function ty(e,t,n){for(;e.length<n;)e=t+e;return e}function ny(e){return parseInt(e,2)}function ry(e){return e.map(t=>ty(t.toString(2),"0",8)).join("")}function iy(e){let n=e.length*8/32,i=(0,Xg.sha256)(e);return ry(Array.from(i)).slice(0,n)}function oy(e){return"mnemonic"+(e||"")}function Jw(e,t){let n=C.Buffer.from(cd(e),"utf8"),i=C.Buffer.from(oy(cd(t)),"utf8"),r=(0,Qg.pbkdf2)(jg.sha512,n,i,{c:2048,dkLen:64});return C.Buffer.from(r)}gn.mnemonicToSeedSync=Jw;function zw(e,t){return Promise.resolve().then(()=>{let n=C.Buffer.from(cd(e),"utf8"),i=C.Buffer.from(oy(cd(t)),"utf8");return Ww(n,i,2048,64,"sha512")})}gn.mnemonicToSeed=zw;function sy(e,t){if(t=t||fd,!t)throw new Error(ey);let n=cd(e).split(" ");if(n.length%3!==0)throw new Error(Yg);let i=n.map(w=>{let M=t.indexOf(w);if(M===-1)throw new Error(Yg);return ty(M.toString(2),"0",11)}).join(""),r=Math.floor(i.length/33)*32,o=i.slice(0,r),f=i.slice(r),c=o.match(/(.{1,8})/g).map(ny);if(c.length<16)throw new Error(ys);if(c.length>32)throw new Error(ys);if(c.length%4!==0)throw new Error(ys);let g=C.Buffer.from(c);if(iy(g)!==f)throw new Error($w);return g.toString("hex")}gn.mnemonicToEntropy=sy;function ay(e,t){if(C.Buffer.isBuffer(e)||(e=C.Buffer.from(e,"hex")),t=t||fd,!t)throw new Error(ey);if(e.length<16)throw new TypeError(ys);if(e.length>32)throw new TypeError(ys);if(e.length%4!==0)throw new TypeError(ys);let n=ry(Array.from(e)),i=iy(e),f=(n+i).match(/(.{1,11})/g).map(c=>{let g=ny(c);return t[g]});return t[0]==="\u3042\u3044\u3053\u304F\u3057\u3093"?f.join("\u3000"):f.join(" ")}gn.entropyToMnemonic=ay;function Zw(e,t,n){if(e=e||128,e%32!==0)throw new TypeError(ys);return t=t||Xg.randomBytes,ay(t(e/8),n)}gn.generateMnemonic=Zw;function Vw(e,t){try{sy(e,t)}catch{return!1}return!0}gn.validateMnemonic=Vw;function Gw(e){let t=bu.wordlists[e];if(t)fd=t;else throw new Error('Could not find wordlist for language "'+e+'"')}gn.setDefaultWordlist=Gw;function Yw(){if(!fd)throw new Error("No Default Wordlist set");return Object.keys(bu.wordlists).filter(e=>e==="JA"||e==="EN"?!1:bu.wordlists[e].every((t,n)=>t===fd[n]))[0]}gn.getDefaultWordlist=Yw;var Xw=gc();Object.defineProperty(gn,"wordlists",{enumerable:!0,get:function(){return Xw.wordlists}})});var uy=L(Gn=>{"use strict";B();R();Object.defineProperty(Gn,"__esModule",{value:!0});Gn.unpadBuffer=Gn.stripZeros=Gn.setLengthRight=Gn.setLengthLeft=Gn.zeros=Gn.assertIsBuffer=void 0;var Qw=function(e){if(!C.Buffer.isBuffer(e)){let t=`This method only supports Buffer but input was: ${e}`;throw new Error(t)}};Gn.assertIsBuffer=Qw;var jw=function(e){return C.Buffer.allocUnsafe(e).fill(0)};Gn.zeros=jw;var dy=function(e,t,n){let i=(0,Gn.zeros)(t);return n?e.length<t?(e.copy(i),i):e.slice(0,t):e.length<t?(e.copy(i,t-e.length),i):e.slice(-t)},ek=function(e,t){return C.Buffer.isBuffer(e)||(e=C.Buffer.from(e)),dy(e,t,!1)};Gn.setLengthLeft=ek;var tk=function(e,t){return C.Buffer.isBuffer(e)||(e=C.Buffer.from(e)),dy(e,t,!0)};Gn.setLengthRight=tk;var nk=function(e){let t=e[0];for(;e.length>0&&t.toString()==="0";)e=e.slice(1),t=e[0];return e};Gn.stripZeros=nk;var rk=function(e){return C.Buffer.isBuffer(e)||(e=C.Buffer.from(e)),(0,Gn.stripZeros)(e)};Gn.unpadBuffer=rk});var vu=L(dn=>{"use strict";B();R();Object.defineProperty(dn,"__esModule",{value:!0});dn.isHexString=dn.getKeys=dn.fromAscii=dn.fromUtf8=dn.toAscii=dn.arrayContainsArray=dn.getBinarySize=dn.padToEven=dn.stripHexPrefix=dn.isHexPrefixed=void 0;function fy(e){if(typeof e!="string")throw new Error(`[isHexPrefixed] input must be type 'string', received type ${typeof e}`);return e[0]==="0"&&e[1]==="x"}dn.isHexPrefixed=fy;var ik=e=>{if(typeof e!="string")throw new Error(`[stripHexPrefix] input must be type 'string', received ${typeof e}`);return fy(e)?e.slice(2):e};dn.stripHexPrefix=ik;function cy(e){let t=e;if(typeof t!="string")throw new Error(`[padToEven] value must be type 'string', received ${typeof t}`);return t.length%2&&(t=`0${t}`),t}dn.padToEven=cy;function ok(e){if(typeof e!="string")throw new Error(`[getBinarySize] method requires input type 'string', received ${typeof e}`);return C.Buffer.byteLength(e,"utf8")}dn.getBinarySize=ok;function sk(e,t,n){if(Array.isArray(e)!==!0)throw new Error(`[arrayContainsArray] method requires input 'superset' to be an array, got type '${typeof e}'`);if(Array.isArray(t)!==!0)throw new Error(`[arrayContainsArray] method requires input 'subset' to be an array, got type '${typeof t}'`);return t[n===!0?"some":"every"](i=>e.indexOf(i)>=0)}dn.arrayContainsArray=sk;function ak(e){let t="",n=0,i=e.length;for(e.substring(0,2)==="0x"&&(n=2);n<i;n+=2){let r=parseInt(e.substr(n,2),16);t+=String.fromCharCode(r)}return t}dn.toAscii=ak;function dk(e){let t=C.Buffer.from(e,"utf8");return`0x${cy(t.toString("hex")).replace(/^0+|0+$/g,"")}`}dn.fromUtf8=dk;function uk(e){let t="";for(let n=0;n<e.length;n++){let r=e.charCodeAt(n).toString(16);t+=r.length<2?`0${r}`:r}return`0x${t}`}dn.fromAscii=uk;function fk(e,t,n){if(!Array.isArray(e))throw new Error(`[getKeys] method expects input 'params' to be an array, got ${typeof e}`);if(typeof t!="string")throw new Error(`[getKeys] method expects input 'key' to be type 'string', got ${typeof e}`);let i=[];for(let r=0;r<e.length;r++){let o=e[r][t];if(n===!0&&!o)o="";else if(typeof o!="string")throw new Error(`invalid abi - expected type 'string', received ${typeof o}`);i.push(o)}return i}dn.getKeys=fk;function ck(e,t){return!(typeof e!="string"||!e.match(/^0x[0-9A-Fa-f]*$/)||typeof t<"u"&&t>0&&e.length!==2+2*t)}dn.isHexString=ck});var ly=L(vi=>{"use strict";B();R();Object.defineProperty(vi,"__esModule",{value:!0});vi.assertIsString=vi.assertIsArray=vi.assertIsBuffer=vi.assertIsHexString=void 0;var lk=vu(),mk=function(e){if(!(0,lk.isHexString)(e)){let t=`This method only supports 0x-prefixed hex strings but input was: ${e}`;throw new Error(t)}};vi.assertIsHexString=mk;var pk=function(e){if(!C.Buffer.isBuffer(e)){let t=`This method only supports Buffer but input was: ${e}`;throw new Error(t)}};vi.assertIsBuffer=pk;var hk=function(e){if(!Array.isArray(e)){let t=`This method only supports number arrays but input was: ${e}`;throw new Error(t)}};vi.assertIsArray=hk;var gk=function(e){if(typeof e!="string"){let t=`This method only supports strings but input was: ${e}`;throw new Error(t)}};vi.assertIsString=gk});var gy=L(fe=>{"use strict";B();R();Object.defineProperty(fe,"__esModule",{value:!0});fe.intToUnpaddedBuffer=fe.bigIntToUnpaddedBuffer=fe.bigIntToHex=fe.bufArrToArr=fe.arrToBufArr=fe.validateNoLeadingZeroes=fe.baToJSON=fe.toUtf8=fe.short=fe.addHexPrefix=fe.toUnsigned=fe.fromSigned=fe.bufferToInt=fe.bigIntToBuffer=fe.bufferToBigInt=fe.bufferToHex=fe.toBuffer=fe.unpadHexString=fe.unpadArray=fe.unpadBuffer=fe.setLengthRight=fe.setLengthLeft=fe.zeros=fe.intToBuffer=fe.intToHex=void 0;var ld=ly(),bs=vu(),yk=function(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Received an invalid integer type: ${e}`);return`0x${e.toString(16)}`};fe.intToHex=yk;var bk=function(e){let t=(0,fe.intToHex)(e);return C.Buffer.from((0,bs.padToEven)(t.slice(2)),"hex")};fe.intToBuffer=bk;var vk=function(e){return C.Buffer.allocUnsafe(e).fill(0)};fe.zeros=vk;var my=function(e,t,n){let i=(0,fe.zeros)(t);return n?e.length<t?(e.copy(i),i):e.slice(0,t):e.length<t?(e.copy(i,t-e.length),i):e.slice(-t)},Ak=function(e,t){return(0,ld.assertIsBuffer)(e),my(e,t,!1)};fe.setLengthLeft=Ak;var Mk=function(e,t){return(0,ld.assertIsBuffer)(e),my(e,t,!0)};fe.setLengthRight=Mk;var bc=function(e){let t=e[0];for(;e.length>0&&t.toString()==="0";)e=e.slice(1),t=e[0];return e},wk=function(e){return(0,ld.assertIsBuffer)(e),bc(e)};fe.unpadBuffer=wk;var kk=function(e){return(0,ld.assertIsArray)(e),bc(e)};fe.unpadArray=kk;var Sk=function(e){return(0,ld.assertIsHexString)(e),e=(0,bs.stripHexPrefix)(e),"0x"+bc(e)};fe.unpadHexString=Sk;var _k=function(e){if(e==null)return C.Buffer.allocUnsafe(0);if(C.Buffer.isBuffer(e))return C.Buffer.from(e);if(Array.isArray(e)||e instanceof Uint8Array)return C.Buffer.from(e);if(typeof e=="string"){if(!(0,bs.isHexString)(e))throw new Error(`Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ${e}`);return C.Buffer.from((0,bs.padToEven)((0,bs.stripHexPrefix)(e)),"hex")}if(typeof e=="number")return(0,fe.intToBuffer)(e);if(typeof e=="bigint"){if(e<BigInt(0))throw new Error(`Cannot convert negative bigint to buffer. Given: ${e}`);let t=e.toString(16);return t.length%2&&(t="0"+t),C.Buffer.from(t,"hex")}if(e.toArray)return C.Buffer.from(e.toArray());if(e.toBuffer)return C.Buffer.from(e.toBuffer());throw new Error("invalid type")};fe.toBuffer=_k;var Ik=function(e){return e=(0,fe.toBuffer)(e),"0x"+e.toString("hex")};fe.bufferToHex=Ik;function vc(e){let t=(0,fe.bufferToHex)(e);return BigInt(t==="0x"?0:t)}fe.bufferToBigInt=vc;function Ac(e){return(0,fe.toBuffer)("0x"+e.toString(16))}fe.bigIntToBuffer=Ac;var xk=function(e){let t=Number(vc(e));if(!Number.isSafeInteger(t))throw new Error("Number exceeds 53 bits");return t};fe.bufferToInt=xk;var Pk=function(e){return BigInt.asIntN(256,vc(e))};fe.fromSigned=Pk;var Uk=function(e){return Ac(BigInt.asUintN(256,e))};fe.toUnsigned=Uk;var Bk=function(e){return typeof e!="string"||(0,bs.isHexPrefixed)(e)?e:"0x"+e};fe.addHexPrefix=Bk;function Rk(e,t=50){let n=C.Buffer.isBuffer(e)?e.toString("hex"):e;return n.length<=t?n:n.slice(0,t)+"\u2026"}fe.short=Rk;var Ck=function(e){let t=/^(00)+|(00)+$/g;if(e=(0,bs.stripHexPrefix)(e),e.length%2!==0)throw new Error("Invalid non-even hex string input for toUtf8() provided");return C.Buffer.from(e.replace(t,""),"hex").toString("utf8")};fe.toUtf8=Ck;var Ek=function(e){if(C.Buffer.isBuffer(e))return`0x${e.toString("hex")}`;if(e instanceof Array){let t=[];for(let n=0;n<e.length;n++)t.push((0,fe.baToJSON)(e[n]));return t}};fe.baToJSON=Ek;var Tk=function(e){for(let[t,n]of Object.entries(e))if(n!==void 0&&n.length>0&&n[0]===0)throw new Error(`${t} cannot have leading zeroes, received: ${n.toString("hex")}`)};fe.validateNoLeadingZeroes=Tk;function py(e){return Array.isArray(e)?e.map(t=>py(t)):C.Buffer.from(e)}fe.arrToBufArr=py;function hy(e){return Array.isArray(e)?e.map(t=>hy(t)):Uint8Array.from(e??[])}fe.bufArrToArr=hy;var Ok=e=>"0x"+e.toString(16);fe.bigIntToHex=Ok;function Dk(e){return(0,fe.unpadBuffer)(Ac(e))}fe.bigIntToUnpaddedBuffer=Dk;function Nk(e){return(0,fe.unpadBuffer)((0,fe.intToBuffer)(e))}fe.intToUnpaddedBuffer=Nk});var Ay=L((dP,vy)=>{"use strict";B();R();var Au=uy(),oa=ls(),cr=Un(),{isHexString:Lk,stripHexPrefix:qk,padToEven:Fk}=vu(),{intToBuffer:Hk,addHexPrefix:Kk,bufferToHex:$k}=gy(),Yt=function(){};function Mu(e){return e.startsWith("int[")?"int256"+e.slice(3):e==="int"?"int256":e.startsWith("uint[")?"uint256"+e.slice(4):e==="uint"?"uint256":e.startsWith("fixed[")?"fixed128x128"+e.slice(5):e==="fixed"?"fixed128x128":e.startsWith("ufixed[")?"ufixed128x128"+e.slice(6):e==="ufixed"?"ufixed128x128":e}function Mc(e){if(e==null)return C.Buffer.allocUnsafe(0);if(C.Buffer.isBuffer(e))return C.Buffer.from(e);if(Array.isArray(e)||e instanceof Uint8Array)return C.Buffer.from(e);if(typeof e=="string"){if(!Lk(e))throw new Error(`Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ${e}`);return C.Buffer.from(Fk(qk(e)),"hex")}if(typeof e=="number")return Hk(e);if(typeof e=="bigint"){if(e<BigInt(0))throw new Error(`Cannot convert negative bigint to buffer. Given: ${e}`);let t=e.toString(16);return t.length%2&&(t="0"+t),C.Buffer.from(t,"hex")}if(e.toArray)return C.Buffer.from(e.toArray());if(e.toBuffer)return C.Buffer.from(e.toBuffer());throw new Error("invalid type")}function Wk(e){if(!!e){if(typeof e=="number"){if(e<0)return"0x";let t=Mc(e);e=$k(t)}if(typeof e!="string"){let t="eth-sig-util.normalize() requires hex string or integer input.";throw t+=` received ${typeof e}: ${e}`,new Error(t)}return Kk(e.toLowerCase())}}Yt.eventID=function(e,t){var n=e+"("+t.map(Mu).join(",")+")";return oa.keccak256(C.Buffer.from(n))};Yt.methodID=function(e,t){return Yt.eventID(e,t).slice(0,4)};function mo(e){return parseInt(/^\D+(\d+)$/.exec(e)[1],10)}function wc(e){var t=/^\D+(\d+)x(\d+)$/.exec(e);return[parseInt(t[1],10),parseInt(t[2],10)]}function pd(e){var t=e.match(/(.*)\[(.*?)\]$/);return t?t[2]===""?"dynamic":parseInt(t[2],10):null}function vs(e){var t=typeof e;if(t==="string")return oa.isHexPrefixed(e)?new cr(oa.stripHexPrefix(e),16):new cr(e,10);if(t==="number")return new cr(e);if(e.toArray)return e;throw new Error("Argument is not a number")}function by(e){var t=/^(\w+)\((.*)\)$/.exec(e);if(t.length!==3)throw new Error("Invalid method signature");var n=/^(.+)\):\((.+)$/.exec(t[2]);if(n!==null&&n.length===3)return{method:t[1],args:n[1].split(","),retargs:n[2].split(",")};var i=t[2].split(",");return i.length===1&&i[0]===""&&(i=[]),{method:t[1],args:i}}function Ai(e,t){var n,i,r,o;if(e==="address")return Ai("uint160",vs(t));if(e==="bool")return Ai("uint8",t?1:0);if(e==="string")return Ai("bytes",C.Buffer.from(t,"utf8"));if(md(e)){if(typeof t.length>"u")throw new Error("Not an array?");if(n=pd(e),n!=="dynamic"&&n!==0&&t.length>n)throw new Error("Elements exceed array size: "+n);r=[],e=e.slice(0,e.lastIndexOf("[")),typeof t=="string"&&(t=JSON.parse(t));for(o in t)r.push(Ai(e,t[o]));if(n==="dynamic"){var f=Ai("uint256",t.length);r.unshift(f)}return C.Buffer.concat(r)}else{if(e==="bytes")return t=C.Buffer.from(t),r=C.Buffer.concat([Ai("uint256",t.length),t]),t.length%32!==0&&(r=C.Buffer.concat([r,Au.zeros(32-t.length%32)])),r;if(e.startsWith("bytes")){if(n=mo(e),n<1||n>32)throw new Error("Invalid bytes<N> width: "+n);return Au.setLengthRight(t,32)}else if(e.startsWith("uint")){if(n=mo(e),n%8||n<8||n>256)throw new Error("Invalid uint<N> width: "+n);if(i=vs(t),i.bitLength()>n)throw new Error("Supplied uint exceeds width: "+n+" vs "+i.bitLength());if(i<0)throw new Error("Supplied uint is negative");return i.toArrayLike(C.Buffer,"be",32)}else if(e.startsWith("int")){if(n=mo(e),n%8||n<8||n>256)throw new Error("Invalid int<N> width: "+n);if(i=vs(t),i.bitLength()>n)throw new Error("Supplied int exceeds width: "+n+" vs "+i.bitLength());return i.toTwos(256).toArrayLike(C.Buffer,"be",32)}else if(e.startsWith("ufixed")){if(n=wc(e),i=vs(t),i<0)throw new Error("Supplied ufixed is negative");return Ai("uint256",i.mul(new cr(2).pow(new cr(n[1]))))}else if(e.startsWith("fixed"))return n=wc(e),Ai("int256",vs(t).mul(new cr(2).pow(new cr(n[1]))))}throw new Error("Unsupported or invalid type: "+e)}function jr(e,t,n){typeof e=="string"&&(e=kc(e));var i,r,o,f;if(e.name==="address")return jr(e.rawType,t,n).toArrayLike(C.Buffer,"be",20).toString("hex");if(e.name==="bool")return jr(e.rawType,t,n).toString()===new cr(1).toString();if(e.name==="string"){var c=jr(e.rawType,t,n);return C.Buffer.from(c,"utf8").toString()}else if(e.isArray){for(o=[],i=e.size,e.size==="dynamic"&&(n=jr("uint256",t,n).toNumber(),i=jr("uint256",t,n).toNumber(),n=n+32),f=0;f<i;f++){var g=jr(e.subArray,t,n);o.push(g),n+=e.subArray.memoryUsage}return o}else{if(e.name==="bytes")return n=jr("uint256",t,n).toNumber(),i=jr("uint256",t,n).toNumber(),t.slice(n+32,n+32+i);if(e.name.startsWith("bytes"))return t.slice(n,n+e.size);if(e.name.startsWith("uint")){if(r=new cr(t.slice(n,n+32),16,"be"),r.bitLength()>e.size)throw new Error("Decoded int exceeds width: "+e.size+" vs "+r.bitLength());return r}else if(e.name.startsWith("int")){if(r=new cr(t.slice(n,n+32),16,"be").fromTwos(256),r.bitLength()>e.size)throw new Error("Decoded uint exceeds width: "+e.size+" vs "+r.bitLength());return r}else if(e.name.startsWith("ufixed")){if(i=new cr(2).pow(new cr(e.size[1])),r=jr("uint256",t,n),!r.mod(i).isZero())throw new Error("Decimals not supported yet");return r.div(i)}else if(e.name.startsWith("fixed")){if(i=new cr(2).pow(new cr(e.size[1])),r=jr("int256",t,n),!r.mod(i).isZero())throw new Error("Decimals not supported yet");return r.div(i)}}throw new Error("Unsupported or invalid type: "+e.name)}function kc(e){var t,n;if(md(e)){t=pd(e);var i=e.slice(0,e.lastIndexOf("["));return i=kc(i),n={isArray:!0,name:e,size:t,memoryUsage:t==="dynamic"?32:i.memoryUsage*t,subArray:i},n}else{var r;switch(e){case"address":r="uint160";break;case"bool":r="uint8";break;case"string":r="bytes";break}if(n={rawType:r,name:e,memoryUsage:32},e.startsWith("bytes")&&e!=="bytes"||e.startsWith("uint")||e.startsWith("int")?n.size=mo(e):(e.startsWith("ufixed")||e.startsWith("fixed"))&&(n.size=wc(e)),e.startsWith("bytes")&&e!=="bytes"&&(n.size<1||n.size>32))throw new Error("Invalid bytes<N> width: "+n.size);if((e.startsWith("uint")||e.startsWith("int"))&&(n.size%8||n.size<8||n.size>256))throw new Error("Invalid int/uint<N> width: "+n.size);return n}}function Jk(e){return e==="string"||e==="bytes"||pd(e)==="dynamic"}function md(e){return e.lastIndexOf("]")===e.length-1}Yt.rawEncode=function(e,t){var n=[],i=[],r=0;e.forEach(function(A){if(md(A)){var w=pd(A);w!=="dynamic"?r+=32*w:r+=32}else r+=32});for(var o=0;o<e.length;o++){var f=Mu(e[o]),c=t[o],g=Ai(f,c);Jk(f)?(n.push(Ai("uint256",r)),i.push(g),r+=g.length):n.push(g)}return C.Buffer.concat(n.concat(i))};Yt.rawDecode=function(e,t){var n=[];t=C.Buffer.from(t);for(var i=0,r=0;r<e.length;r++){var o=Mu(e[r]),f=kc(o,t,i),c=jr(f,t,i);i+=f.memoryUsage,n.push(c)}return n};Yt.simpleEncode=function(e){var t=Array.prototype.slice.call(arguments).slice(1),n=by(e);if(t.length!==n.args.length)throw new Error("Argument count mismatch");return C.Buffer.concat([Yt.methodID(n.method,n.args),Yt.rawEncode(n.args,t)])};Yt.simpleDecode=function(e,t){var n=by(e);if(!n.retargs)throw new Error("No return values in method");return Yt.rawDecode(n.retargs,t)};function yy(e,t){return e.startsWith("address")||e.startsWith("bytes")?"0x"+t.toString("hex"):t.toString()}Yt.stringify=function(e,t){var n=[];for(var i in e){var r=e[i],o=t[i];/^[^\[]+\[.*\]$/.test(r)?o=o.map(function(f){return yy(r,f)}).join(", "):o=yy(r,o),n.push(o)}return n};Yt.solidityHexValue=function(e,t,n){var i,r;if(md(e)){var o=e.replace(/\[.*?\]/,"");if(!md(o)){var f=pd(e);if(f!=="dynamic"&&f!==0&&t.length>f)throw new Error("Elements exceed array size: "+f)}var c=t.map(function(w){return Yt.solidityHexValue(o,w,256)});return C.Buffer.concat(c)}else{if(e==="bytes")return t;if(e==="string")return C.Buffer.from(t,"utf8");if(e==="bool"){n=n||8;var g=Array(n/4).join("0");return C.Buffer.from(t?g+"1":g+"0","hex")}else if(e==="address"){var A=20;return n&&(A=n/8),Au.setLengthLeft(Mc(t),A)}else if(e.startsWith("bytes")){if(i=mo(e),i<1||i>32)throw new Error("Invalid bytes<N> width: "+i);return typeof t=="number"&&(t=Wk(t)),Au.setLengthRight(Mc(t),i)}else if(e.startsWith("uint")){if(i=mo(e),i%8||i<8||i>256)throw new Error("Invalid uint<N> width: "+i);if(r=vs(t),r.bitLength()>i)throw new Error("Supplied uint exceeds width: "+i+" vs "+r.bitLength());return n=n||i,r.toArrayLike(C.Buffer,"be",n/8)}else if(e.startsWith("int")){if(i=mo(e),i%8||i<8||i>256)throw new Error("Invalid int<N> width: "+i);if(r=vs(t),r.bitLength()>i)throw new Error("Supplied int exceeds width: "+i+" vs "+r.bitLength());return n=n||i,r.toTwos(i).toArrayLike(C.Buffer,"be",n/8)}else throw new Error("Unsupported or invalid type: "+e)}};Yt.solidityPack=function(e,t){if(e.length!==t.length)throw new Error("Number of types are not matching the values");for(var n=[],i=0;i<e.length;i++){var r=Mu(e[i]),o=t[i];n.push(Yt.solidityHexValue(r,o,null))}return C.Buffer.concat(n)};Yt.soliditySHA3=function(e,t){return oa.keccak256(Yt.solidityPack(e,t))};Yt.soliditySHA256=function(e,t){return oa.sha256(Yt.solidityPack(e,t))};Yt.solidityRIPEMD160=function(e,t){return oa.ripemd160(Yt.solidityPack(e,t),!0)};function zk(e){return e>="0"&&e<="9"}Yt.fromSerpent=function(e){for(var t=[],n=0;n<e.length;n++){var i=e[n];if(i==="s")t.push("bytes");else if(i==="b"){for(var r="bytes",o=n+1;o<e.length&&zk(e[o]);)r+=e[o]-"0",o++;n=o-1,t.push(r)}else if(i==="i")t.push("int256");else if(i==="a")t.push("int256[]");else throw new Error("Unsupported or invalid type: "+i)}return t};Yt.toSerpent=function(e){for(var t=[],n=0;n<e.length;n++){var i=e[n];if(i==="bytes")t.push("s");else if(i.startsWith("bytes"))t.push("b"+mo(i));else if(i==="int256")t.push("i");else if(i==="int256[]")t.push("a");else throw new Error("Unsupported or invalid type: "+i)}return t.join("")};vy.exports=Yt});var My=L(po=>{"use strict";B();R();Object.defineProperty(po,"__esModule",{value:!0});po.SoliditySHA3=po.RawEncode=po.ABI=void 0;var Sc=Ay();po.ABI=Sc;function Zk(e,t){return Sc.rawEncode(e,t)}po.RawEncode=Zk;function Vk(e,t){return Sc.soliditySHA3(e,t)}po.SoliditySHA3=Vk});var xy=L(yt=>{"use strict";B();R();var Gk=yt&&yt.__createBinding||(Object.create?function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]}),Yk=yt&&yt.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Xk=yt&&yt.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Gk(t,e,n);return Yk(t,e),t},Qk=yt&&yt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yt,"__esModule",{value:!0});yt.loadUncompressedPublicKey=yt.loadCompressedPublicKey=yt.publicKeyConvert=yt.publicKeyCreate=yt.publicKeyVerify=yt.privateKeyVerify=yt.loadPublicKey=yt.recover=yt.verifyWithNoRecovery=yt.verify=yt.getV=yt.sign=void 0;var jk=Xk(ia()),Bn=new jk.ec("secp256k1"),wy=ls(),sa=Qk(Un());function eS(e,t,n=!0){let i=Bn.sign(Array.from(e),C.Buffer.from(t),{canonical:n});return{signature:i.toBytes(),recovery:i.recoveryParam}}yt.sign=eS;function tS(e,t,n,i,r=!0){let o=hd(i);if(o==null)throw new Error("pubkey error");let f=Bn.keyPair({pub:{x:o.x,y:o.y}}).getPublic();return Bn.getKeyRecoveryParam(e,{r:t,s:n},f,r)}yt.getV=tS;function nS(e,t,n,i){let r=ky(t,n,e,!0);if(r==null)return!1;let o=Sy(i,!0);return o==null?!1:r.equals(o)}yt.verify=nS;function rS(e,t,n){let i=hd(n);if(i==null)throw new Error("pubkey error");let r=Bn.keyPair({pub:{x:i.x,y:i.y}}),o={r:(0,wy.toHex)(t.slice(0,32)),s:(0,wy.toHex)(t.slice(32,64))};return r.verify(e,o)}yt.verifyWithNoRecovery=rS;function ky(e,t,n,i){let r={r:Array.from(e.slice(0,32)),s:Array.from(e.slice(32,64))},o=new sa.default(r.r),f=new sa.default(r.s);if(o.cmp(Bn.curve.n)>=0||f.cmp(Bn.curve.n)>=0||o.isZero()||f.isZero())return null;let c;try{c=Bn.recoverPubKey(Array.from(n),r,t,null)}catch{return null}return C.Buffer.from(c.encode(null,i))}yt.recover=ky;function hd(e){let t=C.Buffer.from(e),n=t[0];switch(n){case 2:case 3:return t.length!==33?null:_y(n,t.subarray(1,33));case 4:case 6:case 7:return t.length!==65?null:Iy(n,t.subarray(1,33),t.subarray(33,65));default:return null}}yt.loadPublicKey=hd;function iS(e){let t=new sa.default(Array.from(e));return t.cmp(Bn.curve.n)<0&&!t.isZero()}yt.privateKeyVerify=iS;function oS(e){return hd(e)!==null}yt.publicKeyVerify=oS;function sS(e,t){let n=Bn.keyFromPrivate(Array.from(e),"bytes").getPublic();return C.Buffer.from(n.encode(null,t))}yt.publicKeyCreate=sS;function Sy(e,t){let n=hd(e);if(n==null)return null;let i=Bn.keyPair({pub:{x:n.x,y:n.y}}).getPublic();return C.Buffer.from(i.encode(null,t))}yt.publicKeyConvert=Sy;function _y(e,t){let n=new sa.default(Array.from(t));if(n.cmp(Bn.curve.p)>=0)return null;let i=n.toRed(Bn.curve.red),r=i.redSqr().redIMul(i).redIAdd(Bn.curve.b).redSqrt();e===3!==r.isOdd()&&(r=r.redNeg());let o=i.redSqr().redIMul(i);return r.redSqr().redISub(o.redIAdd(Bn.curve.b)).isZero()?{x:i,y:r}:null}yt.loadCompressedPublicKey=_y;function Iy(e,t,n){let i=new sa.default(Array.from(t)),r=new sa.default(Array.from(n));if(i.cmp(Bn.curve.p)>=0||r.cmp(Bn.curve.p)>=0)return null;let o=i.toRed(Bn.curve.red),f=r.toRed(Bn.curve.red);if((e===6||e===7)&&f.isOdd()!==(e===7))return null;let c=o.redSqr().redIMul(o);return f.redSqr().redISub(c.redIAdd(Bn.curve.b)).isZero()?{x:o,y:f}:null}yt.loadUncompressedPublicKey=Iy});var Oy=L(gt=>{"use strict";B();R();var aS=gt&>.__createBinding||(Object.create?function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]}),dS=gt&>.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),uS=gt&>.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&aS(t,e,n);return dS(t,e),t},fS=gt&>.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(gt,"__esModule",{value:!0});gt.ed25519_getDerivedPrivateKey=gt.isValidPath=gt.ed25519_getRandomPrivateKey=gt.ed25519SignTest=gt.fromSecret=gt.fromSeed=gt.privateKeyVerify=gt.publicKeyVerify=gt.publicKeyCreate=gt.verify=gt.sign=gt.ed25519MulBase=void 0;var Py=uS(ia()),ei=ls(),cS=fS(Un()),lS=yc(),Ti=new Py.eddsa("ed25519"),Uy=Ti.curve;function mS(e){let t=Ti.curve.g;return Ti.encodePoint(t.mul(Py.utils.intFromLE(e)))}gt.ed25519MulBase=mS;function By(e,t){let n=t;n.length==64&&(n=n.slice(0,32));let r=Ti.keyFromSecret(Array.from(n)).sign(Array.from(e)).toBytes();return Uint8Array.from(r)}gt.sign=By;function Ry(e,t,n){return Ti.keyFromPublic(Array.from(n)).verify(Array.from(e),Array.from(t))}gt.verify=Ry;function wu(e){let t=e;t.length==64&&(t=t.slice(0,32));let i=Ti.keyFromSecret(Array.from(t)).getPublic();if(e.length==64&&!pS(e.slice(32,64),i))throw new Error("invalid public key");return Uint8Array.from(i)}gt.publicKeyCreate=wu;function pS(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function hS(e){let t=Ti.decodePoint(Array.from(e));return Uy.validate(t)}gt.publicKeyVerify=hS;function Cy(e){let t=new cS.default(Array.from(e));return t.cmp(Uy.n)<0&&!t.isZero()}gt.privateKeyVerify=Cy;function gS(e){let t=Ti.keyFromSecret(Array.from(e)),n=Uint8Array.from(t.getPublic());return{publicKey:n,secretKey:(0,ei.concatBytes)(e,n)}}gt.fromSeed=gS;function yS(e){let t=e.slice(0,32),n=Ti.keyFromSecret(Array.from(t));return{publicKey:Uint8Array.from(n.getPublic()),secretKey:Uint8Array.from(t)}}gt.fromSecret=yS;function Ey(e){let t=(0,ei.sha256)("ed25519-test"),n=wu(e),i=By(t,e);return Ry(t,i,n)}gt.ed25519SignTest=Ey;function bS(e,t){for(;;){let n=(0,ei.randomBytes)(32);if(Cy(n)&&Ey(n)){let i=wu(n),r=e?(0,ei.concatBytes)(n,i):n;return t==="base58"?(0,ei.toBase58)(r):(0,ei.toHex)(r)}}}gt.ed25519_getRandomPrivateKey=bS;var vS=new RegExp("^m(\\/[0-9]+')+$"),Ty=e=>e.replace("'",""),AS=2147483648;function MS(e){let t=(0,ei.hmacSHA512)("ed25519 seed",e),n=t.slice(0,32),i=t.slice(32);return{key:n,chainCode:i}}function wS({key:e,chainCode:t},n){let i=C.Buffer.allocUnsafe(4);i.writeUInt32BE(n,0);let r=C.Buffer.concat([C.Buffer.alloc(1,0),e,i]),o=(0,ei.hmacSHA512)(t,r),f=o.slice(0,32),c=o.slice(32);return{key:f,chainCode:c}}var kS=e=>vS.test(e)?!e.split("/").slice(1).map(Ty).some(isNaN):!1;gt.isValidPath=kS;function SS(e,t,n=AS){if(!(0,gt.isValidPath)(e))throw new Error("Invalid derivation path");let{key:i,chainCode:r}=MS(t);return e.split("/").slice(1).map(Ty).map(f=>parseInt(f,10)).reduce((f,c)=>wS(f,c+n),{key:i,chainCode:r})}async function _S(e,t,n,i){let r=await(0,lS.mnemonicToSeed)(e),o=SS(t,r).key,f=wu(o),c=n?(0,ei.concatBytes)(o,f):o;return i==="base58"?Promise.resolve((0,ei.toBase58)(c)):Promise.resolve((0,ei.toHex)(c))}gt.ed25519_getDerivedPrivateKey=_S});var qy=L(Rt=>{"use strict";B();R();var IS=Rt&&Rt.__createBinding||(Object.create?function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]}),xS=Rt&&Rt.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),PS=Rt&&Rt.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&IS(t,e,n);return xS(t,e),t},US=Rt&&Rt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Rt,"__esModule",{value:!0});Rt.loadUncompressedPublicKey=Rt.loadCompressedPublicKey=Rt.publicKeyConvert=Rt.publicKeyCreate=Rt.publicKeyVerify=Rt.privateKeyVerify=Rt.loadPublicKey=Rt.recover=Rt.verify=Rt.sign=void 0;var BS=PS(ia()),nr=new BS.ec("p256"),aa=US(Un());function RS(e,t,n=!0){let i=nr.sign(Array.from(e),C.Buffer.from(t),{canonical:n});return{signature:i.toBytes(),recovery:i.recoveryParam}}Rt.sign=RS;function CS(e,t,n,i){let r=Dy(t,n,e,!1);return r==null?!1:r.equals(i)}Rt.verify=CS;function Dy(e,t,n,i){let r={r:Array.from(e.slice(0,32)),s:Array.from(e.slice(32,64))},o=new aa.default(r.r),f=new aa.default(r.s);if(o.cmp(nr.curve.n)>=0||f.cmp(nr.curve.n)>=0||o.isZero()||f.isZero())return null;let c;try{c=nr.recoverPubKey(Array.from(n),r,t,null)}catch{return null}return C.Buffer.from(c.encode(null,i))}Rt.recover=Dy;function _c(e){let t=C.Buffer.from(e),n=t[0];switch(n){case 2:case 3:return t.length!==33?null:Ny(n,t.subarray(1,33));case 4:case 6:case 7:return t.length!==65?null:Ly(n,t.subarray(1,33),t.subarray(33,65));default:return null}}Rt.loadPublicKey=_c;function ES(e){let t=new aa.default(Array.from(e));return t.cmp(nr.curve.n)<0&&!t.isZero()}Rt.privateKeyVerify=ES;function TS(e){return _c(e)!==null}Rt.publicKeyVerify=TS;function OS(e,t){let n=nr.keyFromPrivate(Array.from(e),"bytes").getPublic();return C.Buffer.from(n.encode(null,t))}Rt.publicKeyCreate=OS;function DS(e,t){let n=_c(e);if(n==null)return null;let i=nr.keyPair({pub:{x:n.x,y:n.y}}).getPublic();return C.Buffer.from(i.encode(null,t))}Rt.publicKeyConvert=DS;function Ny(e,t){let n=new aa.default(Array.from(t));if(n.cmp(nr.curve.p)>=0)return null;let i=n.toRed(nr.curve.red),r=i.redSqr().redIMul(i).redIAdd(nr.curve.b).redSqrt();return e===3!==r.isOdd()&&(r=r.redNeg()),{x:i,y:r}}Rt.loadCompressedPublicKey=Ny;function Ly(e,t,n){let i=new aa.default(Array.from(t)),r=new aa.default(Array.from(n));if(i.cmp(nr.curve.p)>=0||r.cmp(nr.curve.p)>=0)return null;let o=i.toRed(nr.curve.red),f=r.toRed(nr.curve.red);if((e===6||e===7)&&f.isOdd()!==(e===7))return null;let c=o.redSqr().redIMul(o);return f.redSqr().redISub(c.redIAdd(nr.curve.b)).isZero()?{x:o,y:f}:null}Rt.loadUncompressedPublicKey=Ly});var Oi=L(dt=>{"use strict";B();R();Object.defineProperty(dt,"__esModule",{value:!0});dt.validateObject=dt.createHmacDrbg=dt.bitMask=dt.bitSet=dt.bitGet=dt.bitLen=dt.utf8ToBytes=dt.equalBytes=dt.concatBytes=dt.ensureBytes=dt.numberToVarBytesBE=dt.numberToBytesLE=dt.numberToBytesBE=dt.bytesToNumberLE=dt.bytesToNumberBE=dt.hexToBytes=dt.hexToNumber=dt.numberToHexUnpadded=dt.bytesToHex=void 0;var Hy=BigInt(0),ku=BigInt(1),NS=BigInt(2),Su=e=>e instanceof Uint8Array,LS=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function xc(e){if(!Su(e))throw new Error("Uint8Array expected");let t="";for(let n=0;n<e.length;n++)t+=LS[e[n]];return t}dt.bytesToHex=xc;function Ky(e){let t=e.toString(16);return t.length&1?`0${t}`:t}dt.numberToHexUnpadded=Ky;function Pc(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return BigInt(e===""?"0":`0x${e}`)}dt.hexToNumber=Pc;function _u(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(e.length%2)throw new Error("hex string is invalid: unpadded "+e.length);let t=new Uint8Array(e.length/2);for(let n=0;n<t.length;n++){let i=n*2,r=e.slice(i,i+2),o=Number.parseInt(r,16);if(Number.isNaN(o)||o<0)throw new Error("invalid byte sequence");t[n]=o}return t}dt.hexToBytes=_u;function qS(e){return Pc(xc(e))}dt.bytesToNumberBE=qS;function FS(e){if(!Su(e))throw new Error("Uint8Array expected");return Pc(xc(Uint8Array.from(e).reverse()))}dt.bytesToNumberLE=FS;var HS=(e,t)=>_u(e.toString(16).padStart(t*2,"0"));dt.numberToBytesBE=HS;var KS=(e,t)=>(0,dt.numberToBytesBE)(e,t).reverse();dt.numberToBytesLE=KS;var $S=e=>_u(Ky(e));dt.numberToVarBytesBE=$S;function WS(e,t,n){let i;if(typeof t=="string")try{i=_u(t)}catch(o){throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${o}`)}else if(Su(t))i=Uint8Array.from(t);else throw new Error(`${e} must be hex string or Uint8Array`);let r=i.length;if(typeof n=="number"&&r!==n)throw new Error(`${e} expected ${n} bytes, got ${r}`);return i}dt.ensureBytes=WS;function $y(...e){let t=new Uint8Array(e.reduce((i,r)=>i+r.length,0)),n=0;return e.forEach(i=>{if(!Su(i))throw new Error("Uint8Array expected");t.set(i,n),n+=i.length}),t}dt.concatBytes=$y;function JS(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}dt.equalBytes=JS;function zS(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new TextEncoder().encode(e)}dt.utf8ToBytes=zS;function ZS(e){let t;for(t=0;e>Hy;e>>=ku,t+=1);return t}dt.bitLen=ZS;var VS=(e,t)=>e>>BigInt(t)&ku;dt.bitGet=VS;var GS=(e,t,n)=>e|(n?ku:Hy)<<BigInt(t);dt.bitSet=GS;var YS=e=>(NS<<BigInt(e-1))-ku;dt.bitMask=YS;var Ic=e=>new Uint8Array(e),Fy=e=>Uint8Array.from(e);function XS(e,t,n){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof n!="function")throw new Error("hmacFn must be a function");let i=Ic(e),r=Ic(e),o=0,f=()=>{i.fill(1),r.fill(0),o=0},c=(...M)=>n(r,i,...M),g=(M=Ic())=>{r=c(Fy([0]),M),i=c(),M.length!==0&&(r=c(Fy([1]),M),i=c())},A=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let M=0,P=[];for(;M<t;){i=c();let x=i.slice();P.push(x),M+=i.length}return $y(...P)};return(M,P)=>{f(),g(M);let x;for(;!(x=P(A()));)g();return f(),x}}dt.createHmacDrbg=XS;var QS={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function jS(e,t,n={}){let i=(r,o,f)=>{let c=QS[o];if(typeof c!="function")throw new Error(`Invalid validator "${o}", expected function`);let g=e[r];if(!(f&&g===void 0)&&!c(g,e))throw new Error(`Invalid param ${String(r)}=${g} (${typeof g}), expected ${o}`)};for(let[r,o]of Object.entries(t))i(r,o,!1);for(let[r,o]of Object.entries(n))i(r,o,!0);return e}dt.validateObject=jS});var As=L(mt=>{"use strict";B();R();Object.defineProperty(mt,"__esModule",{value:!0});mt.hashToPrivateScalar=mt.FpSqrtEven=mt.FpSqrtOdd=mt.Field=mt.nLength=mt.FpIsSquare=mt.FpDiv=mt.FpInvertBatch=mt.FpPow=mt.validateField=mt.isNegativeLE=mt.FpSqrt=mt.tonelliShanks=mt.invert=mt.pow2=mt.pow=mt.mod=void 0;var Di=Oi(),Rn=BigInt(0),zt=BigInt(1),ho=BigInt(2),e6=BigInt(3),Uc=BigInt(4),Wy=BigInt(5),Jy=BigInt(8),t6=BigInt(9),n6=BigInt(16);function Tr(e,t){let n=e%t;return n>=Rn?n:t+n}mt.mod=Tr;function zy(e,t,n){if(n<=Rn||t<Rn)throw new Error("Expected power/modulo > 0");if(n===zt)return Rn;let i=zt;for(;t>Rn;)t&zt&&(i=i*e%n),e=e*e%n,t>>=zt;return i}mt.pow=zy;function r6(e,t,n){let i=e;for(;t-- >Rn;)i*=i,i%=n;return i}mt.pow2=r6;function Iu(e,t){if(e===Rn||t<=Rn)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let n=Tr(e,t),i=t,r=Rn,o=zt,f=zt,c=Rn;for(;n!==Rn;){let A=i/n,w=i%n,M=r-f*A,P=o-c*A;i=n,n=w,r=f,o=c,f=M,c=P}if(i!==zt)throw new Error("invert: does not exist");return Tr(r,t)}mt.invert=Iu;function Zy(e){let t=(e-zt)/ho,n,i,r;for(n=e-zt,i=0;n%ho===Rn;n/=ho,i++);for(r=ho;r<e&&zy(r,t,e)!==e-zt;r++);if(i===1){let f=(e+zt)/Uc;return function(g,A){let w=g.pow(A,f);if(!g.eql(g.sqr(w),A))throw new Error("Cannot find square root");return w}}let o=(n+zt)/ho;return function(c,g){if(c.pow(g,t)===c.neg(c.ONE))throw new Error("Cannot find square root");let A=i,w=c.pow(c.mul(c.ONE,r),n),M=c.pow(g,o),P=c.pow(g,n);for(;!c.eql(P,c.ONE);){if(c.eql(P,c.ZERO))return c.ZERO;let x=1;for(let _=c.sqr(P);x<A&&!c.eql(_,c.ONE);x++)_=c.sqr(_);let U=c.pow(w,zt<<BigInt(A-x-1));w=c.sqr(U),M=c.mul(M,U),P=c.mul(P,w),A=x}return M}}mt.tonelliShanks=Zy;function Vy(e){if(e%Uc===e6){let t=(e+zt)/Uc;return function(i,r){let o=i.pow(r,t);if(!i.eql(i.sqr(o),r))throw new Error("Cannot find square root");return o}}if(e%Jy===Wy){let t=(e-Wy)/Jy;return function(i,r){let o=i.mul(r,ho),f=i.pow(o,t),c=i.mul(r,f),g=i.mul(i.mul(c,ho),f),A=i.mul(c,i.sub(g,i.ONE));if(!i.eql(i.sqr(A),r))throw new Error("Cannot find square root");return A}}return e%n6,Zy(e)}mt.FpSqrt=Vy;var i6=(e,t)=>(Tr(e,t)&zt)===zt;mt.isNegativeLE=i6;var o6=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function s6(e){let t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},n=o6.reduce((i,r)=>(i[r]="function",i),t);return(0,Di.validateObject)(e,n)}mt.validateField=s6;function Gy(e,t,n){if(n<Rn)throw new Error("Expected power > 0");if(n===Rn)return e.ONE;if(n===zt)return t;let i=e.ONE,r=t;for(;n>Rn;)n&zt&&(i=e.mul(i,r)),r=e.sqr(r),n>>=zt;return i}mt.FpPow=Gy;function Yy(e,t){let n=new Array(t.length),i=t.reduce((o,f,c)=>e.is0(f)?o:(n[c]=o,e.mul(o,f)),e.ONE),r=e.inv(i);return t.reduceRight((o,f,c)=>e.is0(f)?o:(n[c]=e.mul(o,n[c]),e.mul(o,f)),r),n}mt.FpInvertBatch=Yy;function a6(e,t,n){return e.mul(t,typeof n=="bigint"?Iu(n,e.ORDER):e.inv(n))}mt.FpDiv=a6;function d6(e){let t=(e.ORDER-zt)/ho;return n=>{let i=e.pow(n,t);return e.eql(i,e.ZERO)||e.eql(i,e.ONE)}}mt.FpIsSquare=d6;function Bc(e,t){let n=t!==void 0?t:e.toString(2).length,i=Math.ceil(n/8);return{nBitLength:n,nByteLength:i}}mt.nLength=Bc;function u6(e,t,n=!1,i={}){if(e<=Rn)throw new Error(`Expected Fp ORDER > 0, got ${e}`);let{nBitLength:r,nByteLength:o}=Bc(e,t);if(o>2048)throw new Error("Field lengths over 2048 bytes are not supported");let f=Vy(e),c=Object.freeze({ORDER:e,BITS:r,BYTES:o,MASK:(0,Di.bitMask)(r),ZERO:Rn,ONE:zt,create:g=>Tr(g,e),isValid:g=>{if(typeof g!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof g}`);return Rn<=g&&g<e},is0:g=>g===Rn,isOdd:g=>(g&zt)===zt,neg:g=>Tr(-g,e),eql:(g,A)=>g===A,sqr:g=>Tr(g*g,e),add:(g,A)=>Tr(g+A,e),sub:(g,A)=>Tr(g-A,e),mul:(g,A)=>Tr(g*A,e),pow:(g,A)=>Gy(c,g,A),div:(g,A)=>Tr(g*Iu(A,e),e),sqrN:g=>g*g,addN:(g,A)=>g+A,subN:(g,A)=>g-A,mulN:(g,A)=>g*A,inv:g=>Iu(g,e),sqrt:i.sqrt||(g=>f(c,g)),invertBatch:g=>Yy(c,g),cmov:(g,A,w)=>w?A:g,toBytes:g=>n?(0,Di.numberToBytesLE)(g,o):(0,Di.numberToBytesBE)(g,o),fromBytes:g=>{if(g.length!==o)throw new Error(`Fp.fromBytes: expected ${o}, got ${g.length}`);return n?(0,Di.bytesToNumberLE)(g):(0,Di.bytesToNumberBE)(g)}});return Object.freeze(c)}mt.Field=u6;function f6(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");let n=e.sqrt(t);return e.isOdd(n)?n:e.neg(n)}mt.FpSqrtOdd=f6;function c6(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");let n=e.sqrt(t);return e.isOdd(n)?e.neg(n):n}mt.FpSqrtEven=c6;function l6(e,t,n=!1){e=(0,Di.ensureBytes)("privateHash",e);let i=e.length,r=Bc(t).nByteLength+8;if(r<24||i<r||i>1024)throw new Error(`hashToPrivateScalar: expected ${r}-1024 bytes of input, got ${i}`);let o=n?(0,Di.bytesToNumberLE)(e):(0,Di.bytesToNumberBE)(e);return Tr(o,t-zt)+zt}mt.hashToPrivateScalar=l6});var Qy=L(da=>{"use strict";B();R();Object.defineProperty(da,"__esModule",{value:!0});da.validateBasic=da.wNAF=void 0;var Xy=As(),m6=Oi(),p6=BigInt(0),Rc=BigInt(1);function h6(e,t){let n=(r,o)=>{let f=o.negate();return r?f:o},i=r=>{let o=Math.ceil(t/r)+1,f=2**(r-1);return{windows:o,windowSize:f}};return{constTimeNegate:n,unsafeLadder(r,o){let f=e.ZERO,c=r;for(;o>p6;)o&Rc&&(f=f.add(c)),c=c.double(),o>>=Rc;return f},precomputeWindow(r,o){let{windows:f,windowSize:c}=i(o),g=[],A=r,w=A;for(let M=0;M<f;M++){w=A,g.push(w);for(let P=1;P<c;P++)w=w.add(A),g.push(w);A=w.double()}return g},wNAF(r,o,f){let{windows:c,windowSize:g}=i(r),A=e.ZERO,w=e.BASE,M=BigInt(2**r-1),P=2**r,x=BigInt(r);for(let U=0;U<c;U++){let _=U*g,T=Number(f&M);f>>=x,T>g&&(T-=P,f+=Rc);let D=_,K=_+Math.abs(T)-1,N=U%2!==0,Z=T<0;T===0?w=w.add(n(N,o[D])):A=A.add(n(Z,o[K]))}return{p:A,f:w}},wNAFCached(r,o,f,c){let g=r._WINDOW_SIZE||1,A=o.get(r);return A||(A=this.precomputeWindow(r,g),g!==1&&o.set(r,c(A))),this.wNAF(g,A,f)}}}da.wNAF=h6;function g6(e){return(0,Xy.validateField)(e.Fp),(0,m6.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,Xy.nLength)(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}da.validateBasic=g6});var Pu=L(Zt=>{"use strict";B();R();var y6=Zt&&Zt.__createBinding||(Object.create?function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]}),b6=Zt&&Zt.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),e1=Zt&&Zt.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&y6(t,e,n);return b6(t,e),t};Object.defineProperty(Zt,"__esModule",{value:!0});Zt.mapToCurveSimpleSWU=Zt.SWUFpSqrtRatio=Zt.weierstrass=Zt.weierstrassPoints=Zt.DER=void 0;var gd=e1(As()),yn=e1(Oi()),Mi=Oi(),Cc=Qy();function v6(e){let t=(0,Cc.validateBasic)(e);yn.validateObject(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});let{endo:n,Fp:i,a:r}=t;if(n){if(!i.eql(r,i.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof n!="object"||typeof n.beta!="bigint"||typeof n.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}var{bytesToNumberBE:A6,hexToBytes:M6}=yn;Zt.DER={Err:class extends Error{constructor(t=""){super(t)}},_parseInt(e){let{Err:t}=Zt.DER;if(e.length<2||e[0]!==2)throw new t("Invalid signature integer tag");let n=e[1],i=e.subarray(2,n+2);if(!n||i.length!==n)throw new t("Invalid signature integer: wrong length");if(i[0]&128)throw new t("Invalid signature integer: negative");if(i[0]===0&&!(i[1]&128))throw new t("Invalid signature integer: unnecessary leading zero");return{d:A6(i),l:e.subarray(n+2)}},toSig(e){let{Err:t}=Zt.DER,n=typeof e=="string"?M6(e):e;if(!(n instanceof Uint8Array))throw new Error("ui8a expected");let i=n.length;if(i<2||n[0]!=48)throw new t("Invalid signature tag");if(n[1]!==i-2)throw new t("Invalid signature: incorrect length");let{d:r,l:o}=Zt.DER._parseInt(n.subarray(2)),{d:f,l:c}=Zt.DER._parseInt(o);if(c.length)throw new t("Invalid signature: left bytes after parsing");return{r,s:f}},hexFromSig(e){let t=A=>Number.parseInt(A[0],16)&8?"00"+A:A,n=A=>{let w=A.toString(16);return w.length&1?`0${w}`:w},i=t(n(e.s)),r=t(n(e.r)),o=i.length/2,f=r.length/2,c=n(o),g=n(f);return`30${n(f+o+4)}02${g}${r}02${c}${i}`}};var ti=BigInt(0),un=BigInt(1),go=BigInt(2),xu=BigInt(3),jy=BigInt(4);function t1(e){let t=v6(e),{Fp:n}=t,i=t.toBytes||((U,_,T)=>{let D=_.toAffine();return yn.concatBytes(Uint8Array.from([4]),n.toBytes(D.x),n.toBytes(D.y))}),r=t.fromBytes||(U=>{let _=U.subarray(1),T=n.fromBytes(_.subarray(0,n.BYTES)),D=n.fromBytes(_.subarray(n.BYTES,2*n.BYTES));return{x:T,y:D}});function o(U){let{a:_,b:T}=t,D=n.sqr(U),K=n.mul(D,U);return n.add(n.add(K,n.mul(U,_)),T)}if(!n.eql(n.sqr(t.Gy),o(t.Gx)))throw new Error("bad generator point: equation left != right");function f(U){return typeof U=="bigint"&&ti<U&&U<t.n}function c(U){if(!f(U))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function g(U){let{allowedPrivateKeyLengths:_,nByteLength:T,wrapPrivateKey:D,n:K}=t;if(_&&typeof U!="bigint"){if(U instanceof Uint8Array&&(U=yn.bytesToHex(U)),typeof U!="string"||!_.includes(U.length))throw new Error("Invalid key");U=U.padStart(T*2,"0")}let N;try{N=typeof U=="bigint"?U:yn.bytesToNumberBE((0,Mi.ensureBytes)("private key",U,T))}catch{throw new Error(`private key must be ${T} bytes, hex or bigint, not ${typeof U}`)}return D&&(N=gd.mod(N,K)),c(N),N}let A=new Map;function w(U){if(!(U instanceof M))throw new Error("ProjectivePoint expected")}class M{constructor(_,T,D){if(this.px=_,this.py=T,this.pz=D,_==null||!n.isValid(_))throw new Error("x required");if(T==null||!n.isValid(T))throw new Error("y required");if(D==null||!n.isValid(D))throw new Error("z required")}static fromAffine(_){let{x:T,y:D}=_||{};if(!_||!n.isValid(T)||!n.isValid(D))throw new Error("invalid affine point");if(_ instanceof M)throw new Error("projective point not allowed");let K=N=>n.eql(N,n.ZERO);return K(T)&&K(D)?M.ZERO:new M(T,D,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(_){let T=n.invertBatch(_.map(D=>D.pz));return _.map((D,K)=>D.toAffine(T[K])).map(M.fromAffine)}static fromHex(_){let T=M.fromAffine(r((0,Mi.ensureBytes)("pointHex",_)));return T.assertValidity(),T}static fromPrivateKey(_){return M.BASE.multiply(g(_))}_setWindowSize(_){this._WINDOW_SIZE=_,A.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint)return;throw new Error("bad point: ZERO")}let{x:_,y:T}=this.toAffine();if(!n.isValid(_)||!n.isValid(T))throw new Error("bad point: x or y not FE");let D=n.sqr(T),K=o(_);if(!n.eql(D,K))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){let{y:_}=this.toAffine();if(n.isOdd)return!n.isOdd(_);throw new Error("Field doesn't support isOdd")}equals(_){w(_);let{px:T,py:D,pz:K}=this,{px:N,py:Z,pz:$}=_,F=n.eql(n.mul(T,$),n.mul(N,K)),Y=n.eql(n.mul(D,$),n.mul(Z,K));return F&&Y}negate(){return new M(this.px,n.neg(this.py),this.pz)}double(){let{a:_,b:T}=t,D=n.mul(T,xu),{px:K,py:N,pz:Z}=this,$=n.ZERO,F=n.ZERO,Y=n.ZERO,G=n.mul(K,K),ue=n.mul(N,N),E=n.mul(Z,Z),d=n.mul(K,N);return d=n.add(d,d),Y=n.mul(K,Z),Y=n.add(Y,Y),$=n.mul(_,Y),F=n.mul(D,E),F=n.add($,F),$=n.sub(ue,F),F=n.add(ue,F),F=n.mul($,F),$=n.mul(d,$),Y=n.mul(D,Y),E=n.mul(_,E),d=n.sub(G,E),d=n.mul(_,d),d=n.add(d,Y),Y=n.add(G,G),G=n.add(Y,G),G=n.add(G,E),G=n.mul(G,d),F=n.add(F,G),E=n.mul(N,Z),E=n.add(E,E),G=n.mul(E,d),$=n.sub($,G),Y=n.mul(E,ue),Y=n.add(Y,Y),Y=n.add(Y,Y),new M($,F,Y)}add(_){w(_);let{px:T,py:D,pz:K}=this,{px:N,py:Z,pz:$}=_,F=n.ZERO,Y=n.ZERO,G=n.ZERO,ue=t.a,E=n.mul(t.b,xu),d=n.mul(T,N),b=n.mul(D,Z),l=n.mul(K,$),s=n.add(T,D),a=n.add(N,Z);s=n.mul(s,a),a=n.add(d,b),s=n.sub(s,a),a=n.add(T,K);let m=n.add(N,$);return a=n.mul(a,m),m=n.add(d,l),a=n.sub(a,m),m=n.add(D,K),F=n.add(Z,$),m=n.mul(m,F),F=n.add(b,l),m=n.sub(m,F),G=n.mul(ue,a),F=n.mul(E,l),G=n.add(F,G),F=n.sub(b,G),G=n.add(b,G),Y=n.mul(F,G),b=n.add(d,d),b=n.add(b,d),l=n.mul(ue,l),a=n.mul(E,a),b=n.add(b,l),l=n.sub(d,l),l=n.mul(ue,l),a=n.add(a,l),d=n.mul(b,a),Y=n.add(Y,d),d=n.mul(m,a),F=n.mul(s,F),F=n.sub(F,d),d=n.mul(s,b),G=n.mul(m,G),G=n.add(G,d),new M(F,Y,G)}subtract(_){return this.add(_.negate())}is0(){return this.equals(M.ZERO)}wNAF(_){return x.wNAFCached(this,A,_,T=>{let D=n.invertBatch(T.map(K=>K.pz));return T.map((K,N)=>K.toAffine(D[N])).map(M.fromAffine)})}multiplyUnsafe(_){let T=M.ZERO;if(_===ti)return T;if(c(_),_===un)return this;let{endo:D}=t;if(!D)return x.unsafeLadder(this,_);let{k1neg:K,k1:N,k2neg:Z,k2:$}=D.splitScalar(_),F=T,Y=T,G=this;for(;N>ti||$>ti;)N&un&&(F=F.add(G)),$&un&&(Y=Y.add(G)),G=G.double(),N>>=un,$>>=un;return K&&(F=F.negate()),Z&&(Y=Y.negate()),Y=new M(n.mul(Y.px,D.beta),Y.py,Y.pz),F.add(Y)}multiply(_){c(_);let T=_,D,K,{endo:N}=t;if(N){let{k1neg:Z,k1:$,k2neg:F,k2:Y}=N.splitScalar(T),{p:G,f:ue}=this.wNAF($),{p:E,f:d}=this.wNAF(Y);G=x.constTimeNegate(Z,G),E=x.constTimeNegate(F,E),E=new M(n.mul(E.px,N.beta),E.py,E.pz),D=G.add(E),K=ue.add(d)}else{let{p:Z,f:$}=this.wNAF(T);D=Z,K=$}return M.normalizeZ([D,K])[0]}multiplyAndAddUnsafe(_,T,D){let K=M.BASE,N=($,F)=>F===ti||F===un||!$.equals(K)?$.multiplyUnsafe(F):$.multiply(F),Z=N(this,T).add(N(_,D));return Z.is0()?void 0:Z}toAffine(_){let{px:T,py:D,pz:K}=this,N=this.is0();_==null&&(_=N?n.ONE:n.inv(K));let Z=n.mul(T,_),$=n.mul(D,_),F=n.mul(K,_);if(N)return{x:n.ZERO,y:n.ZERO};if(!n.eql(F,n.ONE))throw new Error("invZ was invalid");return{x:Z,y:$}}isTorsionFree(){let{h:_,isTorsionFree:T}=t;if(_===un)return!0;if(T)return T(M,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:_,clearCofactor:T}=t;return _===un?this:T?T(M,this):this.multiplyUnsafe(t.h)}toRawBytes(_=!0){return this.assertValidity(),i(M,this,_)}toHex(_=!0){return yn.bytesToHex(this.toRawBytes(_))}}M.BASE=new M(t.Gx,t.Gy,n.ONE),M.ZERO=new M(n.ZERO,n.ONE,n.ZERO);let P=t.nBitLength,x=(0,Cc.wNAF)(M,t.endo?Math.ceil(P/2):P);return{CURVE:t,ProjectivePoint:M,normPrivateKeyToScalar:g,weierstrassEquation:o,isWithinCurveOrder:f}}Zt.weierstrassPoints=t1;function w6(e){let t=(0,Cc.validateBasic)(e);return yn.validateObject(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function k6(e){let t=w6(e),{Fp:n,n:i}=t,r=n.BYTES+1,o=2*n.BYTES+1;function f(a){return ti<a&&a<n.ORDER}function c(a){return gd.mod(a,i)}function g(a){return gd.invert(a,i)}let{ProjectivePoint:A,normPrivateKeyToScalar:w,weierstrassEquation:M,isWithinCurveOrder:P}=t1({...t,toBytes(a,m,y){let h=m.toAffine(),u=n.toBytes(h.x),v=yn.concatBytes;return y?v(Uint8Array.from([m.hasEvenY()?2:3]),u):v(Uint8Array.from([4]),u,n.toBytes(h.y))},fromBytes(a){let m=a.length,y=a[0],h=a.subarray(1);if(m===r&&(y===2||y===3)){let u=yn.bytesToNumberBE(h);if(!f(u))throw new Error("Point is not on curve");let v=M(u),k=n.sqrt(v),p=(k&un)===un;return(y&1)===1!==p&&(k=n.neg(k)),{x:u,y:k}}else if(m===o&&y===4){let u=n.fromBytes(h.subarray(0,n.BYTES)),v=n.fromBytes(h.subarray(n.BYTES,2*n.BYTES));return{x:u,y:v}}else throw new Error(`Point of length ${m} was invalid. Expected ${r} compressed bytes or ${o} uncompressed bytes`)}}),x=a=>yn.bytesToHex(yn.numberToBytesBE(a,t.nByteLength));function U(a){let m=i>>un;return a>m}function _(a){return U(a)?c(-a):a}let T=(a,m,y)=>yn.bytesToNumberBE(a.slice(m,y));class D{constructor(m,y,h){this.r=m,this.s=y,this.recovery=h,this.assertValidity()}static fromCompact(m){let y=t.nByteLength;return m=(0,Mi.ensureBytes)("compactSignature",m,y*2),new D(T(m,0,y),T(m,y,2*y))}static fromDER(m){let{r:y,s:h}=Zt.DER.toSig((0,Mi.ensureBytes)("DER",m));return new D(y,h)}assertValidity(){if(!P(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!P(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(m){return new D(this.r,this.s,m)}recoverPublicKey(m){let{r:y,s:h,recovery:u}=this,v=Y((0,Mi.ensureBytes)("msgHash",m));if(u==null||![0,1,2,3].includes(u))throw new Error("recovery id invalid");let k=u===2||u===3?y+t.n:y;if(k>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");let p=(u&1)===0?"02":"03",I=A.fromHex(p+x(k)),W=g(k),V=c(-v*W),X=c(h*W),de=A.BASE.multiplyAndAddUnsafe(I,V,X);if(!de)throw new Error("point at infinify");return de.assertValidity(),de}hasHighS(){return U(this.s)}normalizeS(){return this.hasHighS()?new D(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return yn.hexToBytes(this.toDERHex())}toDERHex(){return Zt.DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return yn.hexToBytes(this.toCompactHex())}toCompactHex(){return x(this.r)+x(this.s)}}let K={isValidPrivateKey(a){try{return w(a),!0}catch{return!1}},normPrivateKeyToScalar:w,randomPrivateKey:()=>{let a=t.randomBytes(n.BYTES+8),m=gd.hashToPrivateScalar(a,i);return yn.numberToBytesBE(m,t.nByteLength)},precompute(a=8,m=A.BASE){return m._setWindowSize(a),m.multiply(BigInt(3)),m}};function N(a,m=!0){return A.fromPrivateKey(a).toRawBytes(m)}function Z(a){let m=a instanceof Uint8Array,y=typeof a=="string",h=(m||y)&&a.length;return m?h===r||h===o:y?h===2*r||h===2*o:a instanceof A}function $(a,m,y=!0){if(Z(a))throw new Error("first arg must be private key");if(!Z(m))throw new Error("second arg must be public key");return A.fromHex(m).multiply(w(a)).toRawBytes(y)}let F=t.bits2int||function(a){let m=yn.bytesToNumberBE(a),y=a.length*8-t.nBitLength;return y>0?m>>BigInt(y):m},Y=t.bits2int_modN||function(a){return c(F(a))},G=yn.bitMask(t.nBitLength);function ue(a){if(typeof a!="bigint")throw new Error("bigint expected");if(!(ti<=a&&a<G))throw new Error(`bigint expected < 2^${t.nBitLength}`);return yn.numberToBytesBE(a,t.nByteLength)}function E(a,m,y=d){if(["recovered","canonical"].some(pe=>pe in y))throw new Error("sign() legacy options not supported");let{hash:h,randomBytes:u}=t,{lowS:v,prehash:k,extraEntropy:p}=y;v==null&&(v=!0),a=(0,Mi.ensureBytes)("msgHash",a),k&&(a=(0,Mi.ensureBytes)("prehashed msgHash",h(a)));let I=Y(a),W=w(m),V=[ue(W),ue(I)];if(p!=null){let pe=p===!0?u(n.BYTES):p;V.push((0,Mi.ensureBytes)("extraEntropy",pe,n.BYTES))}let X=yn.concatBytes(...V),de=I;function le(pe){let En=F(pe);if(!P(En))return;let be=g(En),ye=A.BASE.multiply(En).toAffine(),Ir=c(ye.x);if(Ir===ti)return;let we=c(be*c(de+Ir*W));if(we===ti)return;let xe=(ye.x===Ir?0:2)|Number(ye.y&un),Vi=we;return v&&U(we)&&(Vi=_(we),xe^=1),new D(Ir,Vi,xe)}return{seed:X,k2sig:le}}let d={lowS:t.lowS,prehash:!1},b={lowS:t.lowS,prehash:!1};function l(a,m,y=d){let{seed:h,k2sig:u}=E(a,m,y),v=t;return yn.createHmacDrbg(v.hash.outputLen,v.nByteLength,v.hmac)(h,u)}A.BASE._setWindowSize(8);function s(a,m,y,h=b){let u=a;if(m=(0,Mi.ensureBytes)("msgHash",m),y=(0,Mi.ensureBytes)("publicKey",y),"strict"in h)throw new Error("options.strict was renamed to lowS");let{lowS:v,prehash:k}=h,p,I;try{if(typeof u=="string"||u instanceof Uint8Array)try{p=D.fromDER(u)}catch(ye){if(!(ye instanceof Zt.DER.Err))throw ye;p=D.fromCompact(u)}else if(typeof u=="object"&&typeof u.r=="bigint"&&typeof u.s=="bigint"){let{r:ye,s:Ir}=u;p=new D(ye,Ir)}else throw new Error("PARSE");I=A.fromHex(y)}catch(ye){if(ye.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(v&&p.hasHighS())return!1;k&&(m=t.hash(m));let{r:W,s:V}=p,X=Y(m),de=g(V),le=c(X*de),pe=c(W*de),En=A.BASE.multiplyAndAddUnsafe(I,le,pe)?.toAffine();return En?c(En.x)===W:!1}return{CURVE:t,getPublicKey:N,getSharedSecret:$,sign:l,verify:s,ProjectivePoint:A,Signature:D,utils:K}}Zt.weierstrass=k6;function n1(e,t){let n=e.ORDER,i=ti;for(let U=n-un;U%go===ti;U/=go)i+=un;let r=i,o=go<<r-un-un,f=o*go,c=(n-un)/f,g=(c-un)/go,A=f-un,w=o,M=e.pow(t,c),P=e.pow(t,(c+un)/go),x=(U,_)=>{let T=M,D=e.pow(_,A),K=e.sqr(D);K=e.mul(K,_);let N=e.mul(U,K);N=e.pow(N,g),N=e.mul(N,D),D=e.mul(N,_),K=e.mul(N,U);let Z=e.mul(K,D);N=e.pow(Z,w);let $=e.eql(N,e.ONE);D=e.mul(K,P),N=e.mul(Z,T),K=e.cmov(D,K,$),Z=e.cmov(N,Z,$);for(let F=r;F>un;F--){let Y=F-go;Y=go<<Y-un;let G=e.pow(Z,Y),ue=e.eql(G,e.ONE);D=e.mul(K,T),T=e.mul(T,T),G=e.mul(Z,T),K=e.cmov(D,K,ue),Z=e.cmov(G,Z,ue)}return{isValid:$,value:K}};if(e.ORDER%jy===xu){let U=(e.ORDER-xu)/jy,_=e.sqrt(e.neg(t));x=(T,D)=>{let K=e.sqr(D),N=e.mul(T,D);K=e.mul(K,N);let Z=e.pow(K,U);Z=e.mul(Z,N);let $=e.mul(Z,_),F=e.mul(e.sqr(Z),D),Y=e.eql(F,T),G=e.cmov($,Z,Y);return{isValid:Y,value:G}}}return x}Zt.SWUFpSqrtRatio=n1;function S6(e,t){if(gd.validateField(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");let n=n1(e,t.Z);if(!e.isOdd)throw new Error("Fp.isOdd is not implemented!");return i=>{let r,o,f,c,g,A,w,M;r=e.sqr(i),r=e.mul(r,t.Z),o=e.sqr(r),o=e.add(o,r),f=e.add(o,e.ONE),f=e.mul(f,t.B),c=e.cmov(t.Z,e.neg(o),!e.eql(o,e.ZERO)),c=e.mul(c,t.A),o=e.sqr(f),A=e.sqr(c),g=e.mul(A,t.A),o=e.add(o,g),o=e.mul(o,f),A=e.mul(A,c),g=e.mul(A,t.B),o=e.add(o,g),w=e.mul(r,f);let{isValid:P,value:x}=n(o,A);M=e.mul(r,i),M=e.mul(M,x),w=e.cmov(w,f,P),M=e.cmov(M,x,P);let U=e.isOdd(i)===e.isOdd(M);return M=e.cmov(e.neg(M),M,U),w=e.div(w,c),{x:w,y:M}}}Zt.mapToCurveSimpleSWU=S6});var o1=L(Or=>{"use strict";B();R();Object.defineProperty(Or,"__esModule",{value:!0});Or.createHasher=Or.isogenyMap=Or.hash_to_field=Or.expand_message_xof=Or.expand_message_xmd=void 0;var _6=As(),ni=Oi();function I6(e){if(e instanceof Uint8Array)return e;if(typeof e=="string")return(0,ni.utf8ToBytes)(e);throw new Error("DST must be Uint8Array or string")}var x6=ni.bytesToNumberBE;function yo(e,t){if(e<0||e>=1<<8*t)throw new Error(`bad I2OSP call: value=${e} length=${t}`);let n=Array.from({length:t}).fill(0);for(let i=t-1;i>=0;i--)n[i]=e&255,e>>>=8;return new Uint8Array(n)}function P6(e,t){let n=new Uint8Array(e.length);for(let i=0;i<e.length;i++)n[i]=e[i]^t[i];return n}function yd(e){if(!(e instanceof Uint8Array))throw new Error("Uint8Array expected")}function Tc(e){if(!Number.isSafeInteger(e))throw new Error("number expected")}function r1(e,t,n,i){yd(e),yd(t),Tc(n),t.length>255&&(t=i((0,ni.concatBytes)((0,ni.utf8ToBytes)("H2C-OVERSIZE-DST-"),t)));let{outputLen:r,blockLen:o}=i,f=Math.ceil(n/r);if(f>255)throw new Error("Invalid xmd length");let c=(0,ni.concatBytes)(t,yo(t.length,1)),g=yo(0,o),A=yo(n,2),w=new Array(f),M=i((0,ni.concatBytes)(g,e,A,yo(0,1),c));w[0]=i((0,ni.concatBytes)(M,yo(1,1),c));for(let x=1;x<=f;x++){let U=[P6(M,w[x-1]),yo(x+1,1),c];w[x]=i((0,ni.concatBytes)(...U))}return(0,ni.concatBytes)(...w).slice(0,n)}Or.expand_message_xmd=r1;function i1(e,t,n,i,r){if(yd(e),yd(t),Tc(n),t.length>255){let o=Math.ceil(2*i/8);t=r.create({dkLen:o}).update((0,ni.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(t).digest()}if(n>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return r.create({dkLen:n}).update(e).update(yo(n,2)).update(t).update(yo(t.length,1)).digest()}Or.expand_message_xof=i1;function Ec(e,t,n){(0,ni.validateObject)(n,{DST:"string",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});let{p:i,k:r,m:o,hash:f,expand:c,DST:g}=n;yd(e),Tc(t);let A=I6(g),w=i.toString(2).length,M=Math.ceil((w+r)/8),P=t*o*M,x;if(c==="xmd")x=r1(e,A,P,f);else if(c==="xof")x=i1(e,A,P,r,f);else if(c==="_internal_pass")x=e;else throw new Error('expand must be "xmd" or "xof"');let U=new Array(t);for(let _=0;_<t;_++){let T=new Array(o);for(let D=0;D<o;D++){let K=M*(D+_*o),N=x.subarray(K,K+M);T[D]=(0,_6.mod)(x6(N),i)}U[_]=T}return U}Or.hash_to_field=Ec;function U6(e,t){let n=t.map(i=>Array.from(i).reverse());return(i,r)=>{let[o,f,c,g]=n.map(A=>A.reduce((w,M)=>e.add(e.mul(w,i),M)));return i=e.div(o,f),r=e.mul(r,e.div(c,g)),{x:i,y:r}}}Or.isogenyMap=U6;function B6(e,t,n){if(typeof t!="function")throw new Error("mapToCurve() must be defined");return{hashToCurve(i,r){let o=Ec(i,2,{...n,DST:n.DST,...r}),f=e.fromAffine(t(o[0])),c=e.fromAffine(t(o[1])),g=f.add(c).clearCofactor();return g.assertValidity(),g},encodeToCurve(i,r){let o=Ec(i,1,{...n,DST:n.encodeDST,...r}),f=e.fromAffine(t(o[0])).clearCofactor();return f.assertValidity(),f}}}Or.createHasher=B6});var Oc=L(ua=>{"use strict";B();R();Object.defineProperty(ua,"__esModule",{value:!0});ua.createCurve=ua.getHash=void 0;var R6=rd(),s1=$n(),C6=Pu();function a1(e){return{hash:e,hmac:(t,...n)=>(0,R6.hmac)(e,t,(0,s1.concatBytes)(...n)),randomBytes:s1.randomBytes}}ua.getHash=a1;function E6(e,t){let n=i=>(0,C6.weierstrass)({...e,...a1(i)});return Object.freeze({...n(t),create:n})}ua.createCurve=E6});var y1=L(bn=>{"use strict";B();R();var T6=bn&&bn.__createBinding||(Object.create?function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]}),O6=bn&&bn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),D6=bn&&bn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&T6(t,e,n);return O6(t,e),t},Dc;Object.defineProperty(bn,"__esModule",{value:!0});bn.encodeToCurve=bn.hashToCurve=bn.schnorr=bn.secp256k1=void 0;var Uu=Ns(),N6=$n(),Ln=As(),L6=Pu(),Yn=Oi(),f1=D6(o1()),q6=Oc(),Eu=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Bu=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),c1=BigInt(1),Ru=BigInt(2),d1=(e,t)=>(e+t/Ru)/t;function l1(e){let t=Eu,n=BigInt(3),i=BigInt(6),r=BigInt(11),o=BigInt(22),f=BigInt(23),c=BigInt(44),g=BigInt(88),A=e*e*e%t,w=A*A*e%t,M=(0,Ln.pow2)(w,n,t)*w%t,P=(0,Ln.pow2)(M,n,t)*w%t,x=(0,Ln.pow2)(P,Ru,t)*A%t,U=(0,Ln.pow2)(x,r,t)*x%t,_=(0,Ln.pow2)(U,o,t)*U%t,T=(0,Ln.pow2)(_,c,t)*_%t,D=(0,Ln.pow2)(T,g,t)*T%t,K=(0,Ln.pow2)(D,c,t)*_%t,N=(0,Ln.pow2)(K,n,t)*w%t,Z=(0,Ln.pow2)(N,f,t)*U%t,$=(0,Ln.pow2)(Z,i,t)*A%t,F=(0,Ln.pow2)($,Ru,t);if(!bo.eql(bo.sqr(F),e))throw new Error("Cannot find square root");return F}var bo=(0,Ln.Field)(Eu,void 0,void 0,{sqrt:l1});bn.secp256k1=(0,q6.createCurve)({a:BigInt(0),b:BigInt(7),Fp:bo,n:Bu,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{let t=Bu,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),i=-c1*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),r=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=n,f=BigInt("0x100000000000000000000000000000000"),c=d1(o*e,t),g=d1(-i*e,t),A=(0,Ln.mod)(e-c*n-g*r,t),w=(0,Ln.mod)(-c*i-g*o,t),M=A>f,P=w>f;if(M&&(A=t-A),P&&(w=t-w),A>f||w>f)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:M,k1:A,k2neg:P,k2:w}}}},Uu.sha256);var Tu=BigInt(0),m1=e=>typeof e=="bigint"&&Tu<e&&e<Eu,F6=e=>typeof e=="bigint"&&Tu<e&&e<Bu,u1={};function Cu(e,...t){let n=u1[e];if(n===void 0){let i=(0,Uu.sha256)(Uint8Array.from(e,r=>r.charCodeAt(0)));n=(0,Yn.concatBytes)(i,i),u1[e]=n}return(0,Uu.sha256)((0,Yn.concatBytes)(n,...t))}var Fc=e=>e.toRawBytes(!0).slice(1),Lc=e=>(0,Yn.numberToBytesBE)(e,32),Nc=e=>(0,Ln.mod)(e,Eu),bd=e=>(0,Ln.mod)(e,Bu),Hc=bn.secp256k1.ProjectivePoint,H6=(e,t,n)=>Hc.BASE.multiplyAndAddUnsafe(e,t,n);function qc(e){let t=bn.secp256k1.utils.normPrivateKeyToScalar(e),n=Hc.fromPrivateKey(t);return{scalar:n.hasEvenY()?t:bd(-t),bytes:Fc(n)}}function p1(e){if(!m1(e))throw new Error("bad x: need 0 < x < p");let t=Nc(e*e),n=Nc(t*e+BigInt(7)),i=l1(n);i%Ru!==Tu&&(i=Nc(-i));let r=new Hc(e,i,c1);return r.assertValidity(),r}function h1(...e){return bd((0,Yn.bytesToNumberBE)(Cu("BIP0340/challenge",...e)))}function K6(e){return qc(e).bytes}function $6(e,t,n=(0,N6.randomBytes)(32)){let i=(0,Yn.ensureBytes)("message",e),{bytes:r,scalar:o}=qc(t),f=(0,Yn.ensureBytes)("auxRand",n,32),c=Lc(o^(0,Yn.bytesToNumberBE)(Cu("BIP0340/aux",f))),g=Cu("BIP0340/nonce",c,r,i),A=bd((0,Yn.bytesToNumberBE)(g));if(A===Tu)throw new Error("sign failed: k is zero");let{bytes:w,scalar:M}=qc(A),P=h1(w,r,i),x=new Uint8Array(64);if(x.set(w,0),x.set(Lc(bd(M+P*o)),32),!g1(x,i,r))throw new Error("sign: Invalid signature produced");return x}function g1(e,t,n){let i=(0,Yn.ensureBytes)("signature",e,64),r=(0,Yn.ensureBytes)("message",t),o=(0,Yn.ensureBytes)("publicKey",n,32);try{let f=p1((0,Yn.bytesToNumberBE)(o)),c=(0,Yn.bytesToNumberBE)(i.subarray(0,32));if(!m1(c))return!1;let g=(0,Yn.bytesToNumberBE)(i.subarray(32,64));if(!F6(g))return!1;let A=h1(Lc(c),Fc(f),r),w=H6(f,g,bd(-A));return!(!w||!w.hasEvenY()||w.toAffine().x!==c)}catch{return!1}}bn.schnorr={getPublicKey:K6,sign:$6,verify:g1,utils:{randomPrivateKey:bn.secp256k1.utils.randomPrivateKey,lift_x:p1,pointToBytes:Fc,numberToBytesBE:Yn.numberToBytesBE,bytesToNumberBE:Yn.bytesToNumberBE,taggedHash:Cu,mod:Ln.mod}};var W6=f1.isogenyMap(bo,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(e=>e.map(t=>BigInt(t)))),J6=(0,L6.mapToCurveSimpleSWU)(bo,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:bo.create(BigInt("-11"))});Dc=f1.createHasher(bn.secp256k1.ProjectivePoint,e=>{let{x:t,y:n}=J6(bo.create(e[0]));return W6(t,n)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:bo.ORDER,m:1,k:128,expand:"xmd",hash:Uu.sha256}),bn.hashToCurve=Dc.hashToCurve,bn.encodeToCurve=Dc.encodeToCurve});var A1=L(vo=>{"use strict";B();R();Object.defineProperty(vo,"__esModule",{value:!0});vo.poseidon=vo.splitConstants=vo.validateOpts=void 0;var b1=As();function v1(e){let{Fp:t}=e;(0,b1.validateField)(t);for(let g of["t","roundsFull","roundsPartial"])if(typeof e[g]!="number"||!Number.isSafeInteger(e[g]))throw new Error(`Poseidon: invalid param ${g}=${e[g]} (${typeof e[g]})`);if(e.reversePartialPowIdx!==void 0&&typeof e.reversePartialPowIdx!="boolean")throw new Error(`Poseidon: invalid param reversePartialPowIdx=${e.reversePartialPowIdx}`);let n=e.sboxPower;if(n===void 0&&(n=5),typeof n!="number"||!Number.isSafeInteger(n))throw new Error(`Poseidon wrong sboxPower=${n}`);let i=BigInt(n),r=g=>(0,b1.FpPow)(t,g,i);if(n===3?r=g=>t.mul(t.sqrN(g),g):n===5&&(r=g=>t.mul(t.sqrN(t.sqrN(g)),g)),e.roundsFull%2!==0)throw new Error(`Poseidon roundsFull is not even: ${e.roundsFull}`);let o=e.roundsFull+e.roundsPartial;if(!Array.isArray(e.roundConstants)||e.roundConstants.length!==o)throw new Error("Poseidon: wrong round constants");let f=e.roundConstants.map(g=>{if(!Array.isArray(g)||g.length!==e.t)throw new Error(`Poseidon wrong round constants: ${g}`);return g.map(A=>{if(typeof A!="bigint"||!t.isValid(A))throw new Error(`Poseidon wrong round constant=${A}`);return t.create(A)})});if(!Array.isArray(e.mds)||e.mds.length!==e.t)throw new Error("Poseidon: wrong MDS matrix");let c=e.mds.map(g=>{if(!Array.isArray(g)||g.length!==e.t)throw new Error(`Poseidon MDS matrix row: ${g}`);return g.map(A=>{if(typeof A!="bigint")throw new Error(`Poseidon MDS matrix value=${A}`);return t.create(A)})});return Object.freeze({...e,rounds:o,sboxFn:r,roundConstants:f,mds:c})}vo.validateOpts=v1;function z6(e,t){if(typeof t!="number")throw new Error("poseidonSplitConstants: wrong t");if(!Array.isArray(e)||e.length%t)throw new Error("poseidonSplitConstants: wrong rc");let n=[],i=[];for(let r=0;r<e.length;r++)i.push(e[r]),i.length===t&&(n.push(i),i=[]);return n}vo.splitConstants=z6;function Z6(e){let{t,Fp:n,rounds:i,sboxFn:r,reversePartialPowIdx:o}=v1(e),f=Math.floor(e.roundsFull/2),c=o?t-1:0,g=(w,M,P)=>(w=w.map((x,U)=>n.add(x,e.roundConstants[P][U])),M?w=w.map(x=>r(x)):w[c]=r(w[c]),w=e.mds.map(x=>x.reduce((U,_,T)=>n.add(U,n.mulN(_,w[T])),n.ZERO)),w),A=function(M){if(!Array.isArray(M)||M.length!==t)throw new Error(`Poseidon: wrong values (expected array of bigints with length ${t})`);M=M.map(x=>{if(typeof x!="bigint")throw new Error(`Poseidon: wrong value=${x} (${typeof x})`);return n.create(x)});let P=0;for(let x=0;x<f;x++)M=g(M,!0,P++);for(let x=0;x<e.roundsPartial;x++)M=g(M,!1,P++);for(let x=0;x<f;x++)M=g(M,!0,P++);if(P!==i)throw new Error(`Poseidon: wrong number of rounds: last round=${P}, total=${i}`);return M};return A.roundConstants=e.roundConstants,A}vo.poseidon=Z6});var E1=L(se=>{"use strict";B();R();var V6=se&&se.__createBinding||(Object.create?function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]}),G6=se&&se.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Y6=se&&se.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&V6(t,e,n);return G6(t,e),t};Object.defineProperty(se,"__esModule",{value:!0});se.poseidonHashMany=se.poseidonHashSingle=se.poseidonHashFunc=se.poseidonHash=se.poseidonSmall=se.poseidonCreate=se.poseidonBasic=se._poseidonMDS=se.Fp251=se.Fp253=se.keccak=se.computeHashOnElements=se.hashChain=se.pedersen=se.getAccountPath=se.ethSigToPrivate=se.getStarkKey=se.grindKey=se.utils=se.Signature=se.ProjectivePoint=se.CURVE=se.verify=se.sign=se.getSharedSecret=se.getPublicKey=se._starkCurve=void 0;var X6=Gd(),Wc=Ns(),Q6=$n(),ws=As(),j6=A1(),e_=Pu(),Xn=Y6(Oi()),t_=Oc(),Du=BigInt("3618502788666131213697322783095070105526743751716087489154079457884512865583"),k1=252;function M1(e){for(;e[0]===0;)e=e.subarray(1);let t=e.length*8-k1,n=Xn.bytesToNumberBE(e);return t>0?n>>BigInt(t):n}function S1(e){return typeof e=="string"&&(e=zc(e),e.length&1&&(e="0"+e)),Xn.hexToBytes(e)}var ks=(0,e_.weierstrass)({a:BigInt(1),b:BigInt("3141592653589793238462643383279502884197169399375105820974944592307816406665"),Fp:(0,ws.Field)(BigInt("0x800000000000011000000000000000000000000000000000000000000000001")),n:Du,nBitLength:k1,Gx:BigInt("874739451078007766457464989774322083649278607533249481151382481072868806602"),Gy:BigInt("152666792071518830868575557812948353041420400780739481342941381225525861407"),h:BigInt(1),lowS:!1,...(0,t_.getHash)(Wc.sha256),bits2int:M1,bits2int_modN:e=>{let t=Xn.bytesToNumberBE(e).toString(16);return t.length===63&&(e=S1(t+"0")),(0,ws.mod)(M1(e),Du)}});se._starkCurve=ks;function Ms(e){return Xn.ensureBytes("",typeof e=="string"?S1(e):e)}function Jc(e){return Xn.bytesToHex(Ms(e)).padStart(64,"0")}function _1(e,t=!1){return ks.getPublicKey(Jc(e),t)}se.getPublicKey=_1;function n_(e,t){return ks.getSharedSecret(Jc(e),t)}se.getSharedSecret=n_;function r_(e,t,n){return ks.sign(Ms(e),Jc(t),n)}se.sign=r_;function i_(e,t,n){let i=e instanceof I1?e:Ms(e);return ks.verify(i,Ms(t),Ms(n))}se.verify=i_;var{CURVE:o_,ProjectivePoint:fa,Signature:I1,utils:s_}=ks;se.CURVE=o_;se.ProjectivePoint=fa;se.Signature=I1;se.utils=s_;function x1(e){return`0x${Xn.bytesToHex(e.subarray(1)).replace(/^0+/gm,"")}`}function zc(e){return e.replace(/^0x/i,"")}function a_(e){return`0x${e.toString(16)}`}function P1(e){let t=Ms(e),n=2n**256n,i=n-(0,ws.mod)(n,Du);for(let r=0;;r++){let o=Kc(Xn.concatBytes(t,Xn.numberToVarBytesBE(BigInt(r))));if(o<i)return(0,ws.mod)(o,Du).toString(16);if(r===1e5)throw new Error("grindKey is broken: tried 100k vals")}}se.grindKey=P1;function d_(e){return x1(_1(e,!0))}se.getStarkKey=d_;function u_(e){if(e=zc(e),e.length!==130)throw new Error("Wrong ethereum signature");return P1(e.substring(0,64))}se.ethSigToPrivate=u_;var f_=2n**31n-1n,Ou=e=>Number(e&f_);function c_(e,t,n,i){let r=Ou(Kc(e)),o=Ou(Kc(t)),f=Xn.hexToNumber(zc(n));return`m/2645'/${r}'/${o}'/${Ou(f)}'/${Ou(f>>31n)}'/${i}`}se.getAccountPath=c_;var vd=[new fa(2089986280348253421170679821480865132823066470938446095505822317253594081284n,1713931329540660377023406109199410414810705867260802078187082345529207694986n,1n),new fa(996781205833008774514500082376783249102396023663454813447423147977397232763n,1668503676786377725805489344771023921079126552019160156920634619255970485781n,1n),new fa(2251563274489750535117886426533222435294046428347329203627021249169616184184n,1798716007562728905295480679789526322175868328062420237419143593021674992973n,1n),new fa(2138414695194151160943305727036575959195309218611738193261179310511854807447n,113410276730064486255102093846540133784865286929052426931474106396135072156n,1n),new fa(2379962749567351885752724891227938183011949129833673362440656643086021394946n,776496453633298175483985398648758586525933812536653089401905292063708816422n,1n)];function U1(e,t){let n=[],i=e;for(let r=0;r<248;r++)n.push(i),i=i.double();i=t;for(let r=0;r<4;r++)n.push(i),i=i.double();return n}var l_=U1(vd[1],vd[2]),m_=U1(vd[3],vd[4]);function B1(e){let t;if(typeof e=="bigint")t=e;else if(typeof e=="number"){if(!Number.isSafeInteger(e))throw new Error(`Invalid pedersenArg: ${e}`);t=BigInt(e)}else t=Xn.bytesToNumberBE(Ms(e));if(!(0n<=t&&t<ks.CURVE.Fp.ORDER))throw new Error(`PedersenArg should be 0 <= value < CURVE.P: ${t}`);return t}function w1(e,t,n){let i=B1(t);for(let r=0;r<252;r++){let o=n[r];if(o.equals(e))throw new Error("Same point");(i&1n)!==0n&&(e=e.add(o)),i>>=1n}return e}function Zc(e,t){let n=vd[0];return n=w1(n,e,l_),n=w1(n,t,m_),x1(n.toRawBytes(!0))}se.pedersen=Zc;function p_(e,t=Zc){if(!Array.isArray(e)||e.length<1)throw new Error("data should be array of at least 1 element");return e.length===1?a_(B1(e[0])):Array.from(e).reverse().reduce((n,i)=>t(i,n))}se.hashChain=p_;var h_=(e,t=Zc)=>[0,...e,e.length].reduce((n,i)=>t(n,i));se.computeHashOnElements=h_;var g_=Xn.bitMask(250),y_=e=>Xn.bytesToNumberBE((0,X6.keccak_256)(e))&g_;se.keccak=y_;var Kc=e=>Xn.bytesToNumberBE((0,Wc.sha256)(e));se.Fp253=(0,ws.Field)(BigInt("14474011154664525231415395255581126252639794253786371766033694892385558855681"));se.Fp251=(0,ws.Field)(BigInt("3618502788666131213697322783095070105623107215331596699973092056135872020481"));function $c(e,t,n){let i=e.fromBytes((0,Wc.sha256)((0,Q6.utf8ToBytes)(`${t}${n}`)));return e.create(i)}function R1(e,t,n,i=0){let r=[],o=[];for(let f=0;f<n;f++)r.push($c(e,`${t}x`,i*n+f)),o.push($c(e,`${t}y`,i*n+f));if(new Set([...r,...o]).size!==2*n)throw new Error("X and Y values are not distinct");return r.map(f=>o.map(c=>e.inv(e.sub(f,c))))}se._poseidonMDS=R1;var b_=[[3,1,1],[1,-1,1],[1,1,-2]].map(e=>e.map(BigInt));function Vc(e,t){if((0,ws.validateField)(e.Fp),!Number.isSafeInteger(e.rate)||!Number.isSafeInteger(e.capacity))throw new Error(`Wrong poseidon opts: ${e}`);let n=e.rate+e.capacity,i=e.roundsFull+e.roundsPartial,r=[];for(let f=0;f<i;f++){let c=[];for(let g=0;g<n;g++)c.push($c(e.Fp,"Hades",n*f+g));r.push(c)}let o=(0,j6.poseidon)({...e,t:n,sboxPower:3,reversePartialPowIdx:!0,mds:t,roundConstants:r});return o.m=n,o.rate=e.rate,o.capacity=e.capacity,o}se.poseidonBasic=Vc;function v_(e,t=0){let n=e.rate+e.capacity;if(!Number.isSafeInteger(t))throw new Error(`Wrong mdsAttempt=${t}`);return Vc(e,R1(e.Fp,"HadesMDS",n,t))}se.poseidonCreate=v_;se.poseidonSmall=Vc({Fp:se.Fp251,rate:2,capacity:1,roundsFull:8,roundsPartial:83},b_);function C1(e,t,n=se.poseidonSmall){return n([e,t,2n])[0]}se.poseidonHash=C1;function A_(e,t,n=se.poseidonSmall){return Xn.numberToVarBytesBE(C1(Xn.bytesToNumberBE(e),Xn.bytesToNumberBE(t),n))}se.poseidonHashFunc=A_;function M_(e,t=se.poseidonSmall){return t([e,0n,1n])[0]}se.poseidonHashSingle=M_;function w_(e,t=se.poseidonSmall){let{m:n,rate:i}=t;if(!Array.isArray(e))throw new Error("bigint array expected in values");let r=Array.from(e);for(r.push(1n);r.length%i!==0;)r.push(0n);let o=new Array(n).fill(0n);for(let f=0;f<r.length;f+=i){for(let c=0;c<i;c++)o[c]+=r[f+c];o=t(o)}return o[0]}se.poseidonHashMany=w_});var D1=L(Qn=>{"use strict";B();R();var k_=Qn&&Qn.__createBinding||(Object.create?function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]}),S_=Qn&&Qn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),T1=Qn&&Qn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&k_(t,e,n);return S_(t,e),t};Object.defineProperty(Qn,"__esModule",{value:!0});Qn.bytesToHex=Qn.hexToBytes=Qn.stark=Qn.secp256k1=void 0;Qn.secp256k1=T1(y1());Qn.stark=T1(E1());var O1=Oi();Object.defineProperty(Qn,"hexToBytes",{enumerable:!0,get:function(){return O1.hexToBytes}});Object.defineProperty(Qn,"bytesToHex",{enumerable:!0,get:function(){return O1.bytesToHex}})});var N1=L(jn=>{"use strict";B();R();var __=jn&&jn.__createBinding||(Object.create?function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]}),I_=jn&&jn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Nu=jn&&jn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&__(t,e,n);return I_(t,e),t};Object.defineProperty(jn,"__esModule",{value:!0});jn.schnorr=jn.p256=jn.ed25519=jn.secp256k1=void 0;jn.secp256k1=Nu(xy());jn.ed25519=Nu(Oy());jn.p256=Nu(qy());jn.schnorr=Nu(D1())});var q1=L(ca=>{"use strict";B();R();var x_=ca&&ca.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ca,"__esModule",{value:!0});ca.Decimal=void 0;var Ss=x_(Un()),L1=100,vn=class{static fromUserInput(t,n){vn.verifyFractionalDigits(n);let i=t.match(/[^0-9.]/);if(i)throw new Error(`Invalid character at position ${i.index+1}`);let r,o;if(t.search(/\./)===-1)r=t,o="";else{let c=t.split(".");switch(c.length){case 0:case 1:throw new Error("Fewer than two elements in split result. This must not happen here.");case 2:if(!c[1])throw new Error("Fractional part missing");r=c[0],o=c[1].replace(/0+$/,"");break;default:throw new Error("More than one separator found")}}if(o.length>n)throw new Error("Got more fractional digits than supported");let f=`${r}${o.padEnd(n,"0")}`;return new vn(f,n)}static fromAtomics(t,n){return vn.verifyFractionalDigits(n),new vn(t,n)}static zero(t){return vn.verifyFractionalDigits(t),new vn("0",t)}static one(t){return vn.verifyFractionalDigits(t),new vn("1"+"0".repeat(t),t)}static verifyFractionalDigits(t){if(!Number.isInteger(t))throw new Error("Fractional digits is not an integer");if(t<0)throw new Error("Fractional digits must not be negative");if(t>L1)throw new Error(`Fractional digits must not exceed ${L1}`)}static compare(t,n){if(t.fractionalDigits!==n.fractionalDigits)throw new Error("Fractional digits do not match");return t.data.atomics.cmp(new Ss.default(n.atomics))}get atomics(){return this.data.atomics.toString()}get fractionalDigits(){return this.data.fractionalDigits}constructor(t,n){this.data={atomics:new Ss.default(t),fractionalDigits:n}}toString(){let t=new Ss.default(10).pow(new Ss.default(this.data.fractionalDigits)),n=this.data.atomics.div(t),i=this.data.atomics.mod(t);if(i.isZero())return n.toString();{let o=i.toString().padStart(this.data.fractionalDigits,"0").replace(/0+$/,"");return`${n.toString()}.${o}`}}toFloatApproximation(){let t=Number(this.toString());if(Number.isNaN(t))throw new Error("Conversion to number failed");return t}plus(t){if(this.fractionalDigits!==t.fractionalDigits)throw new Error("Fractional digits do not match");let n=this.data.atomics.add(new Ss.default(t.atomics));return new vn(n.toString(),this.fractionalDigits)}minus(t){if(this.fractionalDigits!==t.fractionalDigits)throw new Error("Fractional digits do not match");let n=this.data.atomics.sub(new Ss.default(t.atomics));if(n.ltn(0))throw new Error("Difference must not be negative");return new vn(n.toString(),this.fractionalDigits)}multiply(t){let n=this.data.atomics.mul(new Ss.default(t.toString()));return new vn(n.toString(),this.fractionalDigits)}equals(t){return vn.compare(this,t)===0}isLessThan(t){return vn.compare(this,t)<0}isLessThanOrEqual(t){return vn.compare(this,t)<=0}isGreaterThan(t){return vn.compare(this,t)>0}isGreaterThanOrEqual(t){return vn.compare(this,t)>=0}};ca.Decimal=vn});var F1=L(Dr=>{"use strict";B();R();var P_=Dr&&Dr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Dr,"__esModule",{value:!0});Dr.Uint64=Dr.Uint53=Dr.Int53=Dr.Uint32=void 0;var Lu=P_(Un()),U_=new Lu.default("18446744073709551615",10,"be"),_s=class{static fromBigEndianBytes(t){return _s.fromBytes(t)}static fromBytes(t,n="be"){if(t.length!==4)throw new Error("Invalid input length. Expected 4 bytes.");for(let r=0;r<t.length;++r)if(!Number.isInteger(t[r])||t[r]>255||t[r]<0)throw new Error("Invalid value in byte. Found: "+t[r]);let i=n==="be"?t:Array.from(t).reverse();return new _s(i[0]*2**24+i[1]*2**16+i[2]*2**8+i[3])}static fromString(t){if(!t.match(/^[0-9]+$/))throw new Error("Invalid string format");return new _s(Number.parseInt(t,10))}constructor(t){if(Number.isNaN(t))throw new Error("Input is not a number");if(!Number.isInteger(t))throw new Error("Input is not an integer");if(t<0||t>4294967295)throw new Error("Input not in uint32 range: "+t.toString());this.data=t}toBytesBigEndian(){return new Uint8Array([Math.floor(this.data/2**24)&255,Math.floor(this.data/2**16)&255,Math.floor(this.data/2**8)&255,Math.floor(this.data/2**0)&255])}toBytesLittleEndian(){return new Uint8Array([Math.floor(this.data/2**0)&255,Math.floor(this.data/2**8)&255,Math.floor(this.data/2**16)&255,Math.floor(this.data/2**24)&255])}toNumber(){return this.data}toString(){return this.data.toString()}};Dr.Uint32=_s;var Is=class{static fromString(t){if(!t.match(/^-?[0-9]+$/))throw new Error("Invalid string format");return new Is(Number.parseInt(t,10))}constructor(t){if(Number.isNaN(t))throw new Error("Input is not a number");if(!Number.isInteger(t))throw new Error("Input is not an integer");if(t<Number.MIN_SAFE_INTEGER||t>Number.MAX_SAFE_INTEGER)throw new Error("Input not in int53 range: "+t.toString());this.data=t}toNumber(){return this.data}toString(){return this.data.toString()}};Dr.Int53=Is;var Ad=class{static fromString(t){let n=Is.fromString(t);return new Ad(n.toNumber())}constructor(t){let n=new Is(t);if(n.toNumber()<0)throw new Error("Input is negative");this.data=n}toNumber(){return this.data.toNumber()}toString(){return this.data.toString()}};Dr.Uint53=Ad;var Ao=class{static fromBytesBigEndian(t){return Ao.fromBytes(t)}static fromBytes(t,n="be"){if(t.length!==8)throw new Error("Invalid input length. Expected 8 bytes.");for(let r=0;r<t.length;++r)if(!Number.isInteger(t[r])||t[r]>255||t[r]<0)throw new Error("Invalid value in byte. Found: "+t[r]);let i=n==="be"?Array.from(t):Array.from(t).reverse();return new Ao(new Lu.default(i))}static fromString(t){if(!t.match(/^[0-9]+$/))throw new Error("Invalid string format");return new Ao(new Lu.default(t,10,"be"))}static fromNumber(t){if(Number.isNaN(t))throw new Error("Input is not a number");if(!Number.isInteger(t))throw new Error("Input is not an integer");let n;try{n=new Lu.default(t)}catch{throw new Error("Input is not a safe integer")}return new Ao(n)}constructor(t){if(t.isNeg())throw new Error("Input is negative");if(t.gt(U_))throw new Error("Input exceeds uint64 range");this.data=t}toBytesBigEndian(){return Uint8Array.from(this.data.toArray("be",8))}toBytesLittleEndian(){return Uint8Array.from(this.data.toArray("le",8))}toString(){return this.data.toString(10)}toNumber(){return this.data.toNumber()}};Dr.Uint64=Ao});var H1=L(Nr=>{"use strict";B();R();Object.defineProperty(Nr,"__esModule",{value:!0});Nr.Uint64=Nr.Uint53=Nr.Uint32=Nr.Int53=Nr.Decimal=void 0;var B_=q1();Object.defineProperty(Nr,"Decimal",{enumerable:!0,get:function(){return B_.Decimal}});var qu=F1();Object.defineProperty(Nr,"Int53",{enumerable:!0,get:function(){return qu.Int53}});Object.defineProperty(Nr,"Uint32",{enumerable:!0,get:function(){return qu.Uint32}});Object.defineProperty(Nr,"Uint53",{enumerable:!0,get:function(){return qu.Uint53}});Object.defineProperty(Nr,"Uint64",{enumerable:!0,get:function(){return qu.Uint64}})});var W1=L(($1,Gc)=>{B();R();var K1=function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=null;try{t=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{}function n(l,s,a){this.low=l|0,this.high=s|0,this.unsigned=!!a}n.prototype.__isLong__,Object.defineProperty(n.prototype,"__isLong__",{value:!0});function i(l){return(l&&l.__isLong__)===!0}function r(l){var s=Math.clz32(l&-l);return l?31-s:s}n.isLong=i;var o={},f={};function c(l,s){var a,m,y;return s?(l>>>=0,(y=0<=l&&l<256)&&(m=f[l],m)?m:(a=A(l,0,!0),y&&(f[l]=a),a)):(l|=0,(y=-128<=l&&l<128)&&(m=o[l],m)?m:(a=A(l,l<0?-1:0,!1),y&&(o[l]=a),a))}n.fromInt=c;function g(l,s){if(isNaN(l))return s?Z:N;if(s){if(l<0)return Z;if(l>=T)return ue}else{if(l<=-D)return E;if(l+1>=D)return G}return l<0?g(-l,s).neg():A(l%_|0,l/_|0,s)}n.fromNumber=g;function A(l,s,a){return new n(l,s,a)}n.fromBits=A;var w=Math.pow;function M(l,s,a){if(l.length===0)throw Error("empty string");if(typeof s=="number"?(a=s,s=!1):s=!!s,l==="NaN"||l==="Infinity"||l==="+Infinity"||l==="-Infinity")return s?Z:N;if(a=a||10,a<2||36<a)throw RangeError("radix");var m;if((m=l.indexOf("-"))>0)throw Error("interior hyphen");if(m===0)return M(l.substring(1),s,a).neg();for(var y=g(w(a,8)),h=N,u=0;u<l.length;u+=8){var v=Math.min(8,l.length-u),k=parseInt(l.substring(u,u+v),a);if(v<8){var p=g(w(a,v));h=h.mul(p).add(g(k))}else h=h.mul(y),h=h.add(g(k))}return h.unsigned=s,h}n.fromString=M;function P(l,s){return typeof l=="number"?g(l,s):typeof l=="string"?M(l,s):A(l.low,l.high,typeof s=="boolean"?s:l.unsigned)}n.fromValue=P;var x=1<<16,U=1<<24,_=x*x,T=_*_,D=T/2,K=c(U),N=c(0);n.ZERO=N;var Z=c(0,!0);n.UZERO=Z;var $=c(1);n.ONE=$;var F=c(1,!0);n.UONE=F;var Y=c(-1);n.NEG_ONE=Y;var G=A(-1,2147483647,!1);n.MAX_VALUE=G;var ue=A(-1,-1,!0);n.MAX_UNSIGNED_VALUE=ue;var E=A(0,-2147483648,!1);n.MIN_VALUE=E;var d=n.prototype;d.toInt=function(){return this.unsigned?this.low>>>0:this.low},d.toNumber=function(){return this.unsigned?(this.high>>>0)*_+(this.low>>>0):this.high*_+(this.low>>>0)},d.toString=function(s){if(s=s||10,s<2||36<s)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(E)){var a=g(s),m=this.div(a),y=m.mul(a).sub(this);return m.toString(s)+y.toInt().toString(s)}else return"-"+this.neg().toString(s);for(var h=g(w(s,6),this.unsigned),u=this,v="";;){var k=u.div(h),p=u.sub(k.mul(h)).toInt()>>>0,I=p.toString(s);if(u=k,u.isZero())return I+v;for(;I.length<6;)I="0"+I;v=""+I+v}},d.getHighBits=function(){return this.high},d.getHighBitsUnsigned=function(){return this.high>>>0},d.getLowBits=function(){return this.low},d.getLowBitsUnsigned=function(){return this.low>>>0},d.getNumBitsAbs=function(){if(this.isNegative())return this.eq(E)?64:this.neg().getNumBitsAbs();for(var s=this.high!=0?this.high:this.low,a=31;a>0&&(s&1<<a)==0;a--);return this.high!=0?a+33:a+1},d.isZero=function(){return this.high===0&&this.low===0},d.eqz=d.isZero,d.isNegative=function(){return!this.unsigned&&this.high<0},d.isPositive=function(){return this.unsigned||this.high>=0},d.isOdd=function(){return(this.low&1)===1},d.isEven=function(){return(this.low&1)===0},d.equals=function(s){return i(s)||(s=P(s)),this.unsigned!==s.unsigned&&this.high>>>31===1&&s.high>>>31===1?!1:this.high===s.high&&this.low===s.low},d.eq=d.equals,d.notEquals=function(s){return!this.eq(s)},d.neq=d.notEquals,d.ne=d.notEquals,d.lessThan=function(s){return this.comp(s)<0},d.lt=d.lessThan,d.lessThanOrEqual=function(s){return this.comp(s)<=0},d.lte=d.lessThanOrEqual,d.le=d.lessThanOrEqual,d.greaterThan=function(s){return this.comp(s)>0},d.gt=d.greaterThan,d.greaterThanOrEqual=function(s){return this.comp(s)>=0},d.gte=d.greaterThanOrEqual,d.ge=d.greaterThanOrEqual,d.compare=function(s){if(i(s)||(s=P(s)),this.eq(s))return 0;var a=this.isNegative(),m=s.isNegative();return a&&!m?-1:!a&&m?1:this.unsigned?s.high>>>0>this.high>>>0||s.high===this.high&&s.low>>>0>this.low>>>0?-1:1:this.sub(s).isNegative()?-1:1},d.comp=d.compare,d.negate=function(){return!this.unsigned&&this.eq(E)?E:this.not().add($)},d.neg=d.negate,d.add=function(s){i(s)||(s=P(s));var a=this.high>>>16,m=this.high&65535,y=this.low>>>16,h=this.low&65535,u=s.high>>>16,v=s.high&65535,k=s.low>>>16,p=s.low&65535,I=0,W=0,V=0,X=0;return X+=h+p,V+=X>>>16,X&=65535,V+=y+k,W+=V>>>16,V&=65535,W+=m+v,I+=W>>>16,W&=65535,I+=a+u,I&=65535,A(V<<16|X,I<<16|W,this.unsigned)},d.subtract=function(s){return i(s)||(s=P(s)),this.add(s.neg())},d.sub=d.subtract,d.multiply=function(s){if(this.isZero())return this;if(i(s)||(s=P(s)),t){var a=t.mul(this.low,this.high,s.low,s.high);return A(a,t.get_high(),this.unsigned)}if(s.isZero())return this.unsigned?Z:N;if(this.eq(E))return s.isOdd()?E:N;if(s.eq(E))return this.isOdd()?E:N;if(this.isNegative())return s.isNegative()?this.neg().mul(s.neg()):this.neg().mul(s).neg();if(s.isNegative())return this.mul(s.neg()).neg();if(this.lt(K)&&s.lt(K))return g(this.toNumber()*s.toNumber(),this.unsigned);var m=this.high>>>16,y=this.high&65535,h=this.low>>>16,u=this.low&65535,v=s.high>>>16,k=s.high&65535,p=s.low>>>16,I=s.low&65535,W=0,V=0,X=0,de=0;return de+=u*I,X+=de>>>16,de&=65535,X+=h*I,V+=X>>>16,X&=65535,X+=u*p,V+=X>>>16,X&=65535,V+=y*I,W+=V>>>16,V&=65535,V+=h*p,W+=V>>>16,V&=65535,V+=u*k,W+=V>>>16,V&=65535,W+=m*I+y*p+h*k+u*v,W&=65535,A(X<<16|de,W<<16|V,this.unsigned)},d.mul=d.multiply,d.divide=function(s){if(i(s)||(s=P(s)),s.isZero())throw Error("division by zero");if(t){if(!this.unsigned&&this.high===-2147483648&&s.low===-1&&s.high===-1)return this;var a=(this.unsigned?t.div_u:t.div_s)(this.low,this.high,s.low,s.high);return A(a,t.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?Z:N;var m,y,h;if(this.unsigned){if(s.unsigned||(s=s.toUnsigned()),s.gt(this))return Z;if(s.gt(this.shru(1)))return F;h=Z}else{if(this.eq(E)){if(s.eq($)||s.eq(Y))return E;if(s.eq(E))return $;var u=this.shr(1);return m=u.div(s).shl(1),m.eq(N)?s.isNegative()?$:Y:(y=this.sub(s.mul(m)),h=m.add(y.div(s)),h)}else if(s.eq(E))return this.unsigned?Z:N;if(this.isNegative())return s.isNegative()?this.neg().div(s.neg()):this.neg().div(s).neg();if(s.isNegative())return this.div(s.neg()).neg();h=N}for(y=this;y.gte(s);){m=Math.max(1,Math.floor(y.toNumber()/s.toNumber()));for(var v=Math.ceil(Math.log(m)/Math.LN2),k=v<=48?1:w(2,v-48),p=g(m),I=p.mul(s);I.isNegative()||I.gt(y);)m-=k,p=g(m,this.unsigned),I=p.mul(s);p.isZero()&&(p=$),h=h.add(p),y=y.sub(I)}return h},d.div=d.divide,d.modulo=function(s){if(i(s)||(s=P(s)),t){var a=(this.unsigned?t.rem_u:t.rem_s)(this.low,this.high,s.low,s.high);return A(a,t.get_high(),this.unsigned)}return this.sub(this.div(s).mul(s))},d.mod=d.modulo,d.rem=d.modulo,d.not=function(){return A(~this.low,~this.high,this.unsigned)},d.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},d.clz=d.countLeadingZeros,d.countTrailingZeros=function(){return this.low?r(this.low):r(this.high)+32},d.ctz=d.countTrailingZeros,d.and=function(s){return i(s)||(s=P(s)),A(this.low&s.low,this.high&s.high,this.unsigned)},d.or=function(s){return i(s)||(s=P(s)),A(this.low|s.low,this.high|s.high,this.unsigned)},d.xor=function(s){return i(s)||(s=P(s)),A(this.low^s.low,this.high^s.high,this.unsigned)},d.shiftLeft=function(s){return i(s)&&(s=s.toInt()),(s&=63)===0?this:s<32?A(this.low<<s,this.high<<s|this.low>>>32-s,this.unsigned):A(0,this.low<<s-32,this.unsigned)},d.shl=d.shiftLeft,d.shiftRight=function(s){return i(s)&&(s=s.toInt()),(s&=63)===0?this:s<32?A(this.low>>>s|this.high<<32-s,this.high>>s,this.unsigned):A(this.high>>s-32,this.high>=0?0:-1,this.unsigned)},d.shr=d.shiftRight,d.shiftRightUnsigned=function(s){return i(s)&&(s=s.toInt()),(s&=63)===0?this:s<32?A(this.low>>>s|this.high<<32-s,this.high>>>s,this.unsigned):s===32?A(this.high,0,this.unsigned):A(this.high>>>s-32,0,this.unsigned)},d.shru=d.shiftRightUnsigned,d.shr_u=d.shiftRightUnsigned,d.rotateLeft=function(s){var a;return i(s)&&(s=s.toInt()),(s&=63)===0?this:s===32?A(this.high,this.low,this.unsigned):s<32?(a=32-s,A(this.low<<s|this.high>>>a,this.high<<s|this.low>>>a,this.unsigned)):(s-=32,a=32-s,A(this.high<<s|this.low>>>a,this.low<<s|this.high>>>a,this.unsigned))},d.rotl=d.rotateLeft,d.rotateRight=function(s){var a;return i(s)&&(s=s.toInt()),(s&=63)===0?this:s===32?A(this.high,this.low,this.unsigned):s<32?(a=32-s,A(this.high<<a|this.low>>>s,this.low<<a|this.high>>>s,this.unsigned)):(s-=32,a=32-s,A(this.low<<a|this.high>>>s,this.high<<a|this.low>>>s,this.unsigned))},d.rotr=d.rotateRight,d.toSigned=function(){return this.unsigned?A(this.low,this.high,!1):this},d.toUnsigned=function(){return this.unsigned?this:A(this.low,this.high,!0)},d.toBytes=function(s){return s?this.toBytesLE():this.toBytesBE()},d.toBytesLE=function(){var s=this.high,a=this.low;return[a&255,a>>>8&255,a>>>16&255,a>>>24,s&255,s>>>8&255,s>>>16&255,s>>>24]},d.toBytesBE=function(){var s=this.high,a=this.low;return[s>>>24,s>>>16&255,s>>>8&255,s&255,a>>>24,a>>>16&255,a>>>8&255,a&255]},n.fromBytes=function(s,a,m){return m?n.fromBytesLE(s,a):n.fromBytesBE(s,a)},n.fromBytesLE=function(s,a){return new n(s[0]|s[1]<<8|s[2]<<16|s[3]<<24,s[4]|s[5]<<8|s[6]<<16|s[7]<<24,a)},n.fromBytesBE=function(s,a){return new n(s[4]<<24|s[5]<<16|s[6]<<8|s[7],s[0]<<24|s[1]<<16|s[2]<<8|s[3],a)};var b=n;return e.default=b,"default"in e?e.default:e}({});typeof define=="function"&&define.amd?define([],function(){return K1}):typeof Gc=="object"&&typeof $1=="object"&&(Gc.exports=K1)});var xt=L(_e=>{"use strict";B();R();var J1=_e&&_e.__createBinding||(Object.create?function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]}),R_=_e&&_e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),ri=_e&&_e.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&J1(t,e,n);return R_(t,e),t},z1=_e&&_e.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&J1(t,e,n)},Fu=_e&&_e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_e,"__esModule",{value:!0});_e.secp256k1=_e.ed25519=_e.Long=_e._m0=_e.protobuf=_e.typeforce=_e.safeBuffer=_e.BigNumber=_e.BN=_e.math=_e.signUtil=_e.abi=_e.elliptic=_e.bip39=_e.bip32=_e.base=void 0;_e.base=ri(ls());_e.bip32=ri(Vg());_e.bip39=ri(yc());_e.elliptic=ri(ia());_e.abi=ri(My());_e.signUtil=ri(N1());_e.math=ri(H1());var C_=Fu(Un());_e.BN=C_.default;var E_=Fu(h3());_e.BigNumber=E_.default;var T_=Fu(d3());_e.safeBuffer=T_.default;var O_=Jp();_e.typeforce=O_;_e.protobuf=ri(y3());_e._m0=ri(b3());var D_=Fu(W1());_e.Long=D_.default;_e.ed25519=ri(v3());_e.secp256k1=ri(A3());z1((w3(),Kp(M3)),_e);z1((S3(),Kp(k3)),_e)});var pa=L(ma=>{"use strict";B();R();Object.defineProperty(ma,"__esModule",{value:!0});ma.Any=ma.protobufPackage=void 0;var Z1=xt(),la=xt(),V1=lr();ma.protobufPackage="google.protobuf";function G1(){return{typeUrl:"",value:new Uint8Array}}ma.Any={encode(e,t=la._m0.Writer.create()){return e.typeUrl!==""&&t.uint32(10).string(e.typeUrl),e.value.length!==0&&t.uint32(18).bytes(e.value),t},decode(e,t){let n=e instanceof la._m0.Reader?e:new la._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=G1();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.typeUrl=n.string();break;case 2:r.value=n.bytes();break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{typeUrl:(0,V1.isSet)(e.typeUrl)?String(e.typeUrl):"",value:(0,V1.isSet)(e.value)?L_(e.value):new Uint8Array}},toJSON(e){let t={};return e.typeUrl!==void 0&&(t.typeUrl=e.typeUrl),e.value!==void 0&&(t.value=F_(e.value!==void 0?e.value:new Uint8Array)),t},fromPartial(e){let t=G1();return t.typeUrl=e.typeUrl??"",t.value=e.value??new Uint8Array,t}};var Mo=(()=>{if(typeof Mo<"u")return Mo;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof Mo<"u")return Mo;throw"Unable to locate global object"})(),N_=Mo.atob||(e=>Mo.Buffer.from(e,"base64").toString("binary"));function L_(e){let t=N_(e),n=new Uint8Array(t.length);for(let i=0;i<t.length;++i)n[i]=t.charCodeAt(i);return n}var q_=Mo.btoa||(e=>Mo.Buffer.from(e,"binary").toString("base64"));function F_(e){let t=[];return e.forEach(n=>{t.push(String.fromCharCode(n))}),q_(t.join(""))}la._m0.util.Long!==Z1.Long&&(la._m0.util.Long=Z1.Long,la._m0.configure())});var Yc=L(ko=>{"use strict";B();R();Object.defineProperty(ko,"__esModule",{value:!0});ko.CompactBitArray=ko.MultiSignature=ko.protobufPackage=void 0;var Y1=xt(),Ni=xt(),X1=lr();ko.protobufPackage="cosmos.crypto.multisig.v1beta1";function Q1(){return{signatures:[]}}ko.MultiSignature={encode(e,t=Ni._m0.Writer.create()){for(let n of e.signatures)t.uint32(10).bytes(n);return t},decode(e,t){let n=e instanceof Ni._m0.Reader?e:new Ni._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=Q1();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.signatures.push(n.bytes());break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{signatures:Array.isArray(e?.signatures)?e.signatures.map(t=>eb(t)):[]}},toJSON(e){let t={};return e.signatures?t.signatures=e.signatures.map(n=>tb(n!==void 0?n:new Uint8Array)):t.signatures=[],t},fromPartial(e){let t=Q1();return t.signatures=e.signatures?.map(n=>n)||[],t}};function j1(){return{extraBitsStored:0,elems:new Uint8Array}}ko.CompactBitArray={encode(e,t=Ni._m0.Writer.create()){return e.extraBitsStored!==0&&t.uint32(8).uint32(e.extraBitsStored),e.elems.length!==0&&t.uint32(18).bytes(e.elems),t},decode(e,t){let n=e instanceof Ni._m0.Reader?e:new Ni._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=j1();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.extraBitsStored=n.uint32();break;case 2:r.elems=n.bytes();break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{extraBitsStored:(0,X1.isSet)(e.extraBitsStored)?Number(e.extraBitsStored):0,elems:(0,X1.isSet)(e.elems)?eb(e.elems):new Uint8Array}},toJSON(e){let t={};return e.extraBitsStored!==void 0&&(t.extraBitsStored=Math.round(e.extraBitsStored)),e.elems!==void 0&&(t.elems=tb(e.elems!==void 0?e.elems:new Uint8Array)),t},fromPartial(e){let t=j1();return t.extraBitsStored=e.extraBitsStored??0,t.elems=e.elems??new Uint8Array,t}};var wo=(()=>{if(typeof wo<"u")return wo;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof wo<"u")return wo;throw"Unable to locate global object"})(),H_=wo.atob||(e=>wo.Buffer.from(e,"base64").toString("binary"));function eb(e){let t=H_(e),n=new Uint8Array(t.length);for(let i=0;i<t.length;++i)n[i]=t.charCodeAt(i);return n}var K_=wo.btoa||(e=>wo.Buffer.from(e,"binary").toString("base64"));function tb(e){let t=[];return e.forEach(n=>{t.push(String.fromCharCode(n))}),K_(t.join(""))}Ni._m0.util.Long!==Y1.Long&&(Ni._m0.util.Long=Y1.Long,Ni._m0.configure())});var Xc=L(Ie=>{"use strict";B();R();Object.defineProperty(Ie,"__esModule",{value:!0});Ie.SignatureDescriptor_Data_Multi=Ie.SignatureDescriptor_Data_Single=Ie.SignatureDescriptor_Data=Ie.SignatureDescriptor=Ie.SignatureDescriptors=Ie.signModeToJSON=Ie.signModeFromJSON=Ie.SignMode=Ie.protobufPackage=void 0;var So=xt(),qn=xt(),Md=pa(),wd=Yc(),Io=lr();Ie.protobufPackage="cosmos.tx.signing.v1beta1";var Lr;(function(e){e[e.SIGN_MODE_UNSPECIFIED=0]="SIGN_MODE_UNSPECIFIED",e[e.SIGN_MODE_DIRECT=1]="SIGN_MODE_DIRECT",e[e.SIGN_MODE_TEXTUAL=2]="SIGN_MODE_TEXTUAL",e[e.SIGN_MODE_LEGACY_AMINO_JSON=127]="SIGN_MODE_LEGACY_AMINO_JSON",e[e.SIGN_MODE_EIP_191=191]="SIGN_MODE_EIP_191",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(Lr=Ie.SignMode||(Ie.SignMode={}));function ab(e){switch(e){case 0:case"SIGN_MODE_UNSPECIFIED":return Lr.SIGN_MODE_UNSPECIFIED;case 1:case"SIGN_MODE_DIRECT":return Lr.SIGN_MODE_DIRECT;case 2:case"SIGN_MODE_TEXTUAL":return Lr.SIGN_MODE_TEXTUAL;case 127:case"SIGN_MODE_LEGACY_AMINO_JSON":return Lr.SIGN_MODE_LEGACY_AMINO_JSON;case 191:case"SIGN_MODE_EIP_191":return Lr.SIGN_MODE_EIP_191;case-1:case"UNRECOGNIZED":default:return Lr.UNRECOGNIZED}}Ie.signModeFromJSON=ab;function db(e){switch(e){case Lr.SIGN_MODE_UNSPECIFIED:return"SIGN_MODE_UNSPECIFIED";case Lr.SIGN_MODE_DIRECT:return"SIGN_MODE_DIRECT";case Lr.SIGN_MODE_TEXTUAL:return"SIGN_MODE_TEXTUAL";case Lr.SIGN_MODE_LEGACY_AMINO_JSON:return"SIGN_MODE_LEGACY_AMINO_JSON";case Lr.SIGN_MODE_EIP_191:return"SIGN_MODE_EIP_191";default:return"UNKNOWN"}}Ie.signModeToJSON=db;function nb(){return{signatures:[]}}Ie.SignatureDescriptors={encode(e,t=qn._m0.Writer.create()){for(let n of e.signatures)Ie.SignatureDescriptor.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){let n=e instanceof qn._m0.Reader?e:new qn._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=nb();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.signatures.push(Ie.SignatureDescriptor.decode(n,n.uint32()));break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{signatures:Array.isArray(e?.signatures)?e.signatures.map(t=>Ie.SignatureDescriptor.fromJSON(t)):[]}},toJSON(e){let t={};return e.signatures?t.signatures=e.signatures.map(n=>n?Ie.SignatureDescriptor.toJSON(n):void 0):t.signatures=[],t},fromPartial(e){let t=nb();return t.signatures=e.signatures?.map(n=>Ie.SignatureDescriptor.fromPartial(n))||[],t}};function rb(){return{publicKey:void 0,data:void 0,sequence:So.Long.UZERO}}Ie.SignatureDescriptor={encode(e,t=qn._m0.Writer.create()){return e.publicKey!==void 0&&Md.Any.encode(e.publicKey,t.uint32(10).fork()).ldelim(),e.data!==void 0&&Ie.SignatureDescriptor_Data.encode(e.data,t.uint32(18).fork()).ldelim(),e.sequence.isZero()||t.uint32(24).uint64(e.sequence),t},decode(e,t){let n=e instanceof qn._m0.Reader?e:new qn._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=rb();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.publicKey=Md.Any.decode(n,n.uint32());break;case 2:r.data=Ie.SignatureDescriptor_Data.decode(n,n.uint32());break;case 3:r.sequence=n.uint64();break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{publicKey:(0,Io.isSet)(e.publicKey)?Md.Any.fromJSON(e.publicKey):void 0,data:(0,Io.isSet)(e.data)?Ie.SignatureDescriptor_Data.fromJSON(e.data):void 0,sequence:(0,Io.isSet)(e.sequence)?So.Long.fromString(e.sequence):So.Long.UZERO}},toJSON(e){let t={};return e.publicKey!==void 0&&(t.publicKey=e.publicKey?Md.Any.toJSON(e.publicKey):void 0),e.data!==void 0&&(t.data=e.data?Ie.SignatureDescriptor_Data.toJSON(e.data):void 0),e.sequence!==void 0&&(t.sequence=(e.sequence||So.Long.UZERO).toString()),t},fromPartial(e){let t=rb();return t.publicKey=e.publicKey!==void 0&&e.publicKey!==null?Md.Any.fromPartial(e.publicKey):void 0,t.data=e.data!==void 0&&e.data!==null?Ie.SignatureDescriptor_Data.fromPartial(e.data):void 0,t.sequence=e.sequence!==void 0&&e.sequence!==null?So.Long.fromValue(e.sequence):So.Long.UZERO,t}};function ib(){return{single:void 0,multi:void 0}}Ie.SignatureDescriptor_Data={encode(e,t=qn._m0.Writer.create()){return e.single!==void 0&&Ie.SignatureDescriptor_Data_Single.encode(e.single,t.uint32(10).fork()).ldelim(),e.multi!==void 0&&Ie.SignatureDescriptor_Data_Multi.encode(e.multi,t.uint32(18).fork()).ldelim(),t},decode(e,t){let n=e instanceof qn._m0.Reader?e:new qn._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=ib();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.single=Ie.SignatureDescriptor_Data_Single.decode(n,n.uint32());break;case 2:r.multi=Ie.SignatureDescriptor_Data_Multi.decode(n,n.uint32());break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{single:(0,Io.isSet)(e.single)?Ie.SignatureDescriptor_Data_Single.fromJSON(e.single):void 0,multi:(0,Io.isSet)(e.multi)?Ie.SignatureDescriptor_Data_Multi.fromJSON(e.multi):void 0}},toJSON(e){let t={};return e.single!==void 0&&(t.single=e.single?Ie.SignatureDescriptor_Data_Single.toJSON(e.single):void 0),e.multi!==void 0&&(t.multi=e.multi?Ie.SignatureDescriptor_Data_Multi.toJSON(e.multi):void 0),t},fromPartial(e){let t=ib();return t.single=e.single!==void 0&&e.single!==null?Ie.SignatureDescriptor_Data_Single.fromPartial(e.single):void 0,t.multi=e.multi!==void 0&&e.multi!==null?Ie.SignatureDescriptor_Data_Multi.fromPartial(e.multi):void 0,t}};function ob(){return{mode:0,signature:new Uint8Array}}Ie.SignatureDescriptor_Data_Single={encode(e,t=qn._m0.Writer.create()){return e.mode!==0&&t.uint32(8).int32(e.mode),e.signature.length!==0&&t.uint32(18).bytes(e.signature),t},decode(e,t){let n=e instanceof qn._m0.Reader?e:new qn._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=ob();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.mode=n.int32();break;case 2:r.signature=n.bytes();break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{mode:(0,Io.isSet)(e.mode)?ab(e.mode):0,signature:(0,Io.isSet)(e.signature)?W_(e.signature):new Uint8Array}},toJSON(e){let t={};return e.mode!==void 0&&(t.mode=db(e.mode)),e.signature!==void 0&&(t.signature=z_(e.signature!==void 0?e.signature:new Uint8Array)),t},fromPartial(e){let t=ob();return t.mode=e.mode??0,t.signature=e.signature??new Uint8Array,t}};function sb(){return{bitarray:void 0,signatures:[]}}Ie.SignatureDescriptor_Data_Multi={encode(e,t=qn._m0.Writer.create()){e.bitarray!==void 0&&wd.CompactBitArray.encode(e.bitarray,t.uint32(10).fork()).ldelim();for(let n of e.signatures)Ie.SignatureDescriptor_Data.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){let n=e instanceof qn._m0.Reader?e:new qn._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=sb();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.bitarray=wd.CompactBitArray.decode(n,n.uint32());break;case 2:r.signatures.push(Ie.SignatureDescriptor_Data.decode(n,n.uint32()));break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{bitarray:(0,Io.isSet)(e.bitarray)?wd.CompactBitArray.fromJSON(e.bitarray):void 0,signatures:Array.isArray(e?.signatures)?e.signatures.map(t=>Ie.SignatureDescriptor_Data.fromJSON(t)):[]}},toJSON(e){let t={};return e.bitarray!==void 0&&(t.bitarray=e.bitarray?wd.CompactBitArray.toJSON(e.bitarray):void 0),e.signatures?t.signatures=e.signatures.map(n=>n?Ie.SignatureDescriptor_Data.toJSON(n):void 0):t.signatures=[],t},fromPartial(e){let t=sb();return t.bitarray=e.bitarray!==void 0&&e.bitarray!==null?wd.CompactBitArray.fromPartial(e.bitarray):void 0,t.signatures=e.signatures?.map(n=>Ie.SignatureDescriptor_Data.fromPartial(n))||[],t}};var _o=(()=>{if(typeof _o<"u")return _o;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof _o<"u")return _o;throw"Unable to locate global object"})(),$_=_o.atob||(e=>_o.Buffer.from(e,"base64").toString("binary"));function W_(e){let t=$_(e),n=new Uint8Array(t.length);for(let i=0;i<t.length;++i)n[i]=t.charCodeAt(i);return n}var J_=_o.btoa||(e=>_o.Buffer.from(e,"binary").toString("base64"));function z_(e){let t=[];return e.forEach(n=>{t.push(String.fromCharCode(n))}),J_(t.join(""))}qn._m0.util.Long!==So.Long&&(qn._m0.util.Long=So.Long,qn._m0.configure())});var lr=L(ae=>{"use strict";B();R();Object.defineProperty(ae,"__esModule",{value:!0});ae.isSet=ae.Fee=ae.ModeInfo_Multi=ae.ModeInfo_Single=ae.ModeInfo=ae.SignerInfo=ae.AuthInfo=ae.TxBody=ae.SignDoc=ae.TxRaw=ae.Tx=ae.protobufPackage=void 0;var $t=xt(),At=xt(),An=pa(),ub=Xc(),kd=Yc(),Sd=Po();ae.protobufPackage="cosmos.tx.v1beta1";function fb(){return{body:void 0,authInfo:void 0,signatures:[]}}ae.Tx={encode(e,t=At._m0.Writer.create()){e.body!==void 0&&ae.TxBody.encode(e.body,t.uint32(10).fork()).ldelim(),e.authInfo!==void 0&&ae.AuthInfo.encode(e.authInfo,t.uint32(18).fork()).ldelim();for(let n of e.signatures)t.uint32(26).bytes(n);return t},decode(e,t){let n=e instanceof At._m0.Reader?e:new At._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=fb();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.body=ae.TxBody.decode(n,n.uint32());break;case 2:r.authInfo=ae.AuthInfo.decode(n,n.uint32());break;case 3:r.signatures.push(n.bytes());break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{body:fn(e.body)?ae.TxBody.fromJSON(e.body):void 0,authInfo:fn(e.authInfo)?ae.AuthInfo.fromJSON(e.authInfo):void 0,signatures:Array.isArray(e?.signatures)?e.signatures.map(t=>ha(t)):[]}},toJSON(e){let t={};return e.body!==void 0&&(t.body=e.body?ae.TxBody.toJSON(e.body):void 0),e.authInfo!==void 0&&(t.authInfo=e.authInfo?ae.AuthInfo.toJSON(e.authInfo):void 0),e.signatures?t.signatures=e.signatures.map(n=>ga(n!==void 0?n:new Uint8Array)):t.signatures=[],t},fromPartial(e){let t=fb();return t.body=e.body!==void 0&&e.body!==null?ae.TxBody.fromPartial(e.body):void 0,t.authInfo=e.authInfo!==void 0&&e.authInfo!==null?ae.AuthInfo.fromPartial(e.authInfo):void 0,t.signatures=e.signatures?.map(n=>n)||[],t}};function cb(){return{bodyBytes:new Uint8Array,authInfoBytes:new Uint8Array,signatures:[]}}ae.TxRaw={encode(e,t=At._m0.Writer.create()){e.bodyBytes.length!==0&&t.uint32(10).bytes(e.bodyBytes),e.authInfoBytes.length!==0&&t.uint32(18).bytes(e.authInfoBytes);for(let n of e.signatures)t.uint32(26).bytes(n);return t},decode(e,t){let n=e instanceof At._m0.Reader?e:new At._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=cb();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.bodyBytes=n.bytes();break;case 2:r.authInfoBytes=n.bytes();break;case 3:r.signatures.push(n.bytes());break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{bodyBytes:fn(e.bodyBytes)?ha(e.bodyBytes):new Uint8Array,authInfoBytes:fn(e.authInfoBytes)?ha(e.authInfoBytes):new Uint8Array,signatures:Array.isArray(e?.signatures)?e.signatures.map(t=>ha(t)):[]}},toJSON(e){let t={};return e.bodyBytes!==void 0&&(t.bodyBytes=ga(e.bodyBytes!==void 0?e.bodyBytes:new Uint8Array)),e.authInfoBytes!==void 0&&(t.authInfoBytes=ga(e.authInfoBytes!==void 0?e.authInfoBytes:new Uint8Array)),e.signatures?t.signatures=e.signatures.map(n=>ga(n!==void 0?n:new Uint8Array)):t.signatures=[],t},fromPartial(e){let t=cb();return t.bodyBytes=e.bodyBytes??new Uint8Array,t.authInfoBytes=e.authInfoBytes??new Uint8Array,t.signatures=e.signatures?.map(n=>n)||[],t}};function lb(){return{bodyBytes:new Uint8Array,authInfoBytes:new Uint8Array,chainId:"",accountNumber:$t.Long.UZERO}}ae.SignDoc={encode(e,t=At._m0.Writer.create()){return e.bodyBytes.length!==0&&t.uint32(10).bytes(e.bodyBytes),e.authInfoBytes.length!==0&&t.uint32(18).bytes(e.authInfoBytes),e.chainId!==""&&t.uint32(26).string(e.chainId),e.accountNumber.isZero()||t.uint32(32).uint64(e.accountNumber),t},decode(e,t){let n=e instanceof At._m0.Reader?e:new At._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=lb();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.bodyBytes=n.bytes();break;case 2:r.authInfoBytes=n.bytes();break;case 3:r.chainId=n.string();break;case 4:r.accountNumber=n.uint64();break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{bodyBytes:fn(e.bodyBytes)?ha(e.bodyBytes):new Uint8Array,authInfoBytes:fn(e.authInfoBytes)?ha(e.authInfoBytes):new Uint8Array,chainId:fn(e.chainId)?String(e.chainId):"",accountNumber:fn(e.accountNumber)?$t.Long.fromString(e.accountNumber):$t.Long.UZERO}},toJSON(e){let t={};return e.bodyBytes!==void 0&&(t.bodyBytes=ga(e.bodyBytes!==void 0?e.bodyBytes:new Uint8Array)),e.authInfoBytes!==void 0&&(t.authInfoBytes=ga(e.authInfoBytes!==void 0?e.authInfoBytes:new Uint8Array)),e.chainId!==void 0&&(t.chainId=e.chainId),e.accountNumber!==void 0&&(t.accountNumber=(e.accountNumber||$t.Long.UZERO).toString()),t},fromPartial(e){let t=lb();return t.bodyBytes=e.bodyBytes??new Uint8Array,t.authInfoBytes=e.authInfoBytes??new Uint8Array,t.chainId=e.chainId??"",t.accountNumber=e.accountNumber!==void 0&&e.accountNumber!==null?$t.Long.fromValue(e.accountNumber):$t.Long.UZERO,t}};function mb(){return{messages:[],memo:"",timeoutHeight:$t.Long.UZERO,extensionOptions:[],nonCriticalExtensionOptions:[]}}ae.TxBody={encode(e,t=At._m0.Writer.create()){for(let n of e.messages)An.Any.encode(n,t.uint32(10).fork()).ldelim();e.memo!==""&&t.uint32(18).string(e.memo),e.timeoutHeight.isZero()||t.uint32(24).uint64(e.timeoutHeight);for(let n of e.extensionOptions)An.Any.encode(n,t.uint32(8186).fork()).ldelim();for(let n of e.nonCriticalExtensionOptions)An.Any.encode(n,t.uint32(16378).fork()).ldelim();return t},decode(e,t){let n=e instanceof At._m0.Reader?e:new At._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=mb();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.messages.push(An.Any.decode(n,n.uint32()));break;case 2:r.memo=n.string();break;case 3:r.timeoutHeight=n.uint64();break;case 1023:r.extensionOptions.push(An.Any.decode(n,n.uint32()));break;case 2047:r.nonCriticalExtensionOptions.push(An.Any.decode(n,n.uint32()));break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{messages:Array.isArray(e?.messages)?e.messages.map(t=>An.Any.fromJSON(t)):[],memo:fn(e.memo)?String(e.memo):"",timeoutHeight:fn(e.timeoutHeight)?$t.Long.fromString(e.timeoutHeight):$t.Long.UZERO,extensionOptions:Array.isArray(e?.extensionOptions)?e.extensionOptions.map(t=>An.Any.fromJSON(t)):[],nonCriticalExtensionOptions:Array.isArray(e?.nonCriticalExtensionOptions)?e.nonCriticalExtensionOptions.map(t=>An.Any.fromJSON(t)):[]}},toJSON(e){let t={};return e.messages?t.messages=e.messages.map(n=>n?An.Any.toJSON(n):void 0):t.messages=[],e.memo!==void 0&&(t.memo=e.memo),e.timeoutHeight!==void 0&&(t.timeoutHeight=(e.timeoutHeight||$t.Long.UZERO).toString()),e.extensionOptions?t.extensionOptions=e.extensionOptions.map(n=>n?An.Any.toJSON(n):void 0):t.extensionOptions=[],e.nonCriticalExtensionOptions?t.nonCriticalExtensionOptions=e.nonCriticalExtensionOptions.map(n=>n?An.Any.toJSON(n):void 0):t.nonCriticalExtensionOptions=[],t},fromPartial(e){let t=mb();return t.messages=e.messages?.map(n=>An.Any.fromPartial(n))||[],t.memo=e.memo??"",t.timeoutHeight=e.timeoutHeight!==void 0&&e.timeoutHeight!==null?$t.Long.fromValue(e.timeoutHeight):$t.Long.UZERO,t.extensionOptions=e.extensionOptions?.map(n=>An.Any.fromPartial(n))||[],t.nonCriticalExtensionOptions=e.nonCriticalExtensionOptions?.map(n=>An.Any.fromPartial(n))||[],t}};function pb(){return{signerInfos:[],fee:void 0}}ae.AuthInfo={encode(e,t=At._m0.Writer.create()){for(let n of e.signerInfos)ae.SignerInfo.encode(n,t.uint32(10).fork()).ldelim();return e.fee!==void 0&&ae.Fee.encode(e.fee,t.uint32(18).fork()).ldelim(),t},decode(e,t){let n=e instanceof At._m0.Reader?e:new At._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=pb();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.signerInfos.push(ae.SignerInfo.decode(n,n.uint32()));break;case 2:r.fee=ae.Fee.decode(n,n.uint32());break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{signerInfos:Array.isArray(e?.signerInfos)?e.signerInfos.map(t=>ae.SignerInfo.fromJSON(t)):[],fee:fn(e.fee)?ae.Fee.fromJSON(e.fee):void 0}},toJSON(e){let t={};return e.signerInfos?t.signerInfos=e.signerInfos.map(n=>n?ae.SignerInfo.toJSON(n):void 0):t.signerInfos=[],e.fee!==void 0&&(t.fee=e.fee?ae.Fee.toJSON(e.fee):void 0),t},fromPartial(e){let t=pb();return t.signerInfos=e.signerInfos?.map(n=>ae.SignerInfo.fromPartial(n))||[],t.fee=e.fee!==void 0&&e.fee!==null?ae.Fee.fromPartial(e.fee):void 0,t}};function hb(){return{publicKey:void 0,modeInfo:void 0,sequence:$t.Long.UZERO}}ae.SignerInfo={encode(e,t=At._m0.Writer.create()){return e.publicKey!==void 0&&An.Any.encode(e.publicKey,t.uint32(10).fork()).ldelim(),e.modeInfo!==void 0&&ae.ModeInfo.encode(e.modeInfo,t.uint32(18).fork()).ldelim(),e.sequence.isZero()||t.uint32(24).uint64(e.sequence),t},decode(e,t){let n=e instanceof At._m0.Reader?e:new At._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=hb();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.publicKey=An.Any.decode(n,n.uint32());break;case 2:r.modeInfo=ae.ModeInfo.decode(n,n.uint32());break;case 3:r.sequence=n.uint64();break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{publicKey:fn(e.publicKey)?An.Any.fromJSON(e.publicKey):void 0,modeInfo:fn(e.modeInfo)?ae.ModeInfo.fromJSON(e.modeInfo):void 0,sequence:fn(e.sequence)?$t.Long.fromString(e.sequence):$t.Long.UZERO}},toJSON(e){let t={};return e.publicKey!==void 0&&(t.publicKey=e.publicKey?An.Any.toJSON(e.publicKey):void 0),e.modeInfo!==void 0&&(t.modeInfo=e.modeInfo?ae.ModeInfo.toJSON(e.modeInfo):void 0),e.sequence!==void 0&&(t.sequence=(e.sequence||$t.Long.UZERO).toString()),t},fromPartial(e){let t=hb();return t.publicKey=e.publicKey!==void 0&&e.publicKey!==null?An.Any.fromPartial(e.publicKey):void 0,t.modeInfo=e.modeInfo!==void 0&&e.modeInfo!==null?ae.ModeInfo.fromPartial(e.modeInfo):void 0,t.sequence=e.sequence!==void 0&&e.sequence!==null?$t.Long.fromValue(e.sequence):$t.Long.UZERO,t}};function gb(){return{single:void 0,multi:void 0}}ae.ModeInfo={encode(e,t=At._m0.Writer.create()){return e.single!==void 0&&ae.ModeInfo_Single.encode(e.single,t.uint32(10).fork()).ldelim(),e.multi!==void 0&&ae.ModeInfo_Multi.encode(e.multi,t.uint32(18).fork()).ldelim(),t},decode(e,t){let n=e instanceof At._m0.Reader?e:new At._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=gb();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.single=ae.ModeInfo_Single.decode(n,n.uint32());break;case 2:r.multi=ae.ModeInfo_Multi.decode(n,n.uint32());break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{single:fn(e.single)?ae.ModeInfo_Single.fromJSON(e.single):void 0,multi:fn(e.multi)?ae.ModeInfo_Multi.fromJSON(e.multi):void 0}},toJSON(e){let t={};return e.single!==void 0&&(t.single=e.single?ae.ModeInfo_Single.toJSON(e.single):void 0),e.multi!==void 0&&(t.multi=e.multi?ae.ModeInfo_Multi.toJSON(e.multi):void 0),t},fromPartial(e){let t=gb();return t.single=e.single!==void 0&&e.single!==null?ae.ModeInfo_Single.fromPartial(e.single):void 0,t.multi=e.multi!==void 0&&e.multi!==null?ae.ModeInfo_Multi.fromPartial(e.multi):void 0,t}};function yb(){return{mode:0}}ae.ModeInfo_Single={encode(e,t=At._m0.Writer.create()){return e.mode!==0&&t.uint32(8).int32(e.mode),t},decode(e,t){let n=e instanceof At._m0.Reader?e:new At._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=yb();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.mode=n.int32();break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{mode:fn(e.mode)?(0,ub.signModeFromJSON)(e.mode):0}},toJSON(e){let t={};return e.mode!==void 0&&(t.mode=(0,ub.signModeToJSON)(e.mode)),t},fromPartial(e){let t=yb();return t.mode=e.mode??0,t}};function bb(){return{bitarray:void 0,modeInfos:[]}}ae.ModeInfo_Multi={encode(e,t=At._m0.Writer.create()){e.bitarray!==void 0&&kd.CompactBitArray.encode(e.bitarray,t.uint32(10).fork()).ldelim();for(let n of e.modeInfos)ae.ModeInfo.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){let n=e instanceof At._m0.Reader?e:new At._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=bb();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.bitarray=kd.CompactBitArray.decode(n,n.uint32());break;case 2:r.modeInfos.push(ae.ModeInfo.decode(n,n.uint32()));break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{bitarray:fn(e.bitarray)?kd.CompactBitArray.fromJSON(e.bitarray):void 0,modeInfos:Array.isArray(e?.modeInfos)?e.modeInfos.map(t=>ae.ModeInfo.fromJSON(t)):[]}},toJSON(e){let t={};return e.bitarray!==void 0&&(t.bitarray=e.bitarray?kd.CompactBitArray.toJSON(e.bitarray):void 0),e.modeInfos?t.modeInfos=e.modeInfos.map(n=>n?ae.ModeInfo.toJSON(n):void 0):t.modeInfos=[],t},fromPartial(e){let t=bb();return t.bitarray=e.bitarray!==void 0&&e.bitarray!==null?kd.CompactBitArray.fromPartial(e.bitarray):void 0,t.modeInfos=e.modeInfos?.map(n=>ae.ModeInfo.fromPartial(n))||[],t}};function vb(){return{amount:[],gasLimit:$t.Long.UZERO,payer:"",granter:""}}ae.Fee={encode(e,t=At._m0.Writer.create()){for(let n of e.amount)Sd.Coin.encode(n,t.uint32(10).fork()).ldelim();return e.gasLimit.isZero()||t.uint32(16).uint64(e.gasLimit),e.payer!==""&&t.uint32(26).string(e.payer),e.granter!==""&&t.uint32(34).string(e.granter),t},decode(e,t){let n=e instanceof At._m0.Reader?e:new At._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=vb();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.amount.push(Sd.Coin.decode(n,n.uint32()));break;case 2:r.gasLimit=n.uint64();break;case 3:r.payer=n.string();break;case 4:r.granter=n.string();break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{amount:Array.isArray(e?.amount)?e.amount.map(t=>Sd.Coin.fromJSON(t)):[],gasLimit:fn(e.gasLimit)?$t.Long.fromString(e.gasLimit):$t.Long.UZERO,payer:fn(e.payer)?String(e.payer):"",granter:fn(e.granter)?String(e.granter):""}},toJSON(e){let t={};return e.amount?t.amount=e.amount.map(n=>n?Sd.Coin.toJSON(n):void 0):t.amount=[],e.gasLimit!==void 0&&(t.gasLimit=(e.gasLimit||$t.Long.UZERO).toString()),e.payer!==void 0&&(t.payer=e.payer),e.granter!==void 0&&(t.granter=e.granter),t},fromPartial(e){let t=vb();return t.amount=e.amount?.map(n=>Sd.Coin.fromPartial(n))||[],t.gasLimit=e.gasLimit!==void 0&&e.gasLimit!==null?$t.Long.fromValue(e.gasLimit):$t.Long.UZERO,t.payer=e.payer??"",t.granter=e.granter??"",t}};var xo=(()=>{if(typeof xo<"u")return xo;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof xo<"u")return xo;throw"Unable to locate global object"})(),Z_=xo.atob||(e=>xo.Buffer.from(e,"base64").toString("binary"));function ha(e){let t=Z_(e),n=new Uint8Array(t.length);for(let i=0;i<t.length;++i)n[i]=t.charCodeAt(i);return n}var V_=xo.btoa||(e=>xo.Buffer.from(e,"binary").toString("base64"));function ga(e){let t=[];return e.forEach(n=>{t.push(String.fromCharCode(n))}),V_(t.join(""))}At._m0.util.Long!==$t.Long&&(At._m0.util.Long=$t.Long,At._m0.configure());function fn(e){return e!=null}ae.isSet=fn});var Po=L(mr=>{"use strict";B();R();Object.defineProperty(mr,"__esModule",{value:!0});mr.DecProto=mr.IntProto=mr.DecCoin=mr.Coin=mr.createBaseCoin=mr.protobufPackage=void 0;var Ab=xt(),rr=xt(),ya=lr();mr.protobufPackage="cosmos.base.v1beta1";function Qc(){return{denom:"",amount:""}}mr.createBaseCoin=Qc;mr.Coin={encode(e,t=rr._m0.Writer.create()){return e.denom!==""&&t.uint32(10).string(e.denom),e.amount!==""&&t.uint32(18).string(e.amount),t},decode(e,t){let n=e instanceof rr._m0.Reader?e:new rr._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=Qc();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.denom=n.string();break;case 2:r.amount=n.string();break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{denom:(0,ya.isSet)(e.denom)?String(e.denom):"",amount:(0,ya.isSet)(e.amount)?String(e.amount):""}},toJSON(e){let t={};return e.denom!==void 0&&(t.denom=e.denom),e.amount!==void 0&&(t.amount=e.amount),t},fromPartial(e){let t=Qc();return t.denom=e.denom??"",t.amount=e.amount??"",t}};function Mb(){return{denom:"",amount:""}}mr.DecCoin={encode(e,t=rr._m0.Writer.create()){return e.denom!==""&&t.uint32(10).string(e.denom),e.amount!==""&&t.uint32(18).string(e.amount),t},decode(e,t){let n=e instanceof rr._m0.Reader?e:new rr._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=Mb();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.denom=n.string();break;case 2:r.amount=n.string();break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{denom:(0,ya.isSet)(e.denom)?String(e.denom):"",amount:(0,ya.isSet)(e.amount)?String(e.amount):""}},toJSON(e){let t={};return e.denom!==void 0&&(t.denom=e.denom),e.amount!==void 0&&(t.amount=e.amount),t},fromPartial(e){let t=Mb();return t.denom=e.denom??"",t.amount=e.amount??"",t}};function wb(){return{int:""}}mr.IntProto={encode(e,t=rr._m0.Writer.create()){return e.int!==""&&t.uint32(10).string(e.int),t},decode(e,t){let n=e instanceof rr._m0.Reader?e:new rr._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=wb();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.int=n.string();break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{int:(0,ya.isSet)(e.int)?String(e.int):""}},toJSON(e){let t={};return e.int!==void 0&&(t.int=e.int),t},fromPartial(e){let t=wb();return t.int=e.int??"",t}};function kb(){return{dec:""}}mr.DecProto={encode(e,t=rr._m0.Writer.create()){return e.dec!==""&&t.uint32(10).string(e.dec),t},decode(e,t){let n=e instanceof rr._m0.Reader?e:new rr._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=kb();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.dec=n.string();break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{dec:(0,ya.isSet)(e.dec)?String(e.dec):""}},toJSON(e){let t={};return e.dec!==void 0&&(t.dec=e.dec),t},fromPartial(e){let t=kb();return t.dec=e.dec??"",t}};rr._m0.util.Long!==Ab.Long&&(rr._m0.util.Long=Ab.Long,rr._m0.configure())});var Ub=L(cn=>{"use strict";B();R();Object.defineProperty(cn,"__esModule",{value:!0});cn.MsgMultiSend=cn.MsgSend=cn.Output=cn.Input=cn.protobufPackage=void 0;var Sb=xt(),or=xt(),ir=Po(),Hu=lr();cn.protobufPackage="cosmos.bank.v1beta1";function _b(){return{address:"",coins:[]}}cn.Input={encode(e,t=or._m0.Writer.create()){e.address!==""&&t.uint32(10).string(e.address);for(let n of e.coins)ir.Coin.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){let n=e instanceof or._m0.Reader?e:new or._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=_b();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.address=n.string();break;case 2:r.coins.push(ir.Coin.decode(n,n.uint32()));break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{address:(0,Hu.isSet)(e.address)?String(e.address):"",coins:Array.isArray(e?.coins)?e.coins.map(t=>ir.Coin.fromJSON(t)):[]}},toJSON(e){let t={};return e.address!==void 0&&(t.address=e.address),e.coins?t.coins=e.coins.map(n=>n?ir.Coin.toJSON(n):void 0):t.coins=[],t},fromPartial(e){let t=_b();return t.address=e.address??"",t.coins=e.coins?.map(n=>ir.Coin.fromPartial(n))||[],t}};function Ib(){return{address:"",coins:[]}}cn.Output={encode(e,t=or._m0.Writer.create()){e.address!==""&&t.uint32(10).string(e.address);for(let n of e.coins)ir.Coin.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){let n=e instanceof or._m0.Reader?e:new or._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=Ib();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.address=n.string();break;case 2:r.coins.push(ir.Coin.decode(n,n.uint32()));break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{address:(0,Hu.isSet)(e.address)?String(e.address):"",coins:Array.isArray(e?.coins)?e.coins.map(t=>ir.Coin.fromJSON(t)):[]}},toJSON(e){let t={};return e.address!==void 0&&(t.address=e.address),e.coins?t.coins=e.coins.map(n=>n?ir.Coin.toJSON(n):void 0):t.coins=[],t},fromPartial(e){let t=Ib();return t.address=e.address??"",t.coins=e.coins?.map(n=>ir.Coin.fromPartial(n))||[],t}};function xb(){return{fromAddress:"",toAddress:"",amount:[]}}cn.MsgSend={encode(e,t=or._m0.Writer.create()){e.fromAddress!==""&&t.uint32(10).string(e.fromAddress),e.toAddress!==""&&t.uint32(18).string(e.toAddress);for(let n of e.amount)ir.Coin.encode(n,t.uint32(26).fork()).ldelim();return t},decode(e,t){let n=e instanceof or._m0.Reader?e:new or._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=xb();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.fromAddress=n.string();break;case 2:r.toAddress=n.string();break;case 3:r.amount.push(ir.Coin.decode(n,n.uint32()));break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{fromAddress:(0,Hu.isSet)(e.fromAddress)?String(e.fromAddress):"",toAddress:(0,Hu.isSet)(e.toAddress)?String(e.toAddress):"",amount:Array.isArray(e?.amount)?e.amount.map(t=>ir.Coin.fromJSON(t)):[]}},toJSON(e){let t={};return e.fromAddress!==void 0&&(t.fromAddress=e.fromAddress),e.toAddress!==void 0&&(t.toAddress=e.toAddress),e.amount?t.amount=e.amount.map(n=>n?ir.Coin.toJSON(n):void 0):t.amount=[],t},fromPartial(e){let t=xb();return t.fromAddress=e.fromAddress??"",t.toAddress=e.toAddress??"",t.amount=e.amount?.map(n=>ir.Coin.fromPartial(n))||[],t}};function Pb(){return{inputs:[],outputs:[]}}cn.MsgMultiSend={encode(e,t=or._m0.Writer.create()){for(let n of e.inputs)cn.Input.encode(n,t.uint32(10).fork()).ldelim();for(let n of e.outputs)cn.Output.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){let n=e instanceof or._m0.Reader?e:new or._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=Pb();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.inputs.push(cn.Input.decode(n,n.uint32()));break;case 2:r.outputs.push(cn.Output.decode(n,n.uint32()));break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{inputs:Array.isArray(e?.inputs)?e.inputs.map(t=>cn.Input.fromJSON(t)):[],outputs:Array.isArray(e?.outputs)?e.outputs.map(t=>cn.Output.fromJSON(t)):[]}},toJSON(e){let t={};return e.inputs?t.inputs=e.inputs.map(n=>n?cn.Input.toJSON(n):void 0):t.inputs=[],e.outputs?t.outputs=e.outputs.map(n=>n?cn.Output.toJSON(n):void 0):t.outputs=[],t},fromPartial(e){let t=Pb();return t.inputs=e.inputs?.map(n=>cn.Input.fromPartial(n))||[],t.outputs=e.outputs?.map(n=>cn.Output.fromPartial(n))||[],t}};or._m0.util.Long!==Sb.Long&&(or._m0.util.Long=Sb.Long,or._m0.configure())});var jc=L(wr=>{"use strict";B();R();Object.defineProperty(wr,"__esModule",{value:!0});wr.MsgTransfer=wr.Height=wr.protobufPackage=void 0;var Mn=xt(),qi=xt(),_d=Po(),Li=lr();wr.protobufPackage="ibc.applications.transfer.v1";function Bb(){return{revisionNumber:Mn.Long.UZERO,revisionHeight:Mn.Long.UZERO}}wr.Height={encode(e,t=qi._m0.Writer.create()){return e.revisionNumber.isZero()||t.uint32(8).uint64(e.revisionNumber),e.revisionHeight.isZero()||t.uint32(16).uint64(e.revisionHeight),t},decode(e,t){let n=e instanceof qi._m0.Reader?e:new qi._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=Bb();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.revisionNumber=n.uint64();break;case 2:r.revisionHeight=n.uint64();break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{revisionNumber:(0,Li.isSet)(e.revisionNumber)?Mn.Long.fromString(e.revisionNumber):Mn.Long.UZERO,revisionHeight:(0,Li.isSet)(e.revisionHeight)?Mn.Long.fromString(e.revisionHeight):Mn.Long.UZERO}},toJSON(e){let t={};return e.revisionNumber!==void 0&&(t.revisionNumber=(e.revisionNumber||Mn.Long.UZERO).toString()),e.revisionHeight!==void 0&&(t.revisionHeight=(e.revisionHeight||Mn.Long.UZERO).toString()),t},fromPartial(e){let t=Bb();return t.revisionNumber=e.revisionNumber!==void 0&&e.revisionNumber!==null?Mn.Long.fromValue(e.revisionNumber):Mn.Long.UZERO,t.revisionHeight=e.revisionHeight!==void 0&&e.revisionHeight!==null?Mn.Long.fromValue(e.revisionHeight):Mn.Long.UZERO,t}};function Rb(){return{sourcePort:"",sourceChannel:"",token:void 0,sender:"",receiver:"",timeoutHeight:void 0,timeoutTimestamp:Mn.Long.UZERO}}wr.MsgTransfer={encode(e,t=qi._m0.Writer.create()){return e.sourcePort!==""&&t.uint32(10).string(e.sourcePort),e.sourceChannel!==""&&t.uint32(18).string(e.sourceChannel),e.token!==void 0&&_d.Coin.encode(e.token,t.uint32(26).fork()).ldelim(),e.sender!==""&&t.uint32(34).string(e.sender),e.receiver!==""&&t.uint32(42).string(e.receiver),e.timeoutHeight!==void 0&&wr.Height.encode(e.timeoutHeight,t.uint32(50).fork()).ldelim(),e.timeoutTimestamp.isZero()||t.uint32(56).uint64(e.timeoutTimestamp),t},decode(e,t){let n=e instanceof qi._m0.Reader?e:new qi._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=Rb();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.sourcePort=n.string();break;case 2:r.sourceChannel=n.string();break;case 3:r.token=_d.Coin.decode(n,n.uint32());break;case 4:r.sender=n.string();break;case 5:r.receiver=n.string();break;case 6:r.timeoutHeight=wr.Height.decode(n,n.uint32());break;case 7:r.timeoutTimestamp=n.uint64();break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{sourcePort:(0,Li.isSet)(e.sourcePort)?String(e.sourcePort):"",sourceChannel:(0,Li.isSet)(e.sourceChannel)?String(e.sourceChannel):"",token:(0,Li.isSet)(e.token)?_d.Coin.fromJSON(e.token):void 0,sender:(0,Li.isSet)(e.sender)?String(e.sender):"",receiver:(0,Li.isSet)(e.receiver)?String(e.receiver):"",timeoutHeight:(0,Li.isSet)(e.timeoutHeight)?wr.Height.fromJSON(e.timeoutHeight):void 0,timeoutTimestamp:(0,Li.isSet)(e.timeoutTimestamp)?Mn.Long.fromString(e.timeoutTimestamp):Mn.Long.UZERO}},toJSON(e){let t={};return e.sourcePort!==void 0&&(t.sourcePort=e.sourcePort),e.sourceChannel!==void 0&&(t.sourceChannel=e.sourceChannel),e.token!==void 0&&(t.token=e.token?_d.Coin.toJSON(e.token):void 0),e.sender!==void 0&&(t.sender=e.sender),e.receiver!==void 0&&(t.receiver=e.receiver),e.timeoutHeight!==void 0&&(t.timeoutHeight=e.timeoutHeight?wr.Height.toJSON(e.timeoutHeight):void 0),e.timeoutTimestamp!==void 0&&(t.timeoutTimestamp=(e.timeoutTimestamp||Mn.Long.UZERO).toString()),t},fromPartial(e){let t=Rb();return t.sourcePort=e.sourcePort??"",t.sourceChannel=e.sourceChannel??"",t.token=e.token!==void 0&&e.token!==null?_d.Coin.fromPartial(e.token):void 0,t.sender=e.sender??"",t.receiver=e.receiver??"",t.timeoutHeight=e.timeoutHeight!==void 0&&e.timeoutHeight!==null?wr.Height.fromPartial(e.timeoutHeight):void 0,t.timeoutTimestamp=e.timeoutTimestamp!==void 0&&e.timeoutTimestamp!==null?Mn.Long.fromValue(e.timeoutTimestamp):Mn.Long.UZERO,t}};qi._m0.util.Long!==Mn.Long&&(qi._m0.util.Long=Mn.Long,qi._m0.configure())});var Tb=L(va=>{"use strict";B();R();Object.defineProperty(va,"__esModule",{value:!0});va.Timestamp=va.protobufPackage=void 0;var Uo=xt(),ba=xt(),Cb=lr();va.protobufPackage="google.protobuf";function Eb(){return{seconds:Uo.Long.ZERO,nanos:0}}va.Timestamp={encode(e,t=ba._m0.Writer.create()){return e.seconds.isZero()||t.uint32(8).int64(e.seconds),e.nanos!==0&&t.uint32(16).int32(e.nanos),t},decode(e,t){let n=e instanceof ba._m0.Reader?e:new ba._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=Eb();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.seconds=n.int64();break;case 2:r.nanos=n.int32();break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{seconds:(0,Cb.isSet)(e.seconds)?Uo.Long.fromString(e.seconds):Uo.Long.ZERO,nanos:(0,Cb.isSet)(e.nanos)?Number(e.nanos):0}},toJSON(e){let t={};return e.seconds!==void 0&&(t.seconds=(e.seconds||Uo.Long.ZERO).toString()),e.nanos!==void 0&&(t.nanos=Math.round(e.nanos)),t},fromPartial(e){let t=Eb();return t.seconds=e.seconds!==void 0&&e.seconds!==null?Uo.Long.fromValue(e.seconds):Uo.Long.ZERO,t.nanos=e.nanos??0,t}};ba._m0.util.Long!==Uo.Long&&(ba._m0.util.Long=Uo.Long,ba._m0.configure())});var $b=L(Mt=>{"use strict";B();R();Object.defineProperty(Mt,"__esModule",{value:!0});Mt.MsgUndelegate=Mt.MsgBeginRedelegate=Mt.MsgDelegate=Mt.MsgEditValidator=Mt.MsgCreateValidator=Mt.CommissionRates=Mt.Description=Mt.protobufPackage=void 0;var Ob=xt(),Xt=xt(),Id=pa(),wn=Po(),HU=Tb(),Ot=lr();Mt.protobufPackage="cosmos.staking.v1beta1";function Db(){return{moniker:"",identity:"",website:"",securityContact:"",details:""}}Mt.Description={encode(e,t=Xt._m0.Writer.create()){return e.moniker!==""&&t.uint32(10).string(e.moniker),e.identity!==""&&t.uint32(18).string(e.identity),e.website!==""&&t.uint32(26).string(e.website),e.securityContact!==""&&t.uint32(34).string(e.securityContact),e.details!==""&&t.uint32(42).string(e.details),t},decode(e,t){let n=e instanceof Xt._m0.Reader?e:new Xt._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=Db();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.moniker=n.string();break;case 2:r.identity=n.string();break;case 3:r.website=n.string();break;case 4:r.securityContact=n.string();break;case 5:r.details=n.string();break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{moniker:(0,Ot.isSet)(e.moniker)?String(e.moniker):"",identity:(0,Ot.isSet)(e.identity)?String(e.identity):"",website:(0,Ot.isSet)(e.website)?String(e.website):"",securityContact:(0,Ot.isSet)(e.securityContact)?String(e.securityContact):"",details:(0,Ot.isSet)(e.details)?String(e.details):""}},toJSON(e){let t={};return e.moniker!==void 0&&(t.moniker=e.moniker),e.identity!==void 0&&(t.identity=e.identity),e.website!==void 0&&(t.website=e.website),e.securityContact!==void 0&&(t.securityContact=e.securityContact),e.details!==void 0&&(t.details=e.details),t},fromPartial(e){let t=Db();return t.moniker=e.moniker??"",t.identity=e.identity??"",t.website=e.website??"",t.securityContact=e.securityContact??"",t.details=e.details??"",t}};function Nb(){return{rate:"",maxRate:"",maxChangeRate:""}}Mt.CommissionRates={encode(e,t=Xt._m0.Writer.create()){return e.rate!==""&&t.uint32(10).string(e.rate),e.maxRate!==""&&t.uint32(18).string(e.maxRate),e.maxChangeRate!==""&&t.uint32(26).string(e.maxChangeRate),t},decode(e,t){let n=e instanceof Xt._m0.Reader?e:new Xt._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=Nb();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.rate=n.string();break;case 2:r.maxRate=n.string();break;case 3:r.maxChangeRate=n.string();break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{rate:(0,Ot.isSet)(e.rate)?String(e.rate):"",maxRate:(0,Ot.isSet)(e.maxRate)?String(e.maxRate):"",maxChangeRate:(0,Ot.isSet)(e.maxChangeRate)?String(e.maxChangeRate):""}},toJSON(e){let t={};return e.rate!==void 0&&(t.rate=e.rate),e.maxRate!==void 0&&(t.maxRate=e.maxRate),e.maxChangeRate!==void 0&&(t.maxChangeRate=e.maxChangeRate),t},fromPartial(e){let t=Nb();return t.rate=e.rate??"",t.maxRate=e.maxRate??"",t.maxChangeRate=e.maxChangeRate??"",t}};function Lb(){return{description:void 0,commission:void 0,minSelfDelegation:"",delegatorAddress:"",validatorAddress:"",pubkey:void 0,value:void 0}}Mt.MsgCreateValidator={encode(e,t=Xt._m0.Writer.create()){return e.description!==void 0&&Mt.Description.encode(e.description,t.uint32(10).fork()).ldelim(),e.commission!==void 0&&Mt.CommissionRates.encode(e.commission,t.uint32(18).fork()).ldelim(),e.minSelfDelegation!==""&&t.uint32(26).string(e.minSelfDelegation),e.delegatorAddress!==""&&t.uint32(34).string(e.delegatorAddress),e.validatorAddress!==""&&t.uint32(42).string(e.validatorAddress),e.pubkey!==void 0&&Id.Any.encode(e.pubkey,t.uint32(50).fork()).ldelim(),e.value!==void 0&&wn.Coin.encode(e.value,t.uint32(58).fork()).ldelim(),t},decode(e,t){let n=e instanceof Xt._m0.Reader?e:new Xt._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=Lb();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.description=Mt.Description.decode(n,n.uint32());break;case 2:r.commission=Mt.CommissionRates.decode(n,n.uint32());break;case 3:r.minSelfDelegation=n.string();break;case 4:r.delegatorAddress=n.string();break;case 5:r.validatorAddress=n.string();break;case 6:r.pubkey=Id.Any.decode(n,n.uint32());break;case 7:r.value=wn.Coin.decode(n,n.uint32());break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{description:(0,Ot.isSet)(e.description)?Mt.Description.fromJSON(e.description):void 0,commission:(0,Ot.isSet)(e.commission)?Mt.CommissionRates.fromJSON(e.commission):void 0,minSelfDelegation:(0,Ot.isSet)(e.minSelfDelegation)?String(e.minSelfDelegation):"",delegatorAddress:(0,Ot.isSet)(e.delegatorAddress)?String(e.delegatorAddress):"",validatorAddress:(0,Ot.isSet)(e.validatorAddress)?String(e.validatorAddress):"",pubkey:(0,Ot.isSet)(e.pubkey)?Id.Any.fromJSON(e.pubkey):void 0,value:(0,Ot.isSet)(e.value)?wn.Coin.fromJSON(e.value):void 0}},toJSON(e){let t={};return e.description!==void 0&&(t.description=e.description?Mt.Description.toJSON(e.description):void 0),e.commission!==void 0&&(t.commission=e.commission?Mt.CommissionRates.toJSON(e.commission):void 0),e.minSelfDelegation!==void 0&&(t.minSelfDelegation=e.minSelfDelegation),e.delegatorAddress!==void 0&&(t.delegatorAddress=e.delegatorAddress),e.validatorAddress!==void 0&&(t.validatorAddress=e.validatorAddress),e.pubkey!==void 0&&(t.pubkey=e.pubkey?Id.Any.toJSON(e.pubkey):void 0),e.value!==void 0&&(t.value=e.value?wn.Coin.toJSON(e.value):void 0),t},fromPartial(e){let t=Lb();return t.description=e.description!==void 0&&e.description!==null?Mt.Description.fromPartial(e.description):void 0,t.commission=e.commission!==void 0&&e.commission!==null?Mt.CommissionRates.fromPartial(e.commission):void 0,t.minSelfDelegation=e.minSelfDelegation??"",t.delegatorAddress=e.delegatorAddress??"",t.validatorAddress=e.validatorAddress??"",t.pubkey=e.pubkey!==void 0&&e.pubkey!==null?Id.Any.fromPartial(e.pubkey):void 0,t.value=e.value!==void 0&&e.value!==null?wn.Coin.fromPartial(e.value):void 0,t}};function qb(){return{description:void 0,validatorAddress:"",commissionRate:"",minSelfDelegation:""}}Mt.MsgEditValidator={encode(e,t=Xt._m0.Writer.create()){return e.description!==void 0&&Mt.Description.encode(e.description,t.uint32(10).fork()).ldelim(),e.validatorAddress!==""&&t.uint32(18).string(e.validatorAddress),e.commissionRate!==""&&t.uint32(26).string(e.commissionRate),e.minSelfDelegation!==""&&t.uint32(34).string(e.minSelfDelegation),t},decode(e,t){let n=e instanceof Xt._m0.Reader?e:new Xt._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=qb();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.description=Mt.Description.decode(n,n.uint32());break;case 2:r.validatorAddress=n.string();break;case 3:r.commissionRate=n.string();break;case 4:r.minSelfDelegation=n.string();break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{description:(0,Ot.isSet)(e.description)?Mt.Description.fromJSON(e.description):void 0,validatorAddress:(0,Ot.isSet)(e.validatorAddress)?String(e.validatorAddress):"",commissionRate:(0,Ot.isSet)(e.commissionRate)?String(e.commissionRate):"",minSelfDelegation:(0,Ot.isSet)(e.minSelfDelegation)?String(e.minSelfDelegation):""}},toJSON(e){let t={};return e.description!==void 0&&(t.description=e.description?Mt.Description.toJSON(e.description):void 0),e.validatorAddress!==void 0&&(t.validatorAddress=e.validatorAddress),e.commissionRate!==void 0&&(t.commissionRate=e.commissionRate),e.minSelfDelegation!==void 0&&(t.minSelfDelegation=e.minSelfDelegation),t},fromPartial(e){let t=qb();return t.description=e.description!==void 0&&e.description!==null?Mt.Description.fromPartial(e.description):void 0,t.validatorAddress=e.validatorAddress??"",t.commissionRate=e.commissionRate??"",t.minSelfDelegation=e.minSelfDelegation??"",t}};function Fb(){return{delegatorAddress:"",validatorAddress:"",amount:void 0}}Mt.MsgDelegate={encode(e,t=Xt._m0.Writer.create()){return e.delegatorAddress!==""&&t.uint32(10).string(e.delegatorAddress),e.validatorAddress!==""&&t.uint32(18).string(e.validatorAddress),e.amount!==void 0&&wn.Coin.encode(e.amount,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof Xt._m0.Reader?e:new Xt._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=Fb();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.delegatorAddress=n.string();break;case 2:r.validatorAddress=n.string();break;case 3:r.amount=wn.Coin.decode(n,n.uint32());break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{delegatorAddress:(0,Ot.isSet)(e.delegatorAddress)?String(e.delegatorAddress):"",validatorAddress:(0,Ot.isSet)(e.validatorAddress)?String(e.validatorAddress):"",amount:(0,Ot.isSet)(e.amount)?wn.Coin.fromJSON(e.amount):void 0}},toJSON(e){let t={};return e.delegatorAddress!==void 0&&(t.delegatorAddress=e.delegatorAddress),e.validatorAddress!==void 0&&(t.validatorAddress=e.validatorAddress),e.amount!==void 0&&(t.amount=e.amount?wn.Coin.toJSON(e.amount):void 0),t},fromPartial(e){let t=Fb();return t.delegatorAddress=e.delegatorAddress??"",t.validatorAddress=e.validatorAddress??"",t.amount=e.amount!==void 0&&e.amount!==null?wn.Coin.fromPartial(e.amount):void 0,t}};function Hb(){return{delegatorAddress:"",validatorSrcAddress:"",validatorDstAddress:"",amount:void 0}}Mt.MsgBeginRedelegate={encode(e,t=Xt._m0.Writer.create()){return e.delegatorAddress!==""&&t.uint32(10).string(e.delegatorAddress),e.validatorSrcAddress!==""&&t.uint32(18).string(e.validatorSrcAddress),e.validatorDstAddress!==""&&t.uint32(26).string(e.validatorDstAddress),e.amount!==void 0&&wn.Coin.encode(e.amount,t.uint32(34).fork()).ldelim(),t},decode(e,t){let n=e instanceof Xt._m0.Reader?e:new Xt._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=Hb();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.delegatorAddress=n.string();break;case 2:r.validatorSrcAddress=n.string();break;case 3:r.validatorDstAddress=n.string();break;case 4:r.amount=wn.Coin.decode(n,n.uint32());break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{delegatorAddress:(0,Ot.isSet)(e.delegatorAddress)?String(e.delegatorAddress):"",validatorSrcAddress:(0,Ot.isSet)(e.validatorSrcAddress)?String(e.validatorSrcAddress):"",validatorDstAddress:(0,Ot.isSet)(e.validatorDstAddress)?String(e.validatorDstAddress):"",amount:(0,Ot.isSet)(e.amount)?wn.Coin.fromJSON(e.amount):void 0}},toJSON(e){let t={};return e.delegatorAddress!==void 0&&(t.delegatorAddress=e.delegatorAddress),e.validatorSrcAddress!==void 0&&(t.validatorSrcAddress=e.validatorSrcAddress),e.validatorDstAddress!==void 0&&(t.validatorDstAddress=e.validatorDstAddress),e.amount!==void 0&&(t.amount=e.amount?wn.Coin.toJSON(e.amount):void 0),t},fromPartial(e){let t=Hb();return t.delegatorAddress=e.delegatorAddress??"",t.validatorSrcAddress=e.validatorSrcAddress??"",t.validatorDstAddress=e.validatorDstAddress??"",t.amount=e.amount!==void 0&&e.amount!==null?wn.Coin.fromPartial(e.amount):void 0,t}};function Kb(){return{delegatorAddress:"",validatorAddress:"",amount:void 0}}Mt.MsgUndelegate={encode(e,t=Xt._m0.Writer.create()){return e.delegatorAddress!==""&&t.uint32(10).string(e.delegatorAddress),e.validatorAddress!==""&&t.uint32(18).string(e.validatorAddress),e.amount!==void 0&&wn.Coin.encode(e.amount,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof Xt._m0.Reader?e:new Xt._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=Kb();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.delegatorAddress=n.string();break;case 2:r.validatorAddress=n.string();break;case 3:r.amount=wn.Coin.decode(n,n.uint32());break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{delegatorAddress:(0,Ot.isSet)(e.delegatorAddress)?String(e.delegatorAddress):"",validatorAddress:(0,Ot.isSet)(e.validatorAddress)?String(e.validatorAddress):"",amount:(0,Ot.isSet)(e.amount)?wn.Coin.fromJSON(e.amount):void 0}},toJSON(e){let t={};return e.delegatorAddress!==void 0&&(t.delegatorAddress=e.delegatorAddress),e.validatorAddress!==void 0&&(t.validatorAddress=e.validatorAddress),e.amount!==void 0&&(t.amount=e.amount?wn.Coin.toJSON(e.amount):void 0),t},fromPartial(e){let t=Kb();return t.delegatorAddress=e.delegatorAddress??"",t.validatorAddress=e.validatorAddress??"",t.amount=e.amount!==void 0&&e.amount!==null?wn.Coin.fromPartial(e.amount):void 0,t}};Xt._m0.util.Long!==Ob.Long&&(Xt._m0.util.Long=Ob.Long,Xt._m0.configure())});var nl=L(Lt=>{"use strict";B();R();Object.defineProperty(Lt,"__esModule",{value:!0});Lt.registerExtraTypes=Lt.registry=Lt.defaultRegistryTypes=Lt.Registry=Lt.isTxBodyEncodeObject=Lt.isTelescopeGeneratedCodec=Lt.isTsProtoGeneratedType=Lt.stakingTypes=Lt.ibcTypes=Lt.bankTypes=void 0;var tl=Ub(),Jb=Po(),el=lr(),G_=pa(),Y_=jc(),xd=$b();Lt.bankTypes=[["/cosmos.bank.v1beta1.MsgMultiSend",tl.MsgMultiSend],["/cosmos.bank.v1beta1.MsgSend",tl.MsgSend]];Lt.ibcTypes=[["/ibc.applications.transfer.v1.MsgTransfer",Y_.MsgTransfer]];Lt.stakingTypes=[["/cosmos.staking.v1beta1.MsgBeginRedelegate",xd.MsgBeginRedelegate],["/cosmos.staking.v1beta1.MsgCreateValidator",xd.MsgCreateValidator],["/cosmos.staking.v1beta1.MsgDelegate",xd.MsgDelegate],["/cosmos.staking.v1beta1.MsgEditValidator",xd.MsgEditValidator],["/cosmos.staking.v1beta1.MsgUndelegate",xd.MsgUndelegate]];function zb(e){return typeof e.fromPartial=="function"}Lt.isTsProtoGeneratedType=zb;function Zb(e){return typeof e.fromPartial=="function"}Lt.isTelescopeGeneratedCodec=Zb;var Wb={cosmosCoin:"/cosmos.base.v1beta1.Coin",cosmosMsgSend:"/cosmos.bank.v1beta1.MsgSend",cosmosTxBody:"/cosmos.tx.v1beta1.TxBody",googleAny:"/google.protobuf.Any"};function Vb(e){return e.typeUrl==="/cosmos.tx.v1beta1.TxBody"}Lt.isTxBodyEncodeObject=Vb;var Ku=class{constructor(t){let{cosmosCoin:n,cosmosMsgSend:i}=Wb;this.types=t?new Map([...t]):new Map([[n,Jb.Coin],[i,tl.MsgSend]])}register(t,n){this.types.set(t,n)}lookupType(t){return this.types.get(t)}lookupTypeWithError(t){let n=this.lookupType(t);if(!n)throw new Error(`Unregistered type url: ${t}`);return n}encode(t){let{value:n,typeUrl:i}=t;if(Vb(t))return this.encodeTxBody(n);let r=this.lookupTypeWithError(i),o;return zb(r)||Zb(r)?o=r.fromPartial(n):o=r.create(n),r.encode(o).finish()}encodeAsAny(t){let n=this.encode(t);return G_.Any.fromPartial({typeUrl:t.typeUrl,value:n})}encodeTxBody(t){let n=t.messages.map(r=>this.encodeAsAny(r)),i=el.TxBody.fromPartial({...t,messages:n});return el.TxBody.encode(i).finish()}decode({typeUrl:t,value:n}){if(t===Wb.cosmosTxBody)return this.decodeTxBody(n);let r=this.lookupTypeWithError(t).decode(n);return Object.entries(r).forEach(([o,f])=>{typeof C.Buffer<"u"&&typeof C.Buffer.isBuffer<"u"&&C.Buffer.isBuffer(f)&&(r[o]=Uint8Array.from(f))}),r}decodeTxBody(t){let n=el.TxBody.decode(t);return{...n,messages:n.messages.map(({typeUrl:i,value:r})=>{if(!i)throw new Error("Missing type_url in Any");if(!r)throw new Error("Missing value in Any");return this.decode({typeUrl:i,value:r})})}}};Lt.Registry=Ku;Lt.defaultRegistryTypes=[["/cosmos.base.v1beta1.Coin",Jb.Coin],...Lt.bankTypes,...Lt.stakingTypes,...Lt.ibcTypes];function X_(){return new Ku(Lt.defaultRegistryTypes)}Lt.registry=X_();function Q_(e){e&&e.forEach(t=>{Lt.registry.register(t[0],t[1])})}Lt.registerExtraTypes=Q_});var m2=L(Ae=>{"use strict";B();R();Object.defineProperty(Ae,"__esModule",{value:!0});Ae.MsgExitSwapExternAmountOutResponse=Ae.MsgExitSwapExternAmountOut=Ae.MsgExitSwapShareAmountInResponse=Ae.MsgExitSwapShareAmountIn=Ae.MsgJoinSwapShareAmountOutResponse=Ae.MsgJoinSwapShareAmountOut=Ae.MsgJoinSwapExternAmountInResponse=Ae.MsgJoinSwapExternAmountIn=Ae.MsgSwapExactAmountOutResponse=Ae.MsgSwapExactAmountOut=Ae.SwapAmountOutRoute=Ae.MsgSwapExactAmountInResponse=Ae.MsgSwapExactAmountIn=Ae.SwapAmountInRoute=Ae.MsgExitPoolResponse=Ae.MsgExitPool=Ae.MsgJoinPoolResponse=Ae.MsgJoinPool=void 0;var Q=xt(),Ct=Po(),ft=lr();function Gb(){return{sender:"",poolId:Q.Long.UZERO,shareOutAmount:"",tokenInMaxs:[]}}Ae.MsgJoinPool={encode(e,t=Q._m0.Writer.create()){e.sender!==""&&t.uint32(10).string(e.sender),e.poolId.isZero()||t.uint32(16).uint64(e.poolId),e.shareOutAmount!==""&&t.uint32(26).string(e.shareOutAmount);for(let n of e.tokenInMaxs)Ct.Coin.encode(n,t.uint32(34).fork()).ldelim();return t},decode(e,t){let n=e instanceof Q._m0.Reader?e:new Q._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=Gb();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.sender=n.string();break;case 2:r.poolId=n.uint64();break;case 3:r.shareOutAmount=n.string();break;case 4:r.tokenInMaxs.push(Ct.Coin.decode(n,n.uint32()));break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{sender:(0,ft.isSet)(e.sender)?String(e.sender):"",poolId:(0,ft.isSet)(e.poolId)?Q.Long.fromString(e.poolId):Q.Long.UZERO,shareOutAmount:(0,ft.isSet)(e.shareOutAmount)?String(e.shareOutAmount):"",tokenInMaxs:Array.isArray(e?.tokenInMaxs)?e.tokenInMaxs.map(t=>Ct.Coin.fromJSON(t)):[]}},toJSON(e){let t={};return e.sender!==void 0&&(t.sender=e.sender),e.poolId!==void 0&&(t.poolId=(e.poolId||Q.Long.UZERO).toString()),e.shareOutAmount!==void 0&&(t.shareOutAmount=e.shareOutAmount),e.tokenInMaxs?t.tokenInMaxs=e.tokenInMaxs.map(n=>n?Ct.Coin.toJSON(n):void 0):t.tokenInMaxs=[],t},fromPartial(e){let t=Gb();return t.sender=e.sender??"",t.poolId=e.poolId!==void 0&&e.poolId!==null?Q.Long.fromValue(e.poolId):Q.Long.UZERO,t.shareOutAmount=e.shareOutAmount??"",t.tokenInMaxs=e.tokenInMaxs?.map(n=>Ct.Coin.fromPartial(n))||[],t}};function Yb(){return{}}Ae.MsgJoinPoolResponse={encode(e,t=Q._m0.Writer.create()){return t},decode(e,t){let n=e instanceof Q._m0.Reader?e:new Q._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=Yb();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){default:n.skipType(o&7);break}}return r},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return Yb()}};function Xb(){return{sender:"",poolId:Q.Long.UZERO,shareInAmount:"",tokenOutMins:[]}}Ae.MsgExitPool={encode(e,t=Q._m0.Writer.create()){e.sender!==""&&t.uint32(10).string(e.sender),e.poolId.isZero()||t.uint32(16).uint64(e.poolId),e.shareInAmount!==""&&t.uint32(26).string(e.shareInAmount);for(let n of e.tokenOutMins)Ct.Coin.encode(n,t.uint32(34).fork()).ldelim();return t},decode(e,t){let n=e instanceof Q._m0.Reader?e:new Q._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=Xb();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.sender=n.string();break;case 2:r.poolId=n.uint64();break;case 3:r.shareInAmount=n.string();break;case 4:r.tokenOutMins.push(Ct.Coin.decode(n,n.uint32()));break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{sender:(0,ft.isSet)(e.sender)?String(e.sender):"",poolId:(0,ft.isSet)(e.poolId)?Q.Long.fromString(e.poolId):Q.Long.UZERO,shareInAmount:(0,ft.isSet)(e.shareInAmount)?String(e.shareInAmount):"",tokenOutMins:Array.isArray(e?.tokenOutMins)?e.tokenOutMins.map(t=>Ct.Coin.fromJSON(t)):[]}},toJSON(e){let t={};return e.sender!==void 0&&(t.sender=e.sender),e.poolId!==void 0&&(t.poolId=(e.poolId||Q.Long.UZERO).toString()),e.shareInAmount!==void 0&&(t.shareInAmount=e.shareInAmount),e.tokenOutMins?t.tokenOutMins=e.tokenOutMins.map(n=>n?Ct.Coin.toJSON(n):void 0):t.tokenOutMins=[],t},fromPartial(e){let t=Xb();return t.sender=e.sender??"",t.poolId=e.poolId!==void 0&&e.poolId!==null?Q.Long.fromValue(e.poolId):Q.Long.UZERO,t.shareInAmount=e.shareInAmount??"",t.tokenOutMins=e.tokenOutMins?.map(n=>Ct.Coin.fromPartial(n))||[],t}};function Qb(){return{}}Ae.MsgExitPoolResponse={encode(e,t=Q._m0.Writer.create()){return t},decode(e,t){let n=e instanceof Q._m0.Reader?e:new Q._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=Qb();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){default:n.skipType(o&7);break}}return r},fromJSON(e){return{}},toJSON(e){return{}},fromPartial(e){return Qb()}};function jb(){return{poolId:Q.Long.UZERO,tokenOutDenom:""}}Ae.SwapAmountInRoute={encode(e,t=Q._m0.Writer.create()){return e.poolId.isZero()||t.uint32(8).uint64(e.poolId),e.tokenOutDenom!==""&&t.uint32(18).string(e.tokenOutDenom),t},decode(e,t){let n=e instanceof Q._m0.Reader?e:new Q._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=jb();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.poolId=n.uint64();break;case 2:r.tokenOutDenom=n.string();break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{poolId:(0,ft.isSet)(e.poolId)?Q.Long.fromString(e.poolId):Q.Long.UZERO,tokenOutDenom:(0,ft.isSet)(e.tokenOutDenom)?String(e.tokenOutDenom):""}},toJSON(e){let t={};return e.poolId!==void 0&&(t.poolId=(e.poolId||Q.Long.UZERO).toString()),e.tokenOutDenom!==void 0&&(t.tokenOutDenom=e.tokenOutDenom),t},fromPartial(e){let t=jb();return t.poolId=e.poolId!==void 0&&e.poolId!==null?Q.Long.fromValue(e.poolId):Q.Long.UZERO,t.tokenOutDenom=e.tokenOutDenom??"",t}};function e2(){return{sender:"",routes:[],tokenIn:void 0,tokenOutMinAmount:""}}Ae.MsgSwapExactAmountIn={encode(e,t=Q._m0.Writer.create()){e.sender!==""&&t.uint32(10).string(e.sender);for(let n of e.routes)Ae.SwapAmountInRoute.encode(n,t.uint32(18).fork()).ldelim();return e.tokenIn!==void 0&&Ct.Coin.encode(e.tokenIn,t.uint32(26).fork()).ldelim(),e.tokenOutMinAmount!==""&&t.uint32(34).string(e.tokenOutMinAmount),t},decode(e,t){let n=e instanceof Q._m0.Reader?e:new Q._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=e2();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.sender=n.string();break;case 2:r.routes.push(Ae.SwapAmountInRoute.decode(n,n.uint32()));break;case 3:r.tokenIn=Ct.Coin.decode(n,n.uint32());break;case 4:r.tokenOutMinAmount=n.string();break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{sender:(0,ft.isSet)(e.sender)?String(e.sender):"",routes:Array.isArray(e?.routes)?e.routes.map(t=>Ae.SwapAmountInRoute.fromJSON(t)):[],tokenIn:(0,ft.isSet)(e.tokenIn)?Ct.Coin.fromJSON(e.tokenIn):void 0,tokenOutMinAmount:(0,ft.isSet)(e.tokenOutMinAmount)?String(e.tokenOutMinAmount):""}},toJSON(e){let t={};return e.sender!==void 0&&(t.sender=e.sender),e.routes?t.routes=e.routes.map(n=>n?Ae.SwapAmountInRoute.toJSON(n):void 0):t.routes=[],e.tokenIn!==void 0&&(t.tokenIn=e.tokenIn?Ct.Coin.toJSON(e.tokenIn):void 0),e.tokenOutMinAmount!==void 0&&(t.tokenOutMinAmount=e.tokenOutMinAmount),t},fromPartial(e){let t=e2();return t.sender=e.sender??"",t.routes=e.routes?.map(n=>Ae.SwapAmountInRoute.fromPartial(n))||[],t.tokenIn=e.tokenIn!==void 0&&e.tokenIn!==null?Ct.Coin.fromPartial(e.tokenIn):void 0,t.tokenOutMinAmount=e.tokenOutMinAmount??"",t}};function t2(){return{tokenOutAmount:""}}Ae.MsgSwapExactAmountInResponse={encode(e,t=Q._m0.Writer.create()){return e.tokenOutAmount!==""&&t.uint32(10).string(e.tokenOutAmount),t},decode(e,t){let n=e instanceof Q._m0.Reader?e:new Q._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=t2();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.tokenOutAmount=n.string();break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{tokenOutAmount:(0,ft.isSet)(e.tokenOutAmount)?String(e.tokenOutAmount):""}},toJSON(e){let t={};return e.tokenOutAmount!==void 0&&(t.tokenOutAmount=e.tokenOutAmount),t},fromPartial(e){let t=t2();return t.tokenOutAmount=e.tokenOutAmount??"",t}};function n2(){return{poolId:Q.Long.UZERO,tokenInDenom:""}}Ae.SwapAmountOutRoute={encode(e,t=Q._m0.Writer.create()){return e.poolId.isZero()||t.uint32(8).uint64(e.poolId),e.tokenInDenom!==""&&t.uint32(18).string(e.tokenInDenom),t},decode(e,t){let n=e instanceof Q._m0.Reader?e:new Q._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=n2();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.poolId=n.uint64();break;case 2:r.tokenInDenom=n.string();break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{poolId:(0,ft.isSet)(e.poolId)?Q.Long.fromString(e.poolId):Q.Long.UZERO,tokenInDenom:(0,ft.isSet)(e.tokenInDenom)?String(e.tokenInDenom):""}},toJSON(e){let t={};return e.poolId!==void 0&&(t.poolId=(e.poolId||Q.Long.UZERO).toString()),e.tokenInDenom!==void 0&&(t.tokenInDenom=e.tokenInDenom),t},fromPartial(e){let t=n2();return t.poolId=e.poolId!==void 0&&e.poolId!==null?Q.Long.fromValue(e.poolId):Q.Long.UZERO,t.tokenInDenom=e.tokenInDenom??"",t}};function r2(){return{sender:"",routes:[],tokenInMaxAmount:"",tokenOut:void 0}}Ae.MsgSwapExactAmountOut={encode(e,t=Q._m0.Writer.create()){e.sender!==""&&t.uint32(10).string(e.sender);for(let n of e.routes)Ae.SwapAmountOutRoute.encode(n,t.uint32(18).fork()).ldelim();return e.tokenInMaxAmount!==""&&t.uint32(26).string(e.tokenInMaxAmount),e.tokenOut!==void 0&&Ct.Coin.encode(e.tokenOut,t.uint32(34).fork()).ldelim(),t},decode(e,t){let n=e instanceof Q._m0.Reader?e:new Q._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=r2();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.sender=n.string();break;case 2:r.routes.push(Ae.SwapAmountOutRoute.decode(n,n.uint32()));break;case 3:r.tokenInMaxAmount=n.string();break;case 4:r.tokenOut=Ct.Coin.decode(n,n.uint32());break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{sender:(0,ft.isSet)(e.sender)?String(e.sender):"",routes:Array.isArray(e?.routes)?e.routes.map(t=>Ae.SwapAmountOutRoute.fromJSON(t)):[],tokenInMaxAmount:(0,ft.isSet)(e.tokenInMaxAmount)?String(e.tokenInMaxAmount):"",tokenOut:(0,ft.isSet)(e.tokenOut)?Ct.Coin.fromJSON(e.tokenOut):void 0}},toJSON(e){let t={};return e.sender!==void 0&&(t.sender=e.sender),e.routes?t.routes=e.routes.map(n=>n?Ae.SwapAmountOutRoute.toJSON(n):void 0):t.routes=[],e.tokenInMaxAmount!==void 0&&(t.tokenInMaxAmount=e.tokenInMaxAmount),e.tokenOut!==void 0&&(t.tokenOut=e.tokenOut?Ct.Coin.toJSON(e.tokenOut):void 0),t},fromPartial(e){let t=r2();return t.sender=e.sender??"",t.routes=e.routes?.map(n=>Ae.SwapAmountOutRoute.fromPartial(n))||[],t.tokenInMaxAmount=e.tokenInMaxAmount??"",t.tokenOut=e.tokenOut!==void 0&&e.tokenOut!==null?Ct.Coin.fromPartial(e.tokenOut):void 0,t}};function i2(){return{tokenInAmount:""}}Ae.MsgSwapExactAmountOutResponse={encode(e,t=Q._m0.Writer.create()){return e.tokenInAmount!==""&&t.uint32(10).string(e.tokenInAmount),t},decode(e,t){let n=e instanceof Q._m0.Reader?e:new Q._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=i2();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.tokenInAmount=n.string();break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{tokenInAmount:(0,ft.isSet)(e.tokenInAmount)?String(e.tokenInAmount):""}},toJSON(e){let t={};return e.tokenInAmount!==void 0&&(t.tokenInAmount=e.tokenInAmount),t},fromPartial(e){let t=i2();return t.tokenInAmount=e.tokenInAmount??"",t}};function o2(){return{sender:"",poolId:Q.Long.UZERO,tokenIn:void 0,shareOutMinAmount:""}}Ae.MsgJoinSwapExternAmountIn={encode(e,t=Q._m0.Writer.create()){return e.sender!==""&&t.uint32(10).string(e.sender),e.poolId.isZero()||t.uint32(16).uint64(e.poolId),e.tokenIn!==void 0&&Ct.Coin.encode(e.tokenIn,t.uint32(26).fork()).ldelim(),e.shareOutMinAmount!==""&&t.uint32(34).string(e.shareOutMinAmount),t},decode(e,t){let n=e instanceof Q._m0.Reader?e:new Q._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=o2();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.sender=n.string();break;case 2:r.poolId=n.uint64();break;case 3:r.tokenIn=Ct.Coin.decode(n,n.uint32());break;case 4:r.shareOutMinAmount=n.string();break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{sender:(0,ft.isSet)(e.sender)?String(e.sender):"",poolId:(0,ft.isSet)(e.poolId)?Q.Long.fromString(e.poolId):Q.Long.UZERO,tokenIn:(0,ft.isSet)(e.tokenIn)?Ct.Coin.fromJSON(e.tokenIn):void 0,shareOutMinAmount:(0,ft.isSet)(e.shareOutMinAmount)?String(e.shareOutMinAmount):""}},toJSON(e){let t={};return e.sender!==void 0&&(t.sender=e.sender),e.poolId!==void 0&&(t.poolId=(e.poolId||Q.Long.UZERO).toString()),e.tokenIn!==void 0&&(t.tokenIn=e.tokenIn?Ct.Coin.toJSON(e.tokenIn):void 0),e.shareOutMinAmount!==void 0&&(t.shareOutMinAmount=e.shareOutMinAmount),t},fromPartial(e){let t=o2();return t.sender=e.sender??"",t.poolId=e.poolId!==void 0&&e.poolId!==null?Q.Long.fromValue(e.poolId):Q.Long.UZERO,t.tokenIn=e.tokenIn!==void 0&&e.tokenIn!==null?Ct.Coin.fromPartial(e.tokenIn):void 0,t.shareOutMinAmount=e.shareOutMinAmount??"",t}};function s2(){return{shareOutAmount:""}}Ae.MsgJoinSwapExternAmountInResponse={encode(e,t=Q._m0.Writer.create()){return e.shareOutAmount!==""&&t.uint32(10).string(e.shareOutAmount),t},decode(e,t){let n=e instanceof Q._m0.Reader?e:new Q._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=s2();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.shareOutAmount=n.string();break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{shareOutAmount:(0,ft.isSet)(e.shareOutAmount)?String(e.shareOutAmount):""}},toJSON(e){let t={};return e.shareOutAmount!==void 0&&(t.shareOutAmount=e.shareOutAmount),t},fromPartial(e){let t=s2();return t.shareOutAmount=e.shareOutAmount??"",t}};function a2(){return{sender:"",poolId:Q.Long.UZERO,tokenInDenom:"",shareOutAmount:"",tokenInMaxAmount:""}}Ae.MsgJoinSwapShareAmountOut={encode(e,t=Q._m0.Writer.create()){return e.sender!==""&&t.uint32(10).string(e.sender),e.poolId.isZero()||t.uint32(16).uint64(e.poolId),e.tokenInDenom!==""&&t.uint32(26).string(e.tokenInDenom),e.shareOutAmount!==""&&t.uint32(34).string(e.shareOutAmount),e.tokenInMaxAmount!==""&&t.uint32(42).string(e.tokenInMaxAmount),t},decode(e,t){let n=e instanceof Q._m0.Reader?e:new Q._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=a2();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.sender=n.string();break;case 2:r.poolId=n.uint64();break;case 3:r.tokenInDenom=n.string();break;case 4:r.shareOutAmount=n.string();break;case 5:r.tokenInMaxAmount=n.string();break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{sender:(0,ft.isSet)(e.sender)?String(e.sender):"",poolId:(0,ft.isSet)(e.poolId)?Q.Long.fromString(e.poolId):Q.Long.UZERO,tokenInDenom:(0,ft.isSet)(e.tokenInDenom)?String(e.tokenInDenom):"",shareOutAmount:(0,ft.isSet)(e.shareOutAmount)?String(e.shareOutAmount):"",tokenInMaxAmount:(0,ft.isSet)(e.tokenInMaxAmount)?String(e.tokenInMaxAmount):""}},toJSON(e){let t={};return e.sender!==void 0&&(t.sender=e.sender),e.poolId!==void 0&&(t.poolId=(e.poolId||Q.Long.UZERO).toString()),e.tokenInDenom!==void 0&&(t.tokenInDenom=e.tokenInDenom),e.shareOutAmount!==void 0&&(t.shareOutAmount=e.shareOutAmount),e.tokenInMaxAmount!==void 0&&(t.tokenInMaxAmount=e.tokenInMaxAmount),t},fromPartial(e){let t=a2();return t.sender=e.sender??"",t.poolId=e.poolId!==void 0&&e.poolId!==null?Q.Long.fromValue(e.poolId):Q.Long.UZERO,t.tokenInDenom=e.tokenInDenom??"",t.shareOutAmount=e.shareOutAmount??"",t.tokenInMaxAmount=e.tokenInMaxAmount??"",t}};function d2(){return{tokenInAmount:""}}Ae.MsgJoinSwapShareAmountOutResponse={encode(e,t=Q._m0.Writer.create()){return e.tokenInAmount!==""&&t.uint32(10).string(e.tokenInAmount),t},decode(e,t){let n=e instanceof Q._m0.Reader?e:new Q._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=d2();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.tokenInAmount=n.string();break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{tokenInAmount:(0,ft.isSet)(e.tokenInAmount)?String(e.tokenInAmount):""}},toJSON(e){let t={};return e.tokenInAmount!==void 0&&(t.tokenInAmount=e.tokenInAmount),t},fromPartial(e){let t=d2();return t.tokenInAmount=e.tokenInAmount??"",t}};function u2(){return{sender:"",poolId:Q.Long.UZERO,tokenOutDenom:"",shareInAmount:"",tokenOutMinAmount:""}}Ae.MsgExitSwapShareAmountIn={encode(e,t=Q._m0.Writer.create()){return e.sender!==""&&t.uint32(10).string(e.sender),e.poolId.isZero()||t.uint32(16).uint64(e.poolId),e.tokenOutDenom!==""&&t.uint32(26).string(e.tokenOutDenom),e.shareInAmount!==""&&t.uint32(34).string(e.shareInAmount),e.tokenOutMinAmount!==""&&t.uint32(42).string(e.tokenOutMinAmount),t},decode(e,t){let n=e instanceof Q._m0.Reader?e:new Q._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=u2();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.sender=n.string();break;case 2:r.poolId=n.uint64();break;case 3:r.tokenOutDenom=n.string();break;case 4:r.shareInAmount=n.string();break;case 5:r.tokenOutMinAmount=n.string();break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{sender:(0,ft.isSet)(e.sender)?String(e.sender):"",poolId:(0,ft.isSet)(e.poolId)?Q.Long.fromString(e.poolId):Q.Long.UZERO,tokenOutDenom:(0,ft.isSet)(e.tokenOutDenom)?String(e.tokenOutDenom):"",shareInAmount:(0,ft.isSet)(e.shareInAmount)?String(e.shareInAmount):"",tokenOutMinAmount:(0,ft.isSet)(e.tokenOutMinAmount)?String(e.tokenOutMinAmount):""}},toJSON(e){let t={};return e.sender!==void 0&&(t.sender=e.sender),e.poolId!==void 0&&(t.poolId=(e.poolId||Q.Long.UZERO).toString()),e.tokenOutDenom!==void 0&&(t.tokenOutDenom=e.tokenOutDenom),e.shareInAmount!==void 0&&(t.shareInAmount=e.shareInAmount),e.tokenOutMinAmount!==void 0&&(t.tokenOutMinAmount=e.tokenOutMinAmount),t},fromPartial(e){let t=u2();return t.sender=e.sender??"",t.poolId=e.poolId!==void 0&&e.poolId!==null?Q.Long.fromValue(e.poolId):Q.Long.UZERO,t.tokenOutDenom=e.tokenOutDenom??"",t.shareInAmount=e.shareInAmount??"",t.tokenOutMinAmount=e.tokenOutMinAmount??"",t}};function f2(){return{tokenOutAmount:""}}Ae.MsgExitSwapShareAmountInResponse={encode(e,t=Q._m0.Writer.create()){return e.tokenOutAmount!==""&&t.uint32(10).string(e.tokenOutAmount),t},decode(e,t){let n=e instanceof Q._m0.Reader?e:new Q._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=f2();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.tokenOutAmount=n.string();break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{tokenOutAmount:(0,ft.isSet)(e.tokenOutAmount)?String(e.tokenOutAmount):""}},toJSON(e){let t={};return e.tokenOutAmount!==void 0&&(t.tokenOutAmount=e.tokenOutAmount),t},fromPartial(e){let t=f2();return t.tokenOutAmount=e.tokenOutAmount??"",t}};function c2(){return{sender:"",poolId:Q.Long.UZERO,tokenOut:void 0,shareInMaxAmount:""}}Ae.MsgExitSwapExternAmountOut={encode(e,t=Q._m0.Writer.create()){return e.sender!==""&&t.uint32(10).string(e.sender),e.poolId.isZero()||t.uint32(16).uint64(e.poolId),e.tokenOut!==void 0&&Ct.Coin.encode(e.tokenOut,t.uint32(26).fork()).ldelim(),e.shareInMaxAmount!==""&&t.uint32(34).string(e.shareInMaxAmount),t},decode(e,t){let n=e instanceof Q._m0.Reader?e:new Q._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=c2();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.sender=n.string();break;case 2:r.poolId=n.uint64();break;case 3:r.tokenOut=Ct.Coin.decode(n,n.uint32());break;case 4:r.shareInMaxAmount=n.string();break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{sender:(0,ft.isSet)(e.sender)?String(e.sender):"",poolId:(0,ft.isSet)(e.poolId)?Q.Long.fromString(e.poolId):Q.Long.UZERO,tokenOut:(0,ft.isSet)(e.tokenOut)?Ct.Coin.fromJSON(e.tokenOut):void 0,shareInMaxAmount:(0,ft.isSet)(e.shareInMaxAmount)?String(e.shareInMaxAmount):""}},toJSON(e){let t={};return e.sender!==void 0&&(t.sender=e.sender),e.poolId!==void 0&&(t.poolId=(e.poolId||Q.Long.UZERO).toString()),e.tokenOut!==void 0&&(t.tokenOut=e.tokenOut?Ct.Coin.toJSON(e.tokenOut):void 0),e.shareInMaxAmount!==void 0&&(t.shareInMaxAmount=e.shareInMaxAmount),t},fromPartial(e){let t=c2();return t.sender=e.sender??"",t.poolId=e.poolId!==void 0&&e.poolId!==null?Q.Long.fromValue(e.poolId):Q.Long.UZERO,t.tokenOut=e.tokenOut!==void 0&&e.tokenOut!==null?Ct.Coin.fromPartial(e.tokenOut):void 0,t.shareInMaxAmount=e.shareInMaxAmount??"",t}};function l2(){return{shareInAmount:""}}Ae.MsgExitSwapExternAmountOutResponse={encode(e,t=Q._m0.Writer.create()){return e.shareInAmount!==""&&t.uint32(10).string(e.shareInAmount),t},decode(e,t){let n=e instanceof Q._m0.Reader?e:new Q._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=l2();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.shareInAmount=n.string();break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{shareInAmount:(0,ft.isSet)(e.shareInAmount)?String(e.shareInAmount):""}},toJSON(e){let t={};return e.shareInAmount!==void 0&&(t.shareInAmount=e.shareInAmount),t},fromPartial(e){let t=l2();return t.shareInAmount=e.shareInAmount??"",t}}});var p2=L(Bo=>{"use strict";B();R();Object.defineProperty(Bo,"__esModule",{value:!0});Bo.utf8Write=Bo.utf8Read=Bo.utf8Length=void 0;function j_(e){let t=0,n=0;for(let i=0;i<e.length;++i)n=e.charCodeAt(i),n<128?t+=1:n<2048?t+=2:(n&64512)===55296&&(e.charCodeAt(i+1)&64512)===56320?(++i,t+=4):t+=3;return t}Bo.utf8Length=j_;function e4(e,t,n){if(n-t<1)return"";let r=[],o=[],f=0,c;for(;t<n;)c=e[t++],c<128?r[f++]=c:c>191&&c<224?r[f++]=(c&31)<<6|e[t++]&63:c>239&&c<365?(c=((c&7)<<18|(e[t++]&63)<<12|(e[t++]&63)<<6|e[t++]&63)-65536,r[f++]=55296+(c>>10),r[f++]=56320+(c&1023)):r[f++]=(c&15)<<12|(e[t++]&63)<<6|e[t++]&63,f>8191&&((o||(o=[])).push(String.fromCharCode(...r)),f=0);return o?(f&&o.push(String.fromCharCode(...r.slice(0,f))),o.join("")):String.fromCharCode(...r.slice(0,f))}Bo.utf8Read=e4;function t4(e,t,n){let i=n,r,o;for(let f=0;f<e.length;++f)r=e.charCodeAt(f),r<128?t[n++]=r:r<2048?(t[n++]=r>>6|192,t[n++]=r&63|128):(r&64512)===55296&&((o=e.charCodeAt(f+1))&64512)===56320?(r=65536+((r&1023)<<10)+(o&1023),++f,t[n++]=r>>18|240,t[n++]=r>>12&63|128,t[n++]=r>>6&63|128,t[n++]=r&63|128):(t[n++]=r>>12|224,t[n++]=r>>6&63|128,t[n++]=r&63|128);return n-i}Bo.utf8Write=t4});var b2=L(bt=>{"use strict";B();R();Object.defineProperty(bt,"__esModule",{value:!0});bt.writeByte=bt.writeFixed32=bt.int64Length=bt.writeVarint64=bt.writeVarint32=bt.readInt32=bt.readUInt32=bt.zzDecode=bt.zzEncode=bt.varint32read=bt.varint32write=bt.uInt64ToString=bt.int64ToString=bt.int64FromString=bt.varint64write=bt.varint64read=void 0;function n4(){let e=0,t=0;for(let i=0;i<28;i+=7){let r=this.buf[this.pos++];if(e|=(r&127)<<i,(r&128)==0)return this.assertBounds(),[e,t]}let n=this.buf[this.pos++];if(e|=(n&15)<<28,t=(n&112)>>4,(n&128)==0)return this.assertBounds(),[e,t];for(let i=3;i<=31;i+=7){let r=this.buf[this.pos++];if(t|=(r&127)<<i,(r&128)==0)return this.assertBounds(),[e,t]}throw new Error("invalid varint")}bt.varint64read=n4;function r4(e,t,n){for(let o=0;o<28;o=o+7){let f=e>>>o,c=!(f>>>7==0&&t==0),g=(c?f|128:f)&255;if(n.push(g),!c)return}let i=e>>>28&15|(t&7)<<4,r=t>>3!=0;if(n.push((r?i|128:i)&255),!!r){for(let o=3;o<31;o=o+7){let f=t>>>o,c=f>>>7!=0,g=(c?f|128:f)&255;if(n.push(g),!c)return}n.push(t>>>31&1)}}bt.varint64write=r4;var $u=4294967296;function i4(e){let t=e[0]==="-";t&&(e=e.slice(1));let n=1e6,i=0,r=0;function o(f,c){let g=Number(e.slice(f,c));r*=n,i=i*n+g,i>=$u&&(r=r+(i/$u|0),i=i%$u)}return o(-24,-18),o(-18,-12),o(-12,-6),o(-6),t?y2(i,r):rl(i,r)}bt.int64FromString=i4;function o4(e,t){let n=rl(e,t),i=n.hi&2147483648;i&&(n=y2(n.lo,n.hi));let r=g2(n.lo,n.hi);return i?"-"+r:r}bt.int64ToString=o4;function g2(e,t){if({lo:e,hi:t}=s4(e,t),t<=2097151)return String($u*t+e);let n=e&16777215,i=(e>>>24|t<<8)&16777215,r=t>>16&65535,o=n+i*6777216+r*6710656,f=i+r*8147497,c=r*2,g=1e7;return o>=g&&(f+=Math.floor(o/g),o%=g),f>=g&&(c+=Math.floor(f/g),f%=g),c.toString()+h2(f)+h2(o)}bt.uInt64ToString=g2;function s4(e,t){return{lo:e>>>0,hi:t>>>0}}function rl(e,t){return{lo:e|0,hi:t|0}}function y2(e,t){return t=~t,e?e=~e+1:t+=1,rl(e,t)}var h2=e=>{let t=String(e);return"0000000".slice(t.length)+t};function a4(e,t){if(e>=0){for(;e>127;)t.push(e&127|128),e=e>>>7;t.push(e)}else{for(let n=0;n<9;n++)t.push(e&127|128),e=e>>7;t.push(1)}}bt.varint32write=a4;function d4(){let e=this.buf[this.pos++],t=e&127;if((e&128)==0)return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<7,(e&128)==0)return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<14,(e&128)==0)return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<21,(e&128)==0)return this.assertBounds(),t;e=this.buf[this.pos++],t|=(e&15)<<28;for(let n=5;(e&128)!==0&&n<10;n++)e=this.buf[this.pos++];if((e&128)!=0)throw new Error("invalid varint");return this.assertBounds(),t>>>0}bt.varint32read=d4;function u4(e,t){let n=t>>31;return t=((t<<1|e>>>31)^n)>>>0,e=(e<<1^n)>>>0,[e,t]}bt.zzEncode=u4;function f4(e,t){let n=-(e&1);return e=((e>>>1|t<<31)^n)>>>0,t=(t>>>1^n)>>>0,[e,t]}bt.zzDecode=f4;function c4(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+e[t+3]*16777216}bt.readUInt32=c4;function l4(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}bt.readInt32=l4;function m4(e,t,n){for(;e>127;)t[n++]=e&127|128,e>>>=7;t[n]=e}bt.writeVarint32=m4;function p4(e,t,n){for(;e.hi;)t[n++]=e.lo&127|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[n++]=e.lo&127|128,e.lo=e.lo>>>7;t[n++]=e.lo}bt.writeVarint64=p4;function h4(e,t){let n=e,i=(e>>>28|t<<4)>>>0,r=t>>>24;return r===0?i===0?n<16384?n<128?1:2:n<2097152?3:4:i<16384?i<128?5:6:i<2097152?7:8:r<128?9:10}bt.int64Length=h4;function g4(e,t,n){t[n]=e&255,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}bt.writeFixed32=g4;function y4(e,t,n){t[n]=e&255}bt.writeByte=y4});var er=L(Hi=>{"use strict";B();R();Object.defineProperty(Hi,"__esModule",{value:!0});Hi.BinaryWriter=Hi.BinaryReader=Hi.WireType=void 0;var il=p2(),Et=b2(),Pd;(function(e){e[e.Varint=0]="Varint",e[e.Fixed64=1]="Fixed64",e[e.Bytes=2]="Bytes",e[e.Fixed32=5]="Fixed32"})(Pd=Hi.WireType||(Hi.WireType={}));var ol=class{assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}constructor(t){this.buf=t?new Uint8Array(t):new Uint8Array(0),this.pos=0,this.type=0,this.len=this.buf.length}tag(){let t=this.uint32(),n=t>>>3,i=t&7;if(n<=0||i<0||i>5)throw new Error("illegal tag: field no "+n+" wire type "+i);return[n,i,t]}skip(t){if(typeof t=="number"){if(this.pos+t>this.len)throw v2(this,t);this.pos+=t}else do if(this.pos>=this.len)throw v2(this);while(this.buf[this.pos++]&128);return this}skipType(t){switch(t){case Pd.Varint:this.skip();break;case Pd.Fixed64:this.skip(8);break;case Pd.Bytes:this.skip(this.uint32());break;case 3:for(;(t=this.uint32()&7)!==4;)this.skipType(t);break;case Pd.Fixed32:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this}uint32(){return Et.varint32read.bind(this)()}int32(){return this.uint32()|0}sint32(){let t=this.uint32();return t%2===1?(t+1)/-2:t/2}fixed32(){let t=(0,Et.readUInt32)(this.buf,this.pos);return this.pos+=4,t}sfixed32(){let t=(0,Et.readInt32)(this.buf,this.pos);return this.pos+=4,t}int64(){let[t,n]=Et.varint64read.bind(this)();return BigInt((0,Et.int64ToString)(t,n))}uint64(){let[t,n]=Et.varint64read.bind(this)();return BigInt((0,Et.uInt64ToString)(t,n))}sint64(){let[t,n]=Et.varint64read.bind(this)();return[t,n]=(0,Et.zzDecode)(t,n),BigInt((0,Et.int64ToString)(t,n))}fixed64(){let t=this.sfixed32(),n=this.sfixed32();return BigInt((0,Et.uInt64ToString)(t,n))}sfixed64(){let t=this.sfixed32(),n=this.sfixed32();return BigInt((0,Et.int64ToString)(t,n))}float(){throw new Error("float not supported")}double(){throw new Error("double not supported")}bool(){let[t,n]=Et.varint64read.bind(this)();return t!==0||n!==0}bytes(){let t=this.uint32(),n=this.pos;return this.pos+=t,this.assertBounds(),this.buf.subarray(n,n+t)}string(){let t=this.bytes();return(0,il.utf8Read)(t,0,t.length)}};Hi.BinaryReader=ol;var xs=class{constructor(t,n,i){this.fn=t,this.len=n,this.val=i}proceed(t,n){this.fn&&this.fn(this.val,t,n)}},sl=class{constructor(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}},Fi=class{constructor(){this.len=0,this.uint64=Fi.prototype.int64,this.sfixed64=Fi.prototype.fixed64,this.sfixed32=Fi.prototype.fixed32,this.head=new xs(null,0,0),this.tail=this.head,this.states=null}static create(){return new Fi}static alloc(t){return typeof Uint8Array<"u"?v4(n=>new Uint8Array(n),Uint8Array.prototype.subarray)(t):new Array(t)}_push(t,n,i){return this.tail=this.tail.next=new xs(t,n,i),this.len+=n,this}finish(){let t=this.head.next,n=0,i=Fi.alloc(this.len);for(;t;)t.proceed(i,n),n+=t.len,t=t.next;return i}fork(){return this.states=new sl(this),this.head=this.tail=new xs(null,0,0),this.len=0,this}reset(){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 xs(null,0,0),this.len=0),this}ldelim(){let t=this.head,n=this.tail,i=this.len;return this.reset().uint32(i),i&&(this.tail.next=t.next,this.tail=n,this.len+=i),this}tag(t,n){return this.uint32((t<<3|n)>>>0)}uint32(t){return this.len+=(this.tail=this.tail.next=new xs(Et.writeVarint32,(t=t>>>0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this}int32(t){return t<0?this._push(Et.writeVarint64,10,(0,Et.int64FromString)(t.toString())):this.uint32(t)}sint32(t){return this.uint32((t<<1^t>>31)>>>0)}int64(t){let{lo:n,hi:i}=(0,Et.int64FromString)(t.toString());return this._push(Et.writeVarint64,(0,Et.int64Length)(n,i),{lo:n,hi:i})}sint64(t){let{lo:n,hi:i}=(0,Et.int64FromString)(t.toString());return[n,i]=(0,Et.zzEncode)(n,i),this._push(Et.writeVarint64,(0,Et.int64Length)(n,i),{lo:n,hi:i})}fixed64(t){let{lo:n,hi:i}=(0,Et.int64FromString)(t.toString());return this._push(Et.writeFixed32,4,n)._push(Et.writeFixed32,4,i)}bool(t){return this._push(Et.writeByte,1,t?1:0)}fixed32(t){return this._push(Et.writeFixed32,4,t>>>0)}float(t){throw new Error("float not supported"+t)}double(t){throw new Error("double not supported"+t)}bytes(t){let n=t.length>>>0;return n?this.uint32(n)._push(b4,n,t):this._push(Et.writeByte,1,0)}string(t){let n=(0,il.utf8Length)(t);return n?this.uint32(n)._push(il.utf8Write,n,t):this._push(Et.writeByte,1,0)}};Hi.BinaryWriter=Fi;function b4(e,t,n){if(typeof Uint8Array<"u")t.set(e,n);else for(let i=0;i<e.length;++i)t[n+i]=e[i]}function v4(e,t,n){let i=n||8192,r=i>>>1,o=null,f=i;return function(g){if(g<1||g>r)return e(g);f+g>i&&(o=e(i),f=0);let A=t.call(o,f,f+=g);return f&7&&(f=(f|7)+1),A}}function v2(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}});var A2=L(he=>{"use strict";B();R();Object.defineProperty(he,"__esModule",{value:!0});he.SwapAmountOutSplitRoute=he.SwapAmountInSplitRoute=he.SwapAmountOutRoute=he.SwapAmountInRoute=void 0;var qr=er();function al(){return{poolId:BigInt(0),tokenOutDenom:""}}he.SwapAmountInRoute={typeUrl:"/osmosis.poolmanager.v1beta1.SwapAmountInRoute",aminoType:"osmosis/poolmanager/swap-amount-in-route",is(e){return e&&(e.$typeUrl===he.SwapAmountInRoute.typeUrl||typeof e.poolId=="bigint"&&typeof e.tokenOutDenom=="string")},isSDK(e){return e&&(e.$typeUrl===he.SwapAmountInRoute.typeUrl||typeof e.pool_id=="bigint"&&typeof e.token_out_denom=="string")},isAmino(e){return e&&(e.$typeUrl===he.SwapAmountInRoute.typeUrl||typeof e.pool_id=="bigint"&&typeof e.token_out_denom=="string")},encode(e,t=qr.BinaryWriter.create()){return e.poolId!==BigInt(0)&&t.uint32(8).uint64(e.poolId),e.tokenOutDenom!==""&&t.uint32(18).string(e.tokenOutDenom),t},decode(e,t){let n=e instanceof qr.BinaryReader?e:new qr.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=al();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.poolId=n.uint64();break;case 2:r.tokenOutDenom=n.string();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=al();return t.poolId=e.poolId!==void 0&&e.poolId!==null?BigInt(e.poolId.toString()):BigInt(0),t.tokenOutDenom=e.tokenOutDenom??"",t},fromAmino(e){let t=al();return e.pool_id!==void 0&&e.pool_id!==null&&(t.poolId=BigInt(e.pool_id)),e.token_out_denom!==void 0&&e.token_out_denom!==null&&(t.tokenOutDenom=e.token_out_denom),t},toAmino(e){let t={};return t.pool_id=e.poolId!==BigInt(0)?e.poolId.toString():void 0,t.token_out_denom=e.tokenOutDenom===""?void 0:e.tokenOutDenom,t},fromAminoMsg(e){return he.SwapAmountInRoute.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/poolmanager/swap-amount-in-route",value:he.SwapAmountInRoute.toAmino(e)}},fromProtoMsg(e){return he.SwapAmountInRoute.decode(e.value)},toProto(e){return he.SwapAmountInRoute.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.poolmanager.v1beta1.SwapAmountInRoute",value:he.SwapAmountInRoute.encode(e).finish()}}};function dl(){return{poolId:BigInt(0),tokenInDenom:""}}he.SwapAmountOutRoute={typeUrl:"/osmosis.poolmanager.v1beta1.SwapAmountOutRoute",aminoType:"osmosis/poolmanager/swap-amount-out-route",is(e){return e&&(e.$typeUrl===he.SwapAmountOutRoute.typeUrl||typeof e.poolId=="bigint"&&typeof e.tokenInDenom=="string")},isSDK(e){return e&&(e.$typeUrl===he.SwapAmountOutRoute.typeUrl||typeof e.pool_id=="bigint"&&typeof e.token_in_denom=="string")},isAmino(e){return e&&(e.$typeUrl===he.SwapAmountOutRoute.typeUrl||typeof e.pool_id=="bigint"&&typeof e.token_in_denom=="string")},encode(e,t=qr.BinaryWriter.create()){return e.poolId!==BigInt(0)&&t.uint32(8).uint64(e.poolId),e.tokenInDenom!==""&&t.uint32(18).string(e.tokenInDenom),t},decode(e,t){let n=e instanceof qr.BinaryReader?e:new qr.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=dl();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.poolId=n.uint64();break;case 2:r.tokenInDenom=n.string();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=dl();return t.poolId=e.poolId!==void 0&&e.poolId!==null?BigInt(e.poolId.toString()):BigInt(0),t.tokenInDenom=e.tokenInDenom??"",t},fromAmino(e){let t=dl();return e.pool_id!==void 0&&e.pool_id!==null&&(t.poolId=BigInt(e.pool_id)),e.token_in_denom!==void 0&&e.token_in_denom!==null&&(t.tokenInDenom=e.token_in_denom),t},toAmino(e){let t={};return t.pool_id=e.poolId!==BigInt(0)?e.poolId.toString():void 0,t.token_in_denom=e.tokenInDenom===""?void 0:e.tokenInDenom,t},fromAminoMsg(e){return he.SwapAmountOutRoute.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/poolmanager/swap-amount-out-route",value:he.SwapAmountOutRoute.toAmino(e)}},fromProtoMsg(e){return he.SwapAmountOutRoute.decode(e.value)},toProto(e){return he.SwapAmountOutRoute.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.poolmanager.v1beta1.SwapAmountOutRoute",value:he.SwapAmountOutRoute.encode(e).finish()}}};function ul(){return{pools:[],tokenInAmount:""}}he.SwapAmountInSplitRoute={typeUrl:"/osmosis.poolmanager.v1beta1.SwapAmountInSplitRoute",aminoType:"osmosis/poolmanager/swap-amount-in-split-route",is(e){return e&&(e.$typeUrl===he.SwapAmountInSplitRoute.typeUrl||Array.isArray(e.pools)&&(!e.pools.length||he.SwapAmountInRoute.is(e.pools[0]))&&typeof e.tokenInAmount=="string")},isSDK(e){return e&&(e.$typeUrl===he.SwapAmountInSplitRoute.typeUrl||Array.isArray(e.pools)&&(!e.pools.length||he.SwapAmountInRoute.isSDK(e.pools[0]))&&typeof e.token_in_amount=="string")},isAmino(e){return e&&(e.$typeUrl===he.SwapAmountInSplitRoute.typeUrl||Array.isArray(e.pools)&&(!e.pools.length||he.SwapAmountInRoute.isAmino(e.pools[0]))&&typeof e.token_in_amount=="string")},encode(e,t=qr.BinaryWriter.create()){for(let n of e.pools)he.SwapAmountInRoute.encode(n,t.uint32(10).fork()).ldelim();return e.tokenInAmount!==""&&t.uint32(18).string(e.tokenInAmount),t},decode(e,t){let n=e instanceof qr.BinaryReader?e:new qr.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=ul();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.pools.push(he.SwapAmountInRoute.decode(n,n.uint32()));break;case 2:r.tokenInAmount=n.string();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=ul();return t.pools=e.pools?.map(n=>he.SwapAmountInRoute.fromPartial(n))||[],t.tokenInAmount=e.tokenInAmount??"",t},fromAmino(e){let t=ul();return t.pools=e.pools?.map(n=>he.SwapAmountInRoute.fromAmino(n))||[],e.token_in_amount!==void 0&&e.token_in_amount!==null&&(t.tokenInAmount=e.token_in_amount),t},toAmino(e){let t={};return e.pools?t.pools=e.pools.map(n=>n?he.SwapAmountInRoute.toAmino(n):void 0):t.pools=e.pools,t.token_in_amount=e.tokenInAmount===""?void 0:e.tokenInAmount,t},fromAminoMsg(e){return he.SwapAmountInSplitRoute.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/poolmanager/swap-amount-in-split-route",value:he.SwapAmountInSplitRoute.toAmino(e)}},fromProtoMsg(e){return he.SwapAmountInSplitRoute.decode(e.value)},toProto(e){return he.SwapAmountInSplitRoute.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.poolmanager.v1beta1.SwapAmountInSplitRoute",value:he.SwapAmountInSplitRoute.encode(e).finish()}}};function fl(){return{pools:[],tokenOutAmount:""}}he.SwapAmountOutSplitRoute={typeUrl:"/osmosis.poolmanager.v1beta1.SwapAmountOutSplitRoute",aminoType:"osmosis/poolmanager/swap-amount-out-split-route",is(e){return e&&(e.$typeUrl===he.SwapAmountOutSplitRoute.typeUrl||Array.isArray(e.pools)&&(!e.pools.length||he.SwapAmountOutRoute.is(e.pools[0]))&&typeof e.tokenOutAmount=="string")},isSDK(e){return e&&(e.$typeUrl===he.SwapAmountOutSplitRoute.typeUrl||Array.isArray(e.pools)&&(!e.pools.length||he.SwapAmountOutRoute.isSDK(e.pools[0]))&&typeof e.token_out_amount=="string")},isAmino(e){return e&&(e.$typeUrl===he.SwapAmountOutSplitRoute.typeUrl||Array.isArray(e.pools)&&(!e.pools.length||he.SwapAmountOutRoute.isAmino(e.pools[0]))&&typeof e.token_out_amount=="string")},encode(e,t=qr.BinaryWriter.create()){for(let n of e.pools)he.SwapAmountOutRoute.encode(n,t.uint32(10).fork()).ldelim();return e.tokenOutAmount!==""&&t.uint32(18).string(e.tokenOutAmount),t},decode(e,t){let n=e instanceof qr.BinaryReader?e:new qr.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=fl();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.pools.push(he.SwapAmountOutRoute.decode(n,n.uint32()));break;case 2:r.tokenOutAmount=n.string();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=fl();return t.pools=e.pools?.map(n=>he.SwapAmountOutRoute.fromPartial(n))||[],t.tokenOutAmount=e.tokenOutAmount??"",t},fromAmino(e){let t=fl();return t.pools=e.pools?.map(n=>he.SwapAmountOutRoute.fromAmino(n))||[],e.token_out_amount!==void 0&&e.token_out_amount!==null&&(t.tokenOutAmount=e.token_out_amount),t},toAmino(e){let t={};return e.pools?t.pools=e.pools.map(n=>n?he.SwapAmountOutRoute.toAmino(n):void 0):t.pools=e.pools,t.token_out_amount=e.tokenOutAmount===""?void 0:e.tokenOutAmount,t},fromAminoMsg(e){return he.SwapAmountOutSplitRoute.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/poolmanager/swap-amount-out-split-route",value:he.SwapAmountOutSplitRoute.toAmino(e)}},fromProtoMsg(e){return he.SwapAmountOutSplitRoute.decode(e.value)},toProto(e){return he.SwapAmountOutSplitRoute.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.poolmanager.v1beta1.SwapAmountOutSplitRoute",value:he.SwapAmountOutSplitRoute.encode(e).finish()}}}});var ii=L(Be=>{"use strict";B();R();Object.defineProperty(Be,"__esModule",{value:!0});Be.DecProto=Be.IntProto=Be.DecCoin=Be.Coin=void 0;var Fr=er();function cl(){return{denom:"",amount:""}}Be.Coin={typeUrl:"/cosmos.base.v1beta1.Coin",aminoType:"cosmos-sdk/Coin",is(e){return e&&(e.$typeUrl===Be.Coin.typeUrl||typeof e.denom=="string"&&typeof e.amount=="string")},isSDK(e){return e&&(e.$typeUrl===Be.Coin.typeUrl||typeof e.denom=="string"&&typeof e.amount=="string")},isAmino(e){return e&&(e.$typeUrl===Be.Coin.typeUrl||typeof e.denom=="string"&&typeof e.amount=="string")},encode(e,t=Fr.BinaryWriter.create()){return e.denom!==""&&t.uint32(10).string(e.denom),e.amount!==""&&t.uint32(18).string(e.amount),t},decode(e,t){let n=e instanceof Fr.BinaryReader?e:new Fr.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=cl();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.denom=n.string();break;case 2:r.amount=n.string();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=cl();return t.denom=e.denom??"",t.amount=e.amount??"",t},fromAmino(e){let t=cl();return e.denom!==void 0&&e.denom!==null&&(t.denom=e.denom),e.amount!==void 0&&e.amount!==null&&(t.amount=e.amount),t},toAmino(e){let t={};return t.denom=e.denom===""?void 0:e.denom,t.amount=e.amount??"",t},fromAminoMsg(e){return Be.Coin.fromAmino(e.value)},toAminoMsg(e){return{type:"cosmos-sdk/Coin",value:Be.Coin.toAmino(e)}},fromProtoMsg(e){return Be.Coin.decode(e.value)},toProto(e){return Be.Coin.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmos.base.v1beta1.Coin",value:Be.Coin.encode(e).finish()}}};function ll(){return{denom:"",amount:""}}Be.DecCoin={typeUrl:"/cosmos.base.v1beta1.DecCoin",aminoType:"cosmos-sdk/DecCoin",is(e){return e&&(e.$typeUrl===Be.DecCoin.typeUrl||typeof e.denom=="string"&&typeof e.amount=="string")},isSDK(e){return e&&(e.$typeUrl===Be.DecCoin.typeUrl||typeof e.denom=="string"&&typeof e.amount=="string")},isAmino(e){return e&&(e.$typeUrl===Be.DecCoin.typeUrl||typeof e.denom=="string"&&typeof e.amount=="string")},encode(e,t=Fr.BinaryWriter.create()){return e.denom!==""&&t.uint32(10).string(e.denom),e.amount!==""&&t.uint32(18).string(e.amount),t},decode(e,t){let n=e instanceof Fr.BinaryReader?e:new Fr.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=ll();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.denom=n.string();break;case 2:r.amount=n.string();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=ll();return t.denom=e.denom??"",t.amount=e.amount??"",t},fromAmino(e){let t=ll();return e.denom!==void 0&&e.denom!==null&&(t.denom=e.denom),e.amount!==void 0&&e.amount!==null&&(t.amount=e.amount),t},toAmino(e){let t={};return t.denom=e.denom===""?void 0:e.denom,t.amount=e.amount===""?void 0:e.amount,t},fromAminoMsg(e){return Be.DecCoin.fromAmino(e.value)},toAminoMsg(e){return{type:"cosmos-sdk/DecCoin",value:Be.DecCoin.toAmino(e)}},fromProtoMsg(e){return Be.DecCoin.decode(e.value)},toProto(e){return Be.DecCoin.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmos.base.v1beta1.DecCoin",value:Be.DecCoin.encode(e).finish()}}};function ml(){return{int:""}}Be.IntProto={typeUrl:"/cosmos.base.v1beta1.IntProto",aminoType:"cosmos-sdk/IntProto",is(e){return e&&(e.$typeUrl===Be.IntProto.typeUrl||typeof e.int=="string")},isSDK(e){return e&&(e.$typeUrl===Be.IntProto.typeUrl||typeof e.int=="string")},isAmino(e){return e&&(e.$typeUrl===Be.IntProto.typeUrl||typeof e.int=="string")},encode(e,t=Fr.BinaryWriter.create()){return e.int!==""&&t.uint32(10).string(e.int),t},decode(e,t){let n=e instanceof Fr.BinaryReader?e:new Fr.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=ml();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.int=n.string();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=ml();return t.int=e.int??"",t},fromAmino(e){let t=ml();return e.int!==void 0&&e.int!==null&&(t.int=e.int),t},toAmino(e){let t={};return t.int=e.int===""?void 0:e.int,t},fromAminoMsg(e){return Be.IntProto.fromAmino(e.value)},toAminoMsg(e){return{type:"cosmos-sdk/IntProto",value:Be.IntProto.toAmino(e)}},fromProtoMsg(e){return Be.IntProto.decode(e.value)},toProto(e){return Be.IntProto.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmos.base.v1beta1.IntProto",value:Be.IntProto.encode(e).finish()}}};function pl(){return{dec:""}}Be.DecProto={typeUrl:"/cosmos.base.v1beta1.DecProto",aminoType:"cosmos-sdk/DecProto",is(e){return e&&(e.$typeUrl===Be.DecProto.typeUrl||typeof e.dec=="string")},isSDK(e){return e&&(e.$typeUrl===Be.DecProto.typeUrl||typeof e.dec=="string")},isAmino(e){return e&&(e.$typeUrl===Be.DecProto.typeUrl||typeof e.dec=="string")},encode(e,t=Fr.BinaryWriter.create()){return e.dec!==""&&t.uint32(10).string(e.dec),t},decode(e,t){let n=e instanceof Fr.BinaryReader?e:new Fr.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=pl();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.dec=n.string();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=pl();return t.dec=e.dec??"",t},fromAmino(e){let t=pl();return e.dec!==void 0&&e.dec!==null&&(t.dec=e.dec),t},toAmino(e){let t={};return t.dec=e.dec===""?void 0:e.dec,t},fromAminoMsg(e){return Be.DecProto.fromAmino(e.value)},toAminoMsg(e){return{type:"cosmos-sdk/DecProto",value:Be.DecProto.toAmino(e)}},fromProtoMsg(e){return Be.DecProto.decode(e.value)},toProto(e){return Be.DecProto.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmos.base.v1beta1.DecProto",value:Be.DecProto.encode(e).finish()}}}});var gl=L((M2,hl)=>{B();R();(function(e,t){"use strict";function n(l,s){if(!l)throw new Error(s||"Assertion failed")}function i(l,s){l.super_=s;var a=function(){};a.prototype=s.prototype,l.prototype=new a,l.prototype.constructor=l}function r(l,s,a){if(r.isBN(l))return l;this.negative=0,this.words=null,this.length=0,this.red=null,l!==null&&((s==="le"||s==="be")&&(a=s,s=10),this._init(l||0,s||10,a||"be"))}typeof e=="object"?e.exports=r:t.BN=r,r.BN=r,r.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=$p().Buffer}catch{}r.isBN=function(s){return s instanceof r?!0:s!==null&&typeof s=="object"&&s.constructor.wordSize===r.wordSize&&Array.isArray(s.words)},r.max=function(s,a){return s.cmp(a)>0?s:a},r.min=function(s,a){return s.cmp(a)<0?s:a},r.prototype._init=function(s,a,m){if(typeof s=="number")return this._initNumber(s,a,m);if(typeof s=="object")return this._initArray(s,a,m);a==="hex"&&(a=16),n(a===(a|0)&&a>=2&&a<=36),s=s.toString().replace(/\s+/g,"");var y=0;s[0]==="-"&&(y++,this.negative=1),y<s.length&&(a===16?this._parseHex(s,y,m):(this._parseBase(s,a,y),m==="le"&&this._initArray(this.toArray(),a,m)))},r.prototype._initNumber=function(s,a,m){s<0&&(this.negative=1,s=-s),s<67108864?(this.words=[s&67108863],this.length=1):s<4503599627370496?(this.words=[s&67108863,s/67108864&67108863],this.length=2):(n(s<9007199254740992),this.words=[s&67108863,s/67108864&67108863,1],this.length=3),m==="le"&&this._initArray(this.toArray(),a,m)},r.prototype._initArray=function(s,a,m){if(n(typeof s.length=="number"),s.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(s.length/3),this.words=new Array(this.length);for(var y=0;y<this.length;y++)this.words[y]=0;var h,u,v=0;if(m==="be")for(y=s.length-1,h=0;y>=0;y-=3)u=s[y]|s[y-1]<<8|s[y-2]<<16,this.words[h]|=u<<v&67108863,this.words[h+1]=u>>>26-v&67108863,v+=24,v>=26&&(v-=26,h++);else if(m==="le")for(y=0,h=0;y<s.length;y+=3)u=s[y]|s[y+1]<<8|s[y+2]<<16,this.words[h]|=u<<v&67108863,this.words[h+1]=u>>>26-v&67108863,v+=24,v>=26&&(v-=26,h++);return this._strip()};function f(l,s){var a=l.charCodeAt(s);if(a>=48&&a<=57)return a-48;if(a>=65&&a<=70)return a-55;if(a>=97&&a<=102)return a-87;n(!1,"Invalid character in "+l)}function c(l,s,a){var m=f(l,a);return a-1>=s&&(m|=f(l,a-1)<<4),m}r.prototype._parseHex=function(s,a,m){this.length=Math.ceil((s.length-a)/6),this.words=new Array(this.length);for(var y=0;y<this.length;y++)this.words[y]=0;var h=0,u=0,v;if(m==="be")for(y=s.length-1;y>=a;y-=2)v=c(s,a,y)<<h,this.words[u]|=v&67108863,h>=18?(h-=18,u+=1,this.words[u]|=v>>>26):h+=8;else{var k=s.length-a;for(y=k%2===0?a+1:a;y<s.length;y+=2)v=c(s,a,y)<<h,this.words[u]|=v&67108863,h>=18?(h-=18,u+=1,this.words[u]|=v>>>26):h+=8}this._strip()};function g(l,s,a,m){for(var y=0,h=0,u=Math.min(l.length,a),v=s;v<u;v++){var k=l.charCodeAt(v)-48;y*=m,k>=49?h=k-49+10:k>=17?h=k-17+10:h=k,n(k>=0&&h<m,"Invalid character"),y+=h}return y}r.prototype._parseBase=function(s,a,m){this.words=[0],this.length=1;for(var y=0,h=1;h<=67108863;h*=a)y++;y--,h=h/a|0;for(var u=s.length-m,v=u%y,k=Math.min(u,u-v)+m,p=0,I=m;I<k;I+=y)p=g(s,I,I+y,a),this.imuln(h),this.words[0]+p<67108864?this.words[0]+=p:this._iaddn(p);if(v!==0){var W=1;for(p=g(s,I,s.length,a),I=0;I<v;I++)W*=a;this.imuln(W),this.words[0]+p<67108864?this.words[0]+=p:this._iaddn(p)}this._strip()},r.prototype.copy=function(s){s.words=new Array(this.length);for(var a=0;a<this.length;a++)s.words[a]=this.words[a];s.length=this.length,s.negative=this.negative,s.red=this.red};function A(l,s){l.words=s.words,l.length=s.length,l.negative=s.negative,l.red=s.red}if(r.prototype._move=function(s){A(s,this)},r.prototype.clone=function(){var s=new r(null);return this.copy(s),s},r.prototype._expand=function(s){for(;this.length<s;)this.words[this.length++]=0;return this},r.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},r.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{r.prototype[Symbol.for("nodejs.util.inspect.custom")]=w}catch{r.prototype.inspect=w}else r.prototype.inspect=w;function w(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var M=["","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"],P=[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],x=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];r.prototype.toString=function(s,a){s=s||10,a=a|0||1;var m;if(s===16||s==="hex"){m="";for(var y=0,h=0,u=0;u<this.length;u++){var v=this.words[u],k=((v<<y|h)&16777215).toString(16);h=v>>>24-y&16777215,y+=2,y>=26&&(y-=26,u--),h!==0||u!==this.length-1?m=M[6-k.length]+k+m:m=k+m}for(h!==0&&(m=h.toString(16)+m);m.length%a!==0;)m="0"+m;return this.negative!==0&&(m="-"+m),m}if(s===(s|0)&&s>=2&&s<=36){var p=P[s],I=x[s];m="";var W=this.clone();for(W.negative=0;!W.isZero();){var V=W.modrn(I).toString(s);W=W.idivn(I),W.isZero()?m=V+m:m=M[p-V.length]+V+m}for(this.isZero()&&(m="0"+m);m.length%a!==0;)m="0"+m;return this.negative!==0&&(m="-"+m),m}n(!1,"Base should be between 2 and 36")},r.prototype.toNumber=function(){var s=this.words[0];return this.length===2?s+=this.words[1]*67108864:this.length===3&&this.words[2]===1?s+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-s:s},r.prototype.toJSON=function(){return this.toString(16,2)},o&&(r.prototype.toBuffer=function(s,a){return this.toArrayLike(o,s,a)}),r.prototype.toArray=function(s,a){return this.toArrayLike(Array,s,a)};var U=function(s,a){return s.allocUnsafe?s.allocUnsafe(a):new s(a)};r.prototype.toArrayLike=function(s,a,m){this._strip();var y=this.byteLength(),h=m||Math.max(1,y);n(y<=h,"byte array longer than desired length"),n(h>0,"Requested array length <= 0");var u=U(s,h),v=a==="le"?"LE":"BE";return this["_toArrayLike"+v](u,y),u},r.prototype._toArrayLikeLE=function(s,a){for(var m=0,y=0,h=0,u=0;h<this.length;h++){var v=this.words[h]<<u|y;s[m++]=v&255,m<s.length&&(s[m++]=v>>8&255),m<s.length&&(s[m++]=v>>16&255),u===6?(m<s.length&&(s[m++]=v>>24&255),y=0,u=0):(y=v>>>24,u+=2)}if(m<s.length)for(s[m++]=y;m<s.length;)s[m++]=0},r.prototype._toArrayLikeBE=function(s,a){for(var m=s.length-1,y=0,h=0,u=0;h<this.length;h++){var v=this.words[h]<<u|y;s[m--]=v&255,m>=0&&(s[m--]=v>>8&255),m>=0&&(s[m--]=v>>16&255),u===6?(m>=0&&(s[m--]=v>>24&255),y=0,u=0):(y=v>>>24,u+=2)}if(m>=0)for(s[m--]=y;m>=0;)s[m--]=0},Math.clz32?r.prototype._countBits=function(s){return 32-Math.clz32(s)}:r.prototype._countBits=function(s){var a=s,m=0;return a>=4096&&(m+=13,a>>>=13),a>=64&&(m+=7,a>>>=7),a>=8&&(m+=4,a>>>=4),a>=2&&(m+=2,a>>>=2),m+a},r.prototype._zeroBits=function(s){if(s===0)return 26;var a=s,m=0;return(a&8191)===0&&(m+=13,a>>>=13),(a&127)===0&&(m+=7,a>>>=7),(a&15)===0&&(m+=4,a>>>=4),(a&3)===0&&(m+=2,a>>>=2),(a&1)===0&&m++,m},r.prototype.bitLength=function(){var s=this.words[this.length-1],a=this._countBits(s);return(this.length-1)*26+a};function _(l){for(var s=new Array(l.bitLength()),a=0;a<s.length;a++){var m=a/26|0,y=a%26;s[a]=l.words[m]>>>y&1}return s}r.prototype.zeroBits=function(){if(this.isZero())return 0;for(var s=0,a=0;a<this.length;a++){var m=this._zeroBits(this.words[a]);if(s+=m,m!==26)break}return s},r.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},r.prototype.toTwos=function(s){return this.negative!==0?this.abs().inotn(s).iaddn(1):this.clone()},r.prototype.fromTwos=function(s){return this.testn(s-1)?this.notn(s).iaddn(1).ineg():this.clone()},r.prototype.isNeg=function(){return this.negative!==0},r.prototype.neg=function(){return this.clone().ineg()},r.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},r.prototype.iuor=function(s){for(;this.length<s.length;)this.words[this.length++]=0;for(var a=0;a<s.length;a++)this.words[a]=this.words[a]|s.words[a];return this._strip()},r.prototype.ior=function(s){return n((this.negative|s.negative)===0),this.iuor(s)},r.prototype.or=function(s){return this.length>s.length?this.clone().ior(s):s.clone().ior(this)},r.prototype.uor=function(s){return this.length>s.length?this.clone().iuor(s):s.clone().iuor(this)},r.prototype.iuand=function(s){var a;this.length>s.length?a=s:a=this;for(var m=0;m<a.length;m++)this.words[m]=this.words[m]&s.words[m];return this.length=a.length,this._strip()},r.prototype.iand=function(s){return n((this.negative|s.negative)===0),this.iuand(s)},r.prototype.and=function(s){return this.length>s.length?this.clone().iand(s):s.clone().iand(this)},r.prototype.uand=function(s){return this.length>s.length?this.clone().iuand(s):s.clone().iuand(this)},r.prototype.iuxor=function(s){var a,m;this.length>s.length?(a=this,m=s):(a=s,m=this);for(var y=0;y<m.length;y++)this.words[y]=a.words[y]^m.words[y];if(this!==a)for(;y<a.length;y++)this.words[y]=a.words[y];return this.length=a.length,this._strip()},r.prototype.ixor=function(s){return n((this.negative|s.negative)===0),this.iuxor(s)},r.prototype.xor=function(s){return this.length>s.length?this.clone().ixor(s):s.clone().ixor(this)},r.prototype.uxor=function(s){return this.length>s.length?this.clone().iuxor(s):s.clone().iuxor(this)},r.prototype.inotn=function(s){n(typeof s=="number"&&s>=0);var a=Math.ceil(s/26)|0,m=s%26;this._expand(a),m>0&&a--;for(var y=0;y<a;y++)this.words[y]=~this.words[y]&67108863;return m>0&&(this.words[y]=~this.words[y]&67108863>>26-m),this._strip()},r.prototype.notn=function(s){return this.clone().inotn(s)},r.prototype.setn=function(s,a){n(typeof s=="number"&&s>=0);var m=s/26|0,y=s%26;return this._expand(m+1),a?this.words[m]=this.words[m]|1<<y:this.words[m]=this.words[m]&~(1<<y),this._strip()},r.prototype.iadd=function(s){var a;if(this.negative!==0&&s.negative===0)return this.negative=0,a=this.isub(s),this.negative^=1,this._normSign();if(this.negative===0&&s.negative!==0)return s.negative=0,a=this.isub(s),s.negative=1,a._normSign();var m,y;this.length>s.length?(m=this,y=s):(m=s,y=this);for(var h=0,u=0;u<y.length;u++)a=(m.words[u]|0)+(y.words[u]|0)+h,this.words[u]=a&67108863,h=a>>>26;for(;h!==0&&u<m.length;u++)a=(m.words[u]|0)+h,this.words[u]=a&67108863,h=a>>>26;if(this.length=m.length,h!==0)this.words[this.length]=h,this.length++;else if(m!==this)for(;u<m.length;u++)this.words[u]=m.words[u];return this},r.prototype.add=function(s){var a;return s.negative!==0&&this.negative===0?(s.negative=0,a=this.sub(s),s.negative^=1,a):s.negative===0&&this.negative!==0?(this.negative=0,a=s.sub(this),this.negative=1,a):this.length>s.length?this.clone().iadd(s):s.clone().iadd(this)},r.prototype.isub=function(s){if(s.negative!==0){s.negative=0;var a=this.iadd(s);return s.negative=1,a._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(s),this.negative=1,this._normSign();var m=this.cmp(s);if(m===0)return this.negative=0,this.length=1,this.words[0]=0,this;var y,h;m>0?(y=this,h=s):(y=s,h=this);for(var u=0,v=0;v<h.length;v++)a=(y.words[v]|0)-(h.words[v]|0)+u,u=a>>26,this.words[v]=a&67108863;for(;u!==0&&v<y.length;v++)a=(y.words[v]|0)+u,u=a>>26,this.words[v]=a&67108863;if(u===0&&v<y.length&&y!==this)for(;v<y.length;v++)this.words[v]=y.words[v];return this.length=Math.max(this.length,v),y!==this&&(this.negative=1),this._strip()},r.prototype.sub=function(s){return this.clone().isub(s)};function T(l,s,a){a.negative=s.negative^l.negative;var m=l.length+s.length|0;a.length=m,m=m-1|0;var y=l.words[0]|0,h=s.words[0]|0,u=y*h,v=u&67108863,k=u/67108864|0;a.words[0]=v;for(var p=1;p<m;p++){for(var I=k>>>26,W=k&67108863,V=Math.min(p,s.length-1),X=Math.max(0,p-l.length+1);X<=V;X++){var de=p-X|0;y=l.words[de]|0,h=s.words[X]|0,u=y*h+W,I+=u/67108864|0,W=u&67108863}a.words[p]=W|0,k=I|0}return k!==0?a.words[p]=k|0:a.length--,a._strip()}var D=function(s,a,m){var y=s.words,h=a.words,u=m.words,v=0,k,p,I,W=y[0]|0,V=W&8191,X=W>>>13,de=y[1]|0,le=de&8191,pe=de>>>13,En=y[2]|0,be=En&8191,ye=En>>>13,Ir=y[3]|0,we=Ir&8191,xe=Ir>>>13,Vi=y[4]|0,Ce=Vi&8191,Ee=Vi>>>13,Ta=y[5]|0,Te=Ta&8191,Oe=Ta>>>13,Oa=y[6]|0,De=Oa&8191,Ne=Oa>>>13,Da=y[7]|0,Le=Da&8191,qe=Da>>>13,Na=y[8]|0,Fe=Na&8191,He=Na>>>13,La=y[9]|0,Ke=La&8191,$e=La>>>13,qa=h[0]|0,We=qa&8191,Je=qa>>>13,Fa=h[1]|0,ze=Fa&8191,Ze=Fa>>>13,Ha=h[2]|0,Ve=Ha&8191,Ge=Ha>>>13,Ka=h[3]|0,Ye=Ka&8191,Xe=Ka>>>13,$a=h[4]|0,Qe=$a&8191,je=$a>>>13,Wa=h[5]|0,et=Wa&8191,tt=Wa>>>13,Ja=h[6]|0,nt=Ja&8191,rt=Ja>>>13,za=h[7]|0,it=za&8191,ot=za>>>13,Za=h[8]|0,st=Za&8191,at=Za>>>13,Ds=h[9]|0,Vt=Ds&8191,Gt=Ds>>>13;m.negative=s.negative^a.negative,m.length=19,k=Math.imul(V,We),p=Math.imul(V,Je),p=p+Math.imul(X,We)|0,I=Math.imul(X,Je);var Jo=(v+k|0)+((p&8191)<<13)|0;v=(I+(p>>>13)|0)+(Jo>>>26)|0,Jo&=67108863,k=Math.imul(le,We),p=Math.imul(le,Je),p=p+Math.imul(pe,We)|0,I=Math.imul(pe,Je),k=k+Math.imul(V,ze)|0,p=p+Math.imul(V,Ze)|0,p=p+Math.imul(X,ze)|0,I=I+Math.imul(X,Ze)|0;var zo=(v+k|0)+((p&8191)<<13)|0;v=(I+(p>>>13)|0)+(zo>>>26)|0,zo&=67108863,k=Math.imul(be,We),p=Math.imul(be,Je),p=p+Math.imul(ye,We)|0,I=Math.imul(ye,Je),k=k+Math.imul(le,ze)|0,p=p+Math.imul(le,Ze)|0,p=p+Math.imul(pe,ze)|0,I=I+Math.imul(pe,Ze)|0,k=k+Math.imul(V,Ve)|0,p=p+Math.imul(V,Ge)|0,p=p+Math.imul(X,Ve)|0,I=I+Math.imul(X,Ge)|0;var Zo=(v+k|0)+((p&8191)<<13)|0;v=(I+(p>>>13)|0)+(Zo>>>26)|0,Zo&=67108863,k=Math.imul(we,We),p=Math.imul(we,Je),p=p+Math.imul(xe,We)|0,I=Math.imul(xe,Je),k=k+Math.imul(be,ze)|0,p=p+Math.imul(be,Ze)|0,p=p+Math.imul(ye,ze)|0,I=I+Math.imul(ye,Ze)|0,k=k+Math.imul(le,Ve)|0,p=p+Math.imul(le,Ge)|0,p=p+Math.imul(pe,Ve)|0,I=I+Math.imul(pe,Ge)|0,k=k+Math.imul(V,Ye)|0,p=p+Math.imul(V,Xe)|0,p=p+Math.imul(X,Ye)|0,I=I+Math.imul(X,Xe)|0;var Vo=(v+k|0)+((p&8191)<<13)|0;v=(I+(p>>>13)|0)+(Vo>>>26)|0,Vo&=67108863,k=Math.imul(Ce,We),p=Math.imul(Ce,Je),p=p+Math.imul(Ee,We)|0,I=Math.imul(Ee,Je),k=k+Math.imul(we,ze)|0,p=p+Math.imul(we,Ze)|0,p=p+Math.imul(xe,ze)|0,I=I+Math.imul(xe,Ze)|0,k=k+Math.imul(be,Ve)|0,p=p+Math.imul(be,Ge)|0,p=p+Math.imul(ye,Ve)|0,I=I+Math.imul(ye,Ge)|0,k=k+Math.imul(le,Ye)|0,p=p+Math.imul(le,Xe)|0,p=p+Math.imul(pe,Ye)|0,I=I+Math.imul(pe,Xe)|0,k=k+Math.imul(V,Qe)|0,p=p+Math.imul(V,je)|0,p=p+Math.imul(X,Qe)|0,I=I+Math.imul(X,je)|0;var Go=(v+k|0)+((p&8191)<<13)|0;v=(I+(p>>>13)|0)+(Go>>>26)|0,Go&=67108863,k=Math.imul(Te,We),p=Math.imul(Te,Je),p=p+Math.imul(Oe,We)|0,I=Math.imul(Oe,Je),k=k+Math.imul(Ce,ze)|0,p=p+Math.imul(Ce,Ze)|0,p=p+Math.imul(Ee,ze)|0,I=I+Math.imul(Ee,Ze)|0,k=k+Math.imul(we,Ve)|0,p=p+Math.imul(we,Ge)|0,p=p+Math.imul(xe,Ve)|0,I=I+Math.imul(xe,Ge)|0,k=k+Math.imul(be,Ye)|0,p=p+Math.imul(be,Xe)|0,p=p+Math.imul(ye,Ye)|0,I=I+Math.imul(ye,Xe)|0,k=k+Math.imul(le,Qe)|0,p=p+Math.imul(le,je)|0,p=p+Math.imul(pe,Qe)|0,I=I+Math.imul(pe,je)|0,k=k+Math.imul(V,et)|0,p=p+Math.imul(V,tt)|0,p=p+Math.imul(X,et)|0,I=I+Math.imul(X,tt)|0;var Yo=(v+k|0)+((p&8191)<<13)|0;v=(I+(p>>>13)|0)+(Yo>>>26)|0,Yo&=67108863,k=Math.imul(De,We),p=Math.imul(De,Je),p=p+Math.imul(Ne,We)|0,I=Math.imul(Ne,Je),k=k+Math.imul(Te,ze)|0,p=p+Math.imul(Te,Ze)|0,p=p+Math.imul(Oe,ze)|0,I=I+Math.imul(Oe,Ze)|0,k=k+Math.imul(Ce,Ve)|0,p=p+Math.imul(Ce,Ge)|0,p=p+Math.imul(Ee,Ve)|0,I=I+Math.imul(Ee,Ge)|0,k=k+Math.imul(we,Ye)|0,p=p+Math.imul(we,Xe)|0,p=p+Math.imul(xe,Ye)|0,I=I+Math.imul(xe,Xe)|0,k=k+Math.imul(be,Qe)|0,p=p+Math.imul(be,je)|0,p=p+Math.imul(ye,Qe)|0,I=I+Math.imul(ye,je)|0,k=k+Math.imul(le,et)|0,p=p+Math.imul(le,tt)|0,p=p+Math.imul(pe,et)|0,I=I+Math.imul(pe,tt)|0,k=k+Math.imul(V,nt)|0,p=p+Math.imul(V,rt)|0,p=p+Math.imul(X,nt)|0,I=I+Math.imul(X,rt)|0;var Xo=(v+k|0)+((p&8191)<<13)|0;v=(I+(p>>>13)|0)+(Xo>>>26)|0,Xo&=67108863,k=Math.imul(Le,We),p=Math.imul(Le,Je),p=p+Math.imul(qe,We)|0,I=Math.imul(qe,Je),k=k+Math.imul(De,ze)|0,p=p+Math.imul(De,Ze)|0,p=p+Math.imul(Ne,ze)|0,I=I+Math.imul(Ne,Ze)|0,k=k+Math.imul(Te,Ve)|0,p=p+Math.imul(Te,Ge)|0,p=p+Math.imul(Oe,Ve)|0,I=I+Math.imul(Oe,Ge)|0,k=k+Math.imul(Ce,Ye)|0,p=p+Math.imul(Ce,Xe)|0,p=p+Math.imul(Ee,Ye)|0,I=I+Math.imul(Ee,Xe)|0,k=k+Math.imul(we,Qe)|0,p=p+Math.imul(we,je)|0,p=p+Math.imul(xe,Qe)|0,I=I+Math.imul(xe,je)|0,k=k+Math.imul(be,et)|0,p=p+Math.imul(be,tt)|0,p=p+Math.imul(ye,et)|0,I=I+Math.imul(ye,tt)|0,k=k+Math.imul(le,nt)|0,p=p+Math.imul(le,rt)|0,p=p+Math.imul(pe,nt)|0,I=I+Math.imul(pe,rt)|0,k=k+Math.imul(V,it)|0,p=p+Math.imul(V,ot)|0,p=p+Math.imul(X,it)|0,I=I+Math.imul(X,ot)|0;var Qo=(v+k|0)+((p&8191)<<13)|0;v=(I+(p>>>13)|0)+(Qo>>>26)|0,Qo&=67108863,k=Math.imul(Fe,We),p=Math.imul(Fe,Je),p=p+Math.imul(He,We)|0,I=Math.imul(He,Je),k=k+Math.imul(Le,ze)|0,p=p+Math.imul(Le,Ze)|0,p=p+Math.imul(qe,ze)|0,I=I+Math.imul(qe,Ze)|0,k=k+Math.imul(De,Ve)|0,p=p+Math.imul(De,Ge)|0,p=p+Math.imul(Ne,Ve)|0,I=I+Math.imul(Ne,Ge)|0,k=k+Math.imul(Te,Ye)|0,p=p+Math.imul(Te,Xe)|0,p=p+Math.imul(Oe,Ye)|0,I=I+Math.imul(Oe,Xe)|0,k=k+Math.imul(Ce,Qe)|0,p=p+Math.imul(Ce,je)|0,p=p+Math.imul(Ee,Qe)|0,I=I+Math.imul(Ee,je)|0,k=k+Math.imul(we,et)|0,p=p+Math.imul(we,tt)|0,p=p+Math.imul(xe,et)|0,I=I+Math.imul(xe,tt)|0,k=k+Math.imul(be,nt)|0,p=p+Math.imul(be,rt)|0,p=p+Math.imul(ye,nt)|0,I=I+Math.imul(ye,rt)|0,k=k+Math.imul(le,it)|0,p=p+Math.imul(le,ot)|0,p=p+Math.imul(pe,it)|0,I=I+Math.imul(pe,ot)|0,k=k+Math.imul(V,st)|0,p=p+Math.imul(V,at)|0,p=p+Math.imul(X,st)|0,I=I+Math.imul(X,at)|0;var jo=(v+k|0)+((p&8191)<<13)|0;v=(I+(p>>>13)|0)+(jo>>>26)|0,jo&=67108863,k=Math.imul(Ke,We),p=Math.imul(Ke,Je),p=p+Math.imul($e,We)|0,I=Math.imul($e,Je),k=k+Math.imul(Fe,ze)|0,p=p+Math.imul(Fe,Ze)|0,p=p+Math.imul(He,ze)|0,I=I+Math.imul(He,Ze)|0,k=k+Math.imul(Le,Ve)|0,p=p+Math.imul(Le,Ge)|0,p=p+Math.imul(qe,Ve)|0,I=I+Math.imul(qe,Ge)|0,k=k+Math.imul(De,Ye)|0,p=p+Math.imul(De,Xe)|0,p=p+Math.imul(Ne,Ye)|0,I=I+Math.imul(Ne,Xe)|0,k=k+Math.imul(Te,Qe)|0,p=p+Math.imul(Te,je)|0,p=p+Math.imul(Oe,Qe)|0,I=I+Math.imul(Oe,je)|0,k=k+Math.imul(Ce,et)|0,p=p+Math.imul(Ce,tt)|0,p=p+Math.imul(Ee,et)|0,I=I+Math.imul(Ee,tt)|0,k=k+Math.imul(we,nt)|0,p=p+Math.imul(we,rt)|0,p=p+Math.imul(xe,nt)|0,I=I+Math.imul(xe,rt)|0,k=k+Math.imul(be,it)|0,p=p+Math.imul(be,ot)|0,p=p+Math.imul(ye,it)|0,I=I+Math.imul(ye,ot)|0,k=k+Math.imul(le,st)|0,p=p+Math.imul(le,at)|0,p=p+Math.imul(pe,st)|0,I=I+Math.imul(pe,at)|0,k=k+Math.imul(V,Vt)|0,p=p+Math.imul(V,Gt)|0,p=p+Math.imul(X,Vt)|0,I=I+Math.imul(X,Gt)|0;var es=(v+k|0)+((p&8191)<<13)|0;v=(I+(p>>>13)|0)+(es>>>26)|0,es&=67108863,k=Math.imul(Ke,ze),p=Math.imul(Ke,Ze),p=p+Math.imul($e,ze)|0,I=Math.imul($e,Ze),k=k+Math.imul(Fe,Ve)|0,p=p+Math.imul(Fe,Ge)|0,p=p+Math.imul(He,Ve)|0,I=I+Math.imul(He,Ge)|0,k=k+Math.imul(Le,Ye)|0,p=p+Math.imul(Le,Xe)|0,p=p+Math.imul(qe,Ye)|0,I=I+Math.imul(qe,Xe)|0,k=k+Math.imul(De,Qe)|0,p=p+Math.imul(De,je)|0,p=p+Math.imul(Ne,Qe)|0,I=I+Math.imul(Ne,je)|0,k=k+Math.imul(Te,et)|0,p=p+Math.imul(Te,tt)|0,p=p+Math.imul(Oe,et)|0,I=I+Math.imul(Oe,tt)|0,k=k+Math.imul(Ce,nt)|0,p=p+Math.imul(Ce,rt)|0,p=p+Math.imul(Ee,nt)|0,I=I+Math.imul(Ee,rt)|0,k=k+Math.imul(we,it)|0,p=p+Math.imul(we,ot)|0,p=p+Math.imul(xe,it)|0,I=I+Math.imul(xe,ot)|0,k=k+Math.imul(be,st)|0,p=p+Math.imul(be,at)|0,p=p+Math.imul(ye,st)|0,I=I+Math.imul(ye,at)|0,k=k+Math.imul(le,Vt)|0,p=p+Math.imul(le,Gt)|0,p=p+Math.imul(pe,Vt)|0,I=I+Math.imul(pe,Gt)|0;var ts=(v+k|0)+((p&8191)<<13)|0;v=(I+(p>>>13)|0)+(ts>>>26)|0,ts&=67108863,k=Math.imul(Ke,Ve),p=Math.imul(Ke,Ge),p=p+Math.imul($e,Ve)|0,I=Math.imul($e,Ge),k=k+Math.imul(Fe,Ye)|0,p=p+Math.imul(Fe,Xe)|0,p=p+Math.imul(He,Ye)|0,I=I+Math.imul(He,Xe)|0,k=k+Math.imul(Le,Qe)|0,p=p+Math.imul(Le,je)|0,p=p+Math.imul(qe,Qe)|0,I=I+Math.imul(qe,je)|0,k=k+Math.imul(De,et)|0,p=p+Math.imul(De,tt)|0,p=p+Math.imul(Ne,et)|0,I=I+Math.imul(Ne,tt)|0,k=k+Math.imul(Te,nt)|0,p=p+Math.imul(Te,rt)|0,p=p+Math.imul(Oe,nt)|0,I=I+Math.imul(Oe,rt)|0,k=k+Math.imul(Ce,it)|0,p=p+Math.imul(Ce,ot)|0,p=p+Math.imul(Ee,it)|0,I=I+Math.imul(Ee,ot)|0,k=k+Math.imul(we,st)|0,p=p+Math.imul(we,at)|0,p=p+Math.imul(xe,st)|0,I=I+Math.imul(xe,at)|0,k=k+Math.imul(be,Vt)|0,p=p+Math.imul(be,Gt)|0,p=p+Math.imul(ye,Vt)|0,I=I+Math.imul(ye,Gt)|0;var ns=(v+k|0)+((p&8191)<<13)|0;v=(I+(p>>>13)|0)+(ns>>>26)|0,ns&=67108863,k=Math.imul(Ke,Ye),p=Math.imul(Ke,Xe),p=p+Math.imul($e,Ye)|0,I=Math.imul($e,Xe),k=k+Math.imul(Fe,Qe)|0,p=p+Math.imul(Fe,je)|0,p=p+Math.imul(He,Qe)|0,I=I+Math.imul(He,je)|0,k=k+Math.imul(Le,et)|0,p=p+Math.imul(Le,tt)|0,p=p+Math.imul(qe,et)|0,I=I+Math.imul(qe,tt)|0,k=k+Math.imul(De,nt)|0,p=p+Math.imul(De,rt)|0,p=p+Math.imul(Ne,nt)|0,I=I+Math.imul(Ne,rt)|0,k=k+Math.imul(Te,it)|0,p=p+Math.imul(Te,ot)|0,p=p+Math.imul(Oe,it)|0,I=I+Math.imul(Oe,ot)|0,k=k+Math.imul(Ce,st)|0,p=p+Math.imul(Ce,at)|0,p=p+Math.imul(Ee,st)|0,I=I+Math.imul(Ee,at)|0,k=k+Math.imul(we,Vt)|0,p=p+Math.imul(we,Gt)|0,p=p+Math.imul(xe,Vt)|0,I=I+Math.imul(xe,Gt)|0;var rs=(v+k|0)+((p&8191)<<13)|0;v=(I+(p>>>13)|0)+(rs>>>26)|0,rs&=67108863,k=Math.imul(Ke,Qe),p=Math.imul(Ke,je),p=p+Math.imul($e,Qe)|0,I=Math.imul($e,je),k=k+Math.imul(Fe,et)|0,p=p+Math.imul(Fe,tt)|0,p=p+Math.imul(He,et)|0,I=I+Math.imul(He,tt)|0,k=k+Math.imul(Le,nt)|0,p=p+Math.imul(Le,rt)|0,p=p+Math.imul(qe,nt)|0,I=I+Math.imul(qe,rt)|0,k=k+Math.imul(De,it)|0,p=p+Math.imul(De,ot)|0,p=p+Math.imul(Ne,it)|0,I=I+Math.imul(Ne,ot)|0,k=k+Math.imul(Te,st)|0,p=p+Math.imul(Te,at)|0,p=p+Math.imul(Oe,st)|0,I=I+Math.imul(Oe,at)|0,k=k+Math.imul(Ce,Vt)|0,p=p+Math.imul(Ce,Gt)|0,p=p+Math.imul(Ee,Vt)|0,I=I+Math.imul(Ee,Gt)|0;var is=(v+k|0)+((p&8191)<<13)|0;v=(I+(p>>>13)|0)+(is>>>26)|0,is&=67108863,k=Math.imul(Ke,et),p=Math.imul(Ke,tt),p=p+Math.imul($e,et)|0,I=Math.imul($e,tt),k=k+Math.imul(Fe,nt)|0,p=p+Math.imul(Fe,rt)|0,p=p+Math.imul(He,nt)|0,I=I+Math.imul(He,rt)|0,k=k+Math.imul(Le,it)|0,p=p+Math.imul(Le,ot)|0,p=p+Math.imul(qe,it)|0,I=I+Math.imul(qe,ot)|0,k=k+Math.imul(De,st)|0,p=p+Math.imul(De,at)|0,p=p+Math.imul(Ne,st)|0,I=I+Math.imul(Ne,at)|0,k=k+Math.imul(Te,Vt)|0,p=p+Math.imul(Te,Gt)|0,p=p+Math.imul(Oe,Vt)|0,I=I+Math.imul(Oe,Gt)|0;var os=(v+k|0)+((p&8191)<<13)|0;v=(I+(p>>>13)|0)+(os>>>26)|0,os&=67108863,k=Math.imul(Ke,nt),p=Math.imul(Ke,rt),p=p+Math.imul($e,nt)|0,I=Math.imul($e,rt),k=k+Math.imul(Fe,it)|0,p=p+Math.imul(Fe,ot)|0,p=p+Math.imul(He,it)|0,I=I+Math.imul(He,ot)|0,k=k+Math.imul(Le,st)|0,p=p+Math.imul(Le,at)|0,p=p+Math.imul(qe,st)|0,I=I+Math.imul(qe,at)|0,k=k+Math.imul(De,Vt)|0,p=p+Math.imul(De,Gt)|0,p=p+Math.imul(Ne,Vt)|0,I=I+Math.imul(Ne,Gt)|0;var ss=(v+k|0)+((p&8191)<<13)|0;v=(I+(p>>>13)|0)+(ss>>>26)|0,ss&=67108863,k=Math.imul(Ke,it),p=Math.imul(Ke,ot),p=p+Math.imul($e,it)|0,I=Math.imul($e,ot),k=k+Math.imul(Fe,st)|0,p=p+Math.imul(Fe,at)|0,p=p+Math.imul(He,st)|0,I=I+Math.imul(He,at)|0,k=k+Math.imul(Le,Vt)|0,p=p+Math.imul(Le,Gt)|0,p=p+Math.imul(qe,Vt)|0,I=I+Math.imul(qe,Gt)|0;var Af=(v+k|0)+((p&8191)<<13)|0;v=(I+(p>>>13)|0)+(Af>>>26)|0,Af&=67108863,k=Math.imul(Ke,st),p=Math.imul(Ke,at),p=p+Math.imul($e,st)|0,I=Math.imul($e,at),k=k+Math.imul(Fe,Vt)|0,p=p+Math.imul(Fe,Gt)|0,p=p+Math.imul(He,Vt)|0,I=I+Math.imul(He,Gt)|0;var Mf=(v+k|0)+((p&8191)<<13)|0;v=(I+(p>>>13)|0)+(Mf>>>26)|0,Mf&=67108863,k=Math.imul(Ke,Vt),p=Math.imul(Ke,Gt),p=p+Math.imul($e,Vt)|0,I=Math.imul($e,Gt);var wf=(v+k|0)+((p&8191)<<13)|0;return v=(I+(p>>>13)|0)+(wf>>>26)|0,wf&=67108863,u[0]=Jo,u[1]=zo,u[2]=Zo,u[3]=Vo,u[4]=Go,u[5]=Yo,u[6]=Xo,u[7]=Qo,u[8]=jo,u[9]=es,u[10]=ts,u[11]=ns,u[12]=rs,u[13]=is,u[14]=os,u[15]=ss,u[16]=Af,u[17]=Mf,u[18]=wf,v!==0&&(u[19]=v,m.length++),m};Math.imul||(D=T);function K(l,s,a){a.negative=s.negative^l.negative,a.length=l.length+s.length;for(var m=0,y=0,h=0;h<a.length-1;h++){var u=y;y=0;for(var v=m&67108863,k=Math.min(h,s.length-1),p=Math.max(0,h-l.length+1);p<=k;p++){var I=h-p,W=l.words[I]|0,V=s.words[p]|0,X=W*V,de=X&67108863;u=u+(X/67108864|0)|0,de=de+v|0,v=de&67108863,u=u+(de>>>26)|0,y+=u>>>26,u&=67108863}a.words[h]=v,m=u,u=y}return m!==0?a.words[h]=m:a.length--,a._strip()}function N(l,s,a){return K(l,s,a)}r.prototype.mulTo=function(s,a){var m,y=this.length+s.length;return this.length===10&&s.length===10?m=D(this,s,a):y<63?m=T(this,s,a):y<1024?m=K(this,s,a):m=N(this,s,a),m};function Z(l,s){this.x=l,this.y=s}Z.prototype.makeRBT=function(s){for(var a=new Array(s),m=r.prototype._countBits(s)-1,y=0;y<s;y++)a[y]=this.revBin(y,m,s);return a},Z.prototype.revBin=function(s,a,m){if(s===0||s===m-1)return s;for(var y=0,h=0;h<a;h++)y|=(s&1)<<a-h-1,s>>=1;return y},Z.prototype.permute=function(s,a,m,y,h,u){for(var v=0;v<u;v++)y[v]=a[s[v]],h[v]=m[s[v]]},Z.prototype.transform=function(s,a,m,y,h,u){this.permute(u,s,a,m,y,h);for(var v=1;v<h;v<<=1)for(var k=v<<1,p=Math.cos(2*Math.PI/k),I=Math.sin(2*Math.PI/k),W=0;W<h;W+=k)for(var V=p,X=I,de=0;de<v;de++){var le=m[W+de],pe=y[W+de],En=m[W+de+v],be=y[W+de+v],ye=V*En-X*be;be=V*be+X*En,En=ye,m[W+de]=le+En,y[W+de]=pe+be,m[W+de+v]=le-En,y[W+de+v]=pe-be,de!==k&&(ye=p*V-I*X,X=p*X+I*V,V=ye)}},Z.prototype.guessLen13b=function(s,a){var m=Math.max(a,s)|1,y=m&1,h=0;for(m=m/2|0;m;m=m>>>1)h++;return 1<<h+1+y},Z.prototype.conjugate=function(s,a,m){if(!(m<=1))for(var y=0;y<m/2;y++){var h=s[y];s[y]=s[m-y-1],s[m-y-1]=h,h=a[y],a[y]=-a[m-y-1],a[m-y-1]=-h}},Z.prototype.normalize13b=function(s,a){for(var m=0,y=0;y<a/2;y++){var h=Math.round(s[2*y+1]/a)*8192+Math.round(s[2*y]/a)+m;s[y]=h&67108863,h<67108864?m=0:m=h/67108864|0}return s},Z.prototype.convert13b=function(s,a,m,y){for(var h=0,u=0;u<a;u++)h=h+(s[u]|0),m[2*u]=h&8191,h=h>>>13,m[2*u+1]=h&8191,h=h>>>13;for(u=2*a;u<y;++u)m[u]=0;n(h===0),n((h&-8192)===0)},Z.prototype.stub=function(s){for(var a=new Array(s),m=0;m<s;m++)a[m]=0;return a},Z.prototype.mulp=function(s,a,m){var y=2*this.guessLen13b(s.length,a.length),h=this.makeRBT(y),u=this.stub(y),v=new Array(y),k=new Array(y),p=new Array(y),I=new Array(y),W=new Array(y),V=new Array(y),X=m.words;X.length=y,this.convert13b(s.words,s.length,v,y),this.convert13b(a.words,a.length,I,y),this.transform(v,u,k,p,y,h),this.transform(I,u,W,V,y,h);for(var de=0;de<y;de++){var le=k[de]*W[de]-p[de]*V[de];p[de]=k[de]*V[de]+p[de]*W[de],k[de]=le}return this.conjugate(k,p,y),this.transform(k,p,X,u,y,h),this.conjugate(X,u,y),this.normalize13b(X,y),m.negative=s.negative^a.negative,m.length=s.length+a.length,m._strip()},r.prototype.mul=function(s){var a=new r(null);return a.words=new Array(this.length+s.length),this.mulTo(s,a)},r.prototype.mulf=function(s){var a=new r(null);return a.words=new Array(this.length+s.length),N(this,s,a)},r.prototype.imul=function(s){return this.clone().mulTo(s,this)},r.prototype.imuln=function(s){var a=s<0;a&&(s=-s),n(typeof s=="number"),n(s<67108864);for(var m=0,y=0;y<this.length;y++){var h=(this.words[y]|0)*s,u=(h&67108863)+(m&67108863);m>>=26,m+=h/67108864|0,m+=u>>>26,this.words[y]=u&67108863}return m!==0&&(this.words[y]=m,this.length++),a?this.ineg():this},r.prototype.muln=function(s){return this.clone().imuln(s)},r.prototype.sqr=function(){return this.mul(this)},r.prototype.isqr=function(){return this.imul(this.clone())},r.prototype.pow=function(s){var a=_(s);if(a.length===0)return new r(1);for(var m=this,y=0;y<a.length&&a[y]===0;y++,m=m.sqr());if(++y<a.length)for(var h=m.sqr();y<a.length;y++,h=h.sqr())a[y]!==0&&(m=m.mul(h));return m},r.prototype.iushln=function(s){n(typeof s=="number"&&s>=0);var a=s%26,m=(s-a)/26,y=67108863>>>26-a<<26-a,h;if(a!==0){var u=0;for(h=0;h<this.length;h++){var v=this.words[h]&y,k=(this.words[h]|0)-v<<a;this.words[h]=k|u,u=v>>>26-a}u&&(this.words[h]=u,this.length++)}if(m!==0){for(h=this.length-1;h>=0;h--)this.words[h+m]=this.words[h];for(h=0;h<m;h++)this.words[h]=0;this.length+=m}return this._strip()},r.prototype.ishln=function(s){return n(this.negative===0),this.iushln(s)},r.prototype.iushrn=function(s,a,m){n(typeof s=="number"&&s>=0);var y;a?y=(a-a%26)/26:y=0;var h=s%26,u=Math.min((s-h)/26,this.length),v=67108863^67108863>>>h<<h,k=m;if(y-=u,y=Math.max(0,y),k){for(var p=0;p<u;p++)k.words[p]=this.words[p];k.length=u}if(u!==0)if(this.length>u)for(this.length-=u,p=0;p<this.length;p++)this.words[p]=this.words[p+u];else this.words[0]=0,this.length=1;var I=0;for(p=this.length-1;p>=0&&(I!==0||p>=y);p--){var W=this.words[p]|0;this.words[p]=I<<26-h|W>>>h,I=W&v}return k&&I!==0&&(k.words[k.length++]=I),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},r.prototype.ishrn=function(s,a,m){return n(this.negative===0),this.iushrn(s,a,m)},r.prototype.shln=function(s){return this.clone().ishln(s)},r.prototype.ushln=function(s){return this.clone().iushln(s)},r.prototype.shrn=function(s){return this.clone().ishrn(s)},r.prototype.ushrn=function(s){return this.clone().iushrn(s)},r.prototype.testn=function(s){n(typeof s=="number"&&s>=0);var a=s%26,m=(s-a)/26,y=1<<a;if(this.length<=m)return!1;var h=this.words[m];return!!(h&y)},r.prototype.imaskn=function(s){n(typeof s=="number"&&s>=0);var a=s%26,m=(s-a)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=m)return this;if(a!==0&&m++,this.length=Math.min(m,this.length),a!==0){var y=67108863^67108863>>>a<<a;this.words[this.length-1]&=y}return this._strip()},r.prototype.maskn=function(s){return this.clone().imaskn(s)},r.prototype.iaddn=function(s){return n(typeof s=="number"),n(s<67108864),s<0?this.isubn(-s):this.negative!==0?this.length===1&&(this.words[0]|0)<=s?(this.words[0]=s-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(s),this.negative=1,this):this._iaddn(s)},r.prototype._iaddn=function(s){this.words[0]+=s;for(var a=0;a<this.length&&this.words[a]>=67108864;a++)this.words[a]-=67108864,a===this.length-1?this.words[a+1]=1:this.words[a+1]++;return this.length=Math.max(this.length,a+1),this},r.prototype.isubn=function(s){if(n(typeof s=="number"),n(s<67108864),s<0)return this.iaddn(-s);if(this.negative!==0)return this.negative=0,this.iaddn(s),this.negative=1,this;if(this.words[0]-=s,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var a=0;a<this.length&&this.words[a]<0;a++)this.words[a]+=67108864,this.words[a+1]-=1;return this._strip()},r.prototype.addn=function(s){return this.clone().iaddn(s)},r.prototype.subn=function(s){return this.clone().isubn(s)},r.prototype.iabs=function(){return this.negative=0,this},r.prototype.abs=function(){return this.clone().iabs()},r.prototype._ishlnsubmul=function(s,a,m){var y=s.length+m,h;this._expand(y);var u,v=0;for(h=0;h<s.length;h++){u=(this.words[h+m]|0)+v;var k=(s.words[h]|0)*a;u-=k&67108863,v=(u>>26)-(k/67108864|0),this.words[h+m]=u&67108863}for(;h<this.length-m;h++)u=(this.words[h+m]|0)+v,v=u>>26,this.words[h+m]=u&67108863;if(v===0)return this._strip();for(n(v===-1),v=0,h=0;h<this.length;h++)u=-(this.words[h]|0)+v,v=u>>26,this.words[h]=u&67108863;return this.negative=1,this._strip()},r.prototype._wordDiv=function(s,a){var m=this.length-s.length,y=this.clone(),h=s,u=h.words[h.length-1]|0,v=this._countBits(u);m=26-v,m!==0&&(h=h.ushln(m),y.iushln(m),u=h.words[h.length-1]|0);var k=y.length-h.length,p;if(a!=="mod"){p=new r(null),p.length=k+1,p.words=new Array(p.length);for(var I=0;I<p.length;I++)p.words[I]=0}var W=y.clone()._ishlnsubmul(h,1,k);W.negative===0&&(y=W,p&&(p.words[k]=1));for(var V=k-1;V>=0;V--){var X=(y.words[h.length+V]|0)*67108864+(y.words[h.length+V-1]|0);for(X=Math.min(X/u|0,67108863),y._ishlnsubmul(h,X,V);y.negative!==0;)X--,y.negative=0,y._ishlnsubmul(h,1,V),y.isZero()||(y.negative^=1);p&&(p.words[V]=X)}return p&&p._strip(),y._strip(),a!=="div"&&m!==0&&y.iushrn(m),{div:p||null,mod:y}},r.prototype.divmod=function(s,a,m){if(n(!s.isZero()),this.isZero())return{div:new r(0),mod:new r(0)};var y,h,u;return this.negative!==0&&s.negative===0?(u=this.neg().divmod(s,a),a!=="mod"&&(y=u.div.neg()),a!=="div"&&(h=u.mod.neg(),m&&h.negative!==0&&h.iadd(s)),{div:y,mod:h}):this.negative===0&&s.negative!==0?(u=this.divmod(s.neg(),a),a!=="mod"&&(y=u.div.neg()),{div:y,mod:u.mod}):(this.negative&s.negative)!==0?(u=this.neg().divmod(s.neg(),a),a!=="div"&&(h=u.mod.neg(),m&&h.negative!==0&&h.isub(s)),{div:u.div,mod:h}):s.length>this.length||this.cmp(s)<0?{div:new r(0),mod:this}:s.length===1?a==="div"?{div:this.divn(s.words[0]),mod:null}:a==="mod"?{div:null,mod:new r(this.modrn(s.words[0]))}:{div:this.divn(s.words[0]),mod:new r(this.modrn(s.words[0]))}:this._wordDiv(s,a)},r.prototype.div=function(s){return this.divmod(s,"div",!1).div},r.prototype.mod=function(s){return this.divmod(s,"mod",!1).mod},r.prototype.umod=function(s){return this.divmod(s,"mod",!0).mod},r.prototype.divRound=function(s){var a=this.divmod(s);if(a.mod.isZero())return a.div;var m=a.div.negative!==0?a.mod.isub(s):a.mod,y=s.ushrn(1),h=s.andln(1),u=m.cmp(y);return u<0||h===1&&u===0?a.div:a.div.negative!==0?a.div.isubn(1):a.div.iaddn(1)},r.prototype.modrn=function(s){var a=s<0;a&&(s=-s),n(s<=67108863);for(var m=(1<<26)%s,y=0,h=this.length-1;h>=0;h--)y=(m*y+(this.words[h]|0))%s;return a?-y:y},r.prototype.modn=function(s){return this.modrn(s)},r.prototype.idivn=function(s){var a=s<0;a&&(s=-s),n(s<=67108863);for(var m=0,y=this.length-1;y>=0;y--){var h=(this.words[y]|0)+m*67108864;this.words[y]=h/s|0,m=h%s}return this._strip(),a?this.ineg():this},r.prototype.divn=function(s){return this.clone().idivn(s)},r.prototype.egcd=function(s){n(s.negative===0),n(!s.isZero());var a=this,m=s.clone();a.negative!==0?a=a.umod(s):a=a.clone();for(var y=new r(1),h=new r(0),u=new r(0),v=new r(1),k=0;a.isEven()&&m.isEven();)a.iushrn(1),m.iushrn(1),++k;for(var p=m.clone(),I=a.clone();!a.isZero();){for(var W=0,V=1;(a.words[0]&V)===0&&W<26;++W,V<<=1);if(W>0)for(a.iushrn(W);W-- >0;)(y.isOdd()||h.isOdd())&&(y.iadd(p),h.isub(I)),y.iushrn(1),h.iushrn(1);for(var X=0,de=1;(m.words[0]&de)===0&&X<26;++X,de<<=1);if(X>0)for(m.iushrn(X);X-- >0;)(u.isOdd()||v.isOdd())&&(u.iadd(p),v.isub(I)),u.iushrn(1),v.iushrn(1);a.cmp(m)>=0?(a.isub(m),y.isub(u),h.isub(v)):(m.isub(a),u.isub(y),v.isub(h))}return{a:u,b:v,gcd:m.iushln(k)}},r.prototype._invmp=function(s){n(s.negative===0),n(!s.isZero());var a=this,m=s.clone();a.negative!==0?a=a.umod(s):a=a.clone();for(var y=new r(1),h=new r(0),u=m.clone();a.cmpn(1)>0&&m.cmpn(1)>0;){for(var v=0,k=1;(a.words[0]&k)===0&&v<26;++v,k<<=1);if(v>0)for(a.iushrn(v);v-- >0;)y.isOdd()&&y.iadd(u),y.iushrn(1);for(var p=0,I=1;(m.words[0]&I)===0&&p<26;++p,I<<=1);if(p>0)for(m.iushrn(p);p-- >0;)h.isOdd()&&h.iadd(u),h.iushrn(1);a.cmp(m)>=0?(a.isub(m),y.isub(h)):(m.isub(a),h.isub(y))}var W;return a.cmpn(1)===0?W=y:W=h,W.cmpn(0)<0&&W.iadd(s),W},r.prototype.gcd=function(s){if(this.isZero())return s.abs();if(s.isZero())return this.abs();var a=this.clone(),m=s.clone();a.negative=0,m.negative=0;for(var y=0;a.isEven()&&m.isEven();y++)a.iushrn(1),m.iushrn(1);do{for(;a.isEven();)a.iushrn(1);for(;m.isEven();)m.iushrn(1);var h=a.cmp(m);if(h<0){var u=a;a=m,m=u}else if(h===0||m.cmpn(1)===0)break;a.isub(m)}while(!0);return m.iushln(y)},r.prototype.invm=function(s){return this.egcd(s).a.umod(s)},r.prototype.isEven=function(){return(this.words[0]&1)===0},r.prototype.isOdd=function(){return(this.words[0]&1)===1},r.prototype.andln=function(s){return this.words[0]&s},r.prototype.bincn=function(s){n(typeof s=="number");var a=s%26,m=(s-a)/26,y=1<<a;if(this.length<=m)return this._expand(m+1),this.words[m]|=y,this;for(var h=y,u=m;h!==0&&u<this.length;u++){var v=this.words[u]|0;v+=h,h=v>>>26,v&=67108863,this.words[u]=v}return h!==0&&(this.words[u]=h,this.length++),this},r.prototype.isZero=function(){return this.length===1&&this.words[0]===0},r.prototype.cmpn=function(s){var a=s<0;if(this.negative!==0&&!a)return-1;if(this.negative===0&&a)return 1;this._strip();var m;if(this.length>1)m=1;else{a&&(s=-s),n(s<=67108863,"Number is too big");var y=this.words[0]|0;m=y===s?0:y<s?-1:1}return this.negative!==0?-m|0:m},r.prototype.cmp=function(s){if(this.negative!==0&&s.negative===0)return-1;if(this.negative===0&&s.negative!==0)return 1;var a=this.ucmp(s);return this.negative!==0?-a|0:a},r.prototype.ucmp=function(s){if(this.length>s.length)return 1;if(this.length<s.length)return-1;for(var a=0,m=this.length-1;m>=0;m--){var y=this.words[m]|0,h=s.words[m]|0;if(y!==h){y<h?a=-1:y>h&&(a=1);break}}return a},r.prototype.gtn=function(s){return this.cmpn(s)===1},r.prototype.gt=function(s){return this.cmp(s)===1},r.prototype.gten=function(s){return this.cmpn(s)>=0},r.prototype.gte=function(s){return this.cmp(s)>=0},r.prototype.ltn=function(s){return this.cmpn(s)===-1},r.prototype.lt=function(s){return this.cmp(s)===-1},r.prototype.lten=function(s){return this.cmpn(s)<=0},r.prototype.lte=function(s){return this.cmp(s)<=0},r.prototype.eqn=function(s){return this.cmpn(s)===0},r.prototype.eq=function(s){return this.cmp(s)===0},r.red=function(s){return new d(s)},r.prototype.toRed=function(s){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),s.convertTo(this)._forceRed(s)},r.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},r.prototype._forceRed=function(s){return this.red=s,this},r.prototype.forceRed=function(s){return n(!this.red,"Already a number in reduction context"),this._forceRed(s)},r.prototype.redAdd=function(s){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,s)},r.prototype.redIAdd=function(s){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,s)},r.prototype.redSub=function(s){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,s)},r.prototype.redISub=function(s){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,s)},r.prototype.redShl=function(s){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,s)},r.prototype.redMul=function(s){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,s),this.red.mul(this,s)},r.prototype.redIMul=function(s){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,s),this.red.imul(this,s)},r.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},r.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},r.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},r.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},r.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},r.prototype.redPow=function(s){return n(this.red&&!s.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,s)};var $={k256:null,p224:null,p192:null,p25519:null};function F(l,s){this.name=l,this.p=new r(s,16),this.n=this.p.bitLength(),this.k=new r(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}F.prototype._tmp=function(){var s=new r(null);return s.words=new Array(Math.ceil(this.n/13)),s},F.prototype.ireduce=function(s){var a=s,m;do this.split(a,this.tmp),a=this.imulK(a),a=a.iadd(this.tmp),m=a.bitLength();while(m>this.n);var y=m<this.n?-1:a.ucmp(this.p);return y===0?(a.words[0]=0,a.length=1):y>0?a.isub(this.p):a.strip!==void 0?a.strip():a._strip(),a},F.prototype.split=function(s,a){s.iushrn(this.n,0,a)},F.prototype.imulK=function(s){return s.imul(this.k)};function Y(){F.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(Y,F),Y.prototype.split=function(s,a){for(var m=4194303,y=Math.min(s.length,9),h=0;h<y;h++)a.words[h]=s.words[h];if(a.length=y,s.length<=9){s.words[0]=0,s.length=1;return}var u=s.words[9];for(a.words[a.length++]=u&m,h=10;h<s.length;h++){var v=s.words[h]|0;s.words[h-10]=(v&m)<<4|u>>>22,u=v}u>>>=22,s.words[h-10]=u,u===0&&s.length>10?s.length-=10:s.length-=9},Y.prototype.imulK=function(s){s.words[s.length]=0,s.words[s.length+1]=0,s.length+=2;for(var a=0,m=0;m<s.length;m++){var y=s.words[m]|0;a+=y*977,s.words[m]=a&67108863,a=y*64+(a/67108864|0)}return s.words[s.length-1]===0&&(s.length--,s.words[s.length-1]===0&&s.length--),s};function G(){F.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(G,F);function ue(){F.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(ue,F);function E(){F.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(E,F),E.prototype.imulK=function(s){for(var a=0,m=0;m<s.length;m++){var y=(s.words[m]|0)*19+a,h=y&67108863;y>>>=26,s.words[m]=h,a=y}return a!==0&&(s.words[s.length++]=a),s},r._prime=function(s){if($[s])return $[s];var a;if(s==="k256")a=new Y;else if(s==="p224")a=new G;else if(s==="p192")a=new ue;else if(s==="p25519")a=new E;else throw new Error("Unknown prime "+s);return $[s]=a,a};function d(l){if(typeof l=="string"){var s=r._prime(l);this.m=s.p,this.prime=s}else n(l.gtn(1),"modulus must be greater than 1"),this.m=l,this.prime=null}d.prototype._verify1=function(s){n(s.negative===0,"red works only with positives"),n(s.red,"red works only with red numbers")},d.prototype._verify2=function(s,a){n((s.negative|a.negative)===0,"red works only with positives"),n(s.red&&s.red===a.red,"red works only with red numbers")},d.prototype.imod=function(s){return this.prime?this.prime.ireduce(s)._forceRed(this):(A(s,s.umod(this.m)._forceRed(this)),s)},d.prototype.neg=function(s){return s.isZero()?s.clone():this.m.sub(s)._forceRed(this)},d.prototype.add=function(s,a){this._verify2(s,a);var m=s.add(a);return m.cmp(this.m)>=0&&m.isub(this.m),m._forceRed(this)},d.prototype.iadd=function(s,a){this._verify2(s,a);var m=s.iadd(a);return m.cmp(this.m)>=0&&m.isub(this.m),m},d.prototype.sub=function(s,a){this._verify2(s,a);var m=s.sub(a);return m.cmpn(0)<0&&m.iadd(this.m),m._forceRed(this)},d.prototype.isub=function(s,a){this._verify2(s,a);var m=s.isub(a);return m.cmpn(0)<0&&m.iadd(this.m),m},d.prototype.shl=function(s,a){return this._verify1(s),this.imod(s.ushln(a))},d.prototype.imul=function(s,a){return this._verify2(s,a),this.imod(s.imul(a))},d.prototype.mul=function(s,a){return this._verify2(s,a),this.imod(s.mul(a))},d.prototype.isqr=function(s){return this.imul(s,s.clone())},d.prototype.sqr=function(s){return this.mul(s,s)},d.prototype.sqrt=function(s){if(s.isZero())return s.clone();var a=this.m.andln(3);if(n(a%2===1),a===3){var m=this.m.add(new r(1)).iushrn(2);return this.pow(s,m)}for(var y=this.m.subn(1),h=0;!y.isZero()&&y.andln(1)===0;)h++,y.iushrn(1);n(!y.isZero());var u=new r(1).toRed(this),v=u.redNeg(),k=this.m.subn(1).iushrn(1),p=this.m.bitLength();for(p=new r(2*p*p).toRed(this);this.pow(p,k).cmp(v)!==0;)p.redIAdd(v);for(var I=this.pow(p,y),W=this.pow(s,y.addn(1).iushrn(1)),V=this.pow(s,y),X=h;V.cmp(u)!==0;){for(var de=V,le=0;de.cmp(u)!==0;le++)de=de.redSqr();n(le<X);var pe=this.pow(I,new r(1).iushln(X-le-1));W=W.redMul(pe),I=pe.redSqr(),V=V.redMul(I),X=le}return W},d.prototype.invm=function(s){var a=s._invmp(this.m);return a.negative!==0?(a.negative=0,this.imod(a).redNeg()):this.imod(a)},d.prototype.pow=function(s,a){if(a.isZero())return new r(1).toRed(this);if(a.cmpn(1)===0)return s.clone();var m=4,y=new Array(1<<m);y[0]=new r(1).toRed(this),y[1]=s;for(var h=2;h<y.length;h++)y[h]=this.mul(y[h-1],s);var u=y[0],v=0,k=0,p=a.bitLength()%26;for(p===0&&(p=26),h=a.length-1;h>=0;h--){for(var I=a.words[h],W=p-1;W>=0;W--){var V=I>>W&1;if(u!==y[0]&&(u=this.sqr(u)),V===0&&v===0){k=0;continue}v<<=1,v|=V,k++,!(k!==m&&(h!==0||W!==0))&&(u=this.mul(u,y[v]),k=0,v=0)}p=26}return u},d.prototype.convertTo=function(s){var a=s.umod(this.m);return a===s?a.clone():a},d.prototype.convertFrom=function(s){var a=s.clone();return a.red=null,a},r.mont=function(s){return new b(s)};function b(l){d.call(this,l),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new r(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(b,d),b.prototype.convertTo=function(s){return this.imod(s.ushln(this.shift))},b.prototype.convertFrom=function(s){var a=this.imod(s.mul(this.rinv));return a.red=null,a},b.prototype.imul=function(s,a){if(s.isZero()||a.isZero())return s.words[0]=0,s.length=1,s;var m=s.imul(a),y=m.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),h=m.isub(y).iushrn(this.shift),u=h;return h.cmp(this.m)>=0?u=h.isub(this.m):h.cmpn(0)<0&&(u=h.iadd(this.m)),u._forceRed(this)},b.prototype.mul=function(s,a){if(s.isZero()||a.isZero())return new r(0)._forceRed(this);var m=s.mul(a),y=m.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),h=m.isub(y).iushrn(this.shift),u=h;return h.cmp(this.m)>=0?u=h.isub(this.m):h.cmpn(0)<0&&(u=h.iadd(this.m)),u._forceRed(this)},b.prototype.invm=function(s){var a=this.imod(s._invmp(this.m).mul(this.r2));return a._forceRed(this)}})(typeof hl>"u"||hl,M2)});var k2=L(Aa=>{"use strict";B();R();var A4=Aa&&Aa.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Aa,"__esModule",{value:!0});Aa.Decimal=void 0;var oi=A4(gl()),w2=100,on=class{static fromUserInput(t,n){on.verifyFractionalDigits(n);let i=t.match(/[^0-9.]/);if(i)throw new Error(`Invalid character at position ${i.index+1}`);let r,o;if(t==="")r="0",o="";else if(t.search(/\./)===-1)r=t,o="";else{let c=t.split(".");switch(c.length){case 0:case 1:throw new Error("Fewer than two elements in split result. This must not happen here.");case 2:if(!c[1])throw new Error("Fractional part missing");r=c[0],o=c[1].replace(/0+$/,"");break;default:throw new Error("More than one separator found")}}if(o.length>n)throw new Error("Got more fractional digits than supported");let f=`${r}${o.padEnd(n,"0")}`;return new on(f,n)}static fromAtomics(t,n){return on.verifyFractionalDigits(n),new on(t,n)}static zero(t){return on.verifyFractionalDigits(t),new on("0",t)}static one(t){return on.verifyFractionalDigits(t),new on("1"+"0".repeat(t),t)}static verifyFractionalDigits(t){if(!Number.isInteger(t))throw new Error("Fractional digits is not an integer");if(t<0)throw new Error("Fractional digits must not be negative");if(t>w2)throw new Error(`Fractional digits must not exceed ${w2}`)}static compare(t,n){if(t.fractionalDigits!==n.fractionalDigits)throw new Error("Fractional digits do not match");return t.data.atomics.cmp(new oi.default(n.atomics))}get atomics(){return this.data.atomics.toString()}get fractionalDigits(){return this.data.fractionalDigits}constructor(t,n){if(!t.match(/^[0-9]+$/))throw new Error("Invalid string format. Only non-negative integers in decimal representation supported.");this.data={atomics:new oi.default(t),fractionalDigits:n}}clone(){return new on(this.atomics,this.fractionalDigits)}floor(){let t=new oi.default(10).pow(new oi.default(this.data.fractionalDigits)),n=this.data.atomics.div(t);return this.data.atomics.mod(t).isZero()?this.clone():on.fromAtomics(n.mul(t).toString(),this.fractionalDigits)}ceil(){let t=new oi.default(10).pow(new oi.default(this.data.fractionalDigits)),n=this.data.atomics.div(t);return this.data.atomics.mod(t).isZero()?this.clone():on.fromAtomics(n.addn(1).mul(t).toString(),this.fractionalDigits)}toString(){let t=new oi.default(10).pow(new oi.default(this.data.fractionalDigits)),n=this.data.atomics.div(t),i=this.data.atomics.mod(t);if(i.isZero())return n.toString();{let o=i.toString().padStart(this.data.fractionalDigits,"0").replace(/0+$/,"");return`${n.toString()}.${o}`}}toFloatApproximation(){let t=Number(this.toString());if(Number.isNaN(t))throw new Error("Conversion to number failed");return t}plus(t){if(this.fractionalDigits!==t.fractionalDigits)throw new Error("Fractional digits do not match");let n=this.data.atomics.add(new oi.default(t.atomics));return new on(n.toString(),this.fractionalDigits)}minus(t){if(this.fractionalDigits!==t.fractionalDigits)throw new Error("Fractional digits do not match");let n=this.data.atomics.sub(new oi.default(t.atomics));if(n.ltn(0))throw new Error("Difference must not be negative");return new on(n.toString(),this.fractionalDigits)}multiply(t){let n=this.data.atomics.mul(new oi.default(t.toString()));return new on(n.toString(),this.fractionalDigits)}equals(t){return on.compare(this,t)===0}isLessThan(t){return on.compare(this,t)<0}isLessThanOrEqual(t){return on.compare(this,t)<=0}isGreaterThan(t){return on.compare(this,t)>0}isGreaterThanOrEqual(t){return on.compare(this,t)>=0}};Aa.Decimal=on});var S2=L(Hr=>{"use strict";B();R();var M4=Hr&&Hr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Hr,"__esModule",{value:!0});Hr.Uint64=Hr.Uint53=Hr.Int53=Hr.Uint32=void 0;var Wu=M4(gl()),w4=new Wu.default("18446744073709551615",10,"be"),Ps=class{static fromBigEndianBytes(t){return Ps.fromBytes(t)}static fromBytes(t,n="be"){if(t.length!==4)throw new Error("Invalid input length. Expected 4 bytes.");for(let r=0;r<t.length;++r)if(!Number.isInteger(t[r])||t[r]>255||t[r]<0)throw new Error("Invalid value in byte. Found: "+t[r]);let i=n==="be"?t:Array.from(t).reverse();return new Ps(i[0]*2**24+i[1]*2**16+i[2]*2**8+i[3])}static fromString(t){if(!t.match(/^[0-9]+$/))throw new Error("Invalid string format");return new Ps(Number.parseInt(t,10))}constructor(t){if(Number.isNaN(t))throw new Error("Input is not a number");if(!Number.isInteger(t))throw new Error("Input is not an integer");if(t<0||t>4294967295)throw new Error("Input not in uint32 range: "+t.toString());this.data=t}toBytesBigEndian(){return new Uint8Array([Math.floor(this.data/2**24)&255,Math.floor(this.data/2**16)&255,Math.floor(this.data/2**8)&255,Math.floor(this.data/2**0)&255])}toBytesLittleEndian(){return new Uint8Array([Math.floor(this.data/2**0)&255,Math.floor(this.data/2**8)&255,Math.floor(this.data/2**16)&255,Math.floor(this.data/2**24)&255])}toNumber(){return this.data}toBigInt(){return BigInt(this.toNumber())}toString(){return this.data.toString()}};Hr.Uint32=Ps;var Us=class{static fromString(t){if(!t.match(/^-?[0-9]+$/))throw new Error("Invalid string format");return new Us(Number.parseInt(t,10))}constructor(t){if(Number.isNaN(t))throw new Error("Input is not a number");if(!Number.isInteger(t))throw new Error("Input is not an integer");if(t<Number.MIN_SAFE_INTEGER||t>Number.MAX_SAFE_INTEGER)throw new Error("Input not in int53 range: "+t.toString());this.data=t}toNumber(){return this.data}toBigInt(){return BigInt(this.toNumber())}toString(){return this.data.toString()}};Hr.Int53=Us;var Ud=class{static fromString(t){let n=Us.fromString(t);return new Ud(n.toNumber())}constructor(t){let n=new Us(t);if(n.toNumber()<0)throw new Error("Input is negative");this.data=n}toNumber(){return this.data.toNumber()}toBigInt(){return BigInt(this.toNumber())}toString(){return this.data.toString()}};Hr.Uint53=Ud;var Ro=class{static fromBytesBigEndian(t){return Ro.fromBytes(t)}static fromBytes(t,n="be"){if(t.length!==8)throw new Error("Invalid input length. Expected 8 bytes.");for(let r=0;r<t.length;++r)if(!Number.isInteger(t[r])||t[r]>255||t[r]<0)throw new Error("Invalid value in byte. Found: "+t[r]);let i=n==="be"?Array.from(t):Array.from(t).reverse();return new Ro(new Wu.default(i))}static fromString(t){if(!t.match(/^[0-9]+$/))throw new Error("Invalid string format");return new Ro(new Wu.default(t,10,"be"))}static fromNumber(t){if(Number.isNaN(t))throw new Error("Input is not a number");if(!Number.isInteger(t))throw new Error("Input is not an integer");let n;try{n=new Wu.default(t)}catch{throw new Error("Input is not a safe integer")}return new Ro(n)}constructor(t){if(t.isNeg())throw new Error("Input is negative");if(t.gt(w4))throw new Error("Input exceeds uint64 range");this.data=t}toBytesBigEndian(){return Uint8Array.from(this.data.toArray("be",8))}toBytesLittleEndian(){return Uint8Array.from(this.data.toArray("le",8))}toString(){return this.data.toString(10)}toBigInt(){return BigInt(this.toString())}toNumber(){return this.data.toNumber()}};Hr.Uint64=Ro});var zu=L(Kr=>{"use strict";B();R();Object.defineProperty(Kr,"__esModule",{value:!0});Kr.Uint64=Kr.Uint53=Kr.Uint32=Kr.Int53=Kr.Decimal=void 0;var k4=k2();Object.defineProperty(Kr,"Decimal",{enumerable:!0,get:function(){return k4.Decimal}});var Ju=S2();Object.defineProperty(Kr,"Int53",{enumerable:!0,get:function(){return Ju.Int53}});Object.defineProperty(Kr,"Uint32",{enumerable:!0,get:function(){return Ju.Uint32}});Object.defineProperty(Kr,"Uint53",{enumerable:!0,get:function(){return Ju.Uint53}});Object.defineProperty(Kr,"Uint64",{enumerable:!0,get:function(){return Ju.Uint64}})});var Pl=L(z=>{"use strict";B();R();Object.defineProperty(z,"__esModule",{value:!0});z.DenomPairTakerFee=z.MsgSetDenomPairTakerFeeResponse=z.MsgSetDenomPairTakerFee=z.MsgSplitRouteSwapExactAmountOutResponse=z.MsgSplitRouteSwapExactAmountOut=z.MsgSwapExactAmountOutResponse=z.MsgSwapExactAmountOut=z.MsgSplitRouteSwapExactAmountInResponse=z.MsgSplitRouteSwapExactAmountIn=z.MsgSwapExactAmountInResponse=z.MsgSwapExactAmountIn=void 0;var _t=A2(),Fn=ii(),wt=er(),_2=zu();function yl(){return{sender:"",routes:[],tokenIn:Fn.Coin.fromPartial({}),tokenOutMinAmount:""}}z.MsgSwapExactAmountIn={typeUrl:"/osmosis.poolmanager.v1beta1.MsgSwapExactAmountIn",aminoType:"osmosis/poolmanager/swap-exact-amount-in",is(e){return e&&(e.$typeUrl===z.MsgSwapExactAmountIn.typeUrl||typeof e.sender=="string"&&Array.isArray(e.routes)&&(!e.routes.length||_t.SwapAmountInRoute.is(e.routes[0]))&&Fn.Coin.is(e.tokenIn)&&typeof e.tokenOutMinAmount=="string")},isSDK(e){return e&&(e.$typeUrl===z.MsgSwapExactAmountIn.typeUrl||typeof e.sender=="string"&&Array.isArray(e.routes)&&(!e.routes.length||_t.SwapAmountInRoute.isSDK(e.routes[0]))&&Fn.Coin.isSDK(e.token_in)&&typeof e.token_out_min_amount=="string")},isAmino(e){return e&&(e.$typeUrl===z.MsgSwapExactAmountIn.typeUrl||typeof e.sender=="string"&&Array.isArray(e.routes)&&(!e.routes.length||_t.SwapAmountInRoute.isAmino(e.routes[0]))&&Fn.Coin.isAmino(e.token_in)&&typeof e.token_out_min_amount=="string")},encode(e,t=wt.BinaryWriter.create()){e.sender!==""&&t.uint32(10).string(e.sender);for(let n of e.routes)_t.SwapAmountInRoute.encode(n,t.uint32(18).fork()).ldelim();return e.tokenIn!==void 0&&Fn.Coin.encode(e.tokenIn,t.uint32(26).fork()).ldelim(),e.tokenOutMinAmount!==""&&t.uint32(34).string(e.tokenOutMinAmount),t},decode(e,t){let n=e instanceof wt.BinaryReader?e:new wt.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=yl();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.sender=n.string();break;case 2:r.routes.push(_t.SwapAmountInRoute.decode(n,n.uint32()));break;case 3:r.tokenIn=Fn.Coin.decode(n,n.uint32());break;case 4:r.tokenOutMinAmount=n.string();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=yl();return t.sender=e.sender??"",t.routes=e.routes?.map(n=>_t.SwapAmountInRoute.fromPartial(n))||[],t.tokenIn=e.tokenIn!==void 0&&e.tokenIn!==null?Fn.Coin.fromPartial(e.tokenIn):void 0,t.tokenOutMinAmount=e.tokenOutMinAmount??"",t},fromAmino(e){let t=yl();return e.sender!==void 0&&e.sender!==null&&(t.sender=e.sender),t.routes=e.routes?.map(n=>_t.SwapAmountInRoute.fromAmino(n))||[],e.token_in!==void 0&&e.token_in!==null&&(t.tokenIn=Fn.Coin.fromAmino(e.token_in)),e.token_out_min_amount!==void 0&&e.token_out_min_amount!==null&&(t.tokenOutMinAmount=e.token_out_min_amount),t},toAmino(e){let t={};return t.sender=e.sender===""?void 0:e.sender,e.routes?t.routes=e.routes.map(n=>n?_t.SwapAmountInRoute.toAmino(n):void 0):t.routes=e.routes,t.token_in=e.tokenIn?Fn.Coin.toAmino(e.tokenIn):void 0,t.token_out_min_amount=e.tokenOutMinAmount===""?void 0:e.tokenOutMinAmount,t},fromAminoMsg(e){return z.MsgSwapExactAmountIn.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/poolmanager/swap-exact-amount-in",value:z.MsgSwapExactAmountIn.toAmino(e)}},fromProtoMsg(e){return z.MsgSwapExactAmountIn.decode(e.value)},toProto(e){return z.MsgSwapExactAmountIn.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.poolmanager.v1beta1.MsgSwapExactAmountIn",value:z.MsgSwapExactAmountIn.encode(e).finish()}}};function bl(){return{tokenOutAmount:""}}z.MsgSwapExactAmountInResponse={typeUrl:"/osmosis.poolmanager.v1beta1.MsgSwapExactAmountInResponse",aminoType:"osmosis/poolmanager/swap-exact-amount-in-response",is(e){return e&&(e.$typeUrl===z.MsgSwapExactAmountInResponse.typeUrl||typeof e.tokenOutAmount=="string")},isSDK(e){return e&&(e.$typeUrl===z.MsgSwapExactAmountInResponse.typeUrl||typeof e.token_out_amount=="string")},isAmino(e){return e&&(e.$typeUrl===z.MsgSwapExactAmountInResponse.typeUrl||typeof e.token_out_amount=="string")},encode(e,t=wt.BinaryWriter.create()){return e.tokenOutAmount!==""&&t.uint32(10).string(e.tokenOutAmount),t},decode(e,t){let n=e instanceof wt.BinaryReader?e:new wt.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=bl();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.tokenOutAmount=n.string();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=bl();return t.tokenOutAmount=e.tokenOutAmount??"",t},fromAmino(e){let t=bl();return e.token_out_amount!==void 0&&e.token_out_amount!==null&&(t.tokenOutAmount=e.token_out_amount),t},toAmino(e){let t={};return t.token_out_amount=e.tokenOutAmount===""?void 0:e.tokenOutAmount,t},fromAminoMsg(e){return z.MsgSwapExactAmountInResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/poolmanager/swap-exact-amount-in-response",value:z.MsgSwapExactAmountInResponse.toAmino(e)}},fromProtoMsg(e){return z.MsgSwapExactAmountInResponse.decode(e.value)},toProto(e){return z.MsgSwapExactAmountInResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.poolmanager.v1beta1.MsgSwapExactAmountInResponse",value:z.MsgSwapExactAmountInResponse.encode(e).finish()}}};function vl(){return{sender:"",routes:[],tokenInDenom:"",tokenOutMinAmount:""}}z.MsgSplitRouteSwapExactAmountIn={typeUrl:"/osmosis.poolmanager.v1beta1.MsgSplitRouteSwapExactAmountIn",aminoType:"osmosis/poolmanager/split-amount-in",is(e){return e&&(e.$typeUrl===z.MsgSplitRouteSwapExactAmountIn.typeUrl||typeof e.sender=="string"&&Array.isArray(e.routes)&&(!e.routes.length||_t.SwapAmountInSplitRoute.is(e.routes[0]))&&typeof e.tokenInDenom=="string"&&typeof e.tokenOutMinAmount=="string")},isSDK(e){return e&&(e.$typeUrl===z.MsgSplitRouteSwapExactAmountIn.typeUrl||typeof e.sender=="string"&&Array.isArray(e.routes)&&(!e.routes.length||_t.SwapAmountInSplitRoute.isSDK(e.routes[0]))&&typeof e.token_in_denom=="string"&&typeof e.token_out_min_amount=="string")},isAmino(e){return e&&(e.$typeUrl===z.MsgSplitRouteSwapExactAmountIn.typeUrl||typeof e.sender=="string"&&Array.isArray(e.routes)&&(!e.routes.length||_t.SwapAmountInSplitRoute.isAmino(e.routes[0]))&&typeof e.token_in_denom=="string"&&typeof e.token_out_min_amount=="string")},encode(e,t=wt.BinaryWriter.create()){e.sender!==""&&t.uint32(10).string(e.sender);for(let n of e.routes)_t.SwapAmountInSplitRoute.encode(n,t.uint32(18).fork()).ldelim();return e.tokenInDenom!==""&&t.uint32(26).string(e.tokenInDenom),e.tokenOutMinAmount!==""&&t.uint32(34).string(e.tokenOutMinAmount),t},decode(e,t){let n=e instanceof wt.BinaryReader?e:new wt.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=vl();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.sender=n.string();break;case 2:r.routes.push(_t.SwapAmountInSplitRoute.decode(n,n.uint32()));break;case 3:r.tokenInDenom=n.string();break;case 4:r.tokenOutMinAmount=n.string();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=vl();return t.sender=e.sender??"",t.routes=e.routes?.map(n=>_t.SwapAmountInSplitRoute.fromPartial(n))||[],t.tokenInDenom=e.tokenInDenom??"",t.tokenOutMinAmount=e.tokenOutMinAmount??"",t},fromAmino(e){let t=vl();return e.sender!==void 0&&e.sender!==null&&(t.sender=e.sender),t.routes=e.routes?.map(n=>_t.SwapAmountInSplitRoute.fromAmino(n))||[],e.token_in_denom!==void 0&&e.token_in_denom!==null&&(t.tokenInDenom=e.token_in_denom),e.token_out_min_amount!==void 0&&e.token_out_min_amount!==null&&(t.tokenOutMinAmount=e.token_out_min_amount),t},toAmino(e){let t={};return t.sender=e.sender===""?void 0:e.sender,e.routes?t.routes=e.routes.map(n=>n?_t.SwapAmountInSplitRoute.toAmino(n):void 0):t.routes=e.routes,t.token_in_denom=e.tokenInDenom===""?void 0:e.tokenInDenom,t.token_out_min_amount=e.tokenOutMinAmount===""?void 0:e.tokenOutMinAmount,t},fromAminoMsg(e){return z.MsgSplitRouteSwapExactAmountIn.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/poolmanager/split-amount-in",value:z.MsgSplitRouteSwapExactAmountIn.toAmino(e)}},fromProtoMsg(e){return z.MsgSplitRouteSwapExactAmountIn.decode(e.value)},toProto(e){return z.MsgSplitRouteSwapExactAmountIn.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.poolmanager.v1beta1.MsgSplitRouteSwapExactAmountIn",value:z.MsgSplitRouteSwapExactAmountIn.encode(e).finish()}}};function Al(){return{tokenOutAmount:""}}z.MsgSplitRouteSwapExactAmountInResponse={typeUrl:"/osmosis.poolmanager.v1beta1.MsgSplitRouteSwapExactAmountInResponse",aminoType:"osmosis/poolmanager/split-route-swap-exact-amount-in-response",is(e){return e&&(e.$typeUrl===z.MsgSplitRouteSwapExactAmountInResponse.typeUrl||typeof e.tokenOutAmount=="string")},isSDK(e){return e&&(e.$typeUrl===z.MsgSplitRouteSwapExactAmountInResponse.typeUrl||typeof e.token_out_amount=="string")},isAmino(e){return e&&(e.$typeUrl===z.MsgSplitRouteSwapExactAmountInResponse.typeUrl||typeof e.token_out_amount=="string")},encode(e,t=wt.BinaryWriter.create()){return e.tokenOutAmount!==""&&t.uint32(10).string(e.tokenOutAmount),t},decode(e,t){let n=e instanceof wt.BinaryReader?e:new wt.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Al();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.tokenOutAmount=n.string();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=Al();return t.tokenOutAmount=e.tokenOutAmount??"",t},fromAmino(e){let t=Al();return e.token_out_amount!==void 0&&e.token_out_amount!==null&&(t.tokenOutAmount=e.token_out_amount),t},toAmino(e){let t={};return t.token_out_amount=e.tokenOutAmount===""?void 0:e.tokenOutAmount,t},fromAminoMsg(e){return z.MsgSplitRouteSwapExactAmountInResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/poolmanager/split-route-swap-exact-amount-in-response",value:z.MsgSplitRouteSwapExactAmountInResponse.toAmino(e)}},fromProtoMsg(e){return z.MsgSplitRouteSwapExactAmountInResponse.decode(e.value)},toProto(e){return z.MsgSplitRouteSwapExactAmountInResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.poolmanager.v1beta1.MsgSplitRouteSwapExactAmountInResponse",value:z.MsgSplitRouteSwapExactAmountInResponse.encode(e).finish()}}};function Ml(){return{sender:"",routes:[],tokenInMaxAmount:"",tokenOut:Fn.Coin.fromPartial({})}}z.MsgSwapExactAmountOut={typeUrl:"/osmosis.poolmanager.v1beta1.MsgSwapExactAmountOut",aminoType:"osmosis/poolmanager/swap-exact-amount-out",is(e){return e&&(e.$typeUrl===z.MsgSwapExactAmountOut.typeUrl||typeof e.sender=="string"&&Array.isArray(e.routes)&&(!e.routes.length||_t.SwapAmountOutRoute.is(e.routes[0]))&&typeof e.tokenInMaxAmount=="string"&&Fn.Coin.is(e.tokenOut))},isSDK(e){return e&&(e.$typeUrl===z.MsgSwapExactAmountOut.typeUrl||typeof e.sender=="string"&&Array.isArray(e.routes)&&(!e.routes.length||_t.SwapAmountOutRoute.isSDK(e.routes[0]))&&typeof e.token_in_max_amount=="string"&&Fn.Coin.isSDK(e.token_out))},isAmino(e){return e&&(e.$typeUrl===z.MsgSwapExactAmountOut.typeUrl||typeof e.sender=="string"&&Array.isArray(e.routes)&&(!e.routes.length||_t.SwapAmountOutRoute.isAmino(e.routes[0]))&&typeof e.token_in_max_amount=="string"&&Fn.Coin.isAmino(e.token_out))},encode(e,t=wt.BinaryWriter.create()){e.sender!==""&&t.uint32(10).string(e.sender);for(let n of e.routes)_t.SwapAmountOutRoute.encode(n,t.uint32(18).fork()).ldelim();return e.tokenInMaxAmount!==""&&t.uint32(26).string(e.tokenInMaxAmount),e.tokenOut!==void 0&&Fn.Coin.encode(e.tokenOut,t.uint32(34).fork()).ldelim(),t},decode(e,t){let n=e instanceof wt.BinaryReader?e:new wt.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Ml();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.sender=n.string();break;case 2:r.routes.push(_t.SwapAmountOutRoute.decode(n,n.uint32()));break;case 3:r.tokenInMaxAmount=n.string();break;case 4:r.tokenOut=Fn.Coin.decode(n,n.uint32());break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=Ml();return t.sender=e.sender??"",t.routes=e.routes?.map(n=>_t.SwapAmountOutRoute.fromPartial(n))||[],t.tokenInMaxAmount=e.tokenInMaxAmount??"",t.tokenOut=e.tokenOut!==void 0&&e.tokenOut!==null?Fn.Coin.fromPartial(e.tokenOut):void 0,t},fromAmino(e){let t=Ml();return e.sender!==void 0&&e.sender!==null&&(t.sender=e.sender),t.routes=e.routes?.map(n=>_t.SwapAmountOutRoute.fromAmino(n))||[],e.token_in_max_amount!==void 0&&e.token_in_max_amount!==null&&(t.tokenInMaxAmount=e.token_in_max_amount),e.token_out!==void 0&&e.token_out!==null&&(t.tokenOut=Fn.Coin.fromAmino(e.token_out)),t},toAmino(e){let t={};return t.sender=e.sender===""?void 0:e.sender,e.routes?t.routes=e.routes.map(n=>n?_t.SwapAmountOutRoute.toAmino(n):void 0):t.routes=e.routes,t.token_in_max_amount=e.tokenInMaxAmount===""?void 0:e.tokenInMaxAmount,t.token_out=e.tokenOut?Fn.Coin.toAmino(e.tokenOut):void 0,t},fromAminoMsg(e){return z.MsgSwapExactAmountOut.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/poolmanager/swap-exact-amount-out",value:z.MsgSwapExactAmountOut.toAmino(e)}},fromProtoMsg(e){return z.MsgSwapExactAmountOut.decode(e.value)},toProto(e){return z.MsgSwapExactAmountOut.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.poolmanager.v1beta1.MsgSwapExactAmountOut",value:z.MsgSwapExactAmountOut.encode(e).finish()}}};function wl(){return{tokenInAmount:""}}z.MsgSwapExactAmountOutResponse={typeUrl:"/osmosis.poolmanager.v1beta1.MsgSwapExactAmountOutResponse",aminoType:"osmosis/poolmanager/swap-exact-amount-out-response",is(e){return e&&(e.$typeUrl===z.MsgSwapExactAmountOutResponse.typeUrl||typeof e.tokenInAmount=="string")},isSDK(e){return e&&(e.$typeUrl===z.MsgSwapExactAmountOutResponse.typeUrl||typeof e.token_in_amount=="string")},isAmino(e){return e&&(e.$typeUrl===z.MsgSwapExactAmountOutResponse.typeUrl||typeof e.token_in_amount=="string")},encode(e,t=wt.BinaryWriter.create()){return e.tokenInAmount!==""&&t.uint32(10).string(e.tokenInAmount),t},decode(e,t){let n=e instanceof wt.BinaryReader?e:new wt.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=wl();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.tokenInAmount=n.string();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=wl();return t.tokenInAmount=e.tokenInAmount??"",t},fromAmino(e){let t=wl();return e.token_in_amount!==void 0&&e.token_in_amount!==null&&(t.tokenInAmount=e.token_in_amount),t},toAmino(e){let t={};return t.token_in_amount=e.tokenInAmount===""?void 0:e.tokenInAmount,t},fromAminoMsg(e){return z.MsgSwapExactAmountOutResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/poolmanager/swap-exact-amount-out-response",value:z.MsgSwapExactAmountOutResponse.toAmino(e)}},fromProtoMsg(e){return z.MsgSwapExactAmountOutResponse.decode(e.value)},toProto(e){return z.MsgSwapExactAmountOutResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.poolmanager.v1beta1.MsgSwapExactAmountOutResponse",value:z.MsgSwapExactAmountOutResponse.encode(e).finish()}}};function kl(){return{sender:"",routes:[],tokenOutDenom:"",tokenInMaxAmount:""}}z.MsgSplitRouteSwapExactAmountOut={typeUrl:"/osmosis.poolmanager.v1beta1.MsgSplitRouteSwapExactAmountOut",aminoType:"osmosis/poolmanager/split-amount-out",is(e){return e&&(e.$typeUrl===z.MsgSplitRouteSwapExactAmountOut.typeUrl||typeof e.sender=="string"&&Array.isArray(e.routes)&&(!e.routes.length||_t.SwapAmountOutSplitRoute.is(e.routes[0]))&&typeof e.tokenOutDenom=="string"&&typeof e.tokenInMaxAmount=="string")},isSDK(e){return e&&(e.$typeUrl===z.MsgSplitRouteSwapExactAmountOut.typeUrl||typeof e.sender=="string"&&Array.isArray(e.routes)&&(!e.routes.length||_t.SwapAmountOutSplitRoute.isSDK(e.routes[0]))&&typeof e.token_out_denom=="string"&&typeof e.token_in_max_amount=="string")},isAmino(e){return e&&(e.$typeUrl===z.MsgSplitRouteSwapExactAmountOut.typeUrl||typeof e.sender=="string"&&Array.isArray(e.routes)&&(!e.routes.length||_t.SwapAmountOutSplitRoute.isAmino(e.routes[0]))&&typeof e.token_out_denom=="string"&&typeof e.token_in_max_amount=="string")},encode(e,t=wt.BinaryWriter.create()){e.sender!==""&&t.uint32(10).string(e.sender);for(let n of e.routes)_t.SwapAmountOutSplitRoute.encode(n,t.uint32(18).fork()).ldelim();return e.tokenOutDenom!==""&&t.uint32(26).string(e.tokenOutDenom),e.tokenInMaxAmount!==""&&t.uint32(34).string(e.tokenInMaxAmount),t},decode(e,t){let n=e instanceof wt.BinaryReader?e:new wt.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=kl();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.sender=n.string();break;case 2:r.routes.push(_t.SwapAmountOutSplitRoute.decode(n,n.uint32()));break;case 3:r.tokenOutDenom=n.string();break;case 4:r.tokenInMaxAmount=n.string();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=kl();return t.sender=e.sender??"",t.routes=e.routes?.map(n=>_t.SwapAmountOutSplitRoute.fromPartial(n))||[],t.tokenOutDenom=e.tokenOutDenom??"",t.tokenInMaxAmount=e.tokenInMaxAmount??"",t},fromAmino(e){let t=kl();return e.sender!==void 0&&e.sender!==null&&(t.sender=e.sender),t.routes=e.routes?.map(n=>_t.SwapAmountOutSplitRoute.fromAmino(n))||[],e.token_out_denom!==void 0&&e.token_out_denom!==null&&(t.tokenOutDenom=e.token_out_denom),e.token_in_max_amount!==void 0&&e.token_in_max_amount!==null&&(t.tokenInMaxAmount=e.token_in_max_amount),t},toAmino(e){let t={};return t.sender=e.sender===""?void 0:e.sender,e.routes?t.routes=e.routes.map(n=>n?_t.SwapAmountOutSplitRoute.toAmino(n):void 0):t.routes=e.routes,t.token_out_denom=e.tokenOutDenom===""?void 0:e.tokenOutDenom,t.token_in_max_amount=e.tokenInMaxAmount===""?void 0:e.tokenInMaxAmount,t},fromAminoMsg(e){return z.MsgSplitRouteSwapExactAmountOut.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/poolmanager/split-amount-out",value:z.MsgSplitRouteSwapExactAmountOut.toAmino(e)}},fromProtoMsg(e){return z.MsgSplitRouteSwapExactAmountOut.decode(e.value)},toProto(e){return z.MsgSplitRouteSwapExactAmountOut.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.poolmanager.v1beta1.MsgSplitRouteSwapExactAmountOut",value:z.MsgSplitRouteSwapExactAmountOut.encode(e).finish()}}};function Sl(){return{tokenInAmount:""}}z.MsgSplitRouteSwapExactAmountOutResponse={typeUrl:"/osmosis.poolmanager.v1beta1.MsgSplitRouteSwapExactAmountOutResponse",aminoType:"osmosis/poolmanager/split-route-swap-exact-amount-out-response",is(e){return e&&(e.$typeUrl===z.MsgSplitRouteSwapExactAmountOutResponse.typeUrl||typeof e.tokenInAmount=="string")},isSDK(e){return e&&(e.$typeUrl===z.MsgSplitRouteSwapExactAmountOutResponse.typeUrl||typeof e.token_in_amount=="string")},isAmino(e){return e&&(e.$typeUrl===z.MsgSplitRouteSwapExactAmountOutResponse.typeUrl||typeof e.token_in_amount=="string")},encode(e,t=wt.BinaryWriter.create()){return e.tokenInAmount!==""&&t.uint32(10).string(e.tokenInAmount),t},decode(e,t){let n=e instanceof wt.BinaryReader?e:new wt.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Sl();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.tokenInAmount=n.string();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=Sl();return t.tokenInAmount=e.tokenInAmount??"",t},fromAmino(e){let t=Sl();return e.token_in_amount!==void 0&&e.token_in_amount!==null&&(t.tokenInAmount=e.token_in_amount),t},toAmino(e){let t={};return t.token_in_amount=e.tokenInAmount===""?void 0:e.tokenInAmount,t},fromAminoMsg(e){return z.MsgSplitRouteSwapExactAmountOutResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/poolmanager/split-route-swap-exact-amount-out-response",value:z.MsgSplitRouteSwapExactAmountOutResponse.toAmino(e)}},fromProtoMsg(e){return z.MsgSplitRouteSwapExactAmountOutResponse.decode(e.value)},toProto(e){return z.MsgSplitRouteSwapExactAmountOutResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.poolmanager.v1beta1.MsgSplitRouteSwapExactAmountOutResponse",value:z.MsgSplitRouteSwapExactAmountOutResponse.encode(e).finish()}}};function _l(){return{sender:"",denomPairTakerFee:[]}}z.MsgSetDenomPairTakerFee={typeUrl:"/osmosis.poolmanager.v1beta1.MsgSetDenomPairTakerFee",aminoType:"osmosis/poolmanager/set-denom-pair-taker-fee",is(e){return e&&(e.$typeUrl===z.MsgSetDenomPairTakerFee.typeUrl||typeof e.sender=="string"&&Array.isArray(e.denomPairTakerFee)&&(!e.denomPairTakerFee.length||z.DenomPairTakerFee.is(e.denomPairTakerFee[0])))},isSDK(e){return e&&(e.$typeUrl===z.MsgSetDenomPairTakerFee.typeUrl||typeof e.sender=="string"&&Array.isArray(e.denom_pair_taker_fee)&&(!e.denom_pair_taker_fee.length||z.DenomPairTakerFee.isSDK(e.denom_pair_taker_fee[0])))},isAmino(e){return e&&(e.$typeUrl===z.MsgSetDenomPairTakerFee.typeUrl||typeof e.sender=="string"&&Array.isArray(e.denom_pair_taker_fee)&&(!e.denom_pair_taker_fee.length||z.DenomPairTakerFee.isAmino(e.denom_pair_taker_fee[0])))},encode(e,t=wt.BinaryWriter.create()){e.sender!==""&&t.uint32(10).string(e.sender);for(let n of e.denomPairTakerFee)z.DenomPairTakerFee.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){let n=e instanceof wt.BinaryReader?e:new wt.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=_l();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.sender=n.string();break;case 2:r.denomPairTakerFee.push(z.DenomPairTakerFee.decode(n,n.uint32()));break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=_l();return t.sender=e.sender??"",t.denomPairTakerFee=e.denomPairTakerFee?.map(n=>z.DenomPairTakerFee.fromPartial(n))||[],t},fromAmino(e){let t=_l();return e.sender!==void 0&&e.sender!==null&&(t.sender=e.sender),t.denomPairTakerFee=e.denom_pair_taker_fee?.map(n=>z.DenomPairTakerFee.fromAmino(n))||[],t},toAmino(e){let t={};return t.sender=e.sender===""?void 0:e.sender,e.denomPairTakerFee?t.denom_pair_taker_fee=e.denomPairTakerFee.map(n=>n?z.DenomPairTakerFee.toAmino(n):void 0):t.denom_pair_taker_fee=e.denomPairTakerFee,t},fromAminoMsg(e){return z.MsgSetDenomPairTakerFee.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/poolmanager/set-denom-pair-taker-fee",value:z.MsgSetDenomPairTakerFee.toAmino(e)}},fromProtoMsg(e){return z.MsgSetDenomPairTakerFee.decode(e.value)},toProto(e){return z.MsgSetDenomPairTakerFee.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.poolmanager.v1beta1.MsgSetDenomPairTakerFee",value:z.MsgSetDenomPairTakerFee.encode(e).finish()}}};function Il(){return{success:!1}}z.MsgSetDenomPairTakerFeeResponse={typeUrl:"/osmosis.poolmanager.v1beta1.MsgSetDenomPairTakerFeeResponse",aminoType:"osmosis/poolmanager/set-denom-pair-taker-fee-response",is(e){return e&&(e.$typeUrl===z.MsgSetDenomPairTakerFeeResponse.typeUrl||typeof e.success=="boolean")},isSDK(e){return e&&(e.$typeUrl===z.MsgSetDenomPairTakerFeeResponse.typeUrl||typeof e.success=="boolean")},isAmino(e){return e&&(e.$typeUrl===z.MsgSetDenomPairTakerFeeResponse.typeUrl||typeof e.success=="boolean")},encode(e,t=wt.BinaryWriter.create()){return e.success===!0&&t.uint32(8).bool(e.success),t},decode(e,t){let n=e instanceof wt.BinaryReader?e:new wt.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Il();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.success=n.bool();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=Il();return t.success=e.success??!1,t},fromAmino(e){let t=Il();return e.success!==void 0&&e.success!==null&&(t.success=e.success),t},toAmino(e){let t={};return t.success=e.success===!1?void 0:e.success,t},fromAminoMsg(e){return z.MsgSetDenomPairTakerFeeResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/poolmanager/set-denom-pair-taker-fee-response",value:z.MsgSetDenomPairTakerFeeResponse.toAmino(e)}},fromProtoMsg(e){return z.MsgSetDenomPairTakerFeeResponse.decode(e.value)},toProto(e){return z.MsgSetDenomPairTakerFeeResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.poolmanager.v1beta1.MsgSetDenomPairTakerFeeResponse",value:z.MsgSetDenomPairTakerFeeResponse.encode(e).finish()}}};function xl(){return{denom0:"",denom1:"",takerFee:""}}z.DenomPairTakerFee={typeUrl:"/osmosis.poolmanager.v1beta1.DenomPairTakerFee",aminoType:"osmosis/poolmanager/denom-pair-taker-fee",is(e){return e&&(e.$typeUrl===z.DenomPairTakerFee.typeUrl||typeof e.denom0=="string"&&typeof e.denom1=="string"&&typeof e.takerFee=="string")},isSDK(e){return e&&(e.$typeUrl===z.DenomPairTakerFee.typeUrl||typeof e.denom0=="string"&&typeof e.denom1=="string"&&typeof e.taker_fee=="string")},isAmino(e){return e&&(e.$typeUrl===z.DenomPairTakerFee.typeUrl||typeof e.denom0=="string"&&typeof e.denom1=="string"&&typeof e.taker_fee=="string")},encode(e,t=wt.BinaryWriter.create()){return e.denom0!==""&&t.uint32(10).string(e.denom0),e.denom1!==""&&t.uint32(18).string(e.denom1),e.takerFee!==""&&t.uint32(26).string(_2.Decimal.fromUserInput(e.takerFee,18).atomics),t},decode(e,t){let n=e instanceof wt.BinaryReader?e:new wt.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=xl();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.denom0=n.string();break;case 2:r.denom1=n.string();break;case 3:r.takerFee=_2.Decimal.fromAtomics(n.string(),18).toString();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=xl();return t.denom0=e.denom0??"",t.denom1=e.denom1??"",t.takerFee=e.takerFee??"",t},fromAmino(e){let t=xl();return e.denom0!==void 0&&e.denom0!==null&&(t.denom0=e.denom0),e.denom1!==void 0&&e.denom1!==null&&(t.denom1=e.denom1),e.taker_fee!==void 0&&e.taker_fee!==null&&(t.takerFee=e.taker_fee),t},toAmino(e){let t={};return t.denom0=e.denom0===""?void 0:e.denom0,t.denom1=e.denom1===""?void 0:e.denom1,t.taker_fee=e.takerFee===""?void 0:e.takerFee,t},fromAminoMsg(e){return z.DenomPairTakerFee.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/poolmanager/denom-pair-taker-fee",value:z.DenomPairTakerFee.toAmino(e)}},fromProtoMsg(e){return z.DenomPairTakerFee.decode(e.value)},toProto(e){return z.DenomPairTakerFee.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.poolmanager.v1beta1.DenomPairTakerFee",value:z.DenomPairTakerFee.encode(e).finish()}}}});var I2=L(ee=>{"use strict";B();R();Object.defineProperty(ee,"__esModule",{value:!0});ee.Metadata=ee.DenomUnit=ee.Supply=ee.Output=ee.Input=ee.SendEnabled=ee.Params=void 0;var Qt=ii(),mn=er();function Ul(){return{sendEnabled:[],defaultSendEnabled:!1}}ee.Params={typeUrl:"/cosmos.bank.v1beta1.Params",aminoType:"cosmos-sdk/x/bank/Params",is(e){return e&&(e.$typeUrl===ee.Params.typeUrl||Array.isArray(e.sendEnabled)&&(!e.sendEnabled.length||ee.SendEnabled.is(e.sendEnabled[0]))&&typeof e.defaultSendEnabled=="boolean")},isSDK(e){return e&&(e.$typeUrl===ee.Params.typeUrl||Array.isArray(e.send_enabled)&&(!e.send_enabled.length||ee.SendEnabled.isSDK(e.send_enabled[0]))&&typeof e.default_send_enabled=="boolean")},isAmino(e){return e&&(e.$typeUrl===ee.Params.typeUrl||Array.isArray(e.send_enabled)&&(!e.send_enabled.length||ee.SendEnabled.isAmino(e.send_enabled[0]))&&typeof e.default_send_enabled=="boolean")},encode(e,t=mn.BinaryWriter.create()){for(let n of e.sendEnabled)ee.SendEnabled.encode(n,t.uint32(10).fork()).ldelim();return e.defaultSendEnabled===!0&&t.uint32(16).bool(e.defaultSendEnabled),t},decode(e,t){let n=e instanceof mn.BinaryReader?e:new mn.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Ul();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.sendEnabled.push(ee.SendEnabled.decode(n,n.uint32()));break;case 2:r.defaultSendEnabled=n.bool();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=Ul();return t.sendEnabled=e.sendEnabled?.map(n=>ee.SendEnabled.fromPartial(n))||[],t.defaultSendEnabled=e.defaultSendEnabled??!1,t},fromAmino(e){let t=Ul();return t.sendEnabled=e.send_enabled?.map(n=>ee.SendEnabled.fromAmino(n))||[],e.default_send_enabled!==void 0&&e.default_send_enabled!==null&&(t.defaultSendEnabled=e.default_send_enabled),t},toAmino(e){let t={};return e.sendEnabled?t.send_enabled=e.sendEnabled.map(n=>n?ee.SendEnabled.toAmino(n):void 0):t.send_enabled=e.sendEnabled,t.default_send_enabled=e.defaultSendEnabled===!1?void 0:e.defaultSendEnabled,t},fromAminoMsg(e){return ee.Params.fromAmino(e.value)},toAminoMsg(e){return{type:"cosmos-sdk/x/bank/Params",value:ee.Params.toAmino(e)}},fromProtoMsg(e){return ee.Params.decode(e.value)},toProto(e){return ee.Params.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmos.bank.v1beta1.Params",value:ee.Params.encode(e).finish()}}};function Bl(){return{denom:"",enabled:!1}}ee.SendEnabled={typeUrl:"/cosmos.bank.v1beta1.SendEnabled",aminoType:"cosmos-sdk/SendEnabled",is(e){return e&&(e.$typeUrl===ee.SendEnabled.typeUrl||typeof e.denom=="string"&&typeof e.enabled=="boolean")},isSDK(e){return e&&(e.$typeUrl===ee.SendEnabled.typeUrl||typeof e.denom=="string"&&typeof e.enabled=="boolean")},isAmino(e){return e&&(e.$typeUrl===ee.SendEnabled.typeUrl||typeof e.denom=="string"&&typeof e.enabled=="boolean")},encode(e,t=mn.BinaryWriter.create()){return e.denom!==""&&t.uint32(10).string(e.denom),e.enabled===!0&&t.uint32(16).bool(e.enabled),t},decode(e,t){let n=e instanceof mn.BinaryReader?e:new mn.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Bl();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.denom=n.string();break;case 2:r.enabled=n.bool();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=Bl();return t.denom=e.denom??"",t.enabled=e.enabled??!1,t},fromAmino(e){let t=Bl();return e.denom!==void 0&&e.denom!==null&&(t.denom=e.denom),e.enabled!==void 0&&e.enabled!==null&&(t.enabled=e.enabled),t},toAmino(e){let t={};return t.denom=e.denom===""?void 0:e.denom,t.enabled=e.enabled===!1?void 0:e.enabled,t},fromAminoMsg(e){return ee.SendEnabled.fromAmino(e.value)},toAminoMsg(e){return{type:"cosmos-sdk/SendEnabled",value:ee.SendEnabled.toAmino(e)}},fromProtoMsg(e){return ee.SendEnabled.decode(e.value)},toProto(e){return ee.SendEnabled.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmos.bank.v1beta1.SendEnabled",value:ee.SendEnabled.encode(e).finish()}}};function Rl(){return{address:"",coins:[]}}ee.Input={typeUrl:"/cosmos.bank.v1beta1.Input",aminoType:"cosmos-sdk/Input",is(e){return e&&(e.$typeUrl===ee.Input.typeUrl||typeof e.address=="string"&&Array.isArray(e.coins)&&(!e.coins.length||Qt.Coin.is(e.coins[0])))},isSDK(e){return e&&(e.$typeUrl===ee.Input.typeUrl||typeof e.address=="string"&&Array.isArray(e.coins)&&(!e.coins.length||Qt.Coin.isSDK(e.coins[0])))},isAmino(e){return e&&(e.$typeUrl===ee.Input.typeUrl||typeof e.address=="string"&&Array.isArray(e.coins)&&(!e.coins.length||Qt.Coin.isAmino(e.coins[0])))},encode(e,t=mn.BinaryWriter.create()){e.address!==""&&t.uint32(10).string(e.address);for(let n of e.coins)Qt.Coin.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){let n=e instanceof mn.BinaryReader?e:new mn.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Rl();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.address=n.string();break;case 2:r.coins.push(Qt.Coin.decode(n,n.uint32()));break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=Rl();return t.address=e.address??"",t.coins=e.coins?.map(n=>Qt.Coin.fromPartial(n))||[],t},fromAmino(e){let t=Rl();return e.address!==void 0&&e.address!==null&&(t.address=e.address),t.coins=e.coins?.map(n=>Qt.Coin.fromAmino(n))||[],t},toAmino(e){let t={};return t.address=e.address===""?void 0:e.address,e.coins?t.coins=e.coins.map(n=>n?Qt.Coin.toAmino(n):void 0):t.coins=e.coins,t},fromAminoMsg(e){return ee.Input.fromAmino(e.value)},toAminoMsg(e){return{type:"cosmos-sdk/Input",value:ee.Input.toAmino(e)}},fromProtoMsg(e){return ee.Input.decode(e.value)},toProto(e){return ee.Input.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmos.bank.v1beta1.Input",value:ee.Input.encode(e).finish()}}};function Cl(){return{address:"",coins:[]}}ee.Output={typeUrl:"/cosmos.bank.v1beta1.Output",aminoType:"cosmos-sdk/Output",is(e){return e&&(e.$typeUrl===ee.Output.typeUrl||typeof e.address=="string"&&Array.isArray(e.coins)&&(!e.coins.length||Qt.Coin.is(e.coins[0])))},isSDK(e){return e&&(e.$typeUrl===ee.Output.typeUrl||typeof e.address=="string"&&Array.isArray(e.coins)&&(!e.coins.length||Qt.Coin.isSDK(e.coins[0])))},isAmino(e){return e&&(e.$typeUrl===ee.Output.typeUrl||typeof e.address=="string"&&Array.isArray(e.coins)&&(!e.coins.length||Qt.Coin.isAmino(e.coins[0])))},encode(e,t=mn.BinaryWriter.create()){e.address!==""&&t.uint32(10).string(e.address);for(let n of e.coins)Qt.Coin.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){let n=e instanceof mn.BinaryReader?e:new mn.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Cl();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.address=n.string();break;case 2:r.coins.push(Qt.Coin.decode(n,n.uint32()));break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=Cl();return t.address=e.address??"",t.coins=e.coins?.map(n=>Qt.Coin.fromPartial(n))||[],t},fromAmino(e){let t=Cl();return e.address!==void 0&&e.address!==null&&(t.address=e.address),t.coins=e.coins?.map(n=>Qt.Coin.fromAmino(n))||[],t},toAmino(e){let t={};return t.address=e.address===""?void 0:e.address,e.coins?t.coins=e.coins.map(n=>n?Qt.Coin.toAmino(n):void 0):t.coins=e.coins,t},fromAminoMsg(e){return ee.Output.fromAmino(e.value)},toAminoMsg(e){return{type:"cosmos-sdk/Output",value:ee.Output.toAmino(e)}},fromProtoMsg(e){return ee.Output.decode(e.value)},toProto(e){return ee.Output.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmos.bank.v1beta1.Output",value:ee.Output.encode(e).finish()}}};function El(){return{$typeUrl:"/cosmos.bank.v1beta1.Supply",total:[]}}ee.Supply={typeUrl:"/cosmos.bank.v1beta1.Supply",aminoType:"cosmos-sdk/Supply",is(e){return e&&(e.$typeUrl===ee.Supply.typeUrl||Array.isArray(e.total)&&(!e.total.length||Qt.Coin.is(e.total[0])))},isSDK(e){return e&&(e.$typeUrl===ee.Supply.typeUrl||Array.isArray(e.total)&&(!e.total.length||Qt.Coin.isSDK(e.total[0])))},isAmino(e){return e&&(e.$typeUrl===ee.Supply.typeUrl||Array.isArray(e.total)&&(!e.total.length||Qt.Coin.isAmino(e.total[0])))},encode(e,t=mn.BinaryWriter.create()){for(let n of e.total)Qt.Coin.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){let n=e instanceof mn.BinaryReader?e:new mn.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=El();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.total.push(Qt.Coin.decode(n,n.uint32()));break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=El();return t.total=e.total?.map(n=>Qt.Coin.fromPartial(n))||[],t},fromAmino(e){let t=El();return t.total=e.total?.map(n=>Qt.Coin.fromAmino(n))||[],t},toAmino(e){let t={};return e.total?t.total=e.total.map(n=>n?Qt.Coin.toAmino(n):void 0):t.total=e.total,t},fromAminoMsg(e){return ee.Supply.fromAmino(e.value)},toAminoMsg(e){return{type:"cosmos-sdk/Supply",value:ee.Supply.toAmino(e)}},fromProtoMsg(e){return ee.Supply.decode(e.value)},toProto(e){return ee.Supply.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmos.bank.v1beta1.Supply",value:ee.Supply.encode(e).finish()}}};function Tl(){return{denom:"",exponent:0,aliases:[]}}ee.DenomUnit={typeUrl:"/cosmos.bank.v1beta1.DenomUnit",aminoType:"cosmos-sdk/DenomUnit",is(e){return e&&(e.$typeUrl===ee.DenomUnit.typeUrl||typeof e.denom=="string"&&typeof e.exponent=="number"&&Array.isArray(e.aliases)&&(!e.aliases.length||typeof e.aliases[0]=="string"))},isSDK(e){return e&&(e.$typeUrl===ee.DenomUnit.typeUrl||typeof e.denom=="string"&&typeof e.exponent=="number"&&Array.isArray(e.aliases)&&(!e.aliases.length||typeof e.aliases[0]=="string"))},isAmino(e){return e&&(e.$typeUrl===ee.DenomUnit.typeUrl||typeof e.denom=="string"&&typeof e.exponent=="number"&&Array.isArray(e.aliases)&&(!e.aliases.length||typeof e.aliases[0]=="string"))},encode(e,t=mn.BinaryWriter.create()){e.denom!==""&&t.uint32(10).string(e.denom),e.exponent!==0&&t.uint32(16).uint32(e.exponent);for(let n of e.aliases)t.uint32(26).string(n);return t},decode(e,t){let n=e instanceof mn.BinaryReader?e:new mn.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Tl();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.denom=n.string();break;case 2:r.exponent=n.uint32();break;case 3:r.aliases.push(n.string());break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=Tl();return t.denom=e.denom??"",t.exponent=e.exponent??0,t.aliases=e.aliases?.map(n=>n)||[],t},fromAmino(e){let t=Tl();return e.denom!==void 0&&e.denom!==null&&(t.denom=e.denom),e.exponent!==void 0&&e.exponent!==null&&(t.exponent=e.exponent),t.aliases=e.aliases?.map(n=>n)||[],t},toAmino(e){let t={};return t.denom=e.denom===""?void 0:e.denom,t.exponent=e.exponent===0?void 0:e.exponent,e.aliases?t.aliases=e.aliases.map(n=>n):t.aliases=e.aliases,t},fromAminoMsg(e){return ee.DenomUnit.fromAmino(e.value)},toAminoMsg(e){return{type:"cosmos-sdk/DenomUnit",value:ee.DenomUnit.toAmino(e)}},fromProtoMsg(e){return ee.DenomUnit.decode(e.value)},toProto(e){return ee.DenomUnit.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmos.bank.v1beta1.DenomUnit",value:ee.DenomUnit.encode(e).finish()}}};function Ol(){return{description:"",denomUnits:[],base:"",display:"",name:"",symbol:"",uri:"",uriHash:""}}ee.Metadata={typeUrl:"/cosmos.bank.v1beta1.Metadata",aminoType:"cosmos-sdk/Metadata",is(e){return e&&(e.$typeUrl===ee.Metadata.typeUrl||typeof e.description=="string"&&Array.isArray(e.denomUnits)&&(!e.denomUnits.length||ee.DenomUnit.is(e.denomUnits[0]))&&typeof e.base=="string"&&typeof e.display=="string"&&typeof e.name=="string"&&typeof e.symbol=="string"&&typeof e.uri=="string"&&typeof e.uriHash=="string")},isSDK(e){return e&&(e.$typeUrl===ee.Metadata.typeUrl||typeof e.description=="string"&&Array.isArray(e.denom_units)&&(!e.denom_units.length||ee.DenomUnit.isSDK(e.denom_units[0]))&&typeof e.base=="string"&&typeof e.display=="string"&&typeof e.name=="string"&&typeof e.symbol=="string"&&typeof e.uri=="string"&&typeof e.uri_hash=="string")},isAmino(e){return e&&(e.$typeUrl===ee.Metadata.typeUrl||typeof e.description=="string"&&Array.isArray(e.denom_units)&&(!e.denom_units.length||ee.DenomUnit.isAmino(e.denom_units[0]))&&typeof e.base=="string"&&typeof e.display=="string"&&typeof e.name=="string"&&typeof e.symbol=="string"&&typeof e.uri=="string"&&typeof e.uri_hash=="string")},encode(e,t=mn.BinaryWriter.create()){e.description!==""&&t.uint32(10).string(e.description);for(let n of e.denomUnits)ee.DenomUnit.encode(n,t.uint32(18).fork()).ldelim();return e.base!==""&&t.uint32(26).string(e.base),e.display!==""&&t.uint32(34).string(e.display),e.name!==""&&t.uint32(42).string(e.name),e.symbol!==""&&t.uint32(50).string(e.symbol),e.uri!==""&&t.uint32(58).string(e.uri),e.uriHash!==""&&t.uint32(66).string(e.uriHash),t},decode(e,t){let n=e instanceof mn.BinaryReader?e:new mn.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Ol();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.description=n.string();break;case 2:r.denomUnits.push(ee.DenomUnit.decode(n,n.uint32()));break;case 3:r.base=n.string();break;case 4:r.display=n.string();break;case 5:r.name=n.string();break;case 6:r.symbol=n.string();break;case 7:r.uri=n.string();break;case 8:r.uriHash=n.string();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=Ol();return t.description=e.description??"",t.denomUnits=e.denomUnits?.map(n=>ee.DenomUnit.fromPartial(n))||[],t.base=e.base??"",t.display=e.display??"",t.name=e.name??"",t.symbol=e.symbol??"",t.uri=e.uri??"",t.uriHash=e.uriHash??"",t},fromAmino(e){let t=Ol();return e.description!==void 0&&e.description!==null&&(t.description=e.description),t.denomUnits=e.denom_units?.map(n=>ee.DenomUnit.fromAmino(n))||[],e.base!==void 0&&e.base!==null&&(t.base=e.base),e.display!==void 0&&e.display!==null&&(t.display=e.display),e.name!==void 0&&e.name!==null&&(t.name=e.name),e.symbol!==void 0&&e.symbol!==null&&(t.symbol=e.symbol),e.uri!==void 0&&e.uri!==null&&(t.uri=e.uri),e.uri_hash!==void 0&&e.uri_hash!==null&&(t.uriHash=e.uri_hash),t},toAmino(e){let t={};return t.description=e.description===""?void 0:e.description,e.denomUnits?t.denom_units=e.denomUnits.map(n=>n?ee.DenomUnit.toAmino(n):void 0):t.denom_units=e.denomUnits,t.base=e.base===""?void 0:e.base,t.display=e.display===""?void 0:e.display,t.name=e.name===""?void 0:e.name,t.symbol=e.symbol===""?void 0:e.symbol,t.uri=e.uri===""?void 0:e.uri,t.uri_hash=e.uriHash===""?void 0:e.uriHash,t},fromAminoMsg(e){return ee.Metadata.fromAmino(e.value)},toAminoMsg(e){return{type:"cosmos-sdk/Metadata",value:ee.Metadata.toAmino(e)}},fromProtoMsg(e){return ee.Metadata.decode(e.value)},toProto(e){return ee.Metadata.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmos.bank.v1beta1.Metadata",value:ee.Metadata.encode(e).finish()}}}});var Yl=L(q=>{"use strict";B();R();Object.defineProperty(q,"__esModule",{value:!0});q.MsgForceTransferResponse=q.MsgForceTransfer=q.MsgSetDenomMetadataResponse=q.MsgSetDenomMetadata=q.MsgSetBeforeSendHookResponse=q.MsgSetBeforeSendHook=q.MsgChangeAdminResponse=q.MsgChangeAdmin=q.MsgBurnResponse=q.MsgBurn=q.MsgMintResponse=q.MsgMint=q.MsgCreateDenomResponse=q.MsgCreateDenom=void 0;var qt=ii(),Ki=I2(),Re=er();function Dl(){return{sender:"",subdenom:""}}q.MsgCreateDenom={typeUrl:"/osmosis.tokenfactory.v1beta1.MsgCreateDenom",aminoType:"osmosis/tokenfactory/create-denom",is(e){return e&&(e.$typeUrl===q.MsgCreateDenom.typeUrl||typeof e.sender=="string"&&typeof e.subdenom=="string")},isSDK(e){return e&&(e.$typeUrl===q.MsgCreateDenom.typeUrl||typeof e.sender=="string"&&typeof e.subdenom=="string")},isAmino(e){return e&&(e.$typeUrl===q.MsgCreateDenom.typeUrl||typeof e.sender=="string"&&typeof e.subdenom=="string")},encode(e,t=Re.BinaryWriter.create()){return e.sender!==""&&t.uint32(10).string(e.sender),e.subdenom!==""&&t.uint32(18).string(e.subdenom),t},decode(e,t){let n=e instanceof Re.BinaryReader?e:new Re.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Dl();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.sender=n.string();break;case 2:r.subdenom=n.string();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=Dl();return t.sender=e.sender??"",t.subdenom=e.subdenom??"",t},fromAmino(e){let t=Dl();return e.sender!==void 0&&e.sender!==null&&(t.sender=e.sender),e.subdenom!==void 0&&e.subdenom!==null&&(t.subdenom=e.subdenom),t},toAmino(e){let t={};return t.sender=e.sender===""?void 0:e.sender,t.subdenom=e.subdenom===""?void 0:e.subdenom,t},fromAminoMsg(e){return q.MsgCreateDenom.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/tokenfactory/create-denom",value:q.MsgCreateDenom.toAmino(e)}},fromProtoMsg(e){return q.MsgCreateDenom.decode(e.value)},toProto(e){return q.MsgCreateDenom.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.tokenfactory.v1beta1.MsgCreateDenom",value:q.MsgCreateDenom.encode(e).finish()}}};function Nl(){return{newTokenDenom:""}}q.MsgCreateDenomResponse={typeUrl:"/osmosis.tokenfactory.v1beta1.MsgCreateDenomResponse",aminoType:"osmosis/tokenfactory/create-denom-response",is(e){return e&&(e.$typeUrl===q.MsgCreateDenomResponse.typeUrl||typeof e.newTokenDenom=="string")},isSDK(e){return e&&(e.$typeUrl===q.MsgCreateDenomResponse.typeUrl||typeof e.new_token_denom=="string")},isAmino(e){return e&&(e.$typeUrl===q.MsgCreateDenomResponse.typeUrl||typeof e.new_token_denom=="string")},encode(e,t=Re.BinaryWriter.create()){return e.newTokenDenom!==""&&t.uint32(10).string(e.newTokenDenom),t},decode(e,t){let n=e instanceof Re.BinaryReader?e:new Re.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Nl();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.newTokenDenom=n.string();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=Nl();return t.newTokenDenom=e.newTokenDenom??"",t},fromAmino(e){let t=Nl();return e.new_token_denom!==void 0&&e.new_token_denom!==null&&(t.newTokenDenom=e.new_token_denom),t},toAmino(e){let t={};return t.new_token_denom=e.newTokenDenom===""?void 0:e.newTokenDenom,t},fromAminoMsg(e){return q.MsgCreateDenomResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/tokenfactory/create-denom-response",value:q.MsgCreateDenomResponse.toAmino(e)}},fromProtoMsg(e){return q.MsgCreateDenomResponse.decode(e.value)},toProto(e){return q.MsgCreateDenomResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.tokenfactory.v1beta1.MsgCreateDenomResponse",value:q.MsgCreateDenomResponse.encode(e).finish()}}};function Ll(){return{sender:"",amount:qt.Coin.fromPartial({}),mintToAddress:""}}q.MsgMint={typeUrl:"/osmosis.tokenfactory.v1beta1.MsgMint",aminoType:"osmosis/tokenfactory/mint",is(e){return e&&(e.$typeUrl===q.MsgMint.typeUrl||typeof e.sender=="string"&&qt.Coin.is(e.amount)&&typeof e.mintToAddress=="string")},isSDK(e){return e&&(e.$typeUrl===q.MsgMint.typeUrl||typeof e.sender=="string"&&qt.Coin.isSDK(e.amount)&&typeof e.mintToAddress=="string")},isAmino(e){return e&&(e.$typeUrl===q.MsgMint.typeUrl||typeof e.sender=="string"&&qt.Coin.isAmino(e.amount)&&typeof e.mintToAddress=="string")},encode(e,t=Re.BinaryWriter.create()){return e.sender!==""&&t.uint32(10).string(e.sender),e.amount!==void 0&&qt.Coin.encode(e.amount,t.uint32(18).fork()).ldelim(),e.mintToAddress!==""&&t.uint32(26).string(e.mintToAddress),t},decode(e,t){let n=e instanceof Re.BinaryReader?e:new Re.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Ll();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.sender=n.string();break;case 2:r.amount=qt.Coin.decode(n,n.uint32());break;case 3:r.mintToAddress=n.string();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=Ll();return t.sender=e.sender??"",t.amount=e.amount!==void 0&&e.amount!==null?qt.Coin.fromPartial(e.amount):void 0,t.mintToAddress=e.mintToAddress??"",t},fromAmino(e){let t=Ll();return e.sender!==void 0&&e.sender!==null&&(t.sender=e.sender),e.amount!==void 0&&e.amount!==null&&(t.amount=qt.Coin.fromAmino(e.amount)),e.mintToAddress!==void 0&&e.mintToAddress!==null&&(t.mintToAddress=e.mintToAddress),t},toAmino(e){let t={};return t.sender=e.sender===""?void 0:e.sender,t.amount=e.amount?qt.Coin.toAmino(e.amount):void 0,t.mintToAddress=e.mintToAddress??"",t},fromAminoMsg(e){return q.MsgMint.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/tokenfactory/mint",value:q.MsgMint.toAmino(e)}},fromProtoMsg(e){return q.MsgMint.decode(e.value)},toProto(e){return q.MsgMint.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.tokenfactory.v1beta1.MsgMint",value:q.MsgMint.encode(e).finish()}}};function ql(){return{}}q.MsgMintResponse={typeUrl:"/osmosis.tokenfactory.v1beta1.MsgMintResponse",aminoType:"osmosis/tokenfactory/mint-response",is(e){return e&&e.$typeUrl===q.MsgMintResponse.typeUrl},isSDK(e){return e&&e.$typeUrl===q.MsgMintResponse.typeUrl},isAmino(e){return e&&e.$typeUrl===q.MsgMintResponse.typeUrl},encode(e,t=Re.BinaryWriter.create()){return t},decode(e,t){let n=e instanceof Re.BinaryReader?e:new Re.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=ql();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){default:n.skipType(o&7);break}}return r},fromPartial(e){return ql()},fromAmino(e){return ql()},toAmino(e){return{}},fromAminoMsg(e){return q.MsgMintResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/tokenfactory/mint-response",value:q.MsgMintResponse.toAmino(e)}},fromProtoMsg(e){return q.MsgMintResponse.decode(e.value)},toProto(e){return q.MsgMintResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.tokenfactory.v1beta1.MsgMintResponse",value:q.MsgMintResponse.encode(e).finish()}}};function Fl(){return{sender:"",amount:qt.Coin.fromPartial({}),burnFromAddress:""}}q.MsgBurn={typeUrl:"/osmosis.tokenfactory.v1beta1.MsgBurn",aminoType:"osmosis/tokenfactory/burn",is(e){return e&&(e.$typeUrl===q.MsgBurn.typeUrl||typeof e.sender=="string"&&qt.Coin.is(e.amount)&&typeof e.burnFromAddress=="string")},isSDK(e){return e&&(e.$typeUrl===q.MsgBurn.typeUrl||typeof e.sender=="string"&&qt.Coin.isSDK(e.amount)&&typeof e.burnFromAddress=="string")},isAmino(e){return e&&(e.$typeUrl===q.MsgBurn.typeUrl||typeof e.sender=="string"&&qt.Coin.isAmino(e.amount)&&typeof e.burnFromAddress=="string")},encode(e,t=Re.BinaryWriter.create()){return e.sender!==""&&t.uint32(10).string(e.sender),e.amount!==void 0&&qt.Coin.encode(e.amount,t.uint32(18).fork()).ldelim(),e.burnFromAddress!==""&&t.uint32(26).string(e.burnFromAddress),t},decode(e,t){let n=e instanceof Re.BinaryReader?e:new Re.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Fl();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.sender=n.string();break;case 2:r.amount=qt.Coin.decode(n,n.uint32());break;case 3:r.burnFromAddress=n.string();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=Fl();return t.sender=e.sender??"",t.amount=e.amount!==void 0&&e.amount!==null?qt.Coin.fromPartial(e.amount):void 0,t.burnFromAddress=e.burnFromAddress??"",t},fromAmino(e){let t=Fl();return e.sender!==void 0&&e.sender!==null&&(t.sender=e.sender),e.amount!==void 0&&e.amount!==null&&(t.amount=qt.Coin.fromAmino(e.amount)),e.burnFromAddress!==void 0&&e.burnFromAddress!==null&&(t.burnFromAddress=e.burnFromAddress),t},toAmino(e){let t={};return t.sender=e.sender===""?void 0:e.sender,t.amount=e.amount?qt.Coin.toAmino(e.amount):void 0,t.burnFromAddress=e.burnFromAddress??"",t},fromAminoMsg(e){return q.MsgBurn.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/tokenfactory/burn",value:q.MsgBurn.toAmino(e)}},fromProtoMsg(e){return q.MsgBurn.decode(e.value)},toProto(e){return q.MsgBurn.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.tokenfactory.v1beta1.MsgBurn",value:q.MsgBurn.encode(e).finish()}}};function Hl(){return{}}q.MsgBurnResponse={typeUrl:"/osmosis.tokenfactory.v1beta1.MsgBurnResponse",aminoType:"osmosis/tokenfactory/burn-response",is(e){return e&&e.$typeUrl===q.MsgBurnResponse.typeUrl},isSDK(e){return e&&e.$typeUrl===q.MsgBurnResponse.typeUrl},isAmino(e){return e&&e.$typeUrl===q.MsgBurnResponse.typeUrl},encode(e,t=Re.BinaryWriter.create()){return t},decode(e,t){let n=e instanceof Re.BinaryReader?e:new Re.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Hl();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){default:n.skipType(o&7);break}}return r},fromPartial(e){return Hl()},fromAmino(e){return Hl()},toAmino(e){return{}},fromAminoMsg(e){return q.MsgBurnResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/tokenfactory/burn-response",value:q.MsgBurnResponse.toAmino(e)}},fromProtoMsg(e){return q.MsgBurnResponse.decode(e.value)},toProto(e){return q.MsgBurnResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.tokenfactory.v1beta1.MsgBurnResponse",value:q.MsgBurnResponse.encode(e).finish()}}};function Kl(){return{sender:"",denom:"",newAdmin:""}}q.MsgChangeAdmin={typeUrl:"/osmosis.tokenfactory.v1beta1.MsgChangeAdmin",aminoType:"osmosis/tokenfactory/change-admin",is(e){return e&&(e.$typeUrl===q.MsgChangeAdmin.typeUrl||typeof e.sender=="string"&&typeof e.denom=="string"&&typeof e.newAdmin=="string")},isSDK(e){return e&&(e.$typeUrl===q.MsgChangeAdmin.typeUrl||typeof e.sender=="string"&&typeof e.denom=="string"&&typeof e.new_admin=="string")},isAmino(e){return e&&(e.$typeUrl===q.MsgChangeAdmin.typeUrl||typeof e.sender=="string"&&typeof e.denom=="string"&&typeof e.new_admin=="string")},encode(e,t=Re.BinaryWriter.create()){return e.sender!==""&&t.uint32(10).string(e.sender),e.denom!==""&&t.uint32(18).string(e.denom),e.newAdmin!==""&&t.uint32(26).string(e.newAdmin),t},decode(e,t){let n=e instanceof Re.BinaryReader?e:new Re.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Kl();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.sender=n.string();break;case 2:r.denom=n.string();break;case 3:r.newAdmin=n.string();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=Kl();return t.sender=e.sender??"",t.denom=e.denom??"",t.newAdmin=e.newAdmin??"",t},fromAmino(e){let t=Kl();return e.sender!==void 0&&e.sender!==null&&(t.sender=e.sender),e.denom!==void 0&&e.denom!==null&&(t.denom=e.denom),e.new_admin!==void 0&&e.new_admin!==null&&(t.newAdmin=e.new_admin),t},toAmino(e){let t={};return t.sender=e.sender===""?void 0:e.sender,t.denom=e.denom===""?void 0:e.denom,t.new_admin=e.newAdmin===""?void 0:e.newAdmin,t},fromAminoMsg(e){return q.MsgChangeAdmin.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/tokenfactory/change-admin",value:q.MsgChangeAdmin.toAmino(e)}},fromProtoMsg(e){return q.MsgChangeAdmin.decode(e.value)},toProto(e){return q.MsgChangeAdmin.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.tokenfactory.v1beta1.MsgChangeAdmin",value:q.MsgChangeAdmin.encode(e).finish()}}};function $l(){return{}}q.MsgChangeAdminResponse={typeUrl:"/osmosis.tokenfactory.v1beta1.MsgChangeAdminResponse",aminoType:"osmosis/tokenfactory/change-admin-response",is(e){return e&&e.$typeUrl===q.MsgChangeAdminResponse.typeUrl},isSDK(e){return e&&e.$typeUrl===q.MsgChangeAdminResponse.typeUrl},isAmino(e){return e&&e.$typeUrl===q.MsgChangeAdminResponse.typeUrl},encode(e,t=Re.BinaryWriter.create()){return t},decode(e,t){let n=e instanceof Re.BinaryReader?e:new Re.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=$l();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){default:n.skipType(o&7);break}}return r},fromPartial(e){return $l()},fromAmino(e){return $l()},toAmino(e){return{}},fromAminoMsg(e){return q.MsgChangeAdminResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/tokenfactory/change-admin-response",value:q.MsgChangeAdminResponse.toAmino(e)}},fromProtoMsg(e){return q.MsgChangeAdminResponse.decode(e.value)},toProto(e){return q.MsgChangeAdminResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.tokenfactory.v1beta1.MsgChangeAdminResponse",value:q.MsgChangeAdminResponse.encode(e).finish()}}};function Wl(){return{sender:"",denom:"",cosmwasmAddress:""}}q.MsgSetBeforeSendHook={typeUrl:"/osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHook",aminoType:"osmosis/tokenfactory/set-bef-send-hook",is(e){return e&&(e.$typeUrl===q.MsgSetBeforeSendHook.typeUrl||typeof e.sender=="string"&&typeof e.denom=="string"&&typeof e.cosmwasmAddress=="string")},isSDK(e){return e&&(e.$typeUrl===q.MsgSetBeforeSendHook.typeUrl||typeof e.sender=="string"&&typeof e.denom=="string"&&typeof e.cosmwasm_address=="string")},isAmino(e){return e&&(e.$typeUrl===q.MsgSetBeforeSendHook.typeUrl||typeof e.sender=="string"&&typeof e.denom=="string"&&typeof e.cosmwasm_address=="string")},encode(e,t=Re.BinaryWriter.create()){return e.sender!==""&&t.uint32(10).string(e.sender),e.denom!==""&&t.uint32(18).string(e.denom),e.cosmwasmAddress!==""&&t.uint32(26).string(e.cosmwasmAddress),t},decode(e,t){let n=e instanceof Re.BinaryReader?e:new Re.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Wl();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.sender=n.string();break;case 2:r.denom=n.string();break;case 3:r.cosmwasmAddress=n.string();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=Wl();return t.sender=e.sender??"",t.denom=e.denom??"",t.cosmwasmAddress=e.cosmwasmAddress??"",t},fromAmino(e){let t=Wl();return e.sender!==void 0&&e.sender!==null&&(t.sender=e.sender),e.denom!==void 0&&e.denom!==null&&(t.denom=e.denom),e.cosmwasm_address!==void 0&&e.cosmwasm_address!==null&&(t.cosmwasmAddress=e.cosmwasm_address),t},toAmino(e){let t={};return t.sender=e.sender===""?void 0:e.sender,t.denom=e.denom===""?void 0:e.denom,t.cosmwasm_address=e.cosmwasmAddress??"",t},fromAminoMsg(e){return q.MsgSetBeforeSendHook.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/tokenfactory/set-bef-send-hook",value:q.MsgSetBeforeSendHook.toAmino(e)}},fromProtoMsg(e){return q.MsgSetBeforeSendHook.decode(e.value)},toProto(e){return q.MsgSetBeforeSendHook.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHook",value:q.MsgSetBeforeSendHook.encode(e).finish()}}};function Jl(){return{}}q.MsgSetBeforeSendHookResponse={typeUrl:"/osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHookResponse",aminoType:"osmosis/tokenfactory/set-before-send-hook-response",is(e){return e&&e.$typeUrl===q.MsgSetBeforeSendHookResponse.typeUrl},isSDK(e){return e&&e.$typeUrl===q.MsgSetBeforeSendHookResponse.typeUrl},isAmino(e){return e&&e.$typeUrl===q.MsgSetBeforeSendHookResponse.typeUrl},encode(e,t=Re.BinaryWriter.create()){return t},decode(e,t){let n=e instanceof Re.BinaryReader?e:new Re.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Jl();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){default:n.skipType(o&7);break}}return r},fromPartial(e){return Jl()},fromAmino(e){return Jl()},toAmino(e){return{}},fromAminoMsg(e){return q.MsgSetBeforeSendHookResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/tokenfactory/set-before-send-hook-response",value:q.MsgSetBeforeSendHookResponse.toAmino(e)}},fromProtoMsg(e){return q.MsgSetBeforeSendHookResponse.decode(e.value)},toProto(e){return q.MsgSetBeforeSendHookResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHookResponse",value:q.MsgSetBeforeSendHookResponse.encode(e).finish()}}};function zl(){return{sender:"",metadata:Ki.Metadata.fromPartial({})}}q.MsgSetDenomMetadata={typeUrl:"/osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata",aminoType:"osmosis/tokenfactory/set-denom-metadata",is(e){return e&&(e.$typeUrl===q.MsgSetDenomMetadata.typeUrl||typeof e.sender=="string"&&Ki.Metadata.is(e.metadata))},isSDK(e){return e&&(e.$typeUrl===q.MsgSetDenomMetadata.typeUrl||typeof e.sender=="string"&&Ki.Metadata.isSDK(e.metadata))},isAmino(e){return e&&(e.$typeUrl===q.MsgSetDenomMetadata.typeUrl||typeof e.sender=="string"&&Ki.Metadata.isAmino(e.metadata))},encode(e,t=Re.BinaryWriter.create()){return e.sender!==""&&t.uint32(10).string(e.sender),e.metadata!==void 0&&Ki.Metadata.encode(e.metadata,t.uint32(18).fork()).ldelim(),t},decode(e,t){let n=e instanceof Re.BinaryReader?e:new Re.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=zl();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.sender=n.string();break;case 2:r.metadata=Ki.Metadata.decode(n,n.uint32());break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=zl();return t.sender=e.sender??"",t.metadata=e.metadata!==void 0&&e.metadata!==null?Ki.Metadata.fromPartial(e.metadata):void 0,t},fromAmino(e){let t=zl();return e.sender!==void 0&&e.sender!==null&&(t.sender=e.sender),e.metadata!==void 0&&e.metadata!==null&&(t.metadata=Ki.Metadata.fromAmino(e.metadata)),t},toAmino(e){let t={};return t.sender=e.sender===""?void 0:e.sender,t.metadata=e.metadata?Ki.Metadata.toAmino(e.metadata):void 0,t},fromAminoMsg(e){return q.MsgSetDenomMetadata.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/tokenfactory/set-denom-metadata",value:q.MsgSetDenomMetadata.toAmino(e)}},fromProtoMsg(e){return q.MsgSetDenomMetadata.decode(e.value)},toProto(e){return q.MsgSetDenomMetadata.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata",value:q.MsgSetDenomMetadata.encode(e).finish()}}};function Zl(){return{}}q.MsgSetDenomMetadataResponse={typeUrl:"/osmosis.tokenfactory.v1beta1.MsgSetDenomMetadataResponse",aminoType:"osmosis/tokenfactory/set-denom-metadata-response",is(e){return e&&e.$typeUrl===q.MsgSetDenomMetadataResponse.typeUrl},isSDK(e){return e&&e.$typeUrl===q.MsgSetDenomMetadataResponse.typeUrl},isAmino(e){return e&&e.$typeUrl===q.MsgSetDenomMetadataResponse.typeUrl},encode(e,t=Re.BinaryWriter.create()){return t},decode(e,t){let n=e instanceof Re.BinaryReader?e:new Re.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Zl();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){default:n.skipType(o&7);break}}return r},fromPartial(e){return Zl()},fromAmino(e){return Zl()},toAmino(e){return{}},fromAminoMsg(e){return q.MsgSetDenomMetadataResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/tokenfactory/set-denom-metadata-response",value:q.MsgSetDenomMetadataResponse.toAmino(e)}},fromProtoMsg(e){return q.MsgSetDenomMetadataResponse.decode(e.value)},toProto(e){return q.MsgSetDenomMetadataResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.tokenfactory.v1beta1.MsgSetDenomMetadataResponse",value:q.MsgSetDenomMetadataResponse.encode(e).finish()}}};function Vl(){return{sender:"",amount:qt.Coin.fromPartial({}),transferFromAddress:"",transferToAddress:""}}q.MsgForceTransfer={typeUrl:"/osmosis.tokenfactory.v1beta1.MsgForceTransfer",aminoType:"osmosis/tokenfactory/force-transfer",is(e){return e&&(e.$typeUrl===q.MsgForceTransfer.typeUrl||typeof e.sender=="string"&&qt.Coin.is(e.amount)&&typeof e.transferFromAddress=="string"&&typeof e.transferToAddress=="string")},isSDK(e){return e&&(e.$typeUrl===q.MsgForceTransfer.typeUrl||typeof e.sender=="string"&&qt.Coin.isSDK(e.amount)&&typeof e.transferFromAddress=="string"&&typeof e.transferToAddress=="string")},isAmino(e){return e&&(e.$typeUrl===q.MsgForceTransfer.typeUrl||typeof e.sender=="string"&&qt.Coin.isAmino(e.amount)&&typeof e.transferFromAddress=="string"&&typeof e.transferToAddress=="string")},encode(e,t=Re.BinaryWriter.create()){return e.sender!==""&&t.uint32(10).string(e.sender),e.amount!==void 0&&qt.Coin.encode(e.amount,t.uint32(18).fork()).ldelim(),e.transferFromAddress!==""&&t.uint32(26).string(e.transferFromAddress),e.transferToAddress!==""&&t.uint32(34).string(e.transferToAddress),t},decode(e,t){let n=e instanceof Re.BinaryReader?e:new Re.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Vl();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.sender=n.string();break;case 2:r.amount=qt.Coin.decode(n,n.uint32());break;case 3:r.transferFromAddress=n.string();break;case 4:r.transferToAddress=n.string();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=Vl();return t.sender=e.sender??"",t.amount=e.amount!==void 0&&e.amount!==null?qt.Coin.fromPartial(e.amount):void 0,t.transferFromAddress=e.transferFromAddress??"",t.transferToAddress=e.transferToAddress??"",t},fromAmino(e){let t=Vl();return e.sender!==void 0&&e.sender!==null&&(t.sender=e.sender),e.amount!==void 0&&e.amount!==null&&(t.amount=qt.Coin.fromAmino(e.amount)),e.transferFromAddress!==void 0&&e.transferFromAddress!==null&&(t.transferFromAddress=e.transferFromAddress),e.transferToAddress!==void 0&&e.transferToAddress!==null&&(t.transferToAddress=e.transferToAddress),t},toAmino(e){let t={};return t.sender=e.sender===""?void 0:e.sender,t.amount=e.amount?qt.Coin.toAmino(e.amount):void 0,t.transferFromAddress=e.transferFromAddress===""?void 0:e.transferFromAddress,t.transferToAddress=e.transferToAddress===""?void 0:e.transferToAddress,t},fromAminoMsg(e){return q.MsgForceTransfer.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/tokenfactory/force-transfer",value:q.MsgForceTransfer.toAmino(e)}},fromProtoMsg(e){return q.MsgForceTransfer.decode(e.value)},toProto(e){return q.MsgForceTransfer.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.tokenfactory.v1beta1.MsgForceTransfer",value:q.MsgForceTransfer.encode(e).finish()}}};function Gl(){return{}}q.MsgForceTransferResponse={typeUrl:"/osmosis.tokenfactory.v1beta1.MsgForceTransferResponse",aminoType:"osmosis/tokenfactory/force-transfer-response",is(e){return e&&e.$typeUrl===q.MsgForceTransferResponse.typeUrl},isSDK(e){return e&&e.$typeUrl===q.MsgForceTransferResponse.typeUrl},isAmino(e){return e&&e.$typeUrl===q.MsgForceTransferResponse.typeUrl},encode(e,t=Re.BinaryWriter.create()){return t},decode(e,t){let n=e instanceof Re.BinaryReader?e:new Re.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Gl();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){default:n.skipType(o&7);break}}return r},fromPartial(e){return Gl()},fromAmino(e){return Gl()},toAmino(e){return{}},fromAminoMsg(e){return q.MsgForceTransferResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/tokenfactory/force-transfer-response",value:q.MsgForceTransferResponse.toAmino(e)}},fromProtoMsg(e){return q.MsgForceTransferResponse.decode(e.value)},toProto(e){return q.MsgForceTransferResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.tokenfactory.v1beta1.MsgForceTransferResponse",value:q.MsgForceTransferResponse.encode(e).finish()}}}});var Ql=L(si=>{"use strict";B();R();Object.defineProperty(si,"__esModule",{value:!0});si.Duration=void 0;var Xl=er();function x2(){return{seconds:BigInt(0),nanos:0}}si.Duration={typeUrl:"/google.protobuf.Duration",is(e){return e&&(e.$typeUrl===si.Duration.typeUrl||typeof e.seconds=="bigint"&&typeof e.nanos=="number")},isSDK(e){return e&&(e.$typeUrl===si.Duration.typeUrl||typeof e.seconds=="bigint"&&typeof e.nanos=="number")},isAmino(e){return e&&(e.$typeUrl===si.Duration.typeUrl||typeof e.seconds=="bigint"&&typeof e.nanos=="number")},encode(e,t=Xl.BinaryWriter.create()){return e.seconds!==BigInt(0)&&t.uint32(8).int64(e.seconds),e.nanos!==0&&t.uint32(16).int32(e.nanos),t},decode(e,t){let n=e instanceof Xl.BinaryReader?e:new Xl.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=x2();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.seconds=n.int64();break;case 2:r.nanos=n.int32();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=x2();return t.seconds=e.seconds!==void 0&&e.seconds!==null?BigInt(e.seconds.toString()):BigInt(0),t.nanos=e.nanos??0,t},fromAmino(e){let t=BigInt(e);return{seconds:t/BigInt("1000000000"),nanos:Number(t%BigInt("1000000000"))}},toAmino(e){return(e.seconds*BigInt("1000000000")+BigInt(e.nanos)).toString()},fromAminoMsg(e){return si.Duration.fromAmino(e.value)},fromProtoMsg(e){return si.Duration.decode(e.value)},toProto(e){return si.Duration.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/google.protobuf.Duration",value:si.Duration.encode(e).finish()}}}});var Ma=L(jt=>{"use strict";B();R();Object.defineProperty(jt,"__esModule",{value:!0});jt.fromJsonTimestamp=jt.fromTimestamp=jt.toTimestamp=jt.setPaginationParams=jt.isObject=jt.isSet=jt.fromDuration=jt.toDuration=jt.omitDefault=jt.base64FromBytes=jt.bytesFromBase64=void 0;var Co=(()=>{if(typeof Co<"u")return Co;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof Co<"u")return Co;throw"Unable to locate global object"})(),S4=Co.atob||(e=>Co.Buffer.from(e,"base64").toString("binary"));function _4(e){let t=S4(e),n=new Uint8Array(t.length);for(let i=0;i<t.length;++i)n[i]=t.charCodeAt(i);return n}jt.bytesFromBase64=_4;var I4=Co.btoa||(e=>Co.Buffer.from(e,"binary").toString("base64"));function x4(e){let t=[];return e.forEach(n=>{t.push(String.fromCharCode(n))}),I4(t.join(""))}jt.base64FromBytes=x4;function P4(e){if(typeof e=="string")return e===""?void 0:e;if(typeof e=="number")return e===0?void 0:e;if(typeof e=="boolean")return e===!1?void 0:e;if(typeof e=="bigint")return e===BigInt(0)?void 0:e;throw new Error(`Got unsupported type ${typeof e}`)}jt.omitDefault=P4;function U4(e){return{seconds:BigInt(Math.floor(parseInt(e)/1e9)),nanos:parseInt(e)%1e9}}jt.toDuration=U4;function B4(e){return(parseInt(e.seconds.toString())*1e9+e.nanos).toString()}jt.fromDuration=B4;function jl(e){return e!=null}jt.isSet=jl;function R4(e){return typeof e=="object"&&e!==null}jt.isObject=R4;var C4=(e,t)=>(t&&(typeof t?.countTotal<"u"&&(e.params["pagination.count_total"]=t.countTotal),typeof t?.key<"u"&&(e.params["pagination.key"]=C.Buffer.from(t.key).toString("base64")),typeof t?.limit<"u"&&(e.params["pagination.limit"]=t.limit.toString()),typeof t?.offset<"u"&&(e.params["pagination.offset"]=t.offset.toString()),typeof t?.reverse<"u"&&(e.params["pagination.reverse"]=t.reverse)),e);jt.setPaginationParams=C4;function em(e){let t=D4(e.getTime()/1e3),n=e.getTime()%1e3*1e6;return{seconds:t,nanos:n}}jt.toTimestamp=em;function E4(e){let t=Number(e.seconds)*1e3;return t+=e.nanos/1e6,new Date(t)}jt.fromTimestamp=E4;var T4=e=>({seconds:jl(e.seconds)?BigInt(e.seconds.toString()):BigInt(0),nanos:jl(e.nanos)?Number(e.nanos):0});function O4(e){return e instanceof Date?em(e):typeof e=="string"?em(new Date(e)):T4(e)}jt.fromJsonTimestamp=O4;function D4(e){return BigInt(Math.trunc(e))}});var nm=L(ai=>{"use strict";B();R();Object.defineProperty(ai,"__esModule",{value:!0});ai.Timestamp=void 0;var tm=er(),P2=Ma();function U2(){return{seconds:BigInt(0),nanos:0}}ai.Timestamp={typeUrl:"/google.protobuf.Timestamp",is(e){return e&&(e.$typeUrl===ai.Timestamp.typeUrl||typeof e.seconds=="bigint"&&typeof e.nanos=="number")},isSDK(e){return e&&(e.$typeUrl===ai.Timestamp.typeUrl||typeof e.seconds=="bigint"&&typeof e.nanos=="number")},isAmino(e){return e&&(e.$typeUrl===ai.Timestamp.typeUrl||typeof e.seconds=="bigint"&&typeof e.nanos=="number")},encode(e,t=tm.BinaryWriter.create()){return e.seconds!==BigInt(0)&&t.uint32(8).int64(e.seconds),e.nanos!==0&&t.uint32(16).int32(e.nanos),t},decode(e,t){let n=e instanceof tm.BinaryReader?e:new tm.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=U2();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.seconds=n.int64();break;case 2:r.nanos=n.int32();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=U2();return t.seconds=e.seconds!==void 0&&e.seconds!==null?BigInt(e.seconds.toString()):BigInt(0),t.nanos=e.nanos??0,t},fromAmino(e){return(0,P2.fromJsonTimestamp)(e)},toAmino(e){return(0,P2.fromTimestamp)(e).toISOString().replace(/\.\d+Z$/,"Z")},fromAminoMsg(e){return ai.Timestamp.fromAmino(e.value)},fromProtoMsg(e){return ai.Timestamp.decode(e.value)},toProto(e){return ai.Timestamp.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/google.protobuf.Timestamp",value:ai.Timestamp.encode(e).finish()}}}});var B2=L(Pe=>{"use strict";B();R();Object.defineProperty(Pe,"__esModule",{value:!0});Pe.SyntheticLock=Pe.QueryCondition=Pe.PeriodLock=Pe.lockQueryTypeToJSON=Pe.lockQueryTypeFromJSON=Pe.LockQueryTypeAmino=Pe.LockQueryTypeSDKType=Pe.LockQueryType=void 0;var Ft=Ql(),pn=nm(),Eo=ii(),$i=er(),sr=Ma(),kr;(function(e){e[e.ByDuration=0]="ByDuration",e[e.ByTime=1]="ByTime",e[e.NoLock=2]="NoLock",e[e.ByGroup=3]="ByGroup",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(kr=Pe.LockQueryType||(Pe.LockQueryType={}));Pe.LockQueryTypeSDKType=kr;Pe.LockQueryTypeAmino=kr;function N4(e){switch(e){case 0:case"ByDuration":return kr.ByDuration;case 1:case"ByTime":return kr.ByTime;case 2:case"NoLock":return kr.NoLock;case 3:case"ByGroup":return kr.ByGroup;case-1:case"UNRECOGNIZED":default:return kr.UNRECOGNIZED}}Pe.lockQueryTypeFromJSON=N4;function L4(e){switch(e){case kr.ByDuration:return"ByDuration";case kr.ByTime:return"ByTime";case kr.NoLock:return"NoLock";case kr.ByGroup:return"ByGroup";case kr.UNRECOGNIZED:default:return"UNRECOGNIZED"}}Pe.lockQueryTypeToJSON=L4;function rm(){return{ID:BigInt(0),owner:"",duration:Ft.Duration.fromPartial({}),endTime:new Date,coins:[],rewardReceiverAddress:""}}Pe.PeriodLock={typeUrl:"/osmosis.lockup.PeriodLock",aminoType:"osmosis/lockup/period-lock",is(e){return e&&(e.$typeUrl===Pe.PeriodLock.typeUrl||typeof e.ID=="bigint"&&typeof e.owner=="string"&&Ft.Duration.is(e.duration)&&pn.Timestamp.is(e.endTime)&&Array.isArray(e.coins)&&(!e.coins.length||Eo.Coin.is(e.coins[0]))&&typeof e.rewardReceiverAddress=="string")},isSDK(e){return e&&(e.$typeUrl===Pe.PeriodLock.typeUrl||typeof e.ID=="bigint"&&typeof e.owner=="string"&&Ft.Duration.isSDK(e.duration)&&pn.Timestamp.isSDK(e.end_time)&&Array.isArray(e.coins)&&(!e.coins.length||Eo.Coin.isSDK(e.coins[0]))&&typeof e.reward_receiver_address=="string")},isAmino(e){return e&&(e.$typeUrl===Pe.PeriodLock.typeUrl||typeof e.ID=="bigint"&&typeof e.owner=="string"&&Ft.Duration.isAmino(e.duration)&&pn.Timestamp.isAmino(e.end_time)&&Array.isArray(e.coins)&&(!e.coins.length||Eo.Coin.isAmino(e.coins[0]))&&typeof e.reward_receiver_address=="string")},encode(e,t=$i.BinaryWriter.create()){e.ID!==BigInt(0)&&t.uint32(8).uint64(e.ID),e.owner!==""&&t.uint32(18).string(e.owner),e.duration!==void 0&&Ft.Duration.encode(e.duration,t.uint32(26).fork()).ldelim(),e.endTime!==void 0&&pn.Timestamp.encode((0,sr.toTimestamp)(e.endTime),t.uint32(34).fork()).ldelim();for(let n of e.coins)Eo.Coin.encode(n,t.uint32(42).fork()).ldelim();return e.rewardReceiverAddress!==""&&t.uint32(50).string(e.rewardReceiverAddress),t},decode(e,t){let n=e instanceof $i.BinaryReader?e:new $i.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=rm();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.ID=n.uint64();break;case 2:r.owner=n.string();break;case 3:r.duration=Ft.Duration.decode(n,n.uint32());break;case 4:r.endTime=(0,sr.fromTimestamp)(pn.Timestamp.decode(n,n.uint32()));break;case 5:r.coins.push(Eo.Coin.decode(n,n.uint32()));break;case 6:r.rewardReceiverAddress=n.string();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=rm();return t.ID=e.ID!==void 0&&e.ID!==null?BigInt(e.ID.toString()):BigInt(0),t.owner=e.owner??"",t.duration=e.duration!==void 0&&e.duration!==null?Ft.Duration.fromPartial(e.duration):void 0,t.endTime=e.endTime??void 0,t.coins=e.coins?.map(n=>Eo.Coin.fromPartial(n))||[],t.rewardReceiverAddress=e.rewardReceiverAddress??"",t},fromAmino(e){let t=rm();return e.ID!==void 0&&e.ID!==null&&(t.ID=BigInt(e.ID)),e.owner!==void 0&&e.owner!==null&&(t.owner=e.owner),e.duration!==void 0&&e.duration!==null&&(t.duration=Ft.Duration.fromAmino(e.duration)),e.end_time!==void 0&&e.end_time!==null&&(t.endTime=(0,sr.fromTimestamp)(pn.Timestamp.fromAmino(e.end_time))),t.coins=e.coins?.map(n=>Eo.Coin.fromAmino(n))||[],e.reward_receiver_address!==void 0&&e.reward_receiver_address!==null&&(t.rewardReceiverAddress=e.reward_receiver_address),t},toAmino(e){let t={};return t.ID=e.ID!==BigInt(0)?e.ID.toString():void 0,t.owner=e.owner===""?void 0:e.owner,t.duration=e.duration?Ft.Duration.toAmino(e.duration):void 0,t.end_time=e.endTime?pn.Timestamp.toAmino((0,sr.toTimestamp)(e.endTime)):void 0,e.coins?t.coins=e.coins.map(n=>n?Eo.Coin.toAmino(n):void 0):t.coins=e.coins,t.reward_receiver_address=e.rewardReceiverAddress===""?void 0:e.rewardReceiverAddress,t},fromAminoMsg(e){return Pe.PeriodLock.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/lockup/period-lock",value:Pe.PeriodLock.toAmino(e)}},fromProtoMsg(e){return Pe.PeriodLock.decode(e.value)},toProto(e){return Pe.PeriodLock.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.lockup.PeriodLock",value:Pe.PeriodLock.encode(e).finish()}}};function im(){return{lockQueryType:0,denom:"",duration:Ft.Duration.fromPartial({}),timestamp:new Date}}Pe.QueryCondition={typeUrl:"/osmosis.lockup.QueryCondition",aminoType:"osmosis/lockup/query-condition",is(e){return e&&(e.$typeUrl===Pe.QueryCondition.typeUrl||(0,sr.isSet)(e.lockQueryType)&&typeof e.denom=="string"&&Ft.Duration.is(e.duration)&&pn.Timestamp.is(e.timestamp))},isSDK(e){return e&&(e.$typeUrl===Pe.QueryCondition.typeUrl||(0,sr.isSet)(e.lock_query_type)&&typeof e.denom=="string"&&Ft.Duration.isSDK(e.duration)&&pn.Timestamp.isSDK(e.timestamp))},isAmino(e){return e&&(e.$typeUrl===Pe.QueryCondition.typeUrl||(0,sr.isSet)(e.lock_query_type)&&typeof e.denom=="string"&&Ft.Duration.isAmino(e.duration)&&pn.Timestamp.isAmino(e.timestamp))},encode(e,t=$i.BinaryWriter.create()){return e.lockQueryType!==0&&t.uint32(8).int32(e.lockQueryType),e.denom!==""&&t.uint32(18).string(e.denom),e.duration!==void 0&&Ft.Duration.encode(e.duration,t.uint32(26).fork()).ldelim(),e.timestamp!==void 0&&pn.Timestamp.encode((0,sr.toTimestamp)(e.timestamp),t.uint32(34).fork()).ldelim(),t},decode(e,t){let n=e instanceof $i.BinaryReader?e:new $i.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=im();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.lockQueryType=n.int32();break;case 2:r.denom=n.string();break;case 3:r.duration=Ft.Duration.decode(n,n.uint32());break;case 4:r.timestamp=(0,sr.fromTimestamp)(pn.Timestamp.decode(n,n.uint32()));break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=im();return t.lockQueryType=e.lockQueryType??0,t.denom=e.denom??"",t.duration=e.duration!==void 0&&e.duration!==null?Ft.Duration.fromPartial(e.duration):void 0,t.timestamp=e.timestamp??void 0,t},fromAmino(e){let t=im();return e.lock_query_type!==void 0&&e.lock_query_type!==null&&(t.lockQueryType=e.lock_query_type),e.denom!==void 0&&e.denom!==null&&(t.denom=e.denom),e.duration!==void 0&&e.duration!==null&&(t.duration=Ft.Duration.fromAmino(e.duration)),e.timestamp!==void 0&&e.timestamp!==null&&(t.timestamp=(0,sr.fromTimestamp)(pn.Timestamp.fromAmino(e.timestamp))),t},toAmino(e){let t={};return t.lock_query_type=e.lockQueryType===0?void 0:e.lockQueryType,t.denom=e.denom===""?void 0:e.denom,t.duration=e.duration?Ft.Duration.toAmino(e.duration):void 0,t.timestamp=e.timestamp?pn.Timestamp.toAmino((0,sr.toTimestamp)(e.timestamp)):void 0,t},fromAminoMsg(e){return Pe.QueryCondition.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/lockup/query-condition",value:Pe.QueryCondition.toAmino(e)}},fromProtoMsg(e){return Pe.QueryCondition.decode(e.value)},toProto(e){return Pe.QueryCondition.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.lockup.QueryCondition",value:Pe.QueryCondition.encode(e).finish()}}};function om(){return{underlyingLockId:BigInt(0),synthDenom:"",endTime:new Date,duration:Ft.Duration.fromPartial({})}}Pe.SyntheticLock={typeUrl:"/osmosis.lockup.SyntheticLock",aminoType:"osmosis/lockup/synthetic-lock",is(e){return e&&(e.$typeUrl===Pe.SyntheticLock.typeUrl||typeof e.underlyingLockId=="bigint"&&typeof e.synthDenom=="string"&&pn.Timestamp.is(e.endTime)&&Ft.Duration.is(e.duration))},isSDK(e){return e&&(e.$typeUrl===Pe.SyntheticLock.typeUrl||typeof e.underlying_lock_id=="bigint"&&typeof e.synth_denom=="string"&&pn.Timestamp.isSDK(e.end_time)&&Ft.Duration.isSDK(e.duration))},isAmino(e){return e&&(e.$typeUrl===Pe.SyntheticLock.typeUrl||typeof e.underlying_lock_id=="bigint"&&typeof e.synth_denom=="string"&&pn.Timestamp.isAmino(e.end_time)&&Ft.Duration.isAmino(e.duration))},encode(e,t=$i.BinaryWriter.create()){return e.underlyingLockId!==BigInt(0)&&t.uint32(8).uint64(e.underlyingLockId),e.synthDenom!==""&&t.uint32(18).string(e.synthDenom),e.endTime!==void 0&&pn.Timestamp.encode((0,sr.toTimestamp)(e.endTime),t.uint32(26).fork()).ldelim(),e.duration!==void 0&&Ft.Duration.encode(e.duration,t.uint32(34).fork()).ldelim(),t},decode(e,t){let n=e instanceof $i.BinaryReader?e:new $i.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=om();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.underlyingLockId=n.uint64();break;case 2:r.synthDenom=n.string();break;case 3:r.endTime=(0,sr.fromTimestamp)(pn.Timestamp.decode(n,n.uint32()));break;case 4:r.duration=Ft.Duration.decode(n,n.uint32());break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=om();return t.underlyingLockId=e.underlyingLockId!==void 0&&e.underlyingLockId!==null?BigInt(e.underlyingLockId.toString()):BigInt(0),t.synthDenom=e.synthDenom??"",t.endTime=e.endTime??void 0,t.duration=e.duration!==void 0&&e.duration!==null?Ft.Duration.fromPartial(e.duration):void 0,t},fromAmino(e){let t=om();return e.underlying_lock_id!==void 0&&e.underlying_lock_id!==null&&(t.underlyingLockId=BigInt(e.underlying_lock_id)),e.synth_denom!==void 0&&e.synth_denom!==null&&(t.synthDenom=e.synth_denom),e.end_time!==void 0&&e.end_time!==null&&(t.endTime=(0,sr.fromTimestamp)(pn.Timestamp.fromAmino(e.end_time))),e.duration!==void 0&&e.duration!==null&&(t.duration=Ft.Duration.fromAmino(e.duration)),t},toAmino(e){let t={};return t.underlying_lock_id=e.underlyingLockId!==BigInt(0)?e.underlyingLockId.toString():void 0,t.synth_denom=e.synthDenom===""?void 0:e.synthDenom,t.end_time=e.endTime?pn.Timestamp.toAmino((0,sr.toTimestamp)(e.endTime)):void 0,t.duration=e.duration?Ft.Duration.toAmino(e.duration):void 0,t},fromAminoMsg(e){return Pe.SyntheticLock.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/lockup/synthetic-lock",value:Pe.SyntheticLock.toAmino(e)}},fromProtoMsg(e){return Pe.SyntheticLock.decode(e.value)},toProto(e){return Pe.SyntheticLock.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.lockup.SyntheticLock",value:Pe.SyntheticLock.encode(e).finish()}}}});var bm=L(J=>{"use strict";B();R();Object.defineProperty(J,"__esModule",{value:!0});J.MsgSetRewardReceiverAddressResponse=J.MsgSetRewardReceiverAddress=J.MsgForceUnlockResponse=J.MsgForceUnlock=J.MsgExtendLockupResponse=J.MsgExtendLockup=J.MsgBeginUnlockingResponse=J.MsgBeginUnlocking=J.MsgBeginUnlockingAllResponse=J.MsgBeginUnlockingAll=J.MsgLockTokensResponse=J.MsgLockTokens=void 0;var Hn=Ql(),en=ii(),To=B2(),pt=er();function sm(){return{owner:"",duration:Hn.Duration.fromPartial({}),coins:[]}}J.MsgLockTokens={typeUrl:"/osmosis.lockup.MsgLockTokens",aminoType:"osmosis/lockup/lock-tokens",is(e){return e&&(e.$typeUrl===J.MsgLockTokens.typeUrl||typeof e.owner=="string"&&Hn.Duration.is(e.duration)&&Array.isArray(e.coins)&&(!e.coins.length||en.Coin.is(e.coins[0])))},isSDK(e){return e&&(e.$typeUrl===J.MsgLockTokens.typeUrl||typeof e.owner=="string"&&Hn.Duration.isSDK(e.duration)&&Array.isArray(e.coins)&&(!e.coins.length||en.Coin.isSDK(e.coins[0])))},isAmino(e){return e&&(e.$typeUrl===J.MsgLockTokens.typeUrl||typeof e.owner=="string"&&Hn.Duration.isAmino(e.duration)&&Array.isArray(e.coins)&&(!e.coins.length||en.Coin.isAmino(e.coins[0])))},encode(e,t=pt.BinaryWriter.create()){e.owner!==""&&t.uint32(10).string(e.owner),e.duration!==void 0&&Hn.Duration.encode(e.duration,t.uint32(18).fork()).ldelim();for(let n of e.coins)en.Coin.encode(n,t.uint32(26).fork()).ldelim();return t},decode(e,t){let n=e instanceof pt.BinaryReader?e:new pt.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=sm();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.owner=n.string();break;case 2:r.duration=Hn.Duration.decode(n,n.uint32());break;case 3:r.coins.push(en.Coin.decode(n,n.uint32()));break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=sm();return t.owner=e.owner??"",t.duration=e.duration!==void 0&&e.duration!==null?Hn.Duration.fromPartial(e.duration):void 0,t.coins=e.coins?.map(n=>en.Coin.fromPartial(n))||[],t},fromAmino(e){let t=sm();return e.owner!==void 0&&e.owner!==null&&(t.owner=e.owner),e.duration!==void 0&&e.duration!==null&&(t.duration=Hn.Duration.fromAmino(e.duration)),t.coins=e.coins?.map(n=>en.Coin.fromAmino(n))||[],t},toAmino(e){let t={};return t.owner=e.owner===""?void 0:e.owner,t.duration=e.duration?Hn.Duration.toAmino(e.duration):void 0,e.coins?t.coins=e.coins.map(n=>n?en.Coin.toAmino(n):void 0):t.coins=e.coins,t},fromAminoMsg(e){return J.MsgLockTokens.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/lockup/lock-tokens",value:J.MsgLockTokens.toAmino(e)}},fromProtoMsg(e){return J.MsgLockTokens.decode(e.value)},toProto(e){return J.MsgLockTokens.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.lockup.MsgLockTokens",value:J.MsgLockTokens.encode(e).finish()}}};function am(){return{ID:BigInt(0)}}J.MsgLockTokensResponse={typeUrl:"/osmosis.lockup.MsgLockTokensResponse",aminoType:"osmosis/lockup/lock-tokens-response",is(e){return e&&(e.$typeUrl===J.MsgLockTokensResponse.typeUrl||typeof e.ID=="bigint")},isSDK(e){return e&&(e.$typeUrl===J.MsgLockTokensResponse.typeUrl||typeof e.ID=="bigint")},isAmino(e){return e&&(e.$typeUrl===J.MsgLockTokensResponse.typeUrl||typeof e.ID=="bigint")},encode(e,t=pt.BinaryWriter.create()){return e.ID!==BigInt(0)&&t.uint32(8).uint64(e.ID),t},decode(e,t){let n=e instanceof pt.BinaryReader?e:new pt.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=am();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.ID=n.uint64();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=am();return t.ID=e.ID!==void 0&&e.ID!==null?BigInt(e.ID.toString()):BigInt(0),t},fromAmino(e){let t=am();return e.ID!==void 0&&e.ID!==null&&(t.ID=BigInt(e.ID)),t},toAmino(e){let t={};return t.ID=e.ID!==BigInt(0)?e.ID.toString():void 0,t},fromAminoMsg(e){return J.MsgLockTokensResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/lockup/lock-tokens-response",value:J.MsgLockTokensResponse.toAmino(e)}},fromProtoMsg(e){return J.MsgLockTokensResponse.decode(e.value)},toProto(e){return J.MsgLockTokensResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.lockup.MsgLockTokensResponse",value:J.MsgLockTokensResponse.encode(e).finish()}}};function dm(){return{owner:""}}J.MsgBeginUnlockingAll={typeUrl:"/osmosis.lockup.MsgBeginUnlockingAll",aminoType:"osmosis/lockup/begin-unlock-tokens",is(e){return e&&(e.$typeUrl===J.MsgBeginUnlockingAll.typeUrl||typeof e.owner=="string")},isSDK(e){return e&&(e.$typeUrl===J.MsgBeginUnlockingAll.typeUrl||typeof e.owner=="string")},isAmino(e){return e&&(e.$typeUrl===J.MsgBeginUnlockingAll.typeUrl||typeof e.owner=="string")},encode(e,t=pt.BinaryWriter.create()){return e.owner!==""&&t.uint32(10).string(e.owner),t},decode(e,t){let n=e instanceof pt.BinaryReader?e:new pt.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=dm();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.owner=n.string();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=dm();return t.owner=e.owner??"",t},fromAmino(e){let t=dm();return e.owner!==void 0&&e.owner!==null&&(t.owner=e.owner),t},toAmino(e){let t={};return t.owner=e.owner===""?void 0:e.owner,t},fromAminoMsg(e){return J.MsgBeginUnlockingAll.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/lockup/begin-unlock-tokens",value:J.MsgBeginUnlockingAll.toAmino(e)}},fromProtoMsg(e){return J.MsgBeginUnlockingAll.decode(e.value)},toProto(e){return J.MsgBeginUnlockingAll.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.lockup.MsgBeginUnlockingAll",value:J.MsgBeginUnlockingAll.encode(e).finish()}}};function um(){return{unlocks:[]}}J.MsgBeginUnlockingAllResponse={typeUrl:"/osmosis.lockup.MsgBeginUnlockingAllResponse",aminoType:"osmosis/lockup/begin-unlocking-all-response",is(e){return e&&(e.$typeUrl===J.MsgBeginUnlockingAllResponse.typeUrl||Array.isArray(e.unlocks)&&(!e.unlocks.length||To.PeriodLock.is(e.unlocks[0])))},isSDK(e){return e&&(e.$typeUrl===J.MsgBeginUnlockingAllResponse.typeUrl||Array.isArray(e.unlocks)&&(!e.unlocks.length||To.PeriodLock.isSDK(e.unlocks[0])))},isAmino(e){return e&&(e.$typeUrl===J.MsgBeginUnlockingAllResponse.typeUrl||Array.isArray(e.unlocks)&&(!e.unlocks.length||To.PeriodLock.isAmino(e.unlocks[0])))},encode(e,t=pt.BinaryWriter.create()){for(let n of e.unlocks)To.PeriodLock.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){let n=e instanceof pt.BinaryReader?e:new pt.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=um();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.unlocks.push(To.PeriodLock.decode(n,n.uint32()));break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=um();return t.unlocks=e.unlocks?.map(n=>To.PeriodLock.fromPartial(n))||[],t},fromAmino(e){let t=um();return t.unlocks=e.unlocks?.map(n=>To.PeriodLock.fromAmino(n))||[],t},toAmino(e){let t={};return e.unlocks?t.unlocks=e.unlocks.map(n=>n?To.PeriodLock.toAmino(n):void 0):t.unlocks=e.unlocks,t},fromAminoMsg(e){return J.MsgBeginUnlockingAllResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/lockup/begin-unlocking-all-response",value:J.MsgBeginUnlockingAllResponse.toAmino(e)}},fromProtoMsg(e){return J.MsgBeginUnlockingAllResponse.decode(e.value)},toProto(e){return J.MsgBeginUnlockingAllResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.lockup.MsgBeginUnlockingAllResponse",value:J.MsgBeginUnlockingAllResponse.encode(e).finish()}}};function fm(){return{owner:"",ID:BigInt(0),coins:[]}}J.MsgBeginUnlocking={typeUrl:"/osmosis.lockup.MsgBeginUnlocking",aminoType:"osmosis/lockup/begin-unlock-period-lock",is(e){return e&&(e.$typeUrl===J.MsgBeginUnlocking.typeUrl||typeof e.owner=="string"&&typeof e.ID=="bigint"&&Array.isArray(e.coins)&&(!e.coins.length||en.Coin.is(e.coins[0])))},isSDK(e){return e&&(e.$typeUrl===J.MsgBeginUnlocking.typeUrl||typeof e.owner=="string"&&typeof e.ID=="bigint"&&Array.isArray(e.coins)&&(!e.coins.length||en.Coin.isSDK(e.coins[0])))},isAmino(e){return e&&(e.$typeUrl===J.MsgBeginUnlocking.typeUrl||typeof e.owner=="string"&&typeof e.ID=="bigint"&&Array.isArray(e.coins)&&(!e.coins.length||en.Coin.isAmino(e.coins[0])))},encode(e,t=pt.BinaryWriter.create()){e.owner!==""&&t.uint32(10).string(e.owner),e.ID!==BigInt(0)&&t.uint32(16).uint64(e.ID);for(let n of e.coins)en.Coin.encode(n,t.uint32(26).fork()).ldelim();return t},decode(e,t){let n=e instanceof pt.BinaryReader?e:new pt.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=fm();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.owner=n.string();break;case 2:r.ID=n.uint64();break;case 3:r.coins.push(en.Coin.decode(n,n.uint32()));break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=fm();return t.owner=e.owner??"",t.ID=e.ID!==void 0&&e.ID!==null?BigInt(e.ID.toString()):BigInt(0),t.coins=e.coins?.map(n=>en.Coin.fromPartial(n))||[],t},fromAmino(e){let t=fm();return e.owner!==void 0&&e.owner!==null&&(t.owner=e.owner),e.ID!==void 0&&e.ID!==null&&(t.ID=BigInt(e.ID)),t.coins=e.coins?.map(n=>en.Coin.fromAmino(n))||[],t},toAmino(e){let t={};return t.owner=e.owner===""?void 0:e.owner,t.ID=e.ID!==BigInt(0)?e.ID.toString():void 0,e.coins?t.coins=e.coins.map(n=>n?en.Coin.toAmino(n):void 0):t.coins=e.coins,t},fromAminoMsg(e){return J.MsgBeginUnlocking.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/lockup/begin-unlock-period-lock",value:J.MsgBeginUnlocking.toAmino(e)}},fromProtoMsg(e){return J.MsgBeginUnlocking.decode(e.value)},toProto(e){return J.MsgBeginUnlocking.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.lockup.MsgBeginUnlocking",value:J.MsgBeginUnlocking.encode(e).finish()}}};function cm(){return{success:!1,unlockingLockID:BigInt(0)}}J.MsgBeginUnlockingResponse={typeUrl:"/osmosis.lockup.MsgBeginUnlockingResponse",aminoType:"osmosis/lockup/begin-unlocking-response",is(e){return e&&(e.$typeUrl===J.MsgBeginUnlockingResponse.typeUrl||typeof e.success=="boolean"&&typeof e.unlockingLockID=="bigint")},isSDK(e){return e&&(e.$typeUrl===J.MsgBeginUnlockingResponse.typeUrl||typeof e.success=="boolean"&&typeof e.unlockingLockID=="bigint")},isAmino(e){return e&&(e.$typeUrl===J.MsgBeginUnlockingResponse.typeUrl||typeof e.success=="boolean"&&typeof e.unlockingLockID=="bigint")},encode(e,t=pt.BinaryWriter.create()){return e.success===!0&&t.uint32(8).bool(e.success),e.unlockingLockID!==BigInt(0)&&t.uint32(16).uint64(e.unlockingLockID),t},decode(e,t){let n=e instanceof pt.BinaryReader?e:new pt.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=cm();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.success=n.bool();break;case 2:r.unlockingLockID=n.uint64();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=cm();return t.success=e.success??!1,t.unlockingLockID=e.unlockingLockID!==void 0&&e.unlockingLockID!==null?BigInt(e.unlockingLockID.toString()):BigInt(0),t},fromAmino(e){let t=cm();return e.success!==void 0&&e.success!==null&&(t.success=e.success),e.unlockingLockID!==void 0&&e.unlockingLockID!==null&&(t.unlockingLockID=BigInt(e.unlockingLockID)),t},toAmino(e){let t={};return t.success=e.success===!1?void 0:e.success,t.unlockingLockID=e.unlockingLockID!==BigInt(0)?e.unlockingLockID.toString():void 0,t},fromAminoMsg(e){return J.MsgBeginUnlockingResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/lockup/begin-unlocking-response",value:J.MsgBeginUnlockingResponse.toAmino(e)}},fromProtoMsg(e){return J.MsgBeginUnlockingResponse.decode(e.value)},toProto(e){return J.MsgBeginUnlockingResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.lockup.MsgBeginUnlockingResponse",value:J.MsgBeginUnlockingResponse.encode(e).finish()}}};function lm(){return{owner:"",ID:BigInt(0),duration:Hn.Duration.fromPartial({})}}J.MsgExtendLockup={typeUrl:"/osmosis.lockup.MsgExtendLockup",aminoType:"osmosis/lockup/extend-lockup",is(e){return e&&(e.$typeUrl===J.MsgExtendLockup.typeUrl||typeof e.owner=="string"&&typeof e.ID=="bigint"&&Hn.Duration.is(e.duration))},isSDK(e){return e&&(e.$typeUrl===J.MsgExtendLockup.typeUrl||typeof e.owner=="string"&&typeof e.ID=="bigint"&&Hn.Duration.isSDK(e.duration))},isAmino(e){return e&&(e.$typeUrl===J.MsgExtendLockup.typeUrl||typeof e.owner=="string"&&typeof e.ID=="bigint"&&Hn.Duration.isAmino(e.duration))},encode(e,t=pt.BinaryWriter.create()){return e.owner!==""&&t.uint32(10).string(e.owner),e.ID!==BigInt(0)&&t.uint32(16).uint64(e.ID),e.duration!==void 0&&Hn.Duration.encode(e.duration,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof pt.BinaryReader?e:new pt.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=lm();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.owner=n.string();break;case 2:r.ID=n.uint64();break;case 3:r.duration=Hn.Duration.decode(n,n.uint32());break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=lm();return t.owner=e.owner??"",t.ID=e.ID!==void 0&&e.ID!==null?BigInt(e.ID.toString()):BigInt(0),t.duration=e.duration!==void 0&&e.duration!==null?Hn.Duration.fromPartial(e.duration):void 0,t},fromAmino(e){let t=lm();return e.owner!==void 0&&e.owner!==null&&(t.owner=e.owner),e.ID!==void 0&&e.ID!==null&&(t.ID=BigInt(e.ID)),e.duration!==void 0&&e.duration!==null&&(t.duration=Hn.Duration.fromAmino(e.duration)),t},toAmino(e){let t={};return t.owner=e.owner===""?void 0:e.owner,t.ID=e.ID!==BigInt(0)?e.ID.toString():void 0,t.duration=e.duration?Hn.Duration.toAmino(e.duration):void 0,t},fromAminoMsg(e){return J.MsgExtendLockup.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/lockup/extend-lockup",value:J.MsgExtendLockup.toAmino(e)}},fromProtoMsg(e){return J.MsgExtendLockup.decode(e.value)},toProto(e){return J.MsgExtendLockup.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.lockup.MsgExtendLockup",value:J.MsgExtendLockup.encode(e).finish()}}};function mm(){return{success:!1}}J.MsgExtendLockupResponse={typeUrl:"/osmosis.lockup.MsgExtendLockupResponse",aminoType:"osmosis/lockup/extend-lockup-response",is(e){return e&&(e.$typeUrl===J.MsgExtendLockupResponse.typeUrl||typeof e.success=="boolean")},isSDK(e){return e&&(e.$typeUrl===J.MsgExtendLockupResponse.typeUrl||typeof e.success=="boolean")},isAmino(e){return e&&(e.$typeUrl===J.MsgExtendLockupResponse.typeUrl||typeof e.success=="boolean")},encode(e,t=pt.BinaryWriter.create()){return e.success===!0&&t.uint32(8).bool(e.success),t},decode(e,t){let n=e instanceof pt.BinaryReader?e:new pt.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=mm();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.success=n.bool();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=mm();return t.success=e.success??!1,t},fromAmino(e){let t=mm();return e.success!==void 0&&e.success!==null&&(t.success=e.success),t},toAmino(e){let t={};return t.success=e.success===!1?void 0:e.success,t},fromAminoMsg(e){return J.MsgExtendLockupResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/lockup/extend-lockup-response",value:J.MsgExtendLockupResponse.toAmino(e)}},fromProtoMsg(e){return J.MsgExtendLockupResponse.decode(e.value)},toProto(e){return J.MsgExtendLockupResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.lockup.MsgExtendLockupResponse",value:J.MsgExtendLockupResponse.encode(e).finish()}}};function pm(){return{owner:"",ID:BigInt(0),coins:[]}}J.MsgForceUnlock={typeUrl:"/osmosis.lockup.MsgForceUnlock",aminoType:"osmosis/lockup/force-unlock-tokens",is(e){return e&&(e.$typeUrl===J.MsgForceUnlock.typeUrl||typeof e.owner=="string"&&typeof e.ID=="bigint"&&Array.isArray(e.coins)&&(!e.coins.length||en.Coin.is(e.coins[0])))},isSDK(e){return e&&(e.$typeUrl===J.MsgForceUnlock.typeUrl||typeof e.owner=="string"&&typeof e.ID=="bigint"&&Array.isArray(e.coins)&&(!e.coins.length||en.Coin.isSDK(e.coins[0])))},isAmino(e){return e&&(e.$typeUrl===J.MsgForceUnlock.typeUrl||typeof e.owner=="string"&&typeof e.ID=="bigint"&&Array.isArray(e.coins)&&(!e.coins.length||en.Coin.isAmino(e.coins[0])))},encode(e,t=pt.BinaryWriter.create()){e.owner!==""&&t.uint32(10).string(e.owner),e.ID!==BigInt(0)&&t.uint32(16).uint64(e.ID);for(let n of e.coins)en.Coin.encode(n,t.uint32(26).fork()).ldelim();return t},decode(e,t){let n=e instanceof pt.BinaryReader?e:new pt.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=pm();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.owner=n.string();break;case 2:r.ID=n.uint64();break;case 3:r.coins.push(en.Coin.decode(n,n.uint32()));break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=pm();return t.owner=e.owner??"",t.ID=e.ID!==void 0&&e.ID!==null?BigInt(e.ID.toString()):BigInt(0),t.coins=e.coins?.map(n=>en.Coin.fromPartial(n))||[],t},fromAmino(e){let t=pm();return e.owner!==void 0&&e.owner!==null&&(t.owner=e.owner),e.ID!==void 0&&e.ID!==null&&(t.ID=BigInt(e.ID)),t.coins=e.coins?.map(n=>en.Coin.fromAmino(n))||[],t},toAmino(e){let t={};return t.owner=e.owner===""?void 0:e.owner,t.ID=e.ID!==BigInt(0)?e.ID.toString():void 0,e.coins?t.coins=e.coins.map(n=>n?en.Coin.toAmino(n):void 0):t.coins=e.coins,t},fromAminoMsg(e){return J.MsgForceUnlock.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/lockup/force-unlock-tokens",value:J.MsgForceUnlock.toAmino(e)}},fromProtoMsg(e){return J.MsgForceUnlock.decode(e.value)},toProto(e){return J.MsgForceUnlock.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.lockup.MsgForceUnlock",value:J.MsgForceUnlock.encode(e).finish()}}};function hm(){return{success:!1}}J.MsgForceUnlockResponse={typeUrl:"/osmosis.lockup.MsgForceUnlockResponse",aminoType:"osmosis/lockup/force-unlock-response",is(e){return e&&(e.$typeUrl===J.MsgForceUnlockResponse.typeUrl||typeof e.success=="boolean")},isSDK(e){return e&&(e.$typeUrl===J.MsgForceUnlockResponse.typeUrl||typeof e.success=="boolean")},isAmino(e){return e&&(e.$typeUrl===J.MsgForceUnlockResponse.typeUrl||typeof e.success=="boolean")},encode(e,t=pt.BinaryWriter.create()){return e.success===!0&&t.uint32(8).bool(e.success),t},decode(e,t){let n=e instanceof pt.BinaryReader?e:new pt.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=hm();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.success=n.bool();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=hm();return t.success=e.success??!1,t},fromAmino(e){let t=hm();return e.success!==void 0&&e.success!==null&&(t.success=e.success),t},toAmino(e){let t={};return t.success=e.success===!1?void 0:e.success,t},fromAminoMsg(e){return J.MsgForceUnlockResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/lockup/force-unlock-response",value:J.MsgForceUnlockResponse.toAmino(e)}},fromProtoMsg(e){return J.MsgForceUnlockResponse.decode(e.value)},toProto(e){return J.MsgForceUnlockResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.lockup.MsgForceUnlockResponse",value:J.MsgForceUnlockResponse.encode(e).finish()}}};function gm(){return{owner:"",lockID:BigInt(0),rewardReceiver:""}}J.MsgSetRewardReceiverAddress={typeUrl:"/osmosis.lockup.MsgSetRewardReceiverAddress",aminoType:"osmosis/lockup/set-reward-receiver-address",is(e){return e&&(e.$typeUrl===J.MsgSetRewardReceiverAddress.typeUrl||typeof e.owner=="string"&&typeof e.lockID=="bigint"&&typeof e.rewardReceiver=="string")},isSDK(e){return e&&(e.$typeUrl===J.MsgSetRewardReceiverAddress.typeUrl||typeof e.owner=="string"&&typeof e.lockID=="bigint"&&typeof e.reward_receiver=="string")},isAmino(e){return e&&(e.$typeUrl===J.MsgSetRewardReceiverAddress.typeUrl||typeof e.owner=="string"&&typeof e.lockID=="bigint"&&typeof e.reward_receiver=="string")},encode(e,t=pt.BinaryWriter.create()){return e.owner!==""&&t.uint32(10).string(e.owner),e.lockID!==BigInt(0)&&t.uint32(16).uint64(e.lockID),e.rewardReceiver!==""&&t.uint32(26).string(e.rewardReceiver),t},decode(e,t){let n=e instanceof pt.BinaryReader?e:new pt.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=gm();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.owner=n.string();break;case 2:r.lockID=n.uint64();break;case 3:r.rewardReceiver=n.string();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=gm();return t.owner=e.owner??"",t.lockID=e.lockID!==void 0&&e.lockID!==null?BigInt(e.lockID.toString()):BigInt(0),t.rewardReceiver=e.rewardReceiver??"",t},fromAmino(e){let t=gm();return e.owner!==void 0&&e.owner!==null&&(t.owner=e.owner),e.lockID!==void 0&&e.lockID!==null&&(t.lockID=BigInt(e.lockID)),e.reward_receiver!==void 0&&e.reward_receiver!==null&&(t.rewardReceiver=e.reward_receiver),t},toAmino(e){let t={};return t.owner=e.owner===""?void 0:e.owner,t.lockID=e.lockID!==BigInt(0)?e.lockID.toString():void 0,t.reward_receiver=e.rewardReceiver===""?void 0:e.rewardReceiver,t},fromAminoMsg(e){return J.MsgSetRewardReceiverAddress.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/lockup/set-reward-receiver-address",value:J.MsgSetRewardReceiverAddress.toAmino(e)}},fromProtoMsg(e){return J.MsgSetRewardReceiverAddress.decode(e.value)},toProto(e){return J.MsgSetRewardReceiverAddress.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.lockup.MsgSetRewardReceiverAddress",value:J.MsgSetRewardReceiverAddress.encode(e).finish()}}};function ym(){return{success:!1}}J.MsgSetRewardReceiverAddressResponse={typeUrl:"/osmosis.lockup.MsgSetRewardReceiverAddressResponse",aminoType:"osmosis/lockup/set-reward-receiver-address-response",is(e){return e&&(e.$typeUrl===J.MsgSetRewardReceiverAddressResponse.typeUrl||typeof e.success=="boolean")},isSDK(e){return e&&(e.$typeUrl===J.MsgSetRewardReceiverAddressResponse.typeUrl||typeof e.success=="boolean")},isAmino(e){return e&&(e.$typeUrl===J.MsgSetRewardReceiverAddressResponse.typeUrl||typeof e.success=="boolean")},encode(e,t=pt.BinaryWriter.create()){return e.success===!0&&t.uint32(8).bool(e.success),t},decode(e,t){let n=e instanceof pt.BinaryReader?e:new pt.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=ym();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.success=n.bool();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=ym();return t.success=e.success??!1,t},fromAmino(e){let t=ym();return e.success!==void 0&&e.success!==null&&(t.success=e.success),t},toAmino(e){let t={};return t.success=e.success===!1?void 0:e.success,t},fromAminoMsg(e){return J.MsgSetRewardReceiverAddressResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/lockup/set-reward-receiver-address-response",value:J.MsgSetRewardReceiverAddressResponse.toAmino(e)}},fromProtoMsg(e){return J.MsgSetRewardReceiverAddressResponse.decode(e.value)},toProto(e){return J.MsgSetRewardReceiverAddressResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.lockup.MsgSetRewardReceiverAddressResponse",value:J.MsgSetRewardReceiverAddressResponse.encode(e).finish()}}}});var qm=L(O=>{"use strict";B();R();Object.defineProperty(O,"__esModule",{value:!0});O.MsgUnbondConvertAndStakeResponse=O.MsgUnbondConvertAndStake=O.MsgAddToConcentratedLiquiditySuperfluidPositionResponse=O.MsgAddToConcentratedLiquiditySuperfluidPosition=O.MsgUnlockAndMigrateSharesToFullRangeConcentratedPositionResponse=O.MsgUnlockAndMigrateSharesToFullRangeConcentratedPosition=O.MsgUnPoolWhitelistedPoolResponse=O.MsgUnPoolWhitelistedPool=O.MsgCreateFullRangePositionAndSuperfluidDelegateResponse=O.MsgCreateFullRangePositionAndSuperfluidDelegate=O.MsgLockAndSuperfluidDelegateResponse=O.MsgLockAndSuperfluidDelegate=O.MsgSuperfluidUndelegateAndUnbondLockResponse=O.MsgSuperfluidUndelegateAndUnbondLock=O.MsgSuperfluidUnbondLockResponse=O.MsgSuperfluidUnbondLock=O.MsgSuperfluidUndelegateResponse=O.MsgSuperfluidUndelegate=O.MsgSuperfluidDelegateResponse=O.MsgSuperfluidDelegate=void 0;var ie=ii(),Bs=nm(),me=er(),Vu=zu(),Zu=Ma();function vm(){return{sender:"",lockId:BigInt(0),valAddr:""}}O.MsgSuperfluidDelegate={typeUrl:"/osmosis.superfluid.MsgSuperfluidDelegate",aminoType:"osmosis/superfluid-delegate",is(e){return e&&(e.$typeUrl===O.MsgSuperfluidDelegate.typeUrl||typeof e.sender=="string"&&typeof e.lockId=="bigint"&&typeof e.valAddr=="string")},isSDK(e){return e&&(e.$typeUrl===O.MsgSuperfluidDelegate.typeUrl||typeof e.sender=="string"&&typeof e.lock_id=="bigint"&&typeof e.val_addr=="string")},isAmino(e){return e&&(e.$typeUrl===O.MsgSuperfluidDelegate.typeUrl||typeof e.sender=="string"&&typeof e.lock_id=="bigint"&&typeof e.val_addr=="string")},encode(e,t=me.BinaryWriter.create()){return e.sender!==""&&t.uint32(10).string(e.sender),e.lockId!==BigInt(0)&&t.uint32(16).uint64(e.lockId),e.valAddr!==""&&t.uint32(26).string(e.valAddr),t},decode(e,t){let n=e instanceof me.BinaryReader?e:new me.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=vm();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.sender=n.string();break;case 2:r.lockId=n.uint64();break;case 3:r.valAddr=n.string();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=vm();return t.sender=e.sender??"",t.lockId=e.lockId!==void 0&&e.lockId!==null?BigInt(e.lockId.toString()):BigInt(0),t.valAddr=e.valAddr??"",t},fromAmino(e){let t=vm();return e.sender!==void 0&&e.sender!==null&&(t.sender=e.sender),e.lock_id!==void 0&&e.lock_id!==null&&(t.lockId=BigInt(e.lock_id)),e.val_addr!==void 0&&e.val_addr!==null&&(t.valAddr=e.val_addr),t},toAmino(e){let t={};return t.sender=e.sender===""?void 0:e.sender,t.lock_id=e.lockId!==BigInt(0)?e.lockId.toString():void 0,t.val_addr=e.valAddr===""?void 0:e.valAddr,t},fromAminoMsg(e){return O.MsgSuperfluidDelegate.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/superfluid-delegate",value:O.MsgSuperfluidDelegate.toAmino(e)}},fromProtoMsg(e){return O.MsgSuperfluidDelegate.decode(e.value)},toProto(e){return O.MsgSuperfluidDelegate.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.superfluid.MsgSuperfluidDelegate",value:O.MsgSuperfluidDelegate.encode(e).finish()}}};function Am(){return{}}O.MsgSuperfluidDelegateResponse={typeUrl:"/osmosis.superfluid.MsgSuperfluidDelegateResponse",aminoType:"osmosis/superfluid-delegate-response",is(e){return e&&e.$typeUrl===O.MsgSuperfluidDelegateResponse.typeUrl},isSDK(e){return e&&e.$typeUrl===O.MsgSuperfluidDelegateResponse.typeUrl},isAmino(e){return e&&e.$typeUrl===O.MsgSuperfluidDelegateResponse.typeUrl},encode(e,t=me.BinaryWriter.create()){return t},decode(e,t){let n=e instanceof me.BinaryReader?e:new me.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Am();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){default:n.skipType(o&7);break}}return r},fromPartial(e){return Am()},fromAmino(e){return Am()},toAmino(e){return{}},fromAminoMsg(e){return O.MsgSuperfluidDelegateResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/superfluid-delegate-response",value:O.MsgSuperfluidDelegateResponse.toAmino(e)}},fromProtoMsg(e){return O.MsgSuperfluidDelegateResponse.decode(e.value)},toProto(e){return O.MsgSuperfluidDelegateResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.superfluid.MsgSuperfluidDelegateResponse",value:O.MsgSuperfluidDelegateResponse.encode(e).finish()}}};function Mm(){return{sender:"",lockId:BigInt(0)}}O.MsgSuperfluidUndelegate={typeUrl:"/osmosis.superfluid.MsgSuperfluidUndelegate",aminoType:"osmosis/superfluid-undelegate",is(e){return e&&(e.$typeUrl===O.MsgSuperfluidUndelegate.typeUrl||typeof e.sender=="string"&&typeof e.lockId=="bigint")},isSDK(e){return e&&(e.$typeUrl===O.MsgSuperfluidUndelegate.typeUrl||typeof e.sender=="string"&&typeof e.lock_id=="bigint")},isAmino(e){return e&&(e.$typeUrl===O.MsgSuperfluidUndelegate.typeUrl||typeof e.sender=="string"&&typeof e.lock_id=="bigint")},encode(e,t=me.BinaryWriter.create()){return e.sender!==""&&t.uint32(10).string(e.sender),e.lockId!==BigInt(0)&&t.uint32(16).uint64(e.lockId),t},decode(e,t){let n=e instanceof me.BinaryReader?e:new me.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Mm();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.sender=n.string();break;case 2:r.lockId=n.uint64();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=Mm();return t.sender=e.sender??"",t.lockId=e.lockId!==void 0&&e.lockId!==null?BigInt(e.lockId.toString()):BigInt(0),t},fromAmino(e){let t=Mm();return e.sender!==void 0&&e.sender!==null&&(t.sender=e.sender),e.lock_id!==void 0&&e.lock_id!==null&&(t.lockId=BigInt(e.lock_id)),t},toAmino(e){let t={};return t.sender=e.sender===""?void 0:e.sender,t.lock_id=e.lockId!==BigInt(0)?e.lockId.toString():void 0,t},fromAminoMsg(e){return O.MsgSuperfluidUndelegate.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/superfluid-undelegate",value:O.MsgSuperfluidUndelegate.toAmino(e)}},fromProtoMsg(e){return O.MsgSuperfluidUndelegate.decode(e.value)},toProto(e){return O.MsgSuperfluidUndelegate.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.superfluid.MsgSuperfluidUndelegate",value:O.MsgSuperfluidUndelegate.encode(e).finish()}}};function wm(){return{}}O.MsgSuperfluidUndelegateResponse={typeUrl:"/osmosis.superfluid.MsgSuperfluidUndelegateResponse",aminoType:"osmosis/superfluid-undelegate-response",is(e){return e&&e.$typeUrl===O.MsgSuperfluidUndelegateResponse.typeUrl},isSDK(e){return e&&e.$typeUrl===O.MsgSuperfluidUndelegateResponse.typeUrl},isAmino(e){return e&&e.$typeUrl===O.MsgSuperfluidUndelegateResponse.typeUrl},encode(e,t=me.BinaryWriter.create()){return t},decode(e,t){let n=e instanceof me.BinaryReader?e:new me.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=wm();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){default:n.skipType(o&7);break}}return r},fromPartial(e){return wm()},fromAmino(e){return wm()},toAmino(e){return{}},fromAminoMsg(e){return O.MsgSuperfluidUndelegateResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/superfluid-undelegate-response",value:O.MsgSuperfluidUndelegateResponse.toAmino(e)}},fromProtoMsg(e){return O.MsgSuperfluidUndelegateResponse.decode(e.value)},toProto(e){return O.MsgSuperfluidUndelegateResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.superfluid.MsgSuperfluidUndelegateResponse",value:O.MsgSuperfluidUndelegateResponse.encode(e).finish()}}};function km(){return{sender:"",lockId:BigInt(0)}}O.MsgSuperfluidUnbondLock={typeUrl:"/osmosis.superfluid.MsgSuperfluidUnbondLock",aminoType:"osmosis/superfluid-unbond-lock",is(e){return e&&(e.$typeUrl===O.MsgSuperfluidUnbondLock.typeUrl||typeof e.sender=="string"&&typeof e.lockId=="bigint")},isSDK(e){return e&&(e.$typeUrl===O.MsgSuperfluidUnbondLock.typeUrl||typeof e.sender=="string"&&typeof e.lock_id=="bigint")},isAmino(e){return e&&(e.$typeUrl===O.MsgSuperfluidUnbondLock.typeUrl||typeof e.sender=="string"&&typeof e.lock_id=="bigint")},encode(e,t=me.BinaryWriter.create()){return e.sender!==""&&t.uint32(10).string(e.sender),e.lockId!==BigInt(0)&&t.uint32(16).uint64(e.lockId),t},decode(e,t){let n=e instanceof me.BinaryReader?e:new me.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=km();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.sender=n.string();break;case 2:r.lockId=n.uint64();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=km();return t.sender=e.sender??"",t.lockId=e.lockId!==void 0&&e.lockId!==null?BigInt(e.lockId.toString()):BigInt(0),t},fromAmino(e){let t=km();return e.sender!==void 0&&e.sender!==null&&(t.sender=e.sender),e.lock_id!==void 0&&e.lock_id!==null&&(t.lockId=BigInt(e.lock_id)),t},toAmino(e){let t={};return t.sender=e.sender===""?void 0:e.sender,t.lock_id=e.lockId!==BigInt(0)?e.lockId.toString():void 0,t},fromAminoMsg(e){return O.MsgSuperfluidUnbondLock.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/superfluid-unbond-lock",value:O.MsgSuperfluidUnbondLock.toAmino(e)}},fromProtoMsg(e){return O.MsgSuperfluidUnbondLock.decode(e.value)},toProto(e){return O.MsgSuperfluidUnbondLock.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.superfluid.MsgSuperfluidUnbondLock",value:O.MsgSuperfluidUnbondLock.encode(e).finish()}}};function Sm(){return{}}O.MsgSuperfluidUnbondLockResponse={typeUrl:"/osmosis.superfluid.MsgSuperfluidUnbondLockResponse",aminoType:"osmosis/superfluid-unbond-lock-response",is(e){return e&&e.$typeUrl===O.MsgSuperfluidUnbondLockResponse.typeUrl},isSDK(e){return e&&e.$typeUrl===O.MsgSuperfluidUnbondLockResponse.typeUrl},isAmino(e){return e&&e.$typeUrl===O.MsgSuperfluidUnbondLockResponse.typeUrl},encode(e,t=me.BinaryWriter.create()){return t},decode(e,t){let n=e instanceof me.BinaryReader?e:new me.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Sm();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){default:n.skipType(o&7);break}}return r},fromPartial(e){return Sm()},fromAmino(e){return Sm()},toAmino(e){return{}},fromAminoMsg(e){return O.MsgSuperfluidUnbondLockResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/superfluid-unbond-lock-response",value:O.MsgSuperfluidUnbondLockResponse.toAmino(e)}},fromProtoMsg(e){return O.MsgSuperfluidUnbondLockResponse.decode(e.value)},toProto(e){return O.MsgSuperfluidUnbondLockResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.superfluid.MsgSuperfluidUnbondLockResponse",value:O.MsgSuperfluidUnbondLockResponse.encode(e).finish()}}};function _m(){return{sender:"",lockId:BigInt(0),coin:ie.Coin.fromPartial({})}}O.MsgSuperfluidUndelegateAndUnbondLock={typeUrl:"/osmosis.superfluid.MsgSuperfluidUndelegateAndUnbondLock",aminoType:"osmosis/superfluid-undelegate-and-unbond-lock",is(e){return e&&(e.$typeUrl===O.MsgSuperfluidUndelegateAndUnbondLock.typeUrl||typeof e.sender=="string"&&typeof e.lockId=="bigint"&&ie.Coin.is(e.coin))},isSDK(e){return e&&(e.$typeUrl===O.MsgSuperfluidUndelegateAndUnbondLock.typeUrl||typeof e.sender=="string"&&typeof e.lock_id=="bigint"&&ie.Coin.isSDK(e.coin))},isAmino(e){return e&&(e.$typeUrl===O.MsgSuperfluidUndelegateAndUnbondLock.typeUrl||typeof e.sender=="string"&&typeof e.lock_id=="bigint"&&ie.Coin.isAmino(e.coin))},encode(e,t=me.BinaryWriter.create()){return e.sender!==""&&t.uint32(10).string(e.sender),e.lockId!==BigInt(0)&&t.uint32(16).uint64(e.lockId),e.coin!==void 0&&ie.Coin.encode(e.coin,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof me.BinaryReader?e:new me.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=_m();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.sender=n.string();break;case 2:r.lockId=n.uint64();break;case 3:r.coin=ie.Coin.decode(n,n.uint32());break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=_m();return t.sender=e.sender??"",t.lockId=e.lockId!==void 0&&e.lockId!==null?BigInt(e.lockId.toString()):BigInt(0),t.coin=e.coin!==void 0&&e.coin!==null?ie.Coin.fromPartial(e.coin):void 0,t},fromAmino(e){let t=_m();return e.sender!==void 0&&e.sender!==null&&(t.sender=e.sender),e.lock_id!==void 0&&e.lock_id!==null&&(t.lockId=BigInt(e.lock_id)),e.coin!==void 0&&e.coin!==null&&(t.coin=ie.Coin.fromAmino(e.coin)),t},toAmino(e){let t={};return t.sender=e.sender===""?void 0:e.sender,t.lock_id=e.lockId!==BigInt(0)?e.lockId.toString():void 0,t.coin=e.coin?ie.Coin.toAmino(e.coin):void 0,t},fromAminoMsg(e){return O.MsgSuperfluidUndelegateAndUnbondLock.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/superfluid-undelegate-and-unbond-lock",value:O.MsgSuperfluidUndelegateAndUnbondLock.toAmino(e)}},fromProtoMsg(e){return O.MsgSuperfluidUndelegateAndUnbondLock.decode(e.value)},toProto(e){return O.MsgSuperfluidUndelegateAndUnbondLock.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.superfluid.MsgSuperfluidUndelegateAndUnbondLock",value:O.MsgSuperfluidUndelegateAndUnbondLock.encode(e).finish()}}};function Im(){return{lockId:BigInt(0)}}O.MsgSuperfluidUndelegateAndUnbondLockResponse={typeUrl:"/osmosis.superfluid.MsgSuperfluidUndelegateAndUnbondLockResponse",aminoType:"osmosis/superfluid-undelegate-and-unbond-lock-response",is(e){return e&&(e.$typeUrl===O.MsgSuperfluidUndelegateAndUnbondLockResponse.typeUrl||typeof e.lockId=="bigint")},isSDK(e){return e&&(e.$typeUrl===O.MsgSuperfluidUndelegateAndUnbondLockResponse.typeUrl||typeof e.lock_id=="bigint")},isAmino(e){return e&&(e.$typeUrl===O.MsgSuperfluidUndelegateAndUnbondLockResponse.typeUrl||typeof e.lock_id=="bigint")},encode(e,t=me.BinaryWriter.create()){return e.lockId!==BigInt(0)&&t.uint32(8).uint64(e.lockId),t},decode(e,t){let n=e instanceof me.BinaryReader?e:new me.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Im();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.lockId=n.uint64();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=Im();return t.lockId=e.lockId!==void 0&&e.lockId!==null?BigInt(e.lockId.toString()):BigInt(0),t},fromAmino(e){let t=Im();return e.lock_id!==void 0&&e.lock_id!==null&&(t.lockId=BigInt(e.lock_id)),t},toAmino(e){let t={};return t.lock_id=e.lockId!==BigInt(0)?e.lockId.toString():void 0,t},fromAminoMsg(e){return O.MsgSuperfluidUndelegateAndUnbondLockResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/superfluid-undelegate-and-unbond-lock-response",value:O.MsgSuperfluidUndelegateAndUnbondLockResponse.toAmino(e)}},fromProtoMsg(e){return O.MsgSuperfluidUndelegateAndUnbondLockResponse.decode(e.value)},toProto(e){return O.MsgSuperfluidUndelegateAndUnbondLockResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.superfluid.MsgSuperfluidUndelegateAndUnbondLockResponse",value:O.MsgSuperfluidUndelegateAndUnbondLockResponse.encode(e).finish()}}};function xm(){return{sender:"",coins:[],valAddr:""}}O.MsgLockAndSuperfluidDelegate={typeUrl:"/osmosis.superfluid.MsgLockAndSuperfluidDelegate",aminoType:"osmosis/lock-and-superfluid-delegate",is(e){return e&&(e.$typeUrl===O.MsgLockAndSuperfluidDelegate.typeUrl||typeof e.sender=="string"&&Array.isArray(e.coins)&&(!e.coins.length||ie.Coin.is(e.coins[0]))&&typeof e.valAddr=="string")},isSDK(e){return e&&(e.$typeUrl===O.MsgLockAndSuperfluidDelegate.typeUrl||typeof e.sender=="string"&&Array.isArray(e.coins)&&(!e.coins.length||ie.Coin.isSDK(e.coins[0]))&&typeof e.val_addr=="string")},isAmino(e){return e&&(e.$typeUrl===O.MsgLockAndSuperfluidDelegate.typeUrl||typeof e.sender=="string"&&Array.isArray(e.coins)&&(!e.coins.length||ie.Coin.isAmino(e.coins[0]))&&typeof e.val_addr=="string")},encode(e,t=me.BinaryWriter.create()){e.sender!==""&&t.uint32(10).string(e.sender);for(let n of e.coins)ie.Coin.encode(n,t.uint32(18).fork()).ldelim();return e.valAddr!==""&&t.uint32(26).string(e.valAddr),t},decode(e,t){let n=e instanceof me.BinaryReader?e:new me.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=xm();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.sender=n.string();break;case 2:r.coins.push(ie.Coin.decode(n,n.uint32()));break;case 3:r.valAddr=n.string();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=xm();return t.sender=e.sender??"",t.coins=e.coins?.map(n=>ie.Coin.fromPartial(n))||[],t.valAddr=e.valAddr??"",t},fromAmino(e){let t=xm();return e.sender!==void 0&&e.sender!==null&&(t.sender=e.sender),t.coins=e.coins?.map(n=>ie.Coin.fromAmino(n))||[],e.val_addr!==void 0&&e.val_addr!==null&&(t.valAddr=e.val_addr),t},toAmino(e){let t={};return t.sender=e.sender===""?void 0:e.sender,e.coins?t.coins=e.coins.map(n=>n?ie.Coin.toAmino(n):void 0):t.coins=e.coins,t.val_addr=e.valAddr===""?void 0:e.valAddr,t},fromAminoMsg(e){return O.MsgLockAndSuperfluidDelegate.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/lock-and-superfluid-delegate",value:O.MsgLockAndSuperfluidDelegate.toAmino(e)}},fromProtoMsg(e){return O.MsgLockAndSuperfluidDelegate.decode(e.value)},toProto(e){return O.MsgLockAndSuperfluidDelegate.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.superfluid.MsgLockAndSuperfluidDelegate",value:O.MsgLockAndSuperfluidDelegate.encode(e).finish()}}};function Pm(){return{ID:BigInt(0)}}O.MsgLockAndSuperfluidDelegateResponse={typeUrl:"/osmosis.superfluid.MsgLockAndSuperfluidDelegateResponse",aminoType:"osmosis/lock-and-superfluid-delegate-response",is(e){return e&&(e.$typeUrl===O.MsgLockAndSuperfluidDelegateResponse.typeUrl||typeof e.ID=="bigint")},isSDK(e){return e&&(e.$typeUrl===O.MsgLockAndSuperfluidDelegateResponse.typeUrl||typeof e.ID=="bigint")},isAmino(e){return e&&(e.$typeUrl===O.MsgLockAndSuperfluidDelegateResponse.typeUrl||typeof e.ID=="bigint")},encode(e,t=me.BinaryWriter.create()){return e.ID!==BigInt(0)&&t.uint32(8).uint64(e.ID),t},decode(e,t){let n=e instanceof me.BinaryReader?e:new me.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Pm();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.ID=n.uint64();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=Pm();return t.ID=e.ID!==void 0&&e.ID!==null?BigInt(e.ID.toString()):BigInt(0),t},fromAmino(e){let t=Pm();return e.ID!==void 0&&e.ID!==null&&(t.ID=BigInt(e.ID)),t},toAmino(e){let t={};return t.ID=e.ID!==BigInt(0)?e.ID.toString():void 0,t},fromAminoMsg(e){return O.MsgLockAndSuperfluidDelegateResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/lock-and-superfluid-delegate-response",value:O.MsgLockAndSuperfluidDelegateResponse.toAmino(e)}},fromProtoMsg(e){return O.MsgLockAndSuperfluidDelegateResponse.decode(e.value)},toProto(e){return O.MsgLockAndSuperfluidDelegateResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.superfluid.MsgLockAndSuperfluidDelegateResponse",value:O.MsgLockAndSuperfluidDelegateResponse.encode(e).finish()}}};function Um(){return{sender:"",coins:[],valAddr:"",poolId:BigInt(0)}}O.MsgCreateFullRangePositionAndSuperfluidDelegate={typeUrl:"/osmosis.superfluid.MsgCreateFullRangePositionAndSuperfluidDelegate",aminoType:"osmosis/full-range-and-sf-delegate",is(e){return e&&(e.$typeUrl===O.MsgCreateFullRangePositionAndSuperfluidDelegate.typeUrl||typeof e.sender=="string"&&Array.isArray(e.coins)&&(!e.coins.length||ie.Coin.is(e.coins[0]))&&typeof e.valAddr=="string"&&typeof e.poolId=="bigint")},isSDK(e){return e&&(e.$typeUrl===O.MsgCreateFullRangePositionAndSuperfluidDelegate.typeUrl||typeof e.sender=="string"&&Array.isArray(e.coins)&&(!e.coins.length||ie.Coin.isSDK(e.coins[0]))&&typeof e.val_addr=="string"&&typeof e.pool_id=="bigint")},isAmino(e){return e&&(e.$typeUrl===O.MsgCreateFullRangePositionAndSuperfluidDelegate.typeUrl||typeof e.sender=="string"&&Array.isArray(e.coins)&&(!e.coins.length||ie.Coin.isAmino(e.coins[0]))&&typeof e.val_addr=="string"&&typeof e.pool_id=="bigint")},encode(e,t=me.BinaryWriter.create()){e.sender!==""&&t.uint32(10).string(e.sender);for(let n of e.coins)ie.Coin.encode(n,t.uint32(18).fork()).ldelim();return e.valAddr!==""&&t.uint32(26).string(e.valAddr),e.poolId!==BigInt(0)&&t.uint32(32).uint64(e.poolId),t},decode(e,t){let n=e instanceof me.BinaryReader?e:new me.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Um();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.sender=n.string();break;case 2:r.coins.push(ie.Coin.decode(n,n.uint32()));break;case 3:r.valAddr=n.string();break;case 4:r.poolId=n.uint64();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=Um();return t.sender=e.sender??"",t.coins=e.coins?.map(n=>ie.Coin.fromPartial(n))||[],t.valAddr=e.valAddr??"",t.poolId=e.poolId!==void 0&&e.poolId!==null?BigInt(e.poolId.toString()):BigInt(0),t},fromAmino(e){let t=Um();return e.sender!==void 0&&e.sender!==null&&(t.sender=e.sender),t.coins=e.coins?.map(n=>ie.Coin.fromAmino(n))||[],e.val_addr!==void 0&&e.val_addr!==null&&(t.valAddr=e.val_addr),e.pool_id!==void 0&&e.pool_id!==null&&(t.poolId=BigInt(e.pool_id)),t},toAmino(e){let t={};return t.sender=e.sender===""?void 0:e.sender,e.coins?t.coins=e.coins.map(n=>n?ie.Coin.toAmino(n):void 0):t.coins=e.coins,t.val_addr=e.valAddr===""?void 0:e.valAddr,t.pool_id=e.poolId!==BigInt(0)?e.poolId.toString():void 0,t},fromAminoMsg(e){return O.MsgCreateFullRangePositionAndSuperfluidDelegate.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/full-range-and-sf-delegate",value:O.MsgCreateFullRangePositionAndSuperfluidDelegate.toAmino(e)}},fromProtoMsg(e){return O.MsgCreateFullRangePositionAndSuperfluidDelegate.decode(e.value)},toProto(e){return O.MsgCreateFullRangePositionAndSuperfluidDelegate.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.superfluid.MsgCreateFullRangePositionAndSuperfluidDelegate",value:O.MsgCreateFullRangePositionAndSuperfluidDelegate.encode(e).finish()}}};function Bm(){return{lockID:BigInt(0),positionID:BigInt(0)}}O.MsgCreateFullRangePositionAndSuperfluidDelegateResponse={typeUrl:"/osmosis.superfluid.MsgCreateFullRangePositionAndSuperfluidDelegateResponse",aminoType:"osmosis/create-full-range-position-and-superfluid-delegate-response",is(e){return e&&(e.$typeUrl===O.MsgCreateFullRangePositionAndSuperfluidDelegateResponse.typeUrl||typeof e.lockID=="bigint"&&typeof e.positionID=="bigint")},isSDK(e){return e&&(e.$typeUrl===O.MsgCreateFullRangePositionAndSuperfluidDelegateResponse.typeUrl||typeof e.lockID=="bigint"&&typeof e.positionID=="bigint")},isAmino(e){return e&&(e.$typeUrl===O.MsgCreateFullRangePositionAndSuperfluidDelegateResponse.typeUrl||typeof e.lockID=="bigint"&&typeof e.positionID=="bigint")},encode(e,t=me.BinaryWriter.create()){return e.lockID!==BigInt(0)&&t.uint32(8).uint64(e.lockID),e.positionID!==BigInt(0)&&t.uint32(16).uint64(e.positionID),t},decode(e,t){let n=e instanceof me.BinaryReader?e:new me.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Bm();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.lockID=n.uint64();break;case 2:r.positionID=n.uint64();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=Bm();return t.lockID=e.lockID!==void 0&&e.lockID!==null?BigInt(e.lockID.toString()):BigInt(0),t.positionID=e.positionID!==void 0&&e.positionID!==null?BigInt(e.positionID.toString()):BigInt(0),t},fromAmino(e){let t=Bm();return e.lockID!==void 0&&e.lockID!==null&&(t.lockID=BigInt(e.lockID)),e.positionID!==void 0&&e.positionID!==null&&(t.positionID=BigInt(e.positionID)),t},toAmino(e){let t={};return t.lockID=e.lockID!==BigInt(0)?e.lockID.toString():void 0,t.positionID=e.positionID!==BigInt(0)?e.positionID.toString():void 0,t},fromAminoMsg(e){return O.MsgCreateFullRangePositionAndSuperfluidDelegateResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/create-full-range-position-and-superfluid-delegate-response",value:O.MsgCreateFullRangePositionAndSuperfluidDelegateResponse.toAmino(e)}},fromProtoMsg(e){return O.MsgCreateFullRangePositionAndSuperfluidDelegateResponse.decode(e.value)},toProto(e){return O.MsgCreateFullRangePositionAndSuperfluidDelegateResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.superfluid.MsgCreateFullRangePositionAndSuperfluidDelegateResponse",value:O.MsgCreateFullRangePositionAndSuperfluidDelegateResponse.encode(e).finish()}}};function Rm(){return{sender:"",poolId:BigInt(0)}}O.MsgUnPoolWhitelistedPool={typeUrl:"/osmosis.superfluid.MsgUnPoolWhitelistedPool",aminoType:"osmosis/unpool-whitelisted-pool",is(e){return e&&(e.$typeUrl===O.MsgUnPoolWhitelistedPool.typeUrl||typeof e.sender=="string"&&typeof e.poolId=="bigint")},isSDK(e){return e&&(e.$typeUrl===O.MsgUnPoolWhitelistedPool.typeUrl||typeof e.sender=="string"&&typeof e.pool_id=="bigint")},isAmino(e){return e&&(e.$typeUrl===O.MsgUnPoolWhitelistedPool.typeUrl||typeof e.sender=="string"&&typeof e.pool_id=="bigint")},encode(e,t=me.BinaryWriter.create()){return e.sender!==""&&t.uint32(10).string(e.sender),e.poolId!==BigInt(0)&&t.uint32(16).uint64(e.poolId),t},decode(e,t){let n=e instanceof me.BinaryReader?e:new me.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Rm();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.sender=n.string();break;case 2:r.poolId=n.uint64();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=Rm();return t.sender=e.sender??"",t.poolId=e.poolId!==void 0&&e.poolId!==null?BigInt(e.poolId.toString()):BigInt(0),t},fromAmino(e){let t=Rm();return e.sender!==void 0&&e.sender!==null&&(t.sender=e.sender),e.pool_id!==void 0&&e.pool_id!==null&&(t.poolId=BigInt(e.pool_id)),t},toAmino(e){let t={};return t.sender=e.sender===""?void 0:e.sender,t.pool_id=e.poolId!==BigInt(0)?e.poolId.toString():void 0,t},fromAminoMsg(e){return O.MsgUnPoolWhitelistedPool.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/unpool-whitelisted-pool",value:O.MsgUnPoolWhitelistedPool.toAmino(e)}},fromProtoMsg(e){return O.MsgUnPoolWhitelistedPool.decode(e.value)},toProto(e){return O.MsgUnPoolWhitelistedPool.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.superfluid.MsgUnPoolWhitelistedPool",value:O.MsgUnPoolWhitelistedPool.encode(e).finish()}}};function Cm(){return{exitedLockIds:[]}}O.MsgUnPoolWhitelistedPoolResponse={typeUrl:"/osmosis.superfluid.MsgUnPoolWhitelistedPoolResponse",aminoType:"osmosis/un-pool-whitelisted-pool-response",is(e){return e&&(e.$typeUrl===O.MsgUnPoolWhitelistedPoolResponse.typeUrl||Array.isArray(e.exitedLockIds)&&(!e.exitedLockIds.length||typeof e.exitedLockIds[0]=="bigint"))},isSDK(e){return e&&(e.$typeUrl===O.MsgUnPoolWhitelistedPoolResponse.typeUrl||Array.isArray(e.exited_lock_ids)&&(!e.exited_lock_ids.length||typeof e.exited_lock_ids[0]=="bigint"))},isAmino(e){return e&&(e.$typeUrl===O.MsgUnPoolWhitelistedPoolResponse.typeUrl||Array.isArray(e.exited_lock_ids)&&(!e.exited_lock_ids.length||typeof e.exited_lock_ids[0]=="bigint"))},encode(e,t=me.BinaryWriter.create()){t.uint32(10).fork();for(let n of e.exitedLockIds)t.uint64(n);return t.ldelim(),t},decode(e,t){let n=e instanceof me.BinaryReader?e:new me.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Cm();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:if((o&7)===2){let f=n.uint32()+n.pos;for(;n.pos<f;)r.exitedLockIds.push(n.uint64())}else r.exitedLockIds.push(n.uint64());break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=Cm();return t.exitedLockIds=e.exitedLockIds?.map(n=>BigInt(n.toString()))||[],t},fromAmino(e){let t=Cm();return t.exitedLockIds=e.exited_lock_ids?.map(n=>BigInt(n))||[],t},toAmino(e){let t={};return e.exitedLockIds?t.exited_lock_ids=e.exitedLockIds.map(n=>n.toString()):t.exited_lock_ids=e.exitedLockIds,t},fromAminoMsg(e){return O.MsgUnPoolWhitelistedPoolResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/un-pool-whitelisted-pool-response",value:O.MsgUnPoolWhitelistedPoolResponse.toAmino(e)}},fromProtoMsg(e){return O.MsgUnPoolWhitelistedPoolResponse.decode(e.value)},toProto(e){return O.MsgUnPoolWhitelistedPoolResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.superfluid.MsgUnPoolWhitelistedPoolResponse",value:O.MsgUnPoolWhitelistedPoolResponse.encode(e).finish()}}};function Em(){return{sender:"",lockId:BigInt(0),sharesToMigrate:ie.Coin.fromPartial({}),tokenOutMins:[]}}O.MsgUnlockAndMigrateSharesToFullRangeConcentratedPosition={typeUrl:"/osmosis.superfluid.MsgUnlockAndMigrateSharesToFullRangeConcentratedPosition",aminoType:"osmosis/unlock-and-migrate",is(e){return e&&(e.$typeUrl===O.MsgUnlockAndMigrateSharesToFullRangeConcentratedPosition.typeUrl||typeof e.sender=="string"&&typeof e.lockId=="bigint"&&ie.Coin.is(e.sharesToMigrate)&&Array.isArray(e.tokenOutMins)&&(!e.tokenOutMins.length||ie.Coin.is(e.tokenOutMins[0])))},isSDK(e){return e&&(e.$typeUrl===O.MsgUnlockAndMigrateSharesToFullRangeConcentratedPosition.typeUrl||typeof e.sender=="string"&&typeof e.lock_id=="bigint"&&ie.Coin.isSDK(e.shares_to_migrate)&&Array.isArray(e.token_out_mins)&&(!e.token_out_mins.length||ie.Coin.isSDK(e.token_out_mins[0])))},isAmino(e){return e&&(e.$typeUrl===O.MsgUnlockAndMigrateSharesToFullRangeConcentratedPosition.typeUrl||typeof e.sender=="string"&&typeof e.lock_id=="bigint"&&ie.Coin.isAmino(e.shares_to_migrate)&&Array.isArray(e.token_out_mins)&&(!e.token_out_mins.length||ie.Coin.isAmino(e.token_out_mins[0])))},encode(e,t=me.BinaryWriter.create()){e.sender!==""&&t.uint32(10).string(e.sender),e.lockId!==BigInt(0)&&t.uint32(16).int64(e.lockId),e.sharesToMigrate!==void 0&&ie.Coin.encode(e.sharesToMigrate,t.uint32(26).fork()).ldelim();for(let n of e.tokenOutMins)ie.Coin.encode(n,t.uint32(34).fork()).ldelim();return t},decode(e,t){let n=e instanceof me.BinaryReader?e:new me.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Em();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.sender=n.string();break;case 2:r.lockId=n.int64();break;case 3:r.sharesToMigrate=ie.Coin.decode(n,n.uint32());break;case 4:r.tokenOutMins.push(ie.Coin.decode(n,n.uint32()));break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=Em();return t.sender=e.sender??"",t.lockId=e.lockId!==void 0&&e.lockId!==null?BigInt(e.lockId.toString()):BigInt(0),t.sharesToMigrate=e.sharesToMigrate!==void 0&&e.sharesToMigrate!==null?ie.Coin.fromPartial(e.sharesToMigrate):void 0,t.tokenOutMins=e.tokenOutMins?.map(n=>ie.Coin.fromPartial(n))||[],t},fromAmino(e){let t=Em();return e.sender!==void 0&&e.sender!==null&&(t.sender=e.sender),e.lock_id!==void 0&&e.lock_id!==null&&(t.lockId=BigInt(e.lock_id)),e.shares_to_migrate!==void 0&&e.shares_to_migrate!==null&&(t.sharesToMigrate=ie.Coin.fromAmino(e.shares_to_migrate)),t.tokenOutMins=e.token_out_mins?.map(n=>ie.Coin.fromAmino(n))||[],t},toAmino(e){let t={};return t.sender=e.sender===""?void 0:e.sender,t.lock_id=e.lockId!==BigInt(0)?e.lockId.toString():void 0,t.shares_to_migrate=e.sharesToMigrate?ie.Coin.toAmino(e.sharesToMigrate):void 0,e.tokenOutMins?t.token_out_mins=e.tokenOutMins.map(n=>n?ie.Coin.toAmino(n):void 0):t.token_out_mins=e.tokenOutMins,t},fromAminoMsg(e){return O.MsgUnlockAndMigrateSharesToFullRangeConcentratedPosition.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/unlock-and-migrate",value:O.MsgUnlockAndMigrateSharesToFullRangeConcentratedPosition.toAmino(e)}},fromProtoMsg(e){return O.MsgUnlockAndMigrateSharesToFullRangeConcentratedPosition.decode(e.value)},toProto(e){return O.MsgUnlockAndMigrateSharesToFullRangeConcentratedPosition.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.superfluid.MsgUnlockAndMigrateSharesToFullRangeConcentratedPosition",value:O.MsgUnlockAndMigrateSharesToFullRangeConcentratedPosition.encode(e).finish()}}};function Tm(){return{amount0:"",amount1:"",liquidityCreated:"",joinTime:new Date}}O.MsgUnlockAndMigrateSharesToFullRangeConcentratedPositionResponse={typeUrl:"/osmosis.superfluid.MsgUnlockAndMigrateSharesToFullRangeConcentratedPositionResponse",aminoType:"osmosis/unlock-and-migrate-shares-to-full-range-concentrated-position-response",is(e){return e&&(e.$typeUrl===O.MsgUnlockAndMigrateSharesToFullRangeConcentratedPositionResponse.typeUrl||typeof e.amount0=="string"&&typeof e.amount1=="string"&&typeof e.liquidityCreated=="string"&&Bs.Timestamp.is(e.joinTime))},isSDK(e){return e&&(e.$typeUrl===O.MsgUnlockAndMigrateSharesToFullRangeConcentratedPositionResponse.typeUrl||typeof e.amount0=="string"&&typeof e.amount1=="string"&&typeof e.liquidity_created=="string"&&Bs.Timestamp.isSDK(e.join_time))},isAmino(e){return e&&(e.$typeUrl===O.MsgUnlockAndMigrateSharesToFullRangeConcentratedPositionResponse.typeUrl||typeof e.amount0=="string"&&typeof e.amount1=="string"&&typeof e.liquidity_created=="string"&&Bs.Timestamp.isAmino(e.join_time))},encode(e,t=me.BinaryWriter.create()){return e.amount0!==""&&t.uint32(10).string(e.amount0),e.amount1!==""&&t.uint32(18).string(e.amount1),e.liquidityCreated!==""&&t.uint32(26).string(Vu.Decimal.fromUserInput(e.liquidityCreated,18).atomics),e.joinTime!==void 0&&Bs.Timestamp.encode((0,Zu.toTimestamp)(e.joinTime),t.uint32(34).fork()).ldelim(),t},decode(e,t){let n=e instanceof me.BinaryReader?e:new me.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Tm();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.amount0=n.string();break;case 2:r.amount1=n.string();break;case 3:r.liquidityCreated=Vu.Decimal.fromAtomics(n.string(),18).toString();break;case 4:r.joinTime=(0,Zu.fromTimestamp)(Bs.Timestamp.decode(n,n.uint32()));break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=Tm();return t.amount0=e.amount0??"",t.amount1=e.amount1??"",t.liquidityCreated=e.liquidityCreated??"",t.joinTime=e.joinTime??void 0,t},fromAmino(e){let t=Tm();return e.amount0!==void 0&&e.amount0!==null&&(t.amount0=e.amount0),e.amount1!==void 0&&e.amount1!==null&&(t.amount1=e.amount1),e.liquidity_created!==void 0&&e.liquidity_created!==null&&(t.liquidityCreated=e.liquidity_created),e.join_time!==void 0&&e.join_time!==null&&(t.joinTime=(0,Zu.fromTimestamp)(Bs.Timestamp.fromAmino(e.join_time))),t},toAmino(e){let t={};return t.amount0=e.amount0===""?void 0:e.amount0,t.amount1=e.amount1===""?void 0:e.amount1,t.liquidity_created=e.liquidityCreated===""?void 0:e.liquidityCreated,t.join_time=e.joinTime?Bs.Timestamp.toAmino((0,Zu.toTimestamp)(e.joinTime)):void 0,t},fromAminoMsg(e){return O.MsgUnlockAndMigrateSharesToFullRangeConcentratedPositionResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/unlock-and-migrate-shares-to-full-range-concentrated-position-response",value:O.MsgUnlockAndMigrateSharesToFullRangeConcentratedPositionResponse.toAmino(e)}},fromProtoMsg(e){return O.MsgUnlockAndMigrateSharesToFullRangeConcentratedPositionResponse.decode(e.value)},toProto(e){return O.MsgUnlockAndMigrateSharesToFullRangeConcentratedPositionResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.superfluid.MsgUnlockAndMigrateSharesToFullRangeConcentratedPositionResponse",value:O.MsgUnlockAndMigrateSharesToFullRangeConcentratedPositionResponse.encode(e).finish()}}};function Om(){return{positionId:BigInt(0),sender:"",tokenDesired0:ie.Coin.fromPartial({}),tokenDesired1:ie.Coin.fromPartial({})}}O.MsgAddToConcentratedLiquiditySuperfluidPosition={typeUrl:"/osmosis.superfluid.MsgAddToConcentratedLiquiditySuperfluidPosition",aminoType:"osmosis/add-to-cl-superfluid-position",is(e){return e&&(e.$typeUrl===O.MsgAddToConcentratedLiquiditySuperfluidPosition.typeUrl||typeof e.positionId=="bigint"&&typeof e.sender=="string"&&ie.Coin.is(e.tokenDesired0)&&ie.Coin.is(e.tokenDesired1))},isSDK(e){return e&&(e.$typeUrl===O.MsgAddToConcentratedLiquiditySuperfluidPosition.typeUrl||typeof e.position_id=="bigint"&&typeof e.sender=="string"&&ie.Coin.isSDK(e.token_desired0)&&ie.Coin.isSDK(e.token_desired1))},isAmino(e){return e&&(e.$typeUrl===O.MsgAddToConcentratedLiquiditySuperfluidPosition.typeUrl||typeof e.position_id=="bigint"&&typeof e.sender=="string"&&ie.Coin.isAmino(e.token_desired0)&&ie.Coin.isAmino(e.token_desired1))},encode(e,t=me.BinaryWriter.create()){return e.positionId!==BigInt(0)&&t.uint32(8).uint64(e.positionId),e.sender!==""&&t.uint32(18).string(e.sender),e.tokenDesired0!==void 0&&ie.Coin.encode(e.tokenDesired0,t.uint32(26).fork()).ldelim(),e.tokenDesired1!==void 0&&ie.Coin.encode(e.tokenDesired1,t.uint32(34).fork()).ldelim(),t},decode(e,t){let n=e instanceof me.BinaryReader?e:new me.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Om();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.positionId=n.uint64();break;case 2:r.sender=n.string();break;case 3:r.tokenDesired0=ie.Coin.decode(n,n.uint32());break;case 4:r.tokenDesired1=ie.Coin.decode(n,n.uint32());break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=Om();return t.positionId=e.positionId!==void 0&&e.positionId!==null?BigInt(e.positionId.toString()):BigInt(0),t.sender=e.sender??"",t.tokenDesired0=e.tokenDesired0!==void 0&&e.tokenDesired0!==null?ie.Coin.fromPartial(e.tokenDesired0):void 0,t.tokenDesired1=e.tokenDesired1!==void 0&&e.tokenDesired1!==null?ie.Coin.fromPartial(e.tokenDesired1):void 0,t},fromAmino(e){let t=Om();return e.position_id!==void 0&&e.position_id!==null&&(t.positionId=BigInt(e.position_id)),e.sender!==void 0&&e.sender!==null&&(t.sender=e.sender),e.token_desired0!==void 0&&e.token_desired0!==null&&(t.tokenDesired0=ie.Coin.fromAmino(e.token_desired0)),e.token_desired1!==void 0&&e.token_desired1!==null&&(t.tokenDesired1=ie.Coin.fromAmino(e.token_desired1)),t},toAmino(e){let t={};return t.position_id=e.positionId!==BigInt(0)?e.positionId.toString():void 0,t.sender=e.sender===""?void 0:e.sender,t.token_desired0=e.tokenDesired0?ie.Coin.toAmino(e.tokenDesired0):void 0,t.token_desired1=e.tokenDesired1?ie.Coin.toAmino(e.tokenDesired1):void 0,t},fromAminoMsg(e){return O.MsgAddToConcentratedLiquiditySuperfluidPosition.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/add-to-cl-superfluid-position",value:O.MsgAddToConcentratedLiquiditySuperfluidPosition.toAmino(e)}},fromProtoMsg(e){return O.MsgAddToConcentratedLiquiditySuperfluidPosition.decode(e.value)},toProto(e){return O.MsgAddToConcentratedLiquiditySuperfluidPosition.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.superfluid.MsgAddToConcentratedLiquiditySuperfluidPosition",value:O.MsgAddToConcentratedLiquiditySuperfluidPosition.encode(e).finish()}}};function Dm(){return{positionId:BigInt(0),amount0:"",amount1:"",newLiquidity:"",lockId:BigInt(0)}}O.MsgAddToConcentratedLiquiditySuperfluidPositionResponse={typeUrl:"/osmosis.superfluid.MsgAddToConcentratedLiquiditySuperfluidPositionResponse",aminoType:"osmosis/add-to-concentrated-liquidity-superfluid-position-response",is(e){return e&&(e.$typeUrl===O.MsgAddToConcentratedLiquiditySuperfluidPositionResponse.typeUrl||typeof e.positionId=="bigint"&&typeof e.amount0=="string"&&typeof e.amount1=="string"&&typeof e.newLiquidity=="string"&&typeof e.lockId=="bigint")},isSDK(e){return e&&(e.$typeUrl===O.MsgAddToConcentratedLiquiditySuperfluidPositionResponse.typeUrl||typeof e.position_id=="bigint"&&typeof e.amount0=="string"&&typeof e.amount1=="string"&&typeof e.new_liquidity=="string"&&typeof e.lock_id=="bigint")},isAmino(e){return e&&(e.$typeUrl===O.MsgAddToConcentratedLiquiditySuperfluidPositionResponse.typeUrl||typeof e.position_id=="bigint"&&typeof e.amount0=="string"&&typeof e.amount1=="string"&&typeof e.new_liquidity=="string"&&typeof e.lock_id=="bigint")},encode(e,t=me.BinaryWriter.create()){return e.positionId!==BigInt(0)&&t.uint32(8).uint64(e.positionId),e.amount0!==""&&t.uint32(18).string(e.amount0),e.amount1!==""&&t.uint32(26).string(e.amount1),e.newLiquidity!==""&&t.uint32(42).string(Vu.Decimal.fromUserInput(e.newLiquidity,18).atomics),e.lockId!==BigInt(0)&&t.uint32(32).uint64(e.lockId),t},decode(e,t){let n=e instanceof me.BinaryReader?e:new me.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Dm();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.positionId=n.uint64();break;case 2:r.amount0=n.string();break;case 3:r.amount1=n.string();break;case 5:r.newLiquidity=Vu.Decimal.fromAtomics(n.string(),18).toString();break;case 4:r.lockId=n.uint64();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=Dm();return t.positionId=e.positionId!==void 0&&e.positionId!==null?BigInt(e.positionId.toString()):BigInt(0),t.amount0=e.amount0??"",t.amount1=e.amount1??"",t.newLiquidity=e.newLiquidity??"",t.lockId=e.lockId!==void 0&&e.lockId!==null?BigInt(e.lockId.toString()):BigInt(0),t},fromAmino(e){let t=Dm();return e.position_id!==void 0&&e.position_id!==null&&(t.positionId=BigInt(e.position_id)),e.amount0!==void 0&&e.amount0!==null&&(t.amount0=e.amount0),e.amount1!==void 0&&e.amount1!==null&&(t.amount1=e.amount1),e.new_liquidity!==void 0&&e.new_liquidity!==null&&(t.newLiquidity=e.new_liquidity),e.lock_id!==void 0&&e.lock_id!==null&&(t.lockId=BigInt(e.lock_id)),t},toAmino(e){let t={};return t.position_id=e.positionId!==BigInt(0)?e.positionId.toString():void 0,t.amount0=e.amount0===""?void 0:e.amount0,t.amount1=e.amount1===""?void 0:e.amount1,t.new_liquidity=e.newLiquidity===""?void 0:e.newLiquidity,t.lock_id=e.lockId!==BigInt(0)?e.lockId.toString():void 0,t},fromAminoMsg(e){return O.MsgAddToConcentratedLiquiditySuperfluidPositionResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/add-to-concentrated-liquidity-superfluid-position-response",value:O.MsgAddToConcentratedLiquiditySuperfluidPositionResponse.toAmino(e)}},fromProtoMsg(e){return O.MsgAddToConcentratedLiquiditySuperfluidPositionResponse.decode(e.value)},toProto(e){return O.MsgAddToConcentratedLiquiditySuperfluidPositionResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.superfluid.MsgAddToConcentratedLiquiditySuperfluidPositionResponse",value:O.MsgAddToConcentratedLiquiditySuperfluidPositionResponse.encode(e).finish()}}};function Nm(){return{lockId:BigInt(0),sender:"",valAddr:"",minAmtToStake:"",sharesToConvert:ie.Coin.fromPartial({})}}O.MsgUnbondConvertAndStake={typeUrl:"/osmosis.superfluid.MsgUnbondConvertAndStake",aminoType:"osmosis/unbond-convert-and-stake",is(e){return e&&(e.$typeUrl===O.MsgUnbondConvertAndStake.typeUrl||typeof e.lockId=="bigint"&&typeof e.sender=="string"&&typeof e.valAddr=="string"&&typeof e.minAmtToStake=="string"&&ie.Coin.is(e.sharesToConvert))},isSDK(e){return e&&(e.$typeUrl===O.MsgUnbondConvertAndStake.typeUrl||typeof e.lock_id=="bigint"&&typeof e.sender=="string"&&typeof e.val_addr=="string"&&typeof e.min_amt_to_stake=="string"&&ie.Coin.isSDK(e.shares_to_convert))},isAmino(e){return e&&(e.$typeUrl===O.MsgUnbondConvertAndStake.typeUrl||typeof e.lock_id=="bigint"&&typeof e.sender=="string"&&typeof e.val_addr=="string"&&typeof e.min_amt_to_stake=="string"&&ie.Coin.isAmino(e.shares_to_convert))},encode(e,t=me.BinaryWriter.create()){return e.lockId!==BigInt(0)&&t.uint32(8).uint64(e.lockId),e.sender!==""&&t.uint32(18).string(e.sender),e.valAddr!==""&&t.uint32(26).string(e.valAddr),e.minAmtToStake!==""&&t.uint32(34).string(e.minAmtToStake),e.sharesToConvert!==void 0&&ie.Coin.encode(e.sharesToConvert,t.uint32(42).fork()).ldelim(),t},decode(e,t){let n=e instanceof me.BinaryReader?e:new me.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Nm();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.lockId=n.uint64();break;case 2:r.sender=n.string();break;case 3:r.valAddr=n.string();break;case 4:r.minAmtToStake=n.string();break;case 5:r.sharesToConvert=ie.Coin.decode(n,n.uint32());break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=Nm();return t.lockId=e.lockId!==void 0&&e.lockId!==null?BigInt(e.lockId.toString()):BigInt(0),t.sender=e.sender??"",t.valAddr=e.valAddr??"",t.minAmtToStake=e.minAmtToStake??"",t.sharesToConvert=e.sharesToConvert!==void 0&&e.sharesToConvert!==null?ie.Coin.fromPartial(e.sharesToConvert):void 0,t},fromAmino(e){let t=Nm();return e.lock_id!==void 0&&e.lock_id!==null&&(t.lockId=BigInt(e.lock_id)),e.sender!==void 0&&e.sender!==null&&(t.sender=e.sender),e.val_addr!==void 0&&e.val_addr!==null&&(t.valAddr=e.val_addr),e.min_amt_to_stake!==void 0&&e.min_amt_to_stake!==null&&(t.minAmtToStake=e.min_amt_to_stake),e.shares_to_convert!==void 0&&e.shares_to_convert!==null&&(t.sharesToConvert=ie.Coin.fromAmino(e.shares_to_convert)),t},toAmino(e){let t={};return t.lock_id=e.lockId!==BigInt(0)?e.lockId.toString():void 0,t.sender=e.sender===""?void 0:e.sender,t.val_addr=e.valAddr===""?void 0:e.valAddr,t.min_amt_to_stake=e.minAmtToStake===""?void 0:e.minAmtToStake,t.shares_to_convert=e.sharesToConvert?ie.Coin.toAmino(e.sharesToConvert):void 0,t},fromAminoMsg(e){return O.MsgUnbondConvertAndStake.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/unbond-convert-and-stake",value:O.MsgUnbondConvertAndStake.toAmino(e)}},fromProtoMsg(e){return O.MsgUnbondConvertAndStake.decode(e.value)},toProto(e){return O.MsgUnbondConvertAndStake.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.superfluid.MsgUnbondConvertAndStake",value:O.MsgUnbondConvertAndStake.encode(e).finish()}}};function Lm(){return{totalAmtStaked:""}}O.MsgUnbondConvertAndStakeResponse={typeUrl:"/osmosis.superfluid.MsgUnbondConvertAndStakeResponse",aminoType:"osmosis/unbond-convert-and-stake-response",is(e){return e&&(e.$typeUrl===O.MsgUnbondConvertAndStakeResponse.typeUrl||typeof e.totalAmtStaked=="string")},isSDK(e){return e&&(e.$typeUrl===O.MsgUnbondConvertAndStakeResponse.typeUrl||typeof e.total_amt_staked=="string")},isAmino(e){return e&&(e.$typeUrl===O.MsgUnbondConvertAndStakeResponse.typeUrl||typeof e.total_amt_staked=="string")},encode(e,t=me.BinaryWriter.create()){return e.totalAmtStaked!==""&&t.uint32(10).string(e.totalAmtStaked),t},decode(e,t){let n=e instanceof me.BinaryReader?e:new me.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Lm();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.totalAmtStaked=n.string();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=Lm();return t.totalAmtStaked=e.totalAmtStaked??"",t},fromAmino(e){let t=Lm();return e.total_amt_staked!==void 0&&e.total_amt_staked!==null&&(t.totalAmtStaked=e.total_amt_staked),t},toAmino(e){let t={};return t.total_amt_staked=e.totalAmtStaked===""?void 0:e.totalAmtStaked,t},fromAminoMsg(e){return O.MsgUnbondConvertAndStakeResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"osmosis/unbond-convert-and-stake-response",value:O.MsgUnbondConvertAndStakeResponse.toAmino(e)}},fromProtoMsg(e){return O.MsgUnbondConvertAndStakeResponse.decode(e.value)},toProto(e){return O.MsgUnbondConvertAndStakeResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/osmosis.superfluid.MsgUnbondConvertAndStakeResponse",value:O.MsgUnbondConvertAndStakeResponse.encode(e).finish()}}}});var R2=L(ki=>{"use strict";B();R();var q4=ki&&ki.__createBinding||(Object.create?function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]}),F4=ki&&ki.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Rd=ki&&ki.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&q4(t,e,n);return F4(t,e),t};Object.defineProperty(ki,"__esModule",{value:!0});ki.OsmosisRegistry=void 0;var Oo=Rd(m2()),Bd=Rd(Pl()),Rs=Rd(Yl()),wa=Rd(bm()),wi=Rd(qm());ki.OsmosisRegistry=[["/osmosis.gamm.v1beta1.MsgJoinPool",Oo.MsgJoinPool],["/osmosis.gamm.v1beta1.MsgExitPool",Oo.MsgExitPool],["/osmosis.gamm.v1beta1.MsgSwapExactAmountIn",Oo.MsgSwapExactAmountIn],["/osmosis.gamm.v1beta1.MsgSwapExactAmountOut",Oo.MsgSwapExactAmountOut],["/osmosis.gamm.v1beta1.MsgJoinSwapExternAmountIn",Oo.MsgJoinSwapExternAmountIn],["/osmosis.gamm.v1beta1.MsgJoinSwapShareAmountOut",Oo.MsgJoinSwapShareAmountOut],["/osmosis.gamm.v1beta1.MsgExitSwapExternAmountOut",Oo.MsgExitSwapExternAmountOut],["/osmosis.gamm.v1beta1.MsgExitSwapShareAmountIn",Oo.MsgExitSwapShareAmountIn],["/osmosis.poolmanager.v1beta1.MsgSwapExactAmountIn",Bd.MsgSwapExactAmountIn],["/osmosis.poolmanager.v1beta1.MsgSwapExactAmountOut",Bd.MsgSwapExactAmountOut],["/osmosis.poolmanager.v1beta1.MsgSplitRouteSwapExactAmountIn",Bd.MsgSplitRouteSwapExactAmountIn],["/osmosis.poolmanager.v1beta1.MsgSplitRouteSwapExactAmountOut",Bd.MsgSplitRouteSwapExactAmountOut],["/osmosis.poolmanager.v1beta1.MsgSetDenomPairTakerFee",Bd.MsgSetDenomPairTakerFee],["/osmosis.lockup.MsgLockTokens",wa.MsgLockTokens],["/osmosis.lockup.MsgBeginUnlockingAll",wa.MsgBeginUnlockingAll],["/osmosis.lockup.MsgBeginUnlocking",wa.MsgBeginUnlocking],["/osmosis.lockup.MsgExtendLockup",wa.MsgExtendLockup],["/osmosis.lockup.MsgForceUnlock",wa.MsgForceUnlock],["/osmosis.lockup.MsgSetRewardReceiverAddress",wa.MsgSetRewardReceiverAddress],["/osmosis.superfluid.MsgSuperfluidDelegate",wi.MsgSuperfluidDelegate],["/osmosis.superfluid.MsgSuperfluidUndelegate",wi.MsgSuperfluidUndelegate],["/osmosis.superfluid.MsgSuperfluidUnbondLock",wi.MsgSuperfluidUnbondLock],["/osmosis.superfluid.MsgSuperfluidUndelegateAndUnbondLock",wi.MsgSuperfluidUndelegateAndUnbondLock],["/osmosis.superfluid.MsgLockAndSuperfluidDelegate",wi.MsgLockAndSuperfluidDelegate],["/osmosis.superfluid.MsgCreateFullRangePositionAndSuperfluidDelegate",wi.MsgCreateFullRangePositionAndSuperfluidDelegate],["/osmosis.superfluid.MsgUnPoolWhitelistedPool",wi.MsgUnPoolWhitelistedPool],["/osmosis.superfluid.MsgUnlockAndMigrateSharesToFullRangeConcentratedPosition",wi.MsgUnlockAndMigrateSharesToFullRangeConcentratedPosition],["/osmosis.superfluid.MsgAddToConcentratedLiquiditySuperfluidPosition",wi.MsgAddToConcentratedLiquiditySuperfluidPosition],["/osmosis.superfluid.MsgUnbondConvertAndStake",wi.MsgUnbondConvertAndStake],["/osmosis.tokenfactory.v1beta1.MsgCreateDenom",Rs.MsgCreateDenom],["/osmosis.tokenfactory.v1beta1.MsgMint",Rs.MsgMint],["/osmosis.tokenfactory.v1beta1.MsgBurn",Rs.MsgBurn],["/osmosis.tokenfactory.v1beta1.MsgChangeAdmin",Rs.MsgChangeAdmin],["/osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata",Rs.MsgSetDenomMetadata],["/osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHook",Rs.MsgSetBeforeSendHook],["/osmosis.tokenfactory.v1beta1.MsgForceTransfer",Rs.MsgForceTransfer]]});var C2=L(Gu=>{"use strict";B();R();Object.defineProperty(Gu,"__esModule",{value:!0});Gu.GammAminoConverters=void 0;var Do=xt();Gu.GammAminoConverters={"/osmosis.gamm.v1beta1.MsgJoinPool":{aminoType:"osmosis/gamm/join-pool",toAmino:({sender:e,poolId:t,shareOutAmount:n,tokenInMaxs:i})=>({sender:e,poolId:t.toString(),shareOutAmount:n,tokenInMaxs:i.map(r=>({denom:r.denom,amount:r.amount}))}),fromAmino:({sender:e,poolId:t,shareOutAmount:n,tokenInMaxs:i})=>({sender:e,poolId:Do.Long.fromString(t),shareOutAmount:n,tokenInMaxs:i.map(r=>({denom:r.denom,amount:r.amount}))})},"/osmosis.gamm.v1beta1.MsgExitPool":{aminoType:"osmosis/gamm/exit-pool",toAmino:({sender:e,poolId:t,shareInAmount:n,tokenOutMins:i})=>({sender:e,poolId:t.toString(),shareInAmount:n,tokenOutMins:i.map(r=>({denom:r.denom,amount:r.amount}))}),fromAmino:({sender:e,poolId:t,shareInAmount:n,tokenOutMins:i})=>({sender:e,poolId:Do.Long.fromString(t),shareInAmount:n,tokenOutMins:i.map(r=>({denom:r.denom,amount:r.amount}))})},"/osmosis.gamm.v1beta1.MsgSwapExactAmountIn":{aminoType:"osmosis/gamm/swap-exact-amount-in",toAmino:({sender:e,routes:t,tokenIn:n,tokenOutMinAmount:i})=>({sender:e,routes:t.map(r=>({poolId:r.poolId.toString(),tokenOutDenom:r.tokenOutDenom})),tokenIn:{denom:n.denom,amount:n.amount},tokenOutMinAmount:i}),fromAmino:({sender:e,routes:t,tokenIn:n,tokenOutMinAmount:i})=>({sender:e,routes:t.map(r=>({poolId:Do.Long.fromString(r.poolId),tokenOutDenom:r.tokenOutDenom})),tokenIn:{denom:n.denom,amount:n.amount},tokenOutMinAmount:i})},"/osmosis.gamm.v1beta1.MsgSwapExactAmountOut":{aminoType:"osmosis/gamm/swap-exact-amount-out",toAmino:({sender:e,routes:t,tokenInMaxAmount:n,tokenOut:i})=>({sender:e,routes:t.map(r=>({poolId:r.poolId.toString(),tokenInDenom:r.tokenInDenom})),tokenInMaxAmount:n,tokenOut:{denom:i.denom,amount:i.amount}}),fromAmino:({sender:e,routes:t,tokenInMaxAmount:n,tokenOut:i})=>({sender:e,routes:t.map(r=>({poolId:Do.Long.fromString(r.poolId),tokenInDenom:r.tokenInDenom})),tokenInMaxAmount:n,tokenOut:{denom:i.denom,amount:i.amount}})},"/osmosis.gamm.v1beta1.MsgJoinSwapExternAmountIn":{aminoType:"osmosis/gamm/join-swap-extern-amount-in",toAmino:({sender:e,poolId:t,tokenIn:n,shareOutMinAmount:i})=>({sender:e,poolId:t.toString(),tokenIn:{denom:n.denom,amount:n.amount},shareOutMinAmount:i}),fromAmino:({sender:e,poolId:t,tokenIn:n,shareOutMinAmount:i})=>({sender:e,poolId:Do.Long.fromString(t),tokenIn:{denom:n.denom,amount:n.amount},shareOutMinAmount:i})},"/osmosis.gamm.v1beta1.MsgJoinSwapShareAmountOut":{aminoType:"osmosis/gamm/join-swap-share-amount-out",toAmino:({sender:e,poolId:t,tokenInDenom:n,shareOutAmount:i,tokenInMaxAmount:r})=>({sender:e,poolId:t.toString(),tokenInDenom:n,shareOutAmount:i,tokenInMaxAmount:r}),fromAmino:({sender:e,poolId:t,tokenInDenom:n,shareOutAmount:i,tokenInMaxAmount:r})=>({sender:e,poolId:Do.Long.fromString(t),tokenInDenom:n,shareOutAmount:i,tokenInMaxAmount:r})},"/osmosis.gamm.v1beta1.MsgExitSwapExternAmountOut":{aminoType:"osmosis/gamm/exit-swap-extern-amount-out",toAmino:({sender:e,poolId:t,tokenOut:n,shareInMaxAmount:i})=>({sender:e,poolId:t.toString(),tokenOut:{denom:n.denom,amount:n.amount},shareInMaxAmount:i}),fromAmino:({sender:e,poolId:t,tokenOut:n,shareInMaxAmount:i})=>({sender:e,poolId:Do.Long.fromString(t),tokenOut:{denom:n.denom,amount:n.amount},shareInMaxAmount:i})},"/osmosis.gamm.v1beta1.MsgExitSwapShareAmountIn":{aminoType:"osmosis/gamm/exit-swap-share-amount-in",toAmino:({sender:e,poolId:t,tokenOutDenom:n,shareInAmount:i,tokenOutMinAmount:r})=>({sender:e,poolId:t.toString(),tokenOutDenom:n,shareInAmount:i,tokenOutMinAmount:r}),fromAmino:({sender:e,poolId:t,tokenOutDenom:n,shareInAmount:i,tokenOutMinAmount:r})=>({sender:e,poolId:Do.Long.fromString(t),tokenOutDenom:n,shareInAmount:i,tokenOutMinAmount:r})}}});var E2=L(Yu=>{"use strict";B();R();Object.defineProperty(Yu,"__esModule",{value:!0});Yu.PoolManagerAminoConverter=void 0;var Si=Pl();Yu.PoolManagerAminoConverter={"/osmosis.poolmanager.v1beta1.MsgSwapExactAmountIn":{aminoType:"osmosis/poolmanager/swap-exact-amount-in",toAmino:Si.MsgSwapExactAmountIn.toAmino,fromAmino:Si.MsgSwapExactAmountIn.fromAmino},"/osmosis.poolmanager.v1beta1.MsgSwapExactAmountOut":{aminoType:"osmosis/poolmanager/swap-exact-amount-out",toAmino:Si.MsgSwapExactAmountOut.toAmino,fromAmino:Si.MsgSwapExactAmountOut.fromAmino},"/osmosis.poolmanager.v1beta1.MsgSplitRouteSwapExactAmountIn":{aminoType:"osmosis/poolmanager/split-amount-in",toAmino:Si.MsgSplitRouteSwapExactAmountIn.toAmino,fromAmino:Si.MsgSplitRouteSwapExactAmountIn.fromAmino},"/osmosis.poolmanager.v1beta1.MsgSplitRouteSwapExactAmountOut":{aminoType:"osmosis/poolmanager/split-amount-out",toAmino:Si.MsgSplitRouteSwapExactAmountOut.toAmino,fromAmino:Si.MsgSplitRouteSwapExactAmountOut.fromAmino},"/osmosis.poolmanager.v1beta1.MsgSetDenomPairTakerFee":{aminoType:"osmosis/poolmanager/set-denom-pair-taker-fee",toAmino:Si.MsgSetDenomPairTakerFee.toAmino,fromAmino:Si.MsgSetDenomPairTakerFee.fromAmino}}});var T2=L(Xu=>{"use strict";B();R();Object.defineProperty(Xu,"__esModule",{value:!0});Xu.LockupAminoConverter=void 0;var $r=bm();Xu.LockupAminoConverter={"/osmosis.lockup.MsgLockTokens":{aminoType:"osmosis/lockup/lock-tokens",toAmino:$r.MsgLockTokens.toAmino,fromAmino:$r.MsgLockTokens.fromAmino},"/osmosis.lockup.MsgBeginUnlockingAll":{aminoType:"osmosis/lockup/begin-unlock-tokens",toAmino:$r.MsgBeginUnlockingAll.toAmino,fromAmino:$r.MsgBeginUnlockingAll.fromAmino},"/osmosis.lockup.MsgBeginUnlocking":{aminoType:"osmosis/lockup/begin-unlock-period-lock",toAmino:$r.MsgBeginUnlocking.toAmino,fromAmino:$r.MsgBeginUnlocking.fromAmino},"/osmosis.lockup.MsgExtendLockup":{aminoType:"osmosis/lockup/extend-lockup",toAmino:$r.MsgExtendLockup.toAmino,fromAmino:$r.MsgExtendLockup.fromAmino},"/osmosis.lockup.MsgForceUnlock":{aminoType:"osmosis/lockup/force-unlock-tokens",toAmino:$r.MsgForceUnlock.toAmino,fromAmino:$r.MsgForceUnlock.fromAmino},"/osmosis.lockup.MsgSetRewardReceiverAddress":{aminoType:"osmosis/lockup/set-reward-receiver-address",toAmino:$r.MsgSetRewardReceiverAddress.toAmino,fromAmino:$r.MsgSetRewardReceiverAddress.fromAmino}}});var O2=L(Qu=>{"use strict";B();R();Object.defineProperty(Qu,"__esModule",{value:!0});Qu.SuperfluidAminoConverter=void 0;var kn=qm();Qu.SuperfluidAminoConverter={"/osmosis.superfluid.MsgSuperfluidDelegate":{aminoType:"osmosis/superfluid-delegate",toAmino:kn.MsgSuperfluidDelegate.toAmino,fromAmino:kn.MsgSuperfluidDelegate.fromAmino},"/osmosis.superfluid.MsgSuperfluidUndelegate":{aminoType:"osmosis/superfluid-undelegate",toAmino:kn.MsgSuperfluidUndelegate.toAmino,fromAmino:kn.MsgSuperfluidUndelegate.fromAmino},"/osmosis.superfluid.MsgSuperfluidUnbondLock":{aminoType:"osmosis/superfluid-unbond-lock",toAmino:kn.MsgSuperfluidUnbondLock.toAmino,fromAmino:kn.MsgSuperfluidUnbondLock.fromAmino},"/osmosis.superfluid.MsgSuperfluidUndelegateAndUnbondLock":{aminoType:"osmosis/superfluid-undelegate-and-unbond-lock",toAmino:kn.MsgSuperfluidUndelegateAndUnbondLock.toAmino,fromAmino:kn.MsgSuperfluidUndelegateAndUnbondLock.fromAmino},"/osmosis.superfluid.MsgLockAndSuperfluidDelegate":{aminoType:"osmosis/lock-and-superfluid-delegate",toAmino:kn.MsgLockAndSuperfluidDelegate.toAmino,fromAmino:kn.MsgLockAndSuperfluidDelegate.fromAmino},"/osmosis.superfluid.MsgCreateFullRangePositionAndSuperfluidDelegate":{aminoType:"osmosis/full-range-and-sf-delegate",toAmino:kn.MsgCreateFullRangePositionAndSuperfluidDelegate.toAmino,fromAmino:kn.MsgCreateFullRangePositionAndSuperfluidDelegate.fromAmino},"/osmosis.superfluid.MsgUnPoolWhitelistedPool":{aminoType:"osmosis/unpool-whitelisted-pool",toAmino:kn.MsgUnPoolWhitelistedPool.toAmino,fromAmino:kn.MsgUnPoolWhitelistedPool.fromAmino},"/osmosis.superfluid.MsgUnlockAndMigrateSharesToFullRangeConcentratedPosition":{aminoType:"osmosis/unlock-and-migrate",toAmino:kn.MsgUnlockAndMigrateSharesToFullRangeConcentratedPosition.toAmino,fromAmino:kn.MsgUnlockAndMigrateSharesToFullRangeConcentratedPosition.fromAmino},"/osmosis.superfluid.MsgAddToConcentratedLiquiditySuperfluidPosition":{aminoType:"osmosis/add-to-cl-superfluid-position",toAmino:kn.MsgAddToConcentratedLiquiditySuperfluidPosition.toAmino,fromAmino:kn.MsgAddToConcentratedLiquiditySuperfluidPosition.fromAmino},"/osmosis.superfluid.MsgUnbondConvertAndStake":{aminoType:"osmosis/unbond-convert-and-stake",toAmino:kn.MsgUnbondConvertAndStake.toAmino,fromAmino:kn.MsgUnbondConvertAndStake.fromAmino}}});var D2=L(ju=>{"use strict";B();R();Object.defineProperty(ju,"__esModule",{value:!0});ju.TokenFactoryAminoConverter=void 0;var pr=Yl();ju.TokenFactoryAminoConverter={"/osmosis.tokenfactory.v1beta1.MsgCreateDenom":{aminoType:"osmosis/tokenfactory/create-denom",toAmino:pr.MsgCreateDenom.toAmino,fromAmino:pr.MsgCreateDenom.fromAmino},"/osmosis.tokenfactory.v1beta1.MsgMint":{aminoType:"osmosis/tokenfactory/mint",toAmino:pr.MsgMint.toAmino,fromAmino:pr.MsgMint.fromAmino},"/osmosis.tokenfactory.v1beta1.MsgBurn":{aminoType:"osmosis/tokenfactory/burn",toAmino:pr.MsgBurn.toAmino,fromAmino:pr.MsgBurn.fromAmino},"/osmosis.tokenfactory.v1beta1.MsgChangeAdmin":{aminoType:"osmosis/tokenfactory/change-admin",toAmino:pr.MsgChangeAdmin.toAmino,fromAmino:pr.MsgChangeAdmin.fromAmino},"/osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata":{aminoType:"osmosis/tokenfactory/set-denom-metadata",toAmino:pr.MsgSetDenomMetadata.toAmino,fromAmino:pr.MsgSetDenomMetadata.fromAmino},"/osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHook":{aminoType:"osmosis/tokenfactory/set-bef-send-hook",toAmino:pr.MsgSetBeforeSendHook.toAmino,fromAmino:pr.MsgSetBeforeSendHook.fromAmino},"/osmosis.tokenfactory.v1beta1.MsgForceTransfer":{aminoType:"osmosis/tokenfactory/force-transfer",toAmino:pr.MsgForceTransfer.toAmino,fromAmino:pr.MsgForceTransfer.fromAmino}}});var N2=L(ef=>{"use strict";B();R();Object.defineProperty(ef,"__esModule",{value:!0});ef.OsmosisAminoConverters=void 0;var H4=C2(),K4=E2(),$4=T2(),W4=O2(),J4=D2();ef.OsmosisAminoConverters={...H4.GammAminoConverters,...$4.LockupAminoConverter,...K4.PoolManagerAminoConverter,...W4.SuperfluidAminoConverter,...J4.TokenFactoryAminoConverter}});var q2=L(No=>{"use strict";B();R();var z4=No&&No.__createBinding||(Object.create?function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]}),L2=No&&No.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&z4(t,e,n)};Object.defineProperty(No,"__esModule",{value:!0});L2(R2(),No);L2(N2(),No)});var F2=L(ka=>{"use strict";B();R();Object.defineProperty(ka,"__esModule",{value:!0});ka.fromAscii=ka.toAscii=void 0;function Z4(e){let t=n=>n.split("").map(i=>{let r=i.charCodeAt(0);if(r<32||r>126)throw new Error("Cannot encode character that is out of printable ASCII range: "+r);return r});return Uint8Array.from(t(e))}ka.toAscii=Z4;function V4(e){return(n=>n.map(i=>{if(i<32||i>126)throw new Error("Cannot decode character that is out of printable ASCII range: "+i);return String.fromCharCode(i)}))(Array.from(e)).join("")}ka.fromAscii=V4});var $2=L(tf=>{"use strict";B();R();tf.byteLength=Y4;tf.toByteArray=Q4;tf.fromByteArray=t8;var _i=[],Wr=[],G4=typeof Uint8Array<"u"?Uint8Array:Array,Fm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Cs=0,H2=Fm.length;Cs<H2;++Cs)_i[Cs]=Fm[Cs],Wr[Fm.charCodeAt(Cs)]=Cs;var Cs,H2;Wr["-".charCodeAt(0)]=62;Wr["_".charCodeAt(0)]=63;function K2(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");n===-1&&(n=t);var i=n===t?0:4-n%4;return[n,i]}function Y4(e){var t=K2(e),n=t[0],i=t[1];return(n+i)*3/4-i}function X4(e,t,n){return(t+n)*3/4-n}function Q4(e){var t,n=K2(e),i=n[0],r=n[1],o=new G4(X4(e,i,r)),f=0,c=r>0?i-4:i,g;for(g=0;g<c;g+=4)t=Wr[e.charCodeAt(g)]<<18|Wr[e.charCodeAt(g+1)]<<12|Wr[e.charCodeAt(g+2)]<<6|Wr[e.charCodeAt(g+3)],o[f++]=t>>16&255,o[f++]=t>>8&255,o[f++]=t&255;return r===2&&(t=Wr[e.charCodeAt(g)]<<2|Wr[e.charCodeAt(g+1)]>>4,o[f++]=t&255),r===1&&(t=Wr[e.charCodeAt(g)]<<10|Wr[e.charCodeAt(g+1)]<<4|Wr[e.charCodeAt(g+2)]>>2,o[f++]=t>>8&255,o[f++]=t&255),o}function j4(e){return _i[e>>18&63]+_i[e>>12&63]+_i[e>>6&63]+_i[e&63]}function e8(e,t,n){for(var i,r=[],o=t;o<n;o+=3)i=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(e[o+2]&255),r.push(j4(i));return r.join("")}function t8(e){for(var t,n=e.length,i=n%3,r=[],o=16383,f=0,c=n-i;f<c;f+=o)r.push(e8(e,f,f+o>c?c:f+o));return i===1?(t=e[n-1],r.push(_i[t>>2]+_i[t<<4&63]+"==")):i===2&&(t=(e[n-2]<<8)+e[n-1],r.push(_i[t>>10]+_i[t>>4&63]+_i[t<<2&63]+"=")),r.join("")}});var J2=L(Jr=>{"use strict";B();R();var n8=Jr&&Jr.__createBinding||(Object.create?function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]}),r8=Jr&&Jr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i8=Jr&&Jr.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&n8(t,e,n);return r8(t,e),t};Object.defineProperty(Jr,"__esModule",{value:!0});Jr.fromBase64=Jr.toBase64=void 0;var W2=i8($2());function o8(e){return W2.fromByteArray(e)}Jr.toBase64=o8;function s8(e){if(!e.match(/^[a-zA-Z0-9+/]*={0,2}$/))throw new Error("Invalid base64 string format");return W2.toByteArray(e)}Jr.fromBase64=s8});var G2=L((U9,V2)=>{"use strict";B();R();var rf="qpzry9x8gf2tvdw0s3jn54khce6mua7l",Hm={};for(Cd=0;Cd<rf.length;Cd++){if(nf=rf.charAt(Cd),Hm[nf]!==void 0)throw new TypeError(nf+" is ambiguous");Hm[nf]=Cd}var nf,Cd;function Sa(e){var t=e>>25;return(e&33554431)<<5^-(t>>0&1)&996825010^-(t>>1&1)&642813549^-(t>>2&1)&513874426^-(t>>3&1)&1027748829^-(t>>4&1)&705979059}function z2(e){for(var t=1,n=0;n<e.length;++n){var i=e.charCodeAt(n);if(i<33||i>126)return"Invalid prefix ("+e+")";t=Sa(t)^i>>5}for(t=Sa(t),n=0;n<e.length;++n){var r=e.charCodeAt(n);t=Sa(t)^r&31}return t}function a8(e,t,n){if(n=n||90,e.length+7+t.length>n)throw new TypeError("Exceeds length limit");e=e.toLowerCase();var i=z2(e);if(typeof i=="string")throw new Error(i);for(var r=e+"1",o=0;o<t.length;++o){var f=t[o];if(f>>5!==0)throw new Error("Non 5-bit word");i=Sa(i)^f,r+=rf.charAt(f)}for(o=0;o<6;++o)i=Sa(i);for(i^=1,o=0;o<6;++o){var c=i>>(5-o)*5&31;r+=rf.charAt(c)}return r}function Z2(e,t){if(t=t||90,e.length<8)return e+" too short";if(e.length>t)return"Exceeds length limit";var n=e.toLowerCase(),i=e.toUpperCase();if(e!==n&&e!==i)return"Mixed-case string "+e;e=n;var r=e.lastIndexOf("1");if(r===-1)return"No separator character for "+e;if(r===0)return"Missing prefix for "+e;var o=e.slice(0,r),f=e.slice(r+1);if(f.length<6)return"Data too short";var c=z2(o);if(typeof c=="string")return c;for(var g=[],A=0;A<f.length;++A){var w=f.charAt(A),M=Hm[w];if(M===void 0)return"Unknown character "+w;c=Sa(c)^M,!(A+6>=f.length)&&g.push(M)}return c!==1?"Invalid checksum for "+e:{prefix:o,words:g}}function d8(){var e=Z2.apply(null,arguments);if(typeof e=="object")return e}function u8(e){var t=Z2.apply(null,arguments);if(typeof t=="object")return t;throw new Error(t)}function of(e,t,n,i){for(var r=0,o=0,f=(1<<n)-1,c=[],g=0;g<e.length;++g)for(r=r<<t|e[g],o+=t;o>=n;)o-=n,c.push(r>>o&f);if(i)o>0&&c.push(r<<n-o&f);else{if(o>=t)return"Excess padding";if(r<<n-o&f)return"Non-zero padding"}return c}function f8(e){var t=of(e,8,5,!0);if(Array.isArray(t))return t}function c8(e){var t=of(e,8,5,!0);if(Array.isArray(t))return t;throw new Error(t)}function l8(e){var t=of(e,5,8,!1);if(Array.isArray(t))return t}function m8(e){var t=of(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}V2.exports={decodeUnsafe:d8,decode:u8,encode:a8,toWordsUnsafe:f8,toWords:c8,fromWordsUnsafe:l8,fromWords:m8}});var Q2=L(hr=>{"use strict";B();R();var p8=hr&&hr.__createBinding||(Object.create?function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]}),h8=hr&&hr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),g8=hr&&hr.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&p8(t,e,n);return h8(t,e),t};Object.defineProperty(hr,"__esModule",{value:!0});hr.normalizeBech32=hr.fromBech32=hr.toBech32=void 0;var sf=g8(G2());function Y2(e,t,n){return sf.encode(e,sf.toWords(t),n)}hr.toBech32=Y2;function X2(e,t=1/0){let n=sf.decode(e,t);return{prefix:n.prefix,data:new Uint8Array(sf.fromWords(n.words))}}hr.fromBech32=X2;function y8(e){let{prefix:t,data:n}=X2(e);return Y2(t,n)}hr.normalizeBech32=y8});var j2=L(_a=>{"use strict";B();R();Object.defineProperty(_a,"__esModule",{value:!0});_a.fromHex=_a.toHex=void 0;function b8(e){let t="";for(let n of e)t+=("0"+n.toString(16)).slice(-2);return t}_a.toHex=b8;function v8(e){if(e.length%2!==0)throw new Error("hex string length must be a multiple of 2");let t=new Uint8Array(e.length/2);for(let n=0;n<t.length;n++){let i=2*n,r=e.slice(i,i+2);if(!r.match(/[0-9a-f]{2}/i))throw new Error("hex string contains invalid characters");t[n]=parseInt(r,16)}return t}_a.fromHex=v8});var ev=L(xa=>{"use strict";B();R();Object.defineProperty(xa,"__esModule",{value:!0});xa.toRfc3339=xa.fromRfc3339=void 0;var A8=/^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2}):(\d{2})(\.\d{1,9})?((?:[+-]\d{2}:\d{2})|Z)$/;function Ia(e,t=2){return e.toString().padStart(t,"0")}function M8(e){let t=A8.exec(e);if(!t)throw new Error("Date string is not in RFC3339 format");let n=+t[1],i=+t[2],r=+t[3],o=+t[4],f=+t[5],c=+t[6],g=t[7]?Math.floor(+t[7]*1e3):0,A,w,M;t[8]==="Z"?(A=1,w=0,M=0):(A=t[8].substring(0,1)==="-"?-1:1,w=+t[8].substring(1,3),M=+t[8].substring(4,6));let P=A*(w*60+M)*60,x=new Date;return x.setUTCFullYear(n,i-1,r),x.setUTCHours(o,f,c,g),new Date(x.getTime()-P*1e3)}xa.fromRfc3339=M8;function w8(e){let t=e.getUTCFullYear(),n=Ia(e.getUTCMonth()+1),i=Ia(e.getUTCDate()),r=Ia(e.getUTCHours()),o=Ia(e.getUTCMinutes()),f=Ia(e.getUTCSeconds()),c=Ia(e.getUTCMilliseconds(),3);return`${t}-${n}-${i}T${r}:${o}:${f}.${c}Z`}xa.toRfc3339=w8});var tv=L(Pa=>{"use strict";B();R();Object.defineProperty(Pa,"__esModule",{value:!0});Pa.fromUtf8=Pa.toUtf8=void 0;function k8(e){return new TextEncoder().encode(e)}Pa.toUtf8=k8;function S8(e,t=!1){let n=!t;return new TextDecoder("utf-8",{fatal:n}).decode(e)}Pa.fromUtf8=S8});var $m=L(Dt=>{"use strict";B();R();Object.defineProperty(Dt,"__esModule",{value:!0});Dt.toUtf8=Dt.fromUtf8=Dt.toRfc3339=Dt.fromRfc3339=Dt.toHex=Dt.fromHex=Dt.toBech32=Dt.normalizeBech32=Dt.fromBech32=Dt.toBase64=Dt.fromBase64=Dt.toAscii=Dt.fromAscii=void 0;var nv=F2();Object.defineProperty(Dt,"fromAscii",{enumerable:!0,get:function(){return nv.fromAscii}});Object.defineProperty(Dt,"toAscii",{enumerable:!0,get:function(){return nv.toAscii}});var rv=J2();Object.defineProperty(Dt,"fromBase64",{enumerable:!0,get:function(){return rv.fromBase64}});Object.defineProperty(Dt,"toBase64",{enumerable:!0,get:function(){return rv.toBase64}});var Km=Q2();Object.defineProperty(Dt,"fromBech32",{enumerable:!0,get:function(){return Km.fromBech32}});Object.defineProperty(Dt,"normalizeBech32",{enumerable:!0,get:function(){return Km.normalizeBech32}});Object.defineProperty(Dt,"toBech32",{enumerable:!0,get:function(){return Km.toBech32}});var iv=j2();Object.defineProperty(Dt,"fromHex",{enumerable:!0,get:function(){return iv.fromHex}});Object.defineProperty(Dt,"toHex",{enumerable:!0,get:function(){return iv.toHex}});var ov=ev();Object.defineProperty(Dt,"fromRfc3339",{enumerable:!0,get:function(){return ov.fromRfc3339}});Object.defineProperty(Dt,"toRfc3339",{enumerable:!0,get:function(){return ov.toRfc3339}});var sv=tv();Object.defineProperty(Dt,"fromUtf8",{enumerable:!0,get:function(){return sv.fromUtf8}});Object.defineProperty(Dt,"toUtf8",{enumerable:!0,get:function(){return sv.toUtf8}})});var dv=L(H=>{"use strict";B();R();Object.defineProperty(H,"__esModule",{value:!0});H.Model=H.AbsoluteTxPosition=H.ContractCodeHistoryEntry=H.ContractInfo=H.CodeInfo=H.Params=H.AccessConfig=H.AccessTypeParam=H.contractCodeHistoryOperationTypeToJSON=H.contractCodeHistoryOperationTypeFromJSON=H.ContractCodeHistoryOperationTypeAmino=H.ContractCodeHistoryOperationTypeSDKType=H.ContractCodeHistoryOperationType=H.accessTypeToJSON=H.accessTypeFromJSON=H.AccessTypeAmino=H.AccessTypeSDKType=H.AccessType=void 0;var Kn=Ma(),tn=er(),av=$m(),Sr;(function(e){e[e.ACCESS_TYPE_UNSPECIFIED=0]="ACCESS_TYPE_UNSPECIFIED",e[e.ACCESS_TYPE_NOBODY=1]="ACCESS_TYPE_NOBODY",e[e.ACCESS_TYPE_EVERYBODY=3]="ACCESS_TYPE_EVERYBODY",e[e.ACCESS_TYPE_ANY_OF_ADDRESSES=4]="ACCESS_TYPE_ANY_OF_ADDRESSES",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(Sr=H.AccessType||(H.AccessType={}));H.AccessTypeSDKType=Sr;H.AccessTypeAmino=Sr;function _8(e){switch(e){case 0:case"ACCESS_TYPE_UNSPECIFIED":return Sr.ACCESS_TYPE_UNSPECIFIED;case 1:case"ACCESS_TYPE_NOBODY":return Sr.ACCESS_TYPE_NOBODY;case 3:case"ACCESS_TYPE_EVERYBODY":return Sr.ACCESS_TYPE_EVERYBODY;case 4:case"ACCESS_TYPE_ANY_OF_ADDRESSES":return Sr.ACCESS_TYPE_ANY_OF_ADDRESSES;case-1:case"UNRECOGNIZED":default:return Sr.UNRECOGNIZED}}H.accessTypeFromJSON=_8;function I8(e){switch(e){case Sr.ACCESS_TYPE_UNSPECIFIED:return"ACCESS_TYPE_UNSPECIFIED";case Sr.ACCESS_TYPE_NOBODY:return"ACCESS_TYPE_NOBODY";case Sr.ACCESS_TYPE_EVERYBODY:return"ACCESS_TYPE_EVERYBODY";case Sr.ACCESS_TYPE_ANY_OF_ADDRESSES:return"ACCESS_TYPE_ANY_OF_ADDRESSES";case Sr.UNRECOGNIZED:default:return"UNRECOGNIZED"}}H.accessTypeToJSON=I8;var _r;(function(e){e[e.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED=0]="CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED",e[e.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT=1]="CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT",e[e.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE=2]="CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE",e[e.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS=3]="CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(_r=H.ContractCodeHistoryOperationType||(H.ContractCodeHistoryOperationType={}));H.ContractCodeHistoryOperationTypeSDKType=_r;H.ContractCodeHistoryOperationTypeAmino=_r;function x8(e){switch(e){case 0:case"CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED":return _r.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED;case 1:case"CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT":return _r.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT;case 2:case"CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE":return _r.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE;case 3:case"CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS":return _r.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS;case-1:case"UNRECOGNIZED":default:return _r.UNRECOGNIZED}}H.contractCodeHistoryOperationTypeFromJSON=x8;function P8(e){switch(e){case _r.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED:return"CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED";case _r.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT:return"CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT";case _r.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE:return"CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE";case _r.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS:return"CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS";case _r.UNRECOGNIZED:default:return"UNRECOGNIZED"}}H.contractCodeHistoryOperationTypeToJSON=P8;function Wm(){return{value:0}}H.AccessTypeParam={typeUrl:"/cosmwasm.wasm.v1.AccessTypeParam",aminoType:"wasm/AccessTypeParam",is(e){return e&&(e.$typeUrl===H.AccessTypeParam.typeUrl||(0,Kn.isSet)(e.value))},isSDK(e){return e&&(e.$typeUrl===H.AccessTypeParam.typeUrl||(0,Kn.isSet)(e.value))},isAmino(e){return e&&(e.$typeUrl===H.AccessTypeParam.typeUrl||(0,Kn.isSet)(e.value))},encode(e,t=tn.BinaryWriter.create()){return e.value!==0&&t.uint32(8).int32(e.value),t},decode(e,t){let n=e instanceof tn.BinaryReader?e:new tn.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Wm();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.value=n.int32();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=Wm();return t.value=e.value??0,t},fromAmino(e){let t=Wm();return e.value!==void 0&&e.value!==null&&(t.value=e.value),t},toAmino(e){let t={};return t.value=e.value===0?void 0:e.value,t},fromAminoMsg(e){return H.AccessTypeParam.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/AccessTypeParam",value:H.AccessTypeParam.toAmino(e)}},fromProtoMsg(e){return H.AccessTypeParam.decode(e.value)},toProto(e){return H.AccessTypeParam.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.AccessTypeParam",value:H.AccessTypeParam.encode(e).finish()}}};function Jm(){return{permission:0,addresses:[]}}H.AccessConfig={typeUrl:"/cosmwasm.wasm.v1.AccessConfig",aminoType:"wasm/AccessConfig",is(e){return e&&(e.$typeUrl===H.AccessConfig.typeUrl||(0,Kn.isSet)(e.permission)&&Array.isArray(e.addresses)&&(!e.addresses.length||typeof e.addresses[0]=="string"))},isSDK(e){return e&&(e.$typeUrl===H.AccessConfig.typeUrl||(0,Kn.isSet)(e.permission)&&Array.isArray(e.addresses)&&(!e.addresses.length||typeof e.addresses[0]=="string"))},isAmino(e){return e&&(e.$typeUrl===H.AccessConfig.typeUrl||(0,Kn.isSet)(e.permission)&&Array.isArray(e.addresses)&&(!e.addresses.length||typeof e.addresses[0]=="string"))},encode(e,t=tn.BinaryWriter.create()){e.permission!==0&&t.uint32(8).int32(e.permission);for(let n of e.addresses)t.uint32(26).string(n);return t},decode(e,t){let n=e instanceof tn.BinaryReader?e:new tn.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Jm();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.permission=n.int32();break;case 3:r.addresses.push(n.string());break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=Jm();return t.permission=e.permission??0,t.addresses=e.addresses?.map(n=>n)||[],t},fromAmino(e){let t=Jm();return e.permission!==void 0&&e.permission!==null&&(t.permission=e.permission),t.addresses=e.addresses?.map(n=>n)||[],t},toAmino(e){let t={};return t.permission=e.permission===0?void 0:e.permission,e.addresses?t.addresses=e.addresses.map(n=>n):t.addresses=e.addresses,t},fromAminoMsg(e){return H.AccessConfig.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/AccessConfig",value:H.AccessConfig.toAmino(e)}},fromProtoMsg(e){return H.AccessConfig.decode(e.value)},toProto(e){return H.AccessConfig.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.AccessConfig",value:H.AccessConfig.encode(e).finish()}}};function zm(){return{codeUploadAccess:H.AccessConfig.fromPartial({}),instantiateDefaultPermission:0}}H.Params={typeUrl:"/cosmwasm.wasm.v1.Params",aminoType:"wasm/Params",is(e){return e&&(e.$typeUrl===H.Params.typeUrl||H.AccessConfig.is(e.codeUploadAccess)&&(0,Kn.isSet)(e.instantiateDefaultPermission))},isSDK(e){return e&&(e.$typeUrl===H.Params.typeUrl||H.AccessConfig.isSDK(e.code_upload_access)&&(0,Kn.isSet)(e.instantiate_default_permission))},isAmino(e){return e&&(e.$typeUrl===H.Params.typeUrl||H.AccessConfig.isAmino(e.code_upload_access)&&(0,Kn.isSet)(e.instantiate_default_permission))},encode(e,t=tn.BinaryWriter.create()){return e.codeUploadAccess!==void 0&&H.AccessConfig.encode(e.codeUploadAccess,t.uint32(10).fork()).ldelim(),e.instantiateDefaultPermission!==0&&t.uint32(16).int32(e.instantiateDefaultPermission),t},decode(e,t){let n=e instanceof tn.BinaryReader?e:new tn.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=zm();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.codeUploadAccess=H.AccessConfig.decode(n,n.uint32());break;case 2:r.instantiateDefaultPermission=n.int32();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=zm();return t.codeUploadAccess=e.codeUploadAccess!==void 0&&e.codeUploadAccess!==null?H.AccessConfig.fromPartial(e.codeUploadAccess):void 0,t.instantiateDefaultPermission=e.instantiateDefaultPermission??0,t},fromAmino(e){let t=zm();return e.code_upload_access!==void 0&&e.code_upload_access!==null&&(t.codeUploadAccess=H.AccessConfig.fromAmino(e.code_upload_access)),e.instantiate_default_permission!==void 0&&e.instantiate_default_permission!==null&&(t.instantiateDefaultPermission=e.instantiate_default_permission),t},toAmino(e){let t={};return t.code_upload_access=e.codeUploadAccess?H.AccessConfig.toAmino(e.codeUploadAccess):H.AccessConfig.toAmino(H.AccessConfig.fromPartial({})),t.instantiate_default_permission=e.instantiateDefaultPermission===0?void 0:e.instantiateDefaultPermission,t},fromAminoMsg(e){return H.Params.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/Params",value:H.Params.toAmino(e)}},fromProtoMsg(e){return H.Params.decode(e.value)},toProto(e){return H.Params.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.Params",value:H.Params.encode(e).finish()}}};function Zm(){return{codeHash:new Uint8Array,creator:"",instantiateConfig:H.AccessConfig.fromPartial({})}}H.CodeInfo={typeUrl:"/cosmwasm.wasm.v1.CodeInfo",aminoType:"wasm/CodeInfo",is(e){return e&&(e.$typeUrl===H.CodeInfo.typeUrl||(e.codeHash instanceof Uint8Array||typeof e.codeHash=="string")&&typeof e.creator=="string"&&H.AccessConfig.is(e.instantiateConfig))},isSDK(e){return e&&(e.$typeUrl===H.CodeInfo.typeUrl||(e.code_hash instanceof Uint8Array||typeof e.code_hash=="string")&&typeof e.creator=="string"&&H.AccessConfig.isSDK(e.instantiate_config))},isAmino(e){return e&&(e.$typeUrl===H.CodeInfo.typeUrl||(e.code_hash instanceof Uint8Array||typeof e.code_hash=="string")&&typeof e.creator=="string"&&H.AccessConfig.isAmino(e.instantiate_config))},encode(e,t=tn.BinaryWriter.create()){return e.codeHash.length!==0&&t.uint32(10).bytes(e.codeHash),e.creator!==""&&t.uint32(18).string(e.creator),e.instantiateConfig!==void 0&&H.AccessConfig.encode(e.instantiateConfig,t.uint32(42).fork()).ldelim(),t},decode(e,t){let n=e instanceof tn.BinaryReader?e:new tn.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Zm();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.codeHash=n.bytes();break;case 2:r.creator=n.string();break;case 5:r.instantiateConfig=H.AccessConfig.decode(n,n.uint32());break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=Zm();return t.codeHash=e.codeHash??new Uint8Array,t.creator=e.creator??"",t.instantiateConfig=e.instantiateConfig!==void 0&&e.instantiateConfig!==null?H.AccessConfig.fromPartial(e.instantiateConfig):void 0,t},fromAmino(e){let t=Zm();return e.code_hash!==void 0&&e.code_hash!==null&&(t.codeHash=(0,Kn.bytesFromBase64)(e.code_hash)),e.creator!==void 0&&e.creator!==null&&(t.creator=e.creator),e.instantiate_config!==void 0&&e.instantiate_config!==null&&(t.instantiateConfig=H.AccessConfig.fromAmino(e.instantiate_config)),t},toAmino(e){let t={};return t.code_hash=e.codeHash?(0,Kn.base64FromBytes)(e.codeHash):void 0,t.creator=e.creator===""?void 0:e.creator,t.instantiate_config=e.instantiateConfig?H.AccessConfig.toAmino(e.instantiateConfig):H.AccessConfig.toAmino(H.AccessConfig.fromPartial({})),t},fromAminoMsg(e){return H.CodeInfo.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/CodeInfo",value:H.CodeInfo.toAmino(e)}},fromProtoMsg(e){return H.CodeInfo.decode(e.value)},toProto(e){return H.CodeInfo.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.CodeInfo",value:H.CodeInfo.encode(e).finish()}}};function Vm(){return{codeId:BigInt(0),creator:"",admin:"",label:"",created:void 0,ibcPortId:"",extension:void 0}}H.ContractInfo={typeUrl:"/cosmwasm.wasm.v1.ContractInfo",aminoType:"wasm/ContractInfo",is(e){return e&&(e.$typeUrl===H.ContractInfo.typeUrl||typeof e.codeId=="bigint"&&typeof e.creator=="string"&&typeof e.admin=="string"&&typeof e.label=="string"&&typeof e.ibcPortId=="string")},isSDK(e){return e&&(e.$typeUrl===H.ContractInfo.typeUrl||typeof e.code_id=="bigint"&&typeof e.creator=="string"&&typeof e.admin=="string"&&typeof e.label=="string"&&typeof e.ibc_port_id=="string")},isAmino(e){return e&&(e.$typeUrl===H.ContractInfo.typeUrl||typeof e.code_id=="bigint"&&typeof e.creator=="string"&&typeof e.admin=="string"&&typeof e.label=="string"&&typeof e.ibc_port_id=="string")},encode(e,t=tn.BinaryWriter.create()){return e.codeId!==BigInt(0)&&t.uint32(8).uint64(e.codeId),e.creator!==""&&t.uint32(18).string(e.creator),e.admin!==""&&t.uint32(26).string(e.admin),e.label!==""&&t.uint32(34).string(e.label),e.created!==void 0&&H.AbsoluteTxPosition.encode(e.created,t.uint32(42).fork()).ldelim(),e.ibcPortId!==""&&t.uint32(50).string(e.ibcPortId),e.extension,t},decode(e,t){let n=e instanceof tn.BinaryReader?e:new tn.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Vm();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.codeId=n.uint64();break;case 2:r.creator=n.string();break;case 3:r.admin=n.string();break;case 4:r.label=n.string();break;case 5:r.created=H.AbsoluteTxPosition.decode(n,n.uint32());break;case 6:r.ibcPortId=n.string();break;case 7:break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=Vm();return t.codeId=e.codeId!==void 0&&e.codeId!==null?BigInt(e.codeId.toString()):BigInt(0),t.creator=e.creator??"",t.admin=e.admin??"",t.label=e.label??"",t.created=e.created!==void 0&&e.created!==null?H.AbsoluteTxPosition.fromPartial(e.created):void 0,t.ibcPortId=e.ibcPortId??"",t},fromAmino(e){let t=Vm();return e.code_id!==void 0&&e.code_id!==null&&(t.codeId=BigInt(e.code_id)),e.creator!==void 0&&e.creator!==null&&(t.creator=e.creator),e.admin!==void 0&&e.admin!==null&&(t.admin=e.admin),e.label!==void 0&&e.label!==null&&(t.label=e.label),e.created!==void 0&&e.created!==null&&(t.created=H.AbsoluteTxPosition.fromAmino(e.created)),e.ibc_port_id!==void 0&&e.ibc_port_id!==null&&(t.ibcPortId=e.ibc_port_id),e.extension!==void 0&&e.extension,t},toAmino(e){let t={};return t.code_id=e.codeId!==BigInt(0)?e.codeId.toString():void 0,t.creator=e.creator===""?void 0:e.creator,t.admin=e.admin===""?void 0:e.admin,t.label=e.label===""?void 0:e.label,t.created=e.created?H.AbsoluteTxPosition.toAmino(e.created):void 0,t.ibc_port_id=e.ibcPortId===""?void 0:e.ibcPortId,t},fromAminoMsg(e){return H.ContractInfo.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/ContractInfo",value:H.ContractInfo.toAmino(e)}},fromProtoMsg(e){return H.ContractInfo.decode(e.value)},toProto(e){return H.ContractInfo.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.ContractInfo",value:H.ContractInfo.encode(e).finish()}}};function Gm(){return{operation:0,codeId:BigInt(0),updated:void 0,msg:new Uint8Array}}H.ContractCodeHistoryEntry={typeUrl:"/cosmwasm.wasm.v1.ContractCodeHistoryEntry",aminoType:"wasm/ContractCodeHistoryEntry",is(e){return e&&(e.$typeUrl===H.ContractCodeHistoryEntry.typeUrl||(0,Kn.isSet)(e.operation)&&typeof e.codeId=="bigint"&&(e.msg instanceof Uint8Array||typeof e.msg=="string"))},isSDK(e){return e&&(e.$typeUrl===H.ContractCodeHistoryEntry.typeUrl||(0,Kn.isSet)(e.operation)&&typeof e.code_id=="bigint"&&(e.msg instanceof Uint8Array||typeof e.msg=="string"))},isAmino(e){return e&&(e.$typeUrl===H.ContractCodeHistoryEntry.typeUrl||(0,Kn.isSet)(e.operation)&&typeof e.code_id=="bigint"&&(e.msg instanceof Uint8Array||typeof e.msg=="string"))},encode(e,t=tn.BinaryWriter.create()){return e.operation!==0&&t.uint32(8).int32(e.operation),e.codeId!==BigInt(0)&&t.uint32(16).uint64(e.codeId),e.updated!==void 0&&H.AbsoluteTxPosition.encode(e.updated,t.uint32(26).fork()).ldelim(),e.msg.length!==0&&t.uint32(34).bytes(e.msg),t},decode(e,t){let n=e instanceof tn.BinaryReader?e:new tn.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Gm();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.operation=n.int32();break;case 2:r.codeId=n.uint64();break;case 3:r.updated=H.AbsoluteTxPosition.decode(n,n.uint32());break;case 4:r.msg=n.bytes();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=Gm();return t.operation=e.operation??0,t.codeId=e.codeId!==void 0&&e.codeId!==null?BigInt(e.codeId.toString()):BigInt(0),t.updated=e.updated!==void 0&&e.updated!==null?H.AbsoluteTxPosition.fromPartial(e.updated):void 0,t.msg=e.msg??new Uint8Array,t},fromAmino(e){let t=Gm();return e.operation!==void 0&&e.operation!==null&&(t.operation=e.operation),e.code_id!==void 0&&e.code_id!==null&&(t.codeId=BigInt(e.code_id)),e.updated!==void 0&&e.updated!==null&&(t.updated=H.AbsoluteTxPosition.fromAmino(e.updated)),e.msg!==void 0&&e.msg!==null&&(t.msg=(0,av.toUtf8)(JSON.stringify(e.msg))),t},toAmino(e){let t={};return t.operation=e.operation===0?void 0:e.operation,t.code_id=e.codeId!==BigInt(0)?e.codeId.toString():void 0,t.updated=e.updated?H.AbsoluteTxPosition.toAmino(e.updated):void 0,t.msg=e.msg?JSON.parse((0,av.fromUtf8)(e.msg)):void 0,t},fromAminoMsg(e){return H.ContractCodeHistoryEntry.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/ContractCodeHistoryEntry",value:H.ContractCodeHistoryEntry.toAmino(e)}},fromProtoMsg(e){return H.ContractCodeHistoryEntry.decode(e.value)},toProto(e){return H.ContractCodeHistoryEntry.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.ContractCodeHistoryEntry",value:H.ContractCodeHistoryEntry.encode(e).finish()}}};function Ym(){return{blockHeight:BigInt(0),txIndex:BigInt(0)}}H.AbsoluteTxPosition={typeUrl:"/cosmwasm.wasm.v1.AbsoluteTxPosition",aminoType:"wasm/AbsoluteTxPosition",is(e){return e&&(e.$typeUrl===H.AbsoluteTxPosition.typeUrl||typeof e.blockHeight=="bigint"&&typeof e.txIndex=="bigint")},isSDK(e){return e&&(e.$typeUrl===H.AbsoluteTxPosition.typeUrl||typeof e.block_height=="bigint"&&typeof e.tx_index=="bigint")},isAmino(e){return e&&(e.$typeUrl===H.AbsoluteTxPosition.typeUrl||typeof e.block_height=="bigint"&&typeof e.tx_index=="bigint")},encode(e,t=tn.BinaryWriter.create()){return e.blockHeight!==BigInt(0)&&t.uint32(8).uint64(e.blockHeight),e.txIndex!==BigInt(0)&&t.uint32(16).uint64(e.txIndex),t},decode(e,t){let n=e instanceof tn.BinaryReader?e:new tn.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Ym();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.blockHeight=n.uint64();break;case 2:r.txIndex=n.uint64();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=Ym();return t.blockHeight=e.blockHeight!==void 0&&e.blockHeight!==null?BigInt(e.blockHeight.toString()):BigInt(0),t.txIndex=e.txIndex!==void 0&&e.txIndex!==null?BigInt(e.txIndex.toString()):BigInt(0),t},fromAmino(e){let t=Ym();return e.block_height!==void 0&&e.block_height!==null&&(t.blockHeight=BigInt(e.block_height)),e.tx_index!==void 0&&e.tx_index!==null&&(t.txIndex=BigInt(e.tx_index)),t},toAmino(e){let t={};return t.block_height=e.blockHeight!==BigInt(0)?e.blockHeight.toString():void 0,t.tx_index=e.txIndex!==BigInt(0)?e.txIndex.toString():void 0,t},fromAminoMsg(e){return H.AbsoluteTxPosition.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/AbsoluteTxPosition",value:H.AbsoluteTxPosition.toAmino(e)}},fromProtoMsg(e){return H.AbsoluteTxPosition.decode(e.value)},toProto(e){return H.AbsoluteTxPosition.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.AbsoluteTxPosition",value:H.AbsoluteTxPosition.encode(e).finish()}}};function Xm(){return{key:new Uint8Array,value:new Uint8Array}}H.Model={typeUrl:"/cosmwasm.wasm.v1.Model",aminoType:"wasm/Model",is(e){return e&&(e.$typeUrl===H.Model.typeUrl||(e.key instanceof Uint8Array||typeof e.key=="string")&&(e.value instanceof Uint8Array||typeof e.value=="string"))},isSDK(e){return e&&(e.$typeUrl===H.Model.typeUrl||(e.key instanceof Uint8Array||typeof e.key=="string")&&(e.value instanceof Uint8Array||typeof e.value=="string"))},isAmino(e){return e&&(e.$typeUrl===H.Model.typeUrl||(e.key instanceof Uint8Array||typeof e.key=="string")&&(e.value instanceof Uint8Array||typeof e.value=="string"))},encode(e,t=tn.BinaryWriter.create()){return e.key.length!==0&&t.uint32(10).bytes(e.key),e.value.length!==0&&t.uint32(18).bytes(e.value),t},decode(e,t){let n=e instanceof tn.BinaryReader?e:new tn.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Xm();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.key=n.bytes();break;case 2:r.value=n.bytes();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=Xm();return t.key=e.key??new Uint8Array,t.value=e.value??new Uint8Array,t},fromAmino(e){let t=Xm();return e.key!==void 0&&e.key!==null&&(t.key=(0,Kn.bytesFromBase64)(e.key)),e.value!==void 0&&e.value!==null&&(t.value=(0,Kn.bytesFromBase64)(e.value)),t},toAmino(e){let t={};return t.key=e.key?(0,Kn.base64FromBytes)(e.key):void 0,t.value=e.value?(0,Kn.base64FromBytes)(e.value):void 0,t},fromAminoMsg(e){return H.Model.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/Model",value:H.Model.toAmino(e)}},fromProtoMsg(e){return H.Model.decode(e.value)},toProto(e){return H.Model.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.Model",value:H.Model.encode(e).finish()}}}});var C0=L(S=>{"use strict";B();R();Object.defineProperty(S,"__esModule",{value:!0});S.MsgUpdateContractLabelResponse=S.MsgUpdateContractLabel=S.MsgStoreAndMigrateContractResponse=S.MsgStoreAndMigrateContract=S.MsgRemoveCodeUploadParamsAddressesResponse=S.MsgRemoveCodeUploadParamsAddresses=S.MsgAddCodeUploadParamsAddressesResponse=S.MsgAddCodeUploadParamsAddresses=S.MsgStoreAndInstantiateContractResponse=S.MsgStoreAndInstantiateContract=S.MsgUnpinCodesResponse=S.MsgUnpinCodes=S.MsgPinCodesResponse=S.MsgPinCodes=S.MsgSudoContractResponse=S.MsgSudoContract=S.MsgUpdateParamsResponse=S.MsgUpdateParams=S.MsgUpdateInstantiateConfigResponse=S.MsgUpdateInstantiateConfig=S.MsgClearAdminResponse=S.MsgClearAdmin=S.MsgUpdateAdminResponse=S.MsgUpdateAdmin=S.MsgMigrateContractResponse=S.MsgMigrateContract=S.MsgExecuteContractResponse=S.MsgExecuteContract=S.MsgInstantiateContract2Response=S.MsgInstantiateContract2=S.MsgInstantiateContractResponse=S.MsgInstantiateContract=S.MsgStoreCodeResponse=S.MsgStoreCode=void 0;var Ut=dv(),It=ii(),j=er(),Sn=$m(),ln=Ma();function Qm(){return{sender:"",wasmByteCode:new Uint8Array,instantiatePermission:void 0}}S.MsgStoreCode={typeUrl:"/cosmwasm.wasm.v1.MsgStoreCode",aminoType:"wasm/MsgStoreCode",is(e){return e&&(e.$typeUrl===S.MsgStoreCode.typeUrl||typeof e.sender=="string"&&(e.wasmByteCode instanceof Uint8Array||typeof e.wasmByteCode=="string"))},isSDK(e){return e&&(e.$typeUrl===S.MsgStoreCode.typeUrl||typeof e.sender=="string"&&(e.wasm_byte_code instanceof Uint8Array||typeof e.wasm_byte_code=="string"))},isAmino(e){return e&&(e.$typeUrl===S.MsgStoreCode.typeUrl||typeof e.sender=="string"&&(e.wasm_byte_code instanceof Uint8Array||typeof e.wasm_byte_code=="string"))},encode(e,t=j.BinaryWriter.create()){return e.sender!==""&&t.uint32(10).string(e.sender),e.wasmByteCode.length!==0&&t.uint32(18).bytes(e.wasmByteCode),e.instantiatePermission!==void 0&&Ut.AccessConfig.encode(e.instantiatePermission,t.uint32(42).fork()).ldelim(),t},decode(e,t){let n=e instanceof j.BinaryReader?e:new j.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Qm();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.sender=n.string();break;case 2:r.wasmByteCode=n.bytes();break;case 5:r.instantiatePermission=Ut.AccessConfig.decode(n,n.uint32());break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=Qm();return t.sender=e.sender??"",t.wasmByteCode=e.wasmByteCode??new Uint8Array,t.instantiatePermission=e.instantiatePermission!==void 0&&e.instantiatePermission!==null?Ut.AccessConfig.fromPartial(e.instantiatePermission):void 0,t},fromAmino(e){let t=Qm();return e.sender!==void 0&&e.sender!==null&&(t.sender=e.sender),e.wasm_byte_code!==void 0&&e.wasm_byte_code!==null&&(t.wasmByteCode=(0,Sn.fromBase64)(e.wasm_byte_code)),e.instantiate_permission!==void 0&&e.instantiate_permission!==null&&(t.instantiatePermission=Ut.AccessConfig.fromAmino(e.instantiate_permission)),t},toAmino(e){let t={};return t.sender=e.sender===""?void 0:e.sender,t.wasm_byte_code=e.wasmByteCode?(0,Sn.toBase64)(e.wasmByteCode):void 0,t.instantiate_permission=e.instantiatePermission?Ut.AccessConfig.toAmino(e.instantiatePermission):void 0,t},fromAminoMsg(e){return S.MsgStoreCode.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/MsgStoreCode",value:S.MsgStoreCode.toAmino(e)}},fromProtoMsg(e){return S.MsgStoreCode.decode(e.value)},toProto(e){return S.MsgStoreCode.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.MsgStoreCode",value:S.MsgStoreCode.encode(e).finish()}}};function jm(){return{codeId:BigInt(0),checksum:new Uint8Array}}S.MsgStoreCodeResponse={typeUrl:"/cosmwasm.wasm.v1.MsgStoreCodeResponse",aminoType:"wasm/MsgStoreCodeResponse",is(e){return e&&(e.$typeUrl===S.MsgStoreCodeResponse.typeUrl||typeof e.codeId=="bigint"&&(e.checksum instanceof Uint8Array||typeof e.checksum=="string"))},isSDK(e){return e&&(e.$typeUrl===S.MsgStoreCodeResponse.typeUrl||typeof e.code_id=="bigint"&&(e.checksum instanceof Uint8Array||typeof e.checksum=="string"))},isAmino(e){return e&&(e.$typeUrl===S.MsgStoreCodeResponse.typeUrl||typeof e.code_id=="bigint"&&(e.checksum instanceof Uint8Array||typeof e.checksum=="string"))},encode(e,t=j.BinaryWriter.create()){return e.codeId!==BigInt(0)&&t.uint32(8).uint64(e.codeId),e.checksum.length!==0&&t.uint32(18).bytes(e.checksum),t},decode(e,t){let n=e instanceof j.BinaryReader?e:new j.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=jm();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.codeId=n.uint64();break;case 2:r.checksum=n.bytes();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=jm();return t.codeId=e.codeId!==void 0&&e.codeId!==null?BigInt(e.codeId.toString()):BigInt(0),t.checksum=e.checksum??new Uint8Array,t},fromAmino(e){let t=jm();return e.code_id!==void 0&&e.code_id!==null&&(t.codeId=BigInt(e.code_id)),e.checksum!==void 0&&e.checksum!==null&&(t.checksum=(0,ln.bytesFromBase64)(e.checksum)),t},toAmino(e){let t={};return t.code_id=e.codeId!==BigInt(0)?e.codeId.toString():void 0,t.checksum=e.checksum?(0,ln.base64FromBytes)(e.checksum):void 0,t},fromAminoMsg(e){return S.MsgStoreCodeResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/MsgStoreCodeResponse",value:S.MsgStoreCodeResponse.toAmino(e)}},fromProtoMsg(e){return S.MsgStoreCodeResponse.decode(e.value)},toProto(e){return S.MsgStoreCodeResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.MsgStoreCodeResponse",value:S.MsgStoreCodeResponse.encode(e).finish()}}};function e0(){return{sender:"",admin:"",codeId:BigInt(0),label:"",msg:new Uint8Array,funds:[]}}S.MsgInstantiateContract={typeUrl:"/cosmwasm.wasm.v1.MsgInstantiateContract",aminoType:"wasm/MsgInstantiateContract",is(e){return e&&(e.$typeUrl===S.MsgInstantiateContract.typeUrl||typeof e.sender=="string"&&typeof e.admin=="string"&&typeof e.codeId=="bigint"&&typeof e.label=="string"&&(e.msg instanceof Uint8Array||typeof e.msg=="string")&&Array.isArray(e.funds)&&(!e.funds.length||It.Coin.is(e.funds[0])))},isSDK(e){return e&&(e.$typeUrl===S.MsgInstantiateContract.typeUrl||typeof e.sender=="string"&&typeof e.admin=="string"&&typeof e.code_id=="bigint"&&typeof e.label=="string"&&(e.msg instanceof Uint8Array||typeof e.msg=="string")&&Array.isArray(e.funds)&&(!e.funds.length||It.Coin.isSDK(e.funds[0])))},isAmino(e){return e&&(e.$typeUrl===S.MsgInstantiateContract.typeUrl||typeof e.sender=="string"&&typeof e.admin=="string"&&typeof e.code_id=="bigint"&&typeof e.label=="string"&&(e.msg instanceof Uint8Array||typeof e.msg=="string")&&Array.isArray(e.funds)&&(!e.funds.length||It.Coin.isAmino(e.funds[0])))},encode(e,t=j.BinaryWriter.create()){e.sender!==""&&t.uint32(10).string(e.sender),e.admin!==""&&t.uint32(18).string(e.admin),e.codeId!==BigInt(0)&&t.uint32(24).uint64(e.codeId),e.label!==""&&t.uint32(34).string(e.label),e.msg.length!==0&&t.uint32(42).bytes(e.msg);for(let n of e.funds)It.Coin.encode(n,t.uint32(50).fork()).ldelim();return t},decode(e,t){let n=e instanceof j.BinaryReader?e:new j.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=e0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.sender=n.string();break;case 2:r.admin=n.string();break;case 3:r.codeId=n.uint64();break;case 4:r.label=n.string();break;case 5:r.msg=n.bytes();break;case 6:r.funds.push(It.Coin.decode(n,n.uint32()));break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=e0();return t.sender=e.sender??"",t.admin=e.admin??"",t.codeId=e.codeId!==void 0&&e.codeId!==null?BigInt(e.codeId.toString()):BigInt(0),t.label=e.label??"",t.msg=e.msg??new Uint8Array,t.funds=e.funds?.map(n=>It.Coin.fromPartial(n))||[],t},fromAmino(e){let t=e0();return e.sender!==void 0&&e.sender!==null&&(t.sender=e.sender),e.admin!==void 0&&e.admin!==null&&(t.admin=e.admin),e.code_id!==void 0&&e.code_id!==null&&(t.codeId=BigInt(e.code_id)),e.label!==void 0&&e.label!==null&&(t.label=e.label),e.msg!==void 0&&e.msg!==null&&(t.msg=(0,Sn.toUtf8)(JSON.stringify(e.msg))),t.funds=e.funds?.map(n=>It.Coin.fromAmino(n))||[],t},toAmino(e){let t={};return t.sender=e.sender===""?void 0:e.sender,t.admin=e.admin===""?void 0:e.admin,t.code_id=e.codeId!==BigInt(0)?e.codeId.toString():void 0,t.label=e.label===""?void 0:e.label,t.msg=e.msg?JSON.parse((0,Sn.fromUtf8)(e.msg)):void 0,e.funds?t.funds=e.funds.map(n=>n?It.Coin.toAmino(n):void 0):t.funds=e.funds,t},fromAminoMsg(e){return S.MsgInstantiateContract.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/MsgInstantiateContract",value:S.MsgInstantiateContract.toAmino(e)}},fromProtoMsg(e){return S.MsgInstantiateContract.decode(e.value)},toProto(e){return S.MsgInstantiateContract.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.MsgInstantiateContract",value:S.MsgInstantiateContract.encode(e).finish()}}};function t0(){return{address:"",data:new Uint8Array}}S.MsgInstantiateContractResponse={typeUrl:"/cosmwasm.wasm.v1.MsgInstantiateContractResponse",aminoType:"wasm/MsgInstantiateContractResponse",is(e){return e&&(e.$typeUrl===S.MsgInstantiateContractResponse.typeUrl||typeof e.address=="string"&&(e.data instanceof Uint8Array||typeof e.data=="string"))},isSDK(e){return e&&(e.$typeUrl===S.MsgInstantiateContractResponse.typeUrl||typeof e.address=="string"&&(e.data instanceof Uint8Array||typeof e.data=="string"))},isAmino(e){return e&&(e.$typeUrl===S.MsgInstantiateContractResponse.typeUrl||typeof e.address=="string"&&(e.data instanceof Uint8Array||typeof e.data=="string"))},encode(e,t=j.BinaryWriter.create()){return e.address!==""&&t.uint32(10).string(e.address),e.data.length!==0&&t.uint32(18).bytes(e.data),t},decode(e,t){let n=e instanceof j.BinaryReader?e:new j.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=t0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.address=n.string();break;case 2:r.data=n.bytes();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=t0();return t.address=e.address??"",t.data=e.data??new Uint8Array,t},fromAmino(e){let t=t0();return e.address!==void 0&&e.address!==null&&(t.address=e.address),e.data!==void 0&&e.data!==null&&(t.data=(0,ln.bytesFromBase64)(e.data)),t},toAmino(e){let t={};return t.address=e.address===""?void 0:e.address,t.data=e.data?(0,ln.base64FromBytes)(e.data):void 0,t},fromAminoMsg(e){return S.MsgInstantiateContractResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/MsgInstantiateContractResponse",value:S.MsgInstantiateContractResponse.toAmino(e)}},fromProtoMsg(e){return S.MsgInstantiateContractResponse.decode(e.value)},toProto(e){return S.MsgInstantiateContractResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.MsgInstantiateContractResponse",value:S.MsgInstantiateContractResponse.encode(e).finish()}}};function n0(){return{sender:"",admin:"",codeId:BigInt(0),label:"",msg:new Uint8Array,funds:[],salt:new Uint8Array,fixMsg:!1}}S.MsgInstantiateContract2={typeUrl:"/cosmwasm.wasm.v1.MsgInstantiateContract2",aminoType:"wasm/MsgInstantiateContract2",is(e){return e&&(e.$typeUrl===S.MsgInstantiateContract2.typeUrl||typeof e.sender=="string"&&typeof e.admin=="string"&&typeof e.codeId=="bigint"&&typeof e.label=="string"&&(e.msg instanceof Uint8Array||typeof e.msg=="string")&&Array.isArray(e.funds)&&(!e.funds.length||It.Coin.is(e.funds[0]))&&(e.salt instanceof Uint8Array||typeof e.salt=="string")&&typeof e.fixMsg=="boolean")},isSDK(e){return e&&(e.$typeUrl===S.MsgInstantiateContract2.typeUrl||typeof e.sender=="string"&&typeof e.admin=="string"&&typeof e.code_id=="bigint"&&typeof e.label=="string"&&(e.msg instanceof Uint8Array||typeof e.msg=="string")&&Array.isArray(e.funds)&&(!e.funds.length||It.Coin.isSDK(e.funds[0]))&&(e.salt instanceof Uint8Array||typeof e.salt=="string")&&typeof e.fix_msg=="boolean")},isAmino(e){return e&&(e.$typeUrl===S.MsgInstantiateContract2.typeUrl||typeof e.sender=="string"&&typeof e.admin=="string"&&typeof e.code_id=="bigint"&&typeof e.label=="string"&&(e.msg instanceof Uint8Array||typeof e.msg=="string")&&Array.isArray(e.funds)&&(!e.funds.length||It.Coin.isAmino(e.funds[0]))&&(e.salt instanceof Uint8Array||typeof e.salt=="string")&&typeof e.fix_msg=="boolean")},encode(e,t=j.BinaryWriter.create()){e.sender!==""&&t.uint32(10).string(e.sender),e.admin!==""&&t.uint32(18).string(e.admin),e.codeId!==BigInt(0)&&t.uint32(24).uint64(e.codeId),e.label!==""&&t.uint32(34).string(e.label),e.msg.length!==0&&t.uint32(42).bytes(e.msg);for(let n of e.funds)It.Coin.encode(n,t.uint32(50).fork()).ldelim();return e.salt.length!==0&&t.uint32(58).bytes(e.salt),e.fixMsg===!0&&t.uint32(64).bool(e.fixMsg),t},decode(e,t){let n=e instanceof j.BinaryReader?e:new j.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=n0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.sender=n.string();break;case 2:r.admin=n.string();break;case 3:r.codeId=n.uint64();break;case 4:r.label=n.string();break;case 5:r.msg=n.bytes();break;case 6:r.funds.push(It.Coin.decode(n,n.uint32()));break;case 7:r.salt=n.bytes();break;case 8:r.fixMsg=n.bool();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=n0();return t.sender=e.sender??"",t.admin=e.admin??"",t.codeId=e.codeId!==void 0&&e.codeId!==null?BigInt(e.codeId.toString()):BigInt(0),t.label=e.label??"",t.msg=e.msg??new Uint8Array,t.funds=e.funds?.map(n=>It.Coin.fromPartial(n))||[],t.salt=e.salt??new Uint8Array,t.fixMsg=e.fixMsg??!1,t},fromAmino(e){let t=n0();return e.sender!==void 0&&e.sender!==null&&(t.sender=e.sender),e.admin!==void 0&&e.admin!==null&&(t.admin=e.admin),e.code_id!==void 0&&e.code_id!==null&&(t.codeId=BigInt(e.code_id)),e.label!==void 0&&e.label!==null&&(t.label=e.label),e.msg!==void 0&&e.msg!==null&&(t.msg=(0,Sn.toUtf8)(JSON.stringify(e.msg))),t.funds=e.funds?.map(n=>It.Coin.fromAmino(n))||[],e.salt!==void 0&&e.salt!==null&&(t.salt=(0,ln.bytesFromBase64)(e.salt)),e.fix_msg!==void 0&&e.fix_msg!==null&&(t.fixMsg=e.fix_msg),t},toAmino(e){let t={};return t.sender=e.sender===""?void 0:e.sender,t.admin=e.admin===""?void 0:e.admin,t.code_id=e.codeId!==BigInt(0)?e.codeId.toString():void 0,t.label=e.label===""?void 0:e.label,t.msg=e.msg?JSON.parse((0,Sn.fromUtf8)(e.msg)):void 0,e.funds?t.funds=e.funds.map(n=>n?It.Coin.toAmino(n):void 0):t.funds=e.funds,t.salt=e.salt?(0,ln.base64FromBytes)(e.salt):void 0,t.fix_msg=e.fixMsg===!1?void 0:e.fixMsg,t},fromAminoMsg(e){return S.MsgInstantiateContract2.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/MsgInstantiateContract2",value:S.MsgInstantiateContract2.toAmino(e)}},fromProtoMsg(e){return S.MsgInstantiateContract2.decode(e.value)},toProto(e){return S.MsgInstantiateContract2.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.MsgInstantiateContract2",value:S.MsgInstantiateContract2.encode(e).finish()}}};function r0(){return{address:"",data:new Uint8Array}}S.MsgInstantiateContract2Response={typeUrl:"/cosmwasm.wasm.v1.MsgInstantiateContract2Response",aminoType:"wasm/MsgInstantiateContract2Response",is(e){return e&&(e.$typeUrl===S.MsgInstantiateContract2Response.typeUrl||typeof e.address=="string"&&(e.data instanceof Uint8Array||typeof e.data=="string"))},isSDK(e){return e&&(e.$typeUrl===S.MsgInstantiateContract2Response.typeUrl||typeof e.address=="string"&&(e.data instanceof Uint8Array||typeof e.data=="string"))},isAmino(e){return e&&(e.$typeUrl===S.MsgInstantiateContract2Response.typeUrl||typeof e.address=="string"&&(e.data instanceof Uint8Array||typeof e.data=="string"))},encode(e,t=j.BinaryWriter.create()){return e.address!==""&&t.uint32(10).string(e.address),e.data.length!==0&&t.uint32(18).bytes(e.data),t},decode(e,t){let n=e instanceof j.BinaryReader?e:new j.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=r0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.address=n.string();break;case 2:r.data=n.bytes();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=r0();return t.address=e.address??"",t.data=e.data??new Uint8Array,t},fromAmino(e){let t=r0();return e.address!==void 0&&e.address!==null&&(t.address=e.address),e.data!==void 0&&e.data!==null&&(t.data=(0,ln.bytesFromBase64)(e.data)),t},toAmino(e){let t={};return t.address=e.address===""?void 0:e.address,t.data=e.data?(0,ln.base64FromBytes)(e.data):void 0,t},fromAminoMsg(e){return S.MsgInstantiateContract2Response.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/MsgInstantiateContract2Response",value:S.MsgInstantiateContract2Response.toAmino(e)}},fromProtoMsg(e){return S.MsgInstantiateContract2Response.decode(e.value)},toProto(e){return S.MsgInstantiateContract2Response.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.MsgInstantiateContract2Response",value:S.MsgInstantiateContract2Response.encode(e).finish()}}};function i0(){return{sender:"",contract:"",msg:new Uint8Array,funds:[]}}S.MsgExecuteContract={typeUrl:"/cosmwasm.wasm.v1.MsgExecuteContract",aminoType:"wasm/MsgExecuteContract",is(e){return e&&(e.$typeUrl===S.MsgExecuteContract.typeUrl||typeof e.sender=="string"&&typeof e.contract=="string"&&(e.msg instanceof Uint8Array||typeof e.msg=="string")&&Array.isArray(e.funds)&&(!e.funds.length||It.Coin.is(e.funds[0])))},isSDK(e){return e&&(e.$typeUrl===S.MsgExecuteContract.typeUrl||typeof e.sender=="string"&&typeof e.contract=="string"&&(e.msg instanceof Uint8Array||typeof e.msg=="string")&&Array.isArray(e.funds)&&(!e.funds.length||It.Coin.isSDK(e.funds[0])))},isAmino(e){return e&&(e.$typeUrl===S.MsgExecuteContract.typeUrl||typeof e.sender=="string"&&typeof e.contract=="string"&&(e.msg instanceof Uint8Array||typeof e.msg=="string")&&Array.isArray(e.funds)&&(!e.funds.length||It.Coin.isAmino(e.funds[0])))},encode(e,t=j.BinaryWriter.create()){e.sender!==""&&t.uint32(10).string(e.sender),e.contract!==""&&t.uint32(18).string(e.contract),e.msg.length!==0&&t.uint32(26).bytes(e.msg);for(let n of e.funds)It.Coin.encode(n,t.uint32(42).fork()).ldelim();return t},decode(e,t){let n=e instanceof j.BinaryReader?e:new j.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=i0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.sender=n.string();break;case 2:r.contract=n.string();break;case 3:r.msg=n.bytes();break;case 5:r.funds.push(It.Coin.decode(n,n.uint32()));break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=i0();return t.sender=e.sender??"",t.contract=e.contract??"",t.msg=e.msg??new Uint8Array,t.funds=e.funds?.map(n=>It.Coin.fromPartial(n))||[],t},fromAmino(e){let t=i0();return e.sender!==void 0&&e.sender!==null&&(t.sender=e.sender),e.contract!==void 0&&e.contract!==null&&(t.contract=e.contract),e.msg!==void 0&&e.msg!==null&&(t.msg=(0,Sn.toUtf8)(JSON.stringify(e.msg))),t.funds=e.funds?.map(n=>It.Coin.fromAmino(n))||[],t},toAmino(e){let t={};return t.sender=e.sender===""?void 0:e.sender,t.contract=e.contract===""?void 0:e.contract,t.msg=e.msg?JSON.parse((0,Sn.fromUtf8)(e.msg)):void 0,e.funds?t.funds=e.funds.map(n=>n?It.Coin.toAmino(n):void 0):t.funds=e.funds,t},fromAminoMsg(e){return S.MsgExecuteContract.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/MsgExecuteContract",value:S.MsgExecuteContract.toAmino(e)}},fromProtoMsg(e){return S.MsgExecuteContract.decode(e.value)},toProto(e){return S.MsgExecuteContract.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.MsgExecuteContract",value:S.MsgExecuteContract.encode(e).finish()}}};function o0(){return{data:new Uint8Array}}S.MsgExecuteContractResponse={typeUrl:"/cosmwasm.wasm.v1.MsgExecuteContractResponse",aminoType:"wasm/MsgExecuteContractResponse",is(e){return e&&(e.$typeUrl===S.MsgExecuteContractResponse.typeUrl||e.data instanceof Uint8Array||typeof e.data=="string")},isSDK(e){return e&&(e.$typeUrl===S.MsgExecuteContractResponse.typeUrl||e.data instanceof Uint8Array||typeof e.data=="string")},isAmino(e){return e&&(e.$typeUrl===S.MsgExecuteContractResponse.typeUrl||e.data instanceof Uint8Array||typeof e.data=="string")},encode(e,t=j.BinaryWriter.create()){return e.data.length!==0&&t.uint32(10).bytes(e.data),t},decode(e,t){let n=e instanceof j.BinaryReader?e:new j.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=o0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.data=n.bytes();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=o0();return t.data=e.data??new Uint8Array,t},fromAmino(e){let t=o0();return e.data!==void 0&&e.data!==null&&(t.data=(0,ln.bytesFromBase64)(e.data)),t},toAmino(e){let t={};return t.data=e.data?(0,ln.base64FromBytes)(e.data):void 0,t},fromAminoMsg(e){return S.MsgExecuteContractResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/MsgExecuteContractResponse",value:S.MsgExecuteContractResponse.toAmino(e)}},fromProtoMsg(e){return S.MsgExecuteContractResponse.decode(e.value)},toProto(e){return S.MsgExecuteContractResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.MsgExecuteContractResponse",value:S.MsgExecuteContractResponse.encode(e).finish()}}};function s0(){return{sender:"",contract:"",codeId:BigInt(0),msg:new Uint8Array}}S.MsgMigrateContract={typeUrl:"/cosmwasm.wasm.v1.MsgMigrateContract",aminoType:"wasm/MsgMigrateContract",is(e){return e&&(e.$typeUrl===S.MsgMigrateContract.typeUrl||typeof e.sender=="string"&&typeof e.contract=="string"&&typeof e.codeId=="bigint"&&(e.msg instanceof Uint8Array||typeof e.msg=="string"))},isSDK(e){return e&&(e.$typeUrl===S.MsgMigrateContract.typeUrl||typeof e.sender=="string"&&typeof e.contract=="string"&&typeof e.code_id=="bigint"&&(e.msg instanceof Uint8Array||typeof e.msg=="string"))},isAmino(e){return e&&(e.$typeUrl===S.MsgMigrateContract.typeUrl||typeof e.sender=="string"&&typeof e.contract=="string"&&typeof e.code_id=="bigint"&&(e.msg instanceof Uint8Array||typeof e.msg=="string"))},encode(e,t=j.BinaryWriter.create()){return e.sender!==""&&t.uint32(10).string(e.sender),e.contract!==""&&t.uint32(18).string(e.contract),e.codeId!==BigInt(0)&&t.uint32(24).uint64(e.codeId),e.msg.length!==0&&t.uint32(34).bytes(e.msg),t},decode(e,t){let n=e instanceof j.BinaryReader?e:new j.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=s0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.sender=n.string();break;case 2:r.contract=n.string();break;case 3:r.codeId=n.uint64();break;case 4:r.msg=n.bytes();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=s0();return t.sender=e.sender??"",t.contract=e.contract??"",t.codeId=e.codeId!==void 0&&e.codeId!==null?BigInt(e.codeId.toString()):BigInt(0),t.msg=e.msg??new Uint8Array,t},fromAmino(e){let t=s0();return e.sender!==void 0&&e.sender!==null&&(t.sender=e.sender),e.contract!==void 0&&e.contract!==null&&(t.contract=e.contract),e.code_id!==void 0&&e.code_id!==null&&(t.codeId=BigInt(e.code_id)),e.msg!==void 0&&e.msg!==null&&(t.msg=(0,Sn.toUtf8)(JSON.stringify(e.msg))),t},toAmino(e){let t={};return t.sender=e.sender===""?void 0:e.sender,t.contract=e.contract===""?void 0:e.contract,t.code_id=e.codeId!==BigInt(0)?e.codeId.toString():void 0,t.msg=e.msg?JSON.parse((0,Sn.fromUtf8)(e.msg)):void 0,t},fromAminoMsg(e){return S.MsgMigrateContract.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/MsgMigrateContract",value:S.MsgMigrateContract.toAmino(e)}},fromProtoMsg(e){return S.MsgMigrateContract.decode(e.value)},toProto(e){return S.MsgMigrateContract.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.MsgMigrateContract",value:S.MsgMigrateContract.encode(e).finish()}}};function a0(){return{data:new Uint8Array}}S.MsgMigrateContractResponse={typeUrl:"/cosmwasm.wasm.v1.MsgMigrateContractResponse",aminoType:"wasm/MsgMigrateContractResponse",is(e){return e&&(e.$typeUrl===S.MsgMigrateContractResponse.typeUrl||e.data instanceof Uint8Array||typeof e.data=="string")},isSDK(e){return e&&(e.$typeUrl===S.MsgMigrateContractResponse.typeUrl||e.data instanceof Uint8Array||typeof e.data=="string")},isAmino(e){return e&&(e.$typeUrl===S.MsgMigrateContractResponse.typeUrl||e.data instanceof Uint8Array||typeof e.data=="string")},encode(e,t=j.BinaryWriter.create()){return e.data.length!==0&&t.uint32(10).bytes(e.data),t},decode(e,t){let n=e instanceof j.BinaryReader?e:new j.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=a0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.data=n.bytes();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=a0();return t.data=e.data??new Uint8Array,t},fromAmino(e){let t=a0();return e.data!==void 0&&e.data!==null&&(t.data=(0,ln.bytesFromBase64)(e.data)),t},toAmino(e){let t={};return t.data=e.data?(0,ln.base64FromBytes)(e.data):void 0,t},fromAminoMsg(e){return S.MsgMigrateContractResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/MsgMigrateContractResponse",value:S.MsgMigrateContractResponse.toAmino(e)}},fromProtoMsg(e){return S.MsgMigrateContractResponse.decode(e.value)},toProto(e){return S.MsgMigrateContractResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.MsgMigrateContractResponse",value:S.MsgMigrateContractResponse.encode(e).finish()}}};function d0(){return{sender:"",newAdmin:"",contract:""}}S.MsgUpdateAdmin={typeUrl:"/cosmwasm.wasm.v1.MsgUpdateAdmin",aminoType:"wasm/MsgUpdateAdmin",is(e){return e&&(e.$typeUrl===S.MsgUpdateAdmin.typeUrl||typeof e.sender=="string"&&typeof e.newAdmin=="string"&&typeof e.contract=="string")},isSDK(e){return e&&(e.$typeUrl===S.MsgUpdateAdmin.typeUrl||typeof e.sender=="string"&&typeof e.new_admin=="string"&&typeof e.contract=="string")},isAmino(e){return e&&(e.$typeUrl===S.MsgUpdateAdmin.typeUrl||typeof e.sender=="string"&&typeof e.new_admin=="string"&&typeof e.contract=="string")},encode(e,t=j.BinaryWriter.create()){return e.sender!==""&&t.uint32(10).string(e.sender),e.newAdmin!==""&&t.uint32(18).string(e.newAdmin),e.contract!==""&&t.uint32(26).string(e.contract),t},decode(e,t){let n=e instanceof j.BinaryReader?e:new j.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=d0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.sender=n.string();break;case 2:r.newAdmin=n.string();break;case 3:r.contract=n.string();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=d0();return t.sender=e.sender??"",t.newAdmin=e.newAdmin??"",t.contract=e.contract??"",t},fromAmino(e){let t=d0();return e.sender!==void 0&&e.sender!==null&&(t.sender=e.sender),e.new_admin!==void 0&&e.new_admin!==null&&(t.newAdmin=e.new_admin),e.contract!==void 0&&e.contract!==null&&(t.contract=e.contract),t},toAmino(e){let t={};return t.sender=e.sender===""?void 0:e.sender,t.new_admin=e.newAdmin===""?void 0:e.newAdmin,t.contract=e.contract===""?void 0:e.contract,t},fromAminoMsg(e){return S.MsgUpdateAdmin.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/MsgUpdateAdmin",value:S.MsgUpdateAdmin.toAmino(e)}},fromProtoMsg(e){return S.MsgUpdateAdmin.decode(e.value)},toProto(e){return S.MsgUpdateAdmin.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.MsgUpdateAdmin",value:S.MsgUpdateAdmin.encode(e).finish()}}};function u0(){return{}}S.MsgUpdateAdminResponse={typeUrl:"/cosmwasm.wasm.v1.MsgUpdateAdminResponse",aminoType:"wasm/MsgUpdateAdminResponse",is(e){return e&&e.$typeUrl===S.MsgUpdateAdminResponse.typeUrl},isSDK(e){return e&&e.$typeUrl===S.MsgUpdateAdminResponse.typeUrl},isAmino(e){return e&&e.$typeUrl===S.MsgUpdateAdminResponse.typeUrl},encode(e,t=j.BinaryWriter.create()){return t},decode(e,t){let n=e instanceof j.BinaryReader?e:new j.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=u0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){default:n.skipType(o&7);break}}return r},fromPartial(e){return u0()},fromAmino(e){return u0()},toAmino(e){return{}},fromAminoMsg(e){return S.MsgUpdateAdminResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/MsgUpdateAdminResponse",value:S.MsgUpdateAdminResponse.toAmino(e)}},fromProtoMsg(e){return S.MsgUpdateAdminResponse.decode(e.value)},toProto(e){return S.MsgUpdateAdminResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.MsgUpdateAdminResponse",value:S.MsgUpdateAdminResponse.encode(e).finish()}}};function f0(){return{sender:"",contract:""}}S.MsgClearAdmin={typeUrl:"/cosmwasm.wasm.v1.MsgClearAdmin",aminoType:"wasm/MsgClearAdmin",is(e){return e&&(e.$typeUrl===S.MsgClearAdmin.typeUrl||typeof e.sender=="string"&&typeof e.contract=="string")},isSDK(e){return e&&(e.$typeUrl===S.MsgClearAdmin.typeUrl||typeof e.sender=="string"&&typeof e.contract=="string")},isAmino(e){return e&&(e.$typeUrl===S.MsgClearAdmin.typeUrl||typeof e.sender=="string"&&typeof e.contract=="string")},encode(e,t=j.BinaryWriter.create()){return e.sender!==""&&t.uint32(10).string(e.sender),e.contract!==""&&t.uint32(26).string(e.contract),t},decode(e,t){let n=e instanceof j.BinaryReader?e:new j.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=f0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.sender=n.string();break;case 3:r.contract=n.string();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=f0();return t.sender=e.sender??"",t.contract=e.contract??"",t},fromAmino(e){let t=f0();return e.sender!==void 0&&e.sender!==null&&(t.sender=e.sender),e.contract!==void 0&&e.contract!==null&&(t.contract=e.contract),t},toAmino(e){let t={};return t.sender=e.sender===""?void 0:e.sender,t.contract=e.contract===""?void 0:e.contract,t},fromAminoMsg(e){return S.MsgClearAdmin.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/MsgClearAdmin",value:S.MsgClearAdmin.toAmino(e)}},fromProtoMsg(e){return S.MsgClearAdmin.decode(e.value)},toProto(e){return S.MsgClearAdmin.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.MsgClearAdmin",value:S.MsgClearAdmin.encode(e).finish()}}};function c0(){return{}}S.MsgClearAdminResponse={typeUrl:"/cosmwasm.wasm.v1.MsgClearAdminResponse",aminoType:"wasm/MsgClearAdminResponse",is(e){return e&&e.$typeUrl===S.MsgClearAdminResponse.typeUrl},isSDK(e){return e&&e.$typeUrl===S.MsgClearAdminResponse.typeUrl},isAmino(e){return e&&e.$typeUrl===S.MsgClearAdminResponse.typeUrl},encode(e,t=j.BinaryWriter.create()){return t},decode(e,t){let n=e instanceof j.BinaryReader?e:new j.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=c0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){default:n.skipType(o&7);break}}return r},fromPartial(e){return c0()},fromAmino(e){return c0()},toAmino(e){return{}},fromAminoMsg(e){return S.MsgClearAdminResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/MsgClearAdminResponse",value:S.MsgClearAdminResponse.toAmino(e)}},fromProtoMsg(e){return S.MsgClearAdminResponse.decode(e.value)},toProto(e){return S.MsgClearAdminResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.MsgClearAdminResponse",value:S.MsgClearAdminResponse.encode(e).finish()}}};function l0(){return{sender:"",codeId:BigInt(0),newInstantiatePermission:void 0}}S.MsgUpdateInstantiateConfig={typeUrl:"/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig",aminoType:"wasm/MsgUpdateInstantiateConfig",is(e){return e&&(e.$typeUrl===S.MsgUpdateInstantiateConfig.typeUrl||typeof e.sender=="string"&&typeof e.codeId=="bigint")},isSDK(e){return e&&(e.$typeUrl===S.MsgUpdateInstantiateConfig.typeUrl||typeof e.sender=="string"&&typeof e.code_id=="bigint")},isAmino(e){return e&&(e.$typeUrl===S.MsgUpdateInstantiateConfig.typeUrl||typeof e.sender=="string"&&typeof e.code_id=="bigint")},encode(e,t=j.BinaryWriter.create()){return e.sender!==""&&t.uint32(10).string(e.sender),e.codeId!==BigInt(0)&&t.uint32(16).uint64(e.codeId),e.newInstantiatePermission!==void 0&&Ut.AccessConfig.encode(e.newInstantiatePermission,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof j.BinaryReader?e:new j.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=l0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.sender=n.string();break;case 2:r.codeId=n.uint64();break;case 3:r.newInstantiatePermission=Ut.AccessConfig.decode(n,n.uint32());break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=l0();return t.sender=e.sender??"",t.codeId=e.codeId!==void 0&&e.codeId!==null?BigInt(e.codeId.toString()):BigInt(0),t.newInstantiatePermission=e.newInstantiatePermission!==void 0&&e.newInstantiatePermission!==null?Ut.AccessConfig.fromPartial(e.newInstantiatePermission):void 0,t},fromAmino(e){let t=l0();return e.sender!==void 0&&e.sender!==null&&(t.sender=e.sender),e.code_id!==void 0&&e.code_id!==null&&(t.codeId=BigInt(e.code_id)),e.new_instantiate_permission!==void 0&&e.new_instantiate_permission!==null&&(t.newInstantiatePermission=Ut.AccessConfig.fromAmino(e.new_instantiate_permission)),t},toAmino(e){let t={};return t.sender=e.sender===""?void 0:e.sender,t.code_id=e.codeId!==BigInt(0)?e.codeId.toString():void 0,t.new_instantiate_permission=e.newInstantiatePermission?Ut.AccessConfig.toAmino(e.newInstantiatePermission):void 0,t},fromAminoMsg(e){return S.MsgUpdateInstantiateConfig.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/MsgUpdateInstantiateConfig",value:S.MsgUpdateInstantiateConfig.toAmino(e)}},fromProtoMsg(e){return S.MsgUpdateInstantiateConfig.decode(e.value)},toProto(e){return S.MsgUpdateInstantiateConfig.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig",value:S.MsgUpdateInstantiateConfig.encode(e).finish()}}};function m0(){return{}}S.MsgUpdateInstantiateConfigResponse={typeUrl:"/cosmwasm.wasm.v1.MsgUpdateInstantiateConfigResponse",aminoType:"wasm/MsgUpdateInstantiateConfigResponse",is(e){return e&&e.$typeUrl===S.MsgUpdateInstantiateConfigResponse.typeUrl},isSDK(e){return e&&e.$typeUrl===S.MsgUpdateInstantiateConfigResponse.typeUrl},isAmino(e){return e&&e.$typeUrl===S.MsgUpdateInstantiateConfigResponse.typeUrl},encode(e,t=j.BinaryWriter.create()){return t},decode(e,t){let n=e instanceof j.BinaryReader?e:new j.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=m0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){default:n.skipType(o&7);break}}return r},fromPartial(e){return m0()},fromAmino(e){return m0()},toAmino(e){return{}},fromAminoMsg(e){return S.MsgUpdateInstantiateConfigResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/MsgUpdateInstantiateConfigResponse",value:S.MsgUpdateInstantiateConfigResponse.toAmino(e)}},fromProtoMsg(e){return S.MsgUpdateInstantiateConfigResponse.decode(e.value)},toProto(e){return S.MsgUpdateInstantiateConfigResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.MsgUpdateInstantiateConfigResponse",value:S.MsgUpdateInstantiateConfigResponse.encode(e).finish()}}};function p0(){return{authority:"",params:Ut.Params.fromPartial({})}}S.MsgUpdateParams={typeUrl:"/cosmwasm.wasm.v1.MsgUpdateParams",aminoType:"wasm/MsgUpdateParams",is(e){return e&&(e.$typeUrl===S.MsgUpdateParams.typeUrl||typeof e.authority=="string"&&Ut.Params.is(e.params))},isSDK(e){return e&&(e.$typeUrl===S.MsgUpdateParams.typeUrl||typeof e.authority=="string"&&Ut.Params.isSDK(e.params))},isAmino(e){return e&&(e.$typeUrl===S.MsgUpdateParams.typeUrl||typeof e.authority=="string"&&Ut.Params.isAmino(e.params))},encode(e,t=j.BinaryWriter.create()){return e.authority!==""&&t.uint32(10).string(e.authority),e.params!==void 0&&Ut.Params.encode(e.params,t.uint32(18).fork()).ldelim(),t},decode(e,t){let n=e instanceof j.BinaryReader?e:new j.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=p0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.authority=n.string();break;case 2:r.params=Ut.Params.decode(n,n.uint32());break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=p0();return t.authority=e.authority??"",t.params=e.params!==void 0&&e.params!==null?Ut.Params.fromPartial(e.params):void 0,t},fromAmino(e){let t=p0();return e.authority!==void 0&&e.authority!==null&&(t.authority=e.authority),e.params!==void 0&&e.params!==null&&(t.params=Ut.Params.fromAmino(e.params)),t},toAmino(e){let t={};return t.authority=e.authority===""?void 0:e.authority,t.params=e.params?Ut.Params.toAmino(e.params):Ut.Params.toAmino(Ut.Params.fromPartial({})),t},fromAminoMsg(e){return S.MsgUpdateParams.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/MsgUpdateParams",value:S.MsgUpdateParams.toAmino(e)}},fromProtoMsg(e){return S.MsgUpdateParams.decode(e.value)},toProto(e){return S.MsgUpdateParams.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.MsgUpdateParams",value:S.MsgUpdateParams.encode(e).finish()}}};function h0(){return{}}S.MsgUpdateParamsResponse={typeUrl:"/cosmwasm.wasm.v1.MsgUpdateParamsResponse",aminoType:"wasm/MsgUpdateParamsResponse",is(e){return e&&e.$typeUrl===S.MsgUpdateParamsResponse.typeUrl},isSDK(e){return e&&e.$typeUrl===S.MsgUpdateParamsResponse.typeUrl},isAmino(e){return e&&e.$typeUrl===S.MsgUpdateParamsResponse.typeUrl},encode(e,t=j.BinaryWriter.create()){return t},decode(e,t){let n=e instanceof j.BinaryReader?e:new j.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=h0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){default:n.skipType(o&7);break}}return r},fromPartial(e){return h0()},fromAmino(e){return h0()},toAmino(e){return{}},fromAminoMsg(e){return S.MsgUpdateParamsResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/MsgUpdateParamsResponse",value:S.MsgUpdateParamsResponse.toAmino(e)}},fromProtoMsg(e){return S.MsgUpdateParamsResponse.decode(e.value)},toProto(e){return S.MsgUpdateParamsResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.MsgUpdateParamsResponse",value:S.MsgUpdateParamsResponse.encode(e).finish()}}};function g0(){return{authority:"",contract:"",msg:new Uint8Array}}S.MsgSudoContract={typeUrl:"/cosmwasm.wasm.v1.MsgSudoContract",aminoType:"wasm/MsgSudoContract",is(e){return e&&(e.$typeUrl===S.MsgSudoContract.typeUrl||typeof e.authority=="string"&&typeof e.contract=="string"&&(e.msg instanceof Uint8Array||typeof e.msg=="string"))},isSDK(e){return e&&(e.$typeUrl===S.MsgSudoContract.typeUrl||typeof e.authority=="string"&&typeof e.contract=="string"&&(e.msg instanceof Uint8Array||typeof e.msg=="string"))},isAmino(e){return e&&(e.$typeUrl===S.MsgSudoContract.typeUrl||typeof e.authority=="string"&&typeof e.contract=="string"&&(e.msg instanceof Uint8Array||typeof e.msg=="string"))},encode(e,t=j.BinaryWriter.create()){return e.authority!==""&&t.uint32(10).string(e.authority),e.contract!==""&&t.uint32(18).string(e.contract),e.msg.length!==0&&t.uint32(26).bytes(e.msg),t},decode(e,t){let n=e instanceof j.BinaryReader?e:new j.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=g0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.authority=n.string();break;case 2:r.contract=n.string();break;case 3:r.msg=n.bytes();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=g0();return t.authority=e.authority??"",t.contract=e.contract??"",t.msg=e.msg??new Uint8Array,t},fromAmino(e){let t=g0();return e.authority!==void 0&&e.authority!==null&&(t.authority=e.authority),e.contract!==void 0&&e.contract!==null&&(t.contract=e.contract),e.msg!==void 0&&e.msg!==null&&(t.msg=(0,Sn.toUtf8)(JSON.stringify(e.msg))),t},toAmino(e){let t={};return t.authority=e.authority===""?void 0:e.authority,t.contract=e.contract===""?void 0:e.contract,t.msg=e.msg?JSON.parse((0,Sn.fromUtf8)(e.msg)):void 0,t},fromAminoMsg(e){return S.MsgSudoContract.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/MsgSudoContract",value:S.MsgSudoContract.toAmino(e)}},fromProtoMsg(e){return S.MsgSudoContract.decode(e.value)},toProto(e){return S.MsgSudoContract.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.MsgSudoContract",value:S.MsgSudoContract.encode(e).finish()}}};function y0(){return{data:new Uint8Array}}S.MsgSudoContractResponse={typeUrl:"/cosmwasm.wasm.v1.MsgSudoContractResponse",aminoType:"wasm/MsgSudoContractResponse",is(e){return e&&(e.$typeUrl===S.MsgSudoContractResponse.typeUrl||e.data instanceof Uint8Array||typeof e.data=="string")},isSDK(e){return e&&(e.$typeUrl===S.MsgSudoContractResponse.typeUrl||e.data instanceof Uint8Array||typeof e.data=="string")},isAmino(e){return e&&(e.$typeUrl===S.MsgSudoContractResponse.typeUrl||e.data instanceof Uint8Array||typeof e.data=="string")},encode(e,t=j.BinaryWriter.create()){return e.data.length!==0&&t.uint32(10).bytes(e.data),t},decode(e,t){let n=e instanceof j.BinaryReader?e:new j.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=y0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.data=n.bytes();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=y0();return t.data=e.data??new Uint8Array,t},fromAmino(e){let t=y0();return e.data!==void 0&&e.data!==null&&(t.data=(0,ln.bytesFromBase64)(e.data)),t},toAmino(e){let t={};return t.data=e.data?(0,ln.base64FromBytes)(e.data):void 0,t},fromAminoMsg(e){return S.MsgSudoContractResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/MsgSudoContractResponse",value:S.MsgSudoContractResponse.toAmino(e)}},fromProtoMsg(e){return S.MsgSudoContractResponse.decode(e.value)},toProto(e){return S.MsgSudoContractResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.MsgSudoContractResponse",value:S.MsgSudoContractResponse.encode(e).finish()}}};function b0(){return{authority:"",codeIds:[]}}S.MsgPinCodes={typeUrl:"/cosmwasm.wasm.v1.MsgPinCodes",aminoType:"wasm/MsgPinCodes",is(e){return e&&(e.$typeUrl===S.MsgPinCodes.typeUrl||typeof e.authority=="string"&&Array.isArray(e.codeIds)&&(!e.codeIds.length||typeof e.codeIds[0]=="bigint"))},isSDK(e){return e&&(e.$typeUrl===S.MsgPinCodes.typeUrl||typeof e.authority=="string"&&Array.isArray(e.code_ids)&&(!e.code_ids.length||typeof e.code_ids[0]=="bigint"))},isAmino(e){return e&&(e.$typeUrl===S.MsgPinCodes.typeUrl||typeof e.authority=="string"&&Array.isArray(e.code_ids)&&(!e.code_ids.length||typeof e.code_ids[0]=="bigint"))},encode(e,t=j.BinaryWriter.create()){e.authority!==""&&t.uint32(10).string(e.authority),t.uint32(18).fork();for(let n of e.codeIds)t.uint64(n);return t.ldelim(),t},decode(e,t){let n=e instanceof j.BinaryReader?e:new j.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=b0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.authority=n.string();break;case 2:if((o&7)===2){let f=n.uint32()+n.pos;for(;n.pos<f;)r.codeIds.push(n.uint64())}else r.codeIds.push(n.uint64());break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=b0();return t.authority=e.authority??"",t.codeIds=e.codeIds?.map(n=>BigInt(n.toString()))||[],t},fromAmino(e){let t=b0();return e.authority!==void 0&&e.authority!==null&&(t.authority=e.authority),t.codeIds=e.code_ids?.map(n=>BigInt(n))||[],t},toAmino(e){let t={};return t.authority=e.authority===""?void 0:e.authority,e.codeIds?t.code_ids=e.codeIds.map(n=>n.toString()):t.code_ids=e.codeIds,t},fromAminoMsg(e){return S.MsgPinCodes.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/MsgPinCodes",value:S.MsgPinCodes.toAmino(e)}},fromProtoMsg(e){return S.MsgPinCodes.decode(e.value)},toProto(e){return S.MsgPinCodes.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.MsgPinCodes",value:S.MsgPinCodes.encode(e).finish()}}};function v0(){return{}}S.MsgPinCodesResponse={typeUrl:"/cosmwasm.wasm.v1.MsgPinCodesResponse",aminoType:"wasm/MsgPinCodesResponse",is(e){return e&&e.$typeUrl===S.MsgPinCodesResponse.typeUrl},isSDK(e){return e&&e.$typeUrl===S.MsgPinCodesResponse.typeUrl},isAmino(e){return e&&e.$typeUrl===S.MsgPinCodesResponse.typeUrl},encode(e,t=j.BinaryWriter.create()){return t},decode(e,t){let n=e instanceof j.BinaryReader?e:new j.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=v0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){default:n.skipType(o&7);break}}return r},fromPartial(e){return v0()},fromAmino(e){return v0()},toAmino(e){return{}},fromAminoMsg(e){return S.MsgPinCodesResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/MsgPinCodesResponse",value:S.MsgPinCodesResponse.toAmino(e)}},fromProtoMsg(e){return S.MsgPinCodesResponse.decode(e.value)},toProto(e){return S.MsgPinCodesResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.MsgPinCodesResponse",value:S.MsgPinCodesResponse.encode(e).finish()}}};function A0(){return{authority:"",codeIds:[]}}S.MsgUnpinCodes={typeUrl:"/cosmwasm.wasm.v1.MsgUnpinCodes",aminoType:"wasm/MsgUnpinCodes",is(e){return e&&(e.$typeUrl===S.MsgUnpinCodes.typeUrl||typeof e.authority=="string"&&Array.isArray(e.codeIds)&&(!e.codeIds.length||typeof e.codeIds[0]=="bigint"))},isSDK(e){return e&&(e.$typeUrl===S.MsgUnpinCodes.typeUrl||typeof e.authority=="string"&&Array.isArray(e.code_ids)&&(!e.code_ids.length||typeof e.code_ids[0]=="bigint"))},isAmino(e){return e&&(e.$typeUrl===S.MsgUnpinCodes.typeUrl||typeof e.authority=="string"&&Array.isArray(e.code_ids)&&(!e.code_ids.length||typeof e.code_ids[0]=="bigint"))},encode(e,t=j.BinaryWriter.create()){e.authority!==""&&t.uint32(10).string(e.authority),t.uint32(18).fork();for(let n of e.codeIds)t.uint64(n);return t.ldelim(),t},decode(e,t){let n=e instanceof j.BinaryReader?e:new j.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=A0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.authority=n.string();break;case 2:if((o&7)===2){let f=n.uint32()+n.pos;for(;n.pos<f;)r.codeIds.push(n.uint64())}else r.codeIds.push(n.uint64());break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=A0();return t.authority=e.authority??"",t.codeIds=e.codeIds?.map(n=>BigInt(n.toString()))||[],t},fromAmino(e){let t=A0();return e.authority!==void 0&&e.authority!==null&&(t.authority=e.authority),t.codeIds=e.code_ids?.map(n=>BigInt(n))||[],t},toAmino(e){let t={};return t.authority=e.authority===""?void 0:e.authority,e.codeIds?t.code_ids=e.codeIds.map(n=>n.toString()):t.code_ids=e.codeIds,t},fromAminoMsg(e){return S.MsgUnpinCodes.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/MsgUnpinCodes",value:S.MsgUnpinCodes.toAmino(e)}},fromProtoMsg(e){return S.MsgUnpinCodes.decode(e.value)},toProto(e){return S.MsgUnpinCodes.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.MsgUnpinCodes",value:S.MsgUnpinCodes.encode(e).finish()}}};function M0(){return{}}S.MsgUnpinCodesResponse={typeUrl:"/cosmwasm.wasm.v1.MsgUnpinCodesResponse",aminoType:"wasm/MsgUnpinCodesResponse",is(e){return e&&e.$typeUrl===S.MsgUnpinCodesResponse.typeUrl},isSDK(e){return e&&e.$typeUrl===S.MsgUnpinCodesResponse.typeUrl},isAmino(e){return e&&e.$typeUrl===S.MsgUnpinCodesResponse.typeUrl},encode(e,t=j.BinaryWriter.create()){return t},decode(e,t){let n=e instanceof j.BinaryReader?e:new j.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=M0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){default:n.skipType(o&7);break}}return r},fromPartial(e){return M0()},fromAmino(e){return M0()},toAmino(e){return{}},fromAminoMsg(e){return S.MsgUnpinCodesResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/MsgUnpinCodesResponse",value:S.MsgUnpinCodesResponse.toAmino(e)}},fromProtoMsg(e){return S.MsgUnpinCodesResponse.decode(e.value)},toProto(e){return S.MsgUnpinCodesResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.MsgUnpinCodesResponse",value:S.MsgUnpinCodesResponse.encode(e).finish()}}};function w0(){return{authority:"",wasmByteCode:new Uint8Array,instantiatePermission:void 0,unpinCode:!1,admin:"",label:"",msg:new Uint8Array,funds:[],source:"",builder:"",codeHash:new Uint8Array}}S.MsgStoreAndInstantiateContract={typeUrl:"/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract",aminoType:"wasm/MsgStoreAndInstantiateContract",is(e){return e&&(e.$typeUrl===S.MsgStoreAndInstantiateContract.typeUrl||typeof e.authority=="string"&&(e.wasmByteCode instanceof Uint8Array||typeof e.wasmByteCode=="string")&&typeof e.unpinCode=="boolean"&&typeof e.admin=="string"&&typeof e.label=="string"&&(e.msg instanceof Uint8Array||typeof e.msg=="string")&&Array.isArray(e.funds)&&(!e.funds.length||It.Coin.is(e.funds[0]))&&typeof e.source=="string"&&typeof e.builder=="string"&&(e.codeHash instanceof Uint8Array||typeof e.codeHash=="string"))},isSDK(e){return e&&(e.$typeUrl===S.MsgStoreAndInstantiateContract.typeUrl||typeof e.authority=="string"&&(e.wasm_byte_code instanceof Uint8Array||typeof e.wasm_byte_code=="string")&&typeof e.unpin_code=="boolean"&&typeof e.admin=="string"&&typeof e.label=="string"&&(e.msg instanceof Uint8Array||typeof e.msg=="string")&&Array.isArray(e.funds)&&(!e.funds.length||It.Coin.isSDK(e.funds[0]))&&typeof e.source=="string"&&typeof e.builder=="string"&&(e.code_hash instanceof Uint8Array||typeof e.code_hash=="string"))},isAmino(e){return e&&(e.$typeUrl===S.MsgStoreAndInstantiateContract.typeUrl||typeof e.authority=="string"&&(e.wasm_byte_code instanceof Uint8Array||typeof e.wasm_byte_code=="string")&&typeof e.unpin_code=="boolean"&&typeof e.admin=="string"&&typeof e.label=="string"&&(e.msg instanceof Uint8Array||typeof e.msg=="string")&&Array.isArray(e.funds)&&(!e.funds.length||It.Coin.isAmino(e.funds[0]))&&typeof e.source=="string"&&typeof e.builder=="string"&&(e.code_hash instanceof Uint8Array||typeof e.code_hash=="string"))},encode(e,t=j.BinaryWriter.create()){e.authority!==""&&t.uint32(10).string(e.authority),e.wasmByteCode.length!==0&&t.uint32(26).bytes(e.wasmByteCode),e.instantiatePermission!==void 0&&Ut.AccessConfig.encode(e.instantiatePermission,t.uint32(34).fork()).ldelim(),e.unpinCode===!0&&t.uint32(40).bool(e.unpinCode),e.admin!==""&&t.uint32(50).string(e.admin),e.label!==""&&t.uint32(58).string(e.label),e.msg.length!==0&&t.uint32(66).bytes(e.msg);for(let n of e.funds)It.Coin.encode(n,t.uint32(74).fork()).ldelim();return e.source!==""&&t.uint32(82).string(e.source),e.builder!==""&&t.uint32(90).string(e.builder),e.codeHash.length!==0&&t.uint32(98).bytes(e.codeHash),t},decode(e,t){let n=e instanceof j.BinaryReader?e:new j.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=w0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.authority=n.string();break;case 3:r.wasmByteCode=n.bytes();break;case 4:r.instantiatePermission=Ut.AccessConfig.decode(n,n.uint32());break;case 5:r.unpinCode=n.bool();break;case 6:r.admin=n.string();break;case 7:r.label=n.string();break;case 8:r.msg=n.bytes();break;case 9:r.funds.push(It.Coin.decode(n,n.uint32()));break;case 10:r.source=n.string();break;case 11:r.builder=n.string();break;case 12:r.codeHash=n.bytes();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=w0();return t.authority=e.authority??"",t.wasmByteCode=e.wasmByteCode??new Uint8Array,t.instantiatePermission=e.instantiatePermission!==void 0&&e.instantiatePermission!==null?Ut.AccessConfig.fromPartial(e.instantiatePermission):void 0,t.unpinCode=e.unpinCode??!1,t.admin=e.admin??"",t.label=e.label??"",t.msg=e.msg??new Uint8Array,t.funds=e.funds?.map(n=>It.Coin.fromPartial(n))||[],t.source=e.source??"",t.builder=e.builder??"",t.codeHash=e.codeHash??new Uint8Array,t},fromAmino(e){let t=w0();return e.authority!==void 0&&e.authority!==null&&(t.authority=e.authority),e.wasm_byte_code!==void 0&&e.wasm_byte_code!==null&&(t.wasmByteCode=(0,Sn.fromBase64)(e.wasm_byte_code)),e.instantiate_permission!==void 0&&e.instantiate_permission!==null&&(t.instantiatePermission=Ut.AccessConfig.fromAmino(e.instantiate_permission)),e.unpin_code!==void 0&&e.unpin_code!==null&&(t.unpinCode=e.unpin_code),e.admin!==void 0&&e.admin!==null&&(t.admin=e.admin),e.label!==void 0&&e.label!==null&&(t.label=e.label),e.msg!==void 0&&e.msg!==null&&(t.msg=(0,Sn.toUtf8)(JSON.stringify(e.msg))),t.funds=e.funds?.map(n=>It.Coin.fromAmino(n))||[],e.source!==void 0&&e.source!==null&&(t.source=e.source),e.builder!==void 0&&e.builder!==null&&(t.builder=e.builder),e.code_hash!==void 0&&e.code_hash!==null&&(t.codeHash=(0,ln.bytesFromBase64)(e.code_hash)),t},toAmino(e){let t={};return t.authority=e.authority===""?void 0:e.authority,t.wasm_byte_code=e.wasmByteCode?(0,Sn.toBase64)(e.wasmByteCode):void 0,t.instantiate_permission=e.instantiatePermission?Ut.AccessConfig.toAmino(e.instantiatePermission):void 0,t.unpin_code=e.unpinCode===!1?void 0:e.unpinCode,t.admin=e.admin===""?void 0:e.admin,t.label=e.label===""?void 0:e.label,t.msg=e.msg?JSON.parse((0,Sn.fromUtf8)(e.msg)):void 0,e.funds?t.funds=e.funds.map(n=>n?It.Coin.toAmino(n):void 0):t.funds=e.funds,t.source=e.source===""?void 0:e.source,t.builder=e.builder===""?void 0:e.builder,t.code_hash=e.codeHash?(0,ln.base64FromBytes)(e.codeHash):void 0,t},fromAminoMsg(e){return S.MsgStoreAndInstantiateContract.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/MsgStoreAndInstantiateContract",value:S.MsgStoreAndInstantiateContract.toAmino(e)}},fromProtoMsg(e){return S.MsgStoreAndInstantiateContract.decode(e.value)},toProto(e){return S.MsgStoreAndInstantiateContract.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract",value:S.MsgStoreAndInstantiateContract.encode(e).finish()}}};function k0(){return{address:"",data:new Uint8Array}}S.MsgStoreAndInstantiateContractResponse={typeUrl:"/cosmwasm.wasm.v1.MsgStoreAndInstantiateContractResponse",aminoType:"wasm/MsgStoreAndInstantiateContractResponse",is(e){return e&&(e.$typeUrl===S.MsgStoreAndInstantiateContractResponse.typeUrl||typeof e.address=="string"&&(e.data instanceof Uint8Array||typeof e.data=="string"))},isSDK(e){return e&&(e.$typeUrl===S.MsgStoreAndInstantiateContractResponse.typeUrl||typeof e.address=="string"&&(e.data instanceof Uint8Array||typeof e.data=="string"))},isAmino(e){return e&&(e.$typeUrl===S.MsgStoreAndInstantiateContractResponse.typeUrl||typeof e.address=="string"&&(e.data instanceof Uint8Array||typeof e.data=="string"))},encode(e,t=j.BinaryWriter.create()){return e.address!==""&&t.uint32(10).string(e.address),e.data.length!==0&&t.uint32(18).bytes(e.data),t},decode(e,t){let n=e instanceof j.BinaryReader?e:new j.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=k0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.address=n.string();break;case 2:r.data=n.bytes();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=k0();return t.address=e.address??"",t.data=e.data??new Uint8Array,t},fromAmino(e){let t=k0();return e.address!==void 0&&e.address!==null&&(t.address=e.address),e.data!==void 0&&e.data!==null&&(t.data=(0,ln.bytesFromBase64)(e.data)),t},toAmino(e){let t={};return t.address=e.address===""?void 0:e.address,t.data=e.data?(0,ln.base64FromBytes)(e.data):void 0,t},fromAminoMsg(e){return S.MsgStoreAndInstantiateContractResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/MsgStoreAndInstantiateContractResponse",value:S.MsgStoreAndInstantiateContractResponse.toAmino(e)}},fromProtoMsg(e){return S.MsgStoreAndInstantiateContractResponse.decode(e.value)},toProto(e){return S.MsgStoreAndInstantiateContractResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.MsgStoreAndInstantiateContractResponse",value:S.MsgStoreAndInstantiateContractResponse.encode(e).finish()}}};function S0(){return{authority:"",addresses:[]}}S.MsgAddCodeUploadParamsAddresses={typeUrl:"/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses",aminoType:"wasm/MsgAddCodeUploadParamsAddresses",is(e){return e&&(e.$typeUrl===S.MsgAddCodeUploadParamsAddresses.typeUrl||typeof e.authority=="string"&&Array.isArray(e.addresses)&&(!e.addresses.length||typeof e.addresses[0]=="string"))},isSDK(e){return e&&(e.$typeUrl===S.MsgAddCodeUploadParamsAddresses.typeUrl||typeof e.authority=="string"&&Array.isArray(e.addresses)&&(!e.addresses.length||typeof e.addresses[0]=="string"))},isAmino(e){return e&&(e.$typeUrl===S.MsgAddCodeUploadParamsAddresses.typeUrl||typeof e.authority=="string"&&Array.isArray(e.addresses)&&(!e.addresses.length||typeof e.addresses[0]=="string"))},encode(e,t=j.BinaryWriter.create()){e.authority!==""&&t.uint32(10).string(e.authority);for(let n of e.addresses)t.uint32(18).string(n);return t},decode(e,t){let n=e instanceof j.BinaryReader?e:new j.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=S0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.authority=n.string();break;case 2:r.addresses.push(n.string());break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=S0();return t.authority=e.authority??"",t.addresses=e.addresses?.map(n=>n)||[],t},fromAmino(e){let t=S0();return e.authority!==void 0&&e.authority!==null&&(t.authority=e.authority),t.addresses=e.addresses?.map(n=>n)||[],t},toAmino(e){let t={};return t.authority=e.authority===""?void 0:e.authority,e.addresses?t.addresses=e.addresses.map(n=>n):t.addresses=e.addresses,t},fromAminoMsg(e){return S.MsgAddCodeUploadParamsAddresses.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/MsgAddCodeUploadParamsAddresses",value:S.MsgAddCodeUploadParamsAddresses.toAmino(e)}},fromProtoMsg(e){return S.MsgAddCodeUploadParamsAddresses.decode(e.value)},toProto(e){return S.MsgAddCodeUploadParamsAddresses.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses",value:S.MsgAddCodeUploadParamsAddresses.encode(e).finish()}}};function _0(){return{}}S.MsgAddCodeUploadParamsAddressesResponse={typeUrl:"/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddressesResponse",aminoType:"wasm/MsgAddCodeUploadParamsAddressesResponse",is(e){return e&&e.$typeUrl===S.MsgAddCodeUploadParamsAddressesResponse.typeUrl},isSDK(e){return e&&e.$typeUrl===S.MsgAddCodeUploadParamsAddressesResponse.typeUrl},isAmino(e){return e&&e.$typeUrl===S.MsgAddCodeUploadParamsAddressesResponse.typeUrl},encode(e,t=j.BinaryWriter.create()){return t},decode(e,t){let n=e instanceof j.BinaryReader?e:new j.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=_0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){default:n.skipType(o&7);break}}return r},fromPartial(e){return _0()},fromAmino(e){return _0()},toAmino(e){return{}},fromAminoMsg(e){return S.MsgAddCodeUploadParamsAddressesResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/MsgAddCodeUploadParamsAddressesResponse",value:S.MsgAddCodeUploadParamsAddressesResponse.toAmino(e)}},fromProtoMsg(e){return S.MsgAddCodeUploadParamsAddressesResponse.decode(e.value)},toProto(e){return S.MsgAddCodeUploadParamsAddressesResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddressesResponse",value:S.MsgAddCodeUploadParamsAddressesResponse.encode(e).finish()}}};function I0(){return{authority:"",addresses:[]}}S.MsgRemoveCodeUploadParamsAddresses={typeUrl:"/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses",aminoType:"wasm/MsgRemoveCodeUploadParamsAddresses",is(e){return e&&(e.$typeUrl===S.MsgRemoveCodeUploadParamsAddresses.typeUrl||typeof e.authority=="string"&&Array.isArray(e.addresses)&&(!e.addresses.length||typeof e.addresses[0]=="string"))},isSDK(e){return e&&(e.$typeUrl===S.MsgRemoveCodeUploadParamsAddresses.typeUrl||typeof e.authority=="string"&&Array.isArray(e.addresses)&&(!e.addresses.length||typeof e.addresses[0]=="string"))},isAmino(e){return e&&(e.$typeUrl===S.MsgRemoveCodeUploadParamsAddresses.typeUrl||typeof e.authority=="string"&&Array.isArray(e.addresses)&&(!e.addresses.length||typeof e.addresses[0]=="string"))},encode(e,t=j.BinaryWriter.create()){e.authority!==""&&t.uint32(10).string(e.authority);for(let n of e.addresses)t.uint32(18).string(n);return t},decode(e,t){let n=e instanceof j.BinaryReader?e:new j.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=I0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.authority=n.string();break;case 2:r.addresses.push(n.string());break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=I0();return t.authority=e.authority??"",t.addresses=e.addresses?.map(n=>n)||[],t},fromAmino(e){let t=I0();return e.authority!==void 0&&e.authority!==null&&(t.authority=e.authority),t.addresses=e.addresses?.map(n=>n)||[],t},toAmino(e){let t={};return t.authority=e.authority===""?void 0:e.authority,e.addresses?t.addresses=e.addresses.map(n=>n):t.addresses=e.addresses,t},fromAminoMsg(e){return S.MsgRemoveCodeUploadParamsAddresses.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/MsgRemoveCodeUploadParamsAddresses",value:S.MsgRemoveCodeUploadParamsAddresses.toAmino(e)}},fromProtoMsg(e){return S.MsgRemoveCodeUploadParamsAddresses.decode(e.value)},toProto(e){return S.MsgRemoveCodeUploadParamsAddresses.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses",value:S.MsgRemoveCodeUploadParamsAddresses.encode(e).finish()}}};function x0(){return{}}S.MsgRemoveCodeUploadParamsAddressesResponse={typeUrl:"/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddressesResponse",aminoType:"wasm/MsgRemoveCodeUploadParamsAddressesResponse",is(e){return e&&e.$typeUrl===S.MsgRemoveCodeUploadParamsAddressesResponse.typeUrl},isSDK(e){return e&&e.$typeUrl===S.MsgRemoveCodeUploadParamsAddressesResponse.typeUrl},isAmino(e){return e&&e.$typeUrl===S.MsgRemoveCodeUploadParamsAddressesResponse.typeUrl},encode(e,t=j.BinaryWriter.create()){return t},decode(e,t){let n=e instanceof j.BinaryReader?e:new j.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=x0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){default:n.skipType(o&7);break}}return r},fromPartial(e){return x0()},fromAmino(e){return x0()},toAmino(e){return{}},fromAminoMsg(e){return S.MsgRemoveCodeUploadParamsAddressesResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/MsgRemoveCodeUploadParamsAddressesResponse",value:S.MsgRemoveCodeUploadParamsAddressesResponse.toAmino(e)}},fromProtoMsg(e){return S.MsgRemoveCodeUploadParamsAddressesResponse.decode(e.value)},toProto(e){return S.MsgRemoveCodeUploadParamsAddressesResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddressesResponse",value:S.MsgRemoveCodeUploadParamsAddressesResponse.encode(e).finish()}}};function P0(){return{authority:"",wasmByteCode:new Uint8Array,instantiatePermission:void 0,contract:"",msg:new Uint8Array}}S.MsgStoreAndMigrateContract={typeUrl:"/cosmwasm.wasm.v1.MsgStoreAndMigrateContract",aminoType:"wasm/MsgStoreAndMigrateContract",is(e){return e&&(e.$typeUrl===S.MsgStoreAndMigrateContract.typeUrl||typeof e.authority=="string"&&(e.wasmByteCode instanceof Uint8Array||typeof e.wasmByteCode=="string")&&typeof e.contract=="string"&&(e.msg instanceof Uint8Array||typeof e.msg=="string"))},isSDK(e){return e&&(e.$typeUrl===S.MsgStoreAndMigrateContract.typeUrl||typeof e.authority=="string"&&(e.wasm_byte_code instanceof Uint8Array||typeof e.wasm_byte_code=="string")&&typeof e.contract=="string"&&(e.msg instanceof Uint8Array||typeof e.msg=="string"))},isAmino(e){return e&&(e.$typeUrl===S.MsgStoreAndMigrateContract.typeUrl||typeof e.authority=="string"&&(e.wasm_byte_code instanceof Uint8Array||typeof e.wasm_byte_code=="string")&&typeof e.contract=="string"&&(e.msg instanceof Uint8Array||typeof e.msg=="string"))},encode(e,t=j.BinaryWriter.create()){return e.authority!==""&&t.uint32(10).string(e.authority),e.wasmByteCode.length!==0&&t.uint32(18).bytes(e.wasmByteCode),e.instantiatePermission!==void 0&&Ut.AccessConfig.encode(e.instantiatePermission,t.uint32(26).fork()).ldelim(),e.contract!==""&&t.uint32(34).string(e.contract),e.msg.length!==0&&t.uint32(42).bytes(e.msg),t},decode(e,t){let n=e instanceof j.BinaryReader?e:new j.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=P0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.authority=n.string();break;case 2:r.wasmByteCode=n.bytes();break;case 3:r.instantiatePermission=Ut.AccessConfig.decode(n,n.uint32());break;case 4:r.contract=n.string();break;case 5:r.msg=n.bytes();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=P0();return t.authority=e.authority??"",t.wasmByteCode=e.wasmByteCode??new Uint8Array,t.instantiatePermission=e.instantiatePermission!==void 0&&e.instantiatePermission!==null?Ut.AccessConfig.fromPartial(e.instantiatePermission):void 0,t.contract=e.contract??"",t.msg=e.msg??new Uint8Array,t},fromAmino(e){let t=P0();return e.authority!==void 0&&e.authority!==null&&(t.authority=e.authority),e.wasm_byte_code!==void 0&&e.wasm_byte_code!==null&&(t.wasmByteCode=(0,Sn.fromBase64)(e.wasm_byte_code)),e.instantiate_permission!==void 0&&e.instantiate_permission!==null&&(t.instantiatePermission=Ut.AccessConfig.fromAmino(e.instantiate_permission)),e.contract!==void 0&&e.contract!==null&&(t.contract=e.contract),e.msg!==void 0&&e.msg!==null&&(t.msg=(0,Sn.toUtf8)(JSON.stringify(e.msg))),t},toAmino(e){let t={};return t.authority=e.authority===""?void 0:e.authority,t.wasm_byte_code=e.wasmByteCode?(0,Sn.toBase64)(e.wasmByteCode):void 0,t.instantiate_permission=e.instantiatePermission?Ut.AccessConfig.toAmino(e.instantiatePermission):void 0,t.contract=e.contract===""?void 0:e.contract,t.msg=e.msg?JSON.parse((0,Sn.fromUtf8)(e.msg)):void 0,t},fromAminoMsg(e){return S.MsgStoreAndMigrateContract.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/MsgStoreAndMigrateContract",value:S.MsgStoreAndMigrateContract.toAmino(e)}},fromProtoMsg(e){return S.MsgStoreAndMigrateContract.decode(e.value)},toProto(e){return S.MsgStoreAndMigrateContract.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.MsgStoreAndMigrateContract",value:S.MsgStoreAndMigrateContract.encode(e).finish()}}};function U0(){return{codeId:BigInt(0),checksum:new Uint8Array,data:new Uint8Array}}S.MsgStoreAndMigrateContractResponse={typeUrl:"/cosmwasm.wasm.v1.MsgStoreAndMigrateContractResponse",aminoType:"wasm/MsgStoreAndMigrateContractResponse",is(e){return e&&(e.$typeUrl===S.MsgStoreAndMigrateContractResponse.typeUrl||typeof e.codeId=="bigint"&&(e.checksum instanceof Uint8Array||typeof e.checksum=="string")&&(e.data instanceof Uint8Array||typeof e.data=="string"))},isSDK(e){return e&&(e.$typeUrl===S.MsgStoreAndMigrateContractResponse.typeUrl||typeof e.code_id=="bigint"&&(e.checksum instanceof Uint8Array||typeof e.checksum=="string")&&(e.data instanceof Uint8Array||typeof e.data=="string"))},isAmino(e){return e&&(e.$typeUrl===S.MsgStoreAndMigrateContractResponse.typeUrl||typeof e.code_id=="bigint"&&(e.checksum instanceof Uint8Array||typeof e.checksum=="string")&&(e.data instanceof Uint8Array||typeof e.data=="string"))},encode(e,t=j.BinaryWriter.create()){return e.codeId!==BigInt(0)&&t.uint32(8).uint64(e.codeId),e.checksum.length!==0&&t.uint32(18).bytes(e.checksum),e.data.length!==0&&t.uint32(26).bytes(e.data),t},decode(e,t){let n=e instanceof j.BinaryReader?e:new j.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=U0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.codeId=n.uint64();break;case 2:r.checksum=n.bytes();break;case 3:r.data=n.bytes();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=U0();return t.codeId=e.codeId!==void 0&&e.codeId!==null?BigInt(e.codeId.toString()):BigInt(0),t.checksum=e.checksum??new Uint8Array,t.data=e.data??new Uint8Array,t},fromAmino(e){let t=U0();return e.code_id!==void 0&&e.code_id!==null&&(t.codeId=BigInt(e.code_id)),e.checksum!==void 0&&e.checksum!==null&&(t.checksum=(0,ln.bytesFromBase64)(e.checksum)),e.data!==void 0&&e.data!==null&&(t.data=(0,ln.bytesFromBase64)(e.data)),t},toAmino(e){let t={};return t.code_id=e.codeId!==BigInt(0)?e.codeId.toString():void 0,t.checksum=e.checksum?(0,ln.base64FromBytes)(e.checksum):void 0,t.data=e.data?(0,ln.base64FromBytes)(e.data):void 0,t},fromAminoMsg(e){return S.MsgStoreAndMigrateContractResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/MsgStoreAndMigrateContractResponse",value:S.MsgStoreAndMigrateContractResponse.toAmino(e)}},fromProtoMsg(e){return S.MsgStoreAndMigrateContractResponse.decode(e.value)},toProto(e){return S.MsgStoreAndMigrateContractResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.MsgStoreAndMigrateContractResponse",value:S.MsgStoreAndMigrateContractResponse.encode(e).finish()}}};function B0(){return{sender:"",newLabel:"",contract:""}}S.MsgUpdateContractLabel={typeUrl:"/cosmwasm.wasm.v1.MsgUpdateContractLabel",aminoType:"wasm/MsgUpdateContractLabel",is(e){return e&&(e.$typeUrl===S.MsgUpdateContractLabel.typeUrl||typeof e.sender=="string"&&typeof e.newLabel=="string"&&typeof e.contract=="string")},isSDK(e){return e&&(e.$typeUrl===S.MsgUpdateContractLabel.typeUrl||typeof e.sender=="string"&&typeof e.new_label=="string"&&typeof e.contract=="string")},isAmino(e){return e&&(e.$typeUrl===S.MsgUpdateContractLabel.typeUrl||typeof e.sender=="string"&&typeof e.new_label=="string"&&typeof e.contract=="string")},encode(e,t=j.BinaryWriter.create()){return e.sender!==""&&t.uint32(10).string(e.sender),e.newLabel!==""&&t.uint32(18).string(e.newLabel),e.contract!==""&&t.uint32(26).string(e.contract),t},decode(e,t){let n=e instanceof j.BinaryReader?e:new j.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=B0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.sender=n.string();break;case 2:r.newLabel=n.string();break;case 3:r.contract=n.string();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=B0();return t.sender=e.sender??"",t.newLabel=e.newLabel??"",t.contract=e.contract??"",t},fromAmino(e){let t=B0();return e.sender!==void 0&&e.sender!==null&&(t.sender=e.sender),e.new_label!==void 0&&e.new_label!==null&&(t.newLabel=e.new_label),e.contract!==void 0&&e.contract!==null&&(t.contract=e.contract),t},toAmino(e){let t={};return t.sender=e.sender===""?void 0:e.sender,t.new_label=e.newLabel===""?void 0:e.newLabel,t.contract=e.contract===""?void 0:e.contract,t},fromAminoMsg(e){return S.MsgUpdateContractLabel.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/MsgUpdateContractLabel",value:S.MsgUpdateContractLabel.toAmino(e)}},fromProtoMsg(e){return S.MsgUpdateContractLabel.decode(e.value)},toProto(e){return S.MsgUpdateContractLabel.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.MsgUpdateContractLabel",value:S.MsgUpdateContractLabel.encode(e).finish()}}};function R0(){return{}}S.MsgUpdateContractLabelResponse={typeUrl:"/cosmwasm.wasm.v1.MsgUpdateContractLabelResponse",aminoType:"wasm/MsgUpdateContractLabelResponse",is(e){return e&&e.$typeUrl===S.MsgUpdateContractLabelResponse.typeUrl},isSDK(e){return e&&e.$typeUrl===S.MsgUpdateContractLabelResponse.typeUrl},isAmino(e){return e&&e.$typeUrl===S.MsgUpdateContractLabelResponse.typeUrl},encode(e,t=j.BinaryWriter.create()){return t},decode(e,t){let n=e instanceof j.BinaryReader?e:new j.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=R0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){default:n.skipType(o&7);break}}return r},fromPartial(e){return R0()},fromAmino(e){return R0()},toAmino(e){return{}},fromAminoMsg(e){return S.MsgUpdateContractLabelResponse.fromAmino(e.value)},toAminoMsg(e){return{type:"wasm/MsgUpdateContractLabelResponse",value:S.MsgUpdateContractLabelResponse.toAmino(e)}},fromProtoMsg(e){return S.MsgUpdateContractLabelResponse.decode(e.value)},toProto(e){return S.MsgUpdateContractLabelResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/cosmwasm.wasm.v1.MsgUpdateContractLabelResponse",value:S.MsgUpdateContractLabelResponse.encode(e).finish()}}}});var uv=L(af=>{"use strict";B();R();Object.defineProperty(af,"__esModule",{value:!0});af.CosmWasmAminoConverter=void 0;var vt=C0();af.CosmWasmAminoConverter={"/cosmwasm.wasm.v1.MsgStoreCode":{aminoType:"wasm/MsgStoreCode",toAmino:vt.MsgStoreCode.toAmino,fromAmino:vt.MsgStoreCode.fromAmino},"/cosmwasm.wasm.v1.MsgInstantiateContract":{aminoType:"wasm/MsgInstantiateContract",toAmino:vt.MsgInstantiateContract.toAmino,fromAmino:vt.MsgInstantiateContract.fromAmino},"/cosmwasm.wasm.v1.MsgInstantiateContract2":{aminoType:"wasm/MsgInstantiateContract2",toAmino:vt.MsgInstantiateContract2.toAmino,fromAmino:vt.MsgInstantiateContract2.fromAmino},"/cosmwasm.wasm.v1.MsgExecuteContract":{aminoType:"wasm/MsgExecuteContract",toAmino:vt.MsgExecuteContract.toAmino,fromAmino:vt.MsgExecuteContract.fromAmino},"/cosmwasm.wasm.v1.MsgMigrateContract":{aminoType:"wasm/MsgMigrateContract",toAmino:vt.MsgMigrateContract.toAmino,fromAmino:vt.MsgMigrateContract.fromAmino},"/cosmwasm.wasm.v1.MsgUpdateAdmin":{aminoType:"wasm/MsgUpdateAdmin",toAmino:vt.MsgUpdateAdmin.toAmino,fromAmino:vt.MsgUpdateAdmin.fromAmino},"/cosmwasm.wasm.v1.MsgClearAdmin":{aminoType:"wasm/MsgClearAdmin",toAmino:vt.MsgClearAdmin.toAmino,fromAmino:vt.MsgClearAdmin.fromAmino},"/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig":{aminoType:"wasm/MsgUpdateInstantiateConfig",toAmino:vt.MsgUpdateInstantiateConfig.toAmino,fromAmino:vt.MsgUpdateInstantiateConfig.fromAmino},"/cosmwasm.wasm.v1.MsgUpdateParams":{aminoType:"wasm/MsgUpdateParams",toAmino:vt.MsgUpdateParams.toAmino,fromAmino:vt.MsgUpdateParams.fromAmino},"/cosmwasm.wasm.v1.MsgSudoContract":{aminoType:"wasm/MsgSudoContract",toAmino:vt.MsgSudoContract.toAmino,fromAmino:vt.MsgSudoContract.fromAmino},"/cosmwasm.wasm.v1.MsgPinCodes":{aminoType:"wasm/MsgPinCodes",toAmino:vt.MsgPinCodes.toAmino,fromAmino:vt.MsgPinCodes.fromAmino},"/cosmwasm.wasm.v1.MsgUnpinCodes":{aminoType:"wasm/MsgUnpinCodes",toAmino:vt.MsgUnpinCodes.toAmino,fromAmino:vt.MsgUnpinCodes.fromAmino},"/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract":{aminoType:"wasm/MsgStoreAndInstantiateContract",toAmino:vt.MsgStoreAndInstantiateContract.toAmino,fromAmino:vt.MsgStoreAndInstantiateContract.fromAmino},"/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses":{aminoType:"wasm/MsgRemoveCodeUploadParamsAddresses",toAmino:vt.MsgRemoveCodeUploadParamsAddresses.toAmino,fromAmino:vt.MsgRemoveCodeUploadParamsAddresses.fromAmino},"/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses":{aminoType:"wasm/MsgAddCodeUploadParamsAddresses",toAmino:vt.MsgAddCodeUploadParamsAddresses.toAmino,fromAmino:vt.MsgAddCodeUploadParamsAddresses.fromAmino},"/cosmwasm.wasm.v1.MsgStoreAndMigrateContract":{aminoType:"wasm/MsgStoreAndMigrateContract",toAmino:vt.MsgStoreAndMigrateContract.toAmino,fromAmino:vt.MsgStoreAndMigrateContract.fromAmino},"/cosmwasm.wasm.v1.MsgUpdateContractLabel":{aminoType:"wasm/MsgUpdateContractLabel",toAmino:vt.MsgUpdateContractLabel.toAmino,fromAmino:vt.MsgUpdateContractLabel.fromAmino}}});var fv=L(Ii=>{"use strict";B();R();var U8=Ii&&Ii.__createBinding||(Object.create?function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]}),B8=Ii&&Ii.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),R8=Ii&&Ii.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&U8(t,e,n);return B8(t,e),t};Object.defineProperty(Ii,"__esModule",{value:!0});Ii.CosmWasmRegistry=void 0;var zn=R8(C0());Ii.CosmWasmRegistry=[["/cosmwasm.wasm.v1.MsgStoreCode",zn.MsgStoreCode],["/cosmwasm.wasm.v1.MsgInstantiateContract",zn.MsgInstantiateContract],["/cosmwasm.wasm.v1.MsgInstantiateContract2",zn.MsgInstantiateContract2],["/cosmwasm.wasm.v1.MsgExecuteContract",zn.MsgExecuteContract],["/cosmwasm.wasm.v1.MsgMigrateContract",zn.MsgMigrateContract],["/cosmwasm.wasm.v1.MsgUpdateAdmin",zn.MsgUpdateAdmin],["/cosmwasm.wasm.v1.MsgClearAdmin",zn.MsgClearAdmin],["/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig",zn.MsgUpdateInstantiateConfig],["/cosmwasm.wasm.v1.MsgUpdateParams",zn.MsgUpdateParams],["/cosmwasm.wasm.v1.MsgSudoContract",zn.MsgSudoContract],["/cosmwasm.wasm.v1.MsgPinCodes",zn.MsgPinCodes],["/cosmwasm.wasm.v1.MsgUnpinCodes",zn.MsgUnpinCodes],["/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract",zn.MsgStoreAndInstantiateContract],["/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses",zn.MsgRemoveCodeUploadParamsAddresses],["/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses",zn.MsgAddCodeUploadParamsAddresses],["/cosmwasm.wasm.v1.MsgStoreAndMigrateContract",zn.MsgStoreAndMigrateContract],["/cosmwasm.wasm.v1.MsgUpdateContractLabel",zn.MsgUpdateContractLabel]]});var lv=L(Lo=>{"use strict";B();R();var C8=Lo&&Lo.__createBinding||(Object.create?function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]}),cv=Lo&&Lo.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&C8(t,e,n)};Object.defineProperty(Lo,"__esModule",{value:!0});cv(uv(),Lo);cv(fv(),Lo)});var O0=L(gr=>{"use strict";B();R();Object.defineProperty(gr,"__esModule",{value:!0});gr.MsgPlaceBidResponse=gr.MsgPlaceBid=void 0;var Ua=ii(),Ba=er();function E0(){return{auctionId:BigInt(0),bidder:"",amount:Ua.Coin.fromPartial({})}}gr.MsgPlaceBid={typeUrl:"/kava.auction.v1beta1.MsgPlaceBid",encode(e,t=Ba.BinaryWriter.create()){return e.auctionId!==BigInt(0)&&t.uint32(8).uint64(e.auctionId),e.bidder!==""&&t.uint32(18).string(e.bidder),e.amount!==void 0&&Ua.Coin.encode(e.amount,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof Ba.BinaryReader?e:new Ba.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=E0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.auctionId=n.uint64();break;case 2:r.bidder=n.string();break;case 3:r.amount=Ua.Coin.decode(n,n.uint32());break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=E0();return t.auctionId=e.auctionId!==void 0&&e.auctionId!==null?BigInt(e.auctionId.toString()):BigInt(0),t.bidder=e.bidder??"",t.amount=e.amount!==void 0&&e.amount!==null?Ua.Coin.fromPartial(e.amount):void 0,t},fromAmino(e){let t=E0();return e.auction_id!==void 0&&e.auction_id!==null&&(t.auctionId=BigInt(e.auction_id)),e.bidder!==void 0&&e.bidder!==null&&(t.bidder=e.bidder),e.amount!==void 0&&e.amount!==null&&(t.amount=Ua.Coin.fromAmino(e.amount)),t},toAmino(e){let t={};return t.auction_id=e.auctionId!==BigInt(0)?e.auctionId.toString():void 0,t.bidder=e.bidder===""?void 0:e.bidder,t.amount=e.amount?Ua.Coin.toAmino(e.amount):void 0,t},fromAminoMsg(e){return gr.MsgPlaceBid.fromAmino(e.value)},fromProtoMsg(e){return gr.MsgPlaceBid.decode(e.value)},toProto(e){return gr.MsgPlaceBid.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/kava.auction.v1beta1.MsgPlaceBid",value:gr.MsgPlaceBid.encode(e).finish()}}};function T0(){return{}}gr.MsgPlaceBidResponse={typeUrl:"/kava.auction.v1beta1.MsgPlaceBidResponse",encode(e,t=Ba.BinaryWriter.create()){return t},decode(e,t){let n=e instanceof Ba.BinaryReader?e:new Ba.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=T0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){default:n.skipType(o&7);break}}return r},fromPartial(e){return T0()},fromAmino(e){return T0()},toAmino(e){return{}},fromAminoMsg(e){return gr.MsgPlaceBidResponse.fromAmino(e.value)},fromProtoMsg(e){return gr.MsgPlaceBidResponse.decode(e.value)},toProto(e){return gr.MsgPlaceBidResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/kava.auction.v1beta1.MsgPlaceBidResponse",value:gr.MsgPlaceBidResponse.encode(e).finish()}}}});var z0=L(ce=>{"use strict";B();R();Object.defineProperty(ce,"__esModule",{value:!0});ce.MsgLiquidateResponse=ce.MsgLiquidate=ce.MsgRepayResponse=ce.MsgRepay=ce.MsgBorrowResponse=ce.MsgBorrow=ce.MsgWithdrawResponse=ce.MsgWithdraw=ce.MsgDepositResponse=ce.MsgDeposit=void 0;var _n=ii(),Tt=er();function D0(){return{depositor:"",amount:[]}}ce.MsgDeposit={typeUrl:"/kava.hard.v1beta1.MsgDeposit",encode(e,t=Tt.BinaryWriter.create()){e.depositor!==""&&t.uint32(10).string(e.depositor);for(let n of e.amount)_n.Coin.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){let n=e instanceof Tt.BinaryReader?e:new Tt.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=D0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.depositor=n.string();break;case 2:r.amount.push(_n.Coin.decode(n,n.uint32()));break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=D0();return t.depositor=e.depositor??"",t.amount=e.amount?.map(n=>_n.Coin.fromPartial(n))||[],t},fromAmino(e){let t=D0();return e.depositor!==void 0&&e.depositor!==null&&(t.depositor=e.depositor),t.amount=e.amount?.map(n=>_n.Coin.fromAmino(n))||[],t},toAmino(e){let t={};return t.depositor=e.depositor===""?void 0:e.depositor,e.amount?t.amount=e.amount.map(n=>n?_n.Coin.toAmino(n):void 0):t.amount=e.amount,t},fromAminoMsg(e){return ce.MsgDeposit.fromAmino(e.value)},fromProtoMsg(e){return ce.MsgDeposit.decode(e.value)},toProto(e){return ce.MsgDeposit.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/kava.hard.v1beta1.MsgDeposit",value:ce.MsgDeposit.encode(e).finish()}}};function N0(){return{}}ce.MsgDepositResponse={typeUrl:"/kava.hard.v1beta1.MsgDepositResponse",encode(e,t=Tt.BinaryWriter.create()){return t},decode(e,t){let n=e instanceof Tt.BinaryReader?e:new Tt.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=N0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){default:n.skipType(o&7);break}}return r},fromPartial(e){return N0()},fromAmino(e){return N0()},toAmino(e){return{}},fromAminoMsg(e){return ce.MsgDepositResponse.fromAmino(e.value)},fromProtoMsg(e){return ce.MsgDepositResponse.decode(e.value)},toProto(e){return ce.MsgDepositResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/kava.hard.v1beta1.MsgDepositResponse",value:ce.MsgDepositResponse.encode(e).finish()}}};function L0(){return{depositor:"",amount:[]}}ce.MsgWithdraw={typeUrl:"/kava.hard.v1beta1.MsgWithdraw",encode(e,t=Tt.BinaryWriter.create()){e.depositor!==""&&t.uint32(10).string(e.depositor);for(let n of e.amount)_n.Coin.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){let n=e instanceof Tt.BinaryReader?e:new Tt.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=L0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.depositor=n.string();break;case 2:r.amount.push(_n.Coin.decode(n,n.uint32()));break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=L0();return t.depositor=e.depositor??"",t.amount=e.amount?.map(n=>_n.Coin.fromPartial(n))||[],t},fromAmino(e){let t=L0();return e.depositor!==void 0&&e.depositor!==null&&(t.depositor=e.depositor),t.amount=e.amount?.map(n=>_n.Coin.fromAmino(n))||[],t},toAmino(e){let t={};return t.depositor=e.depositor===""?void 0:e.depositor,e.amount?t.amount=e.amount.map(n=>n?_n.Coin.toAmino(n):void 0):t.amount=e.amount,t},fromAminoMsg(e){return ce.MsgWithdraw.fromAmino(e.value)},fromProtoMsg(e){return ce.MsgWithdraw.decode(e.value)},toProto(e){return ce.MsgWithdraw.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/kava.hard.v1beta1.MsgWithdraw",value:ce.MsgWithdraw.encode(e).finish()}}};function q0(){return{}}ce.MsgWithdrawResponse={typeUrl:"/kava.hard.v1beta1.MsgWithdrawResponse",encode(e,t=Tt.BinaryWriter.create()){return t},decode(e,t){let n=e instanceof Tt.BinaryReader?e:new Tt.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=q0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){default:n.skipType(o&7);break}}return r},fromPartial(e){return q0()},fromAmino(e){return q0()},toAmino(e){return{}},fromAminoMsg(e){return ce.MsgWithdrawResponse.fromAmino(e.value)},fromProtoMsg(e){return ce.MsgWithdrawResponse.decode(e.value)},toProto(e){return ce.MsgWithdrawResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/kava.hard.v1beta1.MsgWithdrawResponse",value:ce.MsgWithdrawResponse.encode(e).finish()}}};function F0(){return{borrower:"",amount:[]}}ce.MsgBorrow={typeUrl:"/kava.hard.v1beta1.MsgBorrow",encode(e,t=Tt.BinaryWriter.create()){e.borrower!==""&&t.uint32(10).string(e.borrower);for(let n of e.amount)_n.Coin.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){let n=e instanceof Tt.BinaryReader?e:new Tt.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=F0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.borrower=n.string();break;case 2:r.amount.push(_n.Coin.decode(n,n.uint32()));break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=F0();return t.borrower=e.borrower??"",t.amount=e.amount?.map(n=>_n.Coin.fromPartial(n))||[],t},fromAmino(e){let t=F0();return e.borrower!==void 0&&e.borrower!==null&&(t.borrower=e.borrower),t.amount=e.amount?.map(n=>_n.Coin.fromAmino(n))||[],t},toAmino(e){let t={};return t.borrower=e.borrower===""?void 0:e.borrower,e.amount?t.amount=e.amount.map(n=>n?_n.Coin.toAmino(n):void 0):t.amount=e.amount,t},fromAminoMsg(e){return ce.MsgBorrow.fromAmino(e.value)},fromProtoMsg(e){return ce.MsgBorrow.decode(e.value)},toProto(e){return ce.MsgBorrow.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/kava.hard.v1beta1.MsgBorrow",value:ce.MsgBorrow.encode(e).finish()}}};function H0(){return{}}ce.MsgBorrowResponse={typeUrl:"/kava.hard.v1beta1.MsgBorrowResponse",encode(e,t=Tt.BinaryWriter.create()){return t},decode(e,t){let n=e instanceof Tt.BinaryReader?e:new Tt.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=H0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){default:n.skipType(o&7);break}}return r},fromPartial(e){return H0()},fromAmino(e){return H0()},toAmino(e){return{}},fromAminoMsg(e){return ce.MsgBorrowResponse.fromAmino(e.value)},fromProtoMsg(e){return ce.MsgBorrowResponse.decode(e.value)},toProto(e){return ce.MsgBorrowResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/kava.hard.v1beta1.MsgBorrowResponse",value:ce.MsgBorrowResponse.encode(e).finish()}}};function K0(){return{sender:"",owner:"",amount:[]}}ce.MsgRepay={typeUrl:"/kava.hard.v1beta1.MsgRepay",encode(e,t=Tt.BinaryWriter.create()){e.sender!==""&&t.uint32(10).string(e.sender),e.owner!==""&&t.uint32(18).string(e.owner);for(let n of e.amount)_n.Coin.encode(n,t.uint32(26).fork()).ldelim();return t},decode(e,t){let n=e instanceof Tt.BinaryReader?e:new Tt.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=K0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.sender=n.string();break;case 2:r.owner=n.string();break;case 3:r.amount.push(_n.Coin.decode(n,n.uint32()));break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=K0();return t.sender=e.sender??"",t.owner=e.owner??"",t.amount=e.amount?.map(n=>_n.Coin.fromPartial(n))||[],t},fromAmino(e){let t=K0();return e.sender!==void 0&&e.sender!==null&&(t.sender=e.sender),e.owner!==void 0&&e.owner!==null&&(t.owner=e.owner),t.amount=e.amount?.map(n=>_n.Coin.fromAmino(n))||[],t},toAmino(e){let t={};return t.sender=e.sender===""?void 0:e.sender,t.owner=e.owner===""?void 0:e.owner,e.amount?t.amount=e.amount.map(n=>n?_n.Coin.toAmino(n):void 0):t.amount=e.amount,t},fromAminoMsg(e){return ce.MsgRepay.fromAmino(e.value)},fromProtoMsg(e){return ce.MsgRepay.decode(e.value)},toProto(e){return ce.MsgRepay.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/kava.hard.v1beta1.MsgRepay",value:ce.MsgRepay.encode(e).finish()}}};function $0(){return{}}ce.MsgRepayResponse={typeUrl:"/kava.hard.v1beta1.MsgRepayResponse",encode(e,t=Tt.BinaryWriter.create()){return t},decode(e,t){let n=e instanceof Tt.BinaryReader?e:new Tt.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=$0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){default:n.skipType(o&7);break}}return r},fromPartial(e){return $0()},fromAmino(e){return $0()},toAmino(e){return{}},fromAminoMsg(e){return ce.MsgRepayResponse.fromAmino(e.value)},fromProtoMsg(e){return ce.MsgRepayResponse.decode(e.value)},toProto(e){return ce.MsgRepayResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/kava.hard.v1beta1.MsgRepayResponse",value:ce.MsgRepayResponse.encode(e).finish()}}};function W0(){return{keeper:"",borrower:""}}ce.MsgLiquidate={typeUrl:"/kava.hard.v1beta1.MsgLiquidate",encode(e,t=Tt.BinaryWriter.create()){return e.keeper!==""&&t.uint32(10).string(e.keeper),e.borrower!==""&&t.uint32(18).string(e.borrower),t},decode(e,t){let n=e instanceof Tt.BinaryReader?e:new Tt.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=W0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.keeper=n.string();break;case 2:r.borrower=n.string();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=W0();return t.keeper=e.keeper??"",t.borrower=e.borrower??"",t},fromAmino(e){let t=W0();return e.keeper!==void 0&&e.keeper!==null&&(t.keeper=e.keeper),e.borrower!==void 0&&e.borrower!==null&&(t.borrower=e.borrower),t},toAmino(e){let t={};return t.keeper=e.keeper===""?void 0:e.keeper,t.borrower=e.borrower===""?void 0:e.borrower,t},fromAminoMsg(e){return ce.MsgLiquidate.fromAmino(e.value)},fromProtoMsg(e){return ce.MsgLiquidate.decode(e.value)},toProto(e){return ce.MsgLiquidate.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/kava.hard.v1beta1.MsgLiquidate",value:ce.MsgLiquidate.encode(e).finish()}}};function J0(){return{}}ce.MsgLiquidateResponse={typeUrl:"/kava.hard.v1beta1.MsgLiquidateResponse",encode(e,t=Tt.BinaryWriter.create()){return t},decode(e,t){let n=e instanceof Tt.BinaryReader?e:new Tt.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=J0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){default:n.skipType(o&7);break}}return r},fromPartial(e){return J0()},fromAmino(e){return J0()},toAmino(e){return{}},fromAminoMsg(e){return ce.MsgLiquidateResponse.fromAmino(e.value)},fromProtoMsg(e){return ce.MsgLiquidateResponse.decode(e.value)},toProto(e){return ce.MsgLiquidateResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/kava.hard.v1beta1.MsgLiquidateResponse",value:ce.MsgLiquidateResponse.encode(e).finish()}}}});var tp=L(ve=>{"use strict";B();R();Object.defineProperty(ve,"__esModule",{value:!0});ve.MsgSwapForExactTokensResponse=ve.MsgSwapForExactTokens=ve.MsgSwapExactForTokensResponse=ve.MsgSwapExactForTokens=ve.MsgWithdrawResponse=ve.MsgWithdraw=ve.MsgDepositResponse=ve.MsgDeposit=void 0;var Me=ii(),nn=er(),Ra=zu();function Z0(){return{depositor:"",tokenA:Me.Coin.fromPartial({}),tokenB:Me.Coin.fromPartial({}),slippage:"",deadline:BigInt(0)}}ve.MsgDeposit={typeUrl:"/kava.swap.v1beta1.MsgDeposit",encode(e,t=nn.BinaryWriter.create()){return e.depositor!==""&&t.uint32(10).string(e.depositor),e.tokenA!==void 0&&Me.Coin.encode(e.tokenA,t.uint32(18).fork()).ldelim(),e.tokenB!==void 0&&Me.Coin.encode(e.tokenB,t.uint32(26).fork()).ldelim(),e.slippage!==""&&t.uint32(34).string(Ra.Decimal.fromUserInput(e.slippage,18).atomics),e.deadline!==BigInt(0)&&t.uint32(40).int64(e.deadline),t},decode(e,t){let n=e instanceof nn.BinaryReader?e:new nn.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Z0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.depositor=n.string();break;case 2:r.tokenA=Me.Coin.decode(n,n.uint32());break;case 3:r.tokenB=Me.Coin.decode(n,n.uint32());break;case 4:r.slippage=Ra.Decimal.fromAtomics(n.string(),18).toString();break;case 5:r.deadline=n.int64();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=Z0();return t.depositor=e.depositor??"",t.tokenA=e.tokenA!==void 0&&e.tokenA!==null?Me.Coin.fromPartial(e.tokenA):void 0,t.tokenB=e.tokenB!==void 0&&e.tokenB!==null?Me.Coin.fromPartial(e.tokenB):void 0,t.slippage=e.slippage??"",t.deadline=e.deadline!==void 0&&e.deadline!==null?BigInt(e.deadline.toString()):BigInt(0),t},fromAmino(e){let t=Z0();return e.depositor!==void 0&&e.depositor!==null&&(t.depositor=e.depositor),e.token_a!==void 0&&e.token_a!==null&&(t.tokenA=Me.Coin.fromAmino(e.token_a)),e.token_b!==void 0&&e.token_b!==null&&(t.tokenB=Me.Coin.fromAmino(e.token_b)),e.slippage!==void 0&&e.slippage!==null&&(t.slippage=e.slippage),e.deadline!==void 0&&e.deadline!==null&&(t.deadline=BigInt(e.deadline)),t},toAmino(e){let t={};return t.depositor=e.depositor===""?void 0:e.depositor,t.token_a=e.tokenA?Me.Coin.toAmino(e.tokenA):void 0,t.token_b=e.tokenB?Me.Coin.toAmino(e.tokenB):void 0,t.slippage=e.slippage===""?void 0:e.slippage,t.deadline=e.deadline!==BigInt(0)?e.deadline.toString():void 0,t},fromAminoMsg(e){return ve.MsgDeposit.fromAmino(e.value)},fromProtoMsg(e){return ve.MsgDeposit.decode(e.value)},toProto(e){return ve.MsgDeposit.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/kava.swap.v1beta1.MsgDeposit",value:ve.MsgDeposit.encode(e).finish()}}};function V0(){return{}}ve.MsgDepositResponse={typeUrl:"/kava.swap.v1beta1.MsgDepositResponse",encode(e,t=nn.BinaryWriter.create()){return t},decode(e,t){let n=e instanceof nn.BinaryReader?e:new nn.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=V0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){default:n.skipType(o&7);break}}return r},fromPartial(e){return V0()},fromAmino(e){return V0()},toAmino(e){return{}},fromAminoMsg(e){return ve.MsgDepositResponse.fromAmino(e.value)},fromProtoMsg(e){return ve.MsgDepositResponse.decode(e.value)},toProto(e){return ve.MsgDepositResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/kava.swap.v1beta1.MsgDepositResponse",value:ve.MsgDepositResponse.encode(e).finish()}}};function G0(){return{from:"",shares:"",minTokenA:Me.Coin.fromPartial({}),minTokenB:Me.Coin.fromPartial({}),deadline:BigInt(0)}}ve.MsgWithdraw={typeUrl:"/kava.swap.v1beta1.MsgWithdraw",encode(e,t=nn.BinaryWriter.create()){return e.from!==""&&t.uint32(10).string(e.from),e.shares!==""&&t.uint32(18).string(e.shares),e.minTokenA!==void 0&&Me.Coin.encode(e.minTokenA,t.uint32(26).fork()).ldelim(),e.minTokenB!==void 0&&Me.Coin.encode(e.minTokenB,t.uint32(34).fork()).ldelim(),e.deadline!==BigInt(0)&&t.uint32(40).int64(e.deadline),t},decode(e,t){let n=e instanceof nn.BinaryReader?e:new nn.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=G0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.from=n.string();break;case 2:r.shares=n.string();break;case 3:r.minTokenA=Me.Coin.decode(n,n.uint32());break;case 4:r.minTokenB=Me.Coin.decode(n,n.uint32());break;case 5:r.deadline=n.int64();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=G0();return t.from=e.from??"",t.shares=e.shares??"",t.minTokenA=e.minTokenA!==void 0&&e.minTokenA!==null?Me.Coin.fromPartial(e.minTokenA):void 0,t.minTokenB=e.minTokenB!==void 0&&e.minTokenB!==null?Me.Coin.fromPartial(e.minTokenB):void 0,t.deadline=e.deadline!==void 0&&e.deadline!==null?BigInt(e.deadline.toString()):BigInt(0),t},fromAmino(e){let t=G0();return e.from!==void 0&&e.from!==null&&(t.from=e.from),e.shares!==void 0&&e.shares!==null&&(t.shares=e.shares),e.min_token_a!==void 0&&e.min_token_a!==null&&(t.minTokenA=Me.Coin.fromAmino(e.min_token_a)),e.min_token_b!==void 0&&e.min_token_b!==null&&(t.minTokenB=Me.Coin.fromAmino(e.min_token_b)),e.deadline!==void 0&&e.deadline!==null&&(t.deadline=BigInt(e.deadline)),t},toAmino(e){let t={};return t.from=e.from===""?void 0:e.from,t.shares=e.shares===""?void 0:e.shares,t.min_token_a=e.minTokenA?Me.Coin.toAmino(e.minTokenA):void 0,t.min_token_b=e.minTokenB?Me.Coin.toAmino(e.minTokenB):void 0,t.deadline=e.deadline!==BigInt(0)?e.deadline.toString():void 0,t},fromAminoMsg(e){return ve.MsgWithdraw.fromAmino(e.value)},fromProtoMsg(e){return ve.MsgWithdraw.decode(e.value)},toProto(e){return ve.MsgWithdraw.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/kava.swap.v1beta1.MsgWithdraw",value:ve.MsgWithdraw.encode(e).finish()}}};function Y0(){return{}}ve.MsgWithdrawResponse={typeUrl:"/kava.swap.v1beta1.MsgWithdrawResponse",encode(e,t=nn.BinaryWriter.create()){return t},decode(e,t){let n=e instanceof nn.BinaryReader?e:new nn.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Y0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){default:n.skipType(o&7);break}}return r},fromPartial(e){return Y0()},fromAmino(e){return Y0()},toAmino(e){return{}},fromAminoMsg(e){return ve.MsgWithdrawResponse.fromAmino(e.value)},fromProtoMsg(e){return ve.MsgWithdrawResponse.decode(e.value)},toProto(e){return ve.MsgWithdrawResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/kava.swap.v1beta1.MsgWithdrawResponse",value:ve.MsgWithdrawResponse.encode(e).finish()}}};function X0(){return{requester:"",exactTokenA:Me.Coin.fromPartial({}),tokenB:Me.Coin.fromPartial({}),slippage:"",deadline:BigInt(0)}}ve.MsgSwapExactForTokens={typeUrl:"/kava.swap.v1beta1.MsgSwapExactForTokens",encode(e,t=nn.BinaryWriter.create()){return e.requester!==""&&t.uint32(10).string(e.requester),e.exactTokenA!==void 0&&Me.Coin.encode(e.exactTokenA,t.uint32(18).fork()).ldelim(),e.tokenB!==void 0&&Me.Coin.encode(e.tokenB,t.uint32(26).fork()).ldelim(),e.slippage!==""&&t.uint32(34).string(Ra.Decimal.fromUserInput(e.slippage,18).atomics),e.deadline!==BigInt(0)&&t.uint32(40).int64(e.deadline),t},decode(e,t){let n=e instanceof nn.BinaryReader?e:new nn.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=X0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.requester=n.string();break;case 2:r.exactTokenA=Me.Coin.decode(n,n.uint32());break;case 3:r.tokenB=Me.Coin.decode(n,n.uint32());break;case 4:r.slippage=Ra.Decimal.fromAtomics(n.string(),18).toString();break;case 5:r.deadline=n.int64();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=X0();return t.requester=e.requester??"",t.exactTokenA=e.exactTokenA!==void 0&&e.exactTokenA!==null?Me.Coin.fromPartial(e.exactTokenA):void 0,t.tokenB=e.tokenB!==void 0&&e.tokenB!==null?Me.Coin.fromPartial(e.tokenB):void 0,t.slippage=e.slippage??"",t.deadline=e.deadline!==void 0&&e.deadline!==null?BigInt(e.deadline.toString()):BigInt(0),t},fromAmino(e){let t=X0();return e.requester!==void 0&&e.requester!==null&&(t.requester=e.requester),e.exact_token_a!==void 0&&e.exact_token_a!==null&&(t.exactTokenA=Me.Coin.fromAmino(e.exact_token_a)),e.token_b!==void 0&&e.token_b!==null&&(t.tokenB=Me.Coin.fromAmino(e.token_b)),e.slippage!==void 0&&e.slippage!==null&&(t.slippage=e.slippage),e.deadline!==void 0&&e.deadline!==null&&(t.deadline=BigInt(e.deadline)),t},toAmino(e){let t={};return t.requester=e.requester===""?void 0:e.requester,t.exact_token_a=e.exactTokenA?Me.Coin.toAmino(e.exactTokenA):void 0,t.token_b=e.tokenB?Me.Coin.toAmino(e.tokenB):void 0,t.slippage=e.slippage===""?void 0:e.slippage,t.deadline=e.deadline!==BigInt(0)?e.deadline.toString():void 0,t},fromAminoMsg(e){return ve.MsgSwapExactForTokens.fromAmino(e.value)},fromProtoMsg(e){return ve.MsgSwapExactForTokens.decode(e.value)},toProto(e){return ve.MsgSwapExactForTokens.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/kava.swap.v1beta1.MsgSwapExactForTokens",value:ve.MsgSwapExactForTokens.encode(e).finish()}}};function Q0(){return{}}ve.MsgSwapExactForTokensResponse={typeUrl:"/kava.swap.v1beta1.MsgSwapExactForTokensResponse",encode(e,t=nn.BinaryWriter.create()){return t},decode(e,t){let n=e instanceof nn.BinaryReader?e:new nn.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=Q0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){default:n.skipType(o&7);break}}return r},fromPartial(e){return Q0()},fromAmino(e){return Q0()},toAmino(e){return{}},fromAminoMsg(e){return ve.MsgSwapExactForTokensResponse.fromAmino(e.value)},fromProtoMsg(e){return ve.MsgSwapExactForTokensResponse.decode(e.value)},toProto(e){return ve.MsgSwapExactForTokensResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/kava.swap.v1beta1.MsgSwapExactForTokensResponse",value:ve.MsgSwapExactForTokensResponse.encode(e).finish()}}};function j0(){return{requester:"",tokenA:Me.Coin.fromPartial({}),exactTokenB:Me.Coin.fromPartial({}),slippage:"",deadline:BigInt(0)}}ve.MsgSwapForExactTokens={typeUrl:"/kava.swap.v1beta1.MsgSwapForExactTokens",encode(e,t=nn.BinaryWriter.create()){return e.requester!==""&&t.uint32(10).string(e.requester),e.tokenA!==void 0&&Me.Coin.encode(e.tokenA,t.uint32(18).fork()).ldelim(),e.exactTokenB!==void 0&&Me.Coin.encode(e.exactTokenB,t.uint32(26).fork()).ldelim(),e.slippage!==""&&t.uint32(34).string(Ra.Decimal.fromUserInput(e.slippage,18).atomics),e.deadline!==BigInt(0)&&t.uint32(40).int64(e.deadline),t},decode(e,t){let n=e instanceof nn.BinaryReader?e:new nn.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=j0();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.requester=n.string();break;case 2:r.tokenA=Me.Coin.decode(n,n.uint32());break;case 3:r.exactTokenB=Me.Coin.decode(n,n.uint32());break;case 4:r.slippage=Ra.Decimal.fromAtomics(n.string(),18).toString();break;case 5:r.deadline=n.int64();break;default:n.skipType(o&7);break}}return r},fromPartial(e){let t=j0();return t.requester=e.requester??"",t.tokenA=e.tokenA!==void 0&&e.tokenA!==null?Me.Coin.fromPartial(e.tokenA):void 0,t.exactTokenB=e.exactTokenB!==void 0&&e.exactTokenB!==null?Me.Coin.fromPartial(e.exactTokenB):void 0,t.slippage=e.slippage??"",t.deadline=e.deadline!==void 0&&e.deadline!==null?BigInt(e.deadline.toString()):BigInt(0),t},fromAmino(e){let t=j0();return e.requester!==void 0&&e.requester!==null&&(t.requester=e.requester),e.token_a!==void 0&&e.token_a!==null&&(t.tokenA=Me.Coin.fromAmino(e.token_a)),e.exact_token_b!==void 0&&e.exact_token_b!==null&&(t.exactTokenB=Me.Coin.fromAmino(e.exact_token_b)),e.slippage!==void 0&&e.slippage!==null&&(t.slippage=e.slippage),e.deadline!==void 0&&e.deadline!==null&&(t.deadline=BigInt(e.deadline)),t},toAmino(e){let t={};return t.requester=e.requester===""?void 0:e.requester,t.token_a=e.tokenA?Me.Coin.toAmino(e.tokenA):void 0,t.exact_token_b=e.exactTokenB?Me.Coin.toAmino(e.exactTokenB):void 0,t.slippage=e.slippage===""?void 0:e.slippage,t.deadline=e.deadline!==BigInt(0)?e.deadline.toString():void 0,t},fromAminoMsg(e){return ve.MsgSwapForExactTokens.fromAmino(e.value)},fromProtoMsg(e){return ve.MsgSwapForExactTokens.decode(e.value)},toProto(e){return ve.MsgSwapForExactTokens.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/kava.swap.v1beta1.MsgSwapForExactTokens",value:ve.MsgSwapForExactTokens.encode(e).finish()}}};function ep(){return{}}ve.MsgSwapForExactTokensResponse={typeUrl:"/kava.swap.v1beta1.MsgSwapForExactTokensResponse",encode(e,t=nn.BinaryWriter.create()){return t},decode(e,t){let n=e instanceof nn.BinaryReader?e:new nn.BinaryReader(e),i=t===void 0?n.len:n.pos+t,r=ep();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){default:n.skipType(o&7);break}}return r},fromPartial(e){return ep()},fromAmino(e){return ep()},toAmino(e){return{}},fromAminoMsg(e){return ve.MsgSwapForExactTokensResponse.fromAmino(e.value)},fromProtoMsg(e){return ve.MsgSwapForExactTokensResponse.decode(e.value)},toProto(e){return ve.MsgSwapForExactTokensResponse.encode(e).finish()},toProtoMsg(e){return{typeUrl:"/kava.swap.v1beta1.MsgSwapForExactTokensResponse",value:ve.MsgSwapForExactTokensResponse.encode(e).finish()}}}});var mv=L(xi=>{"use strict";B();R();var E8=xi&&xi.__createBinding||(Object.create?function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]}),T8=xi&&xi.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),np=xi&&xi.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&E8(t,e,n);return T8(t,e),t};Object.defineProperty(xi,"__esModule",{value:!0});xi.KavaRegistry=void 0;var O8=np(O0()),Ed=np(z0()),df=np(tp());xi.KavaRegistry=[["/kava.auction.v1beta1.MsgPlaceBid",O8.MsgPlaceBid],["/kava.hard.v1beta1.MsgDeposit",Ed.MsgDeposit],["/kava.hard.v1beta1.MsgWithdraw",Ed.MsgWithdraw],["/kava.hard.v1beta1.MsgBorrow",Ed.MsgBorrow],["/kava.hard.v1beta1.MsgRepay",Ed.MsgRepay],["/kava.hard.v1beta1.MsgLiquidate",Ed.MsgLiquidate],["/kava.swap.v1beta1.MsgDeposit",df.MsgDeposit],["/kava.swap.v1beta1.MsgWithdraw",df.MsgWithdraw],["/kava.swap.v1beta1.MsgSwapExactForTokens",df.MsgSwapExactForTokens],["/kava.swap.v1beta1.MsgSwapForExactTokens",df.MsgSwapForExactTokens]]});var hv=L(uf=>{"use strict";B();R();Object.defineProperty(uf,"__esModule",{value:!0});uf.AuctionAminoConverter=void 0;var pv=O0();uf.AuctionAminoConverter={"/kava.auction.v1beta1.MsgPlaceBid":{aminoType:"auction/MsgPlaceBid",toAmino:pv.MsgPlaceBid.toAmino,fromAmino:pv.MsgPlaceBid.fromAmino}}});var gv=L(ff=>{"use strict";B();R();Object.defineProperty(ff,"__esModule",{value:!0});ff.HardAminoConverter=void 0;var Pi=z0();ff.HardAminoConverter={"/kava.hard.v1beta1.MsgDeposit":{aminoType:"hard/MsgDeposit",toAmino:Pi.MsgDeposit.toAmino,fromAmino:Pi.MsgDeposit.fromAmino},"/kava.hard.v1beta1.MsgWithdraw":{aminoType:"hard/MsgWithdraw",toAmino:Pi.MsgWithdraw.toAmino,fromAmino:Pi.MsgWithdraw.fromAmino},"/kava.hard.v1beta1.MsgBorrow":{aminoType:"hard/MsgBorrow",toAmino:Pi.MsgBorrow.toAmino,fromAmino:Pi.MsgBorrow.fromAmino},"/kava.hard.v1beta1.MsgRepay":{aminoType:"hard/MsgRepay",toAmino:Pi.MsgRepay.toAmino,fromAmino:Pi.MsgRepay.fromAmino},"/kava.hard.v1beta1.MsgLiquidate":{aminoType:"hard/MsgLiquidate",toAmino:Pi.MsgLiquidate.toAmino,fromAmino:Pi.MsgLiquidate.fromAmino}}});var yv=L(cf=>{"use strict";B();R();Object.defineProperty(cf,"__esModule",{value:!0});cf.SwapAminoConverter=void 0;var qo=tp();cf.SwapAminoConverter={"/kava.swap.v1beta1.MsgDeposit":{aminoType:"swap/MsgDeposit",toAmino:qo.MsgDeposit.toAmino,fromAmino:qo.MsgDeposit.fromAmino},"/kava.swap.v1beta1.MsgWithdraw":{aminoType:"swap/MsgWithdraw",toAmino:qo.MsgWithdraw.toAmino,fromAmino:qo.MsgWithdraw.fromAmino},"/kava.swap.v1beta1.MsgSwapExactForTokens":{aminoType:"swap/MsgSwapExactForTokens",toAmino:qo.MsgSwapExactForTokens.toAmino,fromAmino:qo.MsgSwapExactForTokens.fromAmino},"/kava.swap.v1beta1.MsgSwapForExactTokens":{aminoType:"swap/MsgSwapForExactTokens",toAmino:qo.MsgSwapForExactTokens.toAmino,fromAmino:qo.MsgSwapForExactTokens.fromAmino}}});var bv=L(lf=>{"use strict";B();R();Object.defineProperty(lf,"__esModule",{value:!0});lf.KavaAminoConverters=void 0;var D8=hv(),N8=gv(),L8=yv();lf.KavaAminoConverters={...D8.AuctionAminoConverter,...N8.HardAminoConverter,...L8.SwapAminoConverter}});var Av=L(Fo=>{"use strict";B();R();var q8=Fo&&Fo.__createBinding||(Object.create?function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]}),vv=Fo&&Fo.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&q8(t,e,n)};Object.defineProperty(Fo,"__esModule",{value:!0});vv(mv(),Fo);vv(bv(),Fo)});var rp=L(Ko=>{"use strict";B();R();Object.defineProperty(Ko,"__esModule",{value:!0});Ko.PrivKey=Ko.PubKey=Ko.protobufPackage=void 0;var Mv=xt(),Wi=xt(),Sv=lr();Ko.protobufPackage="cosmos.crypto.secp256k1";function wv(){return{key:new Uint8Array}}Ko.PubKey={encode(e,t=Wi._m0.Writer.create()){return e.key.length!==0&&t.uint32(10).bytes(e.key),t},decode(e,t){let n=e instanceof Wi._m0.Reader?e:new Wi._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=wv();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.key=n.bytes();break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{key:(0,Sv.isSet)(e.key)?_v(e.key):new Uint8Array}},toJSON(e){let t={};return e.key!==void 0&&(t.key=Iv(e.key!==void 0?e.key:new Uint8Array)),t},fromPartial(e){let t=wv();return t.key=e.key??new Uint8Array,t}};function kv(){return{key:new Uint8Array}}Ko.PrivKey={encode(e,t=Wi._m0.Writer.create()){return e.key.length!==0&&t.uint32(10).bytes(e.key),t},decode(e,t){let n=e instanceof Wi._m0.Reader?e:new Wi._m0.Reader(e),i=t===void 0?n.len:n.pos+t,r=kv();for(;n.pos<i;){let o=n.uint32();switch(o>>>3){case 1:r.key=n.bytes();break;default:n.skipType(o&7);break}}return r},fromJSON(e){return{key:(0,Sv.isSet)(e.key)?_v(e.key):new Uint8Array}},toJSON(e){let t={};return e.key!==void 0&&(t.key=Iv(e.key!==void 0?e.key:new Uint8Array)),t},fromPartial(e){let t=kv();return t.key=e.key??new Uint8Array,t}};var Ho=(()=>{if(typeof Ho<"u")return Ho;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof Ho<"u")return Ho;throw"Unable to locate global object"})(),F8=Ho.atob||(e=>Ho.Buffer.from(e,"base64").toString("binary"));function _v(e){let t=F8(e),n=new Uint8Array(t.length);for(let i=0;i<t.length;++i)n[i]=t.charCodeAt(i);return n}var H8=Ho.btoa||(e=>Ho.Buffer.from(e,"binary").toString("base64"));function Iv(e){let t=[];return e.forEach(n=>{t.push(String.fromCharCode(n))}),H8(t.join(""))}Wi._m0.util.Long!==Mv.Long&&(Wi._m0.util.Long=Mv.Long,Wi._m0.configure())});var op=L(Ui=>{"use strict";B();R();Object.defineProperty(Ui,"__esModule",{value:!0});Ui.encodeSecp256k1Signature=Ui.encodeSecp256k1Pubkey=Ui.encodePubkey=Ui.pubkeyType=void 0;var ip=xt(),K8=pa(),xv=rp();Ui.pubkeyType={secp256k1:"tendermint/PubKeySecp256k1",ed25519:"tendermint/PubKeyEd25519",sr25519:"tendermint/PubKeySr25519",multisigThreshold:"tendermint/PubKeyMultisigThreshold"};function $8(e,t,n){let i=xv.PubKey.fromPartial({key:ip.base.fromBase64(e)}),r;return n?r=n:r=t?"/ethermint.crypto.v1.ethsecp256k1.PubKey":"/cosmos.crypto.secp256k1.PubKey",K8.Any.fromPartial({typeUrl:r,value:Uint8Array.from(xv.PubKey.encode(i).finish())})}Ui.encodePubkey=$8;function W8(e){if(e.length!==33||e[0]!==2&&e[0]!==3)throw new Error("Public key must be compressed secp256k1, i.e. 33 bytes starting with 0x02 or 0x03");return ip.base.toBase64(e)}Ui.encodeSecp256k1Pubkey=W8;function J8(e,t,n){if(t.length!==64&&!n)throw new Error("Signature must be 64 bytes long. Cosmos SDK uses a 2x32 byte fixed length encoding for the secp256k1 signature integers r and s.");if(t.length!==65&&n)throw new Error("Signature must be 65 bytes long. Cosmos SDK uses a 2x32 byte fixed length encoding for the secp256k1 signature integers r and s.");return ip.base.toBase64(t)}Ui.encodeSecp256k1Signature=J8});var Cv=L(br=>{"use strict";B();R();Object.defineProperty(br,"__esModule",{value:!0});br.doSign=br.signDirect=br.signTx=br.makeSignBytes=br.makeSignDoc=br.makeAuthInfoBytes=void 0;var yr=xt(),Ji=lr(),z8=Xc(),Z8=nl(),mf=op(),V8=ap();function G8(e,t){return e.map(({pubkey:n,sequence:i})=>({publicKey:n,modeInfo:{single:{mode:t}},sequence:yr.Long.fromNumber(i)}))}function Pv(e,t,n,i=z8.SignMode.SIGN_MODE_DIRECT){let r={signerInfos:G8(e,i),fee:{amount:[...t],gasLimit:yr.Long.fromNumber(n)}};return Ji.AuthInfo.encode(Ji.AuthInfo.fromPartial(r)).finish()}br.makeAuthInfoBytes=Pv;function Uv(e,t,n,i){return{bodyBytes:e,authInfoBytes:t,chainId:n,accountNumber:yr.Long.fromNumber(i)}}br.makeSignDoc=Uv;function sp({accountNumber:e,authInfoBytes:t,bodyBytes:n,chainId:i}){let r=Ji.SignDoc.fromPartial({accountNumber:e,authInfoBytes:t,bodyBytes:n,chainId:i});return Ji.SignDoc.encode(r).finish()}br.makeSignBytes=sp;async function Y8(e,t,n="",i,r){let o=await Bv(e,t,n,i,r);return r.privateKey?Ji.TxRaw.encode(o).finish():o}br.signTx=Y8;async function Bv(e,t,n,i,{accountNumber:r,sequence:o,chainId:f,privateKey:c,useEthSecp256k1:g,publicKey:A,pubKeyUrl:w}){let M=c?(0,V8.private2Public)(c,!0):yr.base.fromHex(A),P=(0,mf.encodePubkey)((0,mf.encodeSecp256k1Pubkey)(M),g,w),x={typeUrl:"/cosmos.tx.v1beta1.TxBody",value:{messages:e,memo:n,timeoutHeight:i}},U=Z8.registry.encode(x),_=yr.math.Int53.fromString(t.gas).toNumber(),T=Pv([{pubkey:P,sequence:o}],t.amount,_),D=Uv(U,T,f,r);if(!c){let N=sp(D),Z=g?yr.base.keccak256(N):yr.base.sha256(N);return{raw:yr.base.toHex(Ji.TxRaw.encode(Ji.TxRaw.fromPartial({bodyBytes:D.bodyBytes,authInfoBytes:D.authInfoBytes,signatures:[]})).finish()),hash:yr.base.toHex(Z),doc:yr.base.toHex(Ji.SignDoc.encode(D).finish())}}let K=await Rv(D,M,c,g);return Ji.TxRaw.fromPartial({bodyBytes:D.bodyBytes,authInfoBytes:D.authInfoBytes,signatures:[yr.base.fromBase64(K)]})}br.signDirect=Bv;async function Rv(e,t,n,i){let r=sp(e),o=i?yr.base.keccak256(r):yr.base.sha256(r),{signature:f,recovery:c}=yr.signUtil.secp256k1.sign(C.Buffer.from(o),n);if(i){let g=[Uint8Array.from(f),Uint8Array.of(c)],A=C.Buffer.concat(g);return Promise.resolve((0,mf.encodeSecp256k1Signature)(t,A,!0))}else return Promise.resolve((0,mf.encodeSecp256k1Signature)(t,f,!1))}br.doSign=Rv});var Ev=L(pf=>{"use strict";B();R();Object.defineProperty(pf,"__esModule",{value:!0});pf.AminoTypes=void 0;function X8(e){return typeof e[1]!="string"}var dp=class{constructor(t){this.register=t}toAmino({typeUrl:t,value:n}){let i=this.register[t];if(i==="not_supported_by_chain")throw new Error(`The message type '${t}' cannot be signed using the Amino JSON sign mode because this is not supported by chain.`);if(!i)throw new Error(`Type URL '${t}' does not exist in the Amino message type register. If you need support for this message type, you can pass in additional entries to the AminoTypes constructor. If you think this message type should be included by default, please open an issue at https://github.com/cosmos/cosmjs/issues.`);return{type:i.aminoType,value:i.toAmino(n)}}fromAmino({type:t,value:n}){let i=Object.entries(this.register).filter(X8).filter(([r,{aminoType:o}])=>o===t);switch(i.length){case 0:throw new Error(`Amino type identifier '${t}' does not exist in the Amino message type register. If you need support for this message type, you can pass in additional entries to the AminoTypes constructor. If you think this message type should be included by default, please open an issue at https://github.com/cosmos/cosmjs/issues.`);case 1:{let[r,o]=i[0];return{typeUrl:r,value:o.fromAmino(n)}}default:throw new Error(`Multiple types are registered with Amino type identifier '${t}': '`+i.map(([r,o])=>r).sort().join("', '")+"'. Thus fromAmino cannot be performed.")}}};pf.AminoTypes=dp});var Tv=L(Ca=>{"use strict";B();R();Object.defineProperty(Ca,"__esModule",{value:!0});Ca.arrayContentStartsWith=Ca.arrayContentEquals=void 0;function Q8(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(e[n]!==t[n])return!1;return!0}Ca.arrayContentEquals=Q8;function j8(e,t){if(e.length<t.length)return!1;for(let n=0;n<t.length;++n)if(e[n]!==t[n])return!1;return!0}Ca.arrayContentStartsWith=j8});var Ov=L(ar=>{"use strict";B();R();Object.defineProperty(ar,"__esModule",{value:!0});ar.isMultisigThresholdPubkey=ar.isSinglePubkey=ar.pubkeyType=ar.isSecp256k1Pubkey=ar.isEd25519Pubkey=void 0;function e5(e){return e.type==="tendermint/PubKeyEd25519"}ar.isEd25519Pubkey=e5;function t5(e){return e.type==="tendermint/PubKeySecp256k1"}ar.isSecp256k1Pubkey=t5;ar.pubkeyType={secp256k1:"tendermint/PubKeySecp256k1",ed25519:"tendermint/PubKeyEd25519",sr25519:"tendermint/PubKeySr25519",multisigThreshold:"tendermint/PubKeyMultisigThreshold"};function n5(e){return[ar.pubkeyType.ed25519,ar.pubkeyType.secp256k1,ar.pubkeyType.sr25519].includes(e.type)}ar.isSinglePubkey=n5;function r5(e){return e.type==="tendermint/PubKeyMultisigThreshold"}ar.isMultisigThresholdPubkey=r5});var qv=L(zr=>{"use strict";B();R();Object.defineProperty(zr,"__esModule",{value:!0});zr.encodeBech32Pubkey=zr.encodeAminoPubkey=zr.decodeBech32Pubkey=zr.decodeAminoPubkey=zr.encodeSecp256k1Pubkey=void 0;var vr=xt(),Td=Tv(),$o=Ov();function i5(e){if(e.length!==33||e[0]!==2&&e[0]!==3)throw new Error("Public key must be compressed secp256k1, i.e. 33 bytes starting with 0x02 or 0x03");return{type:$o.pubkeyType.secp256k1,value:vr.base.toBase64(e)}}zr.encodeSecp256k1Pubkey=i5;var up=vr.base.fromHex("eb5ae98721"),fp=vr.base.fromHex("1624de6420"),Dv=vr.base.fromHex("0dfb100520"),hf=vr.base.fromHex("22c1f7e2");function cp(e){if((0,Td.arrayContentStartsWith)(e,up)){let t=e.slice(up.length);if(t.length!==33)throw new Error("Invalid rest data length. Expected 33 bytes (compressed secp256k1 pubkey).");return{type:$o.pubkeyType.secp256k1,value:vr.base.toBase64(t)}}else if((0,Td.arrayContentStartsWith)(e,fp)){let t=e.slice(fp.length);if(t.length!==32)throw new Error("Invalid rest data length. Expected 32 bytes (Ed25519 pubkey).");return{type:$o.pubkeyType.ed25519,value:vr.base.toBase64(t)}}else if((0,Td.arrayContentStartsWith)(e,Dv)){let t=e.slice(Dv.length);if(t.length!==32)throw new Error("Invalid rest data length. Expected 32 bytes (Sr25519 pubkey).");return{type:$o.pubkeyType.sr25519,value:vr.base.toBase64(t)}}else{if((0,Td.arrayContentStartsWith)(e,hf))return s5(e);throw new Error("Unsupported public key type. Amino data starts with: "+vr.base.toHex(e.slice(0,5)))}}zr.decodeAminoPubkey=cp;function o5(e){let[t,n]=vr.base.fromBech32(e);return cp(n)}zr.decodeBech32Pubkey=o5;function Nv(e){if(e.length<1)throw new Error("Can't decode varint. EOF");if(e[0]>127)throw new Error("Decoding numbers > 127 is not supported here. Please tell those lazy CosmJS maintainers to port the binary.Varint implementation from the Go standard library and write some tests.");return[e[0],1]}function s5(e){let t=Array.from(e),n=t.splice(0,hf.length);if(!(0,Td.arrayContentStartsWith)(n,hf))throw new Error("Invalid multisig prefix.");if(t.shift()!=8)throw new Error("Invalid multisig data. Expecting 0x08 prefix before threshold.");let[i,r]=Nv(t);t.splice(0,r);let o=[];for(;t.length>0;){if(t.shift()!=18)throw new Error("Invalid multisig data. Expecting 0x12 prefix before participant pubkey length.");let[f,c]=Nv(t);if(t.splice(0,c),t.length<f)throw new Error("Invalid multisig data length.");let g=t.splice(0,f),A=cp(Uint8Array.from(g));o.push(A)}return{type:$o.pubkeyType.multisigThreshold,value:{threshold:i.toString(),pubkeys:o}}}function Lv(e){let t=vr.math.Uint53.fromString(e.toString()).toNumber();if(t>127)throw new Error("Encoding numbers > 127 is not supported here. Please tell those lazy CosmJS maintainers to port the binary.PutUvarint implementation from the Go standard library and write some tests.");return[t]}function lp(e){if((0,$o.isMultisigThresholdPubkey)(e)){let t=Array.from(hf);t.push(8),t.push(...Lv(e.value.threshold));for(let n of e.value.pubkeys.map(i=>lp(i)))t.push(18),t.push(...Lv(n.length)),t.push(...n);return new Uint8Array(t)}else{if((0,$o.isEd25519Pubkey)(e))return new Uint8Array([...fp,...vr.base.fromBase64(e.value)]);if((0,$o.isSecp256k1Pubkey)(e))return new Uint8Array([...up,...vr.base.fromBase64(e.value)]);throw new Error("Unsupported pubkey type")}}zr.encodeAminoPubkey=lp;function a5(e,t){return vr.base.toBech32(t,lp(e))}zr.encodeBech32Pubkey=a5});var Wv=L(Nt=>{"use strict";B();R();Object.defineProperty(Nt,"__esModule",{value:!0});Nt.createStakingAminoConverters=Nt.isAminoMsgUndelegate=Nt.isAminoMsgBeginRedelegate=Nt.isAminoMsgDelegate=Nt.isAminoMsgEditValidator=Nt.isAminoMsgCreateValidator=Nt.createBankAminoConverters=Nt.isAminoMsgMultiSend=Nt.isAminoMsgSend=Nt.createIbcAminoConverters=Nt.isAminoMsgTransfer=Nt.createDefaultAminoConverters=Nt.assertDefinedAndNotNull=void 0;var Ea=xt(),Fv=qv();function zi(e,t){if(e==null)throw new Error(t??"value is undefined or null")}Nt.assertDefinedAndNotNull=zi;function d5(e){return{...Kv(),...$v(e),...Hv()}}Nt.createDefaultAminoConverters=d5;function u5(e){return e.type==="cosmos-sdk/MsgTransfer"}Nt.isAminoMsgTransfer=u5;function mp(e){if(typeof e=="string")return e===""?void 0:e;if(typeof e=="number")return e===0?void 0:e;if(Ea.Long.isLong(e))return e.isZero()?void 0:e;throw new Error(`Got unsupported type '${typeof e}'`)}function Hv(){return{"/ibc.applications.transfer.v1.MsgTransfer":{aminoType:"cosmos-sdk/MsgTransfer",toAmino:({sourcePort:e,sourceChannel:t,token:n,sender:i,receiver:r,timeoutHeight:o,timeoutTimestamp:f})=>({source_port:e,source_channel:t,token:n,sender:i,receiver:r,timeout_height:o?{revision_height:mp(o.revisionHeight)?.toString(),revision_number:mp(o.revisionNumber)?.toString()}:{},timeout_timestamp:mp(f)?.toString()}),fromAmino:({source_port:e,source_channel:t,token:n,sender:i,receiver:r,timeout_height:o,timeout_timestamp:f})=>({sourcePort:e,sourceChannel:t,token:n,sender:i,receiver:r,timeoutHeight:o?{revisionHeight:Ea.Long.fromString(o.revision_height||"0",!0),revisionNumber:Ea.Long.fromString(o.revision_number||"0",!0)}:void 0,timeoutTimestamp:Ea.Long.fromString(f||"0",!0)})}}}Nt.createIbcAminoConverters=Hv;function f5(e){return e.type==="cosmos-sdk/MsgSend"}Nt.isAminoMsgSend=f5;function c5(e){return e.type==="cosmos-sdk/MsgMultiSend"}Nt.isAminoMsgMultiSend=c5;function Kv(){return{"/cosmos.bank.v1beta1.MsgSend":{aminoType:"cosmos-sdk/MsgSend",toAmino:({fromAddress:e,toAddress:t,amount:n})=>({from_address:e,to_address:t,amount:[...n]}),fromAmino:({from_address:e,to_address:t,amount:n})=>({fromAddress:e,toAddress:t,amount:[...n]})},"/cosmos.bank.v1beta1.MsgMultiSend":{aminoType:"cosmos-sdk/MsgMultiSend",toAmino:({inputs:e,outputs:t})=>({inputs:e.map(n=>({address:n.address,coins:[...n.coins]})),outputs:t.map(n=>({address:n.address,coins:[...n.coins]}))}),fromAmino:({inputs:e,outputs:t})=>({inputs:e.map(n=>({address:n.address,coins:[...n.coins]})),outputs:t.map(n=>({address:n.address,coins:[...n.coins]}))})}}}Nt.createBankAminoConverters=Kv;function l5(e){return e.type==="cosmos-sdk/MsgCreateValidator"}Nt.isAminoMsgCreateValidator=l5;function m5(e){return e.type==="cosmos-sdk/MsgEditValidator"}Nt.isAminoMsgEditValidator=m5;function p5(e){return e.type==="cosmos-sdk/MsgDelegate"}Nt.isAminoMsgDelegate=p5;function h5(e){return e.type==="cosmos-sdk/MsgBeginRedelegate"}Nt.isAminoMsgBeginRedelegate=h5;function g5(e){return e.type==="cosmos-sdk/MsgUndelegate"}Nt.isAminoMsgUndelegate=g5;function $v(e){return{"/cosmos.staking.v1beta1.MsgBeginRedelegate":{aminoType:"cosmos-sdk/MsgBeginRedelegate",toAmino:({delegatorAddress:t,validatorSrcAddress:n,validatorDstAddress:i,amount:r})=>(zi(r,"missing amount"),{delegator_address:t,validator_src_address:n,validator_dst_address:i,amount:r}),fromAmino:({delegator_address:t,validator_src_address:n,validator_dst_address:i,amount:r})=>({delegatorAddress:t,validatorSrcAddress:n,validatorDstAddress:i,amount:r})},"/cosmos.staking.v1beta1.MsgCreateValidator":{aminoType:"cosmos-sdk/MsgCreateValidator",toAmino:({description:t,commission:n,minSelfDelegation:i,delegatorAddress:r,validatorAddress:o,pubkey:f,value:c})=>(zi(t,"missing description"),zi(n,"missing commission"),zi(f,"missing pubkey"),zi(c,"missing value"),{description:{moniker:t.moniker,identity:t.identity,website:t.website,security_contact:t.securityContact,details:t.details},commission:{rate:n.rate,max_rate:n.maxRate,max_change_rate:n.maxChangeRate},min_self_delegation:i,delegator_address:r,validator_address:o,pubkey:(0,Fv.encodeBech32Pubkey)({type:"tendermint/PubKeySecp256k1",value:Ea.base.toBase64(f.value)},e),value:c}),fromAmino:({description:t,commission:n,min_self_delegation:i,delegator_address:r,validator_address:o,pubkey:f,value:c})=>{let g=(0,Fv.decodeBech32Pubkey)(f);if(g.type!=="tendermint/PubKeySecp256k1")throw new Error("Only Secp256k1 public keys are supported");return{description:{moniker:t.moniker,identity:t.identity,website:t.website,securityContact:t.security_contact,details:t.details},commission:{rate:n.rate,maxRate:n.max_rate,maxChangeRate:n.max_change_rate},minSelfDelegation:i,delegatorAddress:r,validatorAddress:o,pubkey:{typeUrl:"/cosmos.crypto.secp256k1.PubKey",value:Ea.base.fromBase64(g.value)},value:c}}},"/cosmos.staking.v1beta1.MsgDelegate":{aminoType:"cosmos-sdk/MsgDelegate",toAmino:({delegatorAddress:t,validatorAddress:n,amount:i})=>(zi(i,"missing amount"),{delegator_address:t,validator_address:n,amount:i}),fromAmino:({delegator_address:t,validator_address:n,amount:i})=>({delegatorAddress:t,validatorAddress:n,amount:i})},"/cosmos.staking.v1beta1.MsgEditValidator":{aminoType:"cosmos-sdk/MsgEditValidator",toAmino:({description:t,commissionRate:n,minSelfDelegation:i,validatorAddress:r})=>(zi(t,"missing description"),{description:{moniker:t.moniker,identity:t.identity,website:t.website,security_contact:t.securityContact,details:t.details},commission_rate:n,min_self_delegation:i,validator_address:r}),fromAmino:({description:t,commission_rate:n,min_self_delegation:i,validator_address:r})=>({description:{moniker:t.moniker,identity:t.identity,website:t.website,securityContact:t.security_contact,details:t.details},commissionRate:n,minSelfDelegation:i,validatorAddress:r})},"/cosmos.staking.v1beta1.MsgUndelegate":{aminoType:"cosmos-sdk/MsgUndelegate",toAmino:({delegatorAddress:t,validatorAddress:n,amount:i})=>(zi(i,"missing amount"),{delegator_address:t,validator_address:n,amount:i}),fromAmino:({delegator_address:t,validator_address:n,amount:i})=>({delegatorAddress:t,validatorAddress:n,amount:i})}}}Nt.createStakingAminoConverters=$v});var zv=L(Wo=>{"use strict";B();R();Object.defineProperty(Wo,"__esModule",{value:!0});Wo.serializeSignDoc=Wo.makeSignDoc=Wo.sortedJsonStringify=void 0;var pp=xt();function hp(e){if(typeof e!="object"||e===null)return e;if(Array.isArray(e))return e.map(hp);let t=Object.keys(e).sort(),n={};return t.forEach(i=>{n[i]=hp(e[i])}),n}function Jv(e){return JSON.stringify(hp(e))}Wo.sortedJsonStringify=Jv;function y5(e,t,n,i,r,o){return{chain_id:n,account_number:pp.math.Uint53.fromString(r.toString()).toString(),sequence:pp.math.Uint53.fromString(o.toString()).toString(),fee:t,msgs:e,memo:i||""}}Wo.makeSignDoc=y5;function b5(e){return pp.base.toUtf8(Jv(e))}Wo.serializeSignDoc=b5});var gp=L(Es=>{"use strict";B();R();Object.defineProperty(Es,"__esModule",{value:!0});Es.isHexStr=Es.SignType=void 0;var v5;(function(e){e[e.Secp256k1=1]="Secp256k1",e[e.ECDSA_P256=2]="ECDSA_P256",e[e.ED25519=3]="ED25519",e[e.StarknetSignType=4]="StarknetSignType",e[e.TezosSignType=5]="TezosSignType"})(v5=Es.SignType||(Es.SignType={}));function A5(e){return!(e.length<=1||(e.startsWith("0x")||(e="0x"+e),!e.match(/^0x[0-9A-Fa-f]*$/)))}Es.isHexStr=A5});var Zv=L(Zr=>{"use strict";B();R();Object.defineProperty(Zr,"__esModule",{value:!0});Zr.CoinCurveMap=Zr.MultiAddressCoins=Zr.segwitType=Zr.Currency=void 0;var lt;(function(e){e[e.NULL=-1]="NULL",e[e.BTC=0]="BTC",e[e.TBTC=1]="TBTC",e[e.ETH=60]="ETH",e[e.LTC=2]="LTC",e[e.DOGE=3]="DOGE",e[e.BCH=145]="BCH",e[e.BSV=236]="BSV",e[e.TRX=195]="TRX",e[e.SOL=501]="SOL",e[e.APTOS=637]="APTOS",e[e.OMNI_USDT=20001]="OMNI_USDT",e[e.OMNI_USDT_TEST=20002]="OMNI_USDT_TEST",e[e.SUI=784]="SUI",e[e.Initia=3178]="Initia",e[e.ATOM=118]="ATOM",e[e.OSMO=1e3]="OSMO",e[e.EVMOS=1001]="EVMOS",e[e.AXL=1002]="AXL",e[e.CRO=1003]="CRO",e[e.Iris=1004]="Iris",e[e.Juno=1005]="Juno",e[e.Kava=1006]="Kava",e[e.Kujira=1007]="Kujira",e[e.SCRT=1008]="SCRT",e[e.Stargaze=1009]="Stargaze",e[e.Terra=1010]="Terra",e[e.ZKSPACE=1011]="ZKSPACE",e[e.ZKSYNC=804]="ZKSYNC",e[e.Stx=5757]="Stx",e[e.SEI=2837]="SEI",e[e.WAX=14001]="WAX",e[e.Starknet=9004]="Starknet",e[e.ADA=1815]="ADA",e[e.INJ=2892]="INJ",e[e.Celestia=2854]="Celestia",e[e.DYDX=2897]="DYDX",e[e.Kaspa=111111]="Kaspa",e[e.TON=607]="TON",e[e.NostrAssets=1237]="NostrAssets",e[e.Near=397]="Near",e[e.Kaia=8217]="Kaia",e[e.PI=70000074]="PI",e[e.XRP=144]="XRP"})(lt=Zr.Currency||(Zr.Currency={}));var M5;(function(e){e[e.SEGWIT_NESTED=1]="SEGWIT_NESTED",e[e.SEGWIT_NESTED_49=2]="SEGWIT_NESTED_49",e[e.SEGWIT_NATIVE=3]="SEGWIT_NATIVE",e[e.SEGWIT_TAPROOT=4]="SEGWIT_TAPROOT"})(M5=Zr.segwitType||(Zr.segwitType={}));Zr.MultiAddressCoins=[lt.BTC,lt.TBTC,lt.LTC,lt.DOGE,lt.BSV,lt.OMNI_USDT,lt.OMNI_USDT_TEST];var Wt="secp256k1",Od="ed25519";Zr.CoinCurveMap=new Map([[lt.BTC,Wt],[lt.TBTC,Wt],[lt.ETH,Wt],[lt.LTC,Wt],[lt.DOGE,Wt],[lt.BCH,Wt],[lt.BSV,Wt],[lt.TRX,Wt],[lt.OMNI_USDT,Wt],[lt.OMNI_USDT_TEST,Wt],[lt.ATOM,Wt],[lt.OSMO,Wt],[lt.EVMOS,Wt],[lt.AXL,Wt],[lt.CRO,Wt],[lt.Iris,Wt],[lt.Juno,Wt],[lt.Kava,Wt],[lt.Kujira,Wt],[lt.SCRT,Wt],[lt.Stargaze,Wt],[lt.Terra,Wt],[lt.SEI,Wt],[lt.Celestia,Wt],[lt.DYDX,Wt],[lt.Kaia,Wt],[lt.SOL,Od],[lt.APTOS,Od],[lt.SUI,Od],[lt.TON,Od],[lt.PI,Od]])});var yp=L(oe=>{"use strict";B();R();Object.defineProperty(oe,"__esModule",{value:!0});oe.SignCommonMsgError=oe.EstimateFeeError=oe.validSignedTransactionError=oe.GetPayLoadError=oe.HardwareDerivePubKeyError=oe.CalcTxHashError=oe.SignMsgStep3Error=oe.SignMsgSetupError=oe.Ed25519Step3Error=oe.Ed25519Step2Error=oe.Ed25519Step1Error=oe.Ed25519SetupError=oe.EcdsaStep3Error=oe.EcdsaStep2Error=oe.EcdsaStep1Error=oe.EcdsaSetupError=oe.MPCShakeHandsError=oe.MPCStepError=oe.MPCAesKeyMissError=oe.GetHardWareMessageHashError=oe.GetHardwareSignedTransactionError=oe.GetHardwareRawTransactionError=oe.GetMpcTransactionError=oe.GetMpcRawTransactionError=oe.DerivePathError=oe.GenMnemonicError=oe.GenPrivateKeyError=oe.UnsupportedCoinError=oe.SignMsgError=oe.SignTxError=oe.ValidAddressError=oe.NewAddressError=oe.NotImplementedError=void 0;oe.NotImplementedError="no implementation method";oe.NewAddressError="generate address error";oe.ValidAddressError="valid address error";oe.SignTxError="sign tx error";oe.SignMsgError="sign message error";oe.UnsupportedCoinError="unsupported currency";oe.GenPrivateKeyError="generate private key error";oe.GenMnemonicError="generate mnemonic error";oe.DerivePathError="derive hdPath error";oe.GetMpcRawTransactionError="get mpc raw transaction error";oe.GetMpcTransactionError="get mpc transaction error";oe.GetHardwareRawTransactionError="get hardware raw transaction error";oe.GetHardwareSignedTransactionError="get hardware signed transaction error";oe.GetHardWareMessageHashError="get hardware message hash error";oe.MPCAesKeyMissError="mpc get aes key error";oe.MPCStepError="mpc step error";oe.MPCShakeHandsError="mpc shake hands error";oe.EcdsaSetupError="ecdsa setup error";oe.EcdsaStep1Error="ecdsa step1 error";oe.EcdsaStep2Error="ecdsa step2 error";oe.EcdsaStep3Error="ecdsa step3 error";oe.Ed25519SetupError="ed25519 setup error";oe.Ed25519Step1Error="ed25519 step1 error";oe.Ed25519Step2Error="ed25519 step2 error";oe.Ed25519Step3Error="ed25519 step3 error";oe.SignMsgSetupError="sign message setup error";oe.SignMsgStep3Error="sign message step3 error";oe.CalcTxHashError="calculate tx hash error";oe.HardwareDerivePubKeyError="derive sub pub key error";oe.GetPayLoadError="get payload error";oe.validSignedTransactionError="valid signed transaction error";oe.EstimateFeeError="estimate fee error";oe.SignCommonMsgError="sign common msg error"});var Vv=L(Ar=>{"use strict";B();R();Object.defineProperty(Ar,"__esModule",{value:!0});Ar.jsonStringifyUniform=Ar.cloneObject=Ar.assertBufferLength=Ar.convert2BigNumber=Ar.convert2Number=Ar.buildCommonSignMsg=void 0;var gf=zp();function w5(e,t){return`OKX Wallet Sign In
|
||
|
||
publicKey: ${e}
|
||
walletId: ${t}
|
||
host: api.wallet.okx
|
||
OKX Wallet Sign In`}Ar.buildCommonSignMsg=w5;function k5(e){if(e!=null)return typeof e=="string"?parseInt(e):e}Ar.convert2Number=k5;function S5(e){if(e!=null)return gf.BigNumber.isBigNumber(e)?e:new gf.BigNumber(e)}Ar.convert2BigNumber=S5;function _5(e,t){if(e.length!=t)throw Error("buffer length is illegal")}Ar.assertBufferLength=_5;function I5(e){return JSON.parse(JSON.stringify(e))}Ar.cloneObject=I5;function x5(e){return JSON.stringify(e,(t,n)=>n&&(n.type==="Buffer"||n instanceof Uint8Array?gf.base.toHex(n):typeof n=="bigint"?n.toString():n))}Ar.jsonStringifyUniform=x5});var bp=L(Ts=>{"use strict";B();R();var P5=Ts&&Ts.__createBinding||(Object.create?function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]}),U5=Ts&&Ts.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&P5(t,e,n)};Object.defineProperty(Ts,"__esModule",{value:!0});U5(Vv(),Ts)});var jv=L(rn=>{"use strict";B();R();Object.defineProperty(rn,"__esModule",{value:!0});rn.SimpleWallet=rn.BaseWallet=rn.ecdsaSign=rn.fromSigned=rn.padWithZeroes=rn.toUnsigned=rn.intToHex=rn.makeSignature=rn.secp256k1SignTest=void 0;var In=yp(),Os=gp(),xn=zp(),B5=bp();function Gv(e){let t=xn.base.sha256("secp256k1-test"),n=xn.signUtil.secp256k1.publicKeyCreate(e,!1),{signature:i,recovery:r}=xn.signUtil.secp256k1.sign(C.Buffer.from(t),e);return xn.signUtil.secp256k1.verify(t,i,r,n)}rn.secp256k1SignTest=Gv;function Yv(e,t,n){let i=(0,rn.fromSigned)(t),r=(0,rn.fromSigned)(n),o=e,f=vp((0,rn.toUnsigned)(i).toString("hex"),64),c=vp((0,rn.toUnsigned)(r).toString("hex"),64);return xn.base.stripHexPrefix(Xv(o)).concat(f,c)}rn.makeSignature=Yv;function Xv(e){return`0x${e.toString(16)}`}rn.intToHex=Xv;var R5=function(e){return C.Buffer.from(e.toTwos(256).toArray())};rn.toUnsigned=R5;function vp(e,t){if(e!==""&&!/^[a-f0-9]+$/iu.test(e))throw new Error(`Expected an unprefixed hex string. Received: ${e}`);if(t<0)throw new Error(`Expected a non-negative integer target length. Received: ${t}`);return String.prototype.padStart.call(e,t,"0")}rn.padWithZeroes=vp;var C5=function(e){return new xn.BN(e).fromTwos(256)};rn.fromSigned=C5;function Qv(e,t,n){let{signature:i,recovery:r}=xn.signUtil.secp256k1.sign(e,t),o=C.Buffer.from(i.slice(0,32)),f=C.Buffer.from(i.slice(32,64));if(n&&!Number.isSafeInteger(n))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");return{v:n?r+(n*2+35):r+27,r:o,s:f}}rn.ecdsaSign=Qv;var yf=class{getRandomPrivateKey(){try{for(;;){let t=xn.base.randomBytes(32);if(Gv(t))return Promise.resolve(xn.base.toHex(t,!0))}}catch{}return Promise.reject(In.GenPrivateKeyError)}getDerivedPrivateKey(t){return xn.bip39.mnemonicToSeed(t.mnemonic).then(n=>{let i=xn.bip32.fromSeed(n).derivePath(t.hdPath);if(i.privateKey){let r=xn.base.toHex(i.privateKey);return Promise.resolve("0x"+r)}else return Promise.reject(In.GenPrivateKeyError)}).catch(n=>Promise.reject(In.GenPrivateKeyError))}getDerivedPath(t){return Promise.reject(In.NotImplementedError)}validPrivateKey(t){return Promise.reject(In.NotImplementedError)}signMessage(t){return Promise.reject(In.NotImplementedError)}async signCommonMsg(t){t.signType||(t.signType=Os.SignType.Secp256k1);let n;if(t.message.text)n=t.message.text;else{let c;if(t.publicKey?c=t.publicKey:c=(await this.getNewAddress({privateKey:t.privateKey,addressType:t.addressType,hrp:t.hrp,version:t.version})).publicKey,t.chainName&&t.chainName=="sui"?(0,Os.isHexStr)(c)&&c.startsWith("0x")&&(c=c.substring(2)):c.startsWith("0x")&&(c=c.substring(2)),!t.message.walletId)return Promise.reject("invalid walletId");n=(0,B5.buildCommonSignMsg)(c,t.message.walletId)}let i=xn.base.magicHash(n),r=t.privateKeyHex?t.privateKeyHex:t.privateKey,o=xn.base.fromHex(r);var f;switch(t.signType){case Os.SignType.Secp256k1:let{v:c,r:g,s:A}=Qv(C.Buffer.from(i),o);return Promise.resolve(Yv(c,g,A));case Os.SignType.ECDSA_P256:return f=xn.signUtil.p256.sign(C.Buffer.from(i),o).signature,Promise.resolve(xn.base.toHex(f));case Os.SignType.ED25519:return f=xn.signUtil.ed25519.sign(i,o),Promise.resolve(xn.base.toHex(f));case Os.SignType.StarknetSignType:return f=xn.signUtil.schnorr.stark.sign(i,o).toCompactRawBytes(),Promise.resolve(xn.base.toHex(f));case Os.SignType.TezosSignType:return Promise.reject("not support")}}verifyMessage(t){return Promise.reject(In.NotImplementedError)}ecRecover(t,n){return Promise.reject(In.NotImplementedError)}getAddressByPublicKey(t){return Promise.reject(In.NotImplementedError)}getMPCRawTransaction(t){return Promise.reject(In.NotImplementedError)}getMPCTransaction(t){return Promise.reject(In.NotImplementedError)}getMPCRawMessage(t){return Promise.reject(In.NotImplementedError)}getMPCSignedMessage(t){return Promise.reject(In.NotImplementedError)}getHardWareRawTransaction(t){return Promise.reject(In.NotImplementedError)}getHardWareSignedTransaction(t){return Promise.reject(In.NotImplementedError)}getHardWareMessageHash(t){return Promise.reject(In.NotImplementedError)}calcTxHash(t){return Promise.reject(In.NotImplementedError)}getRawTransaction(t){return Promise.reject(In.NotImplementedError)}validSignedTransaction(t){return Promise.reject(In.NotImplementedError)}estimateFee(t){return Promise.reject(In.NotImplementedError)}};rn.BaseWallet=yf;var Ap=class extends yf{mockData(t,n){this.mockAddress=t,this.mockPublicKey=n}getNewAddress(t){return Promise.resolve({address:this.mockAddress,publicKey:this.mockPublicKey})}validAddress(t){throw new Error("Method not implemented.")}signTransaction(t){throw new Error("Method not implemented.")}};rn.SimpleWallet=Ap});var Mp=L(di=>{"use strict";B();R();var E5=di&&di.__createBinding||(Object.create?function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]}),Dd=di&&di.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&E5(t,e,n)};Object.defineProperty(di,"__esModule",{value:!0});Dd(gp(),di);Dd(Zv(),di);Dd(yp(),di);Dd(jv(),di);Dd(bp(),di)});var e3=L(ct=>{"use strict";B();R();Object.defineProperty(ct,"__esModule",{value:!0});ct.CelestiaWallet=ct.InitiaWallet=ct.InjectiveWallet=ct.DydxWallet=ct.SeiWallet=ct.TerraWallet=ct.StargazeWallet=ct.SecretWallet=ct.KujiraWallet=ct.KavaWallet=ct.JunoWallet=ct.IrisWallet=ct.CronosWallet=ct.AxelarWallet=ct.EvmosWallet=ct.OsmoWallet=ct.AtomWallet=ct.CommonCosmosWallet=ct.CosmosWallet=void 0;var dr=Mp(),Vr=xt(),Bt=ap(),hn=class extends dr.BaseWallet{async getDerivedPath(t){return`m/44'/${this.getSlip44CoinType()}'/0'/0/${t.index}`}async getNewAddress(t){if(!await this.checkPrivateKey(t.privateKey))throw new Error("invalid key");try{let i=t.hrp||this.getPrefix(),r=t.privateKey,o=Vr.base.fromHex(r.toLowerCase()),f=this.supportEthSign(),c=(0,Bt.private2Public)(o,!f),A={address:(0,Bt.getNewAddress)(o,i,f),publicKey:Vr.base.toHex(c)};return Promise.resolve(A)}catch{return Promise.reject(dr.NewAddressError)}}async checkPrivateKey(t){if(!Vr.base.validateHexString(t))return Promise.resolve(!1);let n=Vr.base.fromHex(t.toLowerCase());return n.length==32&&!n.every(i=>i===0)}async validPrivateKey(t){let i={isValid:await this.checkPrivateKey(t.privateKey),privateKey:t.privateKey};return Promise.resolve(i)}async validAddress(t){let n=t.hrp||this.getPrefix(),i={isValid:(0,Bt.validateAddress)(t.address,n),address:t.address};return Promise.resolve(i)}async signTransaction(t){try{let n=this.supportEthSign(),i=this.pubKeyUrl(),r=t.privateKey&&Vr.base.fromHex(t.privateKey),o=t.data;if(o.type==="transfer"){let f=o.data,c=(0,Bt.amount2Coins)(f.demon,f.amount),g=(0,Bt.amount2StdFee)(o.feeDemon,o.feeAmount,o.gasLimit),A=await(0,Bt.sendToken)(r,o.chainId,o.sequence,o.accountNumber,f.fromAddress,f.toAddress,c,g,o.timeoutHeight,o.memo,n,o.publicKey,i);return Promise.resolve(A)}else if(o.type==="ibcTransfer"){let f=o.data,c=(0,Bt.amount2Coin)(f.demon,f.amount),g=(0,Bt.amount2StdFee)(o.feeDemon,o.feeAmount,o.gasLimit),A=await(0,Bt.sendIBCToken)(r,o.chainId,o.sequence,o.accountNumber,f.fromAddress,f.toAddress,c,f.sourcePort,f.sourceChannel,g,o.timeoutHeight,f.ibcTimeoutHeight,f.ibcTimeoutTimestamp,o.memo,n,o.publicKey,i);return Promise.resolve(A)}}catch{}return Promise.reject(dr.SignTxError)}async signCommonMsg(t){let n=t.hrp?t.hrp:this.getPrefix();return super.signCommonMsg({privateKey:t.privateKey,message:t.message,hrp:n,signType:dr.SignType.Secp256k1})}async signMessage(t){try{let n=this.supportEthSign(),i;t.privateKey&&(i=Vr.base.fromHex(t.privateKey));let r=t.data;if(r.withTx)return await this.signMessageWithTx(t);if(r.type=="amino"){let o=await(0,Bt.signWithStdSignDoc)(i,r.data,n);return Promise.resolve(o)}else{let o=await(0,Bt.SignWithSignDoc)(i,r.data,n);return Promise.resolve(o)}}catch{return Promise.reject(dr.SignMsgError)}}async signMessageWithTx(t){try{let n=this.supportEthSign(),i;t.privateKey&&(i=Vr.base.fromHex(t.privateKey));let r=t.data;if(r.type=="amino"){let o=r.prefix||this.getPrefix(),f=await(0,Bt.signWithStdSignDocWithTx)(i,r.data,n,o,this);return Promise.resolve(f)}else{let o=await(0,Bt.SignWithSignDocWithTx)(i,r.data,n);return Promise.resolve(o)}}catch{return Promise.reject(dr.SignMsgError)}}getAddressByPublicKey(t){let n=t.hrp||this.getPrefix();return Promise.resolve((0,Bt.addressFromPublic)(t.publicKey,n,this.supportEthSign()))}async getMPCRawTransaction(t){try{let n=await this.signTransaction(t);return Promise.resolve({raw:n.doc,hash:n.hash})}catch{return Promise.reject(dr.GetMpcRawTransactionError)}}async getMPCTransaction(t){try{let n=this.supportEthSign(),i=(0,Bt.getMPCTransaction)(t.raw,t.sigs,t.publicKey,n);return Promise.resolve(i)}catch{return Promise.reject(dr.GetMpcTransactionError)}}async getMPCRawMessage(t){try{let n=await this.signMessage(t);return Promise.resolve({hash:n})}catch{return Promise.reject(dr.GetMpcRawTransactionError)}}async getMPCSignedMessage(t){try{let n=this.supportEthSign();return Promise.resolve((0,Bt.getMPCSignedMessage)(t.hash,t.sigs,t.publicKey,n))}catch{return Promise.reject(dr.GetMpcTransactionError)}}async calcTxHash(t){try{let n=Vr.base.fromBase64(t.data),i=Vr.base.toHex(Vr.base.sha256(n)).toUpperCase();return Promise.resolve(i)}catch{return Promise.reject(dr.CalcTxHashError)}}async validSignedTransaction(t){try{let n=t.data?t.data.skipCheckSign:void 0,i=(0,Bt.validSignedTransaction)(t.tx,t.data.chainId,t.data.accountNumber,this.supportEthSign(),n||!1);return Promise.resolve((0,dr.jsonStringifyUniform)(i))}catch{return Promise.reject(dr.validSignedTransactionError)}}};ct.CosmosWallet=hn;var wp=class extends hn{getPrefix(){throw new Error("common.ts wallet must input prefix in param")}supportEthSign(){return!1}getAminoConverters(){return{...Bt.OsmosisAminoConverters,...Bt.CosmWasmAminoConverter}}getExtraTypes(){return[...Bt.OsmosisRegistry,...Bt.CosmWasmRegistry]}getSlip44CoinType(){return 118}pubKeyUrl(){}};ct.CommonCosmosWallet=wp;var kp=class extends hn{getPrefix(){return"cosmos"}supportEthSign(){return!1}getAminoConverters(){}getExtraTypes(){}getSlip44CoinType(){return 118}pubKeyUrl(){}};ct.AtomWallet=kp;var Sp=class extends hn{getPrefix(){return"osmo"}supportEthSign(){return!1}getAminoConverters(){return Bt.OsmosisAminoConverters}getExtraTypes(){return Bt.OsmosisRegistry}getSlip44CoinType(){return 118}pubKeyUrl(){}};ct.OsmoWallet=Sp;var _p=class extends hn{getPrefix(){return"evmos"}supportEthSign(){return!0}getAminoConverters(){}getExtraTypes(){}getSlip44CoinType(){return 60}pubKeyUrl(){}};ct.EvmosWallet=_p;var Ip=class extends hn{getPrefix(){return"axelar"}supportEthSign(){return!1}getAminoConverters(){}getExtraTypes(){}getSlip44CoinType(){return 118}pubKeyUrl(){}};ct.AxelarWallet=Ip;var xp=class extends hn{getPrefix(){return"cro"}supportEthSign(){return!1}getAminoConverters(){}getExtraTypes(){}getSlip44CoinType(){return 394}pubKeyUrl(){}};ct.CronosWallet=xp;var Pp=class extends hn{getPrefix(){return"iaa"}supportEthSign(){return!1}getAminoConverters(){}getExtraTypes(){}getSlip44CoinType(){return 118}pubKeyUrl(){}};ct.IrisWallet=Pp;var Up=class extends hn{getPrefix(){return"juno"}supportEthSign(){return!1}getAminoConverters(){}getExtraTypes(){}getSlip44CoinType(){return 118}pubKeyUrl(){}};ct.JunoWallet=Up;var Bp=class extends hn{getPrefix(){return"kava"}supportEthSign(){return!1}getAminoConverters(){return Bt.KavaAminoConverters}getExtraTypes(){return Bt.KavaRegistry}getSlip44CoinType(){return 459}pubKeyUrl(){}};ct.KavaWallet=Bp;var Rp=class extends hn{getPrefix(){return"kujira"}supportEthSign(){return!1}getAminoConverters(){}getExtraTypes(){}getSlip44CoinType(){return 118}pubKeyUrl(){}};ct.KujiraWallet=Rp;var Cp=class extends hn{getPrefix(){return"secret"}supportEthSign(){return!1}getAminoConverters(){}getExtraTypes(){}getSlip44CoinType(){return 529}pubKeyUrl(){}};ct.SecretWallet=Cp;var Ep=class extends hn{getPrefix(){return"stars"}supportEthSign(){return!1}getAminoConverters(){}getExtraTypes(){}getSlip44CoinType(){return 118}pubKeyUrl(){}};ct.StargazeWallet=Ep;var Tp=class extends hn{getPrefix(){return"terra"}supportEthSign(){return!1}getAminoConverters(){}getExtraTypes(){}getSlip44CoinType(){return 330}pubKeyUrl(){}};ct.TerraWallet=Tp;var Op=class extends hn{getPrefix(){return"sei"}supportEthSign(){return!1}getAminoConverters(){return Bt.CosmWasmAminoConverter}getExtraTypes(){return Bt.CosmWasmRegistry}getSlip44CoinType(){return 118}pubKeyUrl(){}};ct.SeiWallet=Op;var Dp=class extends hn{getPrefix(){return"dydx"}supportEthSign(){return!1}getAminoConverters(){}getExtraTypes(){}getSlip44CoinType(){return 118}pubKeyUrl(){}};ct.DydxWallet=Dp;var Np=class extends hn{getPrefix(){return"inj"}supportEthSign(){return!0}getAminoConverters(){}getExtraTypes(){}getSlip44CoinType(){return 60}pubKeyUrl(){return"/injective.crypto.v1beta1.ethsecp256k1.PubKey"}async signMessage(t){try{let n=this.supportEthSign(),i;t.privateKey&&(i=Vr.base.fromHex(t.privateKey));let r=t.data;if(r.withTx)return await this.signMessageWithTx(t);if(r.type=="amino"){let o=await(0,Bt.signWithStdSignDocForINJ)(i,r.data,n);return Promise.resolve(o)}else{let o=await(0,Bt.SignWithSignDocForINJ)(i,r.data,n);return Promise.resolve(o)}}catch{return Promise.reject(dr.SignMsgError)}}async signMessageWithTx(t){try{let n=this.supportEthSign(),i;t.privateKey&&(i=Vr.base.fromHex(t.privateKey));let r=t.data;if(r.type=="amino"){let o=await(0,Bt.signWithStdSignDocForINJWithTx)(i,r.data,n,this);return Promise.resolve(o)}else{let o=await(0,Bt.SignWithSignDocForINJWithTx)(i,r.data,n);return Promise.resolve(o)}}catch{return Promise.reject(dr.SignMsgError)}}};ct.InjectiveWallet=Np;var Lp=class extends hn{getPrefix(){return"init"}supportEthSign(){return!0}getAminoConverters(){}getExtraTypes(){}getSlip44CoinType(){return 60}pubKeyUrl(){return"/initia.crypto.v1beta1.ethsecp256k1.PubKey"}};ct.InitiaWallet=Lp;var qp=class extends hn{getPrefix(){return"celestia"}supportEthSign(){return!1}getAminoConverters(){}getExtraTypes(){}getSlip44CoinType(){return 118}pubKeyUrl(){}};ct.CelestiaWallet=qp});var ap=L(ne=>{B();R();var t3=ne&&ne.__createBinding||(Object.create?function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]}),T5=ne&&ne.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),O5=ne&&ne.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&t3(t,e,n);return T5(t,e),t},D5=ne&&ne.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&t3(t,e,n)};Object.defineProperty(ne,"__esModule",{value:!0});ne.CosmWasmAminoConverter=ne.CosmWasmRegistry=ne.KavaAminoConverters=ne.KavaRegistry=ne.OsmosisAminoConverters=ne.OsmosisRegistry=ne.Height=ne.Coin=ne.validSignedTransaction=ne.getMPCSignedMessage=ne.getMPCTransaction=ne.amount2StdFee=ne.amount2Coin=ne.amount2Coins=ne.sendAminoMessage=ne.signWithStdSignDocWithTx=ne.signWithStdSignDoc=ne.SignWithSignDocWithTx=ne.SignWithSignDoc=ne.signWithStdSignDocForINJWithTx=ne.signWithStdSignDocForINJ=ne.SignWithSignDocForINJWithTx=ne.SignWithSignDocForINJ=ne.sendMessages=ne.sendIBCToken=ne.sendToken=ne.validateAddress=ne.addressFromPublic=ne.getNewAddress=ne.private2Address=ne.private2Public=ne.public2Address=void 0;var te=xt(),N5=Po();Object.defineProperty(ne,"Coin",{enumerable:!0,get:function(){return N5.Coin}});var Fp=nl(),n3=q2();Object.defineProperty(ne,"OsmosisAminoConverters",{enumerable:!0,get:function(){return n3.OsmosisAminoConverters}});Object.defineProperty(ne,"OsmosisRegistry",{enumerable:!0,get:function(){return n3.OsmosisRegistry}});var r3=lv();Object.defineProperty(ne,"CosmWasmAminoConverter",{enumerable:!0,get:function(){return r3.CosmWasmAminoConverter}});Object.defineProperty(ne,"CosmWasmRegistry",{enumerable:!0,get:function(){return r3.CosmWasmRegistry}});var i3=Av();Object.defineProperty(ne,"KavaAminoConverters",{enumerable:!0,get:function(){return i3.KavaAminoConverters}});Object.defineProperty(ne,"KavaRegistry",{enumerable:!0,get:function(){return i3.KavaRegistry}});var Cn=Cv(),o3=jc();Object.defineProperty(ne,"Height",{enumerable:!0,get:function(){return o3.Height}});var Bi=op(),L5=Ev(),q5=Wv(),vf=O5(zv()),Zi=lr(),F5=rp(),Nd=Mp();function bf(e,t){return t?te.base.keccak(e.slice(1)).slice(-20):te.base.hash160(e)}ne.public2Address=bf;function Ri(e,t){return te.signUtil.secp256k1.publicKeyCreate(e,t)}ne.private2Public=Ri;function s3(e,t,n){let i=Ri(e,!n),r=bf(i,n);return te.base.toBech32(t,r)}ne.private2Address=s3;function H5(e,t="cosmos",n){if(e.length!=32)throw new Error("invalid key");return s3(e,t,n||!1)}ne.getNewAddress=H5;function K5(e,t="cosmos",n=!1){let i,r=te.base.fromHex(e);if(n){if(r.length!==65){let o=te.signUtil.secp256k1.publicKeyConvert(r,!1);r=C.Buffer.from(o)}i=bf(r,!0)}else r.length!==33&&(r=te.signUtil.secp256k1.publicKeyConvert(r,!0)),i=bf(r,!1);return te.base.toBech32(t,i)}ne.addressFromPublic=K5;function $5(e,t="cosmos"){try{let[n,i]=te.base.fromBech32(e);return n===t&&i.length>0}catch{return!1}}ne.validateAddress=$5;async function W5(e,t,n,i,r,o,f,c,g,A,w,M,P){let x={typeUrl:"/cosmos.bank.v1beta1.MsgSend",value:{fromAddress:r,toAddress:o,amount:[...f]}},U=await(0,Cn.signTx)([x],c,A,te.Long.fromNumber(g||0),{accountNumber:i,sequence:n,chainId:t,privateKey:e,useEthSecp256k1:w||!1,publicKey:M,pubKeyUrl:P});return e?Promise.resolve(te.base.toBase64(U)):U}ne.sendToken=W5;async function J5(e,t,n,i,r,o,f,c,g,A,w,M,P,x,U,_,T){let D=P?te.Long.fromNumber(P).multiply(1e9):void 0,K={typeUrl:"/ibc.applications.transfer.v1.MsgTransfer",value:o3.MsgTransfer.fromPartial({sourcePort:c,sourceChannel:g,sender:r,receiver:o,token:f,timeoutHeight:M,timeoutTimestamp:D})},N=await(0,Cn.signTx)([K],A,x,te.Long.fromNumber(w||0),{accountNumber:i,sequence:n,chainId:t,privateKey:e,useEthSecp256k1:U||!1,publicKey:_,pubKeyUrl:T});return e?Promise.resolve(te.base.toBase64(N)):N}ne.sendIBCToken=J5;async function z5(e,t,n,i,r,o,f,c,g,A,w){(0,Fp.registerExtraTypes)(f);let M=await(0,Cn.signTx)(r,o,g,te.Long.fromNumber(c||0),{accountNumber:i,sequence:n,chainId:t,privateKey:e,useEthSecp256k1:A||!1,pubKeyUrl:w});return Promise.resolve(te.base.toBase64(M))}ne.sendMessages=z5;async function Z5(e,t,n){let i=JSON.parse(t),r=(0,Cn.makeSignDoc)(te.base.fromHex(i.body),te.base.fromHex(i.authInfo),i.chainId,parseInt(i.accountNumber));if(!e){let A=(0,Cn.makeSignBytes)(r),w=n?te.base.keccak256(A):te.base.sha256(A);return Promise.resolve(te.base.toHex(w))}let o=Ri(e,!0),f=(0,Cn.makeSignBytes)(r),c=n?te.base.keccak256(f):te.base.sha256(f),{signature:g}=te.signUtil.secp256k1.sign(C.Buffer.from(c),e);return Promise.resolve((0,Bi.encodeSecp256k1Signature)(o,g,!1))}ne.SignWithSignDocForINJ=Z5;async function V5(e,t,n){let i=JSON.parse(t),r=(0,Cn.makeSignDoc)(te.base.fromHex(i.body),te.base.fromHex(i.authInfo),i.chainId,parseInt(i.accountNumber));if(!e){let _=(0,Cn.makeSignBytes)(r),T=n?te.base.keccak256(_):te.base.sha256(_);return Promise.resolve(te.base.toHex(T))}let o=Ri(e,!0),f=(0,Cn.makeSignBytes)(r),c=n?te.base.keccak256(f):te.base.sha256(f),{signature:g,recovery:A}=te.signUtil.secp256k1.sign(C.Buffer.from(c),e),w=[Uint8Array.from(g),Uint8Array.of(A)],M=C.Buffer.concat(w),P=(0,Bi.encodeSecp256k1Signature)(o,g,!1),x=Zi.TxRaw.fromPartial({bodyBytes:r.bodyBytes,authInfoBytes:r.authInfoBytes,signatures:[M]}),U=te.base.toBase64(Zi.TxRaw.encode(x).finish());return Promise.resolve((0,Nd.jsonStringifyUniform)({signature:P,tx:U}))}ne.SignWithSignDocForINJWithTx=V5;async function G5(e,t,n){let i=JSON.parse(t),r=vf.serializeSignDoc(i),o=n?te.base.keccak256(r):te.base.sha256(r);if(!e)return Promise.resolve(te.base.toHex(o));let{signature:f}=te.signUtil.secp256k1.sign(C.Buffer.from(o),e),c=Ri(e,!0);return Promise.resolve((0,Bi.encodeSecp256k1Signature)(c,f,!1))}ne.signWithStdSignDocForINJ=G5;async function Y5(e,t,n,i){let r=JSON.parse(t),o=vf.serializeSignDoc(r),f=n?te.base.keccak256(o):te.base.sha256(o);if(!e)return Promise.resolve(te.base.toHex(f));let{signature:c}=te.signUtil.secp256k1.sign(C.Buffer.from(f),e),g=await Hp(e,i.getPrefix(),t,i.getAminoConverters(),i.getExtraTypes(),i.supportEthSign(),i.pubKeyUrl()),A=Ri(e,!0),w=(0,Bi.encodeSecp256k1Signature)(A,c,!1);return Promise.resolve((0,Nd.jsonStringifyUniform)({signature:w,tx:g}))}ne.signWithStdSignDocForINJWithTx=Y5;async function X5(e,t,n){let i=JSON.parse(t),r=(0,Cn.makeSignDoc)(te.base.fromHex(i.body),te.base.fromHex(i.authInfo),i.chainId,parseInt(i.accountNumber));if(!e){let c=(0,Cn.makeSignBytes)(r),g=n?te.base.keccak256(c):te.base.sha256(c);return Promise.resolve(te.base.toHex(g))}let o=Ri(e,!0),f=await(0,Cn.doSign)(r,o,e,n);return Promise.resolve(f)}ne.SignWithSignDoc=X5;async function Q5(e,t,n){let i=JSON.parse(t),r=(0,Cn.makeSignDoc)(te.base.fromHex(i.body),te.base.fromHex(i.authInfo),i.chainId,parseInt(i.accountNumber));if(!e){let A=(0,Cn.makeSignBytes)(r),w=n?te.base.keccak256(A):te.base.sha256(A);return Promise.resolve(te.base.toHex(w))}let o=Ri(e,!0),f=await(0,Cn.doSign)(r,o,e,n),c=Zi.TxRaw.fromPartial({bodyBytes:r.bodyBytes,authInfoBytes:r.authInfoBytes,signatures:[te.base.fromBase64(f)]}),g=te.base.toBase64(Zi.TxRaw.encode(c).finish());return Promise.resolve((0,Nd.jsonStringifyUniform)({signature:f,tx:g}))}ne.SignWithSignDocWithTx=Q5;async function j5(e,t,n){let i=JSON.parse(t),r=vf.serializeSignDoc(i),o=n?te.base.keccak256(r):te.base.sha256(r);if(!e)return Promise.resolve(te.base.toHex(o));let{signature:f,recovery:c}=te.signUtil.secp256k1.sign(C.Buffer.from(o),e),g=Ri(e,!0);if(n){let A=[Uint8Array.from(f),Uint8Array.of(c)],w=C.Buffer.concat(A);return Promise.resolve((0,Bi.encodeSecp256k1Signature)(g,w,!0))}else return Promise.resolve((0,Bi.encodeSecp256k1Signature)(g,f,!1))}ne.signWithStdSignDoc=j5;async function eI(e,t,n,i,r){let o=JSON.parse(t),f=vf.serializeSignDoc(o),c=n?te.base.keccak256(f):te.base.sha256(f);if(!e)return Promise.resolve(te.base.toHex(c));let{signature:g,recovery:A}=te.signUtil.secp256k1.sign(C.Buffer.from(c),e),w=await Hp(e,i,t,r.getAminoConverters(),r.getExtraTypes(),r.supportEthSign(),r.pubKeyUrl()),M=Ri(e,!0);if(n){let P=[Uint8Array.from(g),Uint8Array.of(A)],x=C.Buffer.concat(P),U=(0,Bi.encodeSecp256k1Signature)(M,x,!0);return Promise.resolve((0,Nd.jsonStringifyUniform)({signature:U,tx:w}))}else{let P=(0,Bi.encodeSecp256k1Signature)(M,g,!1);return Promise.resolve((0,Nd.jsonStringifyUniform)({signature:P,tx:w}))}}ne.signWithStdSignDocWithTx=eI;async function Hp(e,t,n,i,r,o,f){(0,Fp.registerExtraTypes)(r);let c=JSON.parse(n),g=(0,q5.createDefaultAminoConverters)(t);i&&(g={...g,...i});let A=new L5.AminoTypes(g),w=c.msgs.map(P=>A.fromAmino(P)),M=await(0,Cn.signTx)(w,c.fee,c.memo,te.Long.fromString(c.timeout_height||"0"),{accountNumber:Number(c.account_number),sequence:Number(c.sequence),chainId:c.chain_id,privateKey:e,useEthSecp256k1:o||!1,pubKeyUrl:f});return Promise.resolve(te.base.toBase64(M))}ne.sendAminoMessage=Hp;function a3(e,t){return[{denom:e,amount:t.toString()}]}ne.amount2Coins=a3;function tI(e,t){return{denom:e,amount:t.toString()}}ne.amount2Coin=tI;function nI(e,t,n){return{amount:a3(e,t),gas:n.toString()}}ne.amount2StdFee=nI;function rI(e,t,n,i){let r=Zi.SignDoc.decode(te.base.fromHex(e));if(i){let c=te.base.keccak256((0,Cn.makeSignBytes)(r)),g=te.base.fromHex(t),A=g.slice(0,32),w=g.slice(32,64),M=te.signUtil.secp256k1.getV(c,te.base.toHex(A),te.base.toHex(w),te.base.fromHex(n));t=te.base.toHex(C.Buffer.concat([Uint8Array.from(g),Uint8Array.of(M)]))}let o=(0,Bi.encodeSecp256k1Signature)(te.base.fromHex(n),te.base.fromHex(t),i),f=Zi.TxRaw.fromPartial({bodyBytes:r.bodyBytes,authInfoBytes:r.authInfoBytes,signatures:[te.base.fromBase64(o)]});return te.base.toBase64(Zi.TxRaw.encode(f).finish())}ne.getMPCTransaction=rI;function iI(e,t,n,i){if(i){let r=te.base.fromHex(t),o=r.slice(0,32),f=r.slice(32,64),c=te.signUtil.secp256k1.getV(te.base.fromHex(e),te.base.toHex(o),te.base.toHex(f),te.base.fromHex(n));t=te.base.toHex(C.Buffer.concat([Uint8Array.from(r),Uint8Array.of(c)]))}return(0,Bi.encodeSecp256k1Signature)(te.base.fromHex(n),te.base.fromHex(t),i)}ne.getMPCSignedMessage=iI;function oI(e,t,n,i,r){let o=Zi.TxRaw.decode(te.base.fromBase64(e)),f=(0,Cn.makeSignDoc)(o.bodyBytes,o.authInfoBytes,t,n),c=(0,Cn.makeSignBytes)(f),g=Zi.AuthInfo.decode(o.authInfoBytes),A=F5.PubKey.decode(g.signerInfos[0].publicKey.value),w=i?te.base.keccak256(c):te.base.sha256(c),M=o.signatures[0];if(i&&(M=M.slice(0,M.length-1)),!r&&!te.signUtil.secp256k1.verifyWithNoRecovery(w,M,A.key))throw Error("signature error");return{body:Fp.registry.decode({typeUrl:"/cosmos.tx.v1beta1.TxBody",value:o.bodyBytes}),authInfo:g,signatures:o.signatures}}ne.validSignedTransaction=oI;D5(e3(),ne)});export{ap as a};
|
||
|
||
window.inOKXExtension = true;
|
||
window.inMiniApp = false;
|
||
window.ASSETS_BUILD_TYPE = "publish";
|
||
|
||
//# sourceMappingURL=chunk-F7STIIB4.js.map
|