Files
kane-diagnostics/hubzilla/addon/g1wallet/vendor/bip39-3.1.0.min.js
2026-06-12 09:38:27 -04:00

7 lines
35 KiB
JavaScript

(()=>{var T=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var be=T(P=>{"use strict";Object.defineProperty(P,"__esModule",{value:!0});P.crypto=void 0;P.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0});var ce=T(n=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.wrapXOFConstructorWithOpts=n.wrapConstructorWithOpts=n.wrapConstructor=n.Hash=n.nextTick=n.swap32IfBE=n.byteSwapIfBE=n.swap8IfBE=n.isLE=void 0;n.isBytes=me;n.anumber=oe;n.abytes=O;n.ahash=et;n.aexists=tt;n.aoutput=rt;n.u8=at;n.u32=ot;n.clean=st;n.createView=it;n.rotr=nt;n.rotl=ct;n.byteSwap=ie;n.byteSwap32=ge;n.bytesToHex=ht;n.hexToBytes=ut;n.asyncLoop=ft;n.utf8ToBytes=ne;n.bytesToUtf8=bt;n.toBytes=R;n.kdfInputToBytes=pt;n.concatBytes=mt;n.checkOpts=gt;n.createHasher=xe;n.createOptHasher=we;n.createXOFer=He;n.randomBytes=yt;var F=be();function me(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function oe(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function O(e,...t){if(!me(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function et(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");oe(e.outputLen),oe(e.blockLen)}function tt(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function rt(e,t){O(e);let r=t.outputLen;if(e.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}function at(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}function ot(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function st(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function it(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function nt(e,t){return e<<32-t|e>>>t}function ct(e,t){return e<<t|e>>>32-t>>>0}n.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function ie(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}n.swap8IfBE=n.isLE?e=>e:e=>ie(e);n.byteSwapIfBE=n.swap8IfBE;function ge(e){for(let t=0;t<e.length;t++)e[t]=ie(e[t]);return e}n.swap32IfBE=n.isLE?e=>e:ge;var ye=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",lt=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function ht(e){if(O(e),ye)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=lt[e[r]];return t}var E={_0:48,_9:57,A:65,F:70,a:97,f:102};function pe(e){if(e>=E._0&&e<=E._9)return e-E._0;if(e>=E.A&&e<=E.F)return e-(E.A-10);if(e>=E.a&&e<=E.f)return e-(E.a-10)}function ut(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(ye)return Uint8Array.fromHex(e);let t=e.length,r=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);let a=new Uint8Array(r);for(let o=0,s=0;o<r;o++,s+=2){let c=pe(e.charCodeAt(s)),l=pe(e.charCodeAt(s+1));if(c===void 0||l===void 0){let f=e[s]+e[s+1];throw new Error('hex string expected, got non-hex character "'+f+'" at index '+s)}a[o]=c*16+l}return a}var dt=async()=>{};n.nextTick=dt;async function ft(e,t,r){let a=Date.now();for(let o=0;o<e;o++){r(o);let s=Date.now()-a;s>=0&&s<t||(await(0,n.nextTick)(),a+=s)}}function ne(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function bt(e){return new TextDecoder().decode(e)}function R(e){return typeof e=="string"&&(e=ne(e)),O(e),e}function pt(e){return typeof e=="string"&&(e=ne(e)),O(e),e}function mt(...e){let t=0;for(let a=0;a<e.length;a++){let o=e[a];O(o),t+=o.length}let r=new Uint8Array(t);for(let a=0,o=0;a<e.length;a++){let s=e[a];r.set(s,o),o+=s.length}return r}function gt(e,t){if(t!==void 0&&{}.toString.call(t)!=="[object Object]")throw new Error("options should be object or undefined");return Object.assign(e,t)}var se=class{};n.Hash=se;function xe(e){let t=a=>e().update(R(a)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function we(e){let t=(a,o)=>e(o).update(R(a)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=a=>e(a),t}function He(e){let t=(a,o)=>e(o).update(R(a)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=a=>e(a),t}n.wrapConstructor=xe;n.wrapConstructorWithOpts=we;n.wrapXOFConstructorWithOpts=He;function yt(e=32){if(F.crypto&&typeof F.crypto.getRandomValues=="function")return F.crypto.getRandomValues(new Uint8Array(e));if(F.crypto&&typeof F.crypto.randomBytes=="function")return Uint8Array.from(F.crypto.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}});var ke=T(k=>{"use strict";Object.defineProperty(k,"__esModule",{value:!0});k.SHA512_IV=k.SHA384_IV=k.SHA224_IV=k.SHA256_IV=k.HashMD=void 0;k.setBigUint64=ve;k.Chi=xt;k.Maj=wt;var I=ce();function ve(e,t,r,a){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,r,a);let o=BigInt(32),s=BigInt(4294967295),c=Number(r>>o&s),l=Number(r&s),f=a?4:0,p=a?0:4;e.setUint32(t+f,c,a),e.setUint32(t+p,l,a)}function xt(e,t,r){return e&t^~e&r}function wt(e,t,r){return e&t^e&r^t&r}var le=class extends I.Hash{constructor(t,r,a,o){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=r,this.padOffset=a,this.isLE=o,this.buffer=new Uint8Array(t),this.view=(0,I.createView)(this.buffer)}update(t){(0,I.aexists)(this),t=(0,I.toBytes)(t),(0,I.abytes)(t);let{view:r,buffer:a,blockLen:o}=this,s=t.length;for(let c=0;c<s;){let l=Math.min(o-this.pos,s-c);if(l===o){let f=(0,I.createView)(t);for(;o<=s-c;c+=o)this.process(f,c);continue}a.set(t.subarray(c,c+l),this.pos),this.pos+=l,c+=l,this.pos===o&&(this.process(r,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){(0,I.aexists)(this),(0,I.aoutput)(t,this),this.finished=!0;let{buffer:r,view:a,blockLen:o,isLE:s}=this,{pos:c}=this;r[c++]=128,(0,I.clean)(this.buffer.subarray(c)),this.padOffset>o-c&&(this.process(a,0),c=0);for(let u=c;u<o;u++)r[u]=0;ve(a,o-8,BigInt(this.length*8),s),this.process(a,0);let l=(0,I.createView)(t),f=this.outputLen;if(f%4)throw new Error("_sha2: outputLen should be aligned to 32bit");let p=f/4,y=this.get();if(p>y.length)throw new Error("_sha2: outputLen bigger than state");for(let u=0;u<p;u++)l.setUint32(4*u,y[u],s)}digest(){let{buffer:t,outputLen:r}=this;this.digestInto(t);let a=t.slice(0,r);return this.destroy(),a}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());let{blockLen:r,buffer:a,length:o,finished:s,destroyed:c,pos:l}=this;return t.destroyed=c,t.finished=s,t.length=o,t.pos=l,o%r&&t.buffer.set(a),t}clone(){return this._cloneInto()}};k.HashMD=le;k.SHA256_IV=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]);k.SHA224_IV=Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]);k.SHA384_IV=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]);k.SHA512_IV=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209])});var Ke=T(h=>{"use strict";Object.defineProperty(h,"__esModule",{value:!0});h.toBig=h.shrSL=h.shrSH=h.rotrSL=h.rotrSH=h.rotrBL=h.rotrBH=h.rotr32L=h.rotr32H=h.rotlSL=h.rotlSH=h.rotlBL=h.rotlBH=h.add5L=h.add5H=h.add4L=h.add4H=h.add3L=h.add3H=void 0;h.add=qe;h.fromBig=ue;h.split=Ae;var X=BigInt(2**32-1),he=BigInt(32);function ue(e,t=!1){return t?{h:Number(e&X),l:Number(e>>he&X)}:{h:Number(e>>he&X)|0,l:Number(e&X)|0}}function Ae(e,t=!1){let r=e.length,a=new Uint32Array(r),o=new Uint32Array(r);for(let s=0;s<r;s++){let{h:c,l}=ue(e[s],t);[a[s],o[s]]=[c,l]}return[a,o]}var Se=(e,t)=>BigInt(e>>>0)<<he|BigInt(t>>>0);h.toBig=Se;var _e=(e,t,r)=>e>>>r;h.shrSH=_e;var Ie=(e,t,r)=>e<<32-r|t>>>r;h.shrSL=Ie;var Be=(e,t,r)=>e>>>r|t<<32-r;h.rotrSH=Be;var Le=(e,t,r)=>e<<32-r|t>>>r;h.rotrSL=Le;var Ve=(e,t,r)=>e<<64-r|t>>>r-32;h.rotrBH=Ve;var Ee=(e,t,r)=>e>>>r-32|t<<64-r;h.rotrBL=Ee;var je=(e,t)=>t;h.rotr32H=je;var Ue=(e,t)=>e;h.rotr32L=Ue;var Ce=(e,t,r)=>e<<r|t>>>32-r;h.rotlSH=Ce;var ze=(e,t,r)=>t<<r|e>>>32-r;h.rotlSL=ze;var De=(e,t,r)=>t<<r-32|e>>>64-r;h.rotlBH=De;var Te=(e,t,r)=>e<<r-32|t>>>64-r;h.rotlBL=Te;function qe(e,t,r,a){let o=(t>>>0)+(a>>>0);return{h:e+r+(o/2**32|0)|0,l:o|0}}var Fe=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);h.add3L=Fe;var Oe=(e,t,r,a)=>t+r+a+(e/2**32|0)|0;h.add3H=Oe;var Me=(e,t,r,a)=>(e>>>0)+(t>>>0)+(r>>>0)+(a>>>0);h.add4L=Me;var Ge=(e,t,r,a,o)=>t+r+a+o+(e/2**32|0)|0;h.add4H=Ge;var Ne=(e,t,r,a,o)=>(e>>>0)+(t>>>0)+(r>>>0)+(a>>>0)+(o>>>0);h.add5L=Ne;var We=(e,t,r,a,o,s)=>t+r+a+o+s+(e/2**32|0)|0;h.add5H=We;var Ht={fromBig:ue,split:Ae,toBig:Se,shrSH:_e,shrSL:Ie,rotrSH:Be,rotrSL:Le,rotrBH:Ve,rotrBL:Ee,rotr32H:je,rotr32L:Ue,rotlSH:Ce,rotlSL:ze,rotlBH:De,rotlBL:Te,add:qe,add3L:Fe,add3H:Oe,add4L:Me,add4H:Ge,add5H:We,add5L:Ne};h.default=Ht});var Re=T(b=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});b.sha512_224=b.sha512_256=b.sha384=b.sha512=b.sha224=b.sha256=b.SHA512_256=b.SHA512_224=b.SHA384=b.SHA512=b.SHA224=b.SHA256=void 0;var i=ke(),d=Ke(),x=ce(),vt=Uint32Array.from([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]),C=new Uint32Array(64),N=class extends i.HashMD{constructor(t=32){super(64,t,8,!1),this.A=i.SHA256_IV[0]|0,this.B=i.SHA256_IV[1]|0,this.C=i.SHA256_IV[2]|0,this.D=i.SHA256_IV[3]|0,this.E=i.SHA256_IV[4]|0,this.F=i.SHA256_IV[5]|0,this.G=i.SHA256_IV[6]|0,this.H=i.SHA256_IV[7]|0}get(){let{A:t,B:r,C:a,D:o,E:s,F:c,G:l,H:f}=this;return[t,r,a,o,s,c,l,f]}set(t,r,a,o,s,c,l,f){this.A=t|0,this.B=r|0,this.C=a|0,this.D=o|0,this.E=s|0,this.F=c|0,this.G=l|0,this.H=f|0}process(t,r){for(let u=0;u<16;u++,r+=4)C[u]=t.getUint32(r,!1);for(let u=16;u<64;u++){let g=C[u-15],w=C[u-2],S=(0,x.rotr)(g,7)^(0,x.rotr)(g,18)^g>>>3,A=(0,x.rotr)(w,17)^(0,x.rotr)(w,19)^w>>>10;C[u]=A+C[u-7]+S+C[u-16]|0}let{A:a,B:o,C:s,D:c,E:l,F:f,G:p,H:y}=this;for(let u=0;u<64;u++){let g=(0,x.rotr)(l,6)^(0,x.rotr)(l,11)^(0,x.rotr)(l,25),w=y+g+(0,i.Chi)(l,f,p)+vt[u]+C[u]|0,A=((0,x.rotr)(a,2)^(0,x.rotr)(a,13)^(0,x.rotr)(a,22))+(0,i.Maj)(a,o,s)|0;y=p,p=f,f=l,l=c+w|0,c=s,s=o,o=a,a=w+A|0}a=a+this.A|0,o=o+this.B|0,s=s+this.C|0,c=c+this.D|0,l=l+this.E|0,f=f+this.F|0,p=p+this.G|0,y=y+this.H|0,this.set(a,o,s,c,l,f,p,y)}roundClean(){(0,x.clean)(C)}destroy(){this.set(0,0,0,0,0,0,0,0),(0,x.clean)(this.buffer)}};b.SHA256=N;var J=class extends N{constructor(){super(28),this.A=i.SHA224_IV[0]|0,this.B=i.SHA224_IV[1]|0,this.C=i.SHA224_IV[2]|0,this.D=i.SHA224_IV[3]|0,this.E=i.SHA224_IV[4]|0,this.F=i.SHA224_IV[5]|0,this.G=i.SHA224_IV[6]|0,this.H=i.SHA224_IV[7]|0}};b.SHA224=J;var Pe=d.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))),kt=Pe[0],At=Pe[1],z=new Uint32Array(80),D=new Uint32Array(80),q=class extends i.HashMD{constructor(t=64){super(128,t,16,!1),this.Ah=i.SHA512_IV[0]|0,this.Al=i.SHA512_IV[1]|0,this.Bh=i.SHA512_IV[2]|0,this.Bl=i.SHA512_IV[3]|0,this.Ch=i.SHA512_IV[4]|0,this.Cl=i.SHA512_IV[5]|0,this.Dh=i.SHA512_IV[6]|0,this.Dl=i.SHA512_IV[7]|0,this.Eh=i.SHA512_IV[8]|0,this.El=i.SHA512_IV[9]|0,this.Fh=i.SHA512_IV[10]|0,this.Fl=i.SHA512_IV[11]|0,this.Gh=i.SHA512_IV[12]|0,this.Gl=i.SHA512_IV[13]|0,this.Hh=i.SHA512_IV[14]|0,this.Hl=i.SHA512_IV[15]|0}get(){let{Ah:t,Al:r,Bh:a,Bl:o,Ch:s,Cl:c,Dh:l,Dl:f,Eh:p,El:y,Fh:u,Fl:g,Gh:w,Gl:S,Hh:A,Hl:_}=this;return[t,r,a,o,s,c,l,f,p,y,u,g,w,S,A,_]}set(t,r,a,o,s,c,l,f,p,y,u,g,w,S,A,_){this.Ah=t|0,this.Al=r|0,this.Bh=a|0,this.Bl=o|0,this.Ch=s|0,this.Cl=c|0,this.Dh=l|0,this.Dl=f|0,this.Eh=p|0,this.El=y|0,this.Fh=u|0,this.Fl=g|0,this.Gh=w|0,this.Gl=S|0,this.Hh=A|0,this.Hl=_|0}process(t,r){for(let m=0;m<16;m++,r+=4)z[m]=t.getUint32(r),D[m]=t.getUint32(r+=4);for(let m=16;m<80;m++){let j=z[m-15]|0,U=D[m-15]|0,ee=d.rotrSH(j,U,1)^d.rotrSH(j,U,8)^d.shrSH(j,U,7),te=d.rotrSL(j,U,1)^d.rotrSL(j,U,8)^d.shrSL(j,U,7),L=z[m-2]|0,V=D[m-2]|0,W=d.rotrSH(L,V,19)^d.rotrBH(L,V,61)^d.shrSH(L,V,6),re=d.rotrSL(L,V,19)^d.rotrBL(L,V,61)^d.shrSL(L,V,6),K=d.add4L(te,re,D[m-7],D[m-16]),ae=d.add4H(K,ee,W,z[m-7],z[m-16]);z[m]=ae|0,D[m]=K|0}let{Ah:a,Al:o,Bh:s,Bl:c,Ch:l,Cl:f,Dh:p,Dl:y,Eh:u,El:g,Fh:w,Fl:S,Gh:A,Gl:_,Hh:M,Hl:G}=this;for(let m=0;m<80;m++){let j=d.rotrSH(u,g,14)^d.rotrSH(u,g,18)^d.rotrBH(u,g,41),U=d.rotrSL(u,g,14)^d.rotrSL(u,g,18)^d.rotrBL(u,g,41),ee=u&w^~u&A,te=g&S^~g&_,L=d.add5L(G,U,te,At[m],D[m]),V=d.add5H(L,M,j,ee,kt[m],z[m]),W=L|0,re=d.rotrSH(a,o,28)^d.rotrBH(a,o,34)^d.rotrBH(a,o,39),K=d.rotrSL(a,o,28)^d.rotrBL(a,o,34)^d.rotrBL(a,o,39),ae=a&s^a&l^s&l,$e=o&c^o&f^c&f;M=A|0,G=_|0,A=w|0,_=S|0,w=u|0,S=g|0,{h:u,l:g}=d.add(p|0,y|0,V|0,W|0),p=l|0,y=f|0,l=s|0,f=c|0,s=a|0,c=o|0;let fe=d.add3L(W,K,$e);a=d.add3H(fe,V,re,ae),o=fe|0}({h:a,l:o}=d.add(this.Ah|0,this.Al|0,a|0,o|0)),{h:s,l:c}=d.add(this.Bh|0,this.Bl|0,s|0,c|0),{h:l,l:f}=d.add(this.Ch|0,this.Cl|0,l|0,f|0),{h:p,l:y}=d.add(this.Dh|0,this.Dl|0,p|0,y|0),{h:u,l:g}=d.add(this.Eh|0,this.El|0,u|0,g|0),{h:w,l:S}=d.add(this.Fh|0,this.Fl|0,w|0,S|0),{h:A,l:_}=d.add(this.Gh|0,this.Gl|0,A|0,_|0),{h:M,l:G}=d.add(this.Hh|0,this.Hl|0,M|0,G|0),this.set(a,o,s,c,l,f,p,y,u,g,w,S,A,_,M,G)}roundClean(){(0,x.clean)(z,D)}destroy(){(0,x.clean)(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}};b.SHA512=q;var Y=class extends q{constructor(){super(48),this.Ah=i.SHA384_IV[0]|0,this.Al=i.SHA384_IV[1]|0,this.Bh=i.SHA384_IV[2]|0,this.Bl=i.SHA384_IV[3]|0,this.Ch=i.SHA384_IV[4]|0,this.Cl=i.SHA384_IV[5]|0,this.Dh=i.SHA384_IV[6]|0,this.Dl=i.SHA384_IV[7]|0,this.Eh=i.SHA384_IV[8]|0,this.El=i.SHA384_IV[9]|0,this.Fh=i.SHA384_IV[10]|0,this.Fl=i.SHA384_IV[11]|0,this.Gh=i.SHA384_IV[12]|0,this.Gl=i.SHA384_IV[13]|0,this.Hh=i.SHA384_IV[14]|0,this.Hl=i.SHA384_IV[15]|0}};b.SHA384=Y;var H=Uint32Array.from([2352822216,424955298,1944164710,2312950998,502970286,855612546,1738396948,1479516111,258812777,2077511080,2011393907,79989058,1067287976,1780299464,286451373,2446758561]),v=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]),Q=class extends q{constructor(){super(28),this.Ah=H[0]|0,this.Al=H[1]|0,this.Bh=H[2]|0,this.Bl=H[3]|0,this.Ch=H[4]|0,this.Cl=H[5]|0,this.Dh=H[6]|0,this.Dl=H[7]|0,this.Eh=H[8]|0,this.El=H[9]|0,this.Fh=H[10]|0,this.Fl=H[11]|0,this.Gh=H[12]|0,this.Gl=H[13]|0,this.Hh=H[14]|0,this.Hl=H[15]|0}};b.SHA512_224=Q;var Z=class extends q{constructor(){super(32),this.Ah=v[0]|0,this.Al=v[1]|0,this.Bh=v[2]|0,this.Bl=v[3]|0,this.Ch=v[4]|0,this.Cl=v[5]|0,this.Dh=v[6]|0,this.Dl=v[7]|0,this.Eh=v[8]|0,this.El=v[9]|0,this.Fh=v[10]|0,this.Fl=v[11]|0,this.Gh=v[12]|0,this.Gl=v[13]|0,this.Hh=v[14]|0,this.Hl=v[15]|0}};b.SHA512_256=Z;b.sha256=(0,x.createHasher)(()=>new N);b.sha224=(0,x.createHasher)(()=>new J);b.sha512=(0,x.createHasher)(()=>new q);b.sha384=(0,x.createHasher)(()=>new Y);b.sha512_256=(0,x.createHasher)(()=>new Z);b.sha512_224=(0,x.createHasher)(()=>new Q)});var Xe=T(B=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});B.sha224=B.SHA224=B.sha256=B.SHA256=void 0;var $=Re();B.SHA256=$.SHA256;B.sha256=$.sha256;B.SHA224=$.SHA224;B.sha224=$.sha224});var Je=T((Mt,St)=>{St.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{sha256:_t}=Xe(),Qe=Je(),Ye="Invalid mnemonic",It="Invalid entropy",Bt="Invalid mnemonic checksum";function Lt(e){return(e||"").normalize("NFKD")}function de(e,t,r){for(;e.length<r;)e=t+e;return e}function Vt(e){return parseInt(e,2)}function Et(e){return e.map(t=>de(t.toString(2),"0",8)).join("")}function jt(e){let r=e.length*8/32,a=_t(Uint8Array.from(e));return Et(Array.from(a)).slice(0,r)}function Ze(e,t){t=t||Qe;let r=Lt(e).split(" ");if(r.length%3!==0)throw new Error(Ye);let a=r.map(p=>{let y=t.indexOf(p);if(y===-1)throw new Error(Ye);return de(y.toString(2),"0",11)}).join(""),o=Math.floor(a.length/33)*32,s=a.slice(0,o),c=a.slice(o),l=s.match(/(.{1,8})/g).map(Vt);if(l.length<16||l.length>32||l.length%4!==0)throw new Error(It);if(jt(l)!==c)throw new Error(Bt);return l.map(p=>de(p.toString(16),"0",2)).join("")}function Ut(e,t){try{Ze(e,t)}catch{return!1}return!0}window.bip39={validateMnemonic:Ut,mnemonicToEntropy:Ze,wordlist:Qe};})();
/*! Bundled license information:
@noble/hashes/utils.js:
(*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
*/