UNPKG

@substrate-system/mergeparty

Version:
1 lines 3.44 MB
var q7=Object.create;var Yj=Object.defineProperty;var I7=Object.getOwnPropertyDescriptor;var k7=Object.getOwnPropertyNames;var w7=Object.getPrototypeOf,y7=Object.prototype.hasOwnProperty;var a=(j,A)=>Yj(j,"name",{value:A,configurable:!0});var jA=(j,A)=>()=>(A||j((A={exports:{}}).exports,A),A.exports),Ae=(j,A)=>{for(var e in A)Yj(j,e,{get:A[e],enumerable:!0})},v7=(j,A,e,t)=>{if(A&&typeof A=="object"||typeof A=="function")for(let r of k7(A))!y7.call(j,r)&&r!==e&&Yj(j,r,{get:()=>A[r],enumerable:!(t=I7(A,r))||t.enumerable});return j};var $A=(j,A,e)=>(e=j!=null?q7(w7(j)):{},v7(A||!j||!j.__esModule?Yj(e,"default",{value:j,enumerable:!0}):e,j));var O6=(()=>{for(var j=new Uint8Array(128),A=0;A<64;A++)j[A<26?A+65:A<52?A+71:A<62?A-4:A*4-205]=A;return e=>{for(var t=e.length,r=new Uint8Array((t-(e[t-1]=="=")-(e[t-2]=="="))*3/4|0),o=0,n=0;o<t;){var s=j[e.charCodeAt(o++)],c=j[e.charCodeAt(o++)],u=j[e.charCodeAt(o++)],h=j[e.charCodeAt(o++)];r[n++]=s<<2|c>>4,r[n++]=c<<4|u>>2,r[n++]=u<<6|h}return r}})();var Ct=jA((ni,A6)=>{"use strict";var sa=Object.prototype.hasOwnProperty,eA="~";function Oj(){}a(Oj,"Events");Object.create&&(Oj.prototype=Object.create(null),new Oj().__proto__||(eA=!1));function ca(j,A,e){this.fn=j,this.context=A,this.once=e||!1}a(ca,"EE");function St(j,A,e,t,r){if(typeof e!="function")throw new TypeError("The listener must be a function");var o=new ca(e,t||j,r),n=eA?eA+A:A;return j._events[n]?j._events[n].fn?j._events[n]=[j._events[n],o]:j._events[n].push(o):(j._events[n]=o,j._eventsCount++),j}a(St,"addListener");function Ee(j,A){--j._eventsCount===0?j._events=new Oj:delete j._events[A]}a(Ee,"clearEvent");function W(){this._events=new Oj,this._eventsCount=0}a(W,"EventEmitter");W.prototype.eventNames=a(function(){var A=[],e,t;if(this._eventsCount===0)return A;for(t in e=this._events)sa.call(e,t)&&A.push(eA?t.slice(1):t);return Object.getOwnPropertySymbols?A.concat(Object.getOwnPropertySymbols(e)):A},"eventNames");W.prototype.listeners=a(function(A){var e=eA?eA+A:A,t=this._events[e];if(!t)return[];if(t.fn)return[t.fn];for(var r=0,o=t.length,n=new Array(o);r<o;r++)n[r]=t[r].fn;return n},"listeners");W.prototype.listenerCount=a(function(A){var e=eA?eA+A:A,t=this._events[e];return t?t.fn?1:t.length:0},"listenerCount");W.prototype.emit=a(function(A,e,t,r,o,n){var s=eA?eA+A:A;if(!this._events[s])return!1;var c=this._events[s],u=arguments.length,h,l;if(c.fn){switch(c.once&&this.removeListener(A,c.fn,void 0,!0),u){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,t),!0;case 4:return c.fn.call(c.context,e,t,r),!0;case 5:return c.fn.call(c.context,e,t,r,o),!0;case 6:return c.fn.call(c.context,e,t,r,o,n),!0}for(l=1,h=new Array(u-1);l<u;l++)h[l-1]=arguments[l];c.fn.apply(c.context,h)}else{var i=c.length,f;for(l=0;l<i;l++)switch(c[l].once&&this.removeListener(A,c[l].fn,void 0,!0),u){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,e);break;case 3:c[l].fn.call(c[l].context,e,t);break;case 4:c[l].fn.call(c[l].context,e,t,r);break;default:if(!h)for(f=1,h=new Array(u-1);f<u;f++)h[f-1]=arguments[f];c[l].fn.apply(c[l].context,h)}}return!0},"emit");W.prototype.on=a(function(A,e,t){return St(this,A,e,t,!1)},"on");W.prototype.once=a(function(A,e,t){return St(this,A,e,t,!0)},"once");W.prototype.removeListener=a(function(A,e,t,r){var o=eA?eA+A:A;if(!this._events[o])return this;if(!e)return Ee(this,o),this;var n=this._events[o];if(n.fn)n.fn===e&&(!r||n.once)&&(!t||n.context===t)&&Ee(this,o);else{for(var s=0,c=[],u=n.length;s<u;s++)(n[s].fn!==e||r&&!n[s].once||t&&n[s].context!==t)&&c.push(n[s]);c.length?this._events[o]=c.length===1?c[0]:c:Ee(this,o)}return this},"removeListener");W.prototype.removeAllListeners=a(function(A){var e;return A?(e=eA?eA+A:A,this._events[e]&&Ee(this,e)):(this._events=new Oj,this._eventsCount=0),this},"removeAllListeners");W.prototype.off=W.prototype.removeListener;W.prototype.addListener=W.prototype.on;W.prefixed=eA;W.EventEmitter=W;typeof A6<"u"&&(A6.exports=W)});var br=jA((GB,Gr)=>{"use strict";var _j=1e3,gj=_j*60,pj=gj*60,oj=pj*24,Uo=oj*7,Qo=oj*365.25;Gr.exports=function(j,A){A=A||{};var e=typeof j;if(e==="string"&&j.length>0)return No(j);if(e==="number"&&isFinite(j))return A.long?Jo(j):Wo(j);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(j))};function No(j){if(j=String(j),!(j.length>100)){var A=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(j);if(A){var e=parseFloat(A[1]),t=(A[2]||"ms").toLowerCase();switch(t){case"years":case"year":case"yrs":case"yr":case"y":return e*Qo;case"weeks":case"week":case"w":return e*Uo;case"days":case"day":case"d":return e*oj;case"hours":case"hour":case"hrs":case"hr":case"h":return e*pj;case"minutes":case"minute":case"mins":case"min":case"m":return e*gj;case"seconds":case"second":case"secs":case"sec":case"s":return e*_j;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return e;default:return}}}}a(No,"parse");function Wo(j){var A=Math.abs(j);return A>=oj?Math.round(j/oj)+"d":A>=pj?Math.round(j/pj)+"h":A>=gj?Math.round(j/gj)+"m":A>=_j?Math.round(j/_j)+"s":j+"ms"}a(Wo,"fmtShort");function Jo(j){var A=Math.abs(j);return A>=oj?we(j,A,oj,"day"):A>=pj?we(j,A,pj,"hour"):A>=gj?we(j,A,gj,"minute"):A>=_j?we(j,A,_j,"second"):j+" ms"}a(Jo,"fmtLong");function we(j,A,e,t){var r=A>=e*1.5;return Math.round(j/e)+" "+t+(r?"s":"")}a(we,"plural")});var gr=jA((_B,_r)=>{"use strict";function Zo(j){e.debug=e,e.default=e,e.coerce=c,e.disable=n,e.enable=r,e.enabled=s,e.humanize=br(),e.destroy=u,Object.keys(j).forEach(h=>{e[h]=j[h]}),e.names=[],e.skips=[],e.formatters={};function A(h){let l=0;for(let i=0;i<h.length;i++)l=(l<<5)-l+h.charCodeAt(i),l|=0;return e.colors[Math.abs(l)%e.colors.length]}a(A,"selectColor"),e.selectColor=A;function e(h){let l,i=null,f,G;function g(...p){if(!g.enabled)return;let F=g,$=Number(new Date),w=$-(l||$);F.diff=w,F.prev=l,F.curr=$,l=$,p[0]=e.coerce(p[0]),typeof p[0]!="string"&&p.unshift("%O");let y=0;p[0]=p[0].replace(/%([a-zA-Z%])/g,(C,T)=>{if(C==="%%")return"%";y++;let D=e.formatters[T];if(typeof D=="function"){let P=p[y];C=D.call(F,P),p.splice(y,1),y--}return C}),e.formatArgs.call(F,p),(F.log||e.log).apply(F,p)}return a(g,"debug"),g.namespace=h,g.useColors=e.useColors(),g.color=e.selectColor(h),g.extend=t,g.destroy=e.destroy,Object.defineProperty(g,"enabled",{enumerable:!0,configurable:!1,get:a(()=>i!==null?i:(f!==e.namespaces&&(f=e.namespaces,G=e.enabled(h)),G),"get"),set:a(p=>{i=p},"set")}),typeof e.init=="function"&&e.init(g),g}a(e,"createDebug");function t(h,l){let i=e(this.namespace+(typeof l>"u"?":":l)+h);return i.log=this.log,i}a(t,"extend");function r(h){e.save(h),e.namespaces=h,e.names=[],e.skips=[];let l=(typeof h=="string"?h:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let i of l)i[0]==="-"?e.skips.push(i.slice(1)):e.names.push(i)}a(r,"enable");function o(h,l){let i=0,f=0,G=-1,g=0;for(;i<h.length;)if(f<l.length&&(l[f]===h[i]||l[f]==="*"))l[f]==="*"?(G=f,g=i,f++):(i++,f++);else if(G!==-1)f=G+1,g++,i=g;else return!1;for(;f<l.length&&l[f]==="*";)f++;return f===l.length}a(o,"matchesTemplate");function n(){let h=[...e.names,...e.skips.map(l=>"-"+l)].join(",");return e.enable(""),h}a(n,"disable");function s(h){for(let l of e.skips)if(o(h,l))return!1;for(let l of e.names)if(o(h,l))return!0;return!1}a(s,"enabled");function c(h){return h instanceof Error?h.stack||h.message:h}a(c,"coerce");function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return a(u,"destroy"),e.enable(e.load()),e}a(Zo,"setup");_r.exports=Zo});var zA=jA((aA,ye)=>{"use strict";aA.formatArgs=An;aA.save=jn;aA.load=en;aA.useColors=Yo;aA.storage=tn();aA.destroy=(()=>{let j=!1;return()=>{j||(j=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();aA.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Yo(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let j;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(j=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(j[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}a(Yo,"useColors");function An(j){if(j[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+j[0]+(this.useColors?"%c ":" ")+"+"+ye.exports.humanize(this.diff),!this.useColors)return;let A="color: "+this.color;j.splice(1,0,A,"color: inherit");let e=0,t=0;j[0].replace(/%[a-zA-Z%]/g,r=>{r!=="%%"&&(e++,r==="%c"&&(t=e))}),j.splice(t,0,A)}a(An,"formatArgs");aA.log=console.debug||console.log||(()=>{});function jn(j){try{j?aA.storage.setItem("debug",j):aA.storage.removeItem("debug")}catch{}}a(jn,"save");function en(){let j;try{j=aA.storage.getItem("debug")||aA.storage.getItem("DEBUG")}catch{}return!j&&typeof process<"u"&&"env"in process&&(j=process.env.DEBUG),j}a(en,"load");function tn(){try{return localStorage}catch{}}a(tn,"localstorage");ye.exports=gr()(aA);var{formatters:rn}=ye.exports;rn.j=function(j){try{return JSON.stringify(j)}catch(A){return"[UnexpectedJSONParseError]: "+A.message}}});var pr=jA(ve=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});ve.crypto=void 0;ve.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0});var b6=jA(k=>{"use strict";Object.defineProperty(k,"__esModule",{value:!0});k.wrapXOFConstructorWithOpts=k.wrapConstructorWithOpts=k.wrapConstructor=k.Hash=k.nextTick=k.swap32IfBE=k.byteSwapIfBE=k.swap8IfBE=k.isLE=void 0;k.isBytes=Fr;k.anumber=u6;k.abytes=Fj;k.ahash=an;k.aexists=on;k.aoutput=nn;k.u8=sn;k.u32=cn;k.clean=ln;k.createView=Bn;k.rotr=En;k.rotl=dn;k.byteSwap=m6;k.byteSwap32=qr;k.bytesToHex=hn;k.hexToBytes=un;k.asyncLoop=mn;k.utf8ToBytes=G6;k.bytesToUtf8=Gn;k.toBytes=Oe;k.kdfInputToBytes=bn;k.concatBytes=_n;k.checkOpts=gn;k.createHasher=kr;k.createOptHasher=wr;k.createXOFer=yr;k.randomBytes=pn;var $j=pr();function Fr(j){return j instanceof Uint8Array||ArrayBuffer.isView(j)&&j.constructor.name==="Uint8Array"}a(Fr,"isBytes");function u6(j){if(!Number.isSafeInteger(j)||j<0)throw new Error("positive integer expected, got "+j)}a(u6,"anumber");function Fj(j,...A){if(!Fr(j))throw new Error("Uint8Array expected");if(A.length>0&&!A.includes(j.length))throw new Error("Uint8Array expected of length "+A+", got length="+j.length)}a(Fj,"abytes");function an(j){if(typeof j!="function"||typeof j.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");u6(j.outputLen),u6(j.blockLen)}a(an,"ahash");function on(j,A=!0){if(j.destroyed)throw new Error("Hash instance has been destroyed");if(A&&j.finished)throw new Error("Hash#digest() has already been called")}a(on,"aexists");function nn(j,A){Fj(j);let e=A.outputLen;if(j.length<e)throw new Error("digestInto() expects output buffer of length at least "+e)}a(nn,"aoutput");function sn(j){return new Uint8Array(j.buffer,j.byteOffset,j.byteLength)}a(sn,"u8");function cn(j){return new Uint32Array(j.buffer,j.byteOffset,Math.floor(j.byteLength/4))}a(cn,"u32");function ln(...j){for(let A=0;A<j.length;A++)j[A].fill(0)}a(ln,"clean");function Bn(j){return new DataView(j.buffer,j.byteOffset,j.byteLength)}a(Bn,"createView");function En(j,A){return j<<32-A|j>>>A}a(En,"rotr");function dn(j,A){return j<<A|j>>>32-A>>>0}a(dn,"rotl");k.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function m6(j){return j<<24&4278190080|j<<8&16711680|j>>>8&65280|j>>>24&255}a(m6,"byteSwap");k.swap8IfBE=k.isLE?j=>j:j=>m6(j);k.byteSwapIfBE=k.swap8IfBE;function qr(j){for(let A=0;A<j.length;A++)j[A]=m6(j[A]);return j}a(qr,"byteSwap32");k.swap32IfBE=k.isLE?j=>j:qr;var Ir=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",fn=Array.from({length:256},(j,A)=>A.toString(16).padStart(2,"0"));function hn(j){if(Fj(j),Ir)return j.toHex();let A="";for(let e=0;e<j.length;e++)A+=fn[j[e]];return A}a(hn,"bytesToHex");var SA={_0:48,_9:57,A:65,F:70,a:97,f:102};function $r(j){if(j>=SA._0&&j<=SA._9)return j-SA._0;if(j>=SA.A&&j<=SA.F)return j-(SA.A-10);if(j>=SA.a&&j<=SA.f)return j-(SA.a-10)}a($r,"asciiToBase16");function un(j){if(typeof j!="string")throw new Error("hex string expected, got "+typeof j);if(Ir)return Uint8Array.fromHex(j);let A=j.length,e=A/2;if(A%2)throw new Error("hex string expected, got unpadded hex of length "+A);let t=new Uint8Array(e);for(let r=0,o=0;r<e;r++,o+=2){let n=$r(j.charCodeAt(o)),s=$r(j.charCodeAt(o+1));if(n===void 0||s===void 0){let c=j[o]+j[o+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+o)}t[r]=n*16+s}return t}a(un,"hexToBytes");var xn=a(async()=>{},"nextTick");k.nextTick=xn;async function mn(j,A,e){let t=Date.now();for(let r=0;r<j;r++){e(r);let o=Date.now()-t;o>=0&&o<A||(await(0,k.nextTick)(),t+=o)}}a(mn,"asyncLoop");function G6(j){if(typeof j!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(j))}a(G6,"utf8ToBytes");function Gn(j){return new TextDecoder().decode(j)}a(Gn,"bytesToUtf8");function Oe(j){return typeof j=="string"&&(j=G6(j)),Fj(j),j}a(Oe,"toBytes");function bn(j){return typeof j=="string"&&(j=G6(j)),Fj(j),j}a(bn,"kdfInputToBytes");function _n(...j){let A=0;for(let t=0;t<j.length;t++){let r=j[t];Fj(r),A+=r.length}let e=new Uint8Array(A);for(let t=0,r=0;t<j.length;t++){let o=j[t];e.set(o,r),r+=o.length}return e}a(_n,"concatBytes");function gn(j,A){if(A!==void 0&&{}.toString.call(A)!=="[object Object]")throw new Error("options should be object or undefined");return Object.assign(j,A)}a(gn,"checkOpts");var x6=class{static{a(this,"Hash")}};k.Hash=x6;function kr(j){let A=a(t=>j().update(Oe(t)).digest(),"hashC"),e=j();return A.outputLen=e.outputLen,A.blockLen=e.blockLen,A.create=()=>j(),A}a(kr,"createHasher");function wr(j){let A=a((t,r)=>j(r).update(Oe(t)).digest(),"hashC"),e=j({});return A.outputLen=e.outputLen,A.blockLen=e.blockLen,A.create=t=>j(t),A}a(wr,"createOptHasher");function yr(j){let A=a((t,r)=>j(r).update(Oe(t)).digest(),"hashC"),e=j({});return A.outputLen=e.outputLen,A.blockLen=e.blockLen,A.create=t=>j(t),A}a(yr,"createXOFer");k.wrapConstructor=kr;k.wrapConstructorWithOpts=wr;k.wrapXOFConstructorWithOpts=yr;function pn(j=32){if($j.crypto&&typeof $j.crypto.getRandomValues=="function")return $j.crypto.getRandomValues(new Uint8Array(j));if($j.crypto&&typeof $j.crypto.randomBytes=="function")return Uint8Array.from($j.crypto.randomBytes(j));throw new Error("crypto.getRandomValues must be defined")}a(pn,"randomBytes")});var Or=jA(tA=>{"use strict";Object.defineProperty(tA,"__esModule",{value:!0});tA.SHA512_IV=tA.SHA384_IV=tA.SHA224_IV=tA.SHA256_IV=tA.HashMD=void 0;tA.setBigUint64=vr;tA.Chi=$n;tA.Maj=Fn;var wA=b6();function vr(j,A,e,t){if(typeof j.setBigUint64=="function")return j.setBigUint64(A,e,t);let r=BigInt(32),o=BigInt(4294967295),n=Number(e>>r&o),s=Number(e&o),c=t?4:0,u=t?0:4;j.setUint32(A+c,n,t),j.setUint32(A+u,s,t)}a(vr,"setBigUint64");function $n(j,A,e){return j&A^~j&e}a($n,"Chi");function Fn(j,A,e){return j&A^j&e^A&e}a(Fn,"Maj");var _6=class extends wA.Hash{static{a(this,"HashMD")}constructor(A,e,t,r){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=A,this.outputLen=e,this.padOffset=t,this.isLE=r,this.buffer=new Uint8Array(A),this.view=(0,wA.createView)(this.buffer)}update(A){(0,wA.aexists)(this),A=(0,wA.toBytes)(A),(0,wA.abytes)(A);let{view:e,buffer:t,blockLen:r}=this,o=A.length;for(let n=0;n<o;){let s=Math.min(r-this.pos,o-n);if(s===r){let c=(0,wA.createView)(A);for(;r<=o-n;n+=r)this.process(c,n);continue}t.set(A.subarray(n,n+s),this.pos),this.pos+=s,n+=s,this.pos===r&&(this.process(e,0),this.pos=0)}return this.length+=A.length,this.roundClean(),this}digestInto(A){(0,wA.aexists)(this),(0,wA.aoutput)(A,this),this.finished=!0;let{buffer:e,view:t,blockLen:r,isLE:o}=this,{pos:n}=this;e[n++]=128,(0,wA.clean)(this.buffer.subarray(n)),this.padOffset>r-n&&(this.process(t,0),n=0);for(let l=n;l<r;l++)e[l]=0;vr(t,r-8,BigInt(this.length*8),o),this.process(t,0);let s=(0,wA.createView)(A),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");let u=c/4,h=this.get();if(u>h.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;l<u;l++)s.setUint32(4*l,h[l],o)}digest(){let{buffer:A,outputLen:e}=this;this.digestInto(A);let t=A.slice(0,e);return this.destroy(),t}_cloneInto(A){A||(A=new this.constructor),A.set(...this.get());let{blockLen:e,buffer:t,length:r,finished:o,destroyed:n,pos:s}=this;return A.destroyed=n,A.finished=o,A.length=r,A.pos=s,r%e&&A.buffer.set(t),A}clone(){return this._cloneInto()}};tA.HashMD=_6;tA.SHA256_IV=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]);tA.SHA224_IV=Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]);tA.SHA384_IV=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]);tA.SHA512_IV=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209])});var j7=jA(O=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0});O.toBig=O.shrSL=O.shrSH=O.rotrSL=O.rotrSH=O.rotrBL=O.rotrBH=O.rotr32L=O.rotr32H=O.rotlSL=O.rotlSH=O.rotlBL=O.rotlBH=O.add5L=O.add5H=O.add4L=O.add4H=O.add3L=O.add3H=void 0;O.add=Qr;O.fromBig=p6;O.split=Hr;var He=BigInt(2**32-1),g6=BigInt(32);function p6(j,A=!1){return A?{h:Number(j&He),l:Number(j>>g6&He)}:{h:Number(j>>g6&He)|0,l:Number(j&He)|0}}a(p6,"fromBig");function Hr(j,A=!1){let e=j.length,t=new Uint32Array(e),r=new Uint32Array(e);for(let o=0;o<e;o++){let{h:n,l:s}=p6(j[o],A);[t[o],r[o]]=[n,s]}return[t,r]}a(Hr,"split");var Kr=a((j,A)=>BigInt(j>>>0)<<g6|BigInt(A>>>0),"toBig");O.toBig=Kr;var Tr=a((j,A,e)=>j>>>e,"shrSH");O.shrSH=Tr;var Dr=a((j,A,e)=>j<<32-e|A>>>e,"shrSL");O.shrSL=Dr;var Pr=a((j,A,e)=>j>>>e|A<<32-e,"rotrSH");O.rotrSH=Pr;var Sr=a((j,A,e)=>j<<32-e|A>>>e,"rotrSL");O.rotrSL=Sr;var Cr=a((j,A,e)=>j<<64-e|A>>>e-32,"rotrBH");O.rotrBH=Cr;var Mr=a((j,A,e)=>j>>>e-32|A<<64-e,"rotrBL");O.rotrBL=Mr;var Rr=a((j,A)=>A,"rotr32H");O.rotr32H=Rr;var Xr=a((j,A)=>j,"rotr32L");O.rotr32L=Xr;var Lr=a((j,A,e)=>j<<e|A>>>32-e,"rotlSH");O.rotlSH=Lr;var Vr=a((j,A,e)=>A<<e|j>>>32-e,"rotlSL");O.rotlSL=Vr;var zr=a((j,A,e)=>A<<e-32|j>>>64-e,"rotlBH");O.rotlBH=zr;var Ur=a((j,A,e)=>j<<e-32|A>>>64-e,"rotlBL");O.rotlBL=Ur;function Qr(j,A,e,t){let r=(A>>>0)+(t>>>0);return{h:j+e+(r/2**32|0)|0,l:r|0}}a(Qr,"add");var Nr=a((j,A,e)=>(j>>>0)+(A>>>0)+(e>>>0),"add3L");O.add3L=Nr;var Wr=a((j,A,e,t)=>A+e+t+(j/2**32|0)|0,"add3H");O.add3H=Wr;var Jr=a((j,A,e,t)=>(j>>>0)+(A>>>0)+(e>>>0)+(t>>>0),"add4L");O.add4L=Jr;var Zr=a((j,A,e,t,r)=>A+e+t+r+(j/2**32|0)|0,"add4H");O.add4H=Zr;var Yr=a((j,A,e,t,r)=>(j>>>0)+(A>>>0)+(e>>>0)+(t>>>0)+(r>>>0),"add5L");O.add5L=Yr;var A7=a((j,A,e,t,r,o)=>A+e+t+r+o+(j/2**32|0)|0,"add5H");O.add5H=A7;var qn={fromBig:p6,split:Hr,toBig:Kr,shrSH:Tr,shrSL:Dr,rotrSH:Pr,rotrSL:Sr,rotrBH:Cr,rotrBL:Mr,rotr32H:Rr,rotr32L:Xr,rotlSH:Lr,rotlSL:Vr,rotlBH:zr,rotlBL:Ur,add:Qr,add3L:Nr,add3H:Wr,add4L:Jr,add4H:Zr,add5H:A7,add5L:Yr};O.default=qn});var t7=jA(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});L.sha512_224=L.sha512_256=L.sha384=L.sha512=L.sha224=L.sha256=L.SHA512_256=L.SHA512_224=L.SHA384=L.SHA512=L.SHA224=L.SHA256=void 0;var q=Or(),K=j7(),V=b6(),In=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]),UA=new Uint32Array(64),Qj=class extends q.HashMD{static{a(this,"SHA256")}constructor(A=32){super(64,A,8,!1),this.A=q.SHA256_IV[0]|0,this.B=q.SHA256_IV[1]|0,this.C=q.SHA256_IV[2]|0,this.D=q.SHA256_IV[3]|0,this.E=q.SHA256_IV[4]|0,this.F=q.SHA256_IV[5]|0,this.G=q.SHA256_IV[6]|0,this.H=q.SHA256_IV[7]|0}get(){let{A,B:e,C:t,D:r,E:o,F:n,G:s,H:c}=this;return[A,e,t,r,o,n,s,c]}set(A,e,t,r,o,n,s,c){this.A=A|0,this.B=e|0,this.C=t|0,this.D=r|0,this.E=o|0,this.F=n|0,this.G=s|0,this.H=c|0}process(A,e){for(let l=0;l<16;l++,e+=4)UA[l]=A.getUint32(e,!1);for(let l=16;l<64;l++){let i=UA[l-15],f=UA[l-2],G=(0,V.rotr)(i,7)^(0,V.rotr)(i,18)^i>>>3,g=(0,V.rotr)(f,17)^(0,V.rotr)(f,19)^f>>>10;UA[l]=g+UA[l-7]+G+UA[l-16]|0}let{A:t,B:r,C:o,D:n,E:s,F:c,G:u,H:h}=this;for(let l=0;l<64;l++){let i=(0,V.rotr)(s,6)^(0,V.rotr)(s,11)^(0,V.rotr)(s,25),f=h+i+(0,q.Chi)(s,c,u)+In[l]+UA[l]|0,g=((0,V.rotr)(t,2)^(0,V.rotr)(t,13)^(0,V.rotr)(t,22))+(0,q.Maj)(t,r,o)|0;h=u,u=c,c=s,s=n+f|0,n=o,o=r,r=t,t=f+g|0}t=t+this.A|0,r=r+this.B|0,o=o+this.C|0,n=n+this.D|0,s=s+this.E|0,c=c+this.F|0,u=u+this.G|0,h=h+this.H|0,this.set(t,r,o,n,s,c,u,h)}roundClean(){(0,V.clean)(UA)}destroy(){this.set(0,0,0,0,0,0,0,0),(0,V.clean)(this.buffer)}};L.SHA256=Qj;var Ke=class extends Qj{static{a(this,"SHA224")}constructor(){super(28),this.A=q.SHA224_IV[0]|0,this.B=q.SHA224_IV[1]|0,this.C=q.SHA224_IV[2]|0,this.D=q.SHA224_IV[3]|0,this.E=q.SHA224_IV[4]|0,this.F=q.SHA224_IV[5]|0,this.G=q.SHA224_IV[6]|0,this.H=q.SHA224_IV[7]|0}};L.SHA224=Ke;var e7=K.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(j=>BigInt(j))),kn=e7[0],wn=e7[1],QA=new Uint32Array(80),NA=new Uint32Array(80),nj=class extends q.HashMD{static{a(this,"SHA512")}constructor(A=64){super(128,A,16,!1),this.Ah=q.SHA512_IV[0]|0,this.Al=q.SHA512_IV[1]|0,this.Bh=q.SHA512_IV[2]|0,this.Bl=q.SHA512_IV[3]|0,this.Ch=q.SHA512_IV[4]|0,this.Cl=q.SHA512_IV[5]|0,this.Dh=q.SHA512_IV[6]|0,this.Dl=q.SHA512_IV[7]|0,this.Eh=q.SHA512_IV[8]|0,this.El=q.SHA512_IV[9]|0,this.Fh=q.SHA512_IV[10]|0,this.Fl=q.SHA512_IV[11]|0,this.Gh=q.SHA512_IV[12]|0,this.Gl=q.SHA512_IV[13]|0,this.Hh=q.SHA512_IV[14]|0,this.Hl=q.SHA512_IV[15]|0}get(){let{Ah:A,Al:e,Bh:t,Bl:r,Ch:o,Cl:n,Dh:s,Dl:c,Eh:u,El:h,Fh:l,Fl:i,Gh:f,Gl:G,Hh:g,Hl:p}=this;return[A,e,t,r,o,n,s,c,u,h,l,i,f,G,g,p]}set(A,e,t,r,o,n,s,c,u,h,l,i,f,G,g,p){this.Ah=A|0,this.Al=e|0,this.Bh=t|0,this.Bl=r|0,this.Ch=o|0,this.Cl=n|0,this.Dh=s|0,this.Dl=c|0,this.Eh=u|0,this.El=h|0,this.Fh=l|0,this.Fl=i|0,this.Gh=f|0,this.Gl=G|0,this.Hh=g|0,this.Hl=p|0}process(A,e){for(let w=0;w<16;w++,e+=4)QA[w]=A.getUint32(e),NA[w]=A.getUint32(e+=4);for(let w=16;w<80;w++){let y=QA[w-15]|0,H=NA[w-15]|0,C=K.rotrSH(y,H,1)^K.rotrSH(y,H,8)^K.shrSH(y,H,7),T=K.rotrSL(y,H,1)^K.rotrSL(y,H,8)^K.shrSL(y,H,7),D=QA[w-2]|0,P=NA[w-2]|0,pA=K.rotrSH(D,P,19)^K.rotrBH(D,P,61)^K.shrSH(D,P,6),OA=K.rotrSL(D,P,19)^K.rotrBL(D,P,61)^K.shrSL(D,P,6),HA=K.add4L(T,OA,NA[w-7],NA[w-16]),ze=K.add4H(HA,C,pA,QA[w-7],QA[w-16]);QA[w]=ze|0,NA[w]=HA|0}let{Ah:t,Al:r,Bh:o,Bl:n,Ch:s,Cl:c,Dh:u,Dl:h,Eh:l,El:i,Fh:f,Fl:G,Gh:g,Gl:p,Hh:F,Hl:$}=this;for(let w=0;w<80;w++){let y=K.rotrSH(l,i,14)^K.rotrSH(l,i,18)^K.rotrBH(l,i,41),H=K.rotrSL(l,i,14)^K.rotrSL(l,i,18)^K.rotrBL(l,i,41),C=l&f^~l&g,T=i&G^~i&p,D=K.add5L($,H,T,wn[w],NA[w]),P=K.add5H(D,F,y,C,kn[w],QA[w]),pA=D|0,OA=K.rotrSH(t,r,28)^K.rotrBH(t,r,34)^K.rotrBH(t,r,39),HA=K.rotrSL(t,r,28)^K.rotrBL(t,r,34)^K.rotrBL(t,r,39),ze=t&o^t&s^o&s,F7=r&n^r&c^n&c;F=g|0,$=p|0,g=f|0,p=G|0,f=l|0,G=i|0,{h:l,l:i}=K.add(u|0,h|0,P|0,pA|0),u=s|0,h=c|0,s=o|0,c=n|0,o=t|0,n=r|0;let v6=K.add3L(pA,HA,F7);t=K.add3H(v6,P,OA,ze),r=v6|0}({h:t,l:r}=K.add(this.Ah|0,this.Al|0,t|0,r|0)),{h:o,l:n}=K.add(this.Bh|0,this.Bl|0,o|0,n|0),{h:s,l:c}=K.add(this.Ch|0,this.Cl|0,s|0,c|0),{h:u,l:h}=K.add(this.Dh|0,this.Dl|0,u|0,h|0),{h:l,l:i}=K.add(this.Eh|0,this.El|0,l|0,i|0),{h:f,l:G}=K.add(this.Fh|0,this.Fl|0,f|0,G|0),{h:g,l:p}=K.add(this.Gh|0,this.Gl|0,g|0,p|0),{h:F,l:$}=K.add(this.Hh|0,this.Hl|0,F|0,$|0),this.set(t,r,o,n,s,c,u,h,l,i,f,G,g,p,F,$)}roundClean(){(0,V.clean)(QA,NA)}destroy(){(0,V.clean)(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}};L.SHA512=nj;var Te=class extends nj{static{a(this,"SHA384")}constructor(){super(48),this.Ah=q.SHA384_IV[0]|0,this.Al=q.SHA384_IV[1]|0,this.Bh=q.SHA384_IV[2]|0,this.Bl=q.SHA384_IV[3]|0,this.Ch=q.SHA384_IV[4]|0,this.Cl=q.SHA384_IV[5]|0,this.Dh=q.SHA384_IV[6]|0,this.Dl=q.SHA384_IV[7]|0,this.Eh=q.SHA384_IV[8]|0,this.El=q.SHA384_IV[9]|0,this.Fh=q.SHA384_IV[10]|0,this.Fl=q.SHA384_IV[11]|0,this.Gh=q.SHA384_IV[12]|0,this.Gl=q.SHA384_IV[13]|0,this.Hh=q.SHA384_IV[14]|0,this.Hl=q.SHA384_IV[15]|0}};L.SHA384=Te;var Z=Uint32Array.from([2352822216,424955298,1944164710,2312950998,502970286,855612546,1738396948,1479516111,258812777,2077511080,2011393907,79989058,1067287976,1780299464,286451373,2446758561]),Y=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]),De=class extends nj{static{a(this,"SHA512_224")}constructor(){super(28),this.Ah=Z[0]|0,this.Al=Z[1]|0,this.Bh=Z[2]|0,this.Bl=Z[3]|0,this.Ch=Z[4]|0,this.Cl=Z[5]|0,this.Dh=Z[6]|0,this.Dl=Z[7]|0,this.Eh=Z[8]|0,this.El=Z[9]|0,this.Fh=Z[10]|0,this.Fl=Z[11]|0,this.Gh=Z[12]|0,this.Gl=Z[13]|0,this.Hh=Z[14]|0,this.Hl=Z[15]|0}};L.SHA512_224=De;var Pe=class extends nj{static{a(this,"SHA512_256")}constructor(){super(32),this.Ah=Y[0]|0,this.Al=Y[1]|0,this.Bh=Y[2]|0,this.Bl=Y[3]|0,this.Ch=Y[4]|0,this.Cl=Y[5]|0,this.Dh=Y[6]|0,this.Dl=Y[7]|0,this.Eh=Y[8]|0,this.El=Y[9]|0,this.Fh=Y[10]|0,this.Fl=Y[11]|0,this.Gh=Y[12]|0,this.Gl=Y[13]|0,this.Hh=Y[14]|0,this.Hl=Y[15]|0}};L.SHA512_256=Pe;L.sha256=(0,V.createHasher)(()=>new Qj);L.sha224=(0,V.createHasher)(()=>new Ke);L.sha512=(0,V.createHasher)(()=>new nj);L.sha384=(0,V.createHasher)(()=>new Te);L.sha512_256=(0,V.createHasher)(()=>new Pe);L.sha512_224=(0,V.createHasher)(()=>new De)});var r7=jA(yA=>{"use strict";Object.defineProperty(yA,"__esModule",{value:!0});yA.sha224=yA.SHA224=yA.sha256=yA.SHA256=void 0;var Se=t7();yA.SHA256=Se.SHA256;yA.sha256=Se.sha256;yA.SHA224=Se.SHA224;yA.sha224=Se.sha224});var o7=jA((KB,a7)=>{"use strict";function yn(j){if(j.length>=255)throw new TypeError("Alphabet too long");for(var A=new Uint8Array(256),e=0;e<A.length;e++)A[e]=255;for(var t=0;t<j.length;t++){var r=j.charAt(t),o=r.charCodeAt(0);if(A[o]!==255)throw new TypeError(r+" is ambiguous");A[o]=t}var n=j.length,s=j.charAt(0),c=Math.log(n)/Math.log(256),u=Math.log(256)/Math.log(n);function h(f){if(f instanceof Uint8Array||(ArrayBuffer.isView(f)?f=new Uint8Array(f.buffer,f.byteOffset,f.byteLength):Array.isArray(f)&&(f=Uint8Array.from(f))),!(f instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(f.length===0)return"";for(var G=0,g=0,p=0,F=f.length;p!==F&&f[p]===0;)p++,G++;for(var $=(F-p)*u+1>>>0,w=new Uint8Array($);p!==F;){for(var y=f[p],H=0,C=$-1;(y!==0||H<g)&&C!==-1;C--,H++)y+=256*w[C]>>>0,w[C]=y%n>>>0,y=y/n>>>0;if(y!==0)throw new Error("Non-zero carry");g=H,p++}for(var T=$-g;T!==$&&w[T]===0;)T++;for(var D=s.repeat(G);T<$;++T)D+=j.charAt(w[T]);return D}a(h,"encode");function l(f){if(typeof f!="string")throw new TypeError("Expected String");if(f.length===0)return new Uint8Array;for(var G=0,g=0,p=0;f[G]===s;)g++,G++;for(var F=(f.length-G)*c+1>>>0,$=new Uint8Array(F);f[G];){var w=f.charCodeAt(G);if(w>255)return;var y=A[w];if(y===255)return;for(var H=0,C=F-1;(y!==0||H<p)&&C!==-1;C--,H++)y+=n*$[C]>>>0,$[C]=y%256>>>0,y=y/256>>>0;if(y!==0)throw new Error("Non-zero carry");p=H,G++}for(var T=F-p;T!==F&&$[T]===0;)T++;for(var D=new Uint8Array(g+(F-T)),P=g;T!==F;)D[P++]=$[T++];return D}a(l,"decodeUnsafe");function i(f){var G=l(f);if(G)return G;throw new Error("Non-base"+n+" character")}return a(i,"decode"),{encode:h,decodeUnsafe:l,decode:i}}a(yn,"base");a7.exports=yn});var s7=jA((DB,n7)=>{"use strict";var vn=o7(),On="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";n7.exports=vn(On)});var l7=jA((PB,c7)=>{"use strict";var $6=s7();c7.exports=function(j){function A(o){var n=Uint8Array.from(o),s=j(n),c=n.length+4,u=new Uint8Array(c);return u.set(n,0),u.set(s.subarray(0,4),n.length),$6.encode(u,c)}a(A,"encode");function e(o){var n=o.slice(0,-4),s=o.slice(-4),c=j(n);if(!(s[0]^c[0]|s[1]^c[1]|s[2]^c[2]|s[3]^c[3]))return n}a(e,"decodeRaw");function t(o){var n=$6.decodeUnsafe(o);if(n)return e(n)}a(t,"decodeUnsafe");function r(o){var n=$6.decode(o),s=e(n,j);if(!s)throw new Error("Invalid checksum");return s}return a(r,"decode"),{encode:A,decode:r,decodeUnsafe:t}}});var E7=jA((CB,B7)=>{"use strict";var{sha256:i7}=r7(),Hn=l7();function Kn(j){return i7(i7(j))}a(Kn,"sha256x2");B7.exports=Hn(Kn)});var x7=jA((u7,Ce)=>{"use strict";(function(j,A){var e={};A(e);var t=e.default;for(var r in e)t[r]=e[r];typeof Ce=="object"&&typeof Ce.exports=="object"?Ce.exports=t:typeof define=="function"&&define.amd?define(function(){return t}):j.sha256=t})(u7,function(j){"use strict";j.__esModule=!0,j.digestLength=32,j.blockSize=64;var A=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]);function e(l,i,f,G,g){for(var p,F,$,w,y,H,C,T,D,P,pA,OA,HA;g>=64;){for(p=i[0],F=i[1],$=i[2],w=i[3],y=i[4],H=i[5],C=i[6],T=i[7],P=0;P<16;P++)pA=G+P*4,l[P]=(f[pA]&255)<<24|(f[pA+1]&255)<<16|(f[pA+2]&255)<<8|f[pA+3]&255;for(P=16;P<64;P++)D=l[P-2],OA=(D>>>17|D<<15)^(D>>>19|D<<13)^D>>>10,D=l[P-15],HA=(D>>>7|D<<25)^(D>>>18|D<<14)^D>>>3,l[P]=(OA+l[P-7]|0)+(HA+l[P-16]|0);for(P=0;P<64;P++)OA=(((y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7))+(y&H^~y&C)|0)+(T+(A[P]+l[P]|0)|0)|0,HA=((p>>>2|p<<30)^(p>>>13|p<<19)^(p>>>22|p<<10))+(p&F^p&$^F&$)|0,T=C,C=H,H=y,y=w+OA|0,w=$,$=F,F=p,p=OA+HA|0;i[0]+=p,i[1]+=F,i[2]+=$,i[3]+=w,i[4]+=y,i[5]+=H,i[6]+=C,i[7]+=T,G+=64,g-=64}return G}a(e,"hashBlocks");var t=(function(){function l(){this.digestLength=j.digestLength,this.blockSize=j.blockSize,this.state=new Int32Array(8),this.temp=new Int32Array(64),this.buffer=new Uint8Array(128),this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this.reset()}return a(l,"Hash"),l.prototype.reset=function(){return this.state[0]=1779033703,this.state[1]=3144134277,this.state[2]=1013904242,this.state[3]=2773480762,this.state[4]=1359893119,this.state[5]=2600822924,this.state[6]=528734635,this.state[7]=1541459225,this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this},l.prototype.clean=function(){for(var i=0;i<this.buffer.length;i++)this.buffer[i]=0;for(var i=0;i<this.temp.length;i++)this.temp[i]=0;this.reset()},l.prototype.update=function(i,f){if(f===void 0&&(f=i.length),this.finished)throw new Error("SHA256: can't update because hash was finished.");var G=0;if(this.bytesHashed+=f,this.bufferLength>0){for(;this.bufferLength<64&&f>0;)this.buffer[this.bufferLength++]=i[G++],f--;this.bufferLength===64&&(e(this.temp,this.state,this.buffer,0,64),this.bufferLength=0)}for(f>=64&&(G=e(this.temp,this.state,i,G,f),f%=64);f>0;)this.buffer[this.bufferLength++]=i[G++],f--;return this},l.prototype.finish=function(i){if(!this.finished){var f=this.bytesHashed,G=this.bufferLength,g=f/536870912|0,p=f<<3,F=f%64<56?64:128;this.buffer[G]=128;for(var $=G+1;$<F-8;$++)this.buffer[$]=0;this.buffer[F-8]=g>>>24&255,this.buffer[F-7]=g>>>16&255,this.buffer[F-6]=g>>>8&255,this.buffer[F-5]=g>>>0&255,this.buffer[F-4]=p>>>24&255,this.buffer[F-3]=p>>>16&255,this.buffer[F-2]=p>>>8&255,this.buffer[F-1]=p>>>0&255,e(this.temp,this.state,this.buffer,0,F),this.finished=!0}for(var $=0;$<8;$++)i[$*4+0]=this.state[$]>>>24&255,i[$*4+1]=this.state[$]>>>16&255,i[$*4+2]=this.state[$]>>>8&255,i[$*4+3]=this.state[$]>>>0&255;return this},l.prototype.digest=function(){var i=new Uint8Array(this.digestLength);return this.finish(i),i},l.prototype._saveState=function(i){for(var f=0;f<this.state.length;f++)i[f]=this.state[f]},l.prototype._restoreState=function(i,f){for(var G=0;G<this.state.length;G++)this.state[G]=i[G];this.bytesHashed=f,this.finished=!1,this.bufferLength=0},l})();j.Hash=t;var r=(function(){function l(i){this.inner=new t,this.outer=new t,this.blockSize=this.inner.blockSize,this.digestLength=this.inner.digestLength;var f=new Uint8Array(this.blockSize);if(i.length>this.blockSize)new t().update(i).finish(f).clean();else for(var G=0;G<i.length;G++)f[G]=i[G];for(var G=0;G<f.length;G++)f[G]^=54;this.inner.update(f);for(var G=0;G<f.length;G++)f[G]^=106;this.outer.update(f),this.istate=new Uint32Array(8),this.ostate=new Uint32Array(8),this.inner._saveState(this.istate),this.outer._saveState(this.ostate);for(var G=0;G<f.length;G++)f[G]=0}return a(l,"HMAC"),l.prototype.reset=function(){return this.inner._restoreState(this.istate,this.inner.blockSize),this.outer._restoreState(this.ostate,this.outer.blockSize),this},l.prototype.clean=function(){for(var i=0;i<this.istate.length;i++)this.ostate[i]=this.istate[i]=0;this.inner.clean(),this.outer.clean()},l.prototype.update=function(i){return this.inner.update(i),this},l.prototype.finish=function(i){return this.outer.finished?this.outer.finish(i):(this.inner.finish(i),this.outer.update(i,this.digestLength).finish(i)),this},l.prototype.digest=function(){var i=new Uint8Array(this.digestLength);return this.finish(i),i},l})();j.HMAC=r;function o(l){var i=new t().update(l),f=i.digest();return i.clean(),f}a(o,"hash"),j.hash=o,j.default=o;function n(l,i){var f=new r(l).update(i),G=f.digest();return f.clean(),G}a(n,"hmac"),j.hmac=n;function s(l,i,f,G){var g=G[0];if(g===0)throw new Error("hkdf: cannot expand more");i.reset(),g>1&&i.update(l),f&&i.update(f),i.update(G),i.finish(l),G[0]++}a(s,"fillBuffer");var c=new Uint8Array(j.digestLength);function u(l,i,f,G){i===void 0&&(i=c),G===void 0&&(G=32);for(var g=new Uint8Array([1]),p=n(i,l),F=new r(p),$=new Uint8Array(F.digestLength),w=$.length,y=new Uint8Array(G),H=0;H<G;H++)w===$.length&&(s($,F,f,g),w=0),y[H]=$[w++];return F.clean(),$.fill(0),g.fill(0),y}a(u,"hkdf"),j.hkdf=u;function h(l,i,f,G){for(var g=new r(l),p=g.digestLength,F=new Uint8Array(4),$=new Uint8Array(p),w=new Uint8Array(p),y=new Uint8Array(G),H=0;H*p<G;H++){var C=H+1;F[0]=C>>>24&255,F[1]=C>>>16&255,F[2]=C>>>8&255,F[3]=C>>>0&255,g.reset(),g.update(i),g.update(F),g.finish(w);for(var T=0;T<p;T++)$[T]=w[T];for(var T=2;T<=f;T++){g.reset(),g.update(w).finish(w);for(var D=0;D<p;D++)$[D]^=w[D]}for(var T=0;T<p&&H*p+T<G;T++)y[H*p+T]=$[T]}for(var H=0;H<p;H++)$[H]=w[H]=0;for(var H=0;H<4;H++)F[H]=0;return g.clean(),y}a(h,"pbkdf2"),j.pbkdf2=h})});var O7=["string","number","bigint","symbol"],H7=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","HTMLElement","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function H6(j){if(j===null)return"null";if(j===void 0)return"undefined";if(j===!0||j===!1)return"boolean";let A=typeof j;if(O7.includes(A))return A;if(A==="function")return"Function";if(Array.isArray(j))return"Array";if(K7(j))return"Buffer";let e=T7(j);return e||"Object"}a(H6,"is");function K7(j){return j&&j.constructor&&j.constructor.isBuffer&&j.constructor.isBuffer.call(null,j)}a(K7,"isBuffer");function T7(j){let A=Object.prototype.toString.call(j).slice(8,-1);if(H7.includes(A))return A}a(T7,"getObjectType");var d=class{static{a(this,"Type")}constructor(A,e,t){this.major=A,this.majorEncoded=A<<5,this.name=e,this.terminal=t}toString(){return`Type[${this.major}].${this.name}`}compare(A){return this.major<A.major?-1:this.major>A.major?1:0}};d.uint=new d(0,"uint",!0);d.negint=new d(1,"negint",!0);d.bytes=new d(2,"bytes",!0);d.string=new d(3,"string",!0);d.array=new d(4,"array",!1);d.map=new d(5,"map",!1);d.tag=new d(6,"tag",!1);d.float=new d(7,"float",!0);d.false=new d(7,"false",!0);d.true=new d(7,"true",!0);d.null=new d(7,"null",!0);d.undefined=new d(7,"undefined",!0);d.break=new d(7,"break",!0);var _=class{static{a(this,"Token")}constructor(A,e,t){this.type=A,this.value=e,this.encodedLength=t,this.encodedBytes=void 0,this.byteValue=void 0}toString(){return`Token[${this.type}].${this.value}`}};var cj=globalThis.process&&!globalThis.process.browser&&globalThis.Buffer&&typeof globalThis.Buffer.isBuffer=="function",D7=new TextDecoder,P7=new TextEncoder;function je(j){return cj&&globalThis.Buffer.isBuffer(j)}a(je,"isBuffer");function Ue(j){return j instanceof Uint8Array?je(j)?new Uint8Array(j.buffer,j.byteOffset,j.byteLength):j:Uint8Array.from(j)}a(Ue,"asU8A");var P6=cj?(j,A,e)=>e-A>64?globalThis.Buffer.from(j.subarray(A,e)).toString("utf8"):T6(j,A,e):(j,A,e)=>e-A>64?D7.decode(j.subarray(A,e)):T6(j,A,e),S6=cj?j=>j.length>64?globalThis.Buffer.from(j):K6(j):j=>j.length>64?P7.encode(j):K6(j),FA=a(j=>Uint8Array.from(j),"fromArray"),lj=cj?(j,A,e)=>je(j)?new Uint8Array(j.subarray(A,e)):j.slice(A,e):(j,A,e)=>j.slice(A,e),C6=cj?(j,A)=>(j=j.map(e=>e instanceof Uint8Array?e:globalThis.Buffer.from(e)),Ue(globalThis.Buffer.concat(j,A))):(j,A)=>{let e=new Uint8Array(A),t=0;for(let r of j)t+r.length>e.length&&(r=r.subarray(0,e.length-t)),e.set(r,t),t+=r.length;return e},M6=cj?j=>globalThis.Buffer.allocUnsafe(j):j=>new Uint8Array(j);function R6(j,A){if(je(j)&&je(A))return j.compare(A);for(let e=0;e<j.length;e++)if(j[e]!==A[e])return j[e]<A[e]?-1:1;return 0}a(R6,"compare");function K6(j){let A=[],e=0;for(let t=0;t<j.length;t++){let r=j.charCodeAt(t);r<128?A[e++]=r:r<2048?(A[e++]=r>>6|192,A[e++]=r&63|128):(r&64512)===55296&&t+1<j.length&&(j.charCodeAt(t+1)&64512)===56320?(r=65536+((r&1023)<<10)+(j.charCodeAt(++t)&1023),A[e++]=r>>18|240,A[e++]=r>>12&63|128,A[e++]=r>>6&63|128,A[e++]=r&63|128):(A[e++]=r>>12|224,A[e++]=r>>6&63|128,A[e++]=r&63|128)}return A}a(K6,"utf8ToBytes");function T6(j,A,e){let t=[];for(;A<e;){let r=j[A],o=null,n=r>239?4:r>223?3:r>191?2:1;if(A+n<=e){let s,c,u,h;switch(n){case 1:r<128&&(o=r);break;case 2:s=j[A+1],(s&192)===128&&(h=(r&31)<<6|s&63,h>127&&(o=h));break;case 3:s=j[A+1],c=j[A+2],(s&192)===128&&(c&192)===128&&(h=(r&15)<<12|(s&63)<<6|c&63,h>2047&&(h<55296||h>57343)&&(o=h));break;case 4:s=j[A+1],c=j[A+2],u=j[A+3],(s&192)===128&&(c&192)===128&&(u&192)===128&&(h=(r&15)<<18|(s&63)<<12|(c&63)<<6|u&63,h>65535&&h<1114112&&(o=h))}}o===null?(o=65533,n=1):o>65535&&(o-=65536,t.push(o>>>10&1023|55296),o=56320|o&1023),t.push(o),A+=n}return S7(t)}a(T6,"utf8Slice");var D6=4096;function S7(j){let A=j.length;if(A<=D6)return String.fromCharCode.apply(String,j);let e="",t=0;for(;t<A;)e+=String.fromCharCode.apply(String,j.slice(t,t+=D6));return e}a(S7,"decodeCodePointsArray");var C7=256,Ij=class{static{a(this,"Bl")}constructor(A=C7){this.chunkSize=A,this.cursor=0,this.maxCursor=-1,this.chunks=[],this._initReuseChunk=null}reset(){this.cursor=0,this.maxCursor=-1,this.chunks.length&&(this.chunks=[]),this._initReuseChunk!==null&&(this.chunks.push(this._initReuseChunk),this.maxCursor=this._initReuseChunk.length-1)}push(A){let e=this.chunks[this.chunks.length-1];if(this.cursor+A.length<=this.maxCursor+1){let r=e.length-(this.maxCursor-this.cursor)-1;e.set(A,r)}else{if(e){let r=e.length-(this.maxCursor-this.cursor)-1;r<e.length&&(this.chunks[this.chunks.length-1]=e.subarray(0,r),this.maxCursor=this.cursor-1)}A.length<64&&A.length<this.chunkSize?(e=M6(this.chunkSize),this.chunks.push(e),this.maxCursor+=e.length,this._initReuseChunk===null&&(this._initReuseChunk=e),e.set(A,0)):(this.chunks.push(A),this.maxCursor+=A.length)}this.cursor+=A.length}toBytes(A=!1){let e;if(this.chunks.length===1){let t=this.chunks[0];A&&this.cursor>t.length/2?(e=this.cursor===t.length?t:t.subarray(0,this.cursor),this._initReuseChunk=null,this.chunks=[]):e=lj(t,0,this.cursor)}else e=C6(this.chunks,this.cursor);return A&&this.reset(),e}};var v="CBOR decode error:",Qe="CBOR encode error:",kj=[];kj[23]=1;kj[24]=2;kj[25]=3;kj[26]=5;kj[27]=9;function KA(j,A,e){if(j.length-A<e)throw new Error(`${v} not enough data for type`)}a(KA,"assertEnoughData");var U=[24,256,65536,4294967296,BigInt("18446744073709551616")];function oA(j,A,e){KA(j,A,1);let t=j[A];if(e.strict===!0&&t<U[0])throw new Error(`${v} integer encoded in more bytes than necessary (strict decode)`);return t}a(oA,"readUint8");function nA(j,A,e){KA(j,A,2);let t=j[A]<<8|j[A+1];if(e.strict===!0&&t<U[1])throw new Error(`${v} integer encoded in more bytes than necessary (strict decode)`);return t}a(nA,"readUint16");function sA(j,A,e){KA(j,A,4);let t=j[A]*16777216+(j[A+1]<<16)+(j[A+2]<<8)+j[A+3];if(e.strict===!0&&t<U[2])throw new Error(`${v} integer encoded in more bytes than necessary (strict decode)`);return t}a(sA,"readUint32");function cA(j,A,e){KA(j,A,8);let t=j[A]*16777216+(j[A+1]<<16)+(j[A+2]<<8)+j[A+3],r=j[A+4]*16777216+(j[A+5]<<16)+(j[A+6]<<8)+j[A+7],o=(BigInt(t)<<BigInt(32))+BigInt(r);if(e.strict===!0&&o<U[3])throw new Error(`${v} integer encoded in more bytes than necessary (strict decode)`);if(o<=Number.MAX_SAFE_INTEGER)return Number(o);if(e.allowBigInt===!0)return o;throw new Error(`${v} integers outside of the safe integer range are not supported`)}a(cA,"readUint64");function X6(j,A,e,t){return new _(d.uint,oA(j,A+1,t),2)}a(X6,"decodeUint8");function L6(j,A,e,t){return new _(d.uint,nA(j,A+1,t),3)}a(L6,"decodeUint16");function V6(j,A,e,t){return new _(d.uint,sA(j,A+1,t),5)}a(V6,"decodeUint32");function z6(j,A,e,t){return new _(d.uint,cA(j,A+1,t),9)}a(z6,"decodeUint64");function iA(j,A){return N(j,0,A.value)}a(iA,"encodeUint");function N(j,A,e){if(e<U[0]){let t=Number(e);j.push([A|t])}else if(e<U[1]){let t=Number(e);j.push([A|24,t])}else if(e<U[2]){let t=Number(e);j.push([A|25,t>>>8,t&255])}else if(e<U[3]){let t=Number(e);j.push([A|26,t>>>24&255,t>>>16&255,t>>>8&255,t&255])}else{let t=BigInt(e);if(t<U[4]){let r=[A|27,0,0,0,0,0,0,0],o=Number(t&BigInt(4294967295)),n=Number(t>>BigInt(32)&BigInt(4294967295));r[8]=o&255,o=o>>8,r[7]=o&255,o=o>>8,r[6]=o&255,o=o>>8,r[5]=o&255,r[4]=n&255,n=n>>8,r[3]=n&255,n=n>>8,r[2]=n&255,n=n>>8,r[1]=n&255,j.push(r)}else throw new Error(`${v} encountered BigInt larger than allowable range`)}}a(N,"encodeUintValue");iA.encodedSize=a(function(A){return N.encodedSize(A.value)},"encodedSize");N.encodedSize=a(function(A){return A<U[0]?1:A<U[1]?2:A<U[2]?3:A<U[3]?5:9},"encodedSize");iA.compareTokens=a(function(A,e){return A.value<e.value?-1:A.value>e.value?1:0},"compareTokens");function U6(j,A,e,t){return new _(d.negint,-1-oA(j,A+1,t),2)}a(U6,"decodeNegint8");function Q6(j,A,e,t){return new _(d.negint,-1-nA(j,A+1,t),3)}a(Q6,"decodeNegint16");function N6(j,A,e,t){return new _(d.negint,-1-sA(j,A+1,t),5)}a(N6,"decodeNegint32");var Ne=BigInt(-1),W6=BigInt(1);function J6(j,A,e,t){let r=cA(j,A+1,t);if(typeof r!="bigint"){let o=-1-r;if(o>=Number.MIN_SAFE_INTEGER)return new _(d.negint,o,9)}if(t.allowBigInt!==!0)throw new Error(`${v} integers outside of the safe integer range are not supported`);return new _(d.negint,Ne-BigInt(r),9)}a(J6,"decodeNegint64");function ee(j,A){let e=A.value,t=typeof e=="bigint"?e*Ne-W6:e*-1-1;N(j,A.type.majorEncoded,t)}a(ee,"encodeNegint");ee.encodedSize=a(function(A){let e=A.value,t=typeof e=="bigint"?e*Ne-W6:e*-1-1;return t<U[0]?1:t<U[1]?2:t<U[2]?3:t<U[3]?5:9},"encodedSize");ee.compareTokens=a(function(A,e){return A.value<e.value?1:A.value>e.value?-1:0},"compareTokens");function wj(j,A,e,t){KA(j,A,e+t);let r=lj(j,A+e,A+e+t);return new _(d.bytes,r,e+t)}a(wj,"toToken");function Z6(j,A,e,t){return wj(j,A,1,e)}a(Z6,"decodeBytesCompact");function Y6(j,A,e,t){return wj(j,A,2,oA(j,A+1,t))}a(Y6,"decodeBytes8");function At(j,A,e,t){return wj(j,A,3,nA(j,A+1,t))}a(At,"decodeBytes16");function jt(j,A,e,t){return wj(j,A,5,sA(j,A+1,t))}a(jt,"decodeBytes32");function et(j,A,e,t){let r=cA(j,A+1,t);if(typeof r=="bigint")throw new Error(`${v} 64-bit integer bytes lengths not supported`);return wj(j,A,9,r)}a(et,"decodeBytes64");function te(j){return j.encodedBytes===void 0&&(j.encodedBytes=j.type===d.string?S6(j.value):j.value),j.encodedBytes}a(te,"tokenBytes");function ij(j,A){let e=te(A);N(j,A.type.majorEncoded,e.length),j.push(e)}a(ij,"encodeBytes");ij.encodedSize=a(function(A){let e=te(A);return N.encodedSize(e.length)+e.length},"encodedSize");ij.compareTokens=a(function(A,e){return R7(te(A),te(e))},"compareTokens");function R7(j,A){return j.length<A.length?-1:j.length>A.length?1:R6(j,A)}a(R7,"compareBytes");function yj(j,A,e,t,r){let o=e+t;KA(j,A,o);let n=new _(d.string,P6(j,A+e,A+o),o);return r.retainStringBytes===!0&&(n.byteValue=lj(j,A+e,A+o)),n}a(yj,"toToken");function tt(j,A,e,t){return yj(j,A,1,e,t)}a(tt,"decodeStringCompact");function rt(j,A,e,t){return yj(j,A,2,oA(j,A+1,t),t)}a(rt,"decodeString8");function at(j,A,e,t){return yj(j,A,3,nA(j,A+1,t),t)}a(at,"decodeString16");function ot(j,A,e,t){return yj(j,A,5,sA(j,A+1,t),t)}a(ot,"decodeString32");function nt(j,A,e,t){let r=cA(j,A+1,t);if(typeof r=="bigint")throw new Error(`${v} 64-bit integer string lengths not supported`);return yj(j,A,9,r,t)}a(nt,"decodeString64");var st=ij;function Bj(j,A,e,t){return new _(d.array,t,e)}a(Bj,"toToken");function ct(j,A,e,t){return Bj(j,A,1,e)}a(ct,"decodeArrayCompact");function lt(j,A,e,t){return Bj(j,A,2,oA(j,A+1,t))}a(lt,"decodeArray8");function it(j,A,e,t){return Bj(j,A,3,nA(j,A+1,t))}a(it,"decodeArray16");function Bt(j,A,e,t){return Bj(j,A,5,sA(j,A+1,t))}a(Bt,"decodeArray32");function Et(j,A,e,t){let r=cA(j,A+1,t);if(typeof r=="bigint")throw new Error(`${v} 64-bit integer array lengths not supported`);return Bj(j,A,9,r)}a(Et,"decodeArray64");function dt(j,A,e,t){if(t.allowIndefinite===!1)throw new Error(`${v} indefinite length items not allowed`);return Bj(j,A,1,1/0)}a(dt,"decodeArrayIndefinite");function re(j,A){N(j,d.array.majorEncoded,A.value)}a(re,"encodeArray");re.compareTokens=iA.compareTokens;re.encodedSize=a(function(A){return N.encodedSize(A.value)},"encodedSize");function Ej(j,A,e,t){return new _(d.map,t,e)}a(Ej,"toToken");function ft(j,A,e,t){return Ej(j,A,1,e)}a(ft,"decodeMapCompact");function ht(j,A,e,t){return Ej(j,A,2,oA(j,A+1,t))}a(ht,"decodeMap8");function ut(j,A,e,t){return Ej(j,A,3,nA(j,A+1,t))}a(ut,"decodeMap16");function xt(j,A,e,t){return Ej(j,A,5,sA(j,A+1,t))}a(xt,"decodeMap32");function mt(j,A,e,t){let r=cA(j,A+1,t);if(typeof r=="bigint")throw new Error(`${v} 64-bit integer m