(()=>{varc,re,tr={5521:(re,c)=>{"use strict";function_(l){if(!Number.isSafeInteger(l))thrownewError(`Wrong integer: ${l}`)}functionR(...l){constu=(q,A)=>K=>q(A(K));return{encode:Array.from(l).reverse().reduce((q,A)=>q?u(q,A.encode):A.encode,void0),decode:l.reduce((q,A)=>q?u(q,A.decode):A.decode,void0)}}functiond(l){return{encode:u=>{if(!Array.isArray(u)||u.length&&"number"!=typeofu[0])thrownewError("alphabet.encode input should be an array of numbers");returnu.map(y=>{if(_(y),y<0||y>=l.length)thrownewError(`Digit index outside alphabet: ${y} (alphabet: ${l.length})`);returnl[y]})},decode:u=>{if(!Array.isArray(u)||u.length&&"string"!=typeofu[0])thrownewError("alphabet.decode input should be array of strings");returnu.map(y=>{if("string"!=typeofy)thrownewError(`alphabet.decode: not string element=${y}`);constL=l.indexOf(y);if(-1===L)thrownewError(`Unknown letter: "${y}". Allowed: ${l}`);returnL})}}}functionI(l=""){if("string"!=typeofl)thrownewError("join separator should be string");return{encode:u=>{if(!Array.isArray(u)||u.length&&"string"!=typeofu[0])thrownewError("join.encode input should be array of strings");for(letyofu)if("string"!=typeofy)thrownewError(`join.encode: non-string input=${y}`);returnu.join(l)},decode:u=>{if("string"!=typeofu)thrownewError("join.decode input should be string");returnu.split(l)}}}functionV(l,u="="){if(_(l),"string"!=typeofu)thrownewError("padding chr should be string");return{encode(y){if(!Array.isArray(y)||y.length&&"string"!=typeofy[0])thrownewError("padding.encode input should be array of strings");for(letLofy)if("string"!=typeofL)thrownewError(`padding.encode: non-string input=${L}`);for(;y.length*l%8;)y.push(u);returny},decode(y){if(!Array.isArray(y)||y.length&&"string"!=typeofy[0])thrownewError("padding.encode input should be array of strings");for(letqofy)if("string"!=typeofq)thrownewError(`padding.decode: non-string input=${q}`);letL=y.length;if(L*l%8)thrownewError("Invalid padding: string should have whole number of bytes");for(;L>0&&y[L-1]===u;L--)if(!((L-1)*l%8))thrownewError("Invalid padding: string has too much padding");returny.slice(0,L)}}}functionJ(l){if("function"!=typeofl)thrownewError("normalize fn should be function");return{encode:u=>u,decode:u=>l(u)}}functionm(l,u,y){if(u<2)thrownewError(`convertRadix: wrong from=${u}, base cannot be less than 2`);if(y<2)thrownewError(`convertRadix: wrong to=${y}, base cannot be less than 2`);if(!Array.isArray(l))thrownewError("convertRadix: data should be array");if(!l.length)return[];letL=0;constq=[],A=Array.from(l);for(A.forEach(K=>{if(_(K),K<0||K>=u)thrownewError(`Wrong integer: ${K}`)});;){letK=0,le=!0;for(lethe=L;he<A.length;he++){constbe=A[he],P=u*K+be;if(!Number.isSafeInteger(P)||u*K/u!==K||P-be!=u*K)thrownewError("convertRadix: carry overflow");if(K=P%y,A[he]=Math.floor(P/y),!Number.isSafeInteger(A[he])||A[he]*y+K!==P)thrownewError("convertRadix: carry overflow");le&&(A[he]?le=!1:L=he)}if(q.push(K),le)break}for(letK=0;K<l.length-1&&0===l[K];K++)q.push(0);returnq.reverse()}Object.defineProperty(c,"__esModule",{value:!0}),c.bytes=c.stringToBytes=c.str=c.bytesToString=c.hex=c.utf8=c.bech32m=c.bech32=c.base58check=c.base58xmr=c.base58xrp=c.base58flickr=c.base58=c.base64url=c.base64=c.base32crockford=c.base32hex=c.base32=c.base16=c.utils=c.assertNumber=void0,c.assertNumber=_;constw=(l,u)=>u?w(u,l%u):l,O=(l,u)=>l+(u-w(l,u));functionN(l,u,y,L){if(!Array.isArray(l))thrownewError("convertRadix2: data should be array");if(u<=0||u>32)thrownewError(`convertRadix2: wrong from=${u}`);if(y<=0||y>32)thrownewError(`convertRadix2: wrong to=${y}`);if(O(u,y)>32)thrownewError(`convertRadix2: carry overflow from=${u} to=${y} carryBits=${O(u,y)}`);letq=0,A=0;constK=2**y-1,le=[];for(constheofl){if(_(he),he>=2**u)thrownewError(`convertRadix2: invalid data word=${he} from=${u}`);if(q=q<<u|he,A+u>32)thrownewError(`convertRadix2: carry overflow pos=${A} from=${u}`);for(A+=u;A>=y;A-=y)le.push((q>>A-y&K)>>>0);q&=2**A-1}if(q=q<<y-A&K,!L&&