@smartledger/bsv 7.6.0 → 7.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +53 -0
- package/README.md +38 -38
- package/bsv-gdaf.min.js +8 -8
- package/bsv-ltp.min.js +8 -8
- package/bsv-smartcontract.min.js +2 -2
- package/bsv.bundle.js +16 -16
- package/bsv.min.js +8 -8
- package/docs/MODULE_REFERENCE_COMPLETE.md +27 -27
- package/docs/advanced/UTXO_MANAGER_GUIDE.md +1 -1
- package/docs/getting-started/INSTALLATION.md +23 -23
- package/docs/getting-started/QUICK_START.md +7 -7
- package/docs/migration/FROM_BSV_1_5_6.md +5 -5
- package/lib/script/interpreter.js +5 -1
- package/lib/smart_contract/pushtx.js +22 -2
- package/lib/transaction/transaction.js +1 -1
- package/package.json +1 -1
- package/test/regressions.js +180 -0
- package/version.js +1 -1
package/bsv-ltp.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var bsvLTP=(()=>{var Kq=Object.create;var nh=Object.defineProperty;var Vq=Object.getOwnPropertyDescriptor;var Gq=Object.getOwnPropertyNames;var Zq=Object.getPrototypeOf,Wq=Object.prototype.hasOwnProperty;var Yq=(e,t,r)=>t in e?nh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Fr=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Xr=(e,t,r)=>()=>{if(r)throw r[0];try{return e&&(t=e(e=0)),t}catch(i){throw r=[i],i}};var k=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},X1=(e,t)=>{for(var r in t)nh(e,r,{get:t[r],enumerable:!0})},W7=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Gq(t))!Wq.call(e,n)&&n!==r&&nh(e,n,{get:()=>t[n],enumerable:!(i=Vq(t,n))||i.enumerable});return e};var Y7=(e,t,r)=>(r=e!=null?Kq(Zq(e)):{},W7(t||!e||!e.__esModule?nh(r,"default",{value:e,enumerable:!0}):r,e)),ho=e=>W7(nh({},"__esModule",{value:!0}),e);var Z=(e,t,r)=>Yq(e,typeof t!="symbol"?t+"":t,r);var e3=k((Vse,Q7)=>{v();var pr=Q7.exports={},po,go;function D5(){throw new Error("setTimeout has not been defined")}function L5(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?po=setTimeout:po=D5}catch{po=D5}try{typeof clearTimeout=="function"?go=clearTimeout:go=L5}catch{go=L5}})();function $7(e){if(po===setTimeout)return setTimeout(e,0);if((po===D5||!po)&&setTimeout)return po=setTimeout,setTimeout(e,0);try{return po(e,0)}catch{try{return po.call(null,e,0)}catch{return po.call(this,e,0)}}}function $q(e){if(go===clearTimeout)return clearTimeout(e);if((go===L5||!go)&&clearTimeout)return go=clearTimeout,clearTimeout(e);try{return go(e)}catch{try{return go.call(null,e)}catch{return go.call(this,e)}}}var sa=[],Zf=!1,gu,J1=-1;function Xq(){!Zf||!gu||(Zf=!1,gu.length?sa=gu.concat(sa):J1=-1,sa.length&&X7())}function X7(){if(!Zf){var e=$7(Xq);Zf=!0;for(var t=sa.length;t;){for(gu=sa,sa=[];++J1<t;)gu&&gu[J1].run();J1=-1,t=sa.length}gu=null,Zf=!1,$q(e)}}pr.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];sa.push(new J7(e,t)),sa.length===1&&!Zf&&$7(X7)};function J7(e,t){this.fun=e,this.array=t}J7.prototype.run=function(){this.fun.apply(null,this.array)};pr.title="browser";pr.browser=!0;pr.env={};pr.argv=[];pr.version="";pr.versions={};function ua(){}pr.on=ua;pr.addListener=ua;pr.once=ua;pr.off=ua;pr.removeListener=ua;pr.removeAllListeners=ua;pr.emit=ua;pr.prependListener=ua;pr.prependOnceListener=ua;pr.listeners=function(e){return[]};pr.binding=function(e){throw new Error("process.binding is not supported")};pr.cwd=function(){return"/"};pr.chdir=function(e){throw new Error("process.chdir is not supported")};pr.umask=function(){return 0}});var i3=k(Q1=>{"use strict";v();Q1.byteLength=Qq;Q1.toByteArray=tU;Q1.fromByteArray=nU;var vo=[],en=[],Jq=typeof Uint8Array<"u"?Uint8Array:Array,q5="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(vu=0,t3=q5.length;vu<t3;++vu)vo[vu]=q5[vu],en[q5.charCodeAt(vu)]=vu;var vu,t3;en[45]=62;en[95]=63;function r3(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var i=r===t?0:4-r%4;return[r,i]}function Qq(e){var t=r3(e),r=t[0],i=t[1];return(r+i)*3/4-i}function eU(e,t,r){return(t+r)*3/4-r}function tU(e){var t,r=r3(e),i=r[0],n=r[1],o=new Jq(eU(e,i,n)),a=0,s=n>0?i-4:i,u;for(u=0;u<s;u+=4)t=en[e.charCodeAt(u)]<<18|en[e.charCodeAt(u+1)]<<12|en[e.charCodeAt(u+2)]<<6|en[e.charCodeAt(u+3)],o[a++]=t>>16&255,o[a++]=t>>8&255,o[a++]=t&255;return n===2&&(t=en[e.charCodeAt(u)]<<2|en[e.charCodeAt(u+1)]>>4,o[a++]=t&255),n===1&&(t=en[e.charCodeAt(u)]<<10|en[e.charCodeAt(u+1)]<<4|en[e.charCodeAt(u+2)]>>2,o[a++]=t>>8&255,o[a++]=t&255),o}function rU(e){return vo[e>>18&63]+vo[e>>12&63]+vo[e>>6&63]+vo[e&63]}function iU(e,t,r){for(var i,n=[],o=t;o<r;o+=3)i=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(e[o+2]&255),n.push(rU(i));return n.join("")}function nU(e){for(var t,r=e.length,i=r%3,n=[],o=16383,a=0,s=r-i;a<s;a+=o)n.push(iU(e,a,a+o>s?s:a+o));return i===1?(t=e[r-1],n.push(vo[t>>2]+vo[t<<4&63]+"==")):i===2&&(t=(e[r-2]<<8)+e[r-1],n.push(vo[t>>10]+vo[t>>4&63]+vo[t<<2&63]+"=")),n.join("")}});var n3=k(U5=>{v();U5.read=function(e,t,r,i,n){var o,a,s=n*8-i-1,u=(1<<s)-1,c=u>>1,l=-7,m=r?n-1:0,w=r?-1:1,E=e[t+m];for(m+=w,o=E&(1<<-l)-1,E>>=-l,l+=s;l>0;o=o*256+e[t+m],m+=w,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=i;l>0;a=a*256+e[t+m],m+=w,l-=8);if(o===0)o=1-c;else{if(o===u)return a?NaN:(E?-1:1)*(1/0);a=a+Math.pow(2,i),o=o-c}return(E?-1:1)*a*Math.pow(2,o-i)};U5.write=function(e,t,r,i,n,o){var a,s,u,c=o*8-n-1,l=(1<<c)-1,m=l>>1,w=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=i?0:o-1,P=i?1:-1,M=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),a+m>=1?t+=w/u:t+=w*Math.pow(2,1-m),t*u>=2&&(a++,u/=2),a+m>=l?(s=0,a=l):a+m>=1?(s=(t*u-1)*Math.pow(2,n),a=a+m):(s=t*Math.pow(2,m-1)*Math.pow(2,n),a=0));n>=8;e[r+E]=s&255,E+=P,s/=256,n-=8);for(a=a<<n|s,c+=n;c>0;e[r+E]=a&255,E+=P,a/=256,c-=8);e[r+E-P]|=M*128}});var Kt=k(Xf=>{"use strict";v();var F5=i3(),Yf=n3(),o3=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Xf.Buffer=te;Xf.SlowBuffer=cU;Xf.INSPECT_MAX_BYTES=50;var ed=2147483647;Xf.kMaxLength=ed;te.TYPED_ARRAY_SUPPORT=oU();!te.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function oU(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(te.prototype,"parent",{enumerable:!0,get:function(){if(te.isBuffer(this))return this.buffer}});Object.defineProperty(te.prototype,"offset",{enumerable:!0,get:function(){if(te.isBuffer(this))return this.byteOffset}});function fa(e){if(e>ed)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,te.prototype),t}function te(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return K5(e)}return f3(e,t,r)}te.poolSize=8192;function f3(e,t,r){if(typeof e=="string")return sU(e,t);if(ArrayBuffer.isView(e))return uU(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(mo(e,ArrayBuffer)||e&&mo(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(mo(e,SharedArrayBuffer)||e&&mo(e.buffer,SharedArrayBuffer)))return j5(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let i=e.valueOf&&e.valueOf();if(i!=null&&i!==e)return te.from(i,t,r);let n=fU(e);if(n)return n;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return te.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}te.from=function(e,t,r){return f3(e,t,r)};Object.setPrototypeOf(te.prototype,Uint8Array.prototype);Object.setPrototypeOf(te,Uint8Array);function c3(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function aU(e,t,r){return c3(e),e<=0?fa(e):t!==void 0?typeof r=="string"?fa(e).fill(t,r):fa(e).fill(t):fa(e)}te.alloc=function(e,t,r){return aU(e,t,r)};function K5(e){return c3(e),fa(e<0?0:V5(e)|0)}te.allocUnsafe=function(e){return K5(e)};te.allocUnsafeSlow=function(e){return K5(e)};function sU(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!te.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=l3(e,t)|0,i=fa(r),n=i.write(e,t);return n!==r&&(i=i.slice(0,n)),i}function H5(e){let t=e.length<0?0:V5(e.length)|0,r=fa(t);for(let i=0;i<t;i+=1)r[i]=e[i]&255;return r}function uU(e){if(mo(e,Uint8Array)){let t=new Uint8Array(e);return j5(t.buffer,t.byteOffset,t.byteLength)}return H5(e)}function j5(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let i;return t===void 0&&r===void 0?i=new Uint8Array(e):r===void 0?i=new Uint8Array(e,t):i=new Uint8Array(e,t,r),Object.setPrototypeOf(i,te.prototype),i}function fU(e){if(te.isBuffer(e)){let t=V5(e.length)|0,r=fa(t);return r.length===0||e.copy(r,0,0,t),r}if(e.length!==void 0)return typeof e.length!="number"||Z5(e.length)?fa(0):H5(e);if(e.type==="Buffer"&&Array.isArray(e.data))return H5(e.data)}function V5(e){if(e>=ed)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ed.toString(16)+" bytes");return e|0}function cU(e){return+e!=e&&(e=0),te.alloc(+e)}te.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==te.prototype};te.compare=function(t,r){if(mo(t,Uint8Array)&&(t=te.from(t,t.offset,t.byteLength)),mo(r,Uint8Array)&&(r=te.from(r,r.offset,r.byteLength)),!te.isBuffer(t)||!te.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;let i=t.length,n=r.length;for(let o=0,a=Math.min(i,n);o<a;++o)if(t[o]!==r[o]){i=t[o],n=r[o];break}return i<n?-1:n<i?1:0};te.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};te.concat=function(t,r){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return te.alloc(0);let i;if(r===void 0)for(r=0,i=0;i<t.length;++i)r+=t[i].length;let n=te.allocUnsafe(r),o=0;for(i=0;i<t.length;++i){let a=t[i];if(mo(a,Uint8Array))o+a.length>n.length?(te.isBuffer(a)||(a=te.from(a)),a.copy(n,o)):Uint8Array.prototype.set.call(n,a,o);else if(te.isBuffer(a))a.copy(n,o);else throw new TypeError('"list" argument must be an Array of Buffers');o+=a.length}return n};function l3(e,t){if(te.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||mo(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,i=arguments.length>2&&arguments[2]===!0;if(!i&&r===0)return 0;let n=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return z5(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return _3(e).length;default:if(n)return i?-1:z5(e).length;t=(""+t).toLowerCase(),n=!0}}te.byteLength=l3;function lU(e,t,r){let i=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return wU(this,t,r);case"utf8":case"utf-8":return d3(this,t,r);case"ascii":return bU(this,t,r);case"latin1":case"binary":return _U(this,t,r);case"base64":return mU(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return SU(this,t,r);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}te.prototype._isBuffer=!0;function mu(e,t,r){let i=e[t];e[t]=e[r],e[r]=i}te.prototype.swap16=function(){let t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;r<t;r+=2)mu(this,r,r+1);return this};te.prototype.swap32=function(){let t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let r=0;r<t;r+=4)mu(this,r,r+3),mu(this,r+1,r+2);return this};te.prototype.swap64=function(){let t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let r=0;r<t;r+=8)mu(this,r,r+7),mu(this,r+1,r+6),mu(this,r+2,r+5),mu(this,r+3,r+4);return this};te.prototype.toString=function(){let t=this.length;return t===0?"":arguments.length===0?d3(this,0,t):lU.apply(this,arguments)};te.prototype.toLocaleString=te.prototype.toString;te.prototype.equals=function(t){if(!te.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:te.compare(this,t)===0};te.prototype.inspect=function(){let t="",r=Xf.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"};o3&&(te.prototype[o3]=te.prototype.inspect);te.prototype.compare=function(t,r,i,n,o){if(mo(t,Uint8Array)&&(t=te.from(t,t.offset,t.byteLength)),!te.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(r===void 0&&(r=0),i===void 0&&(i=t?t.length:0),n===void 0&&(n=0),o===void 0&&(o=this.length),r<0||i>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&r>=i)return 0;if(n>=o)return-1;if(r>=i)return 1;if(r>>>=0,i>>>=0,n>>>=0,o>>>=0,this===t)return 0;let a=o-n,s=i-r,u=Math.min(a,s),c=this.slice(n,o),l=t.slice(r,i);for(let m=0;m<u;++m)if(c[m]!==l[m]){a=c[m],s=l[m];break}return a<s?-1:s<a?1:0};function h3(e,t,r,i,n){if(e.length===0)return-1;if(typeof r=="string"?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,Z5(r)&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return-1;r=e.length-1}else if(r<0)if(n)r=0;else return-1;if(typeof t=="string"&&(t=te.from(t,i)),te.isBuffer(t))return t.length===0?-1:a3(e,t,r,i,n);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?n?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):a3(e,[t],r,i,n);throw new TypeError("val must be string, number or Buffer")}function a3(e,t,r,i,n){let o=1,a=e.length,s=t.length;if(i!==void 0&&(i=String(i).toLowerCase(),i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,a/=2,s/=2,r/=2}function u(l,m){return o===1?l[m]:l.readUInt16BE(m*o)}let c;if(n){let l=-1;for(c=r;c<a;c++)if(u(e,c)===u(t,l===-1?0:c-l)){if(l===-1&&(l=c),c-l+1===s)return l*o}else l!==-1&&(c-=c-l),l=-1}else for(r+s>a&&(r=a-s),c=r;c>=0;c--){let l=!0;for(let m=0;m<s;m++)if(u(e,c+m)!==u(t,m)){l=!1;break}if(l)return c}return-1}te.prototype.includes=function(t,r,i){return this.indexOf(t,r,i)!==-1};te.prototype.indexOf=function(t,r,i){return h3(this,t,r,i,!0)};te.prototype.lastIndexOf=function(t,r,i){return h3(this,t,r,i,!1)};function hU(e,t,r,i){r=Number(r)||0;let n=e.length-r;i?(i=Number(i),i>n&&(i=n)):i=n;let o=t.length;i>o/2&&(i=o/2);let a;for(a=0;a<i;++a){let s=parseInt(t.substr(a*2,2),16);if(Z5(s))return a;e[r+a]=s}return a}function dU(e,t,r,i){return td(z5(t,e.length-r),e,r,i)}function pU(e,t,r,i){return td(OU(t),e,r,i)}function gU(e,t,r,i){return td(_3(t),e,r,i)}function vU(e,t,r,i){return td(AU(t,e.length-r),e,r,i)}te.prototype.write=function(t,r,i,n){if(r===void 0)n="utf8",i=this.length,r=0;else if(i===void 0&&typeof r=="string")n=r,i=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(i)?(i=i>>>0,n===void 0&&(n="utf8")):(n=i,i=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let o=this.length-r;if((i===void 0||i>o)&&(i=o),t.length>0&&(i<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let a=!1;for(;;)switch(n){case"hex":return hU(this,t,r,i);case"utf8":case"utf-8":return dU(this,t,r,i);case"ascii":case"latin1":case"binary":return pU(this,t,r,i);case"base64":return gU(this,t,r,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return vU(this,t,r,i);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}};te.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function mU(e,t,r){return t===0&&r===e.length?F5.fromByteArray(e):F5.fromByteArray(e.slice(t,r))}function d3(e,t,r){r=Math.min(e.length,r);let i=[],n=t;for(;n<r;){let o=e[n],a=null,s=o>239?4:o>223?3:o>191?2:1;if(n+s<=r){let u,c,l,m;switch(s){case 1:o<128&&(a=o);break;case 2:u=e[n+1],(u&192)===128&&(m=(o&31)<<6|u&63,m>127&&(a=m));break;case 3:u=e[n+1],c=e[n+2],(u&192)===128&&(c&192)===128&&(m=(o&15)<<12|(u&63)<<6|c&63,m>2047&&(m<55296||m>57343)&&(a=m));break;case 4:u=e[n+1],c=e[n+2],l=e[n+3],(u&192)===128&&(c&192)===128&&(l&192)===128&&(m=(o&15)<<18|(u&63)<<12|(c&63)<<6|l&63,m>65535&&m<1114112&&(a=m))}}a===null?(a=65533,s=1):a>65535&&(a-=65536,i.push(a>>>10&1023|55296),a=56320|a&1023),i.push(a),n+=s}return yU(i)}var s3=4096;function yU(e){let t=e.length;if(t<=s3)return String.fromCharCode.apply(String,e);let r="",i=0;for(;i<t;)r+=String.fromCharCode.apply(String,e.slice(i,i+=s3));return r}function bU(e,t,r){let i="";r=Math.min(e.length,r);for(let n=t;n<r;++n)i+=String.fromCharCode(e[n]&127);return i}function _U(e,t,r){let i="";r=Math.min(e.length,r);for(let n=t;n<r;++n)i+=String.fromCharCode(e[n]);return i}function wU(e,t,r){let i=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>i)&&(r=i);let n="";for(let o=t;o<r;++o)n+=PU[e[o]];return n}function SU(e,t,r){let i=e.slice(t,r),n="";for(let o=0;o<i.length-1;o+=2)n+=String.fromCharCode(i[o]+i[o+1]*256);return n}te.prototype.slice=function(t,r){let i=this.length;t=~~t,r=r===void 0?i:~~r,t<0?(t+=i,t<0&&(t=0)):t>i&&(t=i),r<0?(r+=i,r<0&&(r=0)):r>i&&(r=i),r<t&&(r=t);let n=this.subarray(t,r);return Object.setPrototypeOf(n,te.prototype),n};function Hr(e,t,r){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}te.prototype.readUintLE=te.prototype.readUIntLE=function(t,r,i){t=t>>>0,r=r>>>0,i||Hr(t,r,this.length);let n=this[t],o=1,a=0;for(;++a<r&&(o*=256);)n+=this[t+a]*o;return n};te.prototype.readUintBE=te.prototype.readUIntBE=function(t,r,i){t=t>>>0,r=r>>>0,i||Hr(t,r,this.length);let n=this[t+--r],o=1;for(;r>0&&(o*=256);)n+=this[t+--r]*o;return n};te.prototype.readUint8=te.prototype.readUInt8=function(t,r){return t=t>>>0,r||Hr(t,1,this.length),this[t]};te.prototype.readUint16LE=te.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||Hr(t,2,this.length),this[t]|this[t+1]<<8};te.prototype.readUint16BE=te.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||Hr(t,2,this.length),this[t]<<8|this[t+1]};te.prototype.readUint32LE=te.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||Hr(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};te.prototype.readUint32BE=te.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||Hr(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};te.prototype.readBigUInt64LE=es(function(t){t=t>>>0,$f(t,"offset");let r=this[t],i=this[t+7];(r===void 0||i===void 0)&&oh(t,this.length-8);let n=r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,o=this[++t]+this[++t]*2**8+this[++t]*2**16+i*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))});te.prototype.readBigUInt64BE=es(function(t){t=t>>>0,$f(t,"offset");let r=this[t],i=this[t+7];(r===void 0||i===void 0)&&oh(t,this.length-8);let n=r*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],o=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+i;return(BigInt(n)<<BigInt(32))+BigInt(o)});te.prototype.readIntLE=function(t,r,i){t=t>>>0,r=r>>>0,i||Hr(t,r,this.length);let n=this[t],o=1,a=0;for(;++a<r&&(o*=256);)n+=this[t+a]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*r)),n};te.prototype.readIntBE=function(t,r,i){t=t>>>0,r=r>>>0,i||Hr(t,r,this.length);let n=r,o=1,a=this[t+--n];for(;n>0&&(o*=256);)a+=this[t+--n]*o;return o*=128,a>=o&&(a-=Math.pow(2,8*r)),a};te.prototype.readInt8=function(t,r){return t=t>>>0,r||Hr(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};te.prototype.readInt16LE=function(t,r){t=t>>>0,r||Hr(t,2,this.length);let i=this[t]|this[t+1]<<8;return i&32768?i|4294901760:i};te.prototype.readInt16BE=function(t,r){t=t>>>0,r||Hr(t,2,this.length);let i=this[t+1]|this[t]<<8;return i&32768?i|4294901760:i};te.prototype.readInt32LE=function(t,r){return t=t>>>0,r||Hr(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};te.prototype.readInt32BE=function(t,r){return t=t>>>0,r||Hr(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};te.prototype.readBigInt64LE=es(function(t){t=t>>>0,$f(t,"offset");let r=this[t],i=this[t+7];(r===void 0||i===void 0)&&oh(t,this.length-8);let n=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(i<<24);return(BigInt(n)<<BigInt(32))+BigInt(r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24)});te.prototype.readBigInt64BE=es(function(t){t=t>>>0,$f(t,"offset");let r=this[t],i=this[t+7];(r===void 0||i===void 0)&&oh(t,this.length-8);let n=(r<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(n)<<BigInt(32))+BigInt(this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+i)});te.prototype.readFloatLE=function(t,r){return t=t>>>0,r||Hr(t,4,this.length),Yf.read(this,t,!0,23,4)};te.prototype.readFloatBE=function(t,r){return t=t>>>0,r||Hr(t,4,this.length),Yf.read(this,t,!1,23,4)};te.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||Hr(t,8,this.length),Yf.read(this,t,!0,52,8)};te.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||Hr(t,8,this.length),Yf.read(this,t,!1,52,8)};function Ai(e,t,r,i,n,o){if(!te.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<o)throw new RangeError('"value" argument is out of bounds');if(r+i>e.length)throw new RangeError("Index out of range")}te.prototype.writeUintLE=te.prototype.writeUIntLE=function(t,r,i,n){if(t=+t,r=r>>>0,i=i>>>0,!n){let s=Math.pow(2,8*i)-1;Ai(this,t,r,i,s,0)}let o=1,a=0;for(this[r]=t&255;++a<i&&(o*=256);)this[r+a]=t/o&255;return r+i};te.prototype.writeUintBE=te.prototype.writeUIntBE=function(t,r,i,n){if(t=+t,r=r>>>0,i=i>>>0,!n){let s=Math.pow(2,8*i)-1;Ai(this,t,r,i,s,0)}let o=i-1,a=1;for(this[r+o]=t&255;--o>=0&&(a*=256);)this[r+o]=t/a&255;return r+i};te.prototype.writeUint8=te.prototype.writeUInt8=function(t,r,i){return t=+t,r=r>>>0,i||Ai(this,t,r,1,255,0),this[r]=t&255,r+1};te.prototype.writeUint16LE=te.prototype.writeUInt16LE=function(t,r,i){return t=+t,r=r>>>0,i||Ai(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};te.prototype.writeUint16BE=te.prototype.writeUInt16BE=function(t,r,i){return t=+t,r=r>>>0,i||Ai(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};te.prototype.writeUint32LE=te.prototype.writeUInt32LE=function(t,r,i){return t=+t,r=r>>>0,i||Ai(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255,r+4};te.prototype.writeUint32BE=te.prototype.writeUInt32BE=function(t,r,i){return t=+t,r=r>>>0,i||Ai(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};function p3(e,t,r,i,n){b3(t,i,n,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a=a>>8,e[r++]=a,a=a>>8,e[r++]=a,a=a>>8,e[r++]=a,r}function g3(e,t,r,i,n){b3(t,i,n,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o=o>>8,e[r+6]=o,o=o>>8,e[r+5]=o,o=o>>8,e[r+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a=a>>8,e[r+2]=a,a=a>>8,e[r+1]=a,a=a>>8,e[r]=a,r+8}te.prototype.writeBigUInt64LE=es(function(t,r=0){return p3(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});te.prototype.writeBigUInt64BE=es(function(t,r=0){return g3(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});te.prototype.writeIntLE=function(t,r,i,n){if(t=+t,r=r>>>0,!n){let u=Math.pow(2,8*i-1);Ai(this,t,r,i,u-1,-u)}let o=0,a=1,s=0;for(this[r]=t&255;++o<i&&(a*=256);)t<0&&s===0&&this[r+o-1]!==0&&(s=1),this[r+o]=(t/a>>0)-s&255;return r+i};te.prototype.writeIntBE=function(t,r,i,n){if(t=+t,r=r>>>0,!n){let u=Math.pow(2,8*i-1);Ai(this,t,r,i,u-1,-u)}let o=i-1,a=1,s=0;for(this[r+o]=t&255;--o>=0&&(a*=256);)t<0&&s===0&&this[r+o+1]!==0&&(s=1),this[r+o]=(t/a>>0)-s&255;return r+i};te.prototype.writeInt8=function(t,r,i){return t=+t,r=r>>>0,i||Ai(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};te.prototype.writeInt16LE=function(t,r,i){return t=+t,r=r>>>0,i||Ai(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};te.prototype.writeInt16BE=function(t,r,i){return t=+t,r=r>>>0,i||Ai(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};te.prototype.writeInt32LE=function(t,r,i){return t=+t,r=r>>>0,i||Ai(this,t,r,4,2147483647,-2147483648),this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4};te.prototype.writeInt32BE=function(t,r,i){return t=+t,r=r>>>0,i||Ai(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};te.prototype.writeBigInt64LE=es(function(t,r=0){return p3(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});te.prototype.writeBigInt64BE=es(function(t,r=0){return g3(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function v3(e,t,r,i,n,o){if(r+i>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function m3(e,t,r,i,n){return t=+t,r=r>>>0,n||v3(e,t,r,4,34028234663852886e22,-34028234663852886e22),Yf.write(e,t,r,i,23,4),r+4}te.prototype.writeFloatLE=function(t,r,i){return m3(this,t,r,!0,i)};te.prototype.writeFloatBE=function(t,r,i){return m3(this,t,r,!1,i)};function y3(e,t,r,i,n){return t=+t,r=r>>>0,n||v3(e,t,r,8,17976931348623157e292,-17976931348623157e292),Yf.write(e,t,r,i,52,8),r+8}te.prototype.writeDoubleLE=function(t,r,i){return y3(this,t,r,!0,i)};te.prototype.writeDoubleBE=function(t,r,i){return y3(this,t,r,!1,i)};te.prototype.copy=function(t,r,i,n){if(!te.isBuffer(t))throw new TypeError("argument should be a Buffer");if(i||(i=0),!n&&n!==0&&(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n<i&&(n=i),n===i||t.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r<n-i&&(n=t.length-r+i);let o=n-i;return this===t&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(r,i,n):Uint8Array.prototype.set.call(t,this.subarray(i,n),r),o};te.prototype.fill=function(t,r,i,n){if(typeof t=="string"){if(typeof r=="string"?(n=r,r=0,i=this.length):typeof i=="string"&&(n=i,i=this.length),n!==void 0&&typeof n!="string")throw new TypeError("encoding must be a string");if(typeof n=="string"&&!te.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(t.length===1){let a=t.charCodeAt(0);(n==="utf8"&&a<128||n==="latin1")&&(t=a)}}else typeof t=="number"?t=t&255:typeof t=="boolean"&&(t=Number(t));if(r<0||this.length<r||this.length<i)throw new RangeError("Out of range index");if(i<=r)return this;r=r>>>0,i=i===void 0?this.length:i>>>0,t||(t=0);let o;if(typeof t=="number")for(o=r;o<i;++o)this[o]=t;else{let a=te.isBuffer(t)?t:te.from(t,n),s=a.length;if(s===0)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<i-r;++o)this[o+r]=a[o%s]}return this};var Wf={};function G5(e,t,r){Wf[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(n){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:n,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}G5("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);G5("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError);G5("ERR_OUT_OF_RANGE",function(e,t,r){let i=`The value of "${e}" is out of range.`,n=r;return Number.isInteger(r)&&Math.abs(r)>2**32?n=u3(String(r)):typeof r=="bigint"&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=u3(n)),n+="n"),i+=` It must be ${t}. Received ${n}`,i},RangeError);function u3(e){let t="",r=e.length,i=e[0]==="-"?1:0;for(;r>=i+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function xU(e,t,r){$f(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&oh(t,e.length-(r+1))}function b3(e,t,r,i,n,o){if(e>r||e<t){let a=typeof t=="bigint"?"n":"",s;throw o>3?t===0||t===BigInt(0)?s=`>= 0${a} and < 2${a} ** ${(o+1)*8}${a}`:s=`>= -(2${a} ** ${(o+1)*8-1}${a}) and < 2 ** ${(o+1)*8-1}${a}`:s=`>= ${t}${a} and <= ${r}${a}`,new Wf.ERR_OUT_OF_RANGE("value",s,e)}xU(i,n,o)}function $f(e,t){if(typeof e!="number")throw new Wf.ERR_INVALID_ARG_TYPE(t,"number",e)}function oh(e,t,r){throw Math.floor(e)!==e?($f(e,r),new Wf.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new Wf.ERR_BUFFER_OUT_OF_BOUNDS:new Wf.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var EU=/[^+/0-9A-Za-z-_]/g;function IU(e){if(e=e.split("=")[0],e=e.trim().replace(EU,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function z5(e,t){t=t||1/0;let r,i=e.length,n=null,o=[];for(let a=0;a<i;++a){if(r=e.charCodeAt(a),r>55295&&r<57344){if(!n){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(a+1===i){(t-=3)>-1&&o.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),n=r;continue}r=(n-55296<<10|r-56320)+65536}else n&&(t-=3)>-1&&o.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function OU(e){let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r)&255);return t}function AU(e,t){let r,i,n,o=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),i=r>>8,n=r%256,o.push(n),o.push(i);return o}function _3(e){return F5.toByteArray(IU(e))}function td(e,t,r,i){let n;for(n=0;n<i&&!(n+r>=t.length||n>=e.length);++n)t[n+r]=e[n];return n}function mo(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function Z5(e){return e!==e}var PU=(function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let i=r*16;for(let n=0;n<16;++n)t[i+n]=e[r]+e[n]}return t})();function es(e){return typeof BigInt>"u"?TU:e}function TU(){throw new Error("BigInt not supported")}});var A,h,v=Xr(()=>{A=Y7(e3()),h=Y7(Kt())});var ot=k((W5,S3)=>{v();var rd=Kt(),yo=rd.Buffer;function w3(e,t){for(var r in e)t[r]=e[r]}yo.from&&yo.alloc&&yo.allocUnsafe&&yo.allocUnsafeSlow?S3.exports=rd:(w3(rd,W5),W5.Buffer=yu);function yu(e,t,r){return yo(e,t,r)}yu.prototype=Object.create(yo.prototype);w3(yo,yu);yu.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return yo(e,t,r)};yu.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var i=yo(e);return t!==void 0?typeof r=="string"?i.fill(t,r):i.fill(t):i.fill(0),i};yu.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return yo(e)};yu.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return rd.SlowBuffer(e)}});var bu=k((rue,$5)=>{"use strict";v();var Y5=65536,kU=4294967295;function RU(){throw new Error(`Secure random number generation is not supported by this browser.
|
|
2
|
-
Use Chrome, Firefox or Internet Explorer 11`)}var BU=ot().Buffer,id=globalThis.crypto||globalThis.msCrypto;id&&id.getRandomValues?$5.exports=MU:$5.exports=RU;function MU(e,t){if(e>kU)throw new RangeError("requested too many random bytes");var r=BU.allocUnsafe(e);if(e>0)if(e>Y5)for(var i=0;i<e;i+=Y5)id.getRandomValues(r.slice(i,i+Y5));else id.getRandomValues(r);return typeof t=="function"?A.default.nextTick(function(){t(null,r)}):r}});var Pe=k((nue,X5)=>{v();typeof Object.create=="function"?X5.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:X5.exports=function(t,r){if(r){t.super_=r;var i=function(){};i.prototype=r.prototype,t.prototype=new i,t.prototype.constructor=t}}});var Qf=k((aue,J5)=>{"use strict";v();var Jf=typeof Reflect=="object"?Reflect:null,x3=Jf&&typeof Jf.apply=="function"?Jf.apply:function(t,r,i){return Function.prototype.apply.call(t,r,i)},nd;Jf&&typeof Jf.ownKeys=="function"?nd=Jf.ownKeys:Object.getOwnPropertySymbols?nd=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:nd=function(t){return Object.getOwnPropertyNames(t)};function CU(e){console&&console.warn&&console.warn(e)}var I3=Number.isNaN||function(t){return t!==t};function Dt(){Dt.init.call(this)}J5.exports=Dt;J5.exports.once=qU;Dt.EventEmitter=Dt;Dt.prototype._events=void 0;Dt.prototype._eventsCount=0;Dt.prototype._maxListeners=void 0;var E3=10;function od(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(Dt,"defaultMaxListeners",{enumerable:!0,get:function(){return E3},set:function(e){if(typeof e!="number"||e<0||I3(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");E3=e}});Dt.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};Dt.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||I3(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function O3(e){return e._maxListeners===void 0?Dt.defaultMaxListeners:e._maxListeners}Dt.prototype.getMaxListeners=function(){return O3(this)};Dt.prototype.emit=function(t){for(var r=[],i=1;i<arguments.length;i++)r.push(arguments[i]);var n=t==="error",o=this._events;if(o!==void 0)n=n&&o.error===void 0;else if(!n)return!1;if(n){var a;if(r.length>0&&(a=r[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=o[t];if(u===void 0)return!1;if(typeof u=="function")x3(u,this,r);else for(var c=u.length,l=R3(u,c),i=0;i<c;++i)x3(l[i],this,r);return!0};function A3(e,t,r,i){var n,o,a;if(od(r),o=e._events,o===void 0?(o=e._events=Object.create(null),e._eventsCount=0):(o.newListener!==void 0&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),a=o[t]),a===void 0)a=o[t]=r,++e._eventsCount;else if(typeof a=="function"?a=o[t]=i?[r,a]:[a,r]:i?a.unshift(r):a.push(r),n=O3(e),n>0&&a.length>n&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=a.length,CU(s)}return e}Dt.prototype.addListener=function(t,r){return A3(this,t,r,!1)};Dt.prototype.on=Dt.prototype.addListener;Dt.prototype.prependListener=function(t,r){return A3(this,t,r,!0)};function NU(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function P3(e,t,r){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},n=NU.bind(i);return n.listener=r,i.wrapFn=n,n}Dt.prototype.once=function(t,r){return od(r),this.on(t,P3(this,t,r)),this};Dt.prototype.prependOnceListener=function(t,r){return od(r),this.prependListener(t,P3(this,t,r)),this};Dt.prototype.removeListener=function(t,r){var i,n,o,a,s;if(od(r),n=this._events,n===void 0)return this;if(i=n[t],i===void 0)return this;if(i===r||i.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,i.listener||r));else if(typeof i!="function"){for(o=-1,a=i.length-1;a>=0;a--)if(i[a]===r||i[a].listener===r){s=i[a].listener,o=a;break}if(o<0)return this;o===0?i.shift():DU(i,o),i.length===1&&(n[t]=i[0]),n.removeListener!==void 0&&this.emit("removeListener",t,s||r)}return this};Dt.prototype.off=Dt.prototype.removeListener;Dt.prototype.removeAllListeners=function(t){var r,i,n;if(i=this._events,i===void 0)return this;if(i.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):i[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete i[t]),this;if(arguments.length===0){var o=Object.keys(i),a;for(n=0;n<o.length;++n)a=o[n],a!=="removeListener"&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(r=i[t],typeof r=="function")this.removeListener(t,r);else if(r!==void 0)for(n=r.length-1;n>=0;n--)this.removeListener(t,r[n]);return this};function T3(e,t,r){var i=e._events;if(i===void 0)return[];var n=i[t];return n===void 0?[]:typeof n=="function"?r?[n.listener||n]:[n]:r?LU(n):R3(n,n.length)}Dt.prototype.listeners=function(t){return T3(this,t,!0)};Dt.prototype.rawListeners=function(t){return T3(this,t,!1)};Dt.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):k3.call(e,t)};Dt.prototype.listenerCount=k3;function k3(e){var t=this._events;if(t!==void 0){var r=t[e];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}Dt.prototype.eventNames=function(){return this._eventsCount>0?nd(this._events):[]};function R3(e,t){for(var r=new Array(t),i=0;i<t;++i)r[i]=e[i];return r}function DU(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function LU(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}function qU(e,t){return new Promise(function(r,i){function n(a){e.removeListener(t,o),i(a)}function o(){typeof e.removeListener=="function"&&e.removeListener("error",n),r([].slice.call(arguments))}B3(e,t,o,{once:!0}),t!=="error"&&UU(e,n,{once:!0})})}function UU(e,t,r){typeof e.on=="function"&&B3(e,"error",t,r)}function B3(e,t,r,i){if(typeof e.on=="function")i.once?e.once(t,r):e.on(t,r);else if(typeof e.addEventListener=="function")e.addEventListener(t,function n(o){i.once&&e.removeEventListener(t,n),r(o)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}});var Q5=k((uue,M3)=>{v();M3.exports=Qf().EventEmitter});var ad=k((cue,C3)=>{"use strict";v();C3.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),i=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var n=42;t[r]=n;for(var o in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,r);if(s.value!==n||s.enumerable!==!0)return!1}return!0}});var ah=k((hue,N3)=>{"use strict";v();var FU=ad();N3.exports=function(){return FU()&&!!Symbol.toStringTag}});var sd=k((pue,D3)=>{"use strict";v();D3.exports=Object});var q3=k((vue,L3)=>{"use strict";v();L3.exports=Error});var F3=k((yue,U3)=>{"use strict";v();U3.exports=EvalError});var j3=k((_ue,H3)=>{"use strict";v();H3.exports=RangeError});var K3=k((Sue,z3)=>{"use strict";v();z3.exports=ReferenceError});var eg=k((Eue,V3)=>{"use strict";v();V3.exports=SyntaxError});var _u=k((Oue,G3)=>{"use strict";v();G3.exports=TypeError});var W3=k((Pue,Z3)=>{"use strict";v();Z3.exports=URIError});var $3=k((kue,Y3)=>{"use strict";v();Y3.exports=Math.abs});var J3=k((Bue,X3)=>{"use strict";v();X3.exports=Math.floor});var eb=k((Cue,Q3)=>{"use strict";v();Q3.exports=Math.max});var rb=k((Due,tb)=>{"use strict";v();tb.exports=Math.min});var nb=k((que,ib)=>{"use strict";v();ib.exports=Math.pow});var ab=k((Fue,ob)=>{"use strict";v();ob.exports=Math.round});var ub=k((jue,sb)=>{"use strict";v();sb.exports=Number.isNaN||function(t){return t!==t}});var cb=k((Kue,fb)=>{"use strict";v();var HU=ub();fb.exports=function(t){return HU(t)||t===0?t:t<0?-1:1}});var hb=k((Gue,lb)=>{"use strict";v();lb.exports=Object.getOwnPropertyDescriptor});var wu=k((Wue,db)=>{"use strict";v();var ud=hb();if(ud)try{ud([],"length")}catch{ud=null}db.exports=ud});var sh=k(($ue,pb)=>{"use strict";v();var fd=Object.defineProperty||!1;if(fd)try{fd({},"a",{value:1})}catch{fd=!1}pb.exports=fd});var mb=k((Jue,vb)=>{"use strict";v();var gb=typeof Symbol<"u"&&Symbol,jU=ad();vb.exports=function(){return typeof gb!="function"||typeof Symbol!="function"||typeof gb("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:jU()}});var tg=k((efe,yb)=>{"use strict";v();yb.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var rg=k((rfe,bb)=>{"use strict";v();var zU=sd();bb.exports=zU.getPrototypeOf||null});var Sb=k((nfe,wb)=>{"use strict";v();var KU="Function.prototype.bind called on incompatible ",VU=Object.prototype.toString,GU=Math.max,ZU="[object Function]",_b=function(t,r){for(var i=[],n=0;n<t.length;n+=1)i[n]=t[n];for(var o=0;o<r.length;o+=1)i[o+t.length]=r[o];return i},WU=function(t,r){for(var i=[],n=r||0,o=0;n<t.length;n+=1,o+=1)i[o]=t[n];return i},YU=function(e,t){for(var r="",i=0;i<e.length;i+=1)r+=e[i],i+1<e.length&&(r+=t);return r};wb.exports=function(t){var r=this;if(typeof r!="function"||VU.apply(r)!==ZU)throw new TypeError(KU+r);for(var i=WU(arguments,1),n,o=function(){if(this instanceof n){var l=r.apply(this,_b(i,arguments));return Object(l)===l?l:this}return r.apply(t,_b(i,arguments))},a=GU(0,r.length-i.length),s=[],u=0;u<a;u++)s[u]="$"+u;if(n=Function("binder","return function ("+YU(s,",")+"){ return binder.apply(this,arguments); }")(o),r.prototype){var c=function(){};c.prototype=r.prototype,n.prototype=new c,c.prototype=null}return n}});var ec=k((afe,xb)=>{"use strict";v();var $U=Sb();xb.exports=Function.prototype.bind||$U});var cd=k((ufe,Eb)=>{"use strict";v();Eb.exports=Function.prototype.call});var ld=k((cfe,Ib)=>{"use strict";v();Ib.exports=Function.prototype.apply});var Ab=k((hfe,Ob)=>{"use strict";v();Ob.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var ig=k((pfe,Pb)=>{"use strict";v();var XU=ec(),JU=ld(),QU=cd(),eF=Ab();Pb.exports=eF||XU.call(QU,JU)});var hd=k((vfe,Tb)=>{"use strict";v();var tF=ec(),rF=_u(),iF=cd(),nF=ig();Tb.exports=function(t){if(t.length<1||typeof t[0]!="function")throw new rF("a function is required");return nF(tF,iF,t)}});var Nb=k((yfe,Cb)=>{"use strict";v();var oF=hd(),kb=wu(),Bb;try{Bb=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var ng=!!Bb&&kb&&kb(Object.prototype,"__proto__"),Mb=Object,Rb=Mb.getPrototypeOf;Cb.exports=ng&&typeof ng.get=="function"?oF([ng.get]):typeof Rb=="function"?function(t){return Rb(t==null?t:Mb(t))}:!1});var dd=k((_fe,Ub)=>{"use strict";v();var Db=tg(),Lb=rg(),qb=Nb();Ub.exports=Db?function(t){return Db(t)}:Lb?function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return Lb(t)}:qb?function(t){return qb(t)}:null});var og=k((Sfe,Fb)=>{"use strict";v();var aF=Function.prototype.call,sF=Object.prototype.hasOwnProperty,uF=ec();Fb.exports=uF.call(aF,sF)});var vd=k((Efe,Gb)=>{"use strict";v();var lt,fF=sd(),cF=q3(),lF=F3(),hF=j3(),dF=K3(),nc=eg(),ic=_u(),pF=W3(),gF=$3(),vF=J3(),mF=eb(),yF=rb(),bF=nb(),_F=ab(),wF=cb(),Kb=Function,ag=function(e){try{return Kb('"use strict"; return ('+e+").constructor;")()}catch{}},uh=wu(),SF=sh(),sg=function(){throw new ic},xF=uh?(function(){try{return arguments.callee,sg}catch{try{return uh(arguments,"callee").get}catch{return sg}}})():sg,tc=mb()(),jr=dd(),EF=rg(),IF=tg(),Vb=ld(),fh=cd(),rc={},OF=typeof Uint8Array>"u"||!jr?lt:jr(Uint8Array),Su={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?lt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?lt:ArrayBuffer,"%ArrayIteratorPrototype%":tc&&jr?jr([][Symbol.iterator]()):lt,"%AsyncFromSyncIteratorPrototype%":lt,"%AsyncFunction%":rc,"%AsyncGenerator%":rc,"%AsyncGeneratorFunction%":rc,"%AsyncIteratorPrototype%":rc,"%Atomics%":typeof Atomics>"u"?lt:Atomics,"%BigInt%":typeof BigInt>"u"?lt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?lt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?lt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?lt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":cF,"%eval%":eval,"%EvalError%":lF,"%Float16Array%":typeof Float16Array>"u"?lt:Float16Array,"%Float32Array%":typeof Float32Array>"u"?lt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?lt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?lt:FinalizationRegistry,"%Function%":Kb,"%GeneratorFunction%":rc,"%Int8Array%":typeof Int8Array>"u"?lt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?lt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?lt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":tc&&jr?jr(jr([][Symbol.iterator]())):lt,"%JSON%":typeof JSON=="object"?JSON:lt,"%Map%":typeof Map>"u"?lt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!tc||!jr?lt:jr(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":fF,"%Object.getOwnPropertyDescriptor%":uh,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?lt:Promise,"%Proxy%":typeof Proxy>"u"?lt:Proxy,"%RangeError%":hF,"%ReferenceError%":dF,"%Reflect%":typeof Reflect>"u"?lt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?lt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!tc||!jr?lt:jr(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?lt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":tc&&jr?jr(""[Symbol.iterator]()):lt,"%Symbol%":tc?Symbol:lt,"%SyntaxError%":nc,"%ThrowTypeError%":xF,"%TypedArray%":OF,"%TypeError%":ic,"%Uint8Array%":typeof Uint8Array>"u"?lt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?lt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?lt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?lt:Uint32Array,"%URIError%":pF,"%WeakMap%":typeof WeakMap>"u"?lt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?lt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?lt:WeakSet,"%Function.prototype.call%":fh,"%Function.prototype.apply%":Vb,"%Object.defineProperty%":SF,"%Object.getPrototypeOf%":EF,"%Math.abs%":gF,"%Math.floor%":vF,"%Math.max%":mF,"%Math.min%":yF,"%Math.pow%":bF,"%Math.round%":_F,"%Math.sign%":wF,"%Reflect.getPrototypeOf%":IF};if(jr)try{null.error}catch(e){Hb=jr(jr(e)),Su["%Error.prototype%"]=Hb}var Hb,AF=function e(t){var r;if(t==="%AsyncFunction%")r=ag("async function () {}");else if(t==="%GeneratorFunction%")r=ag("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=ag("async function* () {}");else if(t==="%AsyncGenerator%"){var i=e("%AsyncGeneratorFunction%");i&&(r=i.prototype)}else if(t==="%AsyncIteratorPrototype%"){var n=e("%AsyncGenerator%");n&&jr&&(r=jr(n.prototype))}return Su[t]=r,r},jb={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ch=ec(),pd=og(),PF=ch.call(fh,Array.prototype.concat),TF=ch.call(Vb,Array.prototype.splice),zb=ch.call(fh,String.prototype.replace),gd=ch.call(fh,String.prototype.slice),kF=ch.call(fh,RegExp.prototype.exec),RF=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,BF=/\\(\\)?/g,MF=function(t){var r=gd(t,0,1),i=gd(t,-1);if(r==="%"&&i!=="%")throw new nc("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&r!=="%")throw new nc("invalid intrinsic syntax, expected opening `%`");var n=[];return zb(t,RF,function(o,a,s,u){n[n.length]=s?zb(u,BF,"$1"):a||o}),n},CF=function(t,r){var i=t,n;if(pd(jb,i)&&(n=jb[i],i="%"+n[0]+"%"),pd(Su,i)){var o=Su[i];if(o===rc&&(o=AF(i)),typeof o>"u"&&!r)throw new ic("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:o}}throw new nc("intrinsic "+t+" does not exist!")};Gb.exports=function(t,r){if(typeof t!="string"||t.length===0)throw new ic("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new ic('"allowMissing" argument must be a boolean');if(kF(/^%?[^%]*%?$/,t)===null)throw new nc("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=MF(t),n=i.length>0?i[0]:"",o=CF("%"+n+"%",r),a=o.name,s=o.value,u=!1,c=o.alias;c&&(n=c[0],TF(i,PF([0,1],c)));for(var l=1,m=!0;l<i.length;l+=1){var w=i[l],E=gd(w,0,1),P=gd(w,-1);if((E==='"'||E==="'"||E==="`"||P==='"'||P==="'"||P==="`")&&E!==P)throw new nc("property names with quotes must have matching quotes");if((w==="constructor"||!m)&&(u=!0),n+="."+w,a="%"+n+"%",pd(Su,a))s=Su[a];else if(s!=null){if(!(w in s)){if(!r)throw new ic("base intrinsic for "+t+" exists, but the property is not available.");return}if(uh&&l+1>=i.length){var M=uh(s,w);m=!!M,m&&"get"in M&&!("originalValue"in M.get)?s=M.get:s=s[w]}else m=pd(s,w),s=s[w];m&&!u&&(Su[a]=s)}}return s}});var ts=k((Ofe,Yb)=>{"use strict";v();var Zb=vd(),Wb=hd(),NF=Wb([Zb("%String.prototype.indexOf%")]);Yb.exports=function(t,r){var i=Zb(t,!!r);return typeof i=="function"&&NF(t,".prototype.")>-1?Wb([i]):i}});var Jb=k((Pfe,Xb)=>{"use strict";v();var DF=ah()(),LF=ts(),ug=LF("Object.prototype.toString"),md=function(t){return DF&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:ug(t)==="[object Arguments]"},$b=function(t){return md(t)?!0:t!==null&&typeof t=="object"&&"length"in t&&typeof t.length=="number"&&t.length>=0&&ug(t)!=="[object Array]"&&"callee"in t&&ug(t.callee)==="[object Function]"},qF=(function(){return md(arguments)})();md.isLegacyArguments=$b;Xb.exports=qF?md:$b});var n9=k((kfe,i9)=>{"use strict";v();var Qb=ts(),UF=ah()(),FF=og(),HF=wu(),lg;UF?(e9=Qb("RegExp.prototype.exec"),fg={},yd=function(){throw fg},cg={toString:yd,valueOf:yd},typeof Symbol.toPrimitive=="symbol"&&(cg[Symbol.toPrimitive]=yd),lg=function(t){if(!t||typeof t!="object")return!1;var r=HF(t,"lastIndex"),i=r&&FF(r,"value");if(!i)return!1;try{e9(t,cg)}catch(n){return n===fg}}):(t9=Qb("Object.prototype.toString"),r9="[object RegExp]",lg=function(t){return!t||typeof t!="object"&&typeof t!="function"?!1:t9(t)===r9});var e9,fg,yd,cg,t9,r9;i9.exports=lg});var a9=k((Bfe,o9)=>{"use strict";v();var jF=ts(),zF=n9(),KF=jF("RegExp.prototype.exec"),VF=_u();o9.exports=function(t){if(!zF(t))throw new VF("`regex` must be a RegExp");return function(i){return KF(t,i)!==null}}});var u9=k((Cfe,s9)=>{"use strict";v();var GF=function*(){}.constructor;s9.exports=()=>GF});var h9=k((Dfe,l9)=>{"use strict";v();var c9=ts(),ZF=a9(),WF=ZF(/^\s*(?:function)?\*/),YF=ah()(),f9=dd(),$F=c9("Object.prototype.toString"),XF=c9("Function.prototype.toString"),JF=u9();l9.exports=function(t){if(typeof t!="function")return!1;if(WF(XF(t)))return!0;if(!YF){var r=$F(t);return r==="[object GeneratorFunction]"}if(!f9)return!1;var i=JF();return i&&f9(t)===i.prototype}});var v9=k((qfe,g9)=>{"use strict";v();var p9=Function.prototype.toString,oc=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,dg,bd;if(typeof oc=="function"&&typeof Object.defineProperty=="function")try{dg=Object.defineProperty({},"length",{get:function(){throw bd}}),bd={},oc(function(){throw 42},null,dg)}catch(e){e!==bd&&(oc=null)}else oc=null;var QF=/^\s*class\b/,pg=function(t){try{var r=p9.call(t);return QF.test(r)}catch{return!1}},hg=function(t){try{return pg(t)?!1:(p9.call(t),!0)}catch{return!1}},_d=Object.prototype.toString,eH="[object Object]",tH="[object Function]",rH="[object GeneratorFunction]",iH="[object HTMLAllCollection]",nH="[object HTML document.all class]",oH="[object HTMLCollection]",aH=typeof Symbol=="function"&&!!Symbol.toStringTag,sH=!(0 in[,]),gg=function(){return!1};typeof document=="object"&&(d9=document.all,_d.call(d9)===_d.call(document.all)&&(gg=function(t){if((sH||!t)&&(typeof t>"u"||typeof t=="object"))try{var r=_d.call(t);return(r===iH||r===nH||r===oH||r===eH)&&t("")==null}catch{}return!1}));var d9;g9.exports=oc?function(t){if(gg(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{oc(t,null,dg)}catch(r){if(r!==bd)return!1}return!pg(t)&&hg(t)}:function(t){if(gg(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(aH)return hg(t);if(pg(t))return!1;var r=_d.call(t);return r!==tH&&r!==rH&&!/^\[object HTML/.test(r)?!1:hg(t)}});var b9=k((Ffe,y9)=>{"use strict";v();var uH=v9(),fH=Object.prototype.toString,m9=Object.prototype.hasOwnProperty,cH=function(t,r,i){for(var n=0,o=t.length;n<o;n++)m9.call(t,n)&&(i==null?r(t[n],n,t):r.call(i,t[n],n,t))},lH=function(t,r,i){for(var n=0,o=t.length;n<o;n++)i==null?r(t.charAt(n),n,t):r.call(i,t.charAt(n),n,t)},hH=function(t,r,i){for(var n in t)m9.call(t,n)&&(i==null?r(t[n],n,t):r.call(i,t[n],n,t))};function dH(e){return fH.call(e)==="[object Array]"}y9.exports=function(t,r,i){if(!uH(r))throw new TypeError("iterator must be a function");var n;arguments.length>=3&&(n=i),dH(t)?cH(t,r,n):typeof t=="string"?lH(t,r,n):hH(t,r,n)}});var w9=k((jfe,_9)=>{"use strict";v();_9.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]});var x9=k((Kfe,S9)=>{"use strict";v();var vg=w9(),pH=globalThis;S9.exports=function(){for(var t=[],r=0;r<vg.length;r++)typeof pH[vg[r]]=="function"&&(t[t.length]=vg[r]);return t}});var mg=k((Gfe,O9)=>{"use strict";v();var E9=sh(),gH=eg(),ac=_u(),I9=wu();O9.exports=function(t,r,i){if(!t||typeof t!="object"&&typeof t!="function")throw new ac("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new ac("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new ac("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new ac("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new ac("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new ac("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,a=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,u=!!I9&&I9(t,r);if(E9)E9(t,r,{configurable:a===null&&u?u.configurable:!a,enumerable:n===null&&u?u.enumerable:!n,value:i,writable:o===null&&u?u.writable:!o});else if(s||!n&&!o&&!a)t[r]=i;else throw new gH("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var bg=k((Wfe,P9)=>{"use strict";v();var yg=sh(),A9=function(){return!!yg};A9.hasArrayLengthDefineBug=function(){if(!yg)return null;try{return yg([],"length",{value:1}).length!==1}catch{return!0}};P9.exports=A9});var M9=k(($fe,B9)=>{"use strict";v();var vH=vd(),T9=mg(),mH=bg()(),k9=wu(),R9=_u(),yH=vH("%Math.floor%");B9.exports=function(t,r){if(typeof t!="function")throw new R9("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||yH(r)!==r)throw new R9("`length` must be a positive 32-bit integer");var i=arguments.length>2&&!!arguments[2],n=!0,o=!0;if("length"in t&&k9){var a=k9(t,"length");a&&!a.configurable&&(n=!1),a&&!a.writable&&(o=!1)}return(n||o||!i)&&(mH?T9(t,"length",r,!0,!0):T9(t,"length",r)),t}});var N9=k((Jfe,C9)=>{"use strict";v();var bH=ec(),_H=ld(),wH=ig();C9.exports=function(){return wH(bH,_H,arguments)}});var lh=k((ece,wd)=>{"use strict";v();var SH=M9(),D9=sh(),xH=hd(),L9=N9();wd.exports=function(t){var r=xH(arguments),i=1+t.length-(arguments.length-1);return SH(r,i>0?i:0,!0)};D9?D9(wd.exports,"apply",{value:L9}):wd.exports.apply=L9});var xg=k((rce,H9)=>{"use strict";v();var Ed=b9(),EH=x9(),q9=lh(),wg=ts(),xd=wu(),Sd=dd(),IH=wg("Object.prototype.toString"),F9=ah()(),U9=globalThis,_g=EH(),Sg=wg("String.prototype.slice"),OH=wg("Array.prototype.indexOf",!0)||function(t,r){for(var i=0;i<t.length;i+=1)if(t[i]===r)return i;return-1},Id={__proto__:null};F9&&xd&&Sd?Ed(_g,function(e){var t=new U9[e];if(Symbol.toStringTag in t&&Sd){var r=Sd(t),i=xd(r,Symbol.toStringTag);if(!i&&r){var n=Sd(r);i=xd(n,Symbol.toStringTag)}if(i&&i.get){var o=q9(i.get);Id["$"+e]=o}}}):Ed(_g,function(e){var t=new U9[e],r=t.slice||t.set;if(r){var i=q9(r);Id["$"+e]=i}});var AH=function(t){var r=!1;return Ed(Id,function(i,n){if(!r)try{"$"+i(t)===n&&(r=Sg(n,1))}catch{}}),r},PH=function(t){var r=!1;return Ed(Id,function(i,n){if(!r)try{i(t),r=Sg(n,1)}catch{}}),r};H9.exports=function(t){if(!t||typeof t!="object")return!1;if(!F9){var r=Sg(IH(t),8,-1);return OH(_g,r)>-1?r:r!=="Object"?!1:PH(t)}return xd?AH(t):null}});var Eg=k((nce,j9)=>{"use strict";v();var TH=xg();j9.exports=function(t){return!!TH(t)}});var r_=k(ht=>{"use strict";v();var kH=Jb(),RH=h9(),Pn=xg(),z9=Eg();function sc(e){return e.call.bind(e)}var K9=typeof BigInt<"u",V9=typeof Symbol<"u",tn=sc(Object.prototype.toString),BH=sc(Number.prototype.valueOf),MH=sc(String.prototype.valueOf),CH=sc(Boolean.prototype.valueOf);K9&&(G9=sc(BigInt.prototype.valueOf));var G9;V9&&(Z9=sc(Symbol.prototype.valueOf));var Z9;function dh(e,t){if(typeof e!="object")return!1;try{return t(e),!0}catch{return!1}}ht.isArgumentsObject=kH;ht.isGeneratorFunction=RH;ht.isTypedArray=z9;function NH(e){return typeof Promise<"u"&&e instanceof Promise||e!==null&&typeof e=="object"&&typeof e.then=="function"&&typeof e.catch=="function"}ht.isPromise=NH;function DH(e){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(e):z9(e)||Y9(e)}ht.isArrayBufferView=DH;function LH(e){return Pn(e)==="Uint8Array"}ht.isUint8Array=LH;function qH(e){return Pn(e)==="Uint8ClampedArray"}ht.isUint8ClampedArray=qH;function UH(e){return Pn(e)==="Uint16Array"}ht.isUint16Array=UH;function FH(e){return Pn(e)==="Uint32Array"}ht.isUint32Array=FH;function HH(e){return Pn(e)==="Int8Array"}ht.isInt8Array=HH;function jH(e){return Pn(e)==="Int16Array"}ht.isInt16Array=jH;function zH(e){return Pn(e)==="Int32Array"}ht.isInt32Array=zH;function KH(e){return Pn(e)==="Float32Array"}ht.isFloat32Array=KH;function VH(e){return Pn(e)==="Float64Array"}ht.isFloat64Array=VH;function GH(e){return Pn(e)==="BigInt64Array"}ht.isBigInt64Array=GH;function ZH(e){return Pn(e)==="BigUint64Array"}ht.isBigUint64Array=ZH;function Od(e){return tn(e)==="[object Map]"}Od.working=typeof Map<"u"&&Od(new Map);function WH(e){return typeof Map>"u"?!1:Od.working?Od(e):e instanceof Map}ht.isMap=WH;function Ad(e){return tn(e)==="[object Set]"}Ad.working=typeof Set<"u"&&Ad(new Set);function YH(e){return typeof Set>"u"?!1:Ad.working?Ad(e):e instanceof Set}ht.isSet=YH;function Pd(e){return tn(e)==="[object WeakMap]"}Pd.working=typeof WeakMap<"u"&&Pd(new WeakMap);function $H(e){return typeof WeakMap>"u"?!1:Pd.working?Pd(e):e instanceof WeakMap}ht.isWeakMap=$H;function Og(e){return tn(e)==="[object WeakSet]"}Og.working=typeof WeakSet<"u"&&Og(new WeakSet);function XH(e){return Og(e)}ht.isWeakSet=XH;function Td(e){return tn(e)==="[object ArrayBuffer]"}Td.working=typeof ArrayBuffer<"u"&&Td(new ArrayBuffer);function W9(e){return typeof ArrayBuffer>"u"?!1:Td.working?Td(e):e instanceof ArrayBuffer}ht.isArrayBuffer=W9;function kd(e){return tn(e)==="[object DataView]"}kd.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&kd(new DataView(new ArrayBuffer(1),0,1));function Y9(e){return typeof DataView>"u"?!1:kd.working?kd(e):e instanceof DataView}ht.isDataView=Y9;var Ig=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function hh(e){return tn(e)==="[object SharedArrayBuffer]"}function $9(e){return typeof Ig>"u"?!1:(typeof hh.working>"u"&&(hh.working=hh(new Ig)),hh.working?hh(e):e instanceof Ig)}ht.isSharedArrayBuffer=$9;function JH(e){return tn(e)==="[object AsyncFunction]"}ht.isAsyncFunction=JH;function QH(e){return tn(e)==="[object Map Iterator]"}ht.isMapIterator=QH;function ej(e){return tn(e)==="[object Set Iterator]"}ht.isSetIterator=ej;function tj(e){return tn(e)==="[object Generator]"}ht.isGeneratorObject=tj;function rj(e){return tn(e)==="[object WebAssembly.Module]"}ht.isWebAssemblyCompiledModule=rj;function X9(e){return dh(e,BH)}ht.isNumberObject=X9;function J9(e){return dh(e,MH)}ht.isStringObject=J9;function Q9(e){return dh(e,CH)}ht.isBooleanObject=Q9;function e_(e){return K9&&dh(e,G9)}ht.isBigIntObject=e_;function t_(e){return V9&&dh(e,Z9)}ht.isSymbolObject=t_;function ij(e){return X9(e)||J9(e)||Q9(e)||e_(e)||t_(e)}ht.isBoxedPrimitive=ij;function nj(e){return typeof Uint8Array<"u"&&(W9(e)||$9(e))}ht.isAnyArrayBuffer=nj;["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(ht,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})})});var n_=k((uce,i_)=>{v();i_.exports=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"}});var rn=k(dt=>{v();var o_=Object.getOwnPropertyDescriptors||function(t){for(var r=Object.keys(t),i={},n=0;n<r.length;n++)i[r[n]]=Object.getOwnPropertyDescriptor(t,r[n]);return i},oj=/%[sdj%]/g;dt.format=function(e){if(!Ld(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(rs(arguments[r]));return t.join(" ")}for(var r=1,i=arguments,n=i.length,o=String(e).replace(oj,function(s){if(s==="%%")return"%";if(r>=n)return s;switch(s){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":try{return JSON.stringify(i[r++])}catch{return"[Circular]"}default:return s}}),a=i[r];r<n;a=i[++r])Dd(a)||!uc(a)?o+=" "+a:o+=" "+rs(a);return o};dt.deprecate=function(e,t){if(typeof A.default<"u"&&A.default.noDeprecation===!0)return e;if(typeof A.default>"u")return function(){return dt.deprecate(e,t).apply(this,arguments)};var r=!1;function i(){if(!r){if(A.default.throwDeprecation)throw new Error(t);A.default.traceDeprecation?console.trace(t):console.error(t),r=!0}return e.apply(this,arguments)}return i};var Rd={},a_=/^$/;A.default.env.NODE_DEBUG&&(Bd=A.default.env.NODE_DEBUG,Bd=Bd.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),a_=new RegExp("^"+Bd+"$","i"));var Bd;dt.debuglog=function(e){if(e=e.toUpperCase(),!Rd[e])if(a_.test(e)){var t=A.default.pid;Rd[e]=function(){var r=dt.format.apply(dt,arguments);console.error("%s %d: %s",e,t,r)}}else Rd[e]=function(){};return Rd[e]};function rs(e,t){var r={seen:[],stylize:sj};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),kg(t)?r.showHidden=t:t&&dt._extend(r,t),Eu(r.showHidden)&&(r.showHidden=!1),Eu(r.depth)&&(r.depth=2),Eu(r.colors)&&(r.colors=!1),Eu(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=aj),Cd(r,e,r.depth)}dt.inspect=rs;rs.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};rs.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function aj(e,t){var r=rs.styles[t];return r?"\x1B["+rs.colors[r][0]+"m"+e+"\x1B["+rs.colors[r][1]+"m":e}function sj(e,t){return e}function uj(e){var t={};return e.forEach(function(r,i){t[r]=!0}),t}function Cd(e,t,r){if(e.customInspect&&t&&Md(t.inspect)&&t.inspect!==dt.inspect&&!(t.constructor&&t.constructor.prototype===t)){var i=t.inspect(r,e);return Ld(i)||(i=Cd(e,i,r)),i}var n=fj(e,t);if(n)return n;var o=Object.keys(t),a=uj(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),gh(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return Ag(t);if(o.length===0){if(Md(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(ph(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(Nd(t))return e.stylize(Date.prototype.toString.call(t),"date");if(gh(t))return Ag(t)}var u="",c=!1,l=["{","}"];if(s_(t)&&(c=!0,l=["[","]"]),Md(t)){var m=t.name?": "+t.name:"";u=" [Function"+m+"]"}if(ph(t)&&(u=" "+RegExp.prototype.toString.call(t)),Nd(t)&&(u=" "+Date.prototype.toUTCString.call(t)),gh(t)&&(u=" "+Ag(t)),o.length===0&&(!c||t.length==0))return l[0]+u+l[1];if(r<0)return ph(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var w;return c?w=cj(e,t,r,a,o):w=o.map(function(E){return Tg(e,t,r,a,E,c)}),e.seen.pop(),lj(w,u,l)}function fj(e,t){if(Eu(t))return e.stylize("undefined","undefined");if(Ld(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(u_(t))return e.stylize(""+t,"number");if(kg(t))return e.stylize(""+t,"boolean");if(Dd(t))return e.stylize("null","null")}function Ag(e){return"["+Error.prototype.toString.call(e)+"]"}function cj(e,t,r,i,n){for(var o=[],a=0,s=t.length;a<s;++a)f_(t,String(a))?o.push(Tg(e,t,r,i,String(a),!0)):o.push("");return n.forEach(function(u){u.match(/^\d+$/)||o.push(Tg(e,t,r,i,u,!0))}),o}function Tg(e,t,r,i,n,o){var a,s,u;if(u=Object.getOwnPropertyDescriptor(t,n)||{value:t[n]},u.get?u.set?s=e.stylize("[Getter/Setter]","special"):s=e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),f_(i,n)||(a="["+n+"]"),s||(e.seen.indexOf(u.value)<0?(Dd(r)?s=Cd(e,u.value,null):s=Cd(e,u.value,r-1),s.indexOf(`
|
|
2
|
+
Use Chrome, Firefox or Internet Explorer 11`)}var BU=ot().Buffer,id=globalThis.crypto||globalThis.msCrypto;id&&id.getRandomValues?$5.exports=MU:$5.exports=RU;function MU(e,t){if(e>kU)throw new RangeError("requested too many random bytes");var r=BU.allocUnsafe(e);if(e>0)if(e>Y5)for(var i=0;i<e;i+=Y5)id.getRandomValues(r.slice(i,i+Y5));else id.getRandomValues(r);return typeof t=="function"?A.default.nextTick(function(){t(null,r)}):r}});var Te=k((nue,X5)=>{v();typeof Object.create=="function"?X5.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:X5.exports=function(t,r){if(r){t.super_=r;var i=function(){};i.prototype=r.prototype,t.prototype=new i,t.prototype.constructor=t}}});var Qf=k((aue,J5)=>{"use strict";v();var Jf=typeof Reflect=="object"?Reflect:null,x3=Jf&&typeof Jf.apply=="function"?Jf.apply:function(t,r,i){return Function.prototype.apply.call(t,r,i)},nd;Jf&&typeof Jf.ownKeys=="function"?nd=Jf.ownKeys:Object.getOwnPropertySymbols?nd=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:nd=function(t){return Object.getOwnPropertyNames(t)};function CU(e){console&&console.warn&&console.warn(e)}var I3=Number.isNaN||function(t){return t!==t};function Dt(){Dt.init.call(this)}J5.exports=Dt;J5.exports.once=qU;Dt.EventEmitter=Dt;Dt.prototype._events=void 0;Dt.prototype._eventsCount=0;Dt.prototype._maxListeners=void 0;var E3=10;function od(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(Dt,"defaultMaxListeners",{enumerable:!0,get:function(){return E3},set:function(e){if(typeof e!="number"||e<0||I3(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");E3=e}});Dt.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};Dt.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||I3(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function O3(e){return e._maxListeners===void 0?Dt.defaultMaxListeners:e._maxListeners}Dt.prototype.getMaxListeners=function(){return O3(this)};Dt.prototype.emit=function(t){for(var r=[],i=1;i<arguments.length;i++)r.push(arguments[i]);var n=t==="error",o=this._events;if(o!==void 0)n=n&&o.error===void 0;else if(!n)return!1;if(n){var a;if(r.length>0&&(a=r[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=o[t];if(u===void 0)return!1;if(typeof u=="function")x3(u,this,r);else for(var c=u.length,l=R3(u,c),i=0;i<c;++i)x3(l[i],this,r);return!0};function A3(e,t,r,i){var n,o,a;if(od(r),o=e._events,o===void 0?(o=e._events=Object.create(null),e._eventsCount=0):(o.newListener!==void 0&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),a=o[t]),a===void 0)a=o[t]=r,++e._eventsCount;else if(typeof a=="function"?a=o[t]=i?[r,a]:[a,r]:i?a.unshift(r):a.push(r),n=O3(e),n>0&&a.length>n&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=a.length,CU(s)}return e}Dt.prototype.addListener=function(t,r){return A3(this,t,r,!1)};Dt.prototype.on=Dt.prototype.addListener;Dt.prototype.prependListener=function(t,r){return A3(this,t,r,!0)};function NU(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function P3(e,t,r){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},n=NU.bind(i);return n.listener=r,i.wrapFn=n,n}Dt.prototype.once=function(t,r){return od(r),this.on(t,P3(this,t,r)),this};Dt.prototype.prependOnceListener=function(t,r){return od(r),this.prependListener(t,P3(this,t,r)),this};Dt.prototype.removeListener=function(t,r){var i,n,o,a,s;if(od(r),n=this._events,n===void 0)return this;if(i=n[t],i===void 0)return this;if(i===r||i.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,i.listener||r));else if(typeof i!="function"){for(o=-1,a=i.length-1;a>=0;a--)if(i[a]===r||i[a].listener===r){s=i[a].listener,o=a;break}if(o<0)return this;o===0?i.shift():DU(i,o),i.length===1&&(n[t]=i[0]),n.removeListener!==void 0&&this.emit("removeListener",t,s||r)}return this};Dt.prototype.off=Dt.prototype.removeListener;Dt.prototype.removeAllListeners=function(t){var r,i,n;if(i=this._events,i===void 0)return this;if(i.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):i[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete i[t]),this;if(arguments.length===0){var o=Object.keys(i),a;for(n=0;n<o.length;++n)a=o[n],a!=="removeListener"&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(r=i[t],typeof r=="function")this.removeListener(t,r);else if(r!==void 0)for(n=r.length-1;n>=0;n--)this.removeListener(t,r[n]);return this};function T3(e,t,r){var i=e._events;if(i===void 0)return[];var n=i[t];return n===void 0?[]:typeof n=="function"?r?[n.listener||n]:[n]:r?LU(n):R3(n,n.length)}Dt.prototype.listeners=function(t){return T3(this,t,!0)};Dt.prototype.rawListeners=function(t){return T3(this,t,!1)};Dt.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):k3.call(e,t)};Dt.prototype.listenerCount=k3;function k3(e){var t=this._events;if(t!==void 0){var r=t[e];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}Dt.prototype.eventNames=function(){return this._eventsCount>0?nd(this._events):[]};function R3(e,t){for(var r=new Array(t),i=0;i<t;++i)r[i]=e[i];return r}function DU(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function LU(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}function qU(e,t){return new Promise(function(r,i){function n(a){e.removeListener(t,o),i(a)}function o(){typeof e.removeListener=="function"&&e.removeListener("error",n),r([].slice.call(arguments))}B3(e,t,o,{once:!0}),t!=="error"&&UU(e,n,{once:!0})})}function UU(e,t,r){typeof e.on=="function"&&B3(e,"error",t,r)}function B3(e,t,r,i){if(typeof e.on=="function")i.once?e.once(t,r):e.on(t,r);else if(typeof e.addEventListener=="function")e.addEventListener(t,function n(o){i.once&&e.removeEventListener(t,n),r(o)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}});var Q5=k((uue,M3)=>{v();M3.exports=Qf().EventEmitter});var ad=k((cue,C3)=>{"use strict";v();C3.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),i=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var n=42;t[r]=n;for(var o in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,r);if(s.value!==n||s.enumerable!==!0)return!1}return!0}});var ah=k((hue,N3)=>{"use strict";v();var FU=ad();N3.exports=function(){return FU()&&!!Symbol.toStringTag}});var sd=k((pue,D3)=>{"use strict";v();D3.exports=Object});var q3=k((vue,L3)=>{"use strict";v();L3.exports=Error});var F3=k((yue,U3)=>{"use strict";v();U3.exports=EvalError});var j3=k((_ue,H3)=>{"use strict";v();H3.exports=RangeError});var K3=k((Sue,z3)=>{"use strict";v();z3.exports=ReferenceError});var eg=k((Eue,V3)=>{"use strict";v();V3.exports=SyntaxError});var _u=k((Oue,G3)=>{"use strict";v();G3.exports=TypeError});var W3=k((Pue,Z3)=>{"use strict";v();Z3.exports=URIError});var $3=k((kue,Y3)=>{"use strict";v();Y3.exports=Math.abs});var J3=k((Bue,X3)=>{"use strict";v();X3.exports=Math.floor});var eb=k((Cue,Q3)=>{"use strict";v();Q3.exports=Math.max});var rb=k((Due,tb)=>{"use strict";v();tb.exports=Math.min});var nb=k((que,ib)=>{"use strict";v();ib.exports=Math.pow});var ab=k((Fue,ob)=>{"use strict";v();ob.exports=Math.round});var ub=k((jue,sb)=>{"use strict";v();sb.exports=Number.isNaN||function(t){return t!==t}});var cb=k((Kue,fb)=>{"use strict";v();var HU=ub();fb.exports=function(t){return HU(t)||t===0?t:t<0?-1:1}});var hb=k((Gue,lb)=>{"use strict";v();lb.exports=Object.getOwnPropertyDescriptor});var wu=k((Wue,db)=>{"use strict";v();var ud=hb();if(ud)try{ud([],"length")}catch{ud=null}db.exports=ud});var sh=k(($ue,pb)=>{"use strict";v();var fd=Object.defineProperty||!1;if(fd)try{fd({},"a",{value:1})}catch{fd=!1}pb.exports=fd});var mb=k((Jue,vb)=>{"use strict";v();var gb=typeof Symbol<"u"&&Symbol,jU=ad();vb.exports=function(){return typeof gb!="function"||typeof Symbol!="function"||typeof gb("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:jU()}});var tg=k((efe,yb)=>{"use strict";v();yb.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var rg=k((rfe,bb)=>{"use strict";v();var zU=sd();bb.exports=zU.getPrototypeOf||null});var Sb=k((nfe,wb)=>{"use strict";v();var KU="Function.prototype.bind called on incompatible ",VU=Object.prototype.toString,GU=Math.max,ZU="[object Function]",_b=function(t,r){for(var i=[],n=0;n<t.length;n+=1)i[n]=t[n];for(var o=0;o<r.length;o+=1)i[o+t.length]=r[o];return i},WU=function(t,r){for(var i=[],n=r||0,o=0;n<t.length;n+=1,o+=1)i[o]=t[n];return i},YU=function(e,t){for(var r="",i=0;i<e.length;i+=1)r+=e[i],i+1<e.length&&(r+=t);return r};wb.exports=function(t){var r=this;if(typeof r!="function"||VU.apply(r)!==ZU)throw new TypeError(KU+r);for(var i=WU(arguments,1),n,o=function(){if(this instanceof n){var l=r.apply(this,_b(i,arguments));return Object(l)===l?l:this}return r.apply(t,_b(i,arguments))},a=GU(0,r.length-i.length),s=[],u=0;u<a;u++)s[u]="$"+u;if(n=Function("binder","return function ("+YU(s,",")+"){ return binder.apply(this,arguments); }")(o),r.prototype){var c=function(){};c.prototype=r.prototype,n.prototype=new c,c.prototype=null}return n}});var ec=k((afe,xb)=>{"use strict";v();var $U=Sb();xb.exports=Function.prototype.bind||$U});var cd=k((ufe,Eb)=>{"use strict";v();Eb.exports=Function.prototype.call});var ld=k((cfe,Ib)=>{"use strict";v();Ib.exports=Function.prototype.apply});var Ab=k((hfe,Ob)=>{"use strict";v();Ob.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var ig=k((pfe,Pb)=>{"use strict";v();var XU=ec(),JU=ld(),QU=cd(),eF=Ab();Pb.exports=eF||XU.call(QU,JU)});var hd=k((vfe,Tb)=>{"use strict";v();var tF=ec(),rF=_u(),iF=cd(),nF=ig();Tb.exports=function(t){if(t.length<1||typeof t[0]!="function")throw new rF("a function is required");return nF(tF,iF,t)}});var Nb=k((yfe,Cb)=>{"use strict";v();var oF=hd(),kb=wu(),Bb;try{Bb=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var ng=!!Bb&&kb&&kb(Object.prototype,"__proto__"),Mb=Object,Rb=Mb.getPrototypeOf;Cb.exports=ng&&typeof ng.get=="function"?oF([ng.get]):typeof Rb=="function"?function(t){return Rb(t==null?t:Mb(t))}:!1});var dd=k((_fe,Ub)=>{"use strict";v();var Db=tg(),Lb=rg(),qb=Nb();Ub.exports=Db?function(t){return Db(t)}:Lb?function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return Lb(t)}:qb?function(t){return qb(t)}:null});var og=k((Sfe,Fb)=>{"use strict";v();var aF=Function.prototype.call,sF=Object.prototype.hasOwnProperty,uF=ec();Fb.exports=uF.call(aF,sF)});var vd=k((Efe,Gb)=>{"use strict";v();var lt,fF=sd(),cF=q3(),lF=F3(),hF=j3(),dF=K3(),nc=eg(),ic=_u(),pF=W3(),gF=$3(),vF=J3(),mF=eb(),yF=rb(),bF=nb(),_F=ab(),wF=cb(),Kb=Function,ag=function(e){try{return Kb('"use strict"; return ('+e+").constructor;")()}catch{}},uh=wu(),SF=sh(),sg=function(){throw new ic},xF=uh?(function(){try{return arguments.callee,sg}catch{try{return uh(arguments,"callee").get}catch{return sg}}})():sg,tc=mb()(),jr=dd(),EF=rg(),IF=tg(),Vb=ld(),fh=cd(),rc={},OF=typeof Uint8Array>"u"||!jr?lt:jr(Uint8Array),Su={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?lt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?lt:ArrayBuffer,"%ArrayIteratorPrototype%":tc&&jr?jr([][Symbol.iterator]()):lt,"%AsyncFromSyncIteratorPrototype%":lt,"%AsyncFunction%":rc,"%AsyncGenerator%":rc,"%AsyncGeneratorFunction%":rc,"%AsyncIteratorPrototype%":rc,"%Atomics%":typeof Atomics>"u"?lt:Atomics,"%BigInt%":typeof BigInt>"u"?lt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?lt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?lt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?lt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":cF,"%eval%":eval,"%EvalError%":lF,"%Float16Array%":typeof Float16Array>"u"?lt:Float16Array,"%Float32Array%":typeof Float32Array>"u"?lt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?lt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?lt:FinalizationRegistry,"%Function%":Kb,"%GeneratorFunction%":rc,"%Int8Array%":typeof Int8Array>"u"?lt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?lt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?lt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":tc&&jr?jr(jr([][Symbol.iterator]())):lt,"%JSON%":typeof JSON=="object"?JSON:lt,"%Map%":typeof Map>"u"?lt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!tc||!jr?lt:jr(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":fF,"%Object.getOwnPropertyDescriptor%":uh,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?lt:Promise,"%Proxy%":typeof Proxy>"u"?lt:Proxy,"%RangeError%":hF,"%ReferenceError%":dF,"%Reflect%":typeof Reflect>"u"?lt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?lt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!tc||!jr?lt:jr(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?lt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":tc&&jr?jr(""[Symbol.iterator]()):lt,"%Symbol%":tc?Symbol:lt,"%SyntaxError%":nc,"%ThrowTypeError%":xF,"%TypedArray%":OF,"%TypeError%":ic,"%Uint8Array%":typeof Uint8Array>"u"?lt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?lt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?lt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?lt:Uint32Array,"%URIError%":pF,"%WeakMap%":typeof WeakMap>"u"?lt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?lt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?lt:WeakSet,"%Function.prototype.call%":fh,"%Function.prototype.apply%":Vb,"%Object.defineProperty%":SF,"%Object.getPrototypeOf%":EF,"%Math.abs%":gF,"%Math.floor%":vF,"%Math.max%":mF,"%Math.min%":yF,"%Math.pow%":bF,"%Math.round%":_F,"%Math.sign%":wF,"%Reflect.getPrototypeOf%":IF};if(jr)try{null.error}catch(e){Hb=jr(jr(e)),Su["%Error.prototype%"]=Hb}var Hb,AF=function e(t){var r;if(t==="%AsyncFunction%")r=ag("async function () {}");else if(t==="%GeneratorFunction%")r=ag("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=ag("async function* () {}");else if(t==="%AsyncGenerator%"){var i=e("%AsyncGeneratorFunction%");i&&(r=i.prototype)}else if(t==="%AsyncIteratorPrototype%"){var n=e("%AsyncGenerator%");n&&jr&&(r=jr(n.prototype))}return Su[t]=r,r},jb={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ch=ec(),pd=og(),PF=ch.call(fh,Array.prototype.concat),TF=ch.call(Vb,Array.prototype.splice),zb=ch.call(fh,String.prototype.replace),gd=ch.call(fh,String.prototype.slice),kF=ch.call(fh,RegExp.prototype.exec),RF=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,BF=/\\(\\)?/g,MF=function(t){var r=gd(t,0,1),i=gd(t,-1);if(r==="%"&&i!=="%")throw new nc("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&r!=="%")throw new nc("invalid intrinsic syntax, expected opening `%`");var n=[];return zb(t,RF,function(o,a,s,u){n[n.length]=s?zb(u,BF,"$1"):a||o}),n},CF=function(t,r){var i=t,n;if(pd(jb,i)&&(n=jb[i],i="%"+n[0]+"%"),pd(Su,i)){var o=Su[i];if(o===rc&&(o=AF(i)),typeof o>"u"&&!r)throw new ic("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:o}}throw new nc("intrinsic "+t+" does not exist!")};Gb.exports=function(t,r){if(typeof t!="string"||t.length===0)throw new ic("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new ic('"allowMissing" argument must be a boolean');if(kF(/^%?[^%]*%?$/,t)===null)throw new nc("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=MF(t),n=i.length>0?i[0]:"",o=CF("%"+n+"%",r),a=o.name,s=o.value,u=!1,c=o.alias;c&&(n=c[0],TF(i,PF([0,1],c)));for(var l=1,m=!0;l<i.length;l+=1){var w=i[l],E=gd(w,0,1),P=gd(w,-1);if((E==='"'||E==="'"||E==="`"||P==='"'||P==="'"||P==="`")&&E!==P)throw new nc("property names with quotes must have matching quotes");if((w==="constructor"||!m)&&(u=!0),n+="."+w,a="%"+n+"%",pd(Su,a))s=Su[a];else if(s!=null){if(!(w in s)){if(!r)throw new ic("base intrinsic for "+t+" exists, but the property is not available.");return}if(uh&&l+1>=i.length){var M=uh(s,w);m=!!M,m&&"get"in M&&!("originalValue"in M.get)?s=M.get:s=s[w]}else m=pd(s,w),s=s[w];m&&!u&&(Su[a]=s)}}return s}});var ts=k((Ofe,Yb)=>{"use strict";v();var Zb=vd(),Wb=hd(),NF=Wb([Zb("%String.prototype.indexOf%")]);Yb.exports=function(t,r){var i=Zb(t,!!r);return typeof i=="function"&&NF(t,".prototype.")>-1?Wb([i]):i}});var Jb=k((Pfe,Xb)=>{"use strict";v();var DF=ah()(),LF=ts(),ug=LF("Object.prototype.toString"),md=function(t){return DF&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:ug(t)==="[object Arguments]"},$b=function(t){return md(t)?!0:t!==null&&typeof t=="object"&&"length"in t&&typeof t.length=="number"&&t.length>=0&&ug(t)!=="[object Array]"&&"callee"in t&&ug(t.callee)==="[object Function]"},qF=(function(){return md(arguments)})();md.isLegacyArguments=$b;Xb.exports=qF?md:$b});var n9=k((kfe,i9)=>{"use strict";v();var Qb=ts(),UF=ah()(),FF=og(),HF=wu(),lg;UF?(e9=Qb("RegExp.prototype.exec"),fg={},yd=function(){throw fg},cg={toString:yd,valueOf:yd},typeof Symbol.toPrimitive=="symbol"&&(cg[Symbol.toPrimitive]=yd),lg=function(t){if(!t||typeof t!="object")return!1;var r=HF(t,"lastIndex"),i=r&&FF(r,"value");if(!i)return!1;try{e9(t,cg)}catch(n){return n===fg}}):(t9=Qb("Object.prototype.toString"),r9="[object RegExp]",lg=function(t){return!t||typeof t!="object"&&typeof t!="function"?!1:t9(t)===r9});var e9,fg,yd,cg,t9,r9;i9.exports=lg});var a9=k((Bfe,o9)=>{"use strict";v();var jF=ts(),zF=n9(),KF=jF("RegExp.prototype.exec"),VF=_u();o9.exports=function(t){if(!zF(t))throw new VF("`regex` must be a RegExp");return function(i){return KF(t,i)!==null}}});var u9=k((Cfe,s9)=>{"use strict";v();var GF=function*(){}.constructor;s9.exports=()=>GF});var h9=k((Dfe,l9)=>{"use strict";v();var c9=ts(),ZF=a9(),WF=ZF(/^\s*(?:function)?\*/),YF=ah()(),f9=dd(),$F=c9("Object.prototype.toString"),XF=c9("Function.prototype.toString"),JF=u9();l9.exports=function(t){if(typeof t!="function")return!1;if(WF(XF(t)))return!0;if(!YF){var r=$F(t);return r==="[object GeneratorFunction]"}if(!f9)return!1;var i=JF();return i&&f9(t)===i.prototype}});var v9=k((qfe,g9)=>{"use strict";v();var p9=Function.prototype.toString,oc=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,dg,bd;if(typeof oc=="function"&&typeof Object.defineProperty=="function")try{dg=Object.defineProperty({},"length",{get:function(){throw bd}}),bd={},oc(function(){throw 42},null,dg)}catch(e){e!==bd&&(oc=null)}else oc=null;var QF=/^\s*class\b/,pg=function(t){try{var r=p9.call(t);return QF.test(r)}catch{return!1}},hg=function(t){try{return pg(t)?!1:(p9.call(t),!0)}catch{return!1}},_d=Object.prototype.toString,eH="[object Object]",tH="[object Function]",rH="[object GeneratorFunction]",iH="[object HTMLAllCollection]",nH="[object HTML document.all class]",oH="[object HTMLCollection]",aH=typeof Symbol=="function"&&!!Symbol.toStringTag,sH=!(0 in[,]),gg=function(){return!1};typeof document=="object"&&(d9=document.all,_d.call(d9)===_d.call(document.all)&&(gg=function(t){if((sH||!t)&&(typeof t>"u"||typeof t=="object"))try{var r=_d.call(t);return(r===iH||r===nH||r===oH||r===eH)&&t("")==null}catch{}return!1}));var d9;g9.exports=oc?function(t){if(gg(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{oc(t,null,dg)}catch(r){if(r!==bd)return!1}return!pg(t)&&hg(t)}:function(t){if(gg(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(aH)return hg(t);if(pg(t))return!1;var r=_d.call(t);return r!==tH&&r!==rH&&!/^\[object HTML/.test(r)?!1:hg(t)}});var b9=k((Ffe,y9)=>{"use strict";v();var uH=v9(),fH=Object.prototype.toString,m9=Object.prototype.hasOwnProperty,cH=function(t,r,i){for(var n=0,o=t.length;n<o;n++)m9.call(t,n)&&(i==null?r(t[n],n,t):r.call(i,t[n],n,t))},lH=function(t,r,i){for(var n=0,o=t.length;n<o;n++)i==null?r(t.charAt(n),n,t):r.call(i,t.charAt(n),n,t)},hH=function(t,r,i){for(var n in t)m9.call(t,n)&&(i==null?r(t[n],n,t):r.call(i,t[n],n,t))};function dH(e){return fH.call(e)==="[object Array]"}y9.exports=function(t,r,i){if(!uH(r))throw new TypeError("iterator must be a function");var n;arguments.length>=3&&(n=i),dH(t)?cH(t,r,n):typeof t=="string"?lH(t,r,n):hH(t,r,n)}});var w9=k((jfe,_9)=>{"use strict";v();_9.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]});var x9=k((Kfe,S9)=>{"use strict";v();var vg=w9(),pH=globalThis;S9.exports=function(){for(var t=[],r=0;r<vg.length;r++)typeof pH[vg[r]]=="function"&&(t[t.length]=vg[r]);return t}});var mg=k((Gfe,O9)=>{"use strict";v();var E9=sh(),gH=eg(),ac=_u(),I9=wu();O9.exports=function(t,r,i){if(!t||typeof t!="object"&&typeof t!="function")throw new ac("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new ac("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new ac("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new ac("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new ac("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new ac("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,a=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,u=!!I9&&I9(t,r);if(E9)E9(t,r,{configurable:a===null&&u?u.configurable:!a,enumerable:n===null&&u?u.enumerable:!n,value:i,writable:o===null&&u?u.writable:!o});else if(s||!n&&!o&&!a)t[r]=i;else throw new gH("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var bg=k((Wfe,P9)=>{"use strict";v();var yg=sh(),A9=function(){return!!yg};A9.hasArrayLengthDefineBug=function(){if(!yg)return null;try{return yg([],"length",{value:1}).length!==1}catch{return!0}};P9.exports=A9});var M9=k(($fe,B9)=>{"use strict";v();var vH=vd(),T9=mg(),mH=bg()(),k9=wu(),R9=_u(),yH=vH("%Math.floor%");B9.exports=function(t,r){if(typeof t!="function")throw new R9("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||yH(r)!==r)throw new R9("`length` must be a positive 32-bit integer");var i=arguments.length>2&&!!arguments[2],n=!0,o=!0;if("length"in t&&k9){var a=k9(t,"length");a&&!a.configurable&&(n=!1),a&&!a.writable&&(o=!1)}return(n||o||!i)&&(mH?T9(t,"length",r,!0,!0):T9(t,"length",r)),t}});var N9=k((Jfe,C9)=>{"use strict";v();var bH=ec(),_H=ld(),wH=ig();C9.exports=function(){return wH(bH,_H,arguments)}});var lh=k((ece,wd)=>{"use strict";v();var SH=M9(),D9=sh(),xH=hd(),L9=N9();wd.exports=function(t){var r=xH(arguments),i=1+t.length-(arguments.length-1);return SH(r,i>0?i:0,!0)};D9?D9(wd.exports,"apply",{value:L9}):wd.exports.apply=L9});var xg=k((rce,H9)=>{"use strict";v();var Ed=b9(),EH=x9(),q9=lh(),wg=ts(),xd=wu(),Sd=dd(),IH=wg("Object.prototype.toString"),F9=ah()(),U9=globalThis,_g=EH(),Sg=wg("String.prototype.slice"),OH=wg("Array.prototype.indexOf",!0)||function(t,r){for(var i=0;i<t.length;i+=1)if(t[i]===r)return i;return-1},Id={__proto__:null};F9&&xd&&Sd?Ed(_g,function(e){var t=new U9[e];if(Symbol.toStringTag in t&&Sd){var r=Sd(t),i=xd(r,Symbol.toStringTag);if(!i&&r){var n=Sd(r);i=xd(n,Symbol.toStringTag)}if(i&&i.get){var o=q9(i.get);Id["$"+e]=o}}}):Ed(_g,function(e){var t=new U9[e],r=t.slice||t.set;if(r){var i=q9(r);Id["$"+e]=i}});var AH=function(t){var r=!1;return Ed(Id,function(i,n){if(!r)try{"$"+i(t)===n&&(r=Sg(n,1))}catch{}}),r},PH=function(t){var r=!1;return Ed(Id,function(i,n){if(!r)try{i(t),r=Sg(n,1)}catch{}}),r};H9.exports=function(t){if(!t||typeof t!="object")return!1;if(!F9){var r=Sg(IH(t),8,-1);return OH(_g,r)>-1?r:r!=="Object"?!1:PH(t)}return xd?AH(t):null}});var Eg=k((nce,j9)=>{"use strict";v();var TH=xg();j9.exports=function(t){return!!TH(t)}});var r_=k(ht=>{"use strict";v();var kH=Jb(),RH=h9(),Pn=xg(),z9=Eg();function sc(e){return e.call.bind(e)}var K9=typeof BigInt<"u",V9=typeof Symbol<"u",tn=sc(Object.prototype.toString),BH=sc(Number.prototype.valueOf),MH=sc(String.prototype.valueOf),CH=sc(Boolean.prototype.valueOf);K9&&(G9=sc(BigInt.prototype.valueOf));var G9;V9&&(Z9=sc(Symbol.prototype.valueOf));var Z9;function dh(e,t){if(typeof e!="object")return!1;try{return t(e),!0}catch{return!1}}ht.isArgumentsObject=kH;ht.isGeneratorFunction=RH;ht.isTypedArray=z9;function NH(e){return typeof Promise<"u"&&e instanceof Promise||e!==null&&typeof e=="object"&&typeof e.then=="function"&&typeof e.catch=="function"}ht.isPromise=NH;function DH(e){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(e):z9(e)||Y9(e)}ht.isArrayBufferView=DH;function LH(e){return Pn(e)==="Uint8Array"}ht.isUint8Array=LH;function qH(e){return Pn(e)==="Uint8ClampedArray"}ht.isUint8ClampedArray=qH;function UH(e){return Pn(e)==="Uint16Array"}ht.isUint16Array=UH;function FH(e){return Pn(e)==="Uint32Array"}ht.isUint32Array=FH;function HH(e){return Pn(e)==="Int8Array"}ht.isInt8Array=HH;function jH(e){return Pn(e)==="Int16Array"}ht.isInt16Array=jH;function zH(e){return Pn(e)==="Int32Array"}ht.isInt32Array=zH;function KH(e){return Pn(e)==="Float32Array"}ht.isFloat32Array=KH;function VH(e){return Pn(e)==="Float64Array"}ht.isFloat64Array=VH;function GH(e){return Pn(e)==="BigInt64Array"}ht.isBigInt64Array=GH;function ZH(e){return Pn(e)==="BigUint64Array"}ht.isBigUint64Array=ZH;function Od(e){return tn(e)==="[object Map]"}Od.working=typeof Map<"u"&&Od(new Map);function WH(e){return typeof Map>"u"?!1:Od.working?Od(e):e instanceof Map}ht.isMap=WH;function Ad(e){return tn(e)==="[object Set]"}Ad.working=typeof Set<"u"&&Ad(new Set);function YH(e){return typeof Set>"u"?!1:Ad.working?Ad(e):e instanceof Set}ht.isSet=YH;function Pd(e){return tn(e)==="[object WeakMap]"}Pd.working=typeof WeakMap<"u"&&Pd(new WeakMap);function $H(e){return typeof WeakMap>"u"?!1:Pd.working?Pd(e):e instanceof WeakMap}ht.isWeakMap=$H;function Og(e){return tn(e)==="[object WeakSet]"}Og.working=typeof WeakSet<"u"&&Og(new WeakSet);function XH(e){return Og(e)}ht.isWeakSet=XH;function Td(e){return tn(e)==="[object ArrayBuffer]"}Td.working=typeof ArrayBuffer<"u"&&Td(new ArrayBuffer);function W9(e){return typeof ArrayBuffer>"u"?!1:Td.working?Td(e):e instanceof ArrayBuffer}ht.isArrayBuffer=W9;function kd(e){return tn(e)==="[object DataView]"}kd.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&kd(new DataView(new ArrayBuffer(1),0,1));function Y9(e){return typeof DataView>"u"?!1:kd.working?kd(e):e instanceof DataView}ht.isDataView=Y9;var Ig=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function hh(e){return tn(e)==="[object SharedArrayBuffer]"}function $9(e){return typeof Ig>"u"?!1:(typeof hh.working>"u"&&(hh.working=hh(new Ig)),hh.working?hh(e):e instanceof Ig)}ht.isSharedArrayBuffer=$9;function JH(e){return tn(e)==="[object AsyncFunction]"}ht.isAsyncFunction=JH;function QH(e){return tn(e)==="[object Map Iterator]"}ht.isMapIterator=QH;function ej(e){return tn(e)==="[object Set Iterator]"}ht.isSetIterator=ej;function tj(e){return tn(e)==="[object Generator]"}ht.isGeneratorObject=tj;function rj(e){return tn(e)==="[object WebAssembly.Module]"}ht.isWebAssemblyCompiledModule=rj;function X9(e){return dh(e,BH)}ht.isNumberObject=X9;function J9(e){return dh(e,MH)}ht.isStringObject=J9;function Q9(e){return dh(e,CH)}ht.isBooleanObject=Q9;function e_(e){return K9&&dh(e,G9)}ht.isBigIntObject=e_;function t_(e){return V9&&dh(e,Z9)}ht.isSymbolObject=t_;function ij(e){return X9(e)||J9(e)||Q9(e)||e_(e)||t_(e)}ht.isBoxedPrimitive=ij;function nj(e){return typeof Uint8Array<"u"&&(W9(e)||$9(e))}ht.isAnyArrayBuffer=nj;["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(ht,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})})});var n_=k((uce,i_)=>{v();i_.exports=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"}});var rn=k(dt=>{v();var o_=Object.getOwnPropertyDescriptors||function(t){for(var r=Object.keys(t),i={},n=0;n<r.length;n++)i[r[n]]=Object.getOwnPropertyDescriptor(t,r[n]);return i},oj=/%[sdj%]/g;dt.format=function(e){if(!Ld(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(rs(arguments[r]));return t.join(" ")}for(var r=1,i=arguments,n=i.length,o=String(e).replace(oj,function(s){if(s==="%%")return"%";if(r>=n)return s;switch(s){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":try{return JSON.stringify(i[r++])}catch{return"[Circular]"}default:return s}}),a=i[r];r<n;a=i[++r])Dd(a)||!uc(a)?o+=" "+a:o+=" "+rs(a);return o};dt.deprecate=function(e,t){if(typeof A.default<"u"&&A.default.noDeprecation===!0)return e;if(typeof A.default>"u")return function(){return dt.deprecate(e,t).apply(this,arguments)};var r=!1;function i(){if(!r){if(A.default.throwDeprecation)throw new Error(t);A.default.traceDeprecation?console.trace(t):console.error(t),r=!0}return e.apply(this,arguments)}return i};var Rd={},a_=/^$/;A.default.env.NODE_DEBUG&&(Bd=A.default.env.NODE_DEBUG,Bd=Bd.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),a_=new RegExp("^"+Bd+"$","i"));var Bd;dt.debuglog=function(e){if(e=e.toUpperCase(),!Rd[e])if(a_.test(e)){var t=A.default.pid;Rd[e]=function(){var r=dt.format.apply(dt,arguments);console.error("%s %d: %s",e,t,r)}}else Rd[e]=function(){};return Rd[e]};function rs(e,t){var r={seen:[],stylize:sj};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),kg(t)?r.showHidden=t:t&&dt._extend(r,t),Eu(r.showHidden)&&(r.showHidden=!1),Eu(r.depth)&&(r.depth=2),Eu(r.colors)&&(r.colors=!1),Eu(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=aj),Cd(r,e,r.depth)}dt.inspect=rs;rs.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};rs.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function aj(e,t){var r=rs.styles[t];return r?"\x1B["+rs.colors[r][0]+"m"+e+"\x1B["+rs.colors[r][1]+"m":e}function sj(e,t){return e}function uj(e){var t={};return e.forEach(function(r,i){t[r]=!0}),t}function Cd(e,t,r){if(e.customInspect&&t&&Md(t.inspect)&&t.inspect!==dt.inspect&&!(t.constructor&&t.constructor.prototype===t)){var i=t.inspect(r,e);return Ld(i)||(i=Cd(e,i,r)),i}var n=fj(e,t);if(n)return n;var o=Object.keys(t),a=uj(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),gh(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return Ag(t);if(o.length===0){if(Md(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(ph(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(Nd(t))return e.stylize(Date.prototype.toString.call(t),"date");if(gh(t))return Ag(t)}var u="",c=!1,l=["{","}"];if(s_(t)&&(c=!0,l=["[","]"]),Md(t)){var m=t.name?": "+t.name:"";u=" [Function"+m+"]"}if(ph(t)&&(u=" "+RegExp.prototype.toString.call(t)),Nd(t)&&(u=" "+Date.prototype.toUTCString.call(t)),gh(t)&&(u=" "+Ag(t)),o.length===0&&(!c||t.length==0))return l[0]+u+l[1];if(r<0)return ph(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var w;return c?w=cj(e,t,r,a,o):w=o.map(function(E){return Tg(e,t,r,a,E,c)}),e.seen.pop(),lj(w,u,l)}function fj(e,t){if(Eu(t))return e.stylize("undefined","undefined");if(Ld(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(u_(t))return e.stylize(""+t,"number");if(kg(t))return e.stylize(""+t,"boolean");if(Dd(t))return e.stylize("null","null")}function Ag(e){return"["+Error.prototype.toString.call(e)+"]"}function cj(e,t,r,i,n){for(var o=[],a=0,s=t.length;a<s;++a)f_(t,String(a))?o.push(Tg(e,t,r,i,String(a),!0)):o.push("");return n.forEach(function(u){u.match(/^\d+$/)||o.push(Tg(e,t,r,i,u,!0))}),o}function Tg(e,t,r,i,n,o){var a,s,u;if(u=Object.getOwnPropertyDescriptor(t,n)||{value:t[n]},u.get?u.set?s=e.stylize("[Getter/Setter]","special"):s=e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),f_(i,n)||(a="["+n+"]"),s||(e.seen.indexOf(u.value)<0?(Dd(r)?s=Cd(e,u.value,null):s=Cd(e,u.value,r-1),s.indexOf(`
|
|
3
3
|
`)>-1&&(o?s=s.split(`
|
|
4
4
|
`).map(function(c){return" "+c}).join(`
|
|
5
5
|
`).slice(2):s=`
|
|
@@ -8,15 +8,15 @@ Use Chrome, Firefox or Internet Explorer 11`)}var BU=ot().Buffer,id=globalThis.c
|
|
|
8
8
|
`))):s=e.stylize("[Circular]","special")),Eu(a)){if(o&&n.match(/^\d+$/))return s;a=JSON.stringify(""+n),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.slice(1,-1),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function lj(e,t,r){var i=0,n=e.reduce(function(o,a){return i++,a.indexOf(`
|
|
9
9
|
`)>=0&&i++,o+a.replace(/\u001b\[\d\d?m/g,"").length+1},0);return n>60?r[0]+(t===""?"":t+`
|
|
10
10
|
`)+" "+e.join(`,
|
|
11
|
-
`)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}dt.types=r_();function s_(e){return Array.isArray(e)}dt.isArray=s_;function kg(e){return typeof e=="boolean"}dt.isBoolean=kg;function Dd(e){return e===null}dt.isNull=Dd;function hj(e){return e==null}dt.isNullOrUndefined=hj;function u_(e){return typeof e=="number"}dt.isNumber=u_;function Ld(e){return typeof e=="string"}dt.isString=Ld;function dj(e){return typeof e=="symbol"}dt.isSymbol=dj;function Eu(e){return e===void 0}dt.isUndefined=Eu;function ph(e){return uc(e)&&Rg(e)==="[object RegExp]"}dt.isRegExp=ph;dt.types.isRegExp=ph;function uc(e){return typeof e=="object"&&e!==null}dt.isObject=uc;function Nd(e){return uc(e)&&Rg(e)==="[object Date]"}dt.isDate=Nd;dt.types.isDate=Nd;function gh(e){return uc(e)&&(Rg(e)==="[object Error]"||e instanceof Error)}dt.isError=gh;dt.types.isNativeError=gh;function Md(e){return typeof e=="function"}dt.isFunction=Md;function pj(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}dt.isPrimitive=pj;dt.isBuffer=n_();function Rg(e){return Object.prototype.toString.call(e)}function Pg(e){return e<10?"0"+e.toString(10):e.toString(10)}var gj=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function vj(){var e=new Date,t=[Pg(e.getHours()),Pg(e.getMinutes()),Pg(e.getSeconds())].join(":");return[e.getDate(),gj[e.getMonth()],t].join(" ")}dt.log=function(){console.log("%s - %s",vj(),dt.format.apply(dt,arguments))};dt.inherits=Pe();dt._extend=function(e,t){if(!t||!uc(t))return e;for(var r=Object.keys(t),i=r.length;i--;)e[r[i]]=t[r[i]];return e};function f_(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var xu=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;dt.promisify=function(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');if(xu&&t[xu]){var r=t[xu];if(typeof r!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,xu,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var i,n,o=new Promise(function(u,c){i=u,n=c}),a=[],s=0;s<arguments.length;s++)a.push(arguments[s]);a.push(function(u,c){u?n(u):i(c)});try{t.apply(this,a)}catch(u){n(u)}return o}return Object.setPrototypeOf(r,Object.getPrototypeOf(t)),xu&&Object.defineProperty(r,xu,{value:r,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(r,o_(t))};dt.promisify.custom=xu;function mj(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}function yj(e){if(typeof e!="function")throw new TypeError('The "original" argument must be of type Function');function t(){for(var r=[],i=0;i<arguments.length;i++)r.push(arguments[i]);var n=r.pop();if(typeof n!="function")throw new TypeError("The last argument must be of type Function");var o=this,a=function(){return n.apply(o,arguments)};e.apply(this,r).then(function(s){A.default.nextTick(a.bind(null,null,s))},function(s){A.default.nextTick(mj.bind(null,s,a))})}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,o_(e)),t}dt.callbackify=yj});var g_=k((hce,p_)=>{"use strict";v();function c_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function l_(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?c_(Object(r),!0).forEach(function(i){bj(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c_(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function bj(e,t,r){return t=d_(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _j(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h_(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,d_(i.key),i)}}function wj(e,t,r){return t&&h_(e.prototype,t),r&&h_(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function d_(e){var t=Sj(e,"string");return typeof t=="symbol"?t:String(t)}function Sj(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xj=Kt(),qd=xj.Buffer,Ej=rn(),Bg=Ej.inspect,Ij=Bg&&Bg.custom||"inspect";function Oj(e,t,r){qd.prototype.copy.call(e,t,r)}p_.exports=(function(){function e(){_j(this,e),this.head=null,this.tail=null,this.length=0}return wj(e,[{key:"push",value:function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n}},{key:"concat",value:function(r){if(this.length===0)return qd.alloc(0);for(var i=qd.allocUnsafe(r>>>0),n=this.head,o=0;n;)Oj(n.data,i,o),o+=n.data.length,n=n.next;return i}},{key:"consume",value:function(r,i){var n;return r<this.head.data.length?(n=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?n=this.shift():n=i?this._getString(r):this._getBuffer(r),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var i=this.head,n=1,o=i.data;for(r-=o.length;i=i.next;){var a=i.data,s=r>a.length?a.length:r;if(s===a.length?o+=a:o+=a.slice(0,r),r-=s,r===0){s===a.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=a.slice(s));break}++n}return this.length-=n,o}},{key:"_getBuffer",value:function(r){var i=qd.allocUnsafe(r),n=this.head,o=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var a=n.data,s=r>a.length?a.length:r;if(a.copy(i,i.length-r,0,s),r-=s,r===0){s===a.length?(++o,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=a.slice(s));break}++o}return this.length-=o,i}},{key:Ij,value:function(r,i){return Bg(this,l_(l_({},i),{},{depth:0,customInspect:!1}))}}]),e})()});var Cg=k((pce,m_)=>{"use strict";v();function Aj(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,A.default.nextTick(Mg,this,e)):A.default.nextTick(Mg,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(o){!t&&o?r._writableState?r._writableState.errorEmitted?A.default.nextTick(Ud,r):(r._writableState.errorEmitted=!0,A.default.nextTick(v_,r,o)):A.default.nextTick(v_,r,o):t?(A.default.nextTick(Ud,r),t(o)):A.default.nextTick(Ud,r)}),this)}function v_(e,t){Mg(e,t),Ud(e)}function Ud(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function Pj(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Mg(e,t){e.emit("error",t)}function Tj(e,t){var r=e._readableState,i=e._writableState;r&&r.autoDestroy||i&&i.autoDestroy?e.destroy(t):e.emit("error",t)}m_.exports={destroy:Aj,undestroy:Pj,errorOrDestroy:Tj}});var Iu=k((vce,__)=>{"use strict";v();function kj(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var b_={};function nn(e,t,r){r||(r=Error);function i(o,a,s){return typeof t=="string"?t:t(o,a,s)}var n=(function(o){kj(a,o);function a(s,u,c){return o.call(this,i(s,u,c))||this}return a})(r);n.prototype.name=r.name,n.prototype.code=e,b_[e]=n}function y_(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(i){return String(i)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function Rj(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function Bj(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function Mj(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}nn("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);nn("ERR_INVALID_ARG_TYPE",function(e,t,r){var i;typeof t=="string"&&Rj(t,"not ")?(i="must not be",t=t.replace(/^not /,"")):i="must be";var n;if(Bj(e," argument"))n="The ".concat(e," ").concat(i," ").concat(y_(t,"type"));else{var o=Mj(e,".")?"property":"argument";n='The "'.concat(e,'" ').concat(o," ").concat(i," ").concat(y_(t,"type"))}return n+=". Received type ".concat(typeof r),n},TypeError);nn("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");nn("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});nn("ERR_STREAM_PREMATURE_CLOSE","Premature close");nn("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});nn("ERR_MULTIPLE_CALLBACK","Callback called multiple times");nn("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");nn("ERR_STREAM_WRITE_AFTER_END","write after end");nn("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);nn("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);nn("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");__.exports.codes=b_});var Ng=k((yce,w_)=>{"use strict";v();var Cj=Iu().codes.ERR_INVALID_OPT_VALUE;function Nj(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function Dj(e,t,r,i){var n=Nj(t,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var o=i?r:"highWaterMark";throw new Cj(o,n)}return Math.floor(n)}return e.objectMode?16:16*1024}w_.exports={getHighWaterMark:Dj}});var Lg=k((_ce,S_)=>{v();S_.exports=Lj;function Lj(e,t){if(Dg("noDeprecation"))return e;var r=!1;function i(){if(!r){if(Dg("throwDeprecation"))throw new Error(t);Dg("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}return i}function Dg(e){try{if(!globalThis.localStorage)return!1}catch{return!1}var t=globalThis.localStorage[e];return t==null?!1:String(t).toLowerCase()==="true"}});var Fg=k((Sce,P_)=>{"use strict";v();P_.exports=ur;function E_(e){var t=this;this.next=null,this.entry=null,this.finish=function(){cz(t,e)}}var fc;ur.WritableState=mh;var qj={deprecate:Lg()},I_=Q5(),Hd=Kt().Buffer,Uj=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Fj(e){return Hd.from(e)}function Hj(e){return Hd.isBuffer(e)||e instanceof Uj}var Ug=Cg(),jj=Ng(),zj=jj.getHighWaterMark,is=Iu().codes,Kj=is.ERR_INVALID_ARG_TYPE,Vj=is.ERR_METHOD_NOT_IMPLEMENTED,Gj=is.ERR_MULTIPLE_CALLBACK,Zj=is.ERR_STREAM_CANNOT_PIPE,Wj=is.ERR_STREAM_DESTROYED,Yj=is.ERR_STREAM_NULL_VALUES,$j=is.ERR_STREAM_WRITE_AFTER_END,Xj=is.ERR_UNKNOWN_ENCODING,cc=Ug.errorOrDestroy;Pe()(ur,I_);function Jj(){}function mh(e,t,r){fc=fc||Ou(),e=e||{},typeof r!="boolean"&&(r=t instanceof fc),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=zj(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=e.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){oz(t,n)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new E_(this)}mh.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(mh.prototype,"buffer",{get:qj.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Fd;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Fd=Function.prototype[Symbol.hasInstance],Object.defineProperty(ur,Symbol.hasInstance,{value:function(t){return Fd.call(this,t)?!0:this!==ur?!1:t&&t._writableState instanceof mh}})):Fd=function(t){return t instanceof this};function ur(e){fc=fc||Ou();var t=this instanceof fc;if(!t&&!Fd.call(ur,this))return new ur(e);this._writableState=new mh(e,this,t),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),I_.call(this)}ur.prototype.pipe=function(){cc(this,new Zj)};function Qj(e,t){var r=new $j;cc(e,r),A.default.nextTick(t,r)}function ez(e,t,r,i){var n;return r===null?n=new Yj:typeof r!="string"&&!t.objectMode&&(n=new Kj("chunk",["string","Buffer"],r)),n?(cc(e,n),A.default.nextTick(i,n),!1):!0}ur.prototype.write=function(e,t,r){var i=this._writableState,n=!1,o=!i.objectMode&&Hj(e);return o&&!Hd.isBuffer(e)&&(e=Fj(e)),typeof t=="function"&&(r=t,t=null),o?t="buffer":t||(t=i.defaultEncoding),typeof r!="function"&&(r=Jj),i.ending?Qj(this,r):(o||ez(this,i,e,r))&&(i.pendingcb++,n=rz(this,i,o,e,t,r)),n};ur.prototype.cork=function(){this._writableState.corked++};ur.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&O_(this,e))};ur.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new Xj(t);return this._writableState.defaultEncoding=t,this};Object.defineProperty(ur.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function tz(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=Hd.from(t,r)),t}Object.defineProperty(ur.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function rz(e,t,r,i,n,o){if(!r){var a=tz(t,i,n);i!==a&&(r=!0,n="buffer",i=a)}var s=t.objectMode?1:i.length;t.length+=s;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:o,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else qg(e,t,!1,s,i,n,o);return u}function qg(e,t,r,i,n,o,a){t.writelen=i,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new Wj("write")):r?e._writev(n,t.onwrite):e._write(n,o,t.onwrite),t.sync=!1}function iz(e,t,r,i,n){--t.pendingcb,r?(A.default.nextTick(n,i),A.default.nextTick(vh,e,t),e._writableState.errorEmitted=!0,cc(e,i)):(n(i),e._writableState.errorEmitted=!0,cc(e,i),vh(e,t))}function nz(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function oz(e,t){var r=e._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new Gj;if(nz(r),t)iz(e,r,i,t,n);else{var o=A_(r)||e.destroyed;!o&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&O_(e,r),i?A.default.nextTick(x_,e,r,o,n):x_(e,r,o,n)}}function x_(e,t,r,i){r||az(e,t),t.pendingcb--,i(),vh(e,t)}function az(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function O_(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,n=new Array(i),o=t.corkedRequestsFree;o.entry=r;for(var a=0,s=!0;r;)n[a]=r,r.isBuf||(s=!1),r=r.next,a+=1;n.allBuffers=s,qg(e,t,!0,t.length,n,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new E_(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,l=r.callback,m=t.objectMode?1:u.length;if(qg(e,t,!1,m,u,c,l),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}ur.prototype._write=function(e,t,r){r(new Vj("_write()"))};ur.prototype._writev=null;ur.prototype.end=function(e,t,r){var i=this._writableState;return typeof e=="function"?(r=e,e=null,t=null):typeof t=="function"&&(r=t,t=null),e!=null&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||fz(this,i,r),this};Object.defineProperty(ur.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function A_(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function sz(e,t){e._final(function(r){t.pendingcb--,r&&cc(e,r),t.prefinished=!0,e.emit("prefinish"),vh(e,t)})}function uz(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"&&!t.destroyed?(t.pendingcb++,t.finalCalled=!0,A.default.nextTick(sz,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function vh(e,t){var r=A_(t);if(r&&(uz(e,t),t.pendingcb===0&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return r}function fz(e,t,r){t.ending=!0,vh(e,t),r&&(t.finished?A.default.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function cz(e,t,r){var i=e.entry;for(e.entry=null;i;){var n=i.callback;t.pendingcb--,n(r),i=i.next}t.corkedRequestsFree.next=e}Object.defineProperty(ur.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}});ur.prototype.destroy=Ug.destroy;ur.prototype._undestroy=Ug.undestroy;ur.prototype._destroy=function(e,t){t(e)}});var Ou=k((Ece,k_)=>{"use strict";v();var lz=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};k_.exports=bo;var T_=zg(),jg=Fg();Pe()(bo,T_);for(Hg=lz(jg.prototype),jd=0;jd<Hg.length;jd++)zd=Hg[jd],bo.prototype[zd]||(bo.prototype[zd]=jg.prototype[zd]);var Hg,zd,jd;function bo(e){if(!(this instanceof bo))return new bo(e);T_.call(this,e),jg.call(this,e),this.allowHalfOpen=!0,e&&(e.readable===!1&&(this.readable=!1),e.writable===!1&&(this.writable=!1),e.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",hz)))}Object.defineProperty(bo.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(bo.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(bo.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function hz(){this._writableState.ended||A.default.nextTick(dz,this)}function dz(e){e.end()}Object.defineProperty(bo.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(t){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=t,this._writableState.destroyed=t)}})});var M_=k((Kg,B_)=>{v();var Kd=Kt(),ca=Kd.Buffer;function R_(e,t){for(var r in e)t[r]=e[r]}ca.from&&ca.alloc&&ca.allocUnsafe&&ca.allocUnsafeSlow?B_.exports=Kd:(R_(Kd,Kg),Kg.Buffer=lc);function lc(e,t,r){return ca(e,t,r)}R_(ca,lc);lc.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return ca(e,t,r)};lc.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var i=ca(e);return t!==void 0?typeof r=="string"?i.fill(t,r):i.fill(t):i.fill(0),i};lc.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return ca(e)};lc.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Kd.SlowBuffer(e)}});var hc=k(N_=>{"use strict";v();var Gg=M_().Buffer,C_=Gg.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function pz(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function gz(e){var t=pz(e);if(typeof t!="string"&&(Gg.isEncoding===C_||!C_(e)))throw new Error("Unknown encoding: "+e);return t||e}N_.StringDecoder=yh;function yh(e){this.encoding=gz(e);var t;switch(this.encoding){case"utf16le":this.text=wz,this.end=Sz,t=4;break;case"utf8":this.fillLast=yz,t=4;break;case"base64":this.text=xz,this.end=Ez,t=3;break;default:this.write=Iz,this.end=Oz;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Gg.allocUnsafe(t)}yh.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""};yh.prototype.end=_z;yh.prototype.text=bz;yh.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function Vg(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function vz(e,t,r){var i=t.length-1;if(i<r)return 0;var n=Vg(t[i]);return n>=0?(n>0&&(e.lastNeed=n-1),n):--i<r||n===-2?0:(n=Vg(t[i]),n>=0?(n>0&&(e.lastNeed=n-2),n):--i<r||n===-2?0:(n=Vg(t[i]),n>=0?(n>0&&(n===2?n=0:e.lastNeed=n-3),n):0))}function mz(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function yz(e){var t=this.lastTotal-this.lastNeed,r=mz(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function bz(e,t){var r=vz(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)}function _z(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function wz(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function Sz(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function xz(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function Ez(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function Iz(e){return e.toString(this.encoding)}function Oz(e){return e&&e.length?this.write(e):""}});var Vd=k((Tce,q_)=>{"use strict";v();var D_=Iu().codes.ERR_STREAM_PREMATURE_CLOSE;function Az(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];e.apply(this,i)}}}function Pz(){}function Tz(e){return e.setHeader&&typeof e.abort=="function"}function L_(e,t,r){if(typeof t=="function")return L_(e,null,t);t||(t={}),r=Az(r||Pz);var i=t.readable||t.readable!==!1&&e.readable,n=t.writable||t.writable!==!1&&e.writable,o=function(){e.writable||s()},a=e._writableState&&e._writableState.finished,s=function(){n=!1,a=!0,i||r.call(e)},u=e._readableState&&e._readableState.endEmitted,c=function(){i=!1,u=!0,n||r.call(e)},l=function(P){r.call(e,P)},m=function(){var P;if(i&&!u)return(!e._readableState||!e._readableState.ended)&&(P=new D_),r.call(e,P);if(n&&!a)return(!e._writableState||!e._writableState.ended)&&(P=new D_),r.call(e,P)},w=function(){e.req.on("finish",s)};return Tz(e)?(e.on("complete",s),e.on("abort",m),e.req?w():e.on("request",w)):n&&!e._writableState&&(e.on("end",o),e.on("close",o)),e.on("end",c),e.on("finish",s),t.error!==!1&&e.on("error",l),e.on("close",m),function(){e.removeListener("complete",s),e.removeListener("abort",m),e.removeListener("request",w),e.req&&e.req.removeListener("finish",s),e.removeListener("end",o),e.removeListener("close",o),e.removeListener("finish",s),e.removeListener("end",c),e.removeListener("error",l),e.removeListener("close",m)}}q_.exports=L_});var F_=k((Rce,U_)=>{"use strict";v();var Gd;function ns(e,t,r){return t=kz(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kz(e){var t=Rz(e,"string");return typeof t=="symbol"?t:String(t)}function Rz(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Bz=Vd(),os=Symbol("lastResolve"),Au=Symbol("lastReject"),bh=Symbol("error"),Zd=Symbol("ended"),Pu=Symbol("lastPromise"),Zg=Symbol("handlePromise"),Tu=Symbol("stream");function as(e,t){return{value:e,done:t}}function Mz(e){var t=e[os];if(t!==null){var r=e[Tu].read();r!==null&&(e[Pu]=null,e[os]=null,e[Au]=null,t(as(r,!1)))}}function Cz(e){A.default.nextTick(Mz,e)}function Nz(e,t){return function(r,i){e.then(function(){if(t[Zd]){r(as(void 0,!0));return}t[Zg](r,i)},i)}}var Dz=Object.getPrototypeOf(function(){}),Lz=Object.setPrototypeOf((Gd={get stream(){return this[Tu]},next:function(){var t=this,r=this[bh];if(r!==null)return Promise.reject(r);if(this[Zd])return Promise.resolve(as(void 0,!0));if(this[Tu].destroyed)return new Promise(function(a,s){A.default.nextTick(function(){t[bh]?s(t[bh]):a(as(void 0,!0))})});var i=this[Pu],n;if(i)n=new Promise(Nz(i,this));else{var o=this[Tu].read();if(o!==null)return Promise.resolve(as(o,!1));n=new Promise(this[Zg])}return this[Pu]=n,n}},ns(Gd,Symbol.asyncIterator,function(){return this}),ns(Gd,"return",function(){var t=this;return new Promise(function(r,i){t[Tu].destroy(null,function(n){if(n){i(n);return}r(as(void 0,!0))})})}),Gd),Dz),qz=function(t){var r,i=Object.create(Lz,(r={},ns(r,Tu,{value:t,writable:!0}),ns(r,os,{value:null,writable:!0}),ns(r,Au,{value:null,writable:!0}),ns(r,bh,{value:null,writable:!0}),ns(r,Zd,{value:t._readableState.endEmitted,writable:!0}),ns(r,Zg,{value:function(o,a){var s=i[Tu].read();s?(i[Pu]=null,i[os]=null,i[Au]=null,o(as(s,!1))):(i[os]=o,i[Au]=a)},writable:!0}),r));return i[Pu]=null,Bz(t,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var o=i[Au];o!==null&&(i[Pu]=null,i[os]=null,i[Au]=null,o(n)),i[bh]=n;return}var a=i[os];a!==null&&(i[Pu]=null,i[os]=null,i[Au]=null,a(as(void 0,!0))),i[Zd]=!0}),t.on("readable",Cz.bind(null,i)),i};U_.exports=qz});var j_=k((Mce,H_)=>{v();H_.exports=function(){throw new Error("Readable.from is not available in the browser")}});var zg=k((Dce,J_)=>{"use strict";v();J_.exports=xt;var dc;xt.ReadableState=G_;var Nce=Qf().EventEmitter,V_=function(t,r){return t.listeners(r).length},wh=Q5(),Wd=Kt().Buffer,Uz=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Fz(e){return Wd.from(e)}function Hz(e){return Wd.isBuffer(e)||e instanceof Uz}var Wg=rn(),ct;Wg&&Wg.debuglog?ct=Wg.debuglog("stream"):ct=function(){};var jz=g_(),tv=Cg(),zz=Ng(),Kz=zz.getHighWaterMark,Yd=Iu().codes,Vz=Yd.ERR_INVALID_ARG_TYPE,Gz=Yd.ERR_STREAM_PUSH_AFTER_EOF,Zz=Yd.ERR_METHOD_NOT_IMPLEMENTED,Wz=Yd.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,pc,Yg,$g;Pe()(xt,wh);var _h=tv.errorOrDestroy,Xg=["error","close","destroy","pause","resume"];function Yz(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function G_(e,t,r){dc=dc||Ou(),e=e||{},typeof r!="boolean"&&(r=t instanceof dc),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=Kz(this,e,"readableHighWaterMark",r),this.buffer=new jz,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(pc||(pc=hc().StringDecoder),this.decoder=new pc(e.encoding),this.encoding=e.encoding)}function xt(e){if(dc=dc||Ou(),!(this instanceof xt))return new xt(e);var t=this instanceof dc;this._readableState=new G_(e,this,t),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),wh.call(this)}Object.defineProperty(xt.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});xt.prototype.destroy=tv.destroy;xt.prototype._undestroy=tv.undestroy;xt.prototype._destroy=function(e,t){t(e)};xt.prototype.push=function(e,t){var r=this._readableState,i;return r.objectMode?i=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=Wd.from(e,t),t=""),i=!0),Z_(this,e,t,!1,i)};xt.prototype.unshift=function(e){return Z_(this,e,null,!0,!1)};function Z_(e,t,r,i,n){ct("readableAddChunk",t);var o=e._readableState;if(t===null)o.reading=!1,Jz(e,o);else{var a;if(n||(a=$z(o,t)),a)_h(e,a);else if(o.objectMode||t&&t.length>0)if(typeof t!="string"&&!o.objectMode&&Object.getPrototypeOf(t)!==Wd.prototype&&(t=Fz(t)),i)o.endEmitted?_h(e,new Wz):Jg(e,o,t,!0);else if(o.ended)_h(e,new Gz);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||t.length!==0?Jg(e,o,t,!1):ev(e,o)):Jg(e,o,t,!1)}else i||(o.reading=!1,ev(e,o))}return!o.ended&&(o.length<o.highWaterMark||o.length===0)}function Jg(e,t,r,i){t.flowing&&t.length===0&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&$d(e)),ev(e,t)}function $z(e,t){var r;return!Hz(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new Vz("chunk",["string","Buffer","Uint8Array"],t)),r}xt.prototype.isPaused=function(){return this._readableState.flowing===!1};xt.prototype.setEncoding=function(e){pc||(pc=hc().StringDecoder);var t=new pc(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var z_=1073741824;function Xz(e){return e>=z_?e=z_:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function K_(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=Xz(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}xt.prototype.read=function(e){ct("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended))return ct("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?Qg(this):$d(this),null;if(e=K_(e,t),e===0&&t.ended)return t.length===0&&Qg(this),null;var i=t.needReadable;ct("need readable",i),(t.length===0||t.length-e<t.highWaterMark)&&(i=!0,ct("length less than watermark",i)),t.ended||t.reading?(i=!1,ct("reading or ended",i)):i&&(ct("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=K_(r,t)));var n;return e>0?n=$_(e,t):n=null,n===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&Qg(this)),n!==null&&this.emit("data",n),n};function Jz(e,t){if(ct("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?$d(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,W_(e)))}}function $d(e){var t=e._readableState;ct("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(ct("emitReadable",t.flowing),t.emittedReadable=!0,A.default.nextTick(W_,e))}function W_(e){var t=e._readableState;ct("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,rv(e)}function ev(e,t){t.readingMore||(t.readingMore=!0,A.default.nextTick(Qz,e,t))}function Qz(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&t.length===0);){var r=t.length;if(ct("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}xt.prototype._read=function(e){_h(this,new Zz("_read()"))};xt.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e);break}i.pipesCount+=1,ct("pipe count=%d opts=%j",i.pipesCount,t);var n=(!t||t.end!==!1)&&e!==A.default.stdout&&e!==A.default.stderr,o=n?s:M;i.endEmitted?A.default.nextTick(o):r.once("end",o),e.on("unpipe",a);function a(D,L){ct("onunpipe"),D===r&&L&&L.hasUnpiped===!1&&(L.hasUnpiped=!0,l())}function s(){ct("onend"),e.end()}var u=eK(r);e.on("drain",u);var c=!1;function l(){ct("cleanup"),e.removeListener("close",E),e.removeListener("finish",P),e.removeListener("drain",u),e.removeListener("error",w),e.removeListener("unpipe",a),r.removeListener("end",s),r.removeListener("end",M),r.removeListener("data",m),c=!0,i.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u()}r.on("data",m);function m(D){ct("ondata");var L=e.write(D);ct("dest.write",L),L===!1&&((i.pipesCount===1&&i.pipes===e||i.pipesCount>1&&X_(i.pipes,e)!==-1)&&!c&&(ct("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function w(D){ct("onerror",D),M(),e.removeListener("error",w),V_(e,"error")===0&&_h(e,D)}Yz(e,"error",w);function E(){e.removeListener("finish",P),M()}e.once("close",E);function P(){ct("onfinish"),e.removeListener("close",E),M()}e.once("finish",P);function M(){ct("unpipe"),r.unpipe(e)}return e.emit("pipe",r),i.flowing||(ct("pipe resume"),r.resume()),e};function eK(e){return function(){var r=e._readableState;ct("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&V_(e,"data")&&(r.flowing=!0,rv(e))}}xt.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<n;o++)i[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=X_(t.pipes,e);return a===-1?this:(t.pipes.splice(a,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)};xt.prototype.on=function(e,t){var r=wh.prototype.on.call(this,e,t),i=this._readableState;return e==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):e==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,ct("on readable",i.length,i.reading),i.length?$d(this):i.reading||A.default.nextTick(tK,this)),r};xt.prototype.addListener=xt.prototype.on;xt.prototype.removeListener=function(e,t){var r=wh.prototype.removeListener.call(this,e,t);return e==="readable"&&A.default.nextTick(Y_,this),r};xt.prototype.removeAllListeners=function(e){var t=wh.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&A.default.nextTick(Y_,this),t};function Y_(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function tK(e){ct("readable nexttick read 0"),e.read(0)}xt.prototype.resume=function(){var e=this._readableState;return e.flowing||(ct("resume"),e.flowing=!e.readableListening,rK(this,e)),e.paused=!1,this};function rK(e,t){t.resumeScheduled||(t.resumeScheduled=!0,A.default.nextTick(iK,e,t))}function iK(e,t){ct("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),rv(e),t.flowing&&!t.reading&&e.read(0)}xt.prototype.pause=function(){return ct("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(ct("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function rv(e){var t=e._readableState;for(ct("flow",t.flowing);t.flowing&&e.read()!==null;);}xt.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;e.on("end",function(){if(ct("wrapped end"),r.decoder&&!r.ended){var a=r.decoder.end();a&&a.length&&t.push(a)}t.push(null)}),e.on("data",function(a){if(ct("wrapped data"),r.decoder&&(a=r.decoder.write(a)),!(r.objectMode&&a==null)&&!(!r.objectMode&&(!a||!a.length))){var s=t.push(a);s||(i=!0,e.pause())}});for(var n in e)this[n]===void 0&&typeof e[n]=="function"&&(this[n]=(function(s){return function(){return e[s].apply(e,arguments)}})(n));for(var o=0;o<Xg.length;o++)e.on(Xg[o],this.emit.bind(this,Xg[o]));return this._read=function(a){ct("wrapped _read",a),i&&(i=!1,e.resume())},this};typeof Symbol=="function"&&(xt.prototype[Symbol.asyncIterator]=function(){return Yg===void 0&&(Yg=F_()),Yg(this)});Object.defineProperty(xt.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(xt.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(xt.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}});xt._fromList=$_;Object.defineProperty(xt.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function $_(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.first():r=t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function Qg(e){var t=e._readableState;ct("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,A.default.nextTick(nK,t,e))}function nK(e,t){if(ct("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}typeof Symbol=="function"&&(xt.from=function(e,t){return $g===void 0&&($g=j_()),$g(xt,e,t)});function X_(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}});var iv=k((qce,ew)=>{"use strict";v();ew.exports=la;var Xd=Iu().codes,oK=Xd.ERR_METHOD_NOT_IMPLEMENTED,aK=Xd.ERR_MULTIPLE_CALLBACK,sK=Xd.ERR_TRANSFORM_ALREADY_TRANSFORMING,uK=Xd.ERR_TRANSFORM_WITH_LENGTH_0,Jd=Ou();Pe()(la,Jd);function fK(e,t){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new aK);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),i(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function la(e){if(!(this instanceof la))return new la(e);Jd.call(this,e),this._transformState={afterTransform:fK.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",cK)}function cK(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){Q_(e,t,r)}):Q_(this,null,null)}la.prototype.push=function(e,t){return this._transformState.needTransform=!1,Jd.prototype.push.call(this,e,t)};la.prototype._transform=function(e,t,r){r(new oK("_transform()"))};la.prototype._write=function(e,t,r){var i=this._transformState;if(i.writecb=r,i.writechunk=e,i.writeencoding=t,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};la.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};la.prototype._destroy=function(e,t){Jd.prototype._destroy.call(this,e,function(r){t(r)})};function Q_(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new uK;if(e._transformState.transforming)throw new sK;return e.push(null)}});var iw=k((Fce,rw)=>{"use strict";v();rw.exports=Sh;var tw=iv();Pe()(Sh,tw);function Sh(e){if(!(this instanceof Sh))return new Sh(e);tw.call(this,e)}Sh.prototype._transform=function(e,t,r){r(null,e)}});var uw=k((jce,sw)=>{"use strict";v();var nv;function lK(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var aw=Iu().codes,hK=aw.ERR_MISSING_ARGS,dK=aw.ERR_STREAM_DESTROYED;function nw(e){if(e)throw e}function pK(e){return e.setHeader&&typeof e.abort=="function"}function gK(e,t,r,i){i=lK(i);var n=!1;e.on("close",function(){n=!0}),nv===void 0&&(nv=Vd()),nv(e,{readable:t,writable:r},function(a){if(a)return i(a);n=!0,i()});var o=!1;return function(a){if(!n&&!o){if(o=!0,pK(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();i(a||new dK("pipe"))}}}function ow(e){e()}function vK(e,t){return e.pipe(t)}function mK(e){return!e.length||typeof e[e.length-1]!="function"?nw:e.pop()}function yK(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=mK(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new hK("streams");var n,o=t.map(function(a,s){var u=s<t.length-1,c=s>0;return gK(a,u,c,function(l){n||(n=l),l&&o.forEach(ow),!u&&(o.forEach(ow),i(n))})});return t.reduce(vK)}sw.exports=yK});var Qd=k((Kce,fw)=>{v();fw.exports=on;var ov=Qf().EventEmitter,bK=Pe();bK(on,ov);on.Readable=zg();on.Writable=Fg();on.Duplex=Ou();on.Transform=iv();on.PassThrough=iw();on.finished=Vd();on.pipeline=uw();on.Stream=on;function on(){ov.call(this)}on.prototype.pipe=function(e,t){var r=this;function i(l){e.writable&&e.write(l)===!1&&r.pause&&r.pause()}r.on("data",i);function n(){r.readable&&r.resume&&r.resume()}e.on("drain",n),!e._isStdio&&(!t||t.end!==!1)&&(r.on("end",a),r.on("close",s));var o=!1;function a(){o||(o=!0,e.end())}function s(){o||(o=!0,typeof e.destroy=="function"&&e.destroy())}function u(l){if(c(),ov.listenerCount(this,"error")===0)throw l}r.on("error",u),e.on("error",u);function c(){r.removeListener("data",i),e.removeListener("drain",n),r.removeListener("end",a),r.removeListener("close",s),r.removeListener("error",u),e.removeListener("error",u),r.removeListener("end",c),r.removeListener("close",c),e.removeListener("close",c)}return r.on("end",c),r.on("close",c),e.on("close",c),e.emit("pipe",r),e}});var hw=k((Gce,lw)=>{"use strict";v();var _o=ot().Buffer,cw=Qd().Transform,_K=Pe();function ss(e){cw.call(this),this._block=_o.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}_K(ss,cw);ss.prototype._transform=function(e,t,r){var i=null;try{this.update(e,t)}catch(n){i=n}r(i)};ss.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(r){t=r}e(t)};var wK=typeof Uint8Array<"u",SK=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&ArrayBuffer.isView&&(_o.prototype instanceof Uint8Array||_o.TYPED_ARRAY_SUPPORT);function xK(e,t){if(e instanceof _o)return e;if(typeof e=="string")return _o.from(e,t);if(SK&&ArrayBuffer.isView(e)){if(e.byteLength===0)return _o.alloc(0);var r=_o.from(e.buffer,e.byteOffset,e.byteLength);if(r.byteLength===e.byteLength)return r}if(wK&&e instanceof Uint8Array||_o.isBuffer(e)&&e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e))return _o.from(e);throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}ss.prototype.update=function(e,t){if(this._finalized)throw new Error("Digest already called");e=xK(e,t);for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var n=this._blockOffset;n<this._blockSize;)r[n++]=e[i++];this._update(),this._blockOffset=0}for(;i<e.length;)r[this._blockOffset++]=e[i++];for(var o=0,a=e.length*8;a>0;++o)this._length[o]+=a,a=this._length[o]/4294967296|0,a>0&&(this._length[o]-=4294967296*a);return this};ss.prototype._update=function(){throw new Error("_update is not implemented")};ss.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();e!==void 0&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t};ss.prototype._digest=function(){throw new Error("_digest is not implemented")};lw.exports=ss});var r2=k((Wce,pw)=>{"use strict";v();var EK=Pe(),dw=hw(),IK=ot().Buffer,OK=new Array(16);function e2(){dw.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}EK(e2,dw);e2.prototype._update=function(){for(var e=OK,t=0;t<16;++t)e[t]=this._block.readInt32LE(t*4);var r=this._a,i=this._b,n=this._c,o=this._d;r=si(r,i,n,o,e[0],3614090360,7),o=si(o,r,i,n,e[1],3905402710,12),n=si(n,o,r,i,e[2],606105819,17),i=si(i,n,o,r,e[3],3250441966,22),r=si(r,i,n,o,e[4],4118548399,7),o=si(o,r,i,n,e[5],1200080426,12),n=si(n,o,r,i,e[6],2821735955,17),i=si(i,n,o,r,e[7],4249261313,22),r=si(r,i,n,o,e[8],1770035416,7),o=si(o,r,i,n,e[9],2336552879,12),n=si(n,o,r,i,e[10],4294925233,17),i=si(i,n,o,r,e[11],2304563134,22),r=si(r,i,n,o,e[12],1804603682,7),o=si(o,r,i,n,e[13],4254626195,12),n=si(n,o,r,i,e[14],2792965006,17),i=si(i,n,o,r,e[15],1236535329,22),r=ui(r,i,n,o,e[1],4129170786,5),o=ui(o,r,i,n,e[6],3225465664,9),n=ui(n,o,r,i,e[11],643717713,14),i=ui(i,n,o,r,e[0],3921069994,20),r=ui(r,i,n,o,e[5],3593408605,5),o=ui(o,r,i,n,e[10],38016083,9),n=ui(n,o,r,i,e[15],3634488961,14),i=ui(i,n,o,r,e[4],3889429448,20),r=ui(r,i,n,o,e[9],568446438,5),o=ui(o,r,i,n,e[14],3275163606,9),n=ui(n,o,r,i,e[3],4107603335,14),i=ui(i,n,o,r,e[8],1163531501,20),r=ui(r,i,n,o,e[13],2850285829,5),o=ui(o,r,i,n,e[2],4243563512,9),n=ui(n,o,r,i,e[7],1735328473,14),i=ui(i,n,o,r,e[12],2368359562,20),r=fi(r,i,n,o,e[5],4294588738,4),o=fi(o,r,i,n,e[8],2272392833,11),n=fi(n,o,r,i,e[11],1839030562,16),i=fi(i,n,o,r,e[14],4259657740,23),r=fi(r,i,n,o,e[1],2763975236,4),o=fi(o,r,i,n,e[4],1272893353,11),n=fi(n,o,r,i,e[7],4139469664,16),i=fi(i,n,o,r,e[10],3200236656,23),r=fi(r,i,n,o,e[13],681279174,4),o=fi(o,r,i,n,e[0],3936430074,11),n=fi(n,o,r,i,e[3],3572445317,16),i=fi(i,n,o,r,e[6],76029189,23),r=fi(r,i,n,o,e[9],3654602809,4),o=fi(o,r,i,n,e[12],3873151461,11),n=fi(n,o,r,i,e[15],530742520,16),i=fi(i,n,o,r,e[2],3299628645,23),r=ci(r,i,n,o,e[0],4096336452,6),o=ci(o,r,i,n,e[7],1126891415,10),n=ci(n,o,r,i,e[14],2878612391,15),i=ci(i,n,o,r,e[5],4237533241,21),r=ci(r,i,n,o,e[12],1700485571,6),o=ci(o,r,i,n,e[3],2399980690,10),n=ci(n,o,r,i,e[10],4293915773,15),i=ci(i,n,o,r,e[1],2240044497,21),r=ci(r,i,n,o,e[8],1873313359,6),o=ci(o,r,i,n,e[15],4264355552,10),n=ci(n,o,r,i,e[6],2734768916,15),i=ci(i,n,o,r,e[13],1309151649,21),r=ci(r,i,n,o,e[4],4149444226,6),o=ci(o,r,i,n,e[11],3174756917,10),n=ci(n,o,r,i,e[2],718787259,15),i=ci(i,n,o,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+i|0,this._c=this._c+n|0,this._d=this._d+o|0};e2.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=IK.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e};function t2(e,t){return e<<t|e>>>32-t}function si(e,t,r,i,n,o,a){return t2(e+(t&r|~t&i)+n+o|0,a)+t|0}function ui(e,t,r,i,n,o,a){return t2(e+(t&i|r&~i)+n+o|0,a)+t|0}function fi(e,t,r,i,n,o,a){return t2(e+(t^r^i)+n+o|0,a)+t|0}function ci(e,t,r,i,n,o,a){return t2(e+(r^(t|~i))+n+o|0,a)+t|0}pw.exports=e2});var vw=k(($ce,gw)=>{v();var AK={}.toString;gw.exports=Array.isArray||function(e){return AK.call(e)=="[object Array]"}});var yw=k((Jce,mw)=>{"use strict";v();var PK=_u(),TK=ts(),kK=TK("TypedArray.prototype.buffer",!0),RK=Eg();mw.exports=kK||function(t){if(!RK(t))throw new PK("Not a Typed Array");return t.buffer}});var xh=k((ele,_w)=>{"use strict";v();var Tn=ot().Buffer,BK=vw(),MK=yw(),CK=ArrayBuffer.isView||function(t){try{return MK(t),!0}catch{return!1}},NK=typeof Uint8Array<"u",bw=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",DK=bw&&(Tn.prototype instanceof Uint8Array||Tn.TYPED_ARRAY_SUPPORT);_w.exports=function(t,r){if(Tn.isBuffer(t))return t.constructor&&!("isBuffer"in t)?Tn.from(t):t;if(typeof t=="string")return Tn.from(t,r);if(bw&&CK(t)){if(t.byteLength===0)return Tn.alloc(0);if(DK){var i=Tn.from(t.buffer,t.byteOffset,t.byteLength);if(i.byteLength===t.byteLength)return i}var n=t instanceof Uint8Array?t:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),o=Tn.from(n);if(o.length===t.byteLength)return o}if(NK&&t instanceof Uint8Array)return Tn.from(t);var a=BK(t);if(a)for(var s=0;s<t.length;s+=1){var u=t[s];if(typeof u!="number"||u<0||u>255||~~u!==u)throw new RangeError("Array items must be numbers in the range 0-255.")}if(a||Tn.isBuffer(t)&&t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t))return Tn.from(t);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')}});var Ew=k((rle,xw)=>{"use strict";v();var LK=ot().Buffer,qK=xh(),Sw=typeof Uint8Array<"u",UK=Sw&&typeof ArrayBuffer<"u",ww=UK&&ArrayBuffer.isView;xw.exports=function(e,t){if(typeof e=="string"||LK.isBuffer(e)||Sw&&e instanceof Uint8Array||ww&&ww(e))return qK(e,t);throw new TypeError('The "data" argument must be a string, a Buffer, a Uint8Array, or a DataView')}});var Eh=k((nle,av)=>{"use strict";v();typeof A.default>"u"||!A.default.version||A.default.version.indexOf("v0.")===0||A.default.version.indexOf("v1.")===0&&A.default.version.indexOf("v1.8.")!==0?av.exports={nextTick:FK}:av.exports=A.default;function FK(e,t,r,i){if(typeof e!="function")throw new TypeError('"callback" argument must be a function');var n=arguments.length,o,a;switch(n){case 0:case 1:return A.default.nextTick(e);case 2:return A.default.nextTick(function(){e.call(null,t)});case 3:return A.default.nextTick(function(){e.call(null,t,r)});case 4:return A.default.nextTick(function(){e.call(null,t,r,i)});default:for(o=new Array(n-1),a=0;a<o.length;)o[a++]=arguments[a];return A.default.nextTick(function(){e.apply(null,o)})}}});var Ow=k((ale,Iw)=>{v();var HK={}.toString;Iw.exports=Array.isArray||function(e){return HK.call(e)=="[object Array]"}});var sv=k((ule,Aw)=>{v();Aw.exports=Qf().EventEmitter});var n2=k((uv,Tw)=>{v();var i2=Kt(),ha=i2.Buffer;function Pw(e,t){for(var r in e)t[r]=e[r]}ha.from&&ha.alloc&&ha.allocUnsafe&&ha.allocUnsafeSlow?Tw.exports=i2:(Pw(i2,uv),uv.Buffer=gc);function gc(e,t,r){return ha(e,t,r)}Pw(ha,gc);gc.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return ha(e,t,r)};gc.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var i=ha(e);return t!==void 0?typeof r=="string"?i.fill(t,r):i.fill(t):i.fill(0),i};gc.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return ha(e)};gc.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return i2.SlowBuffer(e)}});var vc=k(li=>{v();function jK(e){return Array.isArray?Array.isArray(e):o2(e)==="[object Array]"}li.isArray=jK;function zK(e){return typeof e=="boolean"}li.isBoolean=zK;function KK(e){return e===null}li.isNull=KK;function VK(e){return e==null}li.isNullOrUndefined=VK;function GK(e){return typeof e=="number"}li.isNumber=GK;function ZK(e){return typeof e=="string"}li.isString=ZK;function WK(e){return typeof e=="symbol"}li.isSymbol=WK;function YK(e){return e===void 0}li.isUndefined=YK;function $K(e){return o2(e)==="[object RegExp]"}li.isRegExp=$K;function XK(e){return typeof e=="object"&&e!==null}li.isObject=XK;function JK(e){return o2(e)==="[object Date]"}li.isDate=JK;function QK(e){return o2(e)==="[object Error]"||e instanceof Error}li.isError=QK;function eV(e){return typeof e=="function"}li.isFunction=eV;function tV(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}li.isPrimitive=tV;li.isBuffer=Kt().Buffer.isBuffer;function o2(e){return Object.prototype.toString.call(e)}});var Rw=k((dle,fv)=>{"use strict";v();function rV(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var kw=n2().Buffer,Ih=rn();function iV(e,t,r){e.copy(t,r)}fv.exports=(function(){function e(){rV(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length},e.prototype.unshift=function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length},e.prototype.shift=function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n},e.prototype.concat=function(r){if(this.length===0)return kw.alloc(0);for(var i=kw.allocUnsafe(r>>>0),n=this.head,o=0;n;)iV(n.data,i,o),o+=n.data.length,n=n.next;return i},e})();Ih&&Ih.inspect&&Ih.inspect.custom&&(fv.exports.prototype[Ih.inspect.custom]=function(){var e=Ih.inspect({length:this.length});return this.constructor.name+" "+e})});var cv=k((gle,Bw)=>{"use strict";v();var a2=Eh();function nV(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,a2.nextTick(s2,this,e)):a2.nextTick(s2,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(o){!t&&o?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,a2.nextTick(s2,r,o)):a2.nextTick(s2,r,o):t&&t(o)}),this)}function oV(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function s2(e,t){e.emit("error",t)}Bw.exports={destroy:nV,undestroy:oV}});var hv=k((mle,Fw)=>{"use strict";v();var ku=Eh();Fw.exports=yr;function Cw(e){var t=this;this.next=null,this.entry=null,this.finish=function(){xV(t,e)}}var aV=!A.default.browser&&["v0.10","v0.9."].indexOf(A.default.version.slice(0,5))>-1?setImmediate:ku.nextTick,mc;yr.WritableState=Ah;var Nw=Object.create(vc());Nw.inherits=Pe();var sV={deprecate:Lg()},Dw=sv(),f2=n2().Buffer,uV=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function fV(e){return f2.from(e)}function cV(e){return f2.isBuffer(e)||e instanceof uV}var Lw=cv();Nw.inherits(yr,Dw);function lV(){}function Ah(e,t){mc=mc||Ru(),e=e||{};var r=t instanceof mc;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,n=e.writableHighWaterMark,o=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=o,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=e.decodeStrings===!1;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(s){yV(t,s)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new Cw(this)}Ah.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(Ah.prototype,"buffer",{get:sV.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var u2;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(u2=Function.prototype[Symbol.hasInstance],Object.defineProperty(yr,Symbol.hasInstance,{value:function(e){return u2.call(this,e)?!0:this!==yr?!1:e&&e._writableState instanceof Ah}})):u2=function(e){return e instanceof this};function yr(e){if(mc=mc||Ru(),!u2.call(yr,this)&&!(this instanceof mc))return new yr(e);this._writableState=new Ah(e,this),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),Dw.call(this)}yr.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function hV(e,t){var r=new Error("write after end");e.emit("error",r),ku.nextTick(t,r)}function dV(e,t,r,i){var n=!0,o=!1;return r===null?o=new TypeError("May not write null values to stream"):typeof r!="string"&&r!==void 0&&!t.objectMode&&(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),ku.nextTick(i,o),n=!1),n}yr.prototype.write=function(e,t,r){var i=this._writableState,n=!1,o=!i.objectMode&&cV(e);return o&&!f2.isBuffer(e)&&(e=fV(e)),typeof t=="function"&&(r=t,t=null),o?t="buffer":t||(t=i.defaultEncoding),typeof r!="function"&&(r=lV),i.ended?hV(this,r):(o||dV(this,i,e,r))&&(i.pendingcb++,n=gV(this,i,o,e,t,r)),n};yr.prototype.cork=function(){var e=this._writableState;e.corked++};yr.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&qw(this,e))};yr.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this};function pV(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=f2.from(t,r)),t}Object.defineProperty(yr.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function gV(e,t,r,i,n,o){if(!r){var a=pV(t,i,n);i!==a&&(r=!0,n="buffer",i=a)}var s=t.objectMode?1:i.length;t.length+=s;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:o,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else lv(e,t,!1,s,i,n,o);return u}function lv(e,t,r,i,n,o,a){t.writelen=i,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(n,t.onwrite):e._write(n,o,t.onwrite),t.sync=!1}function vV(e,t,r,i,n){--t.pendingcb,r?(ku.nextTick(n,i),ku.nextTick(Oh,e,t),e._writableState.errorEmitted=!0,e.emit("error",i)):(n(i),e._writableState.errorEmitted=!0,e.emit("error",i),Oh(e,t))}function mV(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function yV(e,t){var r=e._writableState,i=r.sync,n=r.writecb;if(mV(r),t)vV(e,r,i,t,n);else{var o=Uw(r);!o&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&qw(e,r),i?aV(Mw,e,r,o,n):Mw(e,r,o,n)}}function Mw(e,t,r,i){r||bV(e,t),t.pendingcb--,i(),Oh(e,t)}function bV(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function qw(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,n=new Array(i),o=t.corkedRequestsFree;o.entry=r;for(var a=0,s=!0;r;)n[a]=r,r.isBuf||(s=!1),r=r.next,a+=1;n.allBuffers=s,lv(e,t,!0,t.length,n,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new Cw(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,l=r.callback,m=t.objectMode?1:u.length;if(lv(e,t,!1,m,u,c,l),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}yr.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))};yr.prototype._writev=null;yr.prototype.end=function(e,t,r){var i=this._writableState;typeof e=="function"?(r=e,e=null,t=null):typeof t=="function"&&(r=t,t=null),e!=null&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||SV(this,i,r)};function Uw(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function _V(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),Oh(e,t)})}function wV(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"?(t.pendingcb++,t.finalCalled=!0,ku.nextTick(_V,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function Oh(e,t){var r=Uw(t);return r&&(wV(e,t),t.pendingcb===0&&(t.finished=!0,e.emit("finish"))),r}function SV(e,t,r){t.ending=!0,Oh(e,t),r&&(t.finished?ku.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function xV(e,t,r){var i=e.entry;for(e.entry=null;i;){var n=i.callback;t.pendingcb--,n(r),i=i.next}t.corkedRequestsFree.next=e}Object.defineProperty(yr.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});yr.prototype.destroy=Lw.destroy;yr.prototype._undestroy=Lw.undestroy;yr.prototype._destroy=function(e,t){this.end(),t(e)}});var Ru=k((ble,Kw)=>{"use strict";v();var Hw=Eh(),EV=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};Kw.exports=da;var jw=Object.create(vc());jw.inherits=Pe();var zw=gv(),pv=hv();jw.inherits(da,zw);for(dv=EV(pv.prototype),c2=0;c2<dv.length;c2++)l2=dv[c2],da.prototype[l2]||(da.prototype[l2]=pv.prototype[l2]);var dv,l2,c2;function da(e){if(!(this instanceof da))return new da(e);zw.call(this,e),pv.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",IV)}Object.defineProperty(da.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function IV(){this.allowHalfOpen||this._writableState.ended||Hw.nextTick(OV,this)}function OV(e){e.end()}Object.defineProperty(da.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}});da.prototype._destroy=function(e,t){this.push(null),this.end(),Hw.nextTick(t,e)}});var gv=k((Sle,rS)=>{"use strict";v();var bc=Eh();rS.exports=Wt;var AV=Ow(),Ph;Wt.ReadableState=Xw;var wle=Qf().EventEmitter,Ww=function(e,t){return e.listeners(t).length},_v=sv(),Th=n2().Buffer,PV=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function TV(e){return Th.from(e)}function kV(e){return Th.isBuffer(e)||e instanceof PV}var Yw=Object.create(vc());Yw.inherits=Pe();var vv=rn(),Tt=void 0;vv&&vv.debuglog?Tt=vv.debuglog("stream"):Tt=function(){};var RV=Rw(),$w=cv(),yc;Yw.inherits(Wt,_v);var mv=["error","close","destroy","pause","resume"];function BV(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):AV(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function Xw(e,t){Ph=Ph||Ru(),e=e||{};var r=t instanceof Ph;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,n=e.readableHighWaterMark,o=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new RV,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(yc||(yc=hc().StringDecoder),this.decoder=new yc(e.encoding),this.encoding=e.encoding)}function Wt(e){if(Ph=Ph||Ru(),!(this instanceof Wt))return new Wt(e);this._readableState=new Xw(e,this),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),_v.call(this)}Object.defineProperty(Wt.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});Wt.prototype.destroy=$w.destroy;Wt.prototype._undestroy=$w.undestroy;Wt.prototype._destroy=function(e,t){this.push(null),t(e)};Wt.prototype.push=function(e,t){var r=this._readableState,i;return r.objectMode?i=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=Th.from(e,t),t=""),i=!0),Jw(this,e,t,!1,i)};Wt.prototype.unshift=function(e){return Jw(this,e,null,!0,!1)};function Jw(e,t,r,i,n){var o=e._readableState;if(t===null)o.reading=!1,DV(e,o);else{var a;n||(a=MV(o,t)),a?e.emit("error",a):o.objectMode||t&&t.length>0?(typeof t!="string"&&!o.objectMode&&Object.getPrototypeOf(t)!==Th.prototype&&(t=TV(t)),i?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):yv(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||t.length!==0?yv(e,o,t,!1):Qw(e,o)):yv(e,o,t,!1))):i||(o.reading=!1)}return CV(o)}function yv(e,t,r,i){t.flowing&&t.length===0&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&h2(e)),Qw(e,t)}function MV(e,t){var r;return!kV(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function CV(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}Wt.prototype.isPaused=function(){return this._readableState.flowing===!1};Wt.prototype.setEncoding=function(e){return yc||(yc=hc().StringDecoder),this._readableState.decoder=new yc(e),this._readableState.encoding=e,this};var Vw=8388608;function NV(e){return e>=Vw?e=Vw:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function Gw(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=NV(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}Wt.prototype.read=function(e){Tt("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return Tt("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?bv(this):h2(this),null;if(e=Gw(e,t),e===0&&t.ended)return t.length===0&&bv(this),null;var i=t.needReadable;Tt("need readable",i),(t.length===0||t.length-e<t.highWaterMark)&&(i=!0,Tt("length less than watermark",i)),t.ended||t.reading?(i=!1,Tt("reading or ended",i)):i&&(Tt("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=Gw(r,t)));var n;return e>0?n=eS(e,t):n=null,n===null?(t.needReadable=!0,e=0):t.length-=e,t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&bv(this)),n!==null&&this.emit("data",n),n};function DV(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,h2(e)}}function h2(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(Tt("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?bc.nextTick(Zw,e):Zw(e))}function Zw(e){Tt("emit readable"),e.emit("readable"),wv(e)}function Qw(e,t){t.readingMore||(t.readingMore=!0,bc.nextTick(LV,e,t))}function LV(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(Tt("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}Wt.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))};Wt.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e);break}i.pipesCount+=1,Tt("pipe count=%d opts=%j",i.pipesCount,t);var n=(!t||t.end!==!1)&&e!==A.default.stdout&&e!==A.default.stderr,o=n?s:D;i.endEmitted?bc.nextTick(o):r.once("end",o),e.on("unpipe",a);function a(L,U){Tt("onunpipe"),L===r&&U&&U.hasUnpiped===!1&&(U.hasUnpiped=!0,l())}function s(){Tt("onend"),e.end()}var u=qV(r);e.on("drain",u);var c=!1;function l(){Tt("cleanup"),e.removeListener("close",P),e.removeListener("finish",M),e.removeListener("drain",u),e.removeListener("error",E),e.removeListener("unpipe",a),r.removeListener("end",s),r.removeListener("end",D),r.removeListener("data",w),c=!0,i.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u()}var m=!1;r.on("data",w);function w(L){Tt("ondata"),m=!1;var U=e.write(L);U===!1&&!m&&((i.pipesCount===1&&i.pipes===e||i.pipesCount>1&&tS(i.pipes,e)!==-1)&&!c&&(Tt("false write response, pause",i.awaitDrain),i.awaitDrain++,m=!0),r.pause())}function E(L){Tt("onerror",L),D(),e.removeListener("error",E),Ww(e,"error")===0&&e.emit("error",L)}BV(e,"error",E);function P(){e.removeListener("finish",M),D()}e.once("close",P);function M(){Tt("onfinish"),e.removeListener("close",P),D()}e.once("finish",M);function D(){Tt("unpipe"),r.unpipe(e)}return e.emit("pipe",r),i.flowing||(Tt("pipe resume"),r.resume()),e};function qV(e){return function(){var t=e._readableState;Tt("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&Ww(e,"data")&&(t.flowing=!0,wv(e))}}Wt.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<n;o++)i[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=tS(t.pipes,e);return a===-1?this:(t.pipes.splice(a,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)};Wt.prototype.on=function(e,t){var r=_v.prototype.on.call(this,e,t);if(e==="data")this._readableState.flowing!==!1&&this.resume();else if(e==="readable"){var i=this._readableState;!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&h2(this):bc.nextTick(UV,this))}return r};Wt.prototype.addListener=Wt.prototype.on;function UV(e){Tt("readable nexttick read 0"),e.read(0)}Wt.prototype.resume=function(){var e=this._readableState;return e.flowing||(Tt("resume"),e.flowing=!0,FV(this,e)),this};function FV(e,t){t.resumeScheduled||(t.resumeScheduled=!0,bc.nextTick(HV,e,t))}function HV(e,t){t.reading||(Tt("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),wv(e),t.flowing&&!t.reading&&e.read(0)}Wt.prototype.pause=function(){return Tt("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Tt("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function wv(e){var t=e._readableState;for(Tt("flow",t.flowing);t.flowing&&e.read()!==null;);}Wt.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;e.on("end",function(){if(Tt("wrapped end"),r.decoder&&!r.ended){var a=r.decoder.end();a&&a.length&&t.push(a)}t.push(null)}),e.on("data",function(a){if(Tt("wrapped data"),r.decoder&&(a=r.decoder.write(a)),!(r.objectMode&&a==null)&&!(!r.objectMode&&(!a||!a.length))){var s=t.push(a);s||(i=!0,e.pause())}});for(var n in e)this[n]===void 0&&typeof e[n]=="function"&&(this[n]=(function(a){return function(){return e[a].apply(e,arguments)}})(n));for(var o=0;o<mv.length;o++)e.on(mv[o],this.emit.bind(this,mv[o]));return this._read=function(a){Tt("wrapped _read",a),i&&(i=!1,e.resume())},this};Object.defineProperty(Wt.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Wt._fromList=eS;function eS(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.head.data:r=t.buffer.concat(t.length),t.buffer.clear()):r=jV(e,t.buffer,t.decoder),r}function jV(e,t,r){var i;return e<t.head.data.length?(i=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):e===t.head.data.length?i=t.shift():i=r?zV(e,t):KV(e,t),i}function zV(e,t){var r=t.head,i=1,n=r.data;for(e-=n.length;r=r.next;){var o=r.data,a=e>o.length?o.length:e;if(a===o.length?n+=o:n+=o.slice(0,e),e-=a,e===0){a===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++i}return t.length-=i,n}function KV(e,t){var r=Th.allocUnsafe(e),i=t.head,n=1;for(i.data.copy(r),e-=i.data.length;i=i.next;){var o=i.data,a=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,a),e-=a,e===0){a===o.length?(++n,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=o.slice(a));break}++n}return t.length-=n,r}function bv(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,bc.nextTick(VV,t,e))}function VV(e,t){!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function tS(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}});var Sv=k((Ele,oS)=>{"use strict";v();oS.exports=pa;var d2=Ru(),nS=Object.create(vc());nS.inherits=Pe();nS.inherits(pa,d2);function GV(e,t){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,t!=null&&this.push(t),i(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function pa(e){if(!(this instanceof pa))return new pa(e);d2.call(this,e),this._transformState={afterTransform:GV.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",ZV)}function ZV(){var e=this;typeof this._flush=="function"?this._flush(function(t,r){iS(e,t,r)}):iS(this,null,null)}pa.prototype.push=function(e,t){return this._transformState.needTransform=!1,d2.prototype.push.call(this,e,t)};pa.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")};pa.prototype._write=function(e,t,r){var i=this._transformState;if(i.writecb=r,i.writechunk=e,i.writeencoding=t,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};pa.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};pa.prototype._destroy=function(e,t){var r=this;d2.prototype._destroy.call(this,e,function(i){t(i),r.emit("close")})};function iS(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}});var fS=k((Ole,uS)=>{"use strict";v();uS.exports=kh;var aS=Sv(),sS=Object.create(vc());sS.inherits=Pe();sS.inherits(kh,aS);function kh(e){if(!(this instanceof kh))return new kh(e);aS.call(this,e)}kh.prototype._transform=function(e,t,r){r(null,e)}});var lS=k((wo,cS)=>{v();wo=cS.exports=gv();wo.Stream=wo;wo.Readable=wo;wo.Writable=hv();wo.Duplex=Ru();wo.Transform=Sv();wo.PassThrough=fS()});var pS=k((Tle,dS)=>{"use strict";v();var WV=ot().Buffer,YV=Ew(),hS=lS().Transform,$V=Pe();function us(e){hS.call(this),this._block=WV.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}$V(us,hS);us.prototype._transform=function(e,t,r){var i=null;try{this.update(e,t)}catch(n){i=n}r(i)};us.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(r){t=r}e(t)};us.prototype.update=function(e,t){if(this._finalized)throw new Error("Digest already called");for(var r=YV(e,t),i=this._block,n=0;this._blockOffset+r.length-n>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)i[o]=r[n],o+=1,n+=1;this._update(),this._blockOffset=0}for(;n<r.length;)i[this._blockOffset]=r[n],this._blockOffset+=1,n+=1;for(var a=0,s=r.length*8;s>0;++a)this._length[a]+=s,s=this._length[a]/4294967296|0,s>0&&(this._length[a]-=4294967296*s);return this};us.prototype._update=function(){throw new Error("_update is not implemented")};us.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();e!==void 0&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t};us.prototype._digest=function(){throw new Error("_digest is not implemented")};dS.exports=us});var g2=k((Rle,wS)=>{"use strict";v();var xv=Kt().Buffer,XV=Pe(),_S=pS(),JV=new Array(16),Rh=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],Bh=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],Mh=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],Ch=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],Nh=[0,1518500249,1859775393,2400959708,2840853838],Dh=[1352829926,1548603684,1836072691,2053994217,0];function Bu(e,t){return e<<t|e>>>32-t}function gS(e,t,r,i,n,o,a,s){return Bu(e+(t^r^i)+o+a|0,s)+n|0}function vS(e,t,r,i,n,o,a,s){return Bu(e+(t&r|~t&i)+o+a|0,s)+n|0}function mS(e,t,r,i,n,o,a,s){return Bu(e+((t|~r)^i)+o+a|0,s)+n|0}function yS(e,t,r,i,n,o,a,s){return Bu(e+(t&i|r&~i)+o+a|0,s)+n|0}function bS(e,t,r,i,n,o,a,s){return Bu(e+(t^(r|~i))+o+a|0,s)+n|0}function p2(){_S.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}XV(p2,_S);p2.prototype._update=function(){for(var e=JV,t=0;t<16;++t)e[t]=this._block.readInt32LE(t*4);for(var r=this._a|0,i=this._b|0,n=this._c|0,o=this._d|0,a=this._e|0,s=this._a|0,u=this._b|0,c=this._c|0,l=this._d|0,m=this._e|0,w=0;w<80;w+=1){var E,P;w<16?(E=gS(r,i,n,o,a,e[Rh[w]],Nh[0],Mh[w]),P=bS(s,u,c,l,m,e[Bh[w]],Dh[0],Ch[w])):w<32?(E=vS(r,i,n,o,a,e[Rh[w]],Nh[1],Mh[w]),P=yS(s,u,c,l,m,e[Bh[w]],Dh[1],Ch[w])):w<48?(E=mS(r,i,n,o,a,e[Rh[w]],Nh[2],Mh[w]),P=mS(s,u,c,l,m,e[Bh[w]],Dh[2],Ch[w])):w<64?(E=yS(r,i,n,o,a,e[Rh[w]],Nh[3],Mh[w]),P=vS(s,u,c,l,m,e[Bh[w]],Dh[3],Ch[w])):(E=bS(r,i,n,o,a,e[Rh[w]],Nh[4],Mh[w]),P=gS(s,u,c,l,m,e[Bh[w]],Dh[4],Ch[w])),r=a,a=o,o=Bu(n,10),n=i,i=E,s=m,m=l,l=Bu(c,10),c=u,u=P}var M=this._b+n+l|0;this._b=this._c+o+m|0,this._c=this._d+a+s|0,this._d=this._e+r+u|0,this._e=this._a+i+c|0,this._a=M};p2.prototype._digest=function(){this._block[this._blockOffset]=128,this._blockOffset+=1,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=xv.alloc?xv.alloc(20):new xv(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e};wS.exports=p2});var Mu=k((Mle,SS)=>{"use strict";v();var QV=ot().Buffer,eG=xh();function v2(e,t){this._block=QV.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}v2.prototype.update=function(e,t){e=eG(e,t||"utf8");for(var r=this._block,i=this._blockSize,n=e.length,o=this._len,a=0;a<n;){for(var s=o%i,u=Math.min(n-a,i-s),c=0;c<u;c++)r[s+c]=e[a+c];o+=u,a+=u,o%i===0&&this._update(r)}return this._len+=n,this};v2.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=this._len*8;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var i=(r&4294967295)>>>0,n=(r-i)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(i,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o};v2.prototype._update=function(){throw new Error("_update must be implemented by subclass")};SS.exports=v2});var IS=k((Nle,ES)=>{"use strict";v();var tG=Pe(),xS=Mu(),rG=ot().Buffer,iG=[1518500249,1859775393,-1894007588,-899497514],nG=new Array(80);function Lh(){this.init(),this._w=nG,xS.call(this,64,56)}tG(Lh,xS);Lh.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function oG(e){return e<<5|e>>>27}function aG(e){return e<<30|e>>>2}function sG(e,t,r,i){return e===0?t&r|~t&i:e===2?t&r|t&i|r&i:t^r^i}Lh.prototype._update=function(e){for(var t=this._w,r=this._a|0,i=this._b|0,n=this._c|0,o=this._d|0,a=this._e|0,s=0;s<16;++s)t[s]=e.readInt32BE(s*4);for(;s<80;++s)t[s]=t[s-3]^t[s-8]^t[s-14]^t[s-16];for(var u=0;u<80;++u){var c=~~(u/20),l=oG(r)+sG(c,i,n,o)+a+t[u]+iG[c]|0;a=o,o=n,n=aG(i),i=r,r=l}this._a=r+this._a|0,this._b=i+this._b|0,this._c=n+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0};Lh.prototype._hash=function(){var e=rG.allocUnsafe(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e};ES.exports=Lh});var PS=k((Lle,AS)=>{"use strict";v();var uG=Pe(),OS=Mu(),fG=ot().Buffer,cG=[1518500249,1859775393,-1894007588,-899497514],lG=new Array(80);function qh(){this.init(),this._w=lG,OS.call(this,64,56)}uG(qh,OS);qh.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function hG(e){return e<<1|e>>>31}function dG(e){return e<<5|e>>>27}function pG(e){return e<<30|e>>>2}function gG(e,t,r,i){return e===0?t&r|~t&i:e===2?t&r|t&i|r&i:t^r^i}qh.prototype._update=function(e){for(var t=this._w,r=this._a|0,i=this._b|0,n=this._c|0,o=this._d|0,a=this._e|0,s=0;s<16;++s)t[s]=e.readInt32BE(s*4);for(;s<80;++s)t[s]=hG(t[s-3]^t[s-8]^t[s-14]^t[s-16]);for(var u=0;u<80;++u){var c=~~(u/20),l=dG(r)+gG(c,i,n,o)+a+t[u]+cG[c]|0;a=o,o=n,n=pG(i),i=r,r=l}this._a=r+this._a|0,this._b=i+this._b|0,this._c=n+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0};qh.prototype._hash=function(){var e=fG.allocUnsafe(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e};AS.exports=qh});var Ev=k((Ule,kS)=>{"use strict";v();var vG=Pe(),TS=Mu(),mG=ot().Buffer,yG=[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],bG=new Array(64);function Uh(){this.init(),this._w=bG,TS.call(this,64,56)}vG(Uh,TS);Uh.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function _G(e,t,r){return r^e&(t^r)}function wG(e,t,r){return e&t|r&(e|t)}function SG(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function xG(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function EG(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function IG(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}Uh.prototype._update=function(e){for(var t=this._w,r=this._a|0,i=this._b|0,n=this._c|0,o=this._d|0,a=this._e|0,s=this._f|0,u=this._g|0,c=this._h|0,l=0;l<16;++l)t[l]=e.readInt32BE(l*4);for(;l<64;++l)t[l]=IG(t[l-2])+t[l-7]+EG(t[l-15])+t[l-16]|0;for(var m=0;m<64;++m){var w=c+xG(a)+_G(a,s,u)+yG[m]+t[m]|0,E=SG(r)+wG(r,i,n)|0;c=u,u=s,s=a,a=o+w|0,o=n,n=i,i=r,r=w+E|0}this._a=r+this._a|0,this._b=i+this._b|0,this._c=n+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0,this._f=s+this._f|0,this._g=u+this._g|0,this._h=c+this._h|0};Uh.prototype._hash=function(){var e=mG.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e};kS.exports=Uh});var BS=k((Hle,RS)=>{"use strict";v();var OG=Pe(),AG=Ev(),PG=Mu(),TG=ot().Buffer,kG=new Array(64);function m2(){this.init(),this._w=kG,PG.call(this,64,56)}OG(m2,AG);m2.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this};m2.prototype._hash=function(){var e=TG.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e};RS.exports=m2});var Iv=k((zle,US)=>{"use strict";v();var RG=Pe(),qS=Mu(),BG=ot().Buffer,MS=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],MG=new Array(160);function Fh(){this.init(),this._w=MG,qS.call(this,128,112)}RG(Fh,qS);Fh.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function CS(e,t,r){return r^e&(t^r)}function NS(e,t,r){return e&t|r&(e|t)}function DS(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function LS(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function CG(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function NG(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function DG(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function LG(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function zr(e,t){return e>>>0<t>>>0?1:0}Fh.prototype._update=function(e){for(var t=this._w,r=this._ah|0,i=this._bh|0,n=this._ch|0,o=this._dh|0,a=this._eh|0,s=this._fh|0,u=this._gh|0,c=this._hh|0,l=this._al|0,m=this._bl|0,w=this._cl|0,E=this._dl|0,P=this._el|0,M=this._fl|0,D=this._gl|0,L=this._hl|0,U=0;U<32;U+=2)t[U]=e.readInt32BE(U*4),t[U+1]=e.readInt32BE(U*4+4);for(;U<160;U+=2){var K=t[U-30],C=t[U-30+1],N=CG(K,C),F=NG(C,K);K=t[U-4],C=t[U-4+1];var H=DG(K,C),z=LG(C,K),V=t[U-14],B=t[U-14+1],g=t[U-32],I=t[U-32+1],y=F+B|0,f=N+V+zr(y,F)|0;y=y+z|0,f=f+H+zr(y,z)|0,y=y+I|0,f=f+g+zr(y,I)|0,t[U]=f,t[U+1]=y}for(var p=0;p<160;p+=2){f=t[p],y=t[p+1];var _=NS(r,i,n),x=NS(l,m,w),b=DS(r,l),d=DS(l,r),O=LS(a,P),T=LS(P,a),S=MS[p],R=MS[p+1],Y=CS(a,s,u),X=CS(P,M,D),ne=L+T|0,ce=c+O+zr(ne,L)|0;ne=ne+X|0,ce=ce+Y+zr(ne,X)|0,ne=ne+R|0,ce=ce+S+zr(ne,R)|0,ne=ne+y|0,ce=ce+f+zr(ne,y)|0;var pe=d+x|0,q=b+_+zr(pe,d)|0;c=u,L=D,u=s,D=M,s=a,M=P,P=E+ne|0,a=o+ce+zr(P,E)|0,o=n,E=w,n=i,w=m,i=r,m=l,l=ne+pe|0,r=ce+q+zr(l,ne)|0}this._al=this._al+l|0,this._bl=this._bl+m|0,this._cl=this._cl+w|0,this._dl=this._dl+E|0,this._el=this._el+P|0,this._fl=this._fl+M|0,this._gl=this._gl+D|0,this._hl=this._hl+L|0,this._ah=this._ah+r+zr(this._al,l)|0,this._bh=this._bh+i+zr(this._bl,m)|0,this._ch=this._ch+n+zr(this._cl,w)|0,this._dh=this._dh+o+zr(this._dl,E)|0,this._eh=this._eh+a+zr(this._el,P)|0,this._fh=this._fh+s+zr(this._fl,M)|0,this._gh=this._gh+u+zr(this._gl,D)|0,this._hh=this._hh+c+zr(this._hl,L)|0};Fh.prototype._hash=function(){var e=BG.allocUnsafe(64);function t(r,i,n){e.writeInt32BE(r,n),e.writeInt32BE(i,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e};US.exports=Fh});var HS=k((Vle,FS)=>{"use strict";v();var qG=Pe(),UG=Iv(),FG=Mu(),HG=ot().Buffer,jG=new Array(160);function y2(){this.init(),this._w=jG,FG.call(this,128,112)}qG(y2,UG);y2.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this};y2.prototype._hash=function(){var e=HG.allocUnsafe(48);function t(r,i,n){e.writeInt32BE(r,n),e.writeInt32BE(i,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e};FS.exports=y2});var b2=k((Zle,ga)=>{"use strict";v();ga.exports=function(t){var r=t.toLowerCase(),i=ga.exports[r];if(!i)throw new Error(r+" is not supported (we accept pull requests)");return new i};ga.exports.sha=IS();ga.exports.sha1=PS();ga.exports.sha224=BS();ga.exports.sha256=Ev();ga.exports.sha384=HS();ga.exports.sha512=Iv()});var va=k((Yle,zS)=>{"use strict";v();var zG=ot().Buffer,jS=Qd().Transform,KG=hc().StringDecoder,VG=Pe(),GG=xh();function kn(e){jS.call(this),this.hashMode=typeof e=="string",this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}VG(kn,jS);kn.prototype.update=function(e,t,r){var i=GG(e,t),n=this._update(i);return this.hashMode?this:(r&&(n=this._toString(n,r)),n)};kn.prototype.setAutoPadding=function(){};kn.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")};kn.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")};kn.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")};kn.prototype._transform=function(e,t,r){var i;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(n){i=n}finally{r(i)}};kn.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(r){t=r}e(t)};kn.prototype._finalOrDigest=function(e){var t=this.__final()||zG.alloc(0);return e&&(t=this._toString(t,e,!0)),t};kn.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new KG(t),this._encoding=t),this._encoding!==t)throw new Error("can\u2019t switch encodings");var i=this._decoder.write(e);return r&&(i+=this._decoder.end()),i};zS.exports=kn});var Hh=k((Xle,VS)=>{"use strict";v();var ZG=Pe(),WG=r2(),YG=g2(),$G=b2(),KS=va();function _2(e){KS.call(this,"digest"),this._hash=e}ZG(_2,KS);_2.prototype._update=function(e){this._hash.update(e)};_2.prototype._final=function(){return this._hash.digest()};VS.exports=function(t){return t=t.toLowerCase(),t==="md5"?new WG:t==="rmd160"||t==="ripemd160"?new YG:new _2($G(t))}});var WS=k((Qle,ZS)=>{"use strict";v();var XG=Pe(),Cu=ot().Buffer,GS=va(),JG=Cu.alloc(128),_c=64;function w2(e,t){GS.call(this,"digest"),typeof t=="string"&&(t=Cu.from(t)),this._alg=e,this._key=t,t.length>_c?t=e(t):t.length<_c&&(t=Cu.concat([t,JG],_c));for(var r=this._ipad=Cu.allocUnsafe(_c),i=this._opad=Cu.allocUnsafe(_c),n=0;n<_c;n++)r[n]=t[n]^54,i[n]=t[n]^92;this._hash=[r]}XG(w2,GS);w2.prototype._update=function(e){this._hash.push(e)};w2.prototype._final=function(){var e=this._alg(Cu.concat(this._hash));return this._alg(Cu.concat([this._opad,e]))};ZS.exports=w2});var Ov=k((the,YS)=>{v();var QG=r2();YS.exports=function(e){return new QG().update(e).digest()}});var JS=k((ihe,XS)=>{"use strict";v();var eZ=Pe(),tZ=WS(),$S=va(),jh=ot().Buffer,rZ=Ov(),Av=g2(),Pv=b2(),iZ=jh.alloc(128);function zh(e,t){$S.call(this,"digest"),typeof t=="string"&&(t=jh.from(t));var r=e==="sha512"||e==="sha384"?128:64;if(this._alg=e,this._key=t,t.length>r){var i=e==="rmd160"?new Av:Pv(e);t=i.update(t).digest()}else t.length<r&&(t=jh.concat([t,iZ],r));for(var n=this._ipad=jh.allocUnsafe(r),o=this._opad=jh.allocUnsafe(r),a=0;a<r;a++)n[a]=t[a]^54,o[a]=t[a]^92;this._hash=e==="rmd160"?new Av:Pv(e),this._hash.update(n)}eZ(zh,$S);zh.prototype._update=function(e){this._hash.update(e)};zh.prototype._final=function(){var e=this._hash.digest(),t=this._alg==="rmd160"?new Av:Pv(this._alg);return t.update(this._opad).update(e).digest()};XS.exports=function(t,r){return t=t.toLowerCase(),t==="rmd160"||t==="ripemd160"?new zh("rmd160",r):t==="md5"?new tZ(rZ,r):new zh(t,r)}});var fs=k((ohe,QS)=>{"use strict";v();QS.exports={}});var Tv=k((she,ex)=>{"use strict";v();var nZ=isFinite,oZ=Math.pow(2,30)-1;ex.exports=function(e,t){if(typeof e!="number")throw new TypeError("Iterations not a number");if(e<0||!nZ(e))throw new TypeError("Bad iterations");if(typeof t!="number")throw new TypeError("Key length not a number");if(t<0||t>oZ||t!==t)throw new TypeError("Bad key length")}});var kv=k((fhe,rx)=>{"use strict";v();var S2;globalThis.process&&globalThis.process.browser?S2="utf-8":globalThis.process&&globalThis.process.version?(tx=parseInt(A.default.version.split(".")[0].slice(1),10),S2=tx>=6?"utf-8":"binary"):S2="utf-8";var tx;rx.exports=S2});var Rv=k((lhe,ox)=>{"use strict";v();var aZ=ot().Buffer,sZ=xh(),nx=typeof Uint8Array<"u",uZ=nx&&typeof ArrayBuffer<"u",ix=uZ&&ArrayBuffer.isView;ox.exports=function(e,t,r){if(typeof e=="string"||aZ.isBuffer(e)||nx&&e instanceof Uint8Array||ix&&ix(e))return sZ(e,t);throw new TypeError(r+" must be a string, a Buffer, a Uint8Array, or a DataView")}});var Bv=k((dhe,fx)=>{"use strict";v();var fZ=Ov(),cZ=g2(),lZ=b2(),Nu=ot().Buffer,hZ=Tv(),ax=kv(),sx=Rv(),dZ=Nu.alloc(128),x2={__proto__:null,md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,"sha512-256":32,ripemd160:20,rmd160:20},pZ={__proto__:null,"sha-1":"sha1","sha-224":"sha224","sha-256":"sha256","sha-384":"sha384","sha-512":"sha512","ripemd-160":"ripemd160"};function gZ(e){return new cZ().update(e).digest()}function vZ(e){function t(r){return lZ(e).update(r).digest()}return e==="rmd160"||e==="ripemd160"?gZ:e==="md5"?fZ:t}function ux(e,t,r){var i=vZ(e),n=e==="sha512"||e==="sha384"?128:64;t.length>n?t=i(t):t.length<n&&(t=Nu.concat([t,dZ],n));for(var o=Nu.allocUnsafe(n+x2[e]),a=Nu.allocUnsafe(n+x2[e]),s=0;s<n;s++)o[s]=t[s]^54,a[s]=t[s]^92;var u=Nu.allocUnsafe(n+r+4);o.copy(u,0,0,n),this.ipad1=u,this.ipad2=o,this.opad=a,this.alg=e,this.blocksize=n,this.hash=i,this.size=x2[e]}ux.prototype.run=function(e,t){e.copy(t,this.blocksize);var r=this.hash(t);return r.copy(this.opad,this.blocksize),this.hash(this.opad)};function mZ(e,t,r,i,n){hZ(r,i),e=sx(e,ax,"Password"),t=sx(t,ax,"Salt");var o=(n||"sha1").toLowerCase(),a=pZ[o]||o,s=x2[a];if(typeof s!="number"||!s)throw new TypeError("Digest algorithm not supported: "+n);var u=new ux(a,e,t.length),c=Nu.allocUnsafe(i),l=Nu.allocUnsafe(t.length+4);t.copy(l,0,0,t.length);for(var m=0,w=s,E=Math.ceil(i/w),P=1;P<=E;P++){l.writeUInt32BE(P,t.length);for(var M=u.run(l,u.ipad1),D=M,L=1;L<r;L++){D=u.run(D,u.ipad2);for(var U=0;U<w;U++)M[U]^=D[U]}M.copy(c,m),m+=w}return c}fx.exports=mZ});var vx=k((ghe,gx)=>{"use strict";v();var dx=ot().Buffer,yZ=Tv(),cx=kv(),lx=Bv(),hx=Rv(),E2,Kh=globalThis.crypto&&globalThis.crypto.subtle,bZ={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},Mv=[],Du;function Cv(){return Du||(globalThis.process&&globalThis.process.nextTick?Du=globalThis.process.nextTick:globalThis.queueMicrotask?Du=globalThis.queueMicrotask:globalThis.setImmediate?Du=globalThis.setImmediate:Du=globalThis.setTimeout,Du)}function px(e,t,r,i,n){return Kh.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then(function(o){return Kh.deriveBits({name:"PBKDF2",salt:t,iterations:r,hash:{name:n}},o,i<<3)}).then(function(o){return dx.from(o)})}function _Z(e){if(globalThis.process&&!globalThis.process.browser||!Kh||!Kh.importKey||!Kh.deriveBits)return Promise.resolve(!1);if(Mv[e]!==void 0)return Mv[e];E2=E2||dx.alloc(8);var t=px(E2,E2,10,128,e).then(function(){return!0},function(){return!1});return Mv[e]=t,t}function wZ(e,t){e.then(function(r){Cv()(function(){t(null,r)})},function(r){Cv()(function(){t(r)})})}gx.exports=function(e,t,r,i,n,o){if(typeof n=="function"&&(o=n,n=void 0),yZ(r,i),e=hx(e,cx,"Password"),t=hx(t,cx,"Salt"),typeof o!="function")throw new Error("No callback provided to pbkdf2");n=n||"sha1";var a=bZ[n.toLowerCase()];if(!a||typeof globalThis.Promise!="function"){Cv()(function(){var s;try{s=lx(e,t,r,i,n)}catch(u){o(u);return}o(null,s)});return}wZ(_Z(a).then(function(s){return s?px(e,t,r,i,a):lx(e,t,r,i,n)}),o)}});var Dv=k(Nv=>{"use strict";v();Nv.pbkdf2=vx();Nv.pbkdf2Sync=Bv()});var Lv=k(an=>{"use strict";v();an.readUInt32BE=function(t,r){var i=t[0+r]<<24|t[1+r]<<16|t[2+r]<<8|t[3+r];return i>>>0};an.writeUInt32BE=function(t,r,i){t[0+i]=r>>>24,t[1+i]=r>>>16&255,t[2+i]=r>>>8&255,t[3+i]=r&255};an.ip=function(t,r,i,n){for(var o=0,a=0,s=6;s>=0;s-=2){for(var u=0;u<=24;u+=8)o<<=1,o|=r>>>u+s&1;for(var u=0;u<=24;u+=8)o<<=1,o|=t>>>u+s&1}for(var s=6;s>=0;s-=2){for(var u=1;u<=25;u+=8)a<<=1,a|=r>>>u+s&1;for(var u=1;u<=25;u+=8)a<<=1,a|=t>>>u+s&1}i[n+0]=o>>>0,i[n+1]=a>>>0};an.rip=function(t,r,i,n){for(var o=0,a=0,s=0;s<4;s++)for(var u=24;u>=0;u-=8)o<<=1,o|=r>>>u+s&1,o<<=1,o|=t>>>u+s&1;for(var s=4;s<8;s++)for(var u=24;u>=0;u-=8)a<<=1,a|=r>>>u+s&1,a<<=1,a|=t>>>u+s&1;i[n+0]=o>>>0,i[n+1]=a>>>0};an.pc1=function(t,r,i,n){for(var o=0,a=0,s=7;s>=5;s--){for(var u=0;u<=24;u+=8)o<<=1,o|=r>>u+s&1;for(var u=0;u<=24;u+=8)o<<=1,o|=t>>u+s&1}for(var u=0;u<=24;u+=8)o<<=1,o|=r>>u+s&1;for(var s=1;s<=3;s++){for(var u=0;u<=24;u+=8)a<<=1,a|=r>>u+s&1;for(var u=0;u<=24;u+=8)a<<=1,a|=t>>u+s&1}for(var u=0;u<=24;u+=8)a<<=1,a|=t>>u+s&1;i[n+0]=o>>>0,i[n+1]=a>>>0};an.r28shl=function(t,r){return t<<r&268435455|t>>>28-r};var I2=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];an.pc2=function(t,r,i,n){for(var o=0,a=0,s=I2.length>>>1,u=0;u<s;u++)o<<=1,o|=t>>>I2[u]&1;for(var u=s;u<I2.length;u++)a<<=1,a|=r>>>I2[u]&1;i[n+0]=o>>>0,i[n+1]=a>>>0};an.expand=function(t,r,i){var n=0,o=0;n=(t&1)<<5|t>>>27;for(var a=23;a>=15;a-=4)n<<=6,n|=t>>>a&63;for(var a=11;a>=3;a-=4)o|=t>>>a&63,o<<=6;o|=(t&31)<<1|t>>>31,r[i+0]=n>>>0,r[i+1]=o>>>0};var mx=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];an.substitute=function(t,r){for(var i=0,n=0;n<4;n++){var o=t>>>18-n*6&63,a=mx[n*64+o];i<<=4,i|=a}for(var n=0;n<4;n++){var o=r>>>18-n*6&63,a=mx[256+n*64+o];i<<=4,i|=a}return i>>>0};var yx=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];an.permute=function(t){for(var r=0,i=0;i<yx.length;i++)r<<=1,r|=t>>>yx[i]&1;return r>>>0};an.padSplit=function(t,r,i){for(var n=t.toString(2);n.length<r;)n="0"+n;for(var o=[],a=0;a<r;a+=i)o.push(n.slice(a,a+i));return o.join(" ")}});var Rn=k((whe,_x)=>{v();_x.exports=bx;function bx(e,t){if(!e)throw new Error(t||"Assertion failed")}bx.equal=function(t,r,i){if(t!=r)throw new Error(i||"Assertion failed: "+t+" != "+r)}});var O2=k((xhe,wx)=>{"use strict";v();var SZ=Rn();function sn(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=e.padding!==!1}wx.exports=sn;sn.prototype._init=function(){};sn.prototype.update=function(t){return t.length===0?[]:this.type==="decrypt"?this._updateDecrypt(t):this._updateEncrypt(t)};sn.prototype._buffer=function(t,r){for(var i=Math.min(this.buffer.length-this.bufferOff,t.length-r),n=0;n<i;n++)this.buffer[this.bufferOff+n]=t[r+n];return this.bufferOff+=i,i};sn.prototype._flushBuffer=function(t,r){return this._update(this.buffer,0,t,r),this.bufferOff=0,this.blockSize};sn.prototype._updateEncrypt=function(t){var r=0,i=0,n=(this.bufferOff+t.length)/this.blockSize|0,o=new Array(n*this.blockSize);this.bufferOff!==0&&(r+=this._buffer(t,r),this.bufferOff===this.buffer.length&&(i+=this._flushBuffer(o,i)));for(var a=t.length-(t.length-r)%this.blockSize;r<a;r+=this.blockSize)this._update(t,r,o,i),i+=this.blockSize;for(;r<t.length;r++,this.bufferOff++)this.buffer[this.bufferOff]=t[r];return o};sn.prototype._updateDecrypt=function(t){for(var r=0,i=0,n=Math.ceil((this.bufferOff+t.length)/this.blockSize)-1,o=new Array(n*this.blockSize);n>0;n--)r+=this._buffer(t,r),i+=this._flushBuffer(o,i);return r+=this._buffer(t,r),o};sn.prototype.final=function(t){var r;t&&(r=this.update(t));var i;return this.type==="encrypt"?i=this._finalEncrypt():i=this._finalDecrypt(),r?r.concat(i):i};sn.prototype._pad=function(t,r){if(r===0)return!1;for(;r<t.length;)t[r++]=0;return!0};sn.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var t=new Array(this.blockSize);return this._update(this.buffer,0,t,0),t};sn.prototype._unpad=function(t){return t};sn.prototype._finalDecrypt=function(){SZ.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var t=new Array(this.blockSize);return this._flushBuffer(t,0),this._unpad(t)}});var qv=k((Ihe,Ex)=>{"use strict";v();var Sx=Rn(),xZ=Pe(),Rr=Lv(),xx=O2();function EZ(){this.tmp=new Array(2),this.keys=null}function So(e){xx.call(this,e);var t=new EZ;this._desState=t,this.deriveKeys(t,e.key)}xZ(So,xx);Ex.exports=So;So.create=function(t){return new So(t)};var IZ=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];So.prototype.deriveKeys=function(t,r){t.keys=new Array(32),Sx.equal(r.length,this.blockSize,"Invalid key length");var i=Rr.readUInt32BE(r,0),n=Rr.readUInt32BE(r,4);Rr.pc1(i,n,t.tmp,0),i=t.tmp[0],n=t.tmp[1];for(var o=0;o<t.keys.length;o+=2){var a=IZ[o>>>1];i=Rr.r28shl(i,a),n=Rr.r28shl(n,a),Rr.pc2(i,n,t.keys,o)}};So.prototype._update=function(t,r,i,n){var o=this._desState,a=Rr.readUInt32BE(t,r),s=Rr.readUInt32BE(t,r+4);Rr.ip(a,s,o.tmp,0),a=o.tmp[0],s=o.tmp[1],this.type==="encrypt"?this._encrypt(o,a,s,o.tmp,0):this._decrypt(o,a,s,o.tmp,0),a=o.tmp[0],s=o.tmp[1],Rr.writeUInt32BE(i,a,n),Rr.writeUInt32BE(i,s,n+4)};So.prototype._pad=function(t,r){if(this.padding===!1)return!1;for(var i=t.length-r,n=r;n<t.length;n++)t[n]=i;return!0};So.prototype._unpad=function(t){if(this.padding===!1)return t;for(var r=t[t.length-1],i=t.length-r;i<t.length;i++)Sx.equal(t[i],r);return t.slice(0,t.length-r)};So.prototype._encrypt=function(t,r,i,n,o){for(var a=r,s=i,u=0;u<t.keys.length;u+=2){var c=t.keys[u],l=t.keys[u+1];Rr.expand(s,t.tmp,0),c^=t.tmp[0],l^=t.tmp[1];var m=Rr.substitute(c,l),w=Rr.permute(m),E=s;s=(a^w)>>>0,a=E}Rr.rip(s,a,n,o)};So.prototype._decrypt=function(t,r,i,n,o){for(var a=i,s=r,u=t.keys.length-2;u>=0;u-=2){var c=t.keys[u],l=t.keys[u+1];Rr.expand(a,t.tmp,0),c^=t.tmp[0],l^=t.tmp[1];var m=Rr.substitute(c,l),w=Rr.permute(m),E=a;a=(s^w)>>>0,s=E}Rr.rip(a,s,n,o)}});var Ox=k(Ix=>{"use strict";v();var OZ=Rn(),AZ=Pe(),A2={};function PZ(e){OZ.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t<this.iv.length;t++)this.iv[t]=e[t]}function TZ(e){function t(o){e.call(this,o),this._cbcInit()}AZ(t,e);for(var r=Object.keys(A2),i=0;i<r.length;i++){var n=r[i];t.prototype[n]=A2[n]}return t.create=function(a){return new t(a)},t}Ix.instantiate=TZ;A2._cbcInit=function(){var t=new PZ(this.options.iv);this._cbcState=t};A2._update=function(t,r,i,n){var o=this._cbcState,a=this.constructor.super_.prototype,s=o.iv;if(this.type==="encrypt"){for(var u=0;u<this.blockSize;u++)s[u]^=t[r+u];a._update.call(this,s,0,i,n);for(var u=0;u<this.blockSize;u++)s[u]=i[n+u]}else{a._update.call(this,t,r,i,n);for(var u=0;u<this.blockSize;u++)i[n+u]^=s[u];for(var u=0;u<this.blockSize;u++)s[u]=t[r+u]}}});var Tx=k((The,Px)=>{"use strict";v();var kZ=Rn(),RZ=Pe(),Ax=O2(),cs=qv();function BZ(e,t){kZ.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),i=t.slice(8,16),n=t.slice(16,24);e==="encrypt"?this.ciphers=[cs.create({type:"encrypt",key:r}),cs.create({type:"decrypt",key:i}),cs.create({type:"encrypt",key:n})]:this.ciphers=[cs.create({type:"decrypt",key:n}),cs.create({type:"encrypt",key:i}),cs.create({type:"decrypt",key:r})]}function Lu(e){Ax.call(this,e);var t=new BZ(this.type,this.options.key);this._edeState=t}RZ(Lu,Ax);Px.exports=Lu;Lu.create=function(t){return new Lu(t)};Lu.prototype._update=function(t,r,i,n){var o=this._edeState;o.ciphers[0]._update(t,r,i,n),o.ciphers[1]._update(i,n,i,n),o.ciphers[2]._update(i,n,i,n)};Lu.prototype._pad=cs.prototype._pad;Lu.prototype._unpad=cs.prototype._unpad});var kx=k(wc=>{"use strict";v();wc.utils=Lv();wc.Cipher=O2();wc.DES=qv();wc.CBC=Ox();wc.EDE=Tx()});var Mx=k((Mhe,Bx)=>{v();var Rx=va(),ma=kx(),MZ=Pe(),qu=ot().Buffer,Vh={"des-ede3-cbc":ma.CBC.instantiate(ma.EDE),"des-ede3":ma.EDE,"des-ede-cbc":ma.CBC.instantiate(ma.EDE),"des-ede":ma.EDE,"des-cbc":ma.CBC.instantiate(ma.DES),"des-ecb":ma.DES};Vh.des=Vh["des-cbc"];Vh.des3=Vh["des-ede3-cbc"];Bx.exports=P2;MZ(P2,Rx);function P2(e){Rx.call(this);var t=e.mode.toLowerCase(),r=Vh[t],i;e.decrypt?i="decrypt":i="encrypt";var n=e.key;qu.isBuffer(n)||(n=qu.from(n)),(t==="des-ede"||t==="des-ede-cbc")&&(n=qu.concat([n,n.slice(0,8)]));var o=e.iv;qu.isBuffer(o)||(o=qu.from(o)),this._des=r.create({key:n,iv:o,type:i})}P2.prototype._update=function(e){return qu.from(this._des.update(e))};P2.prototype._final=function(){return qu.from(this._des.final())}});var Cx=k(Uv=>{v();Uv.encrypt=function(e,t){return e._cipher.encryptBlock(t)};Uv.decrypt=function(e,t){return e._cipher.decryptBlock(t)}});var Sc=k((Lhe,Nx)=>{v();Nx.exports=function(t,r){for(var i=Math.min(t.length,r.length),n=new h.Buffer(i),o=0;o<i;++o)n[o]=t[o]^r[o];return n}});var Lx=k(Fv=>{v();var Dx=Sc();Fv.encrypt=function(e,t){var r=Dx(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev};Fv.decrypt=function(e,t){var r=e._prev;e._prev=t;var i=e._cipher.decryptBlock(t);return Dx(i,r)}});var Fx=k(Ux=>{v();var Gh=ot().Buffer,CZ=Sc();function qx(e,t,r){var i=t.length,n=CZ(t,e._cache);return e._cache=e._cache.slice(i),e._prev=Gh.concat([e._prev,r?t:n]),n}Ux.encrypt=function(e,t,r){for(var i=Gh.allocUnsafe(0),n;t.length;)if(e._cache.length===0&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=Gh.allocUnsafe(0)),e._cache.length<=t.length)n=e._cache.length,i=Gh.concat([i,qx(e,t.slice(0,n),r)]),t=t.slice(n);else{i=Gh.concat([i,qx(e,t,r)]);break}return i}});var jx=k(Hx=>{v();var Hv=ot().Buffer;function NZ(e,t,r){var i=e._cipher.encryptBlock(e._prev),n=i[0]^t;return e._prev=Hv.concat([e._prev.slice(1),Hv.from([r?t:n])]),n}Hx.encrypt=function(e,t,r){for(var i=t.length,n=Hv.allocUnsafe(i),o=-1;++o<i;)n[o]=NZ(e,t[o],r);return n}});var Kx=k(zx=>{v();var T2=ot().Buffer;function DZ(e,t,r){for(var i,n=-1,o=8,a=0,s,u;++n<o;)i=e._cipher.encryptBlock(e._prev),s=t&1<<7-n?128:0,u=i[0]^s,a+=(u&128)>>n%8,e._prev=LZ(e._prev,r?s:u);return a}function LZ(e,t){var r=e.length,i=-1,n=T2.allocUnsafe(e.length);for(e=T2.concat([e,T2.from([t])]);++i<r;)n[i]=e[i]<<1|e[i+1]>>7;return n}zx.encrypt=function(e,t,r){for(var i=t.length,n=T2.allocUnsafe(i),o=-1;++o<i;)n[o]=DZ(e,t[o],r);return n}});var Gx=k(Vx=>{v();var qZ=Sc();function UZ(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}Vx.encrypt=function(e,t){for(;e._cache.length<t.length;)e._cache=h.Buffer.concat([e._cache,UZ(e)]);var r=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),qZ(t,r)}});var jv=k((Yhe,Zx)=>{v();function FZ(e){for(var t=e.length,r;t--;)if(r=e.readUInt8(t),r===255)e.writeUInt8(0,t);else{r++,e.writeUInt8(r,t);break}}Zx.exports=FZ});var Kv=k(Yx=>{v();var HZ=Sc(),Wx=ot().Buffer,jZ=jv();function zZ(e){var t=e._cipher.encryptBlockRaw(e._prev);return jZ(e._prev),t}var zv=16;Yx.encrypt=function(e,t){var r=Math.ceil(t.length/zv),i=e._cache.length;e._cache=Wx.concat([e._cache,Wx.allocUnsafe(r*zv)]);for(var n=0;n<r;n++){var o=zZ(e),a=i+n*zv;e._cache.writeUInt32BE(o[0],a+0),e._cache.writeUInt32BE(o[1],a+4),e._cache.writeUInt32BE(o[2],a+8),e._cache.writeUInt32BE(o[3],a+12)}var s=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),HZ(t,s)}});var Vv=k((Qhe,KZ)=>{KZ.exports={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}}});var R2=k((e0e,$x)=>{v();var VZ={ECB:Cx(),CBC:Lx(),CFB:Fx(),CFB8:jx(),CFB1:Kx(),OFB:Gx(),CTR:Kv(),GCM:Kv()},k2=Vv();for(Gv in k2)k2[Gv].module=VZ[k2[Gv].mode];var Gv;$x.exports=k2});var Zh=k((r0e,Jx)=>{v();var B2=ot().Buffer;function Wv(e){B2.isBuffer(e)||(e=B2.from(e));for(var t=e.length/4|0,r=new Array(t),i=0;i<t;i++)r[i]=e.readUInt32BE(i*4);return r}function Zv(e){for(var t=0;t<e.length;e++)e[t]=0}function Xx(e,t,r,i,n){for(var o=r[0],a=r[1],s=r[2],u=r[3],c=e[0]^t[0],l=e[1]^t[1],m=e[2]^t[2],w=e[3]^t[3],E,P,M,D,L=4,U=1;U<n;U++)E=o[c>>>24]^a[l>>>16&255]^s[m>>>8&255]^u[w&255]^t[L++],P=o[l>>>24]^a[m>>>16&255]^s[w>>>8&255]^u[c&255]^t[L++],M=o[m>>>24]^a[w>>>16&255]^s[c>>>8&255]^u[l&255]^t[L++],D=o[w>>>24]^a[c>>>16&255]^s[l>>>8&255]^u[m&255]^t[L++],c=E,l=P,m=M,w=D;return E=(i[c>>>24]<<24|i[l>>>16&255]<<16|i[m>>>8&255]<<8|i[w&255])^t[L++],P=(i[l>>>24]<<24|i[m>>>16&255]<<16|i[w>>>8&255]<<8|i[c&255])^t[L++],M=(i[m>>>24]<<24|i[w>>>16&255]<<16|i[c>>>8&255]<<8|i[l&255])^t[L++],D=(i[w>>>24]<<24|i[c>>>16&255]<<16|i[l>>>8&255]<<8|i[m&255])^t[L++],E=E>>>0,P=P>>>0,M=M>>>0,D=D>>>0,[E,P,M,D]}var GZ=[0,1,2,4,8,16,32,64,128,27,54],br=(function(){for(var e=new Array(256),t=0;t<256;t++)t<128?e[t]=t<<1:e[t]=t<<1^283;for(var r=[],i=[],n=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,u=0;u<256;++u){var c=s^s<<1^s<<2^s<<3^s<<4;c=c>>>8^c&255^99,r[a]=c,i[c]=a;var l=e[a],m=e[l],w=e[m],E=e[c]*257^c*16843008;n[0][a]=E<<24|E>>>8,n[1][a]=E<<16|E>>>16,n[2][a]=E<<8|E>>>24,n[3][a]=E,E=w*16843009^m*65537^l*257^a*16843008,o[0][c]=E<<24|E>>>8,o[1][c]=E<<16|E>>>16,o[2][c]=E<<8|E>>>24,o[3][c]=E,a===0?a=s=1:(a=l^e[e[e[w^l]]],s^=e[e[s]])}return{SBOX:r,INV_SBOX:i,SUB_MIX:n,INV_SUB_MIX:o}})();function un(e){this._key=Wv(e),this._reset()}un.blockSize=16;un.keySize=256/8;un.prototype.blockSize=un.blockSize;un.prototype.keySize=un.keySize;un.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,i=(r+1)*4,n=[],o=0;o<t;o++)n[o]=e[o];for(o=t;o<i;o++){var a=n[o-1];o%t===0?(a=a<<8|a>>>24,a=br.SBOX[a>>>24]<<24|br.SBOX[a>>>16&255]<<16|br.SBOX[a>>>8&255]<<8|br.SBOX[a&255],a^=GZ[o/t|0]<<24):t>6&&o%t===4&&(a=br.SBOX[a>>>24]<<24|br.SBOX[a>>>16&255]<<16|br.SBOX[a>>>8&255]<<8|br.SBOX[a&255]),n[o]=n[o-t]^a}for(var s=[],u=0;u<i;u++){var c=i-u,l=n[c-(u%4?0:4)];u<4||c<=4?s[u]=l:s[u]=br.INV_SUB_MIX[0][br.SBOX[l>>>24]]^br.INV_SUB_MIX[1][br.SBOX[l>>>16&255]]^br.INV_SUB_MIX[2][br.SBOX[l>>>8&255]]^br.INV_SUB_MIX[3][br.SBOX[l&255]]}this._nRounds=r,this._keySchedule=n,this._invKeySchedule=s};un.prototype.encryptBlockRaw=function(e){return e=Wv(e),Xx(e,this._keySchedule,br.SUB_MIX,br.SBOX,this._nRounds)};un.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=B2.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r};un.prototype.decryptBlock=function(e){e=Wv(e);var t=e[1];e[1]=e[3],e[3]=t;var r=Xx(e,this._invKeySchedule,br.INV_SUB_MIX,br.INV_SBOX,this._nRounds),i=B2.allocUnsafe(16);return i.writeUInt32BE(r[0],0),i.writeUInt32BE(r[3],4),i.writeUInt32BE(r[2],8),i.writeUInt32BE(r[1],12),i};un.prototype.scrub=function(){Zv(this._keySchedule),Zv(this._invKeySchedule),Zv(this._key)};Jx.exports.AES=un});var tE=k((n0e,eE)=>{v();var xc=ot().Buffer,ZZ=xc.alloc(16,0);function WZ(e){return[e.readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)]}function Qx(e){var t=xc.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function Wh(e){this.h=e,this.state=xc.alloc(16,0),this.cache=xc.allocUnsafe(0)}Wh.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()};Wh.prototype._multiply=function(){for(var e=WZ(this.h),t=[0,0,0,0],r,i,n,o=-1;++o<128;){for(i=(this.state[~~(o/8)]&1<<7-o%8)!==0,i&&(t[0]^=e[0],t[1]^=e[1],t[2]^=e[2],t[3]^=e[3]),n=(e[3]&1)!==0,r=3;r>0;r--)e[r]=e[r]>>>1|(e[r-1]&1)<<31;e[0]=e[0]>>>1,n&&(e[0]=e[0]^225<<24)}this.state=Qx(t)};Wh.prototype.update=function(e){this.cache=xc.concat([this.cache,e]);for(var t;this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)};Wh.prototype.final=function(e,t){return this.cache.length&&this.ghash(xc.concat([this.cache,ZZ],16)),this.ghash(Qx([0,e,0,t])),this.state};eE.exports=Wh});var Yv=k((a0e,nE)=>{v();var YZ=Zh(),Pi=ot().Buffer,rE=va(),$Z=Pe(),iE=tE(),XZ=Sc(),JZ=jv();function QZ(e,t){var r=0;e.length!==t.length&&r++;for(var i=Math.min(e.length,t.length),n=0;n<i;++n)r+=e[n]^t[n];return r}function eW(e,t,r){if(t.length===12)return e._finID=Pi.concat([t,Pi.from([0,0,0,1])]),Pi.concat([t,Pi.from([0,0,0,2])]);var i=new iE(r),n=t.length,o=n%16;i.update(t),o&&(o=16-o,i.update(Pi.alloc(o,0))),i.update(Pi.alloc(8,0));var a=n*8,s=Pi.alloc(8);s.writeUIntBE(a,0,8),i.update(s),e._finID=i.state;var u=Pi.from(e._finID);return JZ(u),u}function Uu(e,t,r,i){rE.call(this);var n=Pi.alloc(4,0);this._cipher=new YZ.AES(t);var o=this._cipher.encryptBlock(n);this._ghash=new iE(o),r=eW(this,r,o),this._prev=Pi.from(r),this._cache=Pi.allocUnsafe(0),this._secCache=Pi.allocUnsafe(0),this._decrypt=i,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}$Z(Uu,rE);Uu.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=Pi.alloc(t,0),this._ghash.update(t))}this._called=!0;var r=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(r),this._len+=e.length,r};Uu.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=XZ(this._ghash.final(this._alen*8,this._len*8),this._cipher.encryptBlock(this._finID));if(this._decrypt&&QZ(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()};Uu.prototype.getAuthTag=function(){if(this._decrypt||!Pi.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag};Uu.prototype.setAuthTag=function(t){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=t};Uu.prototype.setAAD=function(t){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(t),this._alen+=t.length};nE.exports=Uu});var Xv=k((u0e,aE)=>{v();var tW=Zh(),$v=ot().Buffer,oE=va(),rW=Pe();function M2(e,t,r,i){oE.call(this),this._cipher=new tW.AES(t),this._prev=$v.from(r),this._cache=$v.allocUnsafe(0),this._secCache=$v.allocUnsafe(0),this._decrypt=i,this._mode=e}rW(M2,oE);M2.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)};M2.prototype._final=function(){this._cipher.scrub()};aE.exports=M2});var Yh=k((c0e,sE)=>{v();var Fu=ot().Buffer,iW=r2();function nW(e,t,r,i){if(Fu.isBuffer(e)||(e=Fu.from(e,"binary")),t&&(Fu.isBuffer(t)||(t=Fu.from(t,"binary")),t.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var n=r/8,o=Fu.alloc(n),a=Fu.alloc(i||0),s=Fu.alloc(0);n>0||i>0;){var u=new iW;u.update(s),u.update(e),t&&u.update(t),s=u.digest();var c=0;if(n>0){var l=o.length-n;c=Math.min(n,s.length),s.copy(o,l,0,c),n-=c}if(c<s.length&&i>0){var m=a.length-i,w=Math.min(i,s.length-c);s.copy(a,m,c,c+w),i-=w}}return s.fill(0),{key:o,iv:a}}sE.exports=nW});var lE=k(Jv=>{v();var uE=R2(),oW=Yv(),ya=ot().Buffer,aW=Xv(),fE=va(),sW=Zh(),uW=Yh(),fW=Pe();function $h(e,t,r){fE.call(this),this._cache=new C2,this._cipher=new sW.AES(t),this._prev=ya.from(r),this._mode=e,this._autopadding=!0}fW($h,fE);$h.prototype._update=function(e){this._cache.add(e);for(var t,r,i=[];t=this._cache.get();)r=this._mode.encrypt(this,t),i.push(r);return ya.concat(i)};var cW=ya.alloc(16,16);$h.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(cW))throw this._cipher.scrub(),new Error("data not multiple of block length")};$h.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this};function C2(){this.cache=ya.allocUnsafe(0)}C2.prototype.add=function(e){this.cache=ya.concat([this.cache,e])};C2.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null};C2.prototype.flush=function(){for(var e=16-this.cache.length,t=ya.allocUnsafe(e),r=-1;++r<e;)t.writeUInt8(e,r);return ya.concat([this.cache,t])};function cE(e,t,r){var i=uE[e.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if(typeof t=="string"&&(t=ya.from(t)),t.length!==i.key/8)throw new TypeError("invalid key length "+t.length);if(typeof r=="string"&&(r=ya.from(r)),i.mode!=="GCM"&&r.length!==i.iv)throw new TypeError("invalid iv length "+r.length);return i.type==="stream"?new aW(i.module,t,r):i.type==="auth"?new oW(i.module,t,r):new $h(i.module,t,r)}function lW(e,t){var r=uE[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=uW(t,!1,r.key,r.iv);return cE(e,i.key,i.iv)}Jv.createCipheriv=cE;Jv.createCipher=lW});var gE=k(Qv=>{v();var hW=Yv(),Ec=ot().Buffer,hE=R2(),dW=Xv(),dE=va(),pW=Zh(),gW=Yh(),vW=Pe();function Xh(e,t,r){dE.call(this),this._cache=new N2,this._last=void 0,this._cipher=new pW.AES(t),this._prev=Ec.from(r),this._mode=e,this._autopadding=!0}vW(Xh,dE);Xh.prototype._update=function(e){this._cache.add(e);for(var t,r,i=[];t=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,t),i.push(r);return Ec.concat(i)};Xh.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return mW(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")};Xh.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this};function N2(){this.cache=Ec.allocUnsafe(0)}N2.prototype.add=function(e){this.cache=Ec.concat([this.cache,e])};N2.prototype.get=function(e){var t;if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null};N2.prototype.flush=function(){if(this.cache.length)return this.cache};function mW(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");for(var r=-1;++r<t;)if(e[r+(16-t)]!==t)throw new Error("unable to decrypt data");if(t!==16)return e.slice(0,16-t)}function pE(e,t,r){var i=hE[e.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if(typeof r=="string"&&(r=Ec.from(r)),i.mode!=="GCM"&&r.length!==i.iv)throw new TypeError("invalid iv length "+r.length);if(typeof t=="string"&&(t=Ec.from(t)),t.length!==i.key/8)throw new TypeError("invalid key length "+t.length);return i.type==="stream"?new dW(i.module,t,r,!0):i.type==="auth"?new hW(i.module,t,r,!0):new Xh(i.module,t,r)}function yW(e,t){var r=hE[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=gW(t,!1,r.key,r.iv);return pE(e,i.key,i.iv)}Qv.createDecipher=yW;Qv.createDecipheriv=pE});var D2=k(Bn=>{v();var vE=lE(),mE=gE(),bW=Vv();function _W(){return Object.keys(bW)}Bn.createCipher=Bn.Cipher=vE.createCipher;Bn.createCipheriv=Bn.Cipheriv=vE.createCipheriv;Bn.createDecipher=Bn.Decipher=mE.createDecipher;Bn.createDecipheriv=Bn.Decipheriv=mE.createDecipheriv;Bn.listCiphers=Bn.getCiphers=_W});var yE=k(ba=>{v();ba["des-ecb"]={key:8,iv:0};ba["des-cbc"]=ba.des={key:8,iv:8};ba["des-ede3-cbc"]=ba.des3={key:24,iv:8};ba["des-ede3"]={key:24,iv:0};ba["des-ede-cbc"]={key:16,iv:8};ba["des-ede"]={key:16,iv:0}});var xE=k(Mn=>{v();var bE=Mx(),em=D2(),ls=R2(),_a=yE(),_E=Yh();function wW(e,t){e=e.toLowerCase();var r,i;if(ls[e])r=ls[e].key,i=ls[e].iv;else if(_a[e])r=_a[e].key*8,i=_a[e].iv;else throw new TypeError("invalid suite type");var n=_E(t,!1,r,i);return wE(e,n.key,n.iv)}function SW(e,t){e=e.toLowerCase();var r,i;if(ls[e])r=ls[e].key,i=ls[e].iv;else if(_a[e])r=_a[e].key*8,i=_a[e].iv;else throw new TypeError("invalid suite type");var n=_E(t,!1,r,i);return SE(e,n.key,n.iv)}function wE(e,t,r){if(e=e.toLowerCase(),ls[e])return em.createCipheriv(e,t,r);if(_a[e])return new bE({key:t,iv:r,mode:e});throw new TypeError("invalid suite type")}function SE(e,t,r){if(e=e.toLowerCase(),ls[e])return em.createDecipheriv(e,t,r);if(_a[e])return new bE({key:t,iv:r,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}function xW(){return Object.keys(_a).concat(em.getCiphers())}Mn.createCipher=Mn.Cipher=wW;Mn.createCipheriv=Mn.Cipheriv=wE;Mn.createDecipher=Mn.Decipher=SW;Mn.createDecipheriv=Mn.Decipheriv=SE;Mn.listCiphers=Mn.getCiphers=xW});var Cn=k((EE,tm)=>{v();(function(e,t){"use strict";function r(B,g){if(!B)throw new Error(g||"Assertion failed")}function i(B,g){B.super_=g;var I=function(){};I.prototype=g.prototype,B.prototype=new I,B.prototype.constructor=B}function n(B,g,I){if(n.isBN(B))return B;this.negative=0,this.words=null,this.length=0,this.red=null,B!==null&&((g==="le"||g==="be")&&(I=g,g=10),this._init(B||0,g||10,I||"be"))}typeof e=="object"?e.exports=n:t.BN=n,n.BN=n,n.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=Kt().Buffer}catch{}n.isBN=function(g){return g instanceof n?!0:g!==null&&typeof g=="object"&&g.constructor.wordSize===n.wordSize&&Array.isArray(g.words)},n.max=function(g,I){return g.cmp(I)>0?g:I},n.min=function(g,I){return g.cmp(I)<0?g:I},n.prototype._init=function(g,I,y){if(typeof g=="number")return this._initNumber(g,I,y);if(typeof g=="object")return this._initArray(g,I,y);I==="hex"&&(I=16),r(I===(I|0)&&I>=2&&I<=36),g=g.toString().replace(/\s+/g,"");var f=0;g[0]==="-"&&(f++,this.negative=1),f<g.length&&(I===16?this._parseHex(g,f,y):(this._parseBase(g,I,f),y==="le"&&this._initArray(this.toArray(),I,y)))},n.prototype._initNumber=function(g,I,y){g<0&&(this.negative=1,g=-g),g<67108864?(this.words=[g&67108863],this.length=1):g<4503599627370496?(this.words=[g&67108863,g/67108864&67108863],this.length=2):(r(g<9007199254740992),this.words=[g&67108863,g/67108864&67108863,1],this.length=3),y==="le"&&this._initArray(this.toArray(),I,y)},n.prototype._initArray=function(g,I,y){if(r(typeof g.length=="number"),g.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(g.length/3),this.words=new Array(this.length);for(var f=0;f<this.length;f++)this.words[f]=0;var p,_,x=0;if(y==="be")for(f=g.length-1,p=0;f>=0;f-=3)_=g[f]|g[f-1]<<8|g[f-2]<<16,this.words[p]|=_<<x&67108863,this.words[p+1]=_>>>26-x&67108863,x+=24,x>=26&&(x-=26,p++);else if(y==="le")for(f=0,p=0;f<g.length;f+=3)_=g[f]|g[f+1]<<8|g[f+2]<<16,this.words[p]|=_<<x&67108863,this.words[p+1]=_>>>26-x&67108863,x+=24,x>=26&&(x-=26,p++);return this.strip()};function a(B,g){var I=B.charCodeAt(g);return I>=65&&I<=70?I-55:I>=97&&I<=102?I-87:I-48&15}function s(B,g,I){var y=a(B,I);return I-1>=g&&(y|=a(B,I-1)<<4),y}n.prototype._parseHex=function(g,I,y){this.length=Math.ceil((g.length-I)/6),this.words=new Array(this.length);for(var f=0;f<this.length;f++)this.words[f]=0;var p=0,_=0,x;if(y==="be")for(f=g.length-1;f>=I;f-=2)x=s(g,I,f)<<p,this.words[_]|=x&67108863,p>=18?(p-=18,_+=1,this.words[_]|=x>>>26):p+=8;else{var b=g.length-I;for(f=b%2===0?I+1:I;f<g.length;f+=2)x=s(g,I,f)<<p,this.words[_]|=x&67108863,p>=18?(p-=18,_+=1,this.words[_]|=x>>>26):p+=8}this.strip()};function u(B,g,I,y){for(var f=0,p=Math.min(B.length,I),_=g;_<p;_++){var x=B.charCodeAt(_)-48;f*=y,x>=49?f+=x-49+10:x>=17?f+=x-17+10:f+=x}return f}n.prototype._parseBase=function(g,I,y){this.words=[0],this.length=1;for(var f=0,p=1;p<=67108863;p*=I)f++;f--,p=p/I|0;for(var _=g.length-y,x=_%f,b=Math.min(_,_-x)+y,d=0,O=y;O<b;O+=f)d=u(g,O,O+f,I),this.imuln(p),this.words[0]+d<67108864?this.words[0]+=d:this._iaddn(d);if(x!==0){var T=1;for(d=u(g,O,g.length,I),O=0;O<x;O++)T*=I;this.imuln(T),this.words[0]+d<67108864?this.words[0]+=d:this._iaddn(d)}this.strip()},n.prototype.copy=function(g){g.words=new Array(this.length);for(var I=0;I<this.length;I++)g.words[I]=this.words[I];g.length=this.length,g.negative=this.negative,g.red=this.red},n.prototype.clone=function(){var g=new n(null);return this.copy(g),g},n.prototype._expand=function(g){for(;this.length<g;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},n.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var c=["","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"],l=[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];n.prototype.toString=function(g,I){g=g||10,I=I|0||1;var y;if(g===16||g==="hex"){y="";for(var f=0,p=0,_=0;_<this.length;_++){var x=this.words[_],b=((x<<f|p)&16777215).toString(16);p=x>>>24-f&16777215,f+=2,f>=26&&(f-=26,_--),p!==0||_!==this.length-1?y=c[6-b.length]+b+y:y=b+y}for(p!==0&&(y=p.toString(16)+y);y.length%I!==0;)y="0"+y;return this.negative!==0&&(y="-"+y),y}if(g===(g|0)&&g>=2&&g<=36){var d=l[g],O=m[g];y="";var T=this.clone();for(T.negative=0;!T.isZero();){var S=T.modn(O).toString(g);T=T.idivn(O),T.isZero()?y=S+y:y=c[d-S.length]+S+y}for(this.isZero()&&(y="0"+y);y.length%I!==0;)y="0"+y;return this.negative!==0&&(y="-"+y),y}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var g=this.words[0];return this.length===2?g+=this.words[1]*67108864:this.length===3&&this.words[2]===1?g+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-g:g},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(g,I){return r(typeof o<"u"),this.toArrayLike(o,g,I)},n.prototype.toArray=function(g,I){return this.toArrayLike(Array,g,I)},n.prototype.toArrayLike=function(g,I,y){var f=this.byteLength(),p=y||Math.max(1,f);r(f<=p,"byte array longer than desired length"),r(p>0,"Requested array length <= 0"),this.strip();var _=I==="le",x=new g(p),b,d,O=this.clone();if(_){for(d=0;!O.isZero();d++)b=O.andln(255),O.iushrn(8),x[d]=b;for(;d<p;d++)x[d]=0}else{for(d=0;d<p-f;d++)x[d]=0;for(d=0;!O.isZero();d++)b=O.andln(255),O.iushrn(8),x[p-d-1]=b}return x},Math.clz32?n.prototype._countBits=function(g){return 32-Math.clz32(g)}:n.prototype._countBits=function(g){var I=g,y=0;return I>=4096&&(y+=13,I>>>=13),I>=64&&(y+=7,I>>>=7),I>=8&&(y+=4,I>>>=4),I>=2&&(y+=2,I>>>=2),y+I},n.prototype._zeroBits=function(g){if(g===0)return 26;var I=g,y=0;return(I&8191)===0&&(y+=13,I>>>=13),(I&127)===0&&(y+=7,I>>>=7),(I&15)===0&&(y+=4,I>>>=4),(I&3)===0&&(y+=2,I>>>=2),(I&1)===0&&y++,y},n.prototype.bitLength=function(){var g=this.words[this.length-1],I=this._countBits(g);return(this.length-1)*26+I};function w(B){for(var g=new Array(B.bitLength()),I=0;I<g.length;I++){var y=I/26|0,f=I%26;g[I]=(B.words[y]&1<<f)>>>f}return g}n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var g=0,I=0;I<this.length;I++){var y=this._zeroBits(this.words[I]);if(g+=y,y!==26)break}return g},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(g){return this.negative!==0?this.abs().inotn(g).iaddn(1):this.clone()},n.prototype.fromTwos=function(g){return this.testn(g-1)?this.notn(g).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return this.negative!==0},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(g){for(;this.length<g.length;)this.words[this.length++]=0;for(var I=0;I<g.length;I++)this.words[I]=this.words[I]|g.words[I];return this.strip()},n.prototype.ior=function(g){return r((this.negative|g.negative)===0),this.iuor(g)},n.prototype.or=function(g){return this.length>g.length?this.clone().ior(g):g.clone().ior(this)},n.prototype.uor=function(g){return this.length>g.length?this.clone().iuor(g):g.clone().iuor(this)},n.prototype.iuand=function(g){var I;this.length>g.length?I=g:I=this;for(var y=0;y<I.length;y++)this.words[y]=this.words[y]&g.words[y];return this.length=I.length,this.strip()},n.prototype.iand=function(g){return r((this.negative|g.negative)===0),this.iuand(g)},n.prototype.and=function(g){return this.length>g.length?this.clone().iand(g):g.clone().iand(this)},n.prototype.uand=function(g){return this.length>g.length?this.clone().iuand(g):g.clone().iuand(this)},n.prototype.iuxor=function(g){var I,y;this.length>g.length?(I=this,y=g):(I=g,y=this);for(var f=0;f<y.length;f++)this.words[f]=I.words[f]^y.words[f];if(this!==I)for(;f<I.length;f++)this.words[f]=I.words[f];return this.length=I.length,this.strip()},n.prototype.ixor=function(g){return r((this.negative|g.negative)===0),this.iuxor(g)},n.prototype.xor=function(g){return this.length>g.length?this.clone().ixor(g):g.clone().ixor(this)},n.prototype.uxor=function(g){return this.length>g.length?this.clone().iuxor(g):g.clone().iuxor(this)},n.prototype.inotn=function(g){r(typeof g=="number"&&g>=0);var I=Math.ceil(g/26)|0,y=g%26;this._expand(I),y>0&&I--;for(var f=0;f<I;f++)this.words[f]=~this.words[f]&67108863;return y>0&&(this.words[f]=~this.words[f]&67108863>>26-y),this.strip()},n.prototype.notn=function(g){return this.clone().inotn(g)},n.prototype.setn=function(g,I){r(typeof g=="number"&&g>=0);var y=g/26|0,f=g%26;return this._expand(y+1),I?this.words[y]=this.words[y]|1<<f:this.words[y]=this.words[y]&~(1<<f),this.strip()},n.prototype.iadd=function(g){var I;if(this.negative!==0&&g.negative===0)return this.negative=0,I=this.isub(g),this.negative^=1,this._normSign();if(this.negative===0&&g.negative!==0)return g.negative=0,I=this.isub(g),g.negative=1,I._normSign();var y,f;this.length>g.length?(y=this,f=g):(y=g,f=this);for(var p=0,_=0;_<f.length;_++)I=(y.words[_]|0)+(f.words[_]|0)+p,this.words[_]=I&67108863,p=I>>>26;for(;p!==0&&_<y.length;_++)I=(y.words[_]|0)+p,this.words[_]=I&67108863,p=I>>>26;if(this.length=y.length,p!==0)this.words[this.length]=p,this.length++;else if(y!==this)for(;_<y.length;_++)this.words[_]=y.words[_];return this},n.prototype.add=function(g){var I;return g.negative!==0&&this.negative===0?(g.negative=0,I=this.sub(g),g.negative^=1,I):g.negative===0&&this.negative!==0?(this.negative=0,I=g.sub(this),this.negative=1,I):this.length>g.length?this.clone().iadd(g):g.clone().iadd(this)},n.prototype.isub=function(g){if(g.negative!==0){g.negative=0;var I=this.iadd(g);return g.negative=1,I._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(g),this.negative=1,this._normSign();var y=this.cmp(g);if(y===0)return this.negative=0,this.length=1,this.words[0]=0,this;var f,p;y>0?(f=this,p=g):(f=g,p=this);for(var _=0,x=0;x<p.length;x++)I=(f.words[x]|0)-(p.words[x]|0)+_,_=I>>26,this.words[x]=I&67108863;for(;_!==0&&x<f.length;x++)I=(f.words[x]|0)+_,_=I>>26,this.words[x]=I&67108863;if(_===0&&x<f.length&&f!==this)for(;x<f.length;x++)this.words[x]=f.words[x];return this.length=Math.max(this.length,x),f!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(g){return this.clone().isub(g)};function E(B,g,I){I.negative=g.negative^B.negative;var y=B.length+g.length|0;I.length=y,y=y-1|0;var f=B.words[0]|0,p=g.words[0]|0,_=f*p,x=_&67108863,b=_/67108864|0;I.words[0]=x;for(var d=1;d<y;d++){for(var O=b>>>26,T=b&67108863,S=Math.min(d,g.length-1),R=Math.max(0,d-B.length+1);R<=S;R++){var Y=d-R|0;f=B.words[Y]|0,p=g.words[R]|0,_=f*p+T,O+=_/67108864|0,T=_&67108863}I.words[d]=T|0,b=O|0}return b!==0?I.words[d]=b|0:I.length--,I.strip()}var P=function(g,I,y){var f=g.words,p=I.words,_=y.words,x=0,b,d,O,T=f[0]|0,S=T&8191,R=T>>>13,Y=f[1]|0,X=Y&8191,ne=Y>>>13,ce=f[2]|0,pe=ce&8191,q=ce>>>13,W=f[3]|0,$=W&8191,ee=W>>>13,se=f[4]|0,ue=se&8191,le=se>>>13,Ae=f[5]|0,ge=Ae&8191,ve=Ae>>>13,sr=f[6]|0,xe=sr&8191,ye=sr>>>13,Be=f[7]|0,be=Be&8191,_e=Be>>>13,Qi=f[8]|0,Ce=Qi&8191,Re=Qi>>>13,Js=f[9]|0,De=Js&8191,qe=Js>>>13,Wl=p[0]|0,Ue=Wl&8191,Fe=Wl>>>13,Yl=p[1]|0,He=Yl&8191,je=Yl>>>13,$l=p[2]|0,ze=$l&8191,Ke=$l>>>13,Xl=p[3]|0,Ve=Xl&8191,Ge=Xl>>>13,Jl=p[4]|0,Ze=Jl&8191,We=Jl>>>13,Ql=p[5]|0,Ye=Ql&8191,$e=Ql>>>13,eh=p[6]|0,Xe=eh&8191,Je=eh>>>13,th=p[7]|0,Qe=th&8191,et=th>>>13,rh=p[8]|0,tt=rh&8191,rt=rh>>>13,ih=p[9]|0,it=ih&8191,nt=ih>>>13;y.negative=g.negative^I.negative,y.length=19,b=Math.imul(S,Ue),d=Math.imul(S,Fe),d=d+Math.imul(R,Ue)|0,O=Math.imul(R,Fe);var Gf=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(Gf>>>26)|0,Gf&=67108863,b=Math.imul(X,Ue),d=Math.imul(X,Fe),d=d+Math.imul(ne,Ue)|0,O=Math.imul(ne,Fe),b=b+Math.imul(S,He)|0,d=d+Math.imul(S,je)|0,d=d+Math.imul(R,He)|0,O=O+Math.imul(R,je)|0;var Jt=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,b=Math.imul(pe,Ue),d=Math.imul(pe,Fe),d=d+Math.imul(q,Ue)|0,O=Math.imul(q,Fe),b=b+Math.imul(X,He)|0,d=d+Math.imul(X,je)|0,d=d+Math.imul(ne,He)|0,O=O+Math.imul(ne,je)|0,b=b+Math.imul(S,ze)|0,d=d+Math.imul(S,Ke)|0,d=d+Math.imul(R,ze)|0,O=O+Math.imul(R,Ke)|0;var Qt=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,b=Math.imul($,Ue),d=Math.imul($,Fe),d=d+Math.imul(ee,Ue)|0,O=Math.imul(ee,Fe),b=b+Math.imul(pe,He)|0,d=d+Math.imul(pe,je)|0,d=d+Math.imul(q,He)|0,O=O+Math.imul(q,je)|0,b=b+Math.imul(X,ze)|0,d=d+Math.imul(X,Ke)|0,d=d+Math.imul(ne,ze)|0,O=O+Math.imul(ne,Ke)|0,b=b+Math.imul(S,Ve)|0,d=d+Math.imul(S,Ge)|0,d=d+Math.imul(R,Ve)|0,O=O+Math.imul(R,Ge)|0;var Qs=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(Qs>>>26)|0,Qs&=67108863,b=Math.imul(ue,Ue),d=Math.imul(ue,Fe),d=d+Math.imul(le,Ue)|0,O=Math.imul(le,Fe),b=b+Math.imul($,He)|0,d=d+Math.imul($,je)|0,d=d+Math.imul(ee,He)|0,O=O+Math.imul(ee,je)|0,b=b+Math.imul(pe,ze)|0,d=d+Math.imul(pe,Ke)|0,d=d+Math.imul(q,ze)|0,O=O+Math.imul(q,Ke)|0,b=b+Math.imul(X,Ve)|0,d=d+Math.imul(X,Ge)|0,d=d+Math.imul(ne,Ve)|0,O=O+Math.imul(ne,Ge)|0,b=b+Math.imul(S,Ze)|0,d=d+Math.imul(S,We)|0,d=d+Math.imul(R,Ze)|0,O=O+Math.imul(R,We)|0;var eu=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(eu>>>26)|0,eu&=67108863,b=Math.imul(ge,Ue),d=Math.imul(ge,Fe),d=d+Math.imul(ve,Ue)|0,O=Math.imul(ve,Fe),b=b+Math.imul(ue,He)|0,d=d+Math.imul(ue,je)|0,d=d+Math.imul(le,He)|0,O=O+Math.imul(le,je)|0,b=b+Math.imul($,ze)|0,d=d+Math.imul($,Ke)|0,d=d+Math.imul(ee,ze)|0,O=O+Math.imul(ee,Ke)|0,b=b+Math.imul(pe,Ve)|0,d=d+Math.imul(pe,Ge)|0,d=d+Math.imul(q,Ve)|0,O=O+Math.imul(q,Ge)|0,b=b+Math.imul(X,Ze)|0,d=d+Math.imul(X,We)|0,d=d+Math.imul(ne,Ze)|0,O=O+Math.imul(ne,We)|0,b=b+Math.imul(S,Ye)|0,d=d+Math.imul(S,$e)|0,d=d+Math.imul(R,Ye)|0,O=O+Math.imul(R,$e)|0;var tu=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(tu>>>26)|0,tu&=67108863,b=Math.imul(xe,Ue),d=Math.imul(xe,Fe),d=d+Math.imul(ye,Ue)|0,O=Math.imul(ye,Fe),b=b+Math.imul(ge,He)|0,d=d+Math.imul(ge,je)|0,d=d+Math.imul(ve,He)|0,O=O+Math.imul(ve,je)|0,b=b+Math.imul(ue,ze)|0,d=d+Math.imul(ue,Ke)|0,d=d+Math.imul(le,ze)|0,O=O+Math.imul(le,Ke)|0,b=b+Math.imul($,Ve)|0,d=d+Math.imul($,Ge)|0,d=d+Math.imul(ee,Ve)|0,O=O+Math.imul(ee,Ge)|0,b=b+Math.imul(pe,Ze)|0,d=d+Math.imul(pe,We)|0,d=d+Math.imul(q,Ze)|0,O=O+Math.imul(q,We)|0,b=b+Math.imul(X,Ye)|0,d=d+Math.imul(X,$e)|0,d=d+Math.imul(ne,Ye)|0,O=O+Math.imul(ne,$e)|0,b=b+Math.imul(S,Xe)|0,d=d+Math.imul(S,Je)|0,d=d+Math.imul(R,Xe)|0,O=O+Math.imul(R,Je)|0;var ru=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(ru>>>26)|0,ru&=67108863,b=Math.imul(be,Ue),d=Math.imul(be,Fe),d=d+Math.imul(_e,Ue)|0,O=Math.imul(_e,Fe),b=b+Math.imul(xe,He)|0,d=d+Math.imul(xe,je)|0,d=d+Math.imul(ye,He)|0,O=O+Math.imul(ye,je)|0,b=b+Math.imul(ge,ze)|0,d=d+Math.imul(ge,Ke)|0,d=d+Math.imul(ve,ze)|0,O=O+Math.imul(ve,Ke)|0,b=b+Math.imul(ue,Ve)|0,d=d+Math.imul(ue,Ge)|0,d=d+Math.imul(le,Ve)|0,O=O+Math.imul(le,Ge)|0,b=b+Math.imul($,Ze)|0,d=d+Math.imul($,We)|0,d=d+Math.imul(ee,Ze)|0,O=O+Math.imul(ee,We)|0,b=b+Math.imul(pe,Ye)|0,d=d+Math.imul(pe,$e)|0,d=d+Math.imul(q,Ye)|0,O=O+Math.imul(q,$e)|0,b=b+Math.imul(X,Xe)|0,d=d+Math.imul(X,Je)|0,d=d+Math.imul(ne,Xe)|0,O=O+Math.imul(ne,Je)|0,b=b+Math.imul(S,Qe)|0,d=d+Math.imul(S,et)|0,d=d+Math.imul(R,Qe)|0,O=O+Math.imul(R,et)|0;var iu=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(iu>>>26)|0,iu&=67108863,b=Math.imul(Ce,Ue),d=Math.imul(Ce,Fe),d=d+Math.imul(Re,Ue)|0,O=Math.imul(Re,Fe),b=b+Math.imul(be,He)|0,d=d+Math.imul(be,je)|0,d=d+Math.imul(_e,He)|0,O=O+Math.imul(_e,je)|0,b=b+Math.imul(xe,ze)|0,d=d+Math.imul(xe,Ke)|0,d=d+Math.imul(ye,ze)|0,O=O+Math.imul(ye,Ke)|0,b=b+Math.imul(ge,Ve)|0,d=d+Math.imul(ge,Ge)|0,d=d+Math.imul(ve,Ve)|0,O=O+Math.imul(ve,Ge)|0,b=b+Math.imul(ue,Ze)|0,d=d+Math.imul(ue,We)|0,d=d+Math.imul(le,Ze)|0,O=O+Math.imul(le,We)|0,b=b+Math.imul($,Ye)|0,d=d+Math.imul($,$e)|0,d=d+Math.imul(ee,Ye)|0,O=O+Math.imul(ee,$e)|0,b=b+Math.imul(pe,Xe)|0,d=d+Math.imul(pe,Je)|0,d=d+Math.imul(q,Xe)|0,O=O+Math.imul(q,Je)|0,b=b+Math.imul(X,Qe)|0,d=d+Math.imul(X,et)|0,d=d+Math.imul(ne,Qe)|0,O=O+Math.imul(ne,et)|0,b=b+Math.imul(S,tt)|0,d=d+Math.imul(S,rt)|0,d=d+Math.imul(R,tt)|0,O=O+Math.imul(R,rt)|0;var nu=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(nu>>>26)|0,nu&=67108863,b=Math.imul(De,Ue),d=Math.imul(De,Fe),d=d+Math.imul(qe,Ue)|0,O=Math.imul(qe,Fe),b=b+Math.imul(Ce,He)|0,d=d+Math.imul(Ce,je)|0,d=d+Math.imul(Re,He)|0,O=O+Math.imul(Re,je)|0,b=b+Math.imul(be,ze)|0,d=d+Math.imul(be,Ke)|0,d=d+Math.imul(_e,ze)|0,O=O+Math.imul(_e,Ke)|0,b=b+Math.imul(xe,Ve)|0,d=d+Math.imul(xe,Ge)|0,d=d+Math.imul(ye,Ve)|0,O=O+Math.imul(ye,Ge)|0,b=b+Math.imul(ge,Ze)|0,d=d+Math.imul(ge,We)|0,d=d+Math.imul(ve,Ze)|0,O=O+Math.imul(ve,We)|0,b=b+Math.imul(ue,Ye)|0,d=d+Math.imul(ue,$e)|0,d=d+Math.imul(le,Ye)|0,O=O+Math.imul(le,$e)|0,b=b+Math.imul($,Xe)|0,d=d+Math.imul($,Je)|0,d=d+Math.imul(ee,Xe)|0,O=O+Math.imul(ee,Je)|0,b=b+Math.imul(pe,Qe)|0,d=d+Math.imul(pe,et)|0,d=d+Math.imul(q,Qe)|0,O=O+Math.imul(q,et)|0,b=b+Math.imul(X,tt)|0,d=d+Math.imul(X,rt)|0,d=d+Math.imul(ne,tt)|0,O=O+Math.imul(ne,rt)|0,b=b+Math.imul(S,it)|0,d=d+Math.imul(S,nt)|0,d=d+Math.imul(R,it)|0,O=O+Math.imul(R,nt)|0;var ou=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(ou>>>26)|0,ou&=67108863,b=Math.imul(De,He),d=Math.imul(De,je),d=d+Math.imul(qe,He)|0,O=Math.imul(qe,je),b=b+Math.imul(Ce,ze)|0,d=d+Math.imul(Ce,Ke)|0,d=d+Math.imul(Re,ze)|0,O=O+Math.imul(Re,Ke)|0,b=b+Math.imul(be,Ve)|0,d=d+Math.imul(be,Ge)|0,d=d+Math.imul(_e,Ve)|0,O=O+Math.imul(_e,Ge)|0,b=b+Math.imul(xe,Ze)|0,d=d+Math.imul(xe,We)|0,d=d+Math.imul(ye,Ze)|0,O=O+Math.imul(ye,We)|0,b=b+Math.imul(ge,Ye)|0,d=d+Math.imul(ge,$e)|0,d=d+Math.imul(ve,Ye)|0,O=O+Math.imul(ve,$e)|0,b=b+Math.imul(ue,Xe)|0,d=d+Math.imul(ue,Je)|0,d=d+Math.imul(le,Xe)|0,O=O+Math.imul(le,Je)|0,b=b+Math.imul($,Qe)|0,d=d+Math.imul($,et)|0,d=d+Math.imul(ee,Qe)|0,O=O+Math.imul(ee,et)|0,b=b+Math.imul(pe,tt)|0,d=d+Math.imul(pe,rt)|0,d=d+Math.imul(q,tt)|0,O=O+Math.imul(q,rt)|0,b=b+Math.imul(X,it)|0,d=d+Math.imul(X,nt)|0,d=d+Math.imul(ne,it)|0,O=O+Math.imul(ne,nt)|0;var au=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(au>>>26)|0,au&=67108863,b=Math.imul(De,ze),d=Math.imul(De,Ke),d=d+Math.imul(qe,ze)|0,O=Math.imul(qe,Ke),b=b+Math.imul(Ce,Ve)|0,d=d+Math.imul(Ce,Ge)|0,d=d+Math.imul(Re,Ve)|0,O=O+Math.imul(Re,Ge)|0,b=b+Math.imul(be,Ze)|0,d=d+Math.imul(be,We)|0,d=d+Math.imul(_e,Ze)|0,O=O+Math.imul(_e,We)|0,b=b+Math.imul(xe,Ye)|0,d=d+Math.imul(xe,$e)|0,d=d+Math.imul(ye,Ye)|0,O=O+Math.imul(ye,$e)|0,b=b+Math.imul(ge,Xe)|0,d=d+Math.imul(ge,Je)|0,d=d+Math.imul(ve,Xe)|0,O=O+Math.imul(ve,Je)|0,b=b+Math.imul(ue,Qe)|0,d=d+Math.imul(ue,et)|0,d=d+Math.imul(le,Qe)|0,O=O+Math.imul(le,et)|0,b=b+Math.imul($,tt)|0,d=d+Math.imul($,rt)|0,d=d+Math.imul(ee,tt)|0,O=O+Math.imul(ee,rt)|0,b=b+Math.imul(pe,it)|0,d=d+Math.imul(pe,nt)|0,d=d+Math.imul(q,it)|0,O=O+Math.imul(q,nt)|0;var su=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(su>>>26)|0,su&=67108863,b=Math.imul(De,Ve),d=Math.imul(De,Ge),d=d+Math.imul(qe,Ve)|0,O=Math.imul(qe,Ge),b=b+Math.imul(Ce,Ze)|0,d=d+Math.imul(Ce,We)|0,d=d+Math.imul(Re,Ze)|0,O=O+Math.imul(Re,We)|0,b=b+Math.imul(be,Ye)|0,d=d+Math.imul(be,$e)|0,d=d+Math.imul(_e,Ye)|0,O=O+Math.imul(_e,$e)|0,b=b+Math.imul(xe,Xe)|0,d=d+Math.imul(xe,Je)|0,d=d+Math.imul(ye,Xe)|0,O=O+Math.imul(ye,Je)|0,b=b+Math.imul(ge,Qe)|0,d=d+Math.imul(ge,et)|0,d=d+Math.imul(ve,Qe)|0,O=O+Math.imul(ve,et)|0,b=b+Math.imul(ue,tt)|0,d=d+Math.imul(ue,rt)|0,d=d+Math.imul(le,tt)|0,O=O+Math.imul(le,rt)|0,b=b+Math.imul($,it)|0,d=d+Math.imul($,nt)|0,d=d+Math.imul(ee,it)|0,O=O+Math.imul(ee,nt)|0;var uu=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(uu>>>26)|0,uu&=67108863,b=Math.imul(De,Ze),d=Math.imul(De,We),d=d+Math.imul(qe,Ze)|0,O=Math.imul(qe,We),b=b+Math.imul(Ce,Ye)|0,d=d+Math.imul(Ce,$e)|0,d=d+Math.imul(Re,Ye)|0,O=O+Math.imul(Re,$e)|0,b=b+Math.imul(be,Xe)|0,d=d+Math.imul(be,Je)|0,d=d+Math.imul(_e,Xe)|0,O=O+Math.imul(_e,Je)|0,b=b+Math.imul(xe,Qe)|0,d=d+Math.imul(xe,et)|0,d=d+Math.imul(ye,Qe)|0,O=O+Math.imul(ye,et)|0,b=b+Math.imul(ge,tt)|0,d=d+Math.imul(ge,rt)|0,d=d+Math.imul(ve,tt)|0,O=O+Math.imul(ve,rt)|0,b=b+Math.imul(ue,it)|0,d=d+Math.imul(ue,nt)|0,d=d+Math.imul(le,it)|0,O=O+Math.imul(le,nt)|0;var fu=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(fu>>>26)|0,fu&=67108863,b=Math.imul(De,Ye),d=Math.imul(De,$e),d=d+Math.imul(qe,Ye)|0,O=Math.imul(qe,$e),b=b+Math.imul(Ce,Xe)|0,d=d+Math.imul(Ce,Je)|0,d=d+Math.imul(Re,Xe)|0,O=O+Math.imul(Re,Je)|0,b=b+Math.imul(be,Qe)|0,d=d+Math.imul(be,et)|0,d=d+Math.imul(_e,Qe)|0,O=O+Math.imul(_e,et)|0,b=b+Math.imul(xe,tt)|0,d=d+Math.imul(xe,rt)|0,d=d+Math.imul(ye,tt)|0,O=O+Math.imul(ye,rt)|0,b=b+Math.imul(ge,it)|0,d=d+Math.imul(ge,nt)|0,d=d+Math.imul(ve,it)|0,O=O+Math.imul(ve,nt)|0;var cu=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(cu>>>26)|0,cu&=67108863,b=Math.imul(De,Xe),d=Math.imul(De,Je),d=d+Math.imul(qe,Xe)|0,O=Math.imul(qe,Je),b=b+Math.imul(Ce,Qe)|0,d=d+Math.imul(Ce,et)|0,d=d+Math.imul(Re,Qe)|0,O=O+Math.imul(Re,et)|0,b=b+Math.imul(be,tt)|0,d=d+Math.imul(be,rt)|0,d=d+Math.imul(_e,tt)|0,O=O+Math.imul(_e,rt)|0,b=b+Math.imul(xe,it)|0,d=d+Math.imul(xe,nt)|0,d=d+Math.imul(ye,it)|0,O=O+Math.imul(ye,nt)|0;var lu=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(lu>>>26)|0,lu&=67108863,b=Math.imul(De,Qe),d=Math.imul(De,et),d=d+Math.imul(qe,Qe)|0,O=Math.imul(qe,et),b=b+Math.imul(Ce,tt)|0,d=d+Math.imul(Ce,rt)|0,d=d+Math.imul(Re,tt)|0,O=O+Math.imul(Re,rt)|0,b=b+Math.imul(be,it)|0,d=d+Math.imul(be,nt)|0,d=d+Math.imul(_e,it)|0,O=O+Math.imul(_e,nt)|0;var hu=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(hu>>>26)|0,hu&=67108863,b=Math.imul(De,tt),d=Math.imul(De,rt),d=d+Math.imul(qe,tt)|0,O=Math.imul(qe,rt),b=b+Math.imul(Ce,it)|0,d=d+Math.imul(Ce,nt)|0,d=d+Math.imul(Re,it)|0,O=O+Math.imul(Re,nt)|0;var du=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(du>>>26)|0,du&=67108863,b=Math.imul(De,it),d=Math.imul(De,nt),d=d+Math.imul(qe,it)|0,O=Math.imul(qe,nt);var pu=(x+b|0)+((d&8191)<<13)|0;return x=(O+(d>>>13)|0)+(pu>>>26)|0,pu&=67108863,_[0]=Gf,_[1]=Jt,_[2]=Qt,_[3]=Qs,_[4]=eu,_[5]=tu,_[6]=ru,_[7]=iu,_[8]=nu,_[9]=ou,_[10]=au,_[11]=su,_[12]=uu,_[13]=fu,_[14]=cu,_[15]=lu,_[16]=hu,_[17]=du,_[18]=pu,x!==0&&(_[19]=x,y.length++),y};Math.imul||(P=E);function M(B,g,I){I.negative=g.negative^B.negative,I.length=B.length+g.length;for(var y=0,f=0,p=0;p<I.length-1;p++){var _=f;f=0;for(var x=y&67108863,b=Math.min(p,g.length-1),d=Math.max(0,p-B.length+1);d<=b;d++){var O=p-d,T=B.words[O]|0,S=g.words[d]|0,R=T*S,Y=R&67108863;_=_+(R/67108864|0)|0,Y=Y+x|0,x=Y&67108863,_=_+(Y>>>26)|0,f+=_>>>26,_&=67108863}I.words[p]=x,y=_,_=f}return y!==0?I.words[p]=y:I.length--,I.strip()}function D(B,g,I){var y=new L;return y.mulp(B,g,I)}n.prototype.mulTo=function(g,I){var y,f=this.length+g.length;return this.length===10&&g.length===10?y=P(this,g,I):f<63?y=E(this,g,I):f<1024?y=M(this,g,I):y=D(this,g,I),y};function L(B,g){this.x=B,this.y=g}L.prototype.makeRBT=function(g){for(var I=new Array(g),y=n.prototype._countBits(g)-1,f=0;f<g;f++)I[f]=this.revBin(f,y,g);return I},L.prototype.revBin=function(g,I,y){if(g===0||g===y-1)return g;for(var f=0,p=0;p<I;p++)f|=(g&1)<<I-p-1,g>>=1;return f},L.prototype.permute=function(g,I,y,f,p,_){for(var x=0;x<_;x++)f[x]=I[g[x]],p[x]=y[g[x]]},L.prototype.transform=function(g,I,y,f,p,_){this.permute(_,g,I,y,f,p);for(var x=1;x<p;x<<=1)for(var b=x<<1,d=Math.cos(2*Math.PI/b),O=Math.sin(2*Math.PI/b),T=0;T<p;T+=b)for(var S=d,R=O,Y=0;Y<x;Y++){var X=y[T+Y],ne=f[T+Y],ce=y[T+Y+x],pe=f[T+Y+x],q=S*ce-R*pe;pe=S*pe+R*ce,ce=q,y[T+Y]=X+ce,f[T+Y]=ne+pe,y[T+Y+x]=X-ce,f[T+Y+x]=ne-pe,Y!==b&&(q=d*S-O*R,R=d*R+O*S,S=q)}},L.prototype.guessLen13b=function(g,I){var y=Math.max(I,g)|1,f=y&1,p=0;for(y=y/2|0;y;y=y>>>1)p++;return 1<<p+1+f},L.prototype.conjugate=function(g,I,y){if(!(y<=1))for(var f=0;f<y/2;f++){var p=g[f];g[f]=g[y-f-1],g[y-f-1]=p,p=I[f],I[f]=-I[y-f-1],I[y-f-1]=-p}},L.prototype.normalize13b=function(g,I){for(var y=0,f=0;f<I/2;f++){var p=Math.round(g[2*f+1]/I)*8192+Math.round(g[2*f]/I)+y;g[f]=p&67108863,p<67108864?y=0:y=p/67108864|0}return g},L.prototype.convert13b=function(g,I,y,f){for(var p=0,_=0;_<I;_++)p=p+(g[_]|0),y[2*_]=p&8191,p=p>>>13,y[2*_+1]=p&8191,p=p>>>13;for(_=2*I;_<f;++_)y[_]=0;r(p===0),r((p&-8192)===0)},L.prototype.stub=function(g){for(var I=new Array(g),y=0;y<g;y++)I[y]=0;return I},L.prototype.mulp=function(g,I,y){var f=2*this.guessLen13b(g.length,I.length),p=this.makeRBT(f),_=this.stub(f),x=new Array(f),b=new Array(f),d=new Array(f),O=new Array(f),T=new Array(f),S=new Array(f),R=y.words;R.length=f,this.convert13b(g.words,g.length,x,f),this.convert13b(I.words,I.length,O,f),this.transform(x,_,b,d,f,p),this.transform(O,_,T,S,f,p);for(var Y=0;Y<f;Y++){var X=b[Y]*T[Y]-d[Y]*S[Y];d[Y]=b[Y]*S[Y]+d[Y]*T[Y],b[Y]=X}return this.conjugate(b,d,f),this.transform(b,d,R,_,f,p),this.conjugate(R,_,f),this.normalize13b(R,f),y.negative=g.negative^I.negative,y.length=g.length+I.length,y.strip()},n.prototype.mul=function(g){var I=new n(null);return I.words=new Array(this.length+g.length),this.mulTo(g,I)},n.prototype.mulf=function(g){var I=new n(null);return I.words=new Array(this.length+g.length),D(this,g,I)},n.prototype.imul=function(g){return this.clone().mulTo(g,this)},n.prototype.imuln=function(g){r(typeof g=="number"),r(g<67108864);for(var I=0,y=0;y<this.length;y++){var f=(this.words[y]|0)*g,p=(f&67108863)+(I&67108863);I>>=26,I+=f/67108864|0,I+=p>>>26,this.words[y]=p&67108863}return I!==0&&(this.words[y]=I,this.length++),this.length=g===0?1:this.length,this},n.prototype.muln=function(g){return this.clone().imuln(g)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(g){var I=w(g);if(I.length===0)return new n(1);for(var y=this,f=0;f<I.length&&I[f]===0;f++,y=y.sqr());if(++f<I.length)for(var p=y.sqr();f<I.length;f++,p=p.sqr())I[f]!==0&&(y=y.mul(p));return y},n.prototype.iushln=function(g){r(typeof g=="number"&&g>=0);var I=g%26,y=(g-I)/26,f=67108863>>>26-I<<26-I,p;if(I!==0){var _=0;for(p=0;p<this.length;p++){var x=this.words[p]&f,b=(this.words[p]|0)-x<<I;this.words[p]=b|_,_=x>>>26-I}_&&(this.words[p]=_,this.length++)}if(y!==0){for(p=this.length-1;p>=0;p--)this.words[p+y]=this.words[p];for(p=0;p<y;p++)this.words[p]=0;this.length+=y}return this.strip()},n.prototype.ishln=function(g){return r(this.negative===0),this.iushln(g)},n.prototype.iushrn=function(g,I,y){r(typeof g=="number"&&g>=0);var f;I?f=(I-I%26)/26:f=0;var p=g%26,_=Math.min((g-p)/26,this.length),x=67108863^67108863>>>p<<p,b=y;if(f-=_,f=Math.max(0,f),b){for(var d=0;d<_;d++)b.words[d]=this.words[d];b.length=_}if(_!==0)if(this.length>_)for(this.length-=_,d=0;d<this.length;d++)this.words[d]=this.words[d+_];else this.words[0]=0,this.length=1;var O=0;for(d=this.length-1;d>=0&&(O!==0||d>=f);d--){var T=this.words[d]|0;this.words[d]=O<<26-p|T>>>p,O=T&x}return b&&O!==0&&(b.words[b.length++]=O),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(g,I,y){return r(this.negative===0),this.iushrn(g,I,y)},n.prototype.shln=function(g){return this.clone().ishln(g)},n.prototype.ushln=function(g){return this.clone().iushln(g)},n.prototype.shrn=function(g){return this.clone().ishrn(g)},n.prototype.ushrn=function(g){return this.clone().iushrn(g)},n.prototype.testn=function(g){r(typeof g=="number"&&g>=0);var I=g%26,y=(g-I)/26,f=1<<I;if(this.length<=y)return!1;var p=this.words[y];return!!(p&f)},n.prototype.imaskn=function(g){r(typeof g=="number"&&g>=0);var I=g%26,y=(g-I)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=y)return this;if(I!==0&&y++,this.length=Math.min(y,this.length),I!==0){var f=67108863^67108863>>>I<<I;this.words[this.length-1]&=f}return this.length===0&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.maskn=function(g){return this.clone().imaskn(g)},n.prototype.iaddn=function(g){return r(typeof g=="number"),r(g<67108864),g<0?this.isubn(-g):this.negative!==0?this.length===1&&(this.words[0]|0)<g?(this.words[0]=g-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(g),this.negative=1,this):this._iaddn(g)},n.prototype._iaddn=function(g){this.words[0]+=g;for(var I=0;I<this.length&&this.words[I]>=67108864;I++)this.words[I]-=67108864,I===this.length-1?this.words[I+1]=1:this.words[I+1]++;return this.length=Math.max(this.length,I+1),this},n.prototype.isubn=function(g){if(r(typeof g=="number"),r(g<67108864),g<0)return this.iaddn(-g);if(this.negative!==0)return this.negative=0,this.iaddn(g),this.negative=1,this;if(this.words[0]-=g,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var I=0;I<this.length&&this.words[I]<0;I++)this.words[I]+=67108864,this.words[I+1]-=1;return this.strip()},n.prototype.addn=function(g){return this.clone().iaddn(g)},n.prototype.subn=function(g){return this.clone().isubn(g)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(g,I,y){var f=g.length+y,p;this._expand(f);var _,x=0;for(p=0;p<g.length;p++){_=(this.words[p+y]|0)+x;var b=(g.words[p]|0)*I;_-=b&67108863,x=(_>>26)-(b/67108864|0),this.words[p+y]=_&67108863}for(;p<this.length-y;p++)_=(this.words[p+y]|0)+x,x=_>>26,this.words[p+y]=_&67108863;if(x===0)return this.strip();for(r(x===-1),x=0,p=0;p<this.length;p++)_=-(this.words[p]|0)+x,x=_>>26,this.words[p]=_&67108863;return this.negative=1,this.strip()},n.prototype._wordDiv=function(g,I){var y=this.length-g.length,f=this.clone(),p=g,_=p.words[p.length-1]|0,x=this._countBits(_);y=26-x,y!==0&&(p=p.ushln(y),f.iushln(y),_=p.words[p.length-1]|0);var b=f.length-p.length,d;if(I!=="mod"){d=new n(null),d.length=b+1,d.words=new Array(d.length);for(var O=0;O<d.length;O++)d.words[O]=0}var T=f.clone()._ishlnsubmul(p,1,b);T.negative===0&&(f=T,d&&(d.words[b]=1));for(var S=b-1;S>=0;S--){var R=(f.words[p.length+S]|0)*67108864+(f.words[p.length+S-1]|0);for(R=Math.min(R/_|0,67108863),f._ishlnsubmul(p,R,S);f.negative!==0;)R--,f.negative=0,f._ishlnsubmul(p,1,S),f.isZero()||(f.negative^=1);d&&(d.words[S]=R)}return d&&d.strip(),f.strip(),I!=="div"&&y!==0&&f.iushrn(y),{div:d||null,mod:f}},n.prototype.divmod=function(g,I,y){if(r(!g.isZero()),this.isZero())return{div:new n(0),mod:new n(0)};var f,p,_;return this.negative!==0&&g.negative===0?(_=this.neg().divmod(g,I),I!=="mod"&&(f=_.div.neg()),I!=="div"&&(p=_.mod.neg(),y&&p.negative!==0&&p.iadd(g)),{div:f,mod:p}):this.negative===0&&g.negative!==0?(_=this.divmod(g.neg(),I),I!=="mod"&&(f=_.div.neg()),{div:f,mod:_.mod}):(this.negative&g.negative)!==0?(_=this.neg().divmod(g.neg(),I),I!=="div"&&(p=_.mod.neg(),y&&p.negative!==0&&p.isub(g)),{div:_.div,mod:p}):g.length>this.length||this.cmp(g)<0?{div:new n(0),mod:this}:g.length===1?I==="div"?{div:this.divn(g.words[0]),mod:null}:I==="mod"?{div:null,mod:new n(this.modn(g.words[0]))}:{div:this.divn(g.words[0]),mod:new n(this.modn(g.words[0]))}:this._wordDiv(g,I)},n.prototype.div=function(g){return this.divmod(g,"div",!1).div},n.prototype.mod=function(g){return this.divmod(g,"mod",!1).mod},n.prototype.umod=function(g){return this.divmod(g,"mod",!0).mod},n.prototype.divRound=function(g){var I=this.divmod(g);if(I.mod.isZero())return I.div;var y=I.div.negative!==0?I.mod.isub(g):I.mod,f=g.ushrn(1),p=g.andln(1),_=y.cmp(f);return _<0||p===1&&_===0?I.div:I.div.negative!==0?I.div.isubn(1):I.div.iaddn(1)},n.prototype.modn=function(g){r(g<=67108863);for(var I=(1<<26)%g,y=0,f=this.length-1;f>=0;f--)y=(I*y+(this.words[f]|0))%g;return y},n.prototype.idivn=function(g){r(g<=67108863);for(var I=0,y=this.length-1;y>=0;y--){var f=(this.words[y]|0)+I*67108864;this.words[y]=f/g|0,I=f%g}return this.strip()},n.prototype.divn=function(g){return this.clone().idivn(g)},n.prototype.egcd=function(g){r(g.negative===0),r(!g.isZero());var I=this,y=g.clone();I.negative!==0?I=I.umod(g):I=I.clone();for(var f=new n(1),p=new n(0),_=new n(0),x=new n(1),b=0;I.isEven()&&y.isEven();)I.iushrn(1),y.iushrn(1),++b;for(var d=y.clone(),O=I.clone();!I.isZero();){for(var T=0,S=1;(I.words[0]&S)===0&&T<26;++T,S<<=1);if(T>0)for(I.iushrn(T);T-- >0;)(f.isOdd()||p.isOdd())&&(f.iadd(d),p.isub(O)),f.iushrn(1),p.iushrn(1);for(var R=0,Y=1;(y.words[0]&Y)===0&&R<26;++R,Y<<=1);if(R>0)for(y.iushrn(R);R-- >0;)(_.isOdd()||x.isOdd())&&(_.iadd(d),x.isub(O)),_.iushrn(1),x.iushrn(1);I.cmp(y)>=0?(I.isub(y),f.isub(_),p.isub(x)):(y.isub(I),_.isub(f),x.isub(p))}return{a:_,b:x,gcd:y.iushln(b)}},n.prototype._invmp=function(g){r(g.negative===0),r(!g.isZero());var I=this,y=g.clone();I.negative!==0?I=I.umod(g):I=I.clone();for(var f=new n(1),p=new n(0),_=y.clone();I.cmpn(1)>0&&y.cmpn(1)>0;){for(var x=0,b=1;(I.words[0]&b)===0&&x<26;++x,b<<=1);if(x>0)for(I.iushrn(x);x-- >0;)f.isOdd()&&f.iadd(_),f.iushrn(1);for(var d=0,O=1;(y.words[0]&O)===0&&d<26;++d,O<<=1);if(d>0)for(y.iushrn(d);d-- >0;)p.isOdd()&&p.iadd(_),p.iushrn(1);I.cmp(y)>=0?(I.isub(y),f.isub(p)):(y.isub(I),p.isub(f))}var T;return I.cmpn(1)===0?T=f:T=p,T.cmpn(0)<0&&T.iadd(g),T},n.prototype.gcd=function(g){if(this.isZero())return g.abs();if(g.isZero())return this.abs();var I=this.clone(),y=g.clone();I.negative=0,y.negative=0;for(var f=0;I.isEven()&&y.isEven();f++)I.iushrn(1),y.iushrn(1);do{for(;I.isEven();)I.iushrn(1);for(;y.isEven();)y.iushrn(1);var p=I.cmp(y);if(p<0){var _=I;I=y,y=_}else if(p===0||y.cmpn(1)===0)break;I.isub(y)}while(!0);return y.iushln(f)},n.prototype.invm=function(g){return this.egcd(g).a.umod(g)},n.prototype.isEven=function(){return(this.words[0]&1)===0},n.prototype.isOdd=function(){return(this.words[0]&1)===1},n.prototype.andln=function(g){return this.words[0]&g},n.prototype.bincn=function(g){r(typeof g=="number");var I=g%26,y=(g-I)/26,f=1<<I;if(this.length<=y)return this._expand(y+1),this.words[y]|=f,this;for(var p=f,_=y;p!==0&&_<this.length;_++){var x=this.words[_]|0;x+=p,p=x>>>26,x&=67108863,this.words[_]=x}return p!==0&&(this.words[_]=p,this.length++),this},n.prototype.isZero=function(){return this.length===1&&this.words[0]===0},n.prototype.cmpn=function(g){var I=g<0;if(this.negative!==0&&!I)return-1;if(this.negative===0&&I)return 1;this.strip();var y;if(this.length>1)y=1;else{I&&(g=-g),r(g<=67108863,"Number is too big");var f=this.words[0]|0;y=f===g?0:f<g?-1:1}return this.negative!==0?-y|0:y},n.prototype.cmp=function(g){if(this.negative!==0&&g.negative===0)return-1;if(this.negative===0&&g.negative!==0)return 1;var I=this.ucmp(g);return this.negative!==0?-I|0:I},n.prototype.ucmp=function(g){if(this.length>g.length)return 1;if(this.length<g.length)return-1;for(var I=0,y=this.length-1;y>=0;y--){var f=this.words[y]|0,p=g.words[y]|0;if(f!==p){f<p?I=-1:f>p&&(I=1);break}}return I},n.prototype.gtn=function(g){return this.cmpn(g)===1},n.prototype.gt=function(g){return this.cmp(g)===1},n.prototype.gten=function(g){return this.cmpn(g)>=0},n.prototype.gte=function(g){return this.cmp(g)>=0},n.prototype.ltn=function(g){return this.cmpn(g)===-1},n.prototype.lt=function(g){return this.cmp(g)===-1},n.prototype.lten=function(g){return this.cmpn(g)<=0},n.prototype.lte=function(g){return this.cmp(g)<=0},n.prototype.eqn=function(g){return this.cmpn(g)===0},n.prototype.eq=function(g){return this.cmp(g)===0},n.red=function(g){return new z(g)},n.prototype.toRed=function(g){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),g.convertTo(this)._forceRed(g)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(g){return this.red=g,this},n.prototype.forceRed=function(g){return r(!this.red,"Already a number in reduction context"),this._forceRed(g)},n.prototype.redAdd=function(g){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,g)},n.prototype.redIAdd=function(g){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,g)},n.prototype.redSub=function(g){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,g)},n.prototype.redISub=function(g){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,g)},n.prototype.redShl=function(g){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,g)},n.prototype.redMul=function(g){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,g),this.red.mul(this,g)},n.prototype.redIMul=function(g){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,g),this.red.imul(this,g)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(g){return r(this.red&&!g.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,g)};var U={k256:null,p224:null,p192:null,p25519:null};function K(B,g){this.name=B,this.p=new n(g,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}K.prototype._tmp=function(){var g=new n(null);return g.words=new Array(Math.ceil(this.n/13)),g},K.prototype.ireduce=function(g){var I=g,y;do this.split(I,this.tmp),I=this.imulK(I),I=I.iadd(this.tmp),y=I.bitLength();while(y>this.n);var f=y<this.n?-1:I.ucmp(this.p);return f===0?(I.words[0]=0,I.length=1):f>0?I.isub(this.p):I.strip!==void 0?I.strip():I._strip(),I},K.prototype.split=function(g,I){g.iushrn(this.n,0,I)},K.prototype.imulK=function(g){return g.imul(this.k)};function C(){K.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(C,K),C.prototype.split=function(g,I){for(var y=4194303,f=Math.min(g.length,9),p=0;p<f;p++)I.words[p]=g.words[p];if(I.length=f,g.length<=9){g.words[0]=0,g.length=1;return}var _=g.words[9];for(I.words[I.length++]=_&y,p=10;p<g.length;p++){var x=g.words[p]|0;g.words[p-10]=(x&y)<<4|_>>>22,_=x}_>>>=22,g.words[p-10]=_,_===0&&g.length>10?g.length-=10:g.length-=9},C.prototype.imulK=function(g){g.words[g.length]=0,g.words[g.length+1]=0,g.length+=2;for(var I=0,y=0;y<g.length;y++){var f=g.words[y]|0;I+=f*977,g.words[y]=I&67108863,I=f*64+(I/67108864|0)}return g.words[g.length-1]===0&&(g.length--,g.words[g.length-1]===0&&g.length--),g};function N(){K.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(N,K);function F(){K.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(F,K);function H(){K.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(H,K),H.prototype.imulK=function(g){for(var I=0,y=0;y<g.length;y++){var f=(g.words[y]|0)*19+I,p=f&67108863;f>>>=26,g.words[y]=p,I=f}return I!==0&&(g.words[g.length++]=I),g},n._prime=function(g){if(U[g])return U[g];var I;if(g==="k256")I=new C;else if(g==="p224")I=new N;else if(g==="p192")I=new F;else if(g==="p25519")I=new H;else throw new Error("Unknown prime "+g);return U[g]=I,I};function z(B){if(typeof B=="string"){var g=n._prime(B);this.m=g.p,this.prime=g}else r(B.gtn(1),"modulus must be greater than 1"),this.m=B,this.prime=null}z.prototype._verify1=function(g){r(g.negative===0,"red works only with positives"),r(g.red,"red works only with red numbers")},z.prototype._verify2=function(g,I){r((g.negative|I.negative)===0,"red works only with positives"),r(g.red&&g.red===I.red,"red works only with red numbers")},z.prototype.imod=function(g){return this.prime?this.prime.ireduce(g)._forceRed(this):g.umod(this.m)._forceRed(this)},z.prototype.neg=function(g){return g.isZero()?g.clone():this.m.sub(g)._forceRed(this)},z.prototype.add=function(g,I){this._verify2(g,I);var y=g.add(I);return y.cmp(this.m)>=0&&y.isub(this.m),y._forceRed(this)},z.prototype.iadd=function(g,I){this._verify2(g,I);var y=g.iadd(I);return y.cmp(this.m)>=0&&y.isub(this.m),y},z.prototype.sub=function(g,I){this._verify2(g,I);var y=g.sub(I);return y.cmpn(0)<0&&y.iadd(this.m),y._forceRed(this)},z.prototype.isub=function(g,I){this._verify2(g,I);var y=g.isub(I);return y.cmpn(0)<0&&y.iadd(this.m),y},z.prototype.shl=function(g,I){return this._verify1(g),this.imod(g.ushln(I))},z.prototype.imul=function(g,I){return this._verify2(g,I),this.imod(g.imul(I))},z.prototype.mul=function(g,I){return this._verify2(g,I),this.imod(g.mul(I))},z.prototype.isqr=function(g){return this.imul(g,g.clone())},z.prototype.sqr=function(g){return this.mul(g,g)},z.prototype.sqrt=function(g){if(g.isZero())return g.clone();var I=this.m.andln(3);if(r(I%2===1),I===3){var y=this.m.add(new n(1)).iushrn(2);return this.pow(g,y)}for(var f=this.m.subn(1),p=0;!f.isZero()&&f.andln(1)===0;)p++,f.iushrn(1);r(!f.isZero());var _=new n(1).toRed(this),x=_.redNeg(),b=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new n(2*d*d).toRed(this);this.pow(d,b).cmp(x)!==0;)d.redIAdd(x);for(var O=this.pow(d,f),T=this.pow(g,f.addn(1).iushrn(1)),S=this.pow(g,f),R=p;S.cmp(_)!==0;){for(var Y=S,X=0;Y.cmp(_)!==0;X++)Y=Y.redSqr();r(X<R);var ne=this.pow(O,new n(1).iushln(R-X-1));T=T.redMul(ne),O=ne.redSqr(),S=S.redMul(O),R=X}return T},z.prototype.invm=function(g){var I=g._invmp(this.m);return I.negative!==0?(I.negative=0,this.imod(I).redNeg()):this.imod(I)},z.prototype.pow=function(g,I){if(I.isZero())return new n(1).toRed(this);if(I.cmpn(1)===0)return g.clone();var y=4,f=new Array(1<<y);f[0]=new n(1).toRed(this),f[1]=g;for(var p=2;p<f.length;p++)f[p]=this.mul(f[p-1],g);var _=f[0],x=0,b=0,d=I.bitLength()%26;for(d===0&&(d=26),p=I.length-1;p>=0;p--){for(var O=I.words[p],T=d-1;T>=0;T--){var S=O>>T&1;if(_!==f[0]&&(_=this.sqr(_)),S===0&&x===0){b=0;continue}x<<=1,x|=S,b++,!(b!==y&&(p!==0||T!==0))&&(_=this.mul(_,f[x]),b=0,x=0)}d=26}return _},z.prototype.convertTo=function(g){var I=g.umod(this.m);return I===g?I.clone():I},z.prototype.convertFrom=function(g){var I=g.clone();return I.red=null,I},n.mont=function(g){return new V(g)};function V(B){z.call(this,B),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new n(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(V,z),V.prototype.convertTo=function(g){return this.imod(g.ushln(this.shift))},V.prototype.convertFrom=function(g){var I=this.imod(g.mul(this.rinv));return I.red=null,I},V.prototype.imul=function(g,I){if(g.isZero()||I.isZero())return g.words[0]=0,g.length=1,g;var y=g.imul(I),f=y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=y.isub(f).iushrn(this.shift),_=p;return p.cmp(this.m)>=0?_=p.isub(this.m):p.cmpn(0)<0&&(_=p.iadd(this.m)),_._forceRed(this)},V.prototype.mul=function(g,I){if(g.isZero()||I.isZero())return new n(0)._forceRed(this);var y=g.mul(I),f=y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=y.isub(f).iushrn(this.shift),_=p;return p.cmp(this.m)>=0?_=p.isub(this.m):p.cmpn(0)<0&&(_=p.iadd(this.m)),_._forceRed(this)},V.prototype.invm=function(g){var I=this.imod(g._invmp(this.m).mul(this.r2));return I._forceRed(this)}})(typeof tm>"u"||tm,EE)});var IE=k((x0e,nm)=>{v();var rm;nm.exports=function(t){return rm||(rm=new hs(null)),rm.generate(t)};function hs(e){this.rand=e}nm.exports.Rand=hs;hs.prototype.generate=function(t){return this._rand(t)};hs.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var r=new Uint8Array(t),i=0;i<r.length;i++)r[i]=this.rand.getByte();return r};if(typeof self=="object")self.crypto&&self.crypto.getRandomValues?hs.prototype._rand=function(t){var r=new Uint8Array(t);return self.crypto.getRandomValues(r),r}:self.msCrypto&&self.msCrypto.getRandomValues?hs.prototype._rand=function(t){var r=new Uint8Array(t);return self.msCrypto.getRandomValues(r),r}:typeof window=="object"&&(hs.prototype._rand=function(){throw new Error("Not implemented yet")});else try{if(im=_r(),typeof im.randomBytes!="function")throw new Error("Not supported");hs.prototype._rand=function(t){return im.randomBytes(t)}}catch{}var im});var om=k((I0e,OE)=>{v();var Hu=Cn(),EW=IE();function ju(e){this.rand=e||new EW.Rand}OE.exports=ju;ju.create=function(t){return new ju(t)};ju.prototype._randbelow=function(t){var r=t.bitLength(),i=Math.ceil(r/8);do var n=new Hu(this.rand.generate(i));while(n.cmp(t)>=0);return n};ju.prototype._randrange=function(t,r){var i=r.sub(t);return t.add(this._randbelow(i))};ju.prototype.test=function(t,r,i){var n=t.bitLength(),o=Hu.mont(t),a=new Hu(1).toRed(o);r||(r=Math.max(1,n/48|0));for(var s=t.subn(1),u=0;!s.testn(u);u++);for(var c=t.shrn(u),l=s.toRed(o),m=!0;r>0;r--){var w=this._randrange(new Hu(2),s);i&&i(w);var E=w.toRed(o).redPow(c);if(!(E.cmp(a)===0||E.cmp(l)===0)){for(var P=1;P<u;P++){if(E=E.redSqr(),E.cmp(a)===0)return!1;if(E.cmp(l)===0)break}if(P===u)return!1}}return m};ju.prototype.getDivisor=function(t,r){var i=t.bitLength(),n=Hu.mont(t),o=new Hu(1).toRed(n);r||(r=Math.max(1,i/48|0));for(var a=t.subn(1),s=0;!a.testn(s);s++);for(var u=t.shrn(s),c=a.toRed(n);r>0;r--){var l=this._randrange(new Hu(2),a),m=t.gcd(l);if(m.cmpn(1)!==0)return m;var w=l.toRed(n).redPow(u);if(!(w.cmp(o)===0||w.cmp(c)===0)){for(var E=1;E<s;E++){if(w=w.redSqr(),w.cmp(o)===0)return w.fromRed().subn(1).gcd(t);if(w.cmp(c)===0)break}if(E===s)return w=w.redSqr(),w.fromRed().subn(1).gcd(t)}}return!1}});var lm=k((R0e,TE)=>{v();var IW=bu();TE.exports=cm;cm.simpleSieve=um;cm.fermatTest=fm;var Jr=Cn(),OW=new Jr(24),AW=om(),AE=new AW,PW=new Jr(1),sm=new Jr(2),TW=new Jr(5),A0e=new Jr(16),P0e=new Jr(8),kW=new Jr(10),RW=new Jr(3),T0e=new Jr(7),BW=new Jr(11),PE=new Jr(4),k0e=new Jr(12),am=null;function MW(){if(am!==null)return am;var e=1048576,t=[];t[0]=2;for(var r=1,i=3;i<e;i+=2){for(var n=Math.ceil(Math.sqrt(i)),o=0;o<r&&t[o]<=n&&i%t[o]!==0;o++);r!==o&&t[o]<=n||(t[r++]=i)}return am=t,t}function um(e){for(var t=MW(),r=0;r<t.length;r++)if(e.modn(t[r])===0)return e.cmpn(t[r])===0;return!0}function fm(e){var t=Jr.mont(e);return sm.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1)===0}function cm(e,t){if(e<16)return t===2||t===5?new Jr([140,123]):new Jr([140,39]);t=new Jr(t);for(var r,i;;){for(r=new Jr(IW(Math.ceil(e/8)));r.bitLength()>e;)r.ishrn(1);if(r.isEven()&&r.iadd(PW),r.testn(1)||r.iadd(sm),t.cmp(sm)){if(!t.cmp(TW))for(;r.mod(kW).cmp(RW);)r.iadd(PE)}else for(;r.mod(OW).cmp(BW);)r.iadd(PE);if(i=r.shrn(1),um(i)&&um(r)&&fm(i)&&fm(r)&&AE.test(i)&&AE.test(r))return r}}});var kE=k((M0e,CW)=>{CW.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}});var CE=k((C0e,ME)=>{v();var fn=Cn(),NW=om(),RE=new NW,DW=new fn(24),LW=new fn(11),qW=new fn(10),UW=new fn(3),FW=new fn(7),BE=lm(),HW=bu();ME.exports=wa;function jW(e,t){return t=t||"utf8",h.Buffer.isBuffer(e)||(e=new h.Buffer(e,t)),this._pub=new fn(e),this}function zW(e,t){return t=t||"utf8",h.Buffer.isBuffer(e)||(e=new h.Buffer(e,t)),this._priv=new fn(e),this}var L2={};function KW(e,t){var r=t.toString("hex"),i=[r,e.toString(16)].join("_");if(i in L2)return L2[i];var n=0;if(e.isEven()||!BE.simpleSieve||!BE.fermatTest(e)||!RE.test(e))return n+=1,r==="02"||r==="05"?n+=8:n+=4,L2[i]=n,n;RE.test(e.shrn(1))||(n+=2);var o;switch(r){case"02":e.mod(DW).cmp(LW)&&(n+=8);break;case"05":o=e.mod(qW),o.cmp(UW)&&o.cmp(FW)&&(n+=8);break;default:n+=4}return L2[i]=n,n}function wa(e,t,r){this.setGenerator(t),this.__prime=new fn(e),this._prime=fn.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=jW,this.setPrivateKey=zW):this._primeCode=8}Object.defineProperty(wa.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=KW(this.__prime,this.__gen)),this._primeCode}});wa.prototype.generateKeys=function(){return this._priv||(this._priv=new fn(HW(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()};wa.prototype.computeSecret=function(e){e=new fn(e),e=e.toRed(this._prime);var t=e.redPow(this._priv).fromRed(),r=new h.Buffer(t.toArray()),i=this.getPrime();if(r.length<i.length){var n=new h.Buffer(i.length-r.length);n.fill(0),r=h.Buffer.concat([n,r])}return r};wa.prototype.getPublicKey=function(t){return q2(this._pub,t)};wa.prototype.getPrivateKey=function(t){return q2(this._priv,t)};wa.prototype.getPrime=function(e){return q2(this.__prime,e)};wa.prototype.getGenerator=function(e){return q2(this._gen,e)};wa.prototype.setGenerator=function(e,t){return t=t||"utf8",h.Buffer.isBuffer(e)||(e=new h.Buffer(e,t)),this.__gen=e,this._gen=new fn(e),this};function q2(e,t){var r=new h.Buffer(e.toArray());return t?r.toString(t):r}});var LE=k(Ic=>{v();var VW=lm(),NE=kE(),hm=CE();function GW(e){var t=new h.Buffer(NE[e].prime,"hex"),r=new h.Buffer(NE[e].gen,"hex");return new hm(t,r)}var ZW={binary:!0,hex:!0,base64:!0};function DE(e,t,r,i){return h.Buffer.isBuffer(t)||ZW[t]===void 0?DE(e,"binary",t,r):(t=t||"binary",i=i||"binary",r=r||new h.Buffer([2]),h.Buffer.isBuffer(r)||(r=new h.Buffer(r,i)),typeof e=="number"?new hm(VW(e,r),r,!0):(h.Buffer.isBuffer(e)||(e=new h.Buffer(e,t)),new hm(e,r,!0)))}Ic.DiffieHellmanGroup=Ic.createDiffieHellmanGroup=Ic.getDiffieHellman=GW;Ic.createDiffieHellman=Ic.DiffieHellman=DE});var qE=k((exports,module)=>{v();var indexOf=function(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0;r<e.length;r++)if(e[r]===t)return r;return-1},Object_keys=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var r in e)t.push(r);return t},forEach=function(e,t){if(e.forEach)return e.forEach(t);for(var r=0;r<e.length;r++)t(e[r],r,e)},defineProp=(function(){try{return Object.defineProperty({},"_",{}),function(e,t,r){Object.defineProperty(e,t,{writable:!0,enumerable:!1,configurable:!0,value:r})}}catch{return function(t,r,i){t[r]=i}}})(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports.Script=function(t){if(!(this instanceof Script))return new Script(t);this.code=t};Script.prototype.runInContext=function(e){if(!(e instanceof Context))throw new TypeError("needs a 'context' argument.");var t=document.createElement("iframe");t.style||(t.style={}),t.style.display="none",document.body.appendChild(t);var r=t.contentWindow,i=r.eval,n=r.execScript;!i&&n&&(n.call(r,"null"),i=r.eval),forEach(Object_keys(e),function(s){r[s]=e[s]}),forEach(globals,function(s){e[s]&&(r[s]=e[s])});var o=Object_keys(r),a=i.call(r,this.code);return forEach(Object_keys(r),function(s){(s in e||indexOf(o,s)===-1)&&(e[s]=r[s])}),forEach(globals,function(s){s in e||defineProp(e,s,r[s])}),document.body.removeChild(t),a};Script.prototype.runInThisContext=function(){return eval(this.code)};Script.prototype.runInNewContext=function(e){var t=Script.createContext(e),r=this.runInContext(t);return e&&forEach(Object_keys(t),function(i){e[i]=t[i]}),r};forEach(Object_keys(Script.prototype),function(e){exports[e]=Script[e]=function(t){var r=Script(t);return r[e].apply(r,[].slice.call(arguments,1))}});exports.isContext=function(e){return e instanceof Context};exports.createScript=function(e){return exports.Script(e)};exports.createContext=Script.createContext=function(e){var t=new Context;return typeof e=="object"&&forEach(Object_keys(e),function(r){t[r]=e[r]}),t}});var HE=k(FE=>{v();var UE=Ac(),WW=Pe(),YW=FE;YW.define=function(t,r){return new Oc(t,r)};function Oc(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}Oc.prototype._createNamed=function(t){var r;try{r=qE().runInThisContext("(function "+this.name+`(entity) {
|
|
11
|
+
`)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}dt.types=r_();function s_(e){return Array.isArray(e)}dt.isArray=s_;function kg(e){return typeof e=="boolean"}dt.isBoolean=kg;function Dd(e){return e===null}dt.isNull=Dd;function hj(e){return e==null}dt.isNullOrUndefined=hj;function u_(e){return typeof e=="number"}dt.isNumber=u_;function Ld(e){return typeof e=="string"}dt.isString=Ld;function dj(e){return typeof e=="symbol"}dt.isSymbol=dj;function Eu(e){return e===void 0}dt.isUndefined=Eu;function ph(e){return uc(e)&&Rg(e)==="[object RegExp]"}dt.isRegExp=ph;dt.types.isRegExp=ph;function uc(e){return typeof e=="object"&&e!==null}dt.isObject=uc;function Nd(e){return uc(e)&&Rg(e)==="[object Date]"}dt.isDate=Nd;dt.types.isDate=Nd;function gh(e){return uc(e)&&(Rg(e)==="[object Error]"||e instanceof Error)}dt.isError=gh;dt.types.isNativeError=gh;function Md(e){return typeof e=="function"}dt.isFunction=Md;function pj(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}dt.isPrimitive=pj;dt.isBuffer=n_();function Rg(e){return Object.prototype.toString.call(e)}function Pg(e){return e<10?"0"+e.toString(10):e.toString(10)}var gj=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function vj(){var e=new Date,t=[Pg(e.getHours()),Pg(e.getMinutes()),Pg(e.getSeconds())].join(":");return[e.getDate(),gj[e.getMonth()],t].join(" ")}dt.log=function(){console.log("%s - %s",vj(),dt.format.apply(dt,arguments))};dt.inherits=Te();dt._extend=function(e,t){if(!t||!uc(t))return e;for(var r=Object.keys(t),i=r.length;i--;)e[r[i]]=t[r[i]];return e};function f_(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var xu=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;dt.promisify=function(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');if(xu&&t[xu]){var r=t[xu];if(typeof r!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,xu,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var i,n,o=new Promise(function(u,c){i=u,n=c}),a=[],s=0;s<arguments.length;s++)a.push(arguments[s]);a.push(function(u,c){u?n(u):i(c)});try{t.apply(this,a)}catch(u){n(u)}return o}return Object.setPrototypeOf(r,Object.getPrototypeOf(t)),xu&&Object.defineProperty(r,xu,{value:r,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(r,o_(t))};dt.promisify.custom=xu;function mj(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}function yj(e){if(typeof e!="function")throw new TypeError('The "original" argument must be of type Function');function t(){for(var r=[],i=0;i<arguments.length;i++)r.push(arguments[i]);var n=r.pop();if(typeof n!="function")throw new TypeError("The last argument must be of type Function");var o=this,a=function(){return n.apply(o,arguments)};e.apply(this,r).then(function(s){A.default.nextTick(a.bind(null,null,s))},function(s){A.default.nextTick(mj.bind(null,s,a))})}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,o_(e)),t}dt.callbackify=yj});var g_=k((hce,p_)=>{"use strict";v();function c_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function l_(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?c_(Object(r),!0).forEach(function(i){bj(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c_(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function bj(e,t,r){return t=d_(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _j(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h_(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,d_(i.key),i)}}function wj(e,t,r){return t&&h_(e.prototype,t),r&&h_(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function d_(e){var t=Sj(e,"string");return typeof t=="symbol"?t:String(t)}function Sj(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xj=Kt(),qd=xj.Buffer,Ej=rn(),Bg=Ej.inspect,Ij=Bg&&Bg.custom||"inspect";function Oj(e,t,r){qd.prototype.copy.call(e,t,r)}p_.exports=(function(){function e(){_j(this,e),this.head=null,this.tail=null,this.length=0}return wj(e,[{key:"push",value:function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n}},{key:"concat",value:function(r){if(this.length===0)return qd.alloc(0);for(var i=qd.allocUnsafe(r>>>0),n=this.head,o=0;n;)Oj(n.data,i,o),o+=n.data.length,n=n.next;return i}},{key:"consume",value:function(r,i){var n;return r<this.head.data.length?(n=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?n=this.shift():n=i?this._getString(r):this._getBuffer(r),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var i=this.head,n=1,o=i.data;for(r-=o.length;i=i.next;){var a=i.data,s=r>a.length?a.length:r;if(s===a.length?o+=a:o+=a.slice(0,r),r-=s,r===0){s===a.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=a.slice(s));break}++n}return this.length-=n,o}},{key:"_getBuffer",value:function(r){var i=qd.allocUnsafe(r),n=this.head,o=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var a=n.data,s=r>a.length?a.length:r;if(a.copy(i,i.length-r,0,s),r-=s,r===0){s===a.length?(++o,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=a.slice(s));break}++o}return this.length-=o,i}},{key:Ij,value:function(r,i){return Bg(this,l_(l_({},i),{},{depth:0,customInspect:!1}))}}]),e})()});var Cg=k((pce,m_)=>{"use strict";v();function Aj(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,A.default.nextTick(Mg,this,e)):A.default.nextTick(Mg,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(o){!t&&o?r._writableState?r._writableState.errorEmitted?A.default.nextTick(Ud,r):(r._writableState.errorEmitted=!0,A.default.nextTick(v_,r,o)):A.default.nextTick(v_,r,o):t?(A.default.nextTick(Ud,r),t(o)):A.default.nextTick(Ud,r)}),this)}function v_(e,t){Mg(e,t),Ud(e)}function Ud(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function Pj(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Mg(e,t){e.emit("error",t)}function Tj(e,t){var r=e._readableState,i=e._writableState;r&&r.autoDestroy||i&&i.autoDestroy?e.destroy(t):e.emit("error",t)}m_.exports={destroy:Aj,undestroy:Pj,errorOrDestroy:Tj}});var Iu=k((vce,__)=>{"use strict";v();function kj(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var b_={};function nn(e,t,r){r||(r=Error);function i(o,a,s){return typeof t=="string"?t:t(o,a,s)}var n=(function(o){kj(a,o);function a(s,u,c){return o.call(this,i(s,u,c))||this}return a})(r);n.prototype.name=r.name,n.prototype.code=e,b_[e]=n}function y_(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(i){return String(i)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function Rj(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function Bj(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function Mj(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}nn("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);nn("ERR_INVALID_ARG_TYPE",function(e,t,r){var i;typeof t=="string"&&Rj(t,"not ")?(i="must not be",t=t.replace(/^not /,"")):i="must be";var n;if(Bj(e," argument"))n="The ".concat(e," ").concat(i," ").concat(y_(t,"type"));else{var o=Mj(e,".")?"property":"argument";n='The "'.concat(e,'" ').concat(o," ").concat(i," ").concat(y_(t,"type"))}return n+=". Received type ".concat(typeof r),n},TypeError);nn("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");nn("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});nn("ERR_STREAM_PREMATURE_CLOSE","Premature close");nn("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});nn("ERR_MULTIPLE_CALLBACK","Callback called multiple times");nn("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");nn("ERR_STREAM_WRITE_AFTER_END","write after end");nn("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);nn("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);nn("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");__.exports.codes=b_});var Ng=k((yce,w_)=>{"use strict";v();var Cj=Iu().codes.ERR_INVALID_OPT_VALUE;function Nj(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function Dj(e,t,r,i){var n=Nj(t,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var o=i?r:"highWaterMark";throw new Cj(o,n)}return Math.floor(n)}return e.objectMode?16:16*1024}w_.exports={getHighWaterMark:Dj}});var Lg=k((_ce,S_)=>{v();S_.exports=Lj;function Lj(e,t){if(Dg("noDeprecation"))return e;var r=!1;function i(){if(!r){if(Dg("throwDeprecation"))throw new Error(t);Dg("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}return i}function Dg(e){try{if(!globalThis.localStorage)return!1}catch{return!1}var t=globalThis.localStorage[e];return t==null?!1:String(t).toLowerCase()==="true"}});var Fg=k((Sce,P_)=>{"use strict";v();P_.exports=ur;function E_(e){var t=this;this.next=null,this.entry=null,this.finish=function(){cz(t,e)}}var fc;ur.WritableState=mh;var qj={deprecate:Lg()},I_=Q5(),Hd=Kt().Buffer,Uj=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Fj(e){return Hd.from(e)}function Hj(e){return Hd.isBuffer(e)||e instanceof Uj}var Ug=Cg(),jj=Ng(),zj=jj.getHighWaterMark,is=Iu().codes,Kj=is.ERR_INVALID_ARG_TYPE,Vj=is.ERR_METHOD_NOT_IMPLEMENTED,Gj=is.ERR_MULTIPLE_CALLBACK,Zj=is.ERR_STREAM_CANNOT_PIPE,Wj=is.ERR_STREAM_DESTROYED,Yj=is.ERR_STREAM_NULL_VALUES,$j=is.ERR_STREAM_WRITE_AFTER_END,Xj=is.ERR_UNKNOWN_ENCODING,cc=Ug.errorOrDestroy;Te()(ur,I_);function Jj(){}function mh(e,t,r){fc=fc||Ou(),e=e||{},typeof r!="boolean"&&(r=t instanceof fc),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=zj(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=e.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){oz(t,n)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new E_(this)}mh.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(mh.prototype,"buffer",{get:qj.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Fd;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Fd=Function.prototype[Symbol.hasInstance],Object.defineProperty(ur,Symbol.hasInstance,{value:function(t){return Fd.call(this,t)?!0:this!==ur?!1:t&&t._writableState instanceof mh}})):Fd=function(t){return t instanceof this};function ur(e){fc=fc||Ou();var t=this instanceof fc;if(!t&&!Fd.call(ur,this))return new ur(e);this._writableState=new mh(e,this,t),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),I_.call(this)}ur.prototype.pipe=function(){cc(this,new Zj)};function Qj(e,t){var r=new $j;cc(e,r),A.default.nextTick(t,r)}function ez(e,t,r,i){var n;return r===null?n=new Yj:typeof r!="string"&&!t.objectMode&&(n=new Kj("chunk",["string","Buffer"],r)),n?(cc(e,n),A.default.nextTick(i,n),!1):!0}ur.prototype.write=function(e,t,r){var i=this._writableState,n=!1,o=!i.objectMode&&Hj(e);return o&&!Hd.isBuffer(e)&&(e=Fj(e)),typeof t=="function"&&(r=t,t=null),o?t="buffer":t||(t=i.defaultEncoding),typeof r!="function"&&(r=Jj),i.ending?Qj(this,r):(o||ez(this,i,e,r))&&(i.pendingcb++,n=rz(this,i,o,e,t,r)),n};ur.prototype.cork=function(){this._writableState.corked++};ur.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&O_(this,e))};ur.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new Xj(t);return this._writableState.defaultEncoding=t,this};Object.defineProperty(ur.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function tz(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=Hd.from(t,r)),t}Object.defineProperty(ur.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function rz(e,t,r,i,n,o){if(!r){var a=tz(t,i,n);i!==a&&(r=!0,n="buffer",i=a)}var s=t.objectMode?1:i.length;t.length+=s;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:o,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else qg(e,t,!1,s,i,n,o);return u}function qg(e,t,r,i,n,o,a){t.writelen=i,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new Wj("write")):r?e._writev(n,t.onwrite):e._write(n,o,t.onwrite),t.sync=!1}function iz(e,t,r,i,n){--t.pendingcb,r?(A.default.nextTick(n,i),A.default.nextTick(vh,e,t),e._writableState.errorEmitted=!0,cc(e,i)):(n(i),e._writableState.errorEmitted=!0,cc(e,i),vh(e,t))}function nz(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function oz(e,t){var r=e._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new Gj;if(nz(r),t)iz(e,r,i,t,n);else{var o=A_(r)||e.destroyed;!o&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&O_(e,r),i?A.default.nextTick(x_,e,r,o,n):x_(e,r,o,n)}}function x_(e,t,r,i){r||az(e,t),t.pendingcb--,i(),vh(e,t)}function az(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function O_(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,n=new Array(i),o=t.corkedRequestsFree;o.entry=r;for(var a=0,s=!0;r;)n[a]=r,r.isBuf||(s=!1),r=r.next,a+=1;n.allBuffers=s,qg(e,t,!0,t.length,n,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new E_(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,l=r.callback,m=t.objectMode?1:u.length;if(qg(e,t,!1,m,u,c,l),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}ur.prototype._write=function(e,t,r){r(new Vj("_write()"))};ur.prototype._writev=null;ur.prototype.end=function(e,t,r){var i=this._writableState;return typeof e=="function"?(r=e,e=null,t=null):typeof t=="function"&&(r=t,t=null),e!=null&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||fz(this,i,r),this};Object.defineProperty(ur.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function A_(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function sz(e,t){e._final(function(r){t.pendingcb--,r&&cc(e,r),t.prefinished=!0,e.emit("prefinish"),vh(e,t)})}function uz(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"&&!t.destroyed?(t.pendingcb++,t.finalCalled=!0,A.default.nextTick(sz,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function vh(e,t){var r=A_(t);if(r&&(uz(e,t),t.pendingcb===0&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return r}function fz(e,t,r){t.ending=!0,vh(e,t),r&&(t.finished?A.default.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function cz(e,t,r){var i=e.entry;for(e.entry=null;i;){var n=i.callback;t.pendingcb--,n(r),i=i.next}t.corkedRequestsFree.next=e}Object.defineProperty(ur.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}});ur.prototype.destroy=Ug.destroy;ur.prototype._undestroy=Ug.undestroy;ur.prototype._destroy=function(e,t){t(e)}});var Ou=k((Ece,k_)=>{"use strict";v();var lz=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};k_.exports=bo;var T_=zg(),jg=Fg();Te()(bo,T_);for(Hg=lz(jg.prototype),jd=0;jd<Hg.length;jd++)zd=Hg[jd],bo.prototype[zd]||(bo.prototype[zd]=jg.prototype[zd]);var Hg,zd,jd;function bo(e){if(!(this instanceof bo))return new bo(e);T_.call(this,e),jg.call(this,e),this.allowHalfOpen=!0,e&&(e.readable===!1&&(this.readable=!1),e.writable===!1&&(this.writable=!1),e.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",hz)))}Object.defineProperty(bo.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(bo.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(bo.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function hz(){this._writableState.ended||A.default.nextTick(dz,this)}function dz(e){e.end()}Object.defineProperty(bo.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(t){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=t,this._writableState.destroyed=t)}})});var M_=k((Kg,B_)=>{v();var Kd=Kt(),ca=Kd.Buffer;function R_(e,t){for(var r in e)t[r]=e[r]}ca.from&&ca.alloc&&ca.allocUnsafe&&ca.allocUnsafeSlow?B_.exports=Kd:(R_(Kd,Kg),Kg.Buffer=lc);function lc(e,t,r){return ca(e,t,r)}R_(ca,lc);lc.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return ca(e,t,r)};lc.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var i=ca(e);return t!==void 0?typeof r=="string"?i.fill(t,r):i.fill(t):i.fill(0),i};lc.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return ca(e)};lc.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Kd.SlowBuffer(e)}});var hc=k(N_=>{"use strict";v();var Gg=M_().Buffer,C_=Gg.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function pz(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function gz(e){var t=pz(e);if(typeof t!="string"&&(Gg.isEncoding===C_||!C_(e)))throw new Error("Unknown encoding: "+e);return t||e}N_.StringDecoder=yh;function yh(e){this.encoding=gz(e);var t;switch(this.encoding){case"utf16le":this.text=wz,this.end=Sz,t=4;break;case"utf8":this.fillLast=yz,t=4;break;case"base64":this.text=xz,this.end=Ez,t=3;break;default:this.write=Iz,this.end=Oz;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Gg.allocUnsafe(t)}yh.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""};yh.prototype.end=_z;yh.prototype.text=bz;yh.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function Vg(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function vz(e,t,r){var i=t.length-1;if(i<r)return 0;var n=Vg(t[i]);return n>=0?(n>0&&(e.lastNeed=n-1),n):--i<r||n===-2?0:(n=Vg(t[i]),n>=0?(n>0&&(e.lastNeed=n-2),n):--i<r||n===-2?0:(n=Vg(t[i]),n>=0?(n>0&&(n===2?n=0:e.lastNeed=n-3),n):0))}function mz(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function yz(e){var t=this.lastTotal-this.lastNeed,r=mz(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function bz(e,t){var r=vz(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)}function _z(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function wz(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function Sz(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function xz(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function Ez(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function Iz(e){return e.toString(this.encoding)}function Oz(e){return e&&e.length?this.write(e):""}});var Vd=k((Tce,q_)=>{"use strict";v();var D_=Iu().codes.ERR_STREAM_PREMATURE_CLOSE;function Az(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];e.apply(this,i)}}}function Pz(){}function Tz(e){return e.setHeader&&typeof e.abort=="function"}function L_(e,t,r){if(typeof t=="function")return L_(e,null,t);t||(t={}),r=Az(r||Pz);var i=t.readable||t.readable!==!1&&e.readable,n=t.writable||t.writable!==!1&&e.writable,o=function(){e.writable||s()},a=e._writableState&&e._writableState.finished,s=function(){n=!1,a=!0,i||r.call(e)},u=e._readableState&&e._readableState.endEmitted,c=function(){i=!1,u=!0,n||r.call(e)},l=function(P){r.call(e,P)},m=function(){var P;if(i&&!u)return(!e._readableState||!e._readableState.ended)&&(P=new D_),r.call(e,P);if(n&&!a)return(!e._writableState||!e._writableState.ended)&&(P=new D_),r.call(e,P)},w=function(){e.req.on("finish",s)};return Tz(e)?(e.on("complete",s),e.on("abort",m),e.req?w():e.on("request",w)):n&&!e._writableState&&(e.on("end",o),e.on("close",o)),e.on("end",c),e.on("finish",s),t.error!==!1&&e.on("error",l),e.on("close",m),function(){e.removeListener("complete",s),e.removeListener("abort",m),e.removeListener("request",w),e.req&&e.req.removeListener("finish",s),e.removeListener("end",o),e.removeListener("close",o),e.removeListener("finish",s),e.removeListener("end",c),e.removeListener("error",l),e.removeListener("close",m)}}q_.exports=L_});var F_=k((Rce,U_)=>{"use strict";v();var Gd;function ns(e,t,r){return t=kz(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kz(e){var t=Rz(e,"string");return typeof t=="symbol"?t:String(t)}function Rz(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Bz=Vd(),os=Symbol("lastResolve"),Au=Symbol("lastReject"),bh=Symbol("error"),Zd=Symbol("ended"),Pu=Symbol("lastPromise"),Zg=Symbol("handlePromise"),Tu=Symbol("stream");function as(e,t){return{value:e,done:t}}function Mz(e){var t=e[os];if(t!==null){var r=e[Tu].read();r!==null&&(e[Pu]=null,e[os]=null,e[Au]=null,t(as(r,!1)))}}function Cz(e){A.default.nextTick(Mz,e)}function Nz(e,t){return function(r,i){e.then(function(){if(t[Zd]){r(as(void 0,!0));return}t[Zg](r,i)},i)}}var Dz=Object.getPrototypeOf(function(){}),Lz=Object.setPrototypeOf((Gd={get stream(){return this[Tu]},next:function(){var t=this,r=this[bh];if(r!==null)return Promise.reject(r);if(this[Zd])return Promise.resolve(as(void 0,!0));if(this[Tu].destroyed)return new Promise(function(a,s){A.default.nextTick(function(){t[bh]?s(t[bh]):a(as(void 0,!0))})});var i=this[Pu],n;if(i)n=new Promise(Nz(i,this));else{var o=this[Tu].read();if(o!==null)return Promise.resolve(as(o,!1));n=new Promise(this[Zg])}return this[Pu]=n,n}},ns(Gd,Symbol.asyncIterator,function(){return this}),ns(Gd,"return",function(){var t=this;return new Promise(function(r,i){t[Tu].destroy(null,function(n){if(n){i(n);return}r(as(void 0,!0))})})}),Gd),Dz),qz=function(t){var r,i=Object.create(Lz,(r={},ns(r,Tu,{value:t,writable:!0}),ns(r,os,{value:null,writable:!0}),ns(r,Au,{value:null,writable:!0}),ns(r,bh,{value:null,writable:!0}),ns(r,Zd,{value:t._readableState.endEmitted,writable:!0}),ns(r,Zg,{value:function(o,a){var s=i[Tu].read();s?(i[Pu]=null,i[os]=null,i[Au]=null,o(as(s,!1))):(i[os]=o,i[Au]=a)},writable:!0}),r));return i[Pu]=null,Bz(t,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var o=i[Au];o!==null&&(i[Pu]=null,i[os]=null,i[Au]=null,o(n)),i[bh]=n;return}var a=i[os];a!==null&&(i[Pu]=null,i[os]=null,i[Au]=null,a(as(void 0,!0))),i[Zd]=!0}),t.on("readable",Cz.bind(null,i)),i};U_.exports=qz});var j_=k((Mce,H_)=>{v();H_.exports=function(){throw new Error("Readable.from is not available in the browser")}});var zg=k((Dce,J_)=>{"use strict";v();J_.exports=xt;var dc;xt.ReadableState=G_;var Nce=Qf().EventEmitter,V_=function(t,r){return t.listeners(r).length},wh=Q5(),Wd=Kt().Buffer,Uz=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Fz(e){return Wd.from(e)}function Hz(e){return Wd.isBuffer(e)||e instanceof Uz}var Wg=rn(),ct;Wg&&Wg.debuglog?ct=Wg.debuglog("stream"):ct=function(){};var jz=g_(),tv=Cg(),zz=Ng(),Kz=zz.getHighWaterMark,Yd=Iu().codes,Vz=Yd.ERR_INVALID_ARG_TYPE,Gz=Yd.ERR_STREAM_PUSH_AFTER_EOF,Zz=Yd.ERR_METHOD_NOT_IMPLEMENTED,Wz=Yd.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,pc,Yg,$g;Te()(xt,wh);var _h=tv.errorOrDestroy,Xg=["error","close","destroy","pause","resume"];function Yz(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function G_(e,t,r){dc=dc||Ou(),e=e||{},typeof r!="boolean"&&(r=t instanceof dc),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=Kz(this,e,"readableHighWaterMark",r),this.buffer=new jz,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(pc||(pc=hc().StringDecoder),this.decoder=new pc(e.encoding),this.encoding=e.encoding)}function xt(e){if(dc=dc||Ou(),!(this instanceof xt))return new xt(e);var t=this instanceof dc;this._readableState=new G_(e,this,t),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),wh.call(this)}Object.defineProperty(xt.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});xt.prototype.destroy=tv.destroy;xt.prototype._undestroy=tv.undestroy;xt.prototype._destroy=function(e,t){t(e)};xt.prototype.push=function(e,t){var r=this._readableState,i;return r.objectMode?i=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=Wd.from(e,t),t=""),i=!0),Z_(this,e,t,!1,i)};xt.prototype.unshift=function(e){return Z_(this,e,null,!0,!1)};function Z_(e,t,r,i,n){ct("readableAddChunk",t);var o=e._readableState;if(t===null)o.reading=!1,Jz(e,o);else{var a;if(n||(a=$z(o,t)),a)_h(e,a);else if(o.objectMode||t&&t.length>0)if(typeof t!="string"&&!o.objectMode&&Object.getPrototypeOf(t)!==Wd.prototype&&(t=Fz(t)),i)o.endEmitted?_h(e,new Wz):Jg(e,o,t,!0);else if(o.ended)_h(e,new Gz);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||t.length!==0?Jg(e,o,t,!1):ev(e,o)):Jg(e,o,t,!1)}else i||(o.reading=!1,ev(e,o))}return!o.ended&&(o.length<o.highWaterMark||o.length===0)}function Jg(e,t,r,i){t.flowing&&t.length===0&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&$d(e)),ev(e,t)}function $z(e,t){var r;return!Hz(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new Vz("chunk",["string","Buffer","Uint8Array"],t)),r}xt.prototype.isPaused=function(){return this._readableState.flowing===!1};xt.prototype.setEncoding=function(e){pc||(pc=hc().StringDecoder);var t=new pc(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var z_=1073741824;function Xz(e){return e>=z_?e=z_:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function K_(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=Xz(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}xt.prototype.read=function(e){ct("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended))return ct("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?Qg(this):$d(this),null;if(e=K_(e,t),e===0&&t.ended)return t.length===0&&Qg(this),null;var i=t.needReadable;ct("need readable",i),(t.length===0||t.length-e<t.highWaterMark)&&(i=!0,ct("length less than watermark",i)),t.ended||t.reading?(i=!1,ct("reading or ended",i)):i&&(ct("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=K_(r,t)));var n;return e>0?n=$_(e,t):n=null,n===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&Qg(this)),n!==null&&this.emit("data",n),n};function Jz(e,t){if(ct("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?$d(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,W_(e)))}}function $d(e){var t=e._readableState;ct("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(ct("emitReadable",t.flowing),t.emittedReadable=!0,A.default.nextTick(W_,e))}function W_(e){var t=e._readableState;ct("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,rv(e)}function ev(e,t){t.readingMore||(t.readingMore=!0,A.default.nextTick(Qz,e,t))}function Qz(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&t.length===0);){var r=t.length;if(ct("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}xt.prototype._read=function(e){_h(this,new Zz("_read()"))};xt.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e);break}i.pipesCount+=1,ct("pipe count=%d opts=%j",i.pipesCount,t);var n=(!t||t.end!==!1)&&e!==A.default.stdout&&e!==A.default.stderr,o=n?s:M;i.endEmitted?A.default.nextTick(o):r.once("end",o),e.on("unpipe",a);function a(D,L){ct("onunpipe"),D===r&&L&&L.hasUnpiped===!1&&(L.hasUnpiped=!0,l())}function s(){ct("onend"),e.end()}var u=eK(r);e.on("drain",u);var c=!1;function l(){ct("cleanup"),e.removeListener("close",E),e.removeListener("finish",P),e.removeListener("drain",u),e.removeListener("error",w),e.removeListener("unpipe",a),r.removeListener("end",s),r.removeListener("end",M),r.removeListener("data",m),c=!0,i.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u()}r.on("data",m);function m(D){ct("ondata");var L=e.write(D);ct("dest.write",L),L===!1&&((i.pipesCount===1&&i.pipes===e||i.pipesCount>1&&X_(i.pipes,e)!==-1)&&!c&&(ct("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function w(D){ct("onerror",D),M(),e.removeListener("error",w),V_(e,"error")===0&&_h(e,D)}Yz(e,"error",w);function E(){e.removeListener("finish",P),M()}e.once("close",E);function P(){ct("onfinish"),e.removeListener("close",E),M()}e.once("finish",P);function M(){ct("unpipe"),r.unpipe(e)}return e.emit("pipe",r),i.flowing||(ct("pipe resume"),r.resume()),e};function eK(e){return function(){var r=e._readableState;ct("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&V_(e,"data")&&(r.flowing=!0,rv(e))}}xt.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<n;o++)i[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=X_(t.pipes,e);return a===-1?this:(t.pipes.splice(a,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)};xt.prototype.on=function(e,t){var r=wh.prototype.on.call(this,e,t),i=this._readableState;return e==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):e==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,ct("on readable",i.length,i.reading),i.length?$d(this):i.reading||A.default.nextTick(tK,this)),r};xt.prototype.addListener=xt.prototype.on;xt.prototype.removeListener=function(e,t){var r=wh.prototype.removeListener.call(this,e,t);return e==="readable"&&A.default.nextTick(Y_,this),r};xt.prototype.removeAllListeners=function(e){var t=wh.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&A.default.nextTick(Y_,this),t};function Y_(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function tK(e){ct("readable nexttick read 0"),e.read(0)}xt.prototype.resume=function(){var e=this._readableState;return e.flowing||(ct("resume"),e.flowing=!e.readableListening,rK(this,e)),e.paused=!1,this};function rK(e,t){t.resumeScheduled||(t.resumeScheduled=!0,A.default.nextTick(iK,e,t))}function iK(e,t){ct("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),rv(e),t.flowing&&!t.reading&&e.read(0)}xt.prototype.pause=function(){return ct("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(ct("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function rv(e){var t=e._readableState;for(ct("flow",t.flowing);t.flowing&&e.read()!==null;);}xt.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;e.on("end",function(){if(ct("wrapped end"),r.decoder&&!r.ended){var a=r.decoder.end();a&&a.length&&t.push(a)}t.push(null)}),e.on("data",function(a){if(ct("wrapped data"),r.decoder&&(a=r.decoder.write(a)),!(r.objectMode&&a==null)&&!(!r.objectMode&&(!a||!a.length))){var s=t.push(a);s||(i=!0,e.pause())}});for(var n in e)this[n]===void 0&&typeof e[n]=="function"&&(this[n]=(function(s){return function(){return e[s].apply(e,arguments)}})(n));for(var o=0;o<Xg.length;o++)e.on(Xg[o],this.emit.bind(this,Xg[o]));return this._read=function(a){ct("wrapped _read",a),i&&(i=!1,e.resume())},this};typeof Symbol=="function"&&(xt.prototype[Symbol.asyncIterator]=function(){return Yg===void 0&&(Yg=F_()),Yg(this)});Object.defineProperty(xt.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(xt.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(xt.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}});xt._fromList=$_;Object.defineProperty(xt.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function $_(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.first():r=t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function Qg(e){var t=e._readableState;ct("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,A.default.nextTick(nK,t,e))}function nK(e,t){if(ct("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}typeof Symbol=="function"&&(xt.from=function(e,t){return $g===void 0&&($g=j_()),$g(xt,e,t)});function X_(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}});var iv=k((qce,ew)=>{"use strict";v();ew.exports=la;var Xd=Iu().codes,oK=Xd.ERR_METHOD_NOT_IMPLEMENTED,aK=Xd.ERR_MULTIPLE_CALLBACK,sK=Xd.ERR_TRANSFORM_ALREADY_TRANSFORMING,uK=Xd.ERR_TRANSFORM_WITH_LENGTH_0,Jd=Ou();Te()(la,Jd);function fK(e,t){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new aK);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),i(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function la(e){if(!(this instanceof la))return new la(e);Jd.call(this,e),this._transformState={afterTransform:fK.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",cK)}function cK(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){Q_(e,t,r)}):Q_(this,null,null)}la.prototype.push=function(e,t){return this._transformState.needTransform=!1,Jd.prototype.push.call(this,e,t)};la.prototype._transform=function(e,t,r){r(new oK("_transform()"))};la.prototype._write=function(e,t,r){var i=this._transformState;if(i.writecb=r,i.writechunk=e,i.writeencoding=t,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};la.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};la.prototype._destroy=function(e,t){Jd.prototype._destroy.call(this,e,function(r){t(r)})};function Q_(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new uK;if(e._transformState.transforming)throw new sK;return e.push(null)}});var iw=k((Fce,rw)=>{"use strict";v();rw.exports=Sh;var tw=iv();Te()(Sh,tw);function Sh(e){if(!(this instanceof Sh))return new Sh(e);tw.call(this,e)}Sh.prototype._transform=function(e,t,r){r(null,e)}});var uw=k((jce,sw)=>{"use strict";v();var nv;function lK(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var aw=Iu().codes,hK=aw.ERR_MISSING_ARGS,dK=aw.ERR_STREAM_DESTROYED;function nw(e){if(e)throw e}function pK(e){return e.setHeader&&typeof e.abort=="function"}function gK(e,t,r,i){i=lK(i);var n=!1;e.on("close",function(){n=!0}),nv===void 0&&(nv=Vd()),nv(e,{readable:t,writable:r},function(a){if(a)return i(a);n=!0,i()});var o=!1;return function(a){if(!n&&!o){if(o=!0,pK(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();i(a||new dK("pipe"))}}}function ow(e){e()}function vK(e,t){return e.pipe(t)}function mK(e){return!e.length||typeof e[e.length-1]!="function"?nw:e.pop()}function yK(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=mK(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new hK("streams");var n,o=t.map(function(a,s){var u=s<t.length-1,c=s>0;return gK(a,u,c,function(l){n||(n=l),l&&o.forEach(ow),!u&&(o.forEach(ow),i(n))})});return t.reduce(vK)}sw.exports=yK});var Qd=k((Kce,fw)=>{v();fw.exports=on;var ov=Qf().EventEmitter,bK=Te();bK(on,ov);on.Readable=zg();on.Writable=Fg();on.Duplex=Ou();on.Transform=iv();on.PassThrough=iw();on.finished=Vd();on.pipeline=uw();on.Stream=on;function on(){ov.call(this)}on.prototype.pipe=function(e,t){var r=this;function i(l){e.writable&&e.write(l)===!1&&r.pause&&r.pause()}r.on("data",i);function n(){r.readable&&r.resume&&r.resume()}e.on("drain",n),!e._isStdio&&(!t||t.end!==!1)&&(r.on("end",a),r.on("close",s));var o=!1;function a(){o||(o=!0,e.end())}function s(){o||(o=!0,typeof e.destroy=="function"&&e.destroy())}function u(l){if(c(),ov.listenerCount(this,"error")===0)throw l}r.on("error",u),e.on("error",u);function c(){r.removeListener("data",i),e.removeListener("drain",n),r.removeListener("end",a),r.removeListener("close",s),r.removeListener("error",u),e.removeListener("error",u),r.removeListener("end",c),r.removeListener("close",c),e.removeListener("close",c)}return r.on("end",c),r.on("close",c),e.on("close",c),e.emit("pipe",r),e}});var hw=k((Gce,lw)=>{"use strict";v();var _o=ot().Buffer,cw=Qd().Transform,_K=Te();function ss(e){cw.call(this),this._block=_o.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}_K(ss,cw);ss.prototype._transform=function(e,t,r){var i=null;try{this.update(e,t)}catch(n){i=n}r(i)};ss.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(r){t=r}e(t)};var wK=typeof Uint8Array<"u",SK=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&ArrayBuffer.isView&&(_o.prototype instanceof Uint8Array||_o.TYPED_ARRAY_SUPPORT);function xK(e,t){if(e instanceof _o)return e;if(typeof e=="string")return _o.from(e,t);if(SK&&ArrayBuffer.isView(e)){if(e.byteLength===0)return _o.alloc(0);var r=_o.from(e.buffer,e.byteOffset,e.byteLength);if(r.byteLength===e.byteLength)return r}if(wK&&e instanceof Uint8Array||_o.isBuffer(e)&&e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e))return _o.from(e);throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}ss.prototype.update=function(e,t){if(this._finalized)throw new Error("Digest already called");e=xK(e,t);for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var n=this._blockOffset;n<this._blockSize;)r[n++]=e[i++];this._update(),this._blockOffset=0}for(;i<e.length;)r[this._blockOffset++]=e[i++];for(var o=0,a=e.length*8;a>0;++o)this._length[o]+=a,a=this._length[o]/4294967296|0,a>0&&(this._length[o]-=4294967296*a);return this};ss.prototype._update=function(){throw new Error("_update is not implemented")};ss.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();e!==void 0&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t};ss.prototype._digest=function(){throw new Error("_digest is not implemented")};lw.exports=ss});var r2=k((Wce,pw)=>{"use strict";v();var EK=Te(),dw=hw(),IK=ot().Buffer,OK=new Array(16);function e2(){dw.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}EK(e2,dw);e2.prototype._update=function(){for(var e=OK,t=0;t<16;++t)e[t]=this._block.readInt32LE(t*4);var r=this._a,i=this._b,n=this._c,o=this._d;r=si(r,i,n,o,e[0],3614090360,7),o=si(o,r,i,n,e[1],3905402710,12),n=si(n,o,r,i,e[2],606105819,17),i=si(i,n,o,r,e[3],3250441966,22),r=si(r,i,n,o,e[4],4118548399,7),o=si(o,r,i,n,e[5],1200080426,12),n=si(n,o,r,i,e[6],2821735955,17),i=si(i,n,o,r,e[7],4249261313,22),r=si(r,i,n,o,e[8],1770035416,7),o=si(o,r,i,n,e[9],2336552879,12),n=si(n,o,r,i,e[10],4294925233,17),i=si(i,n,o,r,e[11],2304563134,22),r=si(r,i,n,o,e[12],1804603682,7),o=si(o,r,i,n,e[13],4254626195,12),n=si(n,o,r,i,e[14],2792965006,17),i=si(i,n,o,r,e[15],1236535329,22),r=ui(r,i,n,o,e[1],4129170786,5),o=ui(o,r,i,n,e[6],3225465664,9),n=ui(n,o,r,i,e[11],643717713,14),i=ui(i,n,o,r,e[0],3921069994,20),r=ui(r,i,n,o,e[5],3593408605,5),o=ui(o,r,i,n,e[10],38016083,9),n=ui(n,o,r,i,e[15],3634488961,14),i=ui(i,n,o,r,e[4],3889429448,20),r=ui(r,i,n,o,e[9],568446438,5),o=ui(o,r,i,n,e[14],3275163606,9),n=ui(n,o,r,i,e[3],4107603335,14),i=ui(i,n,o,r,e[8],1163531501,20),r=ui(r,i,n,o,e[13],2850285829,5),o=ui(o,r,i,n,e[2],4243563512,9),n=ui(n,o,r,i,e[7],1735328473,14),i=ui(i,n,o,r,e[12],2368359562,20),r=fi(r,i,n,o,e[5],4294588738,4),o=fi(o,r,i,n,e[8],2272392833,11),n=fi(n,o,r,i,e[11],1839030562,16),i=fi(i,n,o,r,e[14],4259657740,23),r=fi(r,i,n,o,e[1],2763975236,4),o=fi(o,r,i,n,e[4],1272893353,11),n=fi(n,o,r,i,e[7],4139469664,16),i=fi(i,n,o,r,e[10],3200236656,23),r=fi(r,i,n,o,e[13],681279174,4),o=fi(o,r,i,n,e[0],3936430074,11),n=fi(n,o,r,i,e[3],3572445317,16),i=fi(i,n,o,r,e[6],76029189,23),r=fi(r,i,n,o,e[9],3654602809,4),o=fi(o,r,i,n,e[12],3873151461,11),n=fi(n,o,r,i,e[15],530742520,16),i=fi(i,n,o,r,e[2],3299628645,23),r=ci(r,i,n,o,e[0],4096336452,6),o=ci(o,r,i,n,e[7],1126891415,10),n=ci(n,o,r,i,e[14],2878612391,15),i=ci(i,n,o,r,e[5],4237533241,21),r=ci(r,i,n,o,e[12],1700485571,6),o=ci(o,r,i,n,e[3],2399980690,10),n=ci(n,o,r,i,e[10],4293915773,15),i=ci(i,n,o,r,e[1],2240044497,21),r=ci(r,i,n,o,e[8],1873313359,6),o=ci(o,r,i,n,e[15],4264355552,10),n=ci(n,o,r,i,e[6],2734768916,15),i=ci(i,n,o,r,e[13],1309151649,21),r=ci(r,i,n,o,e[4],4149444226,6),o=ci(o,r,i,n,e[11],3174756917,10),n=ci(n,o,r,i,e[2],718787259,15),i=ci(i,n,o,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+i|0,this._c=this._c+n|0,this._d=this._d+o|0};e2.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=IK.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e};function t2(e,t){return e<<t|e>>>32-t}function si(e,t,r,i,n,o,a){return t2(e+(t&r|~t&i)+n+o|0,a)+t|0}function ui(e,t,r,i,n,o,a){return t2(e+(t&i|r&~i)+n+o|0,a)+t|0}function fi(e,t,r,i,n,o,a){return t2(e+(t^r^i)+n+o|0,a)+t|0}function ci(e,t,r,i,n,o,a){return t2(e+(r^(t|~i))+n+o|0,a)+t|0}pw.exports=e2});var vw=k(($ce,gw)=>{v();var AK={}.toString;gw.exports=Array.isArray||function(e){return AK.call(e)=="[object Array]"}});var yw=k((Jce,mw)=>{"use strict";v();var PK=_u(),TK=ts(),kK=TK("TypedArray.prototype.buffer",!0),RK=Eg();mw.exports=kK||function(t){if(!RK(t))throw new PK("Not a Typed Array");return t.buffer}});var xh=k((ele,_w)=>{"use strict";v();var Tn=ot().Buffer,BK=vw(),MK=yw(),CK=ArrayBuffer.isView||function(t){try{return MK(t),!0}catch{return!1}},NK=typeof Uint8Array<"u",bw=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",DK=bw&&(Tn.prototype instanceof Uint8Array||Tn.TYPED_ARRAY_SUPPORT);_w.exports=function(t,r){if(Tn.isBuffer(t))return t.constructor&&!("isBuffer"in t)?Tn.from(t):t;if(typeof t=="string")return Tn.from(t,r);if(bw&&CK(t)){if(t.byteLength===0)return Tn.alloc(0);if(DK){var i=Tn.from(t.buffer,t.byteOffset,t.byteLength);if(i.byteLength===t.byteLength)return i}var n=t instanceof Uint8Array?t:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),o=Tn.from(n);if(o.length===t.byteLength)return o}if(NK&&t instanceof Uint8Array)return Tn.from(t);var a=BK(t);if(a)for(var s=0;s<t.length;s+=1){var u=t[s];if(typeof u!="number"||u<0||u>255||~~u!==u)throw new RangeError("Array items must be numbers in the range 0-255.")}if(a||Tn.isBuffer(t)&&t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t))return Tn.from(t);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')}});var Ew=k((rle,xw)=>{"use strict";v();var LK=ot().Buffer,qK=xh(),Sw=typeof Uint8Array<"u",UK=Sw&&typeof ArrayBuffer<"u",ww=UK&&ArrayBuffer.isView;xw.exports=function(e,t){if(typeof e=="string"||LK.isBuffer(e)||Sw&&e instanceof Uint8Array||ww&&ww(e))return qK(e,t);throw new TypeError('The "data" argument must be a string, a Buffer, a Uint8Array, or a DataView')}});var Eh=k((nle,av)=>{"use strict";v();typeof A.default>"u"||!A.default.version||A.default.version.indexOf("v0.")===0||A.default.version.indexOf("v1.")===0&&A.default.version.indexOf("v1.8.")!==0?av.exports={nextTick:FK}:av.exports=A.default;function FK(e,t,r,i){if(typeof e!="function")throw new TypeError('"callback" argument must be a function');var n=arguments.length,o,a;switch(n){case 0:case 1:return A.default.nextTick(e);case 2:return A.default.nextTick(function(){e.call(null,t)});case 3:return A.default.nextTick(function(){e.call(null,t,r)});case 4:return A.default.nextTick(function(){e.call(null,t,r,i)});default:for(o=new Array(n-1),a=0;a<o.length;)o[a++]=arguments[a];return A.default.nextTick(function(){e.apply(null,o)})}}});var Ow=k((ale,Iw)=>{v();var HK={}.toString;Iw.exports=Array.isArray||function(e){return HK.call(e)=="[object Array]"}});var sv=k((ule,Aw)=>{v();Aw.exports=Qf().EventEmitter});var n2=k((uv,Tw)=>{v();var i2=Kt(),ha=i2.Buffer;function Pw(e,t){for(var r in e)t[r]=e[r]}ha.from&&ha.alloc&&ha.allocUnsafe&&ha.allocUnsafeSlow?Tw.exports=i2:(Pw(i2,uv),uv.Buffer=gc);function gc(e,t,r){return ha(e,t,r)}Pw(ha,gc);gc.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return ha(e,t,r)};gc.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var i=ha(e);return t!==void 0?typeof r=="string"?i.fill(t,r):i.fill(t):i.fill(0),i};gc.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return ha(e)};gc.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return i2.SlowBuffer(e)}});var vc=k(li=>{v();function jK(e){return Array.isArray?Array.isArray(e):o2(e)==="[object Array]"}li.isArray=jK;function zK(e){return typeof e=="boolean"}li.isBoolean=zK;function KK(e){return e===null}li.isNull=KK;function VK(e){return e==null}li.isNullOrUndefined=VK;function GK(e){return typeof e=="number"}li.isNumber=GK;function ZK(e){return typeof e=="string"}li.isString=ZK;function WK(e){return typeof e=="symbol"}li.isSymbol=WK;function YK(e){return e===void 0}li.isUndefined=YK;function $K(e){return o2(e)==="[object RegExp]"}li.isRegExp=$K;function XK(e){return typeof e=="object"&&e!==null}li.isObject=XK;function JK(e){return o2(e)==="[object Date]"}li.isDate=JK;function QK(e){return o2(e)==="[object Error]"||e instanceof Error}li.isError=QK;function eV(e){return typeof e=="function"}li.isFunction=eV;function tV(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}li.isPrimitive=tV;li.isBuffer=Kt().Buffer.isBuffer;function o2(e){return Object.prototype.toString.call(e)}});var Rw=k((dle,fv)=>{"use strict";v();function rV(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var kw=n2().Buffer,Ih=rn();function iV(e,t,r){e.copy(t,r)}fv.exports=(function(){function e(){rV(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length},e.prototype.unshift=function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length},e.prototype.shift=function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n},e.prototype.concat=function(r){if(this.length===0)return kw.alloc(0);for(var i=kw.allocUnsafe(r>>>0),n=this.head,o=0;n;)iV(n.data,i,o),o+=n.data.length,n=n.next;return i},e})();Ih&&Ih.inspect&&Ih.inspect.custom&&(fv.exports.prototype[Ih.inspect.custom]=function(){var e=Ih.inspect({length:this.length});return this.constructor.name+" "+e})});var cv=k((gle,Bw)=>{"use strict";v();var a2=Eh();function nV(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,a2.nextTick(s2,this,e)):a2.nextTick(s2,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(o){!t&&o?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,a2.nextTick(s2,r,o)):a2.nextTick(s2,r,o):t&&t(o)}),this)}function oV(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function s2(e,t){e.emit("error",t)}Bw.exports={destroy:nV,undestroy:oV}});var hv=k((mle,Fw)=>{"use strict";v();var ku=Eh();Fw.exports=yr;function Cw(e){var t=this;this.next=null,this.entry=null,this.finish=function(){xV(t,e)}}var aV=!A.default.browser&&["v0.10","v0.9."].indexOf(A.default.version.slice(0,5))>-1?setImmediate:ku.nextTick,mc;yr.WritableState=Ah;var Nw=Object.create(vc());Nw.inherits=Te();var sV={deprecate:Lg()},Dw=sv(),f2=n2().Buffer,uV=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function fV(e){return f2.from(e)}function cV(e){return f2.isBuffer(e)||e instanceof uV}var Lw=cv();Nw.inherits(yr,Dw);function lV(){}function Ah(e,t){mc=mc||Ru(),e=e||{};var r=t instanceof mc;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,n=e.writableHighWaterMark,o=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=o,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=e.decodeStrings===!1;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(s){yV(t,s)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new Cw(this)}Ah.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(Ah.prototype,"buffer",{get:sV.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var u2;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(u2=Function.prototype[Symbol.hasInstance],Object.defineProperty(yr,Symbol.hasInstance,{value:function(e){return u2.call(this,e)?!0:this!==yr?!1:e&&e._writableState instanceof Ah}})):u2=function(e){return e instanceof this};function yr(e){if(mc=mc||Ru(),!u2.call(yr,this)&&!(this instanceof mc))return new yr(e);this._writableState=new Ah(e,this),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),Dw.call(this)}yr.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function hV(e,t){var r=new Error("write after end");e.emit("error",r),ku.nextTick(t,r)}function dV(e,t,r,i){var n=!0,o=!1;return r===null?o=new TypeError("May not write null values to stream"):typeof r!="string"&&r!==void 0&&!t.objectMode&&(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),ku.nextTick(i,o),n=!1),n}yr.prototype.write=function(e,t,r){var i=this._writableState,n=!1,o=!i.objectMode&&cV(e);return o&&!f2.isBuffer(e)&&(e=fV(e)),typeof t=="function"&&(r=t,t=null),o?t="buffer":t||(t=i.defaultEncoding),typeof r!="function"&&(r=lV),i.ended?hV(this,r):(o||dV(this,i,e,r))&&(i.pendingcb++,n=gV(this,i,o,e,t,r)),n};yr.prototype.cork=function(){var e=this._writableState;e.corked++};yr.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&qw(this,e))};yr.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this};function pV(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=f2.from(t,r)),t}Object.defineProperty(yr.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function gV(e,t,r,i,n,o){if(!r){var a=pV(t,i,n);i!==a&&(r=!0,n="buffer",i=a)}var s=t.objectMode?1:i.length;t.length+=s;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:o,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else lv(e,t,!1,s,i,n,o);return u}function lv(e,t,r,i,n,o,a){t.writelen=i,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(n,t.onwrite):e._write(n,o,t.onwrite),t.sync=!1}function vV(e,t,r,i,n){--t.pendingcb,r?(ku.nextTick(n,i),ku.nextTick(Oh,e,t),e._writableState.errorEmitted=!0,e.emit("error",i)):(n(i),e._writableState.errorEmitted=!0,e.emit("error",i),Oh(e,t))}function mV(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function yV(e,t){var r=e._writableState,i=r.sync,n=r.writecb;if(mV(r),t)vV(e,r,i,t,n);else{var o=Uw(r);!o&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&qw(e,r),i?aV(Mw,e,r,o,n):Mw(e,r,o,n)}}function Mw(e,t,r,i){r||bV(e,t),t.pendingcb--,i(),Oh(e,t)}function bV(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function qw(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,n=new Array(i),o=t.corkedRequestsFree;o.entry=r;for(var a=0,s=!0;r;)n[a]=r,r.isBuf||(s=!1),r=r.next,a+=1;n.allBuffers=s,lv(e,t,!0,t.length,n,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new Cw(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,l=r.callback,m=t.objectMode?1:u.length;if(lv(e,t,!1,m,u,c,l),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}yr.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))};yr.prototype._writev=null;yr.prototype.end=function(e,t,r){var i=this._writableState;typeof e=="function"?(r=e,e=null,t=null):typeof t=="function"&&(r=t,t=null),e!=null&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||SV(this,i,r)};function Uw(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function _V(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),Oh(e,t)})}function wV(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"?(t.pendingcb++,t.finalCalled=!0,ku.nextTick(_V,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function Oh(e,t){var r=Uw(t);return r&&(wV(e,t),t.pendingcb===0&&(t.finished=!0,e.emit("finish"))),r}function SV(e,t,r){t.ending=!0,Oh(e,t),r&&(t.finished?ku.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function xV(e,t,r){var i=e.entry;for(e.entry=null;i;){var n=i.callback;t.pendingcb--,n(r),i=i.next}t.corkedRequestsFree.next=e}Object.defineProperty(yr.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});yr.prototype.destroy=Lw.destroy;yr.prototype._undestroy=Lw.undestroy;yr.prototype._destroy=function(e,t){this.end(),t(e)}});var Ru=k((ble,Kw)=>{"use strict";v();var Hw=Eh(),EV=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};Kw.exports=da;var jw=Object.create(vc());jw.inherits=Te();var zw=gv(),pv=hv();jw.inherits(da,zw);for(dv=EV(pv.prototype),c2=0;c2<dv.length;c2++)l2=dv[c2],da.prototype[l2]||(da.prototype[l2]=pv.prototype[l2]);var dv,l2,c2;function da(e){if(!(this instanceof da))return new da(e);zw.call(this,e),pv.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",IV)}Object.defineProperty(da.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function IV(){this.allowHalfOpen||this._writableState.ended||Hw.nextTick(OV,this)}function OV(e){e.end()}Object.defineProperty(da.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}});da.prototype._destroy=function(e,t){this.push(null),this.end(),Hw.nextTick(t,e)}});var gv=k((Sle,rS)=>{"use strict";v();var bc=Eh();rS.exports=Wt;var AV=Ow(),Ph;Wt.ReadableState=Xw;var wle=Qf().EventEmitter,Ww=function(e,t){return e.listeners(t).length},_v=sv(),Th=n2().Buffer,PV=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function TV(e){return Th.from(e)}function kV(e){return Th.isBuffer(e)||e instanceof PV}var Yw=Object.create(vc());Yw.inherits=Te();var vv=rn(),Tt=void 0;vv&&vv.debuglog?Tt=vv.debuglog("stream"):Tt=function(){};var RV=Rw(),$w=cv(),yc;Yw.inherits(Wt,_v);var mv=["error","close","destroy","pause","resume"];function BV(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):AV(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function Xw(e,t){Ph=Ph||Ru(),e=e||{};var r=t instanceof Ph;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,n=e.readableHighWaterMark,o=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new RV,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(yc||(yc=hc().StringDecoder),this.decoder=new yc(e.encoding),this.encoding=e.encoding)}function Wt(e){if(Ph=Ph||Ru(),!(this instanceof Wt))return new Wt(e);this._readableState=new Xw(e,this),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),_v.call(this)}Object.defineProperty(Wt.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});Wt.prototype.destroy=$w.destroy;Wt.prototype._undestroy=$w.undestroy;Wt.prototype._destroy=function(e,t){this.push(null),t(e)};Wt.prototype.push=function(e,t){var r=this._readableState,i;return r.objectMode?i=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=Th.from(e,t),t=""),i=!0),Jw(this,e,t,!1,i)};Wt.prototype.unshift=function(e){return Jw(this,e,null,!0,!1)};function Jw(e,t,r,i,n){var o=e._readableState;if(t===null)o.reading=!1,DV(e,o);else{var a;n||(a=MV(o,t)),a?e.emit("error",a):o.objectMode||t&&t.length>0?(typeof t!="string"&&!o.objectMode&&Object.getPrototypeOf(t)!==Th.prototype&&(t=TV(t)),i?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):yv(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||t.length!==0?yv(e,o,t,!1):Qw(e,o)):yv(e,o,t,!1))):i||(o.reading=!1)}return CV(o)}function yv(e,t,r,i){t.flowing&&t.length===0&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&h2(e)),Qw(e,t)}function MV(e,t){var r;return!kV(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function CV(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}Wt.prototype.isPaused=function(){return this._readableState.flowing===!1};Wt.prototype.setEncoding=function(e){return yc||(yc=hc().StringDecoder),this._readableState.decoder=new yc(e),this._readableState.encoding=e,this};var Vw=8388608;function NV(e){return e>=Vw?e=Vw:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function Gw(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=NV(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}Wt.prototype.read=function(e){Tt("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return Tt("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?bv(this):h2(this),null;if(e=Gw(e,t),e===0&&t.ended)return t.length===0&&bv(this),null;var i=t.needReadable;Tt("need readable",i),(t.length===0||t.length-e<t.highWaterMark)&&(i=!0,Tt("length less than watermark",i)),t.ended||t.reading?(i=!1,Tt("reading or ended",i)):i&&(Tt("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=Gw(r,t)));var n;return e>0?n=eS(e,t):n=null,n===null?(t.needReadable=!0,e=0):t.length-=e,t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&bv(this)),n!==null&&this.emit("data",n),n};function DV(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,h2(e)}}function h2(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(Tt("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?bc.nextTick(Zw,e):Zw(e))}function Zw(e){Tt("emit readable"),e.emit("readable"),wv(e)}function Qw(e,t){t.readingMore||(t.readingMore=!0,bc.nextTick(LV,e,t))}function LV(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(Tt("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}Wt.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))};Wt.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e);break}i.pipesCount+=1,Tt("pipe count=%d opts=%j",i.pipesCount,t);var n=(!t||t.end!==!1)&&e!==A.default.stdout&&e!==A.default.stderr,o=n?s:D;i.endEmitted?bc.nextTick(o):r.once("end",o),e.on("unpipe",a);function a(L,U){Tt("onunpipe"),L===r&&U&&U.hasUnpiped===!1&&(U.hasUnpiped=!0,l())}function s(){Tt("onend"),e.end()}var u=qV(r);e.on("drain",u);var c=!1;function l(){Tt("cleanup"),e.removeListener("close",P),e.removeListener("finish",M),e.removeListener("drain",u),e.removeListener("error",E),e.removeListener("unpipe",a),r.removeListener("end",s),r.removeListener("end",D),r.removeListener("data",w),c=!0,i.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u()}var m=!1;r.on("data",w);function w(L){Tt("ondata"),m=!1;var U=e.write(L);U===!1&&!m&&((i.pipesCount===1&&i.pipes===e||i.pipesCount>1&&tS(i.pipes,e)!==-1)&&!c&&(Tt("false write response, pause",i.awaitDrain),i.awaitDrain++,m=!0),r.pause())}function E(L){Tt("onerror",L),D(),e.removeListener("error",E),Ww(e,"error")===0&&e.emit("error",L)}BV(e,"error",E);function P(){e.removeListener("finish",M),D()}e.once("close",P);function M(){Tt("onfinish"),e.removeListener("close",P),D()}e.once("finish",M);function D(){Tt("unpipe"),r.unpipe(e)}return e.emit("pipe",r),i.flowing||(Tt("pipe resume"),r.resume()),e};function qV(e){return function(){var t=e._readableState;Tt("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&Ww(e,"data")&&(t.flowing=!0,wv(e))}}Wt.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<n;o++)i[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=tS(t.pipes,e);return a===-1?this:(t.pipes.splice(a,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)};Wt.prototype.on=function(e,t){var r=_v.prototype.on.call(this,e,t);if(e==="data")this._readableState.flowing!==!1&&this.resume();else if(e==="readable"){var i=this._readableState;!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&h2(this):bc.nextTick(UV,this))}return r};Wt.prototype.addListener=Wt.prototype.on;function UV(e){Tt("readable nexttick read 0"),e.read(0)}Wt.prototype.resume=function(){var e=this._readableState;return e.flowing||(Tt("resume"),e.flowing=!0,FV(this,e)),this};function FV(e,t){t.resumeScheduled||(t.resumeScheduled=!0,bc.nextTick(HV,e,t))}function HV(e,t){t.reading||(Tt("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),wv(e),t.flowing&&!t.reading&&e.read(0)}Wt.prototype.pause=function(){return Tt("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Tt("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function wv(e){var t=e._readableState;for(Tt("flow",t.flowing);t.flowing&&e.read()!==null;);}Wt.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;e.on("end",function(){if(Tt("wrapped end"),r.decoder&&!r.ended){var a=r.decoder.end();a&&a.length&&t.push(a)}t.push(null)}),e.on("data",function(a){if(Tt("wrapped data"),r.decoder&&(a=r.decoder.write(a)),!(r.objectMode&&a==null)&&!(!r.objectMode&&(!a||!a.length))){var s=t.push(a);s||(i=!0,e.pause())}});for(var n in e)this[n]===void 0&&typeof e[n]=="function"&&(this[n]=(function(a){return function(){return e[a].apply(e,arguments)}})(n));for(var o=0;o<mv.length;o++)e.on(mv[o],this.emit.bind(this,mv[o]));return this._read=function(a){Tt("wrapped _read",a),i&&(i=!1,e.resume())},this};Object.defineProperty(Wt.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Wt._fromList=eS;function eS(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.head.data:r=t.buffer.concat(t.length),t.buffer.clear()):r=jV(e,t.buffer,t.decoder),r}function jV(e,t,r){var i;return e<t.head.data.length?(i=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):e===t.head.data.length?i=t.shift():i=r?zV(e,t):KV(e,t),i}function zV(e,t){var r=t.head,i=1,n=r.data;for(e-=n.length;r=r.next;){var o=r.data,a=e>o.length?o.length:e;if(a===o.length?n+=o:n+=o.slice(0,e),e-=a,e===0){a===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++i}return t.length-=i,n}function KV(e,t){var r=Th.allocUnsafe(e),i=t.head,n=1;for(i.data.copy(r),e-=i.data.length;i=i.next;){var o=i.data,a=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,a),e-=a,e===0){a===o.length?(++n,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=o.slice(a));break}++n}return t.length-=n,r}function bv(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,bc.nextTick(VV,t,e))}function VV(e,t){!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function tS(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}});var Sv=k((Ele,oS)=>{"use strict";v();oS.exports=pa;var d2=Ru(),nS=Object.create(vc());nS.inherits=Te();nS.inherits(pa,d2);function GV(e,t){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,t!=null&&this.push(t),i(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function pa(e){if(!(this instanceof pa))return new pa(e);d2.call(this,e),this._transformState={afterTransform:GV.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",ZV)}function ZV(){var e=this;typeof this._flush=="function"?this._flush(function(t,r){iS(e,t,r)}):iS(this,null,null)}pa.prototype.push=function(e,t){return this._transformState.needTransform=!1,d2.prototype.push.call(this,e,t)};pa.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")};pa.prototype._write=function(e,t,r){var i=this._transformState;if(i.writecb=r,i.writechunk=e,i.writeencoding=t,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};pa.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};pa.prototype._destroy=function(e,t){var r=this;d2.prototype._destroy.call(this,e,function(i){t(i),r.emit("close")})};function iS(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}});var fS=k((Ole,uS)=>{"use strict";v();uS.exports=kh;var aS=Sv(),sS=Object.create(vc());sS.inherits=Te();sS.inherits(kh,aS);function kh(e){if(!(this instanceof kh))return new kh(e);aS.call(this,e)}kh.prototype._transform=function(e,t,r){r(null,e)}});var lS=k((wo,cS)=>{v();wo=cS.exports=gv();wo.Stream=wo;wo.Readable=wo;wo.Writable=hv();wo.Duplex=Ru();wo.Transform=Sv();wo.PassThrough=fS()});var pS=k((Tle,dS)=>{"use strict";v();var WV=ot().Buffer,YV=Ew(),hS=lS().Transform,$V=Te();function us(e){hS.call(this),this._block=WV.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}$V(us,hS);us.prototype._transform=function(e,t,r){var i=null;try{this.update(e,t)}catch(n){i=n}r(i)};us.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(r){t=r}e(t)};us.prototype.update=function(e,t){if(this._finalized)throw new Error("Digest already called");for(var r=YV(e,t),i=this._block,n=0;this._blockOffset+r.length-n>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)i[o]=r[n],o+=1,n+=1;this._update(),this._blockOffset=0}for(;n<r.length;)i[this._blockOffset]=r[n],this._blockOffset+=1,n+=1;for(var a=0,s=r.length*8;s>0;++a)this._length[a]+=s,s=this._length[a]/4294967296|0,s>0&&(this._length[a]-=4294967296*s);return this};us.prototype._update=function(){throw new Error("_update is not implemented")};us.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();e!==void 0&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t};us.prototype._digest=function(){throw new Error("_digest is not implemented")};dS.exports=us});var g2=k((Rle,wS)=>{"use strict";v();var xv=Kt().Buffer,XV=Te(),_S=pS(),JV=new Array(16),Rh=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],Bh=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],Mh=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],Ch=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],Nh=[0,1518500249,1859775393,2400959708,2840853838],Dh=[1352829926,1548603684,1836072691,2053994217,0];function Bu(e,t){return e<<t|e>>>32-t}function gS(e,t,r,i,n,o,a,s){return Bu(e+(t^r^i)+o+a|0,s)+n|0}function vS(e,t,r,i,n,o,a,s){return Bu(e+(t&r|~t&i)+o+a|0,s)+n|0}function mS(e,t,r,i,n,o,a,s){return Bu(e+((t|~r)^i)+o+a|0,s)+n|0}function yS(e,t,r,i,n,o,a,s){return Bu(e+(t&i|r&~i)+o+a|0,s)+n|0}function bS(e,t,r,i,n,o,a,s){return Bu(e+(t^(r|~i))+o+a|0,s)+n|0}function p2(){_S.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}XV(p2,_S);p2.prototype._update=function(){for(var e=JV,t=0;t<16;++t)e[t]=this._block.readInt32LE(t*4);for(var r=this._a|0,i=this._b|0,n=this._c|0,o=this._d|0,a=this._e|0,s=this._a|0,u=this._b|0,c=this._c|0,l=this._d|0,m=this._e|0,w=0;w<80;w+=1){var E,P;w<16?(E=gS(r,i,n,o,a,e[Rh[w]],Nh[0],Mh[w]),P=bS(s,u,c,l,m,e[Bh[w]],Dh[0],Ch[w])):w<32?(E=vS(r,i,n,o,a,e[Rh[w]],Nh[1],Mh[w]),P=yS(s,u,c,l,m,e[Bh[w]],Dh[1],Ch[w])):w<48?(E=mS(r,i,n,o,a,e[Rh[w]],Nh[2],Mh[w]),P=mS(s,u,c,l,m,e[Bh[w]],Dh[2],Ch[w])):w<64?(E=yS(r,i,n,o,a,e[Rh[w]],Nh[3],Mh[w]),P=vS(s,u,c,l,m,e[Bh[w]],Dh[3],Ch[w])):(E=bS(r,i,n,o,a,e[Rh[w]],Nh[4],Mh[w]),P=gS(s,u,c,l,m,e[Bh[w]],Dh[4],Ch[w])),r=a,a=o,o=Bu(n,10),n=i,i=E,s=m,m=l,l=Bu(c,10),c=u,u=P}var M=this._b+n+l|0;this._b=this._c+o+m|0,this._c=this._d+a+s|0,this._d=this._e+r+u|0,this._e=this._a+i+c|0,this._a=M};p2.prototype._digest=function(){this._block[this._blockOffset]=128,this._blockOffset+=1,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=xv.alloc?xv.alloc(20):new xv(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e};wS.exports=p2});var Mu=k((Mle,SS)=>{"use strict";v();var QV=ot().Buffer,eG=xh();function v2(e,t){this._block=QV.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}v2.prototype.update=function(e,t){e=eG(e,t||"utf8");for(var r=this._block,i=this._blockSize,n=e.length,o=this._len,a=0;a<n;){for(var s=o%i,u=Math.min(n-a,i-s),c=0;c<u;c++)r[s+c]=e[a+c];o+=u,a+=u,o%i===0&&this._update(r)}return this._len+=n,this};v2.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=this._len*8;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var i=(r&4294967295)>>>0,n=(r-i)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(i,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o};v2.prototype._update=function(){throw new Error("_update must be implemented by subclass")};SS.exports=v2});var IS=k((Nle,ES)=>{"use strict";v();var tG=Te(),xS=Mu(),rG=ot().Buffer,iG=[1518500249,1859775393,-1894007588,-899497514],nG=new Array(80);function Lh(){this.init(),this._w=nG,xS.call(this,64,56)}tG(Lh,xS);Lh.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function oG(e){return e<<5|e>>>27}function aG(e){return e<<30|e>>>2}function sG(e,t,r,i){return e===0?t&r|~t&i:e===2?t&r|t&i|r&i:t^r^i}Lh.prototype._update=function(e){for(var t=this._w,r=this._a|0,i=this._b|0,n=this._c|0,o=this._d|0,a=this._e|0,s=0;s<16;++s)t[s]=e.readInt32BE(s*4);for(;s<80;++s)t[s]=t[s-3]^t[s-8]^t[s-14]^t[s-16];for(var u=0;u<80;++u){var c=~~(u/20),l=oG(r)+sG(c,i,n,o)+a+t[u]+iG[c]|0;a=o,o=n,n=aG(i),i=r,r=l}this._a=r+this._a|0,this._b=i+this._b|0,this._c=n+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0};Lh.prototype._hash=function(){var e=rG.allocUnsafe(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e};ES.exports=Lh});var PS=k((Lle,AS)=>{"use strict";v();var uG=Te(),OS=Mu(),fG=ot().Buffer,cG=[1518500249,1859775393,-1894007588,-899497514],lG=new Array(80);function qh(){this.init(),this._w=lG,OS.call(this,64,56)}uG(qh,OS);qh.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function hG(e){return e<<1|e>>>31}function dG(e){return e<<5|e>>>27}function pG(e){return e<<30|e>>>2}function gG(e,t,r,i){return e===0?t&r|~t&i:e===2?t&r|t&i|r&i:t^r^i}qh.prototype._update=function(e){for(var t=this._w,r=this._a|0,i=this._b|0,n=this._c|0,o=this._d|0,a=this._e|0,s=0;s<16;++s)t[s]=e.readInt32BE(s*4);for(;s<80;++s)t[s]=hG(t[s-3]^t[s-8]^t[s-14]^t[s-16]);for(var u=0;u<80;++u){var c=~~(u/20),l=dG(r)+gG(c,i,n,o)+a+t[u]+cG[c]|0;a=o,o=n,n=pG(i),i=r,r=l}this._a=r+this._a|0,this._b=i+this._b|0,this._c=n+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0};qh.prototype._hash=function(){var e=fG.allocUnsafe(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e};AS.exports=qh});var Ev=k((Ule,kS)=>{"use strict";v();var vG=Te(),TS=Mu(),mG=ot().Buffer,yG=[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],bG=new Array(64);function Uh(){this.init(),this._w=bG,TS.call(this,64,56)}vG(Uh,TS);Uh.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function _G(e,t,r){return r^e&(t^r)}function wG(e,t,r){return e&t|r&(e|t)}function SG(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function xG(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function EG(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function IG(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}Uh.prototype._update=function(e){for(var t=this._w,r=this._a|0,i=this._b|0,n=this._c|0,o=this._d|0,a=this._e|0,s=this._f|0,u=this._g|0,c=this._h|0,l=0;l<16;++l)t[l]=e.readInt32BE(l*4);for(;l<64;++l)t[l]=IG(t[l-2])+t[l-7]+EG(t[l-15])+t[l-16]|0;for(var m=0;m<64;++m){var w=c+xG(a)+_G(a,s,u)+yG[m]+t[m]|0,E=SG(r)+wG(r,i,n)|0;c=u,u=s,s=a,a=o+w|0,o=n,n=i,i=r,r=w+E|0}this._a=r+this._a|0,this._b=i+this._b|0,this._c=n+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0,this._f=s+this._f|0,this._g=u+this._g|0,this._h=c+this._h|0};Uh.prototype._hash=function(){var e=mG.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e};kS.exports=Uh});var BS=k((Hle,RS)=>{"use strict";v();var OG=Te(),AG=Ev(),PG=Mu(),TG=ot().Buffer,kG=new Array(64);function m2(){this.init(),this._w=kG,PG.call(this,64,56)}OG(m2,AG);m2.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this};m2.prototype._hash=function(){var e=TG.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e};RS.exports=m2});var Iv=k((zle,US)=>{"use strict";v();var RG=Te(),qS=Mu(),BG=ot().Buffer,MS=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],MG=new Array(160);function Fh(){this.init(),this._w=MG,qS.call(this,128,112)}RG(Fh,qS);Fh.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function CS(e,t,r){return r^e&(t^r)}function NS(e,t,r){return e&t|r&(e|t)}function DS(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function LS(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function CG(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function NG(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function DG(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function LG(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function zr(e,t){return e>>>0<t>>>0?1:0}Fh.prototype._update=function(e){for(var t=this._w,r=this._ah|0,i=this._bh|0,n=this._ch|0,o=this._dh|0,a=this._eh|0,s=this._fh|0,u=this._gh|0,c=this._hh|0,l=this._al|0,m=this._bl|0,w=this._cl|0,E=this._dl|0,P=this._el|0,M=this._fl|0,D=this._gl|0,L=this._hl|0,U=0;U<32;U+=2)t[U]=e.readInt32BE(U*4),t[U+1]=e.readInt32BE(U*4+4);for(;U<160;U+=2){var K=t[U-30],C=t[U-30+1],N=CG(K,C),F=NG(C,K);K=t[U-4],C=t[U-4+1];var H=DG(K,C),z=LG(C,K),V=t[U-14],B=t[U-14+1],g=t[U-32],I=t[U-32+1],y=F+B|0,f=N+V+zr(y,F)|0;y=y+z|0,f=f+H+zr(y,z)|0,y=y+I|0,f=f+g+zr(y,I)|0,t[U]=f,t[U+1]=y}for(var p=0;p<160;p+=2){f=t[p],y=t[p+1];var _=NS(r,i,n),x=NS(l,m,w),b=DS(r,l),d=DS(l,r),O=LS(a,P),T=LS(P,a),S=MS[p],R=MS[p+1],Y=CS(a,s,u),X=CS(P,M,D),ne=L+T|0,ce=c+O+zr(ne,L)|0;ne=ne+X|0,ce=ce+Y+zr(ne,X)|0,ne=ne+R|0,ce=ce+S+zr(ne,R)|0,ne=ne+y|0,ce=ce+f+zr(ne,y)|0;var pe=d+x|0,q=b+_+zr(pe,d)|0;c=u,L=D,u=s,D=M,s=a,M=P,P=E+ne|0,a=o+ce+zr(P,E)|0,o=n,E=w,n=i,w=m,i=r,m=l,l=ne+pe|0,r=ce+q+zr(l,ne)|0}this._al=this._al+l|0,this._bl=this._bl+m|0,this._cl=this._cl+w|0,this._dl=this._dl+E|0,this._el=this._el+P|0,this._fl=this._fl+M|0,this._gl=this._gl+D|0,this._hl=this._hl+L|0,this._ah=this._ah+r+zr(this._al,l)|0,this._bh=this._bh+i+zr(this._bl,m)|0,this._ch=this._ch+n+zr(this._cl,w)|0,this._dh=this._dh+o+zr(this._dl,E)|0,this._eh=this._eh+a+zr(this._el,P)|0,this._fh=this._fh+s+zr(this._fl,M)|0,this._gh=this._gh+u+zr(this._gl,D)|0,this._hh=this._hh+c+zr(this._hl,L)|0};Fh.prototype._hash=function(){var e=BG.allocUnsafe(64);function t(r,i,n){e.writeInt32BE(r,n),e.writeInt32BE(i,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e};US.exports=Fh});var HS=k((Vle,FS)=>{"use strict";v();var qG=Te(),UG=Iv(),FG=Mu(),HG=ot().Buffer,jG=new Array(160);function y2(){this.init(),this._w=jG,FG.call(this,128,112)}qG(y2,UG);y2.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this};y2.prototype._hash=function(){var e=HG.allocUnsafe(48);function t(r,i,n){e.writeInt32BE(r,n),e.writeInt32BE(i,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e};FS.exports=y2});var b2=k((Zle,ga)=>{"use strict";v();ga.exports=function(t){var r=t.toLowerCase(),i=ga.exports[r];if(!i)throw new Error(r+" is not supported (we accept pull requests)");return new i};ga.exports.sha=IS();ga.exports.sha1=PS();ga.exports.sha224=BS();ga.exports.sha256=Ev();ga.exports.sha384=HS();ga.exports.sha512=Iv()});var va=k((Yle,zS)=>{"use strict";v();var zG=ot().Buffer,jS=Qd().Transform,KG=hc().StringDecoder,VG=Te(),GG=xh();function kn(e){jS.call(this),this.hashMode=typeof e=="string",this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}VG(kn,jS);kn.prototype.update=function(e,t,r){var i=GG(e,t),n=this._update(i);return this.hashMode?this:(r&&(n=this._toString(n,r)),n)};kn.prototype.setAutoPadding=function(){};kn.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")};kn.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")};kn.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")};kn.prototype._transform=function(e,t,r){var i;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(n){i=n}finally{r(i)}};kn.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(r){t=r}e(t)};kn.prototype._finalOrDigest=function(e){var t=this.__final()||zG.alloc(0);return e&&(t=this._toString(t,e,!0)),t};kn.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new KG(t),this._encoding=t),this._encoding!==t)throw new Error("can\u2019t switch encodings");var i=this._decoder.write(e);return r&&(i+=this._decoder.end()),i};zS.exports=kn});var Hh=k((Xle,VS)=>{"use strict";v();var ZG=Te(),WG=r2(),YG=g2(),$G=b2(),KS=va();function _2(e){KS.call(this,"digest"),this._hash=e}ZG(_2,KS);_2.prototype._update=function(e){this._hash.update(e)};_2.prototype._final=function(){return this._hash.digest()};VS.exports=function(t){return t=t.toLowerCase(),t==="md5"?new WG:t==="rmd160"||t==="ripemd160"?new YG:new _2($G(t))}});var WS=k((Qle,ZS)=>{"use strict";v();var XG=Te(),Cu=ot().Buffer,GS=va(),JG=Cu.alloc(128),_c=64;function w2(e,t){GS.call(this,"digest"),typeof t=="string"&&(t=Cu.from(t)),this._alg=e,this._key=t,t.length>_c?t=e(t):t.length<_c&&(t=Cu.concat([t,JG],_c));for(var r=this._ipad=Cu.allocUnsafe(_c),i=this._opad=Cu.allocUnsafe(_c),n=0;n<_c;n++)r[n]=t[n]^54,i[n]=t[n]^92;this._hash=[r]}XG(w2,GS);w2.prototype._update=function(e){this._hash.push(e)};w2.prototype._final=function(){var e=this._alg(Cu.concat(this._hash));return this._alg(Cu.concat([this._opad,e]))};ZS.exports=w2});var Ov=k((the,YS)=>{v();var QG=r2();YS.exports=function(e){return new QG().update(e).digest()}});var JS=k((ihe,XS)=>{"use strict";v();var eZ=Te(),tZ=WS(),$S=va(),jh=ot().Buffer,rZ=Ov(),Av=g2(),Pv=b2(),iZ=jh.alloc(128);function zh(e,t){$S.call(this,"digest"),typeof t=="string"&&(t=jh.from(t));var r=e==="sha512"||e==="sha384"?128:64;if(this._alg=e,this._key=t,t.length>r){var i=e==="rmd160"?new Av:Pv(e);t=i.update(t).digest()}else t.length<r&&(t=jh.concat([t,iZ],r));for(var n=this._ipad=jh.allocUnsafe(r),o=this._opad=jh.allocUnsafe(r),a=0;a<r;a++)n[a]=t[a]^54,o[a]=t[a]^92;this._hash=e==="rmd160"?new Av:Pv(e),this._hash.update(n)}eZ(zh,$S);zh.prototype._update=function(e){this._hash.update(e)};zh.prototype._final=function(){var e=this._hash.digest(),t=this._alg==="rmd160"?new Av:Pv(this._alg);return t.update(this._opad).update(e).digest()};XS.exports=function(t,r){return t=t.toLowerCase(),t==="rmd160"||t==="ripemd160"?new zh("rmd160",r):t==="md5"?new tZ(rZ,r):new zh(t,r)}});var fs=k((ohe,QS)=>{"use strict";v();QS.exports={}});var Tv=k((she,ex)=>{"use strict";v();var nZ=isFinite,oZ=Math.pow(2,30)-1;ex.exports=function(e,t){if(typeof e!="number")throw new TypeError("Iterations not a number");if(e<0||!nZ(e))throw new TypeError("Bad iterations");if(typeof t!="number")throw new TypeError("Key length not a number");if(t<0||t>oZ||t!==t)throw new TypeError("Bad key length")}});var kv=k((fhe,rx)=>{"use strict";v();var S2;globalThis.process&&globalThis.process.browser?S2="utf-8":globalThis.process&&globalThis.process.version?(tx=parseInt(A.default.version.split(".")[0].slice(1),10),S2=tx>=6?"utf-8":"binary"):S2="utf-8";var tx;rx.exports=S2});var Rv=k((lhe,ox)=>{"use strict";v();var aZ=ot().Buffer,sZ=xh(),nx=typeof Uint8Array<"u",uZ=nx&&typeof ArrayBuffer<"u",ix=uZ&&ArrayBuffer.isView;ox.exports=function(e,t,r){if(typeof e=="string"||aZ.isBuffer(e)||nx&&e instanceof Uint8Array||ix&&ix(e))return sZ(e,t);throw new TypeError(r+" must be a string, a Buffer, a Uint8Array, or a DataView")}});var Bv=k((dhe,fx)=>{"use strict";v();var fZ=Ov(),cZ=g2(),lZ=b2(),Nu=ot().Buffer,hZ=Tv(),ax=kv(),sx=Rv(),dZ=Nu.alloc(128),x2={__proto__:null,md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,"sha512-256":32,ripemd160:20,rmd160:20},pZ={__proto__:null,"sha-1":"sha1","sha-224":"sha224","sha-256":"sha256","sha-384":"sha384","sha-512":"sha512","ripemd-160":"ripemd160"};function gZ(e){return new cZ().update(e).digest()}function vZ(e){function t(r){return lZ(e).update(r).digest()}return e==="rmd160"||e==="ripemd160"?gZ:e==="md5"?fZ:t}function ux(e,t,r){var i=vZ(e),n=e==="sha512"||e==="sha384"?128:64;t.length>n?t=i(t):t.length<n&&(t=Nu.concat([t,dZ],n));for(var o=Nu.allocUnsafe(n+x2[e]),a=Nu.allocUnsafe(n+x2[e]),s=0;s<n;s++)o[s]=t[s]^54,a[s]=t[s]^92;var u=Nu.allocUnsafe(n+r+4);o.copy(u,0,0,n),this.ipad1=u,this.ipad2=o,this.opad=a,this.alg=e,this.blocksize=n,this.hash=i,this.size=x2[e]}ux.prototype.run=function(e,t){e.copy(t,this.blocksize);var r=this.hash(t);return r.copy(this.opad,this.blocksize),this.hash(this.opad)};function mZ(e,t,r,i,n){hZ(r,i),e=sx(e,ax,"Password"),t=sx(t,ax,"Salt");var o=(n||"sha1").toLowerCase(),a=pZ[o]||o,s=x2[a];if(typeof s!="number"||!s)throw new TypeError("Digest algorithm not supported: "+n);var u=new ux(a,e,t.length),c=Nu.allocUnsafe(i),l=Nu.allocUnsafe(t.length+4);t.copy(l,0,0,t.length);for(var m=0,w=s,E=Math.ceil(i/w),P=1;P<=E;P++){l.writeUInt32BE(P,t.length);for(var M=u.run(l,u.ipad1),D=M,L=1;L<r;L++){D=u.run(D,u.ipad2);for(var U=0;U<w;U++)M[U]^=D[U]}M.copy(c,m),m+=w}return c}fx.exports=mZ});var vx=k((ghe,gx)=>{"use strict";v();var dx=ot().Buffer,yZ=Tv(),cx=kv(),lx=Bv(),hx=Rv(),E2,Kh=globalThis.crypto&&globalThis.crypto.subtle,bZ={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},Mv=[],Du;function Cv(){return Du||(globalThis.process&&globalThis.process.nextTick?Du=globalThis.process.nextTick:globalThis.queueMicrotask?Du=globalThis.queueMicrotask:globalThis.setImmediate?Du=globalThis.setImmediate:Du=globalThis.setTimeout,Du)}function px(e,t,r,i,n){return Kh.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then(function(o){return Kh.deriveBits({name:"PBKDF2",salt:t,iterations:r,hash:{name:n}},o,i<<3)}).then(function(o){return dx.from(o)})}function _Z(e){if(globalThis.process&&!globalThis.process.browser||!Kh||!Kh.importKey||!Kh.deriveBits)return Promise.resolve(!1);if(Mv[e]!==void 0)return Mv[e];E2=E2||dx.alloc(8);var t=px(E2,E2,10,128,e).then(function(){return!0},function(){return!1});return Mv[e]=t,t}function wZ(e,t){e.then(function(r){Cv()(function(){t(null,r)})},function(r){Cv()(function(){t(r)})})}gx.exports=function(e,t,r,i,n,o){if(typeof n=="function"&&(o=n,n=void 0),yZ(r,i),e=hx(e,cx,"Password"),t=hx(t,cx,"Salt"),typeof o!="function")throw new Error("No callback provided to pbkdf2");n=n||"sha1";var a=bZ[n.toLowerCase()];if(!a||typeof globalThis.Promise!="function"){Cv()(function(){var s;try{s=lx(e,t,r,i,n)}catch(u){o(u);return}o(null,s)});return}wZ(_Z(a).then(function(s){return s?px(e,t,r,i,a):lx(e,t,r,i,n)}),o)}});var Dv=k(Nv=>{"use strict";v();Nv.pbkdf2=vx();Nv.pbkdf2Sync=Bv()});var Lv=k(an=>{"use strict";v();an.readUInt32BE=function(t,r){var i=t[0+r]<<24|t[1+r]<<16|t[2+r]<<8|t[3+r];return i>>>0};an.writeUInt32BE=function(t,r,i){t[0+i]=r>>>24,t[1+i]=r>>>16&255,t[2+i]=r>>>8&255,t[3+i]=r&255};an.ip=function(t,r,i,n){for(var o=0,a=0,s=6;s>=0;s-=2){for(var u=0;u<=24;u+=8)o<<=1,o|=r>>>u+s&1;for(var u=0;u<=24;u+=8)o<<=1,o|=t>>>u+s&1}for(var s=6;s>=0;s-=2){for(var u=1;u<=25;u+=8)a<<=1,a|=r>>>u+s&1;for(var u=1;u<=25;u+=8)a<<=1,a|=t>>>u+s&1}i[n+0]=o>>>0,i[n+1]=a>>>0};an.rip=function(t,r,i,n){for(var o=0,a=0,s=0;s<4;s++)for(var u=24;u>=0;u-=8)o<<=1,o|=r>>>u+s&1,o<<=1,o|=t>>>u+s&1;for(var s=4;s<8;s++)for(var u=24;u>=0;u-=8)a<<=1,a|=r>>>u+s&1,a<<=1,a|=t>>>u+s&1;i[n+0]=o>>>0,i[n+1]=a>>>0};an.pc1=function(t,r,i,n){for(var o=0,a=0,s=7;s>=5;s--){for(var u=0;u<=24;u+=8)o<<=1,o|=r>>u+s&1;for(var u=0;u<=24;u+=8)o<<=1,o|=t>>u+s&1}for(var u=0;u<=24;u+=8)o<<=1,o|=r>>u+s&1;for(var s=1;s<=3;s++){for(var u=0;u<=24;u+=8)a<<=1,a|=r>>u+s&1;for(var u=0;u<=24;u+=8)a<<=1,a|=t>>u+s&1}for(var u=0;u<=24;u+=8)a<<=1,a|=t>>u+s&1;i[n+0]=o>>>0,i[n+1]=a>>>0};an.r28shl=function(t,r){return t<<r&268435455|t>>>28-r};var I2=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];an.pc2=function(t,r,i,n){for(var o=0,a=0,s=I2.length>>>1,u=0;u<s;u++)o<<=1,o|=t>>>I2[u]&1;for(var u=s;u<I2.length;u++)a<<=1,a|=r>>>I2[u]&1;i[n+0]=o>>>0,i[n+1]=a>>>0};an.expand=function(t,r,i){var n=0,o=0;n=(t&1)<<5|t>>>27;for(var a=23;a>=15;a-=4)n<<=6,n|=t>>>a&63;for(var a=11;a>=3;a-=4)o|=t>>>a&63,o<<=6;o|=(t&31)<<1|t>>>31,r[i+0]=n>>>0,r[i+1]=o>>>0};var mx=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];an.substitute=function(t,r){for(var i=0,n=0;n<4;n++){var o=t>>>18-n*6&63,a=mx[n*64+o];i<<=4,i|=a}for(var n=0;n<4;n++){var o=r>>>18-n*6&63,a=mx[256+n*64+o];i<<=4,i|=a}return i>>>0};var yx=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];an.permute=function(t){for(var r=0,i=0;i<yx.length;i++)r<<=1,r|=t>>>yx[i]&1;return r>>>0};an.padSplit=function(t,r,i){for(var n=t.toString(2);n.length<r;)n="0"+n;for(var o=[],a=0;a<r;a+=i)o.push(n.slice(a,a+i));return o.join(" ")}});var Rn=k((whe,_x)=>{v();_x.exports=bx;function bx(e,t){if(!e)throw new Error(t||"Assertion failed")}bx.equal=function(t,r,i){if(t!=r)throw new Error(i||"Assertion failed: "+t+" != "+r)}});var O2=k((xhe,wx)=>{"use strict";v();var SZ=Rn();function sn(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=e.padding!==!1}wx.exports=sn;sn.prototype._init=function(){};sn.prototype.update=function(t){return t.length===0?[]:this.type==="decrypt"?this._updateDecrypt(t):this._updateEncrypt(t)};sn.prototype._buffer=function(t,r){for(var i=Math.min(this.buffer.length-this.bufferOff,t.length-r),n=0;n<i;n++)this.buffer[this.bufferOff+n]=t[r+n];return this.bufferOff+=i,i};sn.prototype._flushBuffer=function(t,r){return this._update(this.buffer,0,t,r),this.bufferOff=0,this.blockSize};sn.prototype._updateEncrypt=function(t){var r=0,i=0,n=(this.bufferOff+t.length)/this.blockSize|0,o=new Array(n*this.blockSize);this.bufferOff!==0&&(r+=this._buffer(t,r),this.bufferOff===this.buffer.length&&(i+=this._flushBuffer(o,i)));for(var a=t.length-(t.length-r)%this.blockSize;r<a;r+=this.blockSize)this._update(t,r,o,i),i+=this.blockSize;for(;r<t.length;r++,this.bufferOff++)this.buffer[this.bufferOff]=t[r];return o};sn.prototype._updateDecrypt=function(t){for(var r=0,i=0,n=Math.ceil((this.bufferOff+t.length)/this.blockSize)-1,o=new Array(n*this.blockSize);n>0;n--)r+=this._buffer(t,r),i+=this._flushBuffer(o,i);return r+=this._buffer(t,r),o};sn.prototype.final=function(t){var r;t&&(r=this.update(t));var i;return this.type==="encrypt"?i=this._finalEncrypt():i=this._finalDecrypt(),r?r.concat(i):i};sn.prototype._pad=function(t,r){if(r===0)return!1;for(;r<t.length;)t[r++]=0;return!0};sn.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var t=new Array(this.blockSize);return this._update(this.buffer,0,t,0),t};sn.prototype._unpad=function(t){return t};sn.prototype._finalDecrypt=function(){SZ.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var t=new Array(this.blockSize);return this._flushBuffer(t,0),this._unpad(t)}});var qv=k((Ihe,Ex)=>{"use strict";v();var Sx=Rn(),xZ=Te(),Rr=Lv(),xx=O2();function EZ(){this.tmp=new Array(2),this.keys=null}function So(e){xx.call(this,e);var t=new EZ;this._desState=t,this.deriveKeys(t,e.key)}xZ(So,xx);Ex.exports=So;So.create=function(t){return new So(t)};var IZ=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];So.prototype.deriveKeys=function(t,r){t.keys=new Array(32),Sx.equal(r.length,this.blockSize,"Invalid key length");var i=Rr.readUInt32BE(r,0),n=Rr.readUInt32BE(r,4);Rr.pc1(i,n,t.tmp,0),i=t.tmp[0],n=t.tmp[1];for(var o=0;o<t.keys.length;o+=2){var a=IZ[o>>>1];i=Rr.r28shl(i,a),n=Rr.r28shl(n,a),Rr.pc2(i,n,t.keys,o)}};So.prototype._update=function(t,r,i,n){var o=this._desState,a=Rr.readUInt32BE(t,r),s=Rr.readUInt32BE(t,r+4);Rr.ip(a,s,o.tmp,0),a=o.tmp[0],s=o.tmp[1],this.type==="encrypt"?this._encrypt(o,a,s,o.tmp,0):this._decrypt(o,a,s,o.tmp,0),a=o.tmp[0],s=o.tmp[1],Rr.writeUInt32BE(i,a,n),Rr.writeUInt32BE(i,s,n+4)};So.prototype._pad=function(t,r){if(this.padding===!1)return!1;for(var i=t.length-r,n=r;n<t.length;n++)t[n]=i;return!0};So.prototype._unpad=function(t){if(this.padding===!1)return t;for(var r=t[t.length-1],i=t.length-r;i<t.length;i++)Sx.equal(t[i],r);return t.slice(0,t.length-r)};So.prototype._encrypt=function(t,r,i,n,o){for(var a=r,s=i,u=0;u<t.keys.length;u+=2){var c=t.keys[u],l=t.keys[u+1];Rr.expand(s,t.tmp,0),c^=t.tmp[0],l^=t.tmp[1];var m=Rr.substitute(c,l),w=Rr.permute(m),E=s;s=(a^w)>>>0,a=E}Rr.rip(s,a,n,o)};So.prototype._decrypt=function(t,r,i,n,o){for(var a=i,s=r,u=t.keys.length-2;u>=0;u-=2){var c=t.keys[u],l=t.keys[u+1];Rr.expand(a,t.tmp,0),c^=t.tmp[0],l^=t.tmp[1];var m=Rr.substitute(c,l),w=Rr.permute(m),E=a;a=(s^w)>>>0,s=E}Rr.rip(a,s,n,o)}});var Ox=k(Ix=>{"use strict";v();var OZ=Rn(),AZ=Te(),A2={};function PZ(e){OZ.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t<this.iv.length;t++)this.iv[t]=e[t]}function TZ(e){function t(o){e.call(this,o),this._cbcInit()}AZ(t,e);for(var r=Object.keys(A2),i=0;i<r.length;i++){var n=r[i];t.prototype[n]=A2[n]}return t.create=function(a){return new t(a)},t}Ix.instantiate=TZ;A2._cbcInit=function(){var t=new PZ(this.options.iv);this._cbcState=t};A2._update=function(t,r,i,n){var o=this._cbcState,a=this.constructor.super_.prototype,s=o.iv;if(this.type==="encrypt"){for(var u=0;u<this.blockSize;u++)s[u]^=t[r+u];a._update.call(this,s,0,i,n);for(var u=0;u<this.blockSize;u++)s[u]=i[n+u]}else{a._update.call(this,t,r,i,n);for(var u=0;u<this.blockSize;u++)i[n+u]^=s[u];for(var u=0;u<this.blockSize;u++)s[u]=t[r+u]}}});var Tx=k((The,Px)=>{"use strict";v();var kZ=Rn(),RZ=Te(),Ax=O2(),cs=qv();function BZ(e,t){kZ.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),i=t.slice(8,16),n=t.slice(16,24);e==="encrypt"?this.ciphers=[cs.create({type:"encrypt",key:r}),cs.create({type:"decrypt",key:i}),cs.create({type:"encrypt",key:n})]:this.ciphers=[cs.create({type:"decrypt",key:n}),cs.create({type:"encrypt",key:i}),cs.create({type:"decrypt",key:r})]}function Lu(e){Ax.call(this,e);var t=new BZ(this.type,this.options.key);this._edeState=t}RZ(Lu,Ax);Px.exports=Lu;Lu.create=function(t){return new Lu(t)};Lu.prototype._update=function(t,r,i,n){var o=this._edeState;o.ciphers[0]._update(t,r,i,n),o.ciphers[1]._update(i,n,i,n),o.ciphers[2]._update(i,n,i,n)};Lu.prototype._pad=cs.prototype._pad;Lu.prototype._unpad=cs.prototype._unpad});var kx=k(wc=>{"use strict";v();wc.utils=Lv();wc.Cipher=O2();wc.DES=qv();wc.CBC=Ox();wc.EDE=Tx()});var Mx=k((Mhe,Bx)=>{v();var Rx=va(),ma=kx(),MZ=Te(),qu=ot().Buffer,Vh={"des-ede3-cbc":ma.CBC.instantiate(ma.EDE),"des-ede3":ma.EDE,"des-ede-cbc":ma.CBC.instantiate(ma.EDE),"des-ede":ma.EDE,"des-cbc":ma.CBC.instantiate(ma.DES),"des-ecb":ma.DES};Vh.des=Vh["des-cbc"];Vh.des3=Vh["des-ede3-cbc"];Bx.exports=P2;MZ(P2,Rx);function P2(e){Rx.call(this);var t=e.mode.toLowerCase(),r=Vh[t],i;e.decrypt?i="decrypt":i="encrypt";var n=e.key;qu.isBuffer(n)||(n=qu.from(n)),(t==="des-ede"||t==="des-ede-cbc")&&(n=qu.concat([n,n.slice(0,8)]));var o=e.iv;qu.isBuffer(o)||(o=qu.from(o)),this._des=r.create({key:n,iv:o,type:i})}P2.prototype._update=function(e){return qu.from(this._des.update(e))};P2.prototype._final=function(){return qu.from(this._des.final())}});var Cx=k(Uv=>{v();Uv.encrypt=function(e,t){return e._cipher.encryptBlock(t)};Uv.decrypt=function(e,t){return e._cipher.decryptBlock(t)}});var Sc=k((Lhe,Nx)=>{v();Nx.exports=function(t,r){for(var i=Math.min(t.length,r.length),n=new h.Buffer(i),o=0;o<i;++o)n[o]=t[o]^r[o];return n}});var Lx=k(Fv=>{v();var Dx=Sc();Fv.encrypt=function(e,t){var r=Dx(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev};Fv.decrypt=function(e,t){var r=e._prev;e._prev=t;var i=e._cipher.decryptBlock(t);return Dx(i,r)}});var Fx=k(Ux=>{v();var Gh=ot().Buffer,CZ=Sc();function qx(e,t,r){var i=t.length,n=CZ(t,e._cache);return e._cache=e._cache.slice(i),e._prev=Gh.concat([e._prev,r?t:n]),n}Ux.encrypt=function(e,t,r){for(var i=Gh.allocUnsafe(0),n;t.length;)if(e._cache.length===0&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=Gh.allocUnsafe(0)),e._cache.length<=t.length)n=e._cache.length,i=Gh.concat([i,qx(e,t.slice(0,n),r)]),t=t.slice(n);else{i=Gh.concat([i,qx(e,t,r)]);break}return i}});var jx=k(Hx=>{v();var Hv=ot().Buffer;function NZ(e,t,r){var i=e._cipher.encryptBlock(e._prev),n=i[0]^t;return e._prev=Hv.concat([e._prev.slice(1),Hv.from([r?t:n])]),n}Hx.encrypt=function(e,t,r){for(var i=t.length,n=Hv.allocUnsafe(i),o=-1;++o<i;)n[o]=NZ(e,t[o],r);return n}});var Kx=k(zx=>{v();var T2=ot().Buffer;function DZ(e,t,r){for(var i,n=-1,o=8,a=0,s,u;++n<o;)i=e._cipher.encryptBlock(e._prev),s=t&1<<7-n?128:0,u=i[0]^s,a+=(u&128)>>n%8,e._prev=LZ(e._prev,r?s:u);return a}function LZ(e,t){var r=e.length,i=-1,n=T2.allocUnsafe(e.length);for(e=T2.concat([e,T2.from([t])]);++i<r;)n[i]=e[i]<<1|e[i+1]>>7;return n}zx.encrypt=function(e,t,r){for(var i=t.length,n=T2.allocUnsafe(i),o=-1;++o<i;)n[o]=DZ(e,t[o],r);return n}});var Gx=k(Vx=>{v();var qZ=Sc();function UZ(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}Vx.encrypt=function(e,t){for(;e._cache.length<t.length;)e._cache=h.Buffer.concat([e._cache,UZ(e)]);var r=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),qZ(t,r)}});var jv=k((Yhe,Zx)=>{v();function FZ(e){for(var t=e.length,r;t--;)if(r=e.readUInt8(t),r===255)e.writeUInt8(0,t);else{r++,e.writeUInt8(r,t);break}}Zx.exports=FZ});var Kv=k(Yx=>{v();var HZ=Sc(),Wx=ot().Buffer,jZ=jv();function zZ(e){var t=e._cipher.encryptBlockRaw(e._prev);return jZ(e._prev),t}var zv=16;Yx.encrypt=function(e,t){var r=Math.ceil(t.length/zv),i=e._cache.length;e._cache=Wx.concat([e._cache,Wx.allocUnsafe(r*zv)]);for(var n=0;n<r;n++){var o=zZ(e),a=i+n*zv;e._cache.writeUInt32BE(o[0],a+0),e._cache.writeUInt32BE(o[1],a+4),e._cache.writeUInt32BE(o[2],a+8),e._cache.writeUInt32BE(o[3],a+12)}var s=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),HZ(t,s)}});var Vv=k((Qhe,KZ)=>{KZ.exports={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}}});var R2=k((e0e,$x)=>{v();var VZ={ECB:Cx(),CBC:Lx(),CFB:Fx(),CFB8:jx(),CFB1:Kx(),OFB:Gx(),CTR:Kv(),GCM:Kv()},k2=Vv();for(Gv in k2)k2[Gv].module=VZ[k2[Gv].mode];var Gv;$x.exports=k2});var Zh=k((r0e,Jx)=>{v();var B2=ot().Buffer;function Wv(e){B2.isBuffer(e)||(e=B2.from(e));for(var t=e.length/4|0,r=new Array(t),i=0;i<t;i++)r[i]=e.readUInt32BE(i*4);return r}function Zv(e){for(var t=0;t<e.length;e++)e[t]=0}function Xx(e,t,r,i,n){for(var o=r[0],a=r[1],s=r[2],u=r[3],c=e[0]^t[0],l=e[1]^t[1],m=e[2]^t[2],w=e[3]^t[3],E,P,M,D,L=4,U=1;U<n;U++)E=o[c>>>24]^a[l>>>16&255]^s[m>>>8&255]^u[w&255]^t[L++],P=o[l>>>24]^a[m>>>16&255]^s[w>>>8&255]^u[c&255]^t[L++],M=o[m>>>24]^a[w>>>16&255]^s[c>>>8&255]^u[l&255]^t[L++],D=o[w>>>24]^a[c>>>16&255]^s[l>>>8&255]^u[m&255]^t[L++],c=E,l=P,m=M,w=D;return E=(i[c>>>24]<<24|i[l>>>16&255]<<16|i[m>>>8&255]<<8|i[w&255])^t[L++],P=(i[l>>>24]<<24|i[m>>>16&255]<<16|i[w>>>8&255]<<8|i[c&255])^t[L++],M=(i[m>>>24]<<24|i[w>>>16&255]<<16|i[c>>>8&255]<<8|i[l&255])^t[L++],D=(i[w>>>24]<<24|i[c>>>16&255]<<16|i[l>>>8&255]<<8|i[m&255])^t[L++],E=E>>>0,P=P>>>0,M=M>>>0,D=D>>>0,[E,P,M,D]}var GZ=[0,1,2,4,8,16,32,64,128,27,54],br=(function(){for(var e=new Array(256),t=0;t<256;t++)t<128?e[t]=t<<1:e[t]=t<<1^283;for(var r=[],i=[],n=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,u=0;u<256;++u){var c=s^s<<1^s<<2^s<<3^s<<4;c=c>>>8^c&255^99,r[a]=c,i[c]=a;var l=e[a],m=e[l],w=e[m],E=e[c]*257^c*16843008;n[0][a]=E<<24|E>>>8,n[1][a]=E<<16|E>>>16,n[2][a]=E<<8|E>>>24,n[3][a]=E,E=w*16843009^m*65537^l*257^a*16843008,o[0][c]=E<<24|E>>>8,o[1][c]=E<<16|E>>>16,o[2][c]=E<<8|E>>>24,o[3][c]=E,a===0?a=s=1:(a=l^e[e[e[w^l]]],s^=e[e[s]])}return{SBOX:r,INV_SBOX:i,SUB_MIX:n,INV_SUB_MIX:o}})();function un(e){this._key=Wv(e),this._reset()}un.blockSize=16;un.keySize=256/8;un.prototype.blockSize=un.blockSize;un.prototype.keySize=un.keySize;un.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,i=(r+1)*4,n=[],o=0;o<t;o++)n[o]=e[o];for(o=t;o<i;o++){var a=n[o-1];o%t===0?(a=a<<8|a>>>24,a=br.SBOX[a>>>24]<<24|br.SBOX[a>>>16&255]<<16|br.SBOX[a>>>8&255]<<8|br.SBOX[a&255],a^=GZ[o/t|0]<<24):t>6&&o%t===4&&(a=br.SBOX[a>>>24]<<24|br.SBOX[a>>>16&255]<<16|br.SBOX[a>>>8&255]<<8|br.SBOX[a&255]),n[o]=n[o-t]^a}for(var s=[],u=0;u<i;u++){var c=i-u,l=n[c-(u%4?0:4)];u<4||c<=4?s[u]=l:s[u]=br.INV_SUB_MIX[0][br.SBOX[l>>>24]]^br.INV_SUB_MIX[1][br.SBOX[l>>>16&255]]^br.INV_SUB_MIX[2][br.SBOX[l>>>8&255]]^br.INV_SUB_MIX[3][br.SBOX[l&255]]}this._nRounds=r,this._keySchedule=n,this._invKeySchedule=s};un.prototype.encryptBlockRaw=function(e){return e=Wv(e),Xx(e,this._keySchedule,br.SUB_MIX,br.SBOX,this._nRounds)};un.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=B2.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r};un.prototype.decryptBlock=function(e){e=Wv(e);var t=e[1];e[1]=e[3],e[3]=t;var r=Xx(e,this._invKeySchedule,br.INV_SUB_MIX,br.INV_SBOX,this._nRounds),i=B2.allocUnsafe(16);return i.writeUInt32BE(r[0],0),i.writeUInt32BE(r[3],4),i.writeUInt32BE(r[2],8),i.writeUInt32BE(r[1],12),i};un.prototype.scrub=function(){Zv(this._keySchedule),Zv(this._invKeySchedule),Zv(this._key)};Jx.exports.AES=un});var tE=k((n0e,eE)=>{v();var xc=ot().Buffer,ZZ=xc.alloc(16,0);function WZ(e){return[e.readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)]}function Qx(e){var t=xc.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function Wh(e){this.h=e,this.state=xc.alloc(16,0),this.cache=xc.allocUnsafe(0)}Wh.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()};Wh.prototype._multiply=function(){for(var e=WZ(this.h),t=[0,0,0,0],r,i,n,o=-1;++o<128;){for(i=(this.state[~~(o/8)]&1<<7-o%8)!==0,i&&(t[0]^=e[0],t[1]^=e[1],t[2]^=e[2],t[3]^=e[3]),n=(e[3]&1)!==0,r=3;r>0;r--)e[r]=e[r]>>>1|(e[r-1]&1)<<31;e[0]=e[0]>>>1,n&&(e[0]=e[0]^225<<24)}this.state=Qx(t)};Wh.prototype.update=function(e){this.cache=xc.concat([this.cache,e]);for(var t;this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)};Wh.prototype.final=function(e,t){return this.cache.length&&this.ghash(xc.concat([this.cache,ZZ],16)),this.ghash(Qx([0,e,0,t])),this.state};eE.exports=Wh});var Yv=k((a0e,nE)=>{v();var YZ=Zh(),Pi=ot().Buffer,rE=va(),$Z=Te(),iE=tE(),XZ=Sc(),JZ=jv();function QZ(e,t){var r=0;e.length!==t.length&&r++;for(var i=Math.min(e.length,t.length),n=0;n<i;++n)r+=e[n]^t[n];return r}function eW(e,t,r){if(t.length===12)return e._finID=Pi.concat([t,Pi.from([0,0,0,1])]),Pi.concat([t,Pi.from([0,0,0,2])]);var i=new iE(r),n=t.length,o=n%16;i.update(t),o&&(o=16-o,i.update(Pi.alloc(o,0))),i.update(Pi.alloc(8,0));var a=n*8,s=Pi.alloc(8);s.writeUIntBE(a,0,8),i.update(s),e._finID=i.state;var u=Pi.from(e._finID);return JZ(u),u}function Uu(e,t,r,i){rE.call(this);var n=Pi.alloc(4,0);this._cipher=new YZ.AES(t);var o=this._cipher.encryptBlock(n);this._ghash=new iE(o),r=eW(this,r,o),this._prev=Pi.from(r),this._cache=Pi.allocUnsafe(0),this._secCache=Pi.allocUnsafe(0),this._decrypt=i,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}$Z(Uu,rE);Uu.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=Pi.alloc(t,0),this._ghash.update(t))}this._called=!0;var r=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(r),this._len+=e.length,r};Uu.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=XZ(this._ghash.final(this._alen*8,this._len*8),this._cipher.encryptBlock(this._finID));if(this._decrypt&&QZ(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()};Uu.prototype.getAuthTag=function(){if(this._decrypt||!Pi.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag};Uu.prototype.setAuthTag=function(t){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=t};Uu.prototype.setAAD=function(t){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(t),this._alen+=t.length};nE.exports=Uu});var Xv=k((u0e,aE)=>{v();var tW=Zh(),$v=ot().Buffer,oE=va(),rW=Te();function M2(e,t,r,i){oE.call(this),this._cipher=new tW.AES(t),this._prev=$v.from(r),this._cache=$v.allocUnsafe(0),this._secCache=$v.allocUnsafe(0),this._decrypt=i,this._mode=e}rW(M2,oE);M2.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)};M2.prototype._final=function(){this._cipher.scrub()};aE.exports=M2});var Yh=k((c0e,sE)=>{v();var Fu=ot().Buffer,iW=r2();function nW(e,t,r,i){if(Fu.isBuffer(e)||(e=Fu.from(e,"binary")),t&&(Fu.isBuffer(t)||(t=Fu.from(t,"binary")),t.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var n=r/8,o=Fu.alloc(n),a=Fu.alloc(i||0),s=Fu.alloc(0);n>0||i>0;){var u=new iW;u.update(s),u.update(e),t&&u.update(t),s=u.digest();var c=0;if(n>0){var l=o.length-n;c=Math.min(n,s.length),s.copy(o,l,0,c),n-=c}if(c<s.length&&i>0){var m=a.length-i,w=Math.min(i,s.length-c);s.copy(a,m,c,c+w),i-=w}}return s.fill(0),{key:o,iv:a}}sE.exports=nW});var lE=k(Jv=>{v();var uE=R2(),oW=Yv(),ya=ot().Buffer,aW=Xv(),fE=va(),sW=Zh(),uW=Yh(),fW=Te();function $h(e,t,r){fE.call(this),this._cache=new C2,this._cipher=new sW.AES(t),this._prev=ya.from(r),this._mode=e,this._autopadding=!0}fW($h,fE);$h.prototype._update=function(e){this._cache.add(e);for(var t,r,i=[];t=this._cache.get();)r=this._mode.encrypt(this,t),i.push(r);return ya.concat(i)};var cW=ya.alloc(16,16);$h.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(cW))throw this._cipher.scrub(),new Error("data not multiple of block length")};$h.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this};function C2(){this.cache=ya.allocUnsafe(0)}C2.prototype.add=function(e){this.cache=ya.concat([this.cache,e])};C2.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null};C2.prototype.flush=function(){for(var e=16-this.cache.length,t=ya.allocUnsafe(e),r=-1;++r<e;)t.writeUInt8(e,r);return ya.concat([this.cache,t])};function cE(e,t,r){var i=uE[e.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if(typeof t=="string"&&(t=ya.from(t)),t.length!==i.key/8)throw new TypeError("invalid key length "+t.length);if(typeof r=="string"&&(r=ya.from(r)),i.mode!=="GCM"&&r.length!==i.iv)throw new TypeError("invalid iv length "+r.length);return i.type==="stream"?new aW(i.module,t,r):i.type==="auth"?new oW(i.module,t,r):new $h(i.module,t,r)}function lW(e,t){var r=uE[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=uW(t,!1,r.key,r.iv);return cE(e,i.key,i.iv)}Jv.createCipheriv=cE;Jv.createCipher=lW});var gE=k(Qv=>{v();var hW=Yv(),Ec=ot().Buffer,hE=R2(),dW=Xv(),dE=va(),pW=Zh(),gW=Yh(),vW=Te();function Xh(e,t,r){dE.call(this),this._cache=new N2,this._last=void 0,this._cipher=new pW.AES(t),this._prev=Ec.from(r),this._mode=e,this._autopadding=!0}vW(Xh,dE);Xh.prototype._update=function(e){this._cache.add(e);for(var t,r,i=[];t=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,t),i.push(r);return Ec.concat(i)};Xh.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return mW(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")};Xh.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this};function N2(){this.cache=Ec.allocUnsafe(0)}N2.prototype.add=function(e){this.cache=Ec.concat([this.cache,e])};N2.prototype.get=function(e){var t;if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null};N2.prototype.flush=function(){if(this.cache.length)return this.cache};function mW(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");for(var r=-1;++r<t;)if(e[r+(16-t)]!==t)throw new Error("unable to decrypt data");if(t!==16)return e.slice(0,16-t)}function pE(e,t,r){var i=hE[e.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if(typeof r=="string"&&(r=Ec.from(r)),i.mode!=="GCM"&&r.length!==i.iv)throw new TypeError("invalid iv length "+r.length);if(typeof t=="string"&&(t=Ec.from(t)),t.length!==i.key/8)throw new TypeError("invalid key length "+t.length);return i.type==="stream"?new dW(i.module,t,r,!0):i.type==="auth"?new hW(i.module,t,r,!0):new Xh(i.module,t,r)}function yW(e,t){var r=hE[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=gW(t,!1,r.key,r.iv);return pE(e,i.key,i.iv)}Qv.createDecipher=yW;Qv.createDecipheriv=pE});var D2=k(Bn=>{v();var vE=lE(),mE=gE(),bW=Vv();function _W(){return Object.keys(bW)}Bn.createCipher=Bn.Cipher=vE.createCipher;Bn.createCipheriv=Bn.Cipheriv=vE.createCipheriv;Bn.createDecipher=Bn.Decipher=mE.createDecipher;Bn.createDecipheriv=Bn.Decipheriv=mE.createDecipheriv;Bn.listCiphers=Bn.getCiphers=_W});var yE=k(ba=>{v();ba["des-ecb"]={key:8,iv:0};ba["des-cbc"]=ba.des={key:8,iv:8};ba["des-ede3-cbc"]=ba.des3={key:24,iv:8};ba["des-ede3"]={key:24,iv:0};ba["des-ede-cbc"]={key:16,iv:8};ba["des-ede"]={key:16,iv:0}});var xE=k(Mn=>{v();var bE=Mx(),em=D2(),ls=R2(),_a=yE(),_E=Yh();function wW(e,t){e=e.toLowerCase();var r,i;if(ls[e])r=ls[e].key,i=ls[e].iv;else if(_a[e])r=_a[e].key*8,i=_a[e].iv;else throw new TypeError("invalid suite type");var n=_E(t,!1,r,i);return wE(e,n.key,n.iv)}function SW(e,t){e=e.toLowerCase();var r,i;if(ls[e])r=ls[e].key,i=ls[e].iv;else if(_a[e])r=_a[e].key*8,i=_a[e].iv;else throw new TypeError("invalid suite type");var n=_E(t,!1,r,i);return SE(e,n.key,n.iv)}function wE(e,t,r){if(e=e.toLowerCase(),ls[e])return em.createCipheriv(e,t,r);if(_a[e])return new bE({key:t,iv:r,mode:e});throw new TypeError("invalid suite type")}function SE(e,t,r){if(e=e.toLowerCase(),ls[e])return em.createDecipheriv(e,t,r);if(_a[e])return new bE({key:t,iv:r,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}function xW(){return Object.keys(_a).concat(em.getCiphers())}Mn.createCipher=Mn.Cipher=wW;Mn.createCipheriv=Mn.Cipheriv=wE;Mn.createDecipher=Mn.Decipher=SW;Mn.createDecipheriv=Mn.Decipheriv=SE;Mn.listCiphers=Mn.getCiphers=xW});var Cn=k((EE,tm)=>{v();(function(e,t){"use strict";function r(B,g){if(!B)throw new Error(g||"Assertion failed")}function i(B,g){B.super_=g;var I=function(){};I.prototype=g.prototype,B.prototype=new I,B.prototype.constructor=B}function n(B,g,I){if(n.isBN(B))return B;this.negative=0,this.words=null,this.length=0,this.red=null,B!==null&&((g==="le"||g==="be")&&(I=g,g=10),this._init(B||0,g||10,I||"be"))}typeof e=="object"?e.exports=n:t.BN=n,n.BN=n,n.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=Kt().Buffer}catch{}n.isBN=function(g){return g instanceof n?!0:g!==null&&typeof g=="object"&&g.constructor.wordSize===n.wordSize&&Array.isArray(g.words)},n.max=function(g,I){return g.cmp(I)>0?g:I},n.min=function(g,I){return g.cmp(I)<0?g:I},n.prototype._init=function(g,I,y){if(typeof g=="number")return this._initNumber(g,I,y);if(typeof g=="object")return this._initArray(g,I,y);I==="hex"&&(I=16),r(I===(I|0)&&I>=2&&I<=36),g=g.toString().replace(/\s+/g,"");var f=0;g[0]==="-"&&(f++,this.negative=1),f<g.length&&(I===16?this._parseHex(g,f,y):(this._parseBase(g,I,f),y==="le"&&this._initArray(this.toArray(),I,y)))},n.prototype._initNumber=function(g,I,y){g<0&&(this.negative=1,g=-g),g<67108864?(this.words=[g&67108863],this.length=1):g<4503599627370496?(this.words=[g&67108863,g/67108864&67108863],this.length=2):(r(g<9007199254740992),this.words=[g&67108863,g/67108864&67108863,1],this.length=3),y==="le"&&this._initArray(this.toArray(),I,y)},n.prototype._initArray=function(g,I,y){if(r(typeof g.length=="number"),g.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(g.length/3),this.words=new Array(this.length);for(var f=0;f<this.length;f++)this.words[f]=0;var p,_,x=0;if(y==="be")for(f=g.length-1,p=0;f>=0;f-=3)_=g[f]|g[f-1]<<8|g[f-2]<<16,this.words[p]|=_<<x&67108863,this.words[p+1]=_>>>26-x&67108863,x+=24,x>=26&&(x-=26,p++);else if(y==="le")for(f=0,p=0;f<g.length;f+=3)_=g[f]|g[f+1]<<8|g[f+2]<<16,this.words[p]|=_<<x&67108863,this.words[p+1]=_>>>26-x&67108863,x+=24,x>=26&&(x-=26,p++);return this.strip()};function a(B,g){var I=B.charCodeAt(g);return I>=65&&I<=70?I-55:I>=97&&I<=102?I-87:I-48&15}function s(B,g,I){var y=a(B,I);return I-1>=g&&(y|=a(B,I-1)<<4),y}n.prototype._parseHex=function(g,I,y){this.length=Math.ceil((g.length-I)/6),this.words=new Array(this.length);for(var f=0;f<this.length;f++)this.words[f]=0;var p=0,_=0,x;if(y==="be")for(f=g.length-1;f>=I;f-=2)x=s(g,I,f)<<p,this.words[_]|=x&67108863,p>=18?(p-=18,_+=1,this.words[_]|=x>>>26):p+=8;else{var b=g.length-I;for(f=b%2===0?I+1:I;f<g.length;f+=2)x=s(g,I,f)<<p,this.words[_]|=x&67108863,p>=18?(p-=18,_+=1,this.words[_]|=x>>>26):p+=8}this.strip()};function u(B,g,I,y){for(var f=0,p=Math.min(B.length,I),_=g;_<p;_++){var x=B.charCodeAt(_)-48;f*=y,x>=49?f+=x-49+10:x>=17?f+=x-17+10:f+=x}return f}n.prototype._parseBase=function(g,I,y){this.words=[0],this.length=1;for(var f=0,p=1;p<=67108863;p*=I)f++;f--,p=p/I|0;for(var _=g.length-y,x=_%f,b=Math.min(_,_-x)+y,d=0,O=y;O<b;O+=f)d=u(g,O,O+f,I),this.imuln(p),this.words[0]+d<67108864?this.words[0]+=d:this._iaddn(d);if(x!==0){var T=1;for(d=u(g,O,g.length,I),O=0;O<x;O++)T*=I;this.imuln(T),this.words[0]+d<67108864?this.words[0]+=d:this._iaddn(d)}this.strip()},n.prototype.copy=function(g){g.words=new Array(this.length);for(var I=0;I<this.length;I++)g.words[I]=this.words[I];g.length=this.length,g.negative=this.negative,g.red=this.red},n.prototype.clone=function(){var g=new n(null);return this.copy(g),g},n.prototype._expand=function(g){for(;this.length<g;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},n.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var c=["","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"],l=[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];n.prototype.toString=function(g,I){g=g||10,I=I|0||1;var y;if(g===16||g==="hex"){y="";for(var f=0,p=0,_=0;_<this.length;_++){var x=this.words[_],b=((x<<f|p)&16777215).toString(16);p=x>>>24-f&16777215,f+=2,f>=26&&(f-=26,_--),p!==0||_!==this.length-1?y=c[6-b.length]+b+y:y=b+y}for(p!==0&&(y=p.toString(16)+y);y.length%I!==0;)y="0"+y;return this.negative!==0&&(y="-"+y),y}if(g===(g|0)&&g>=2&&g<=36){var d=l[g],O=m[g];y="";var T=this.clone();for(T.negative=0;!T.isZero();){var S=T.modn(O).toString(g);T=T.idivn(O),T.isZero()?y=S+y:y=c[d-S.length]+S+y}for(this.isZero()&&(y="0"+y);y.length%I!==0;)y="0"+y;return this.negative!==0&&(y="-"+y),y}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var g=this.words[0];return this.length===2?g+=this.words[1]*67108864:this.length===3&&this.words[2]===1?g+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-g:g},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(g,I){return r(typeof o<"u"),this.toArrayLike(o,g,I)},n.prototype.toArray=function(g,I){return this.toArrayLike(Array,g,I)},n.prototype.toArrayLike=function(g,I,y){var f=this.byteLength(),p=y||Math.max(1,f);r(f<=p,"byte array longer than desired length"),r(p>0,"Requested array length <= 0"),this.strip();var _=I==="le",x=new g(p),b,d,O=this.clone();if(_){for(d=0;!O.isZero();d++)b=O.andln(255),O.iushrn(8),x[d]=b;for(;d<p;d++)x[d]=0}else{for(d=0;d<p-f;d++)x[d]=0;for(d=0;!O.isZero();d++)b=O.andln(255),O.iushrn(8),x[p-d-1]=b}return x},Math.clz32?n.prototype._countBits=function(g){return 32-Math.clz32(g)}:n.prototype._countBits=function(g){var I=g,y=0;return I>=4096&&(y+=13,I>>>=13),I>=64&&(y+=7,I>>>=7),I>=8&&(y+=4,I>>>=4),I>=2&&(y+=2,I>>>=2),y+I},n.prototype._zeroBits=function(g){if(g===0)return 26;var I=g,y=0;return(I&8191)===0&&(y+=13,I>>>=13),(I&127)===0&&(y+=7,I>>>=7),(I&15)===0&&(y+=4,I>>>=4),(I&3)===0&&(y+=2,I>>>=2),(I&1)===0&&y++,y},n.prototype.bitLength=function(){var g=this.words[this.length-1],I=this._countBits(g);return(this.length-1)*26+I};function w(B){for(var g=new Array(B.bitLength()),I=0;I<g.length;I++){var y=I/26|0,f=I%26;g[I]=(B.words[y]&1<<f)>>>f}return g}n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var g=0,I=0;I<this.length;I++){var y=this._zeroBits(this.words[I]);if(g+=y,y!==26)break}return g},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(g){return this.negative!==0?this.abs().inotn(g).iaddn(1):this.clone()},n.prototype.fromTwos=function(g){return this.testn(g-1)?this.notn(g).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return this.negative!==0},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(g){for(;this.length<g.length;)this.words[this.length++]=0;for(var I=0;I<g.length;I++)this.words[I]=this.words[I]|g.words[I];return this.strip()},n.prototype.ior=function(g){return r((this.negative|g.negative)===0),this.iuor(g)},n.prototype.or=function(g){return this.length>g.length?this.clone().ior(g):g.clone().ior(this)},n.prototype.uor=function(g){return this.length>g.length?this.clone().iuor(g):g.clone().iuor(this)},n.prototype.iuand=function(g){var I;this.length>g.length?I=g:I=this;for(var y=0;y<I.length;y++)this.words[y]=this.words[y]&g.words[y];return this.length=I.length,this.strip()},n.prototype.iand=function(g){return r((this.negative|g.negative)===0),this.iuand(g)},n.prototype.and=function(g){return this.length>g.length?this.clone().iand(g):g.clone().iand(this)},n.prototype.uand=function(g){return this.length>g.length?this.clone().iuand(g):g.clone().iuand(this)},n.prototype.iuxor=function(g){var I,y;this.length>g.length?(I=this,y=g):(I=g,y=this);for(var f=0;f<y.length;f++)this.words[f]=I.words[f]^y.words[f];if(this!==I)for(;f<I.length;f++)this.words[f]=I.words[f];return this.length=I.length,this.strip()},n.prototype.ixor=function(g){return r((this.negative|g.negative)===0),this.iuxor(g)},n.prototype.xor=function(g){return this.length>g.length?this.clone().ixor(g):g.clone().ixor(this)},n.prototype.uxor=function(g){return this.length>g.length?this.clone().iuxor(g):g.clone().iuxor(this)},n.prototype.inotn=function(g){r(typeof g=="number"&&g>=0);var I=Math.ceil(g/26)|0,y=g%26;this._expand(I),y>0&&I--;for(var f=0;f<I;f++)this.words[f]=~this.words[f]&67108863;return y>0&&(this.words[f]=~this.words[f]&67108863>>26-y),this.strip()},n.prototype.notn=function(g){return this.clone().inotn(g)},n.prototype.setn=function(g,I){r(typeof g=="number"&&g>=0);var y=g/26|0,f=g%26;return this._expand(y+1),I?this.words[y]=this.words[y]|1<<f:this.words[y]=this.words[y]&~(1<<f),this.strip()},n.prototype.iadd=function(g){var I;if(this.negative!==0&&g.negative===0)return this.negative=0,I=this.isub(g),this.negative^=1,this._normSign();if(this.negative===0&&g.negative!==0)return g.negative=0,I=this.isub(g),g.negative=1,I._normSign();var y,f;this.length>g.length?(y=this,f=g):(y=g,f=this);for(var p=0,_=0;_<f.length;_++)I=(y.words[_]|0)+(f.words[_]|0)+p,this.words[_]=I&67108863,p=I>>>26;for(;p!==0&&_<y.length;_++)I=(y.words[_]|0)+p,this.words[_]=I&67108863,p=I>>>26;if(this.length=y.length,p!==0)this.words[this.length]=p,this.length++;else if(y!==this)for(;_<y.length;_++)this.words[_]=y.words[_];return this},n.prototype.add=function(g){var I;return g.negative!==0&&this.negative===0?(g.negative=0,I=this.sub(g),g.negative^=1,I):g.negative===0&&this.negative!==0?(this.negative=0,I=g.sub(this),this.negative=1,I):this.length>g.length?this.clone().iadd(g):g.clone().iadd(this)},n.prototype.isub=function(g){if(g.negative!==0){g.negative=0;var I=this.iadd(g);return g.negative=1,I._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(g),this.negative=1,this._normSign();var y=this.cmp(g);if(y===0)return this.negative=0,this.length=1,this.words[0]=0,this;var f,p;y>0?(f=this,p=g):(f=g,p=this);for(var _=0,x=0;x<p.length;x++)I=(f.words[x]|0)-(p.words[x]|0)+_,_=I>>26,this.words[x]=I&67108863;for(;_!==0&&x<f.length;x++)I=(f.words[x]|0)+_,_=I>>26,this.words[x]=I&67108863;if(_===0&&x<f.length&&f!==this)for(;x<f.length;x++)this.words[x]=f.words[x];return this.length=Math.max(this.length,x),f!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(g){return this.clone().isub(g)};function E(B,g,I){I.negative=g.negative^B.negative;var y=B.length+g.length|0;I.length=y,y=y-1|0;var f=B.words[0]|0,p=g.words[0]|0,_=f*p,x=_&67108863,b=_/67108864|0;I.words[0]=x;for(var d=1;d<y;d++){for(var O=b>>>26,T=b&67108863,S=Math.min(d,g.length-1),R=Math.max(0,d-B.length+1);R<=S;R++){var Y=d-R|0;f=B.words[Y]|0,p=g.words[R]|0,_=f*p+T,O+=_/67108864|0,T=_&67108863}I.words[d]=T|0,b=O|0}return b!==0?I.words[d]=b|0:I.length--,I.strip()}var P=function(g,I,y){var f=g.words,p=I.words,_=y.words,x=0,b,d,O,T=f[0]|0,S=T&8191,R=T>>>13,Y=f[1]|0,X=Y&8191,ne=Y>>>13,ce=f[2]|0,pe=ce&8191,q=ce>>>13,W=f[3]|0,$=W&8191,ee=W>>>13,se=f[4]|0,ue=se&8191,le=se>>>13,Pe=f[5]|0,ge=Pe&8191,ve=Pe>>>13,sr=f[6]|0,xe=sr&8191,ye=sr>>>13,Be=f[7]|0,be=Be&8191,_e=Be>>>13,Qi=f[8]|0,Ce=Qi&8191,Re=Qi>>>13,Js=f[9]|0,De=Js&8191,qe=Js>>>13,Wl=p[0]|0,Ue=Wl&8191,Fe=Wl>>>13,Yl=p[1]|0,He=Yl&8191,je=Yl>>>13,$l=p[2]|0,ze=$l&8191,Ke=$l>>>13,Xl=p[3]|0,Ve=Xl&8191,Ge=Xl>>>13,Jl=p[4]|0,Ze=Jl&8191,We=Jl>>>13,Ql=p[5]|0,Ye=Ql&8191,$e=Ql>>>13,eh=p[6]|0,Xe=eh&8191,Je=eh>>>13,th=p[7]|0,Qe=th&8191,et=th>>>13,rh=p[8]|0,tt=rh&8191,rt=rh>>>13,ih=p[9]|0,it=ih&8191,nt=ih>>>13;y.negative=g.negative^I.negative,y.length=19,b=Math.imul(S,Ue),d=Math.imul(S,Fe),d=d+Math.imul(R,Ue)|0,O=Math.imul(R,Fe);var Gf=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(Gf>>>26)|0,Gf&=67108863,b=Math.imul(X,Ue),d=Math.imul(X,Fe),d=d+Math.imul(ne,Ue)|0,O=Math.imul(ne,Fe),b=b+Math.imul(S,He)|0,d=d+Math.imul(S,je)|0,d=d+Math.imul(R,He)|0,O=O+Math.imul(R,je)|0;var Jt=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,b=Math.imul(pe,Ue),d=Math.imul(pe,Fe),d=d+Math.imul(q,Ue)|0,O=Math.imul(q,Fe),b=b+Math.imul(X,He)|0,d=d+Math.imul(X,je)|0,d=d+Math.imul(ne,He)|0,O=O+Math.imul(ne,je)|0,b=b+Math.imul(S,ze)|0,d=d+Math.imul(S,Ke)|0,d=d+Math.imul(R,ze)|0,O=O+Math.imul(R,Ke)|0;var Qt=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,b=Math.imul($,Ue),d=Math.imul($,Fe),d=d+Math.imul(ee,Ue)|0,O=Math.imul(ee,Fe),b=b+Math.imul(pe,He)|0,d=d+Math.imul(pe,je)|0,d=d+Math.imul(q,He)|0,O=O+Math.imul(q,je)|0,b=b+Math.imul(X,ze)|0,d=d+Math.imul(X,Ke)|0,d=d+Math.imul(ne,ze)|0,O=O+Math.imul(ne,Ke)|0,b=b+Math.imul(S,Ve)|0,d=d+Math.imul(S,Ge)|0,d=d+Math.imul(R,Ve)|0,O=O+Math.imul(R,Ge)|0;var Qs=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(Qs>>>26)|0,Qs&=67108863,b=Math.imul(ue,Ue),d=Math.imul(ue,Fe),d=d+Math.imul(le,Ue)|0,O=Math.imul(le,Fe),b=b+Math.imul($,He)|0,d=d+Math.imul($,je)|0,d=d+Math.imul(ee,He)|0,O=O+Math.imul(ee,je)|0,b=b+Math.imul(pe,ze)|0,d=d+Math.imul(pe,Ke)|0,d=d+Math.imul(q,ze)|0,O=O+Math.imul(q,Ke)|0,b=b+Math.imul(X,Ve)|0,d=d+Math.imul(X,Ge)|0,d=d+Math.imul(ne,Ve)|0,O=O+Math.imul(ne,Ge)|0,b=b+Math.imul(S,Ze)|0,d=d+Math.imul(S,We)|0,d=d+Math.imul(R,Ze)|0,O=O+Math.imul(R,We)|0;var eu=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(eu>>>26)|0,eu&=67108863,b=Math.imul(ge,Ue),d=Math.imul(ge,Fe),d=d+Math.imul(ve,Ue)|0,O=Math.imul(ve,Fe),b=b+Math.imul(ue,He)|0,d=d+Math.imul(ue,je)|0,d=d+Math.imul(le,He)|0,O=O+Math.imul(le,je)|0,b=b+Math.imul($,ze)|0,d=d+Math.imul($,Ke)|0,d=d+Math.imul(ee,ze)|0,O=O+Math.imul(ee,Ke)|0,b=b+Math.imul(pe,Ve)|0,d=d+Math.imul(pe,Ge)|0,d=d+Math.imul(q,Ve)|0,O=O+Math.imul(q,Ge)|0,b=b+Math.imul(X,Ze)|0,d=d+Math.imul(X,We)|0,d=d+Math.imul(ne,Ze)|0,O=O+Math.imul(ne,We)|0,b=b+Math.imul(S,Ye)|0,d=d+Math.imul(S,$e)|0,d=d+Math.imul(R,Ye)|0,O=O+Math.imul(R,$e)|0;var tu=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(tu>>>26)|0,tu&=67108863,b=Math.imul(xe,Ue),d=Math.imul(xe,Fe),d=d+Math.imul(ye,Ue)|0,O=Math.imul(ye,Fe),b=b+Math.imul(ge,He)|0,d=d+Math.imul(ge,je)|0,d=d+Math.imul(ve,He)|0,O=O+Math.imul(ve,je)|0,b=b+Math.imul(ue,ze)|0,d=d+Math.imul(ue,Ke)|0,d=d+Math.imul(le,ze)|0,O=O+Math.imul(le,Ke)|0,b=b+Math.imul($,Ve)|0,d=d+Math.imul($,Ge)|0,d=d+Math.imul(ee,Ve)|0,O=O+Math.imul(ee,Ge)|0,b=b+Math.imul(pe,Ze)|0,d=d+Math.imul(pe,We)|0,d=d+Math.imul(q,Ze)|0,O=O+Math.imul(q,We)|0,b=b+Math.imul(X,Ye)|0,d=d+Math.imul(X,$e)|0,d=d+Math.imul(ne,Ye)|0,O=O+Math.imul(ne,$e)|0,b=b+Math.imul(S,Xe)|0,d=d+Math.imul(S,Je)|0,d=d+Math.imul(R,Xe)|0,O=O+Math.imul(R,Je)|0;var ru=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(ru>>>26)|0,ru&=67108863,b=Math.imul(be,Ue),d=Math.imul(be,Fe),d=d+Math.imul(_e,Ue)|0,O=Math.imul(_e,Fe),b=b+Math.imul(xe,He)|0,d=d+Math.imul(xe,je)|0,d=d+Math.imul(ye,He)|0,O=O+Math.imul(ye,je)|0,b=b+Math.imul(ge,ze)|0,d=d+Math.imul(ge,Ke)|0,d=d+Math.imul(ve,ze)|0,O=O+Math.imul(ve,Ke)|0,b=b+Math.imul(ue,Ve)|0,d=d+Math.imul(ue,Ge)|0,d=d+Math.imul(le,Ve)|0,O=O+Math.imul(le,Ge)|0,b=b+Math.imul($,Ze)|0,d=d+Math.imul($,We)|0,d=d+Math.imul(ee,Ze)|0,O=O+Math.imul(ee,We)|0,b=b+Math.imul(pe,Ye)|0,d=d+Math.imul(pe,$e)|0,d=d+Math.imul(q,Ye)|0,O=O+Math.imul(q,$e)|0,b=b+Math.imul(X,Xe)|0,d=d+Math.imul(X,Je)|0,d=d+Math.imul(ne,Xe)|0,O=O+Math.imul(ne,Je)|0,b=b+Math.imul(S,Qe)|0,d=d+Math.imul(S,et)|0,d=d+Math.imul(R,Qe)|0,O=O+Math.imul(R,et)|0;var iu=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(iu>>>26)|0,iu&=67108863,b=Math.imul(Ce,Ue),d=Math.imul(Ce,Fe),d=d+Math.imul(Re,Ue)|0,O=Math.imul(Re,Fe),b=b+Math.imul(be,He)|0,d=d+Math.imul(be,je)|0,d=d+Math.imul(_e,He)|0,O=O+Math.imul(_e,je)|0,b=b+Math.imul(xe,ze)|0,d=d+Math.imul(xe,Ke)|0,d=d+Math.imul(ye,ze)|0,O=O+Math.imul(ye,Ke)|0,b=b+Math.imul(ge,Ve)|0,d=d+Math.imul(ge,Ge)|0,d=d+Math.imul(ve,Ve)|0,O=O+Math.imul(ve,Ge)|0,b=b+Math.imul(ue,Ze)|0,d=d+Math.imul(ue,We)|0,d=d+Math.imul(le,Ze)|0,O=O+Math.imul(le,We)|0,b=b+Math.imul($,Ye)|0,d=d+Math.imul($,$e)|0,d=d+Math.imul(ee,Ye)|0,O=O+Math.imul(ee,$e)|0,b=b+Math.imul(pe,Xe)|0,d=d+Math.imul(pe,Je)|0,d=d+Math.imul(q,Xe)|0,O=O+Math.imul(q,Je)|0,b=b+Math.imul(X,Qe)|0,d=d+Math.imul(X,et)|0,d=d+Math.imul(ne,Qe)|0,O=O+Math.imul(ne,et)|0,b=b+Math.imul(S,tt)|0,d=d+Math.imul(S,rt)|0,d=d+Math.imul(R,tt)|0,O=O+Math.imul(R,rt)|0;var nu=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(nu>>>26)|0,nu&=67108863,b=Math.imul(De,Ue),d=Math.imul(De,Fe),d=d+Math.imul(qe,Ue)|0,O=Math.imul(qe,Fe),b=b+Math.imul(Ce,He)|0,d=d+Math.imul(Ce,je)|0,d=d+Math.imul(Re,He)|0,O=O+Math.imul(Re,je)|0,b=b+Math.imul(be,ze)|0,d=d+Math.imul(be,Ke)|0,d=d+Math.imul(_e,ze)|0,O=O+Math.imul(_e,Ke)|0,b=b+Math.imul(xe,Ve)|0,d=d+Math.imul(xe,Ge)|0,d=d+Math.imul(ye,Ve)|0,O=O+Math.imul(ye,Ge)|0,b=b+Math.imul(ge,Ze)|0,d=d+Math.imul(ge,We)|0,d=d+Math.imul(ve,Ze)|0,O=O+Math.imul(ve,We)|0,b=b+Math.imul(ue,Ye)|0,d=d+Math.imul(ue,$e)|0,d=d+Math.imul(le,Ye)|0,O=O+Math.imul(le,$e)|0,b=b+Math.imul($,Xe)|0,d=d+Math.imul($,Je)|0,d=d+Math.imul(ee,Xe)|0,O=O+Math.imul(ee,Je)|0,b=b+Math.imul(pe,Qe)|0,d=d+Math.imul(pe,et)|0,d=d+Math.imul(q,Qe)|0,O=O+Math.imul(q,et)|0,b=b+Math.imul(X,tt)|0,d=d+Math.imul(X,rt)|0,d=d+Math.imul(ne,tt)|0,O=O+Math.imul(ne,rt)|0,b=b+Math.imul(S,it)|0,d=d+Math.imul(S,nt)|0,d=d+Math.imul(R,it)|0,O=O+Math.imul(R,nt)|0;var ou=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(ou>>>26)|0,ou&=67108863,b=Math.imul(De,He),d=Math.imul(De,je),d=d+Math.imul(qe,He)|0,O=Math.imul(qe,je),b=b+Math.imul(Ce,ze)|0,d=d+Math.imul(Ce,Ke)|0,d=d+Math.imul(Re,ze)|0,O=O+Math.imul(Re,Ke)|0,b=b+Math.imul(be,Ve)|0,d=d+Math.imul(be,Ge)|0,d=d+Math.imul(_e,Ve)|0,O=O+Math.imul(_e,Ge)|0,b=b+Math.imul(xe,Ze)|0,d=d+Math.imul(xe,We)|0,d=d+Math.imul(ye,Ze)|0,O=O+Math.imul(ye,We)|0,b=b+Math.imul(ge,Ye)|0,d=d+Math.imul(ge,$e)|0,d=d+Math.imul(ve,Ye)|0,O=O+Math.imul(ve,$e)|0,b=b+Math.imul(ue,Xe)|0,d=d+Math.imul(ue,Je)|0,d=d+Math.imul(le,Xe)|0,O=O+Math.imul(le,Je)|0,b=b+Math.imul($,Qe)|0,d=d+Math.imul($,et)|0,d=d+Math.imul(ee,Qe)|0,O=O+Math.imul(ee,et)|0,b=b+Math.imul(pe,tt)|0,d=d+Math.imul(pe,rt)|0,d=d+Math.imul(q,tt)|0,O=O+Math.imul(q,rt)|0,b=b+Math.imul(X,it)|0,d=d+Math.imul(X,nt)|0,d=d+Math.imul(ne,it)|0,O=O+Math.imul(ne,nt)|0;var au=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(au>>>26)|0,au&=67108863,b=Math.imul(De,ze),d=Math.imul(De,Ke),d=d+Math.imul(qe,ze)|0,O=Math.imul(qe,Ke),b=b+Math.imul(Ce,Ve)|0,d=d+Math.imul(Ce,Ge)|0,d=d+Math.imul(Re,Ve)|0,O=O+Math.imul(Re,Ge)|0,b=b+Math.imul(be,Ze)|0,d=d+Math.imul(be,We)|0,d=d+Math.imul(_e,Ze)|0,O=O+Math.imul(_e,We)|0,b=b+Math.imul(xe,Ye)|0,d=d+Math.imul(xe,$e)|0,d=d+Math.imul(ye,Ye)|0,O=O+Math.imul(ye,$e)|0,b=b+Math.imul(ge,Xe)|0,d=d+Math.imul(ge,Je)|0,d=d+Math.imul(ve,Xe)|0,O=O+Math.imul(ve,Je)|0,b=b+Math.imul(ue,Qe)|0,d=d+Math.imul(ue,et)|0,d=d+Math.imul(le,Qe)|0,O=O+Math.imul(le,et)|0,b=b+Math.imul($,tt)|0,d=d+Math.imul($,rt)|0,d=d+Math.imul(ee,tt)|0,O=O+Math.imul(ee,rt)|0,b=b+Math.imul(pe,it)|0,d=d+Math.imul(pe,nt)|0,d=d+Math.imul(q,it)|0,O=O+Math.imul(q,nt)|0;var su=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(su>>>26)|0,su&=67108863,b=Math.imul(De,Ve),d=Math.imul(De,Ge),d=d+Math.imul(qe,Ve)|0,O=Math.imul(qe,Ge),b=b+Math.imul(Ce,Ze)|0,d=d+Math.imul(Ce,We)|0,d=d+Math.imul(Re,Ze)|0,O=O+Math.imul(Re,We)|0,b=b+Math.imul(be,Ye)|0,d=d+Math.imul(be,$e)|0,d=d+Math.imul(_e,Ye)|0,O=O+Math.imul(_e,$e)|0,b=b+Math.imul(xe,Xe)|0,d=d+Math.imul(xe,Je)|0,d=d+Math.imul(ye,Xe)|0,O=O+Math.imul(ye,Je)|0,b=b+Math.imul(ge,Qe)|0,d=d+Math.imul(ge,et)|0,d=d+Math.imul(ve,Qe)|0,O=O+Math.imul(ve,et)|0,b=b+Math.imul(ue,tt)|0,d=d+Math.imul(ue,rt)|0,d=d+Math.imul(le,tt)|0,O=O+Math.imul(le,rt)|0,b=b+Math.imul($,it)|0,d=d+Math.imul($,nt)|0,d=d+Math.imul(ee,it)|0,O=O+Math.imul(ee,nt)|0;var uu=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(uu>>>26)|0,uu&=67108863,b=Math.imul(De,Ze),d=Math.imul(De,We),d=d+Math.imul(qe,Ze)|0,O=Math.imul(qe,We),b=b+Math.imul(Ce,Ye)|0,d=d+Math.imul(Ce,$e)|0,d=d+Math.imul(Re,Ye)|0,O=O+Math.imul(Re,$e)|0,b=b+Math.imul(be,Xe)|0,d=d+Math.imul(be,Je)|0,d=d+Math.imul(_e,Xe)|0,O=O+Math.imul(_e,Je)|0,b=b+Math.imul(xe,Qe)|0,d=d+Math.imul(xe,et)|0,d=d+Math.imul(ye,Qe)|0,O=O+Math.imul(ye,et)|0,b=b+Math.imul(ge,tt)|0,d=d+Math.imul(ge,rt)|0,d=d+Math.imul(ve,tt)|0,O=O+Math.imul(ve,rt)|0,b=b+Math.imul(ue,it)|0,d=d+Math.imul(ue,nt)|0,d=d+Math.imul(le,it)|0,O=O+Math.imul(le,nt)|0;var fu=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(fu>>>26)|0,fu&=67108863,b=Math.imul(De,Ye),d=Math.imul(De,$e),d=d+Math.imul(qe,Ye)|0,O=Math.imul(qe,$e),b=b+Math.imul(Ce,Xe)|0,d=d+Math.imul(Ce,Je)|0,d=d+Math.imul(Re,Xe)|0,O=O+Math.imul(Re,Je)|0,b=b+Math.imul(be,Qe)|0,d=d+Math.imul(be,et)|0,d=d+Math.imul(_e,Qe)|0,O=O+Math.imul(_e,et)|0,b=b+Math.imul(xe,tt)|0,d=d+Math.imul(xe,rt)|0,d=d+Math.imul(ye,tt)|0,O=O+Math.imul(ye,rt)|0,b=b+Math.imul(ge,it)|0,d=d+Math.imul(ge,nt)|0,d=d+Math.imul(ve,it)|0,O=O+Math.imul(ve,nt)|0;var cu=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(cu>>>26)|0,cu&=67108863,b=Math.imul(De,Xe),d=Math.imul(De,Je),d=d+Math.imul(qe,Xe)|0,O=Math.imul(qe,Je),b=b+Math.imul(Ce,Qe)|0,d=d+Math.imul(Ce,et)|0,d=d+Math.imul(Re,Qe)|0,O=O+Math.imul(Re,et)|0,b=b+Math.imul(be,tt)|0,d=d+Math.imul(be,rt)|0,d=d+Math.imul(_e,tt)|0,O=O+Math.imul(_e,rt)|0,b=b+Math.imul(xe,it)|0,d=d+Math.imul(xe,nt)|0,d=d+Math.imul(ye,it)|0,O=O+Math.imul(ye,nt)|0;var lu=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(lu>>>26)|0,lu&=67108863,b=Math.imul(De,Qe),d=Math.imul(De,et),d=d+Math.imul(qe,Qe)|0,O=Math.imul(qe,et),b=b+Math.imul(Ce,tt)|0,d=d+Math.imul(Ce,rt)|0,d=d+Math.imul(Re,tt)|0,O=O+Math.imul(Re,rt)|0,b=b+Math.imul(be,it)|0,d=d+Math.imul(be,nt)|0,d=d+Math.imul(_e,it)|0,O=O+Math.imul(_e,nt)|0;var hu=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(hu>>>26)|0,hu&=67108863,b=Math.imul(De,tt),d=Math.imul(De,rt),d=d+Math.imul(qe,tt)|0,O=Math.imul(qe,rt),b=b+Math.imul(Ce,it)|0,d=d+Math.imul(Ce,nt)|0,d=d+Math.imul(Re,it)|0,O=O+Math.imul(Re,nt)|0;var du=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(du>>>26)|0,du&=67108863,b=Math.imul(De,it),d=Math.imul(De,nt),d=d+Math.imul(qe,it)|0,O=Math.imul(qe,nt);var pu=(x+b|0)+((d&8191)<<13)|0;return x=(O+(d>>>13)|0)+(pu>>>26)|0,pu&=67108863,_[0]=Gf,_[1]=Jt,_[2]=Qt,_[3]=Qs,_[4]=eu,_[5]=tu,_[6]=ru,_[7]=iu,_[8]=nu,_[9]=ou,_[10]=au,_[11]=su,_[12]=uu,_[13]=fu,_[14]=cu,_[15]=lu,_[16]=hu,_[17]=du,_[18]=pu,x!==0&&(_[19]=x,y.length++),y};Math.imul||(P=E);function M(B,g,I){I.negative=g.negative^B.negative,I.length=B.length+g.length;for(var y=0,f=0,p=0;p<I.length-1;p++){var _=f;f=0;for(var x=y&67108863,b=Math.min(p,g.length-1),d=Math.max(0,p-B.length+1);d<=b;d++){var O=p-d,T=B.words[O]|0,S=g.words[d]|0,R=T*S,Y=R&67108863;_=_+(R/67108864|0)|0,Y=Y+x|0,x=Y&67108863,_=_+(Y>>>26)|0,f+=_>>>26,_&=67108863}I.words[p]=x,y=_,_=f}return y!==0?I.words[p]=y:I.length--,I.strip()}function D(B,g,I){var y=new L;return y.mulp(B,g,I)}n.prototype.mulTo=function(g,I){var y,f=this.length+g.length;return this.length===10&&g.length===10?y=P(this,g,I):f<63?y=E(this,g,I):f<1024?y=M(this,g,I):y=D(this,g,I),y};function L(B,g){this.x=B,this.y=g}L.prototype.makeRBT=function(g){for(var I=new Array(g),y=n.prototype._countBits(g)-1,f=0;f<g;f++)I[f]=this.revBin(f,y,g);return I},L.prototype.revBin=function(g,I,y){if(g===0||g===y-1)return g;for(var f=0,p=0;p<I;p++)f|=(g&1)<<I-p-1,g>>=1;return f},L.prototype.permute=function(g,I,y,f,p,_){for(var x=0;x<_;x++)f[x]=I[g[x]],p[x]=y[g[x]]},L.prototype.transform=function(g,I,y,f,p,_){this.permute(_,g,I,y,f,p);for(var x=1;x<p;x<<=1)for(var b=x<<1,d=Math.cos(2*Math.PI/b),O=Math.sin(2*Math.PI/b),T=0;T<p;T+=b)for(var S=d,R=O,Y=0;Y<x;Y++){var X=y[T+Y],ne=f[T+Y],ce=y[T+Y+x],pe=f[T+Y+x],q=S*ce-R*pe;pe=S*pe+R*ce,ce=q,y[T+Y]=X+ce,f[T+Y]=ne+pe,y[T+Y+x]=X-ce,f[T+Y+x]=ne-pe,Y!==b&&(q=d*S-O*R,R=d*R+O*S,S=q)}},L.prototype.guessLen13b=function(g,I){var y=Math.max(I,g)|1,f=y&1,p=0;for(y=y/2|0;y;y=y>>>1)p++;return 1<<p+1+f},L.prototype.conjugate=function(g,I,y){if(!(y<=1))for(var f=0;f<y/2;f++){var p=g[f];g[f]=g[y-f-1],g[y-f-1]=p,p=I[f],I[f]=-I[y-f-1],I[y-f-1]=-p}},L.prototype.normalize13b=function(g,I){for(var y=0,f=0;f<I/2;f++){var p=Math.round(g[2*f+1]/I)*8192+Math.round(g[2*f]/I)+y;g[f]=p&67108863,p<67108864?y=0:y=p/67108864|0}return g},L.prototype.convert13b=function(g,I,y,f){for(var p=0,_=0;_<I;_++)p=p+(g[_]|0),y[2*_]=p&8191,p=p>>>13,y[2*_+1]=p&8191,p=p>>>13;for(_=2*I;_<f;++_)y[_]=0;r(p===0),r((p&-8192)===0)},L.prototype.stub=function(g){for(var I=new Array(g),y=0;y<g;y++)I[y]=0;return I},L.prototype.mulp=function(g,I,y){var f=2*this.guessLen13b(g.length,I.length),p=this.makeRBT(f),_=this.stub(f),x=new Array(f),b=new Array(f),d=new Array(f),O=new Array(f),T=new Array(f),S=new Array(f),R=y.words;R.length=f,this.convert13b(g.words,g.length,x,f),this.convert13b(I.words,I.length,O,f),this.transform(x,_,b,d,f,p),this.transform(O,_,T,S,f,p);for(var Y=0;Y<f;Y++){var X=b[Y]*T[Y]-d[Y]*S[Y];d[Y]=b[Y]*S[Y]+d[Y]*T[Y],b[Y]=X}return this.conjugate(b,d,f),this.transform(b,d,R,_,f,p),this.conjugate(R,_,f),this.normalize13b(R,f),y.negative=g.negative^I.negative,y.length=g.length+I.length,y.strip()},n.prototype.mul=function(g){var I=new n(null);return I.words=new Array(this.length+g.length),this.mulTo(g,I)},n.prototype.mulf=function(g){var I=new n(null);return I.words=new Array(this.length+g.length),D(this,g,I)},n.prototype.imul=function(g){return this.clone().mulTo(g,this)},n.prototype.imuln=function(g){r(typeof g=="number"),r(g<67108864);for(var I=0,y=0;y<this.length;y++){var f=(this.words[y]|0)*g,p=(f&67108863)+(I&67108863);I>>=26,I+=f/67108864|0,I+=p>>>26,this.words[y]=p&67108863}return I!==0&&(this.words[y]=I,this.length++),this.length=g===0?1:this.length,this},n.prototype.muln=function(g){return this.clone().imuln(g)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(g){var I=w(g);if(I.length===0)return new n(1);for(var y=this,f=0;f<I.length&&I[f]===0;f++,y=y.sqr());if(++f<I.length)for(var p=y.sqr();f<I.length;f++,p=p.sqr())I[f]!==0&&(y=y.mul(p));return y},n.prototype.iushln=function(g){r(typeof g=="number"&&g>=0);var I=g%26,y=(g-I)/26,f=67108863>>>26-I<<26-I,p;if(I!==0){var _=0;for(p=0;p<this.length;p++){var x=this.words[p]&f,b=(this.words[p]|0)-x<<I;this.words[p]=b|_,_=x>>>26-I}_&&(this.words[p]=_,this.length++)}if(y!==0){for(p=this.length-1;p>=0;p--)this.words[p+y]=this.words[p];for(p=0;p<y;p++)this.words[p]=0;this.length+=y}return this.strip()},n.prototype.ishln=function(g){return r(this.negative===0),this.iushln(g)},n.prototype.iushrn=function(g,I,y){r(typeof g=="number"&&g>=0);var f;I?f=(I-I%26)/26:f=0;var p=g%26,_=Math.min((g-p)/26,this.length),x=67108863^67108863>>>p<<p,b=y;if(f-=_,f=Math.max(0,f),b){for(var d=0;d<_;d++)b.words[d]=this.words[d];b.length=_}if(_!==0)if(this.length>_)for(this.length-=_,d=0;d<this.length;d++)this.words[d]=this.words[d+_];else this.words[0]=0,this.length=1;var O=0;for(d=this.length-1;d>=0&&(O!==0||d>=f);d--){var T=this.words[d]|0;this.words[d]=O<<26-p|T>>>p,O=T&x}return b&&O!==0&&(b.words[b.length++]=O),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(g,I,y){return r(this.negative===0),this.iushrn(g,I,y)},n.prototype.shln=function(g){return this.clone().ishln(g)},n.prototype.ushln=function(g){return this.clone().iushln(g)},n.prototype.shrn=function(g){return this.clone().ishrn(g)},n.prototype.ushrn=function(g){return this.clone().iushrn(g)},n.prototype.testn=function(g){r(typeof g=="number"&&g>=0);var I=g%26,y=(g-I)/26,f=1<<I;if(this.length<=y)return!1;var p=this.words[y];return!!(p&f)},n.prototype.imaskn=function(g){r(typeof g=="number"&&g>=0);var I=g%26,y=(g-I)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=y)return this;if(I!==0&&y++,this.length=Math.min(y,this.length),I!==0){var f=67108863^67108863>>>I<<I;this.words[this.length-1]&=f}return this.length===0&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.maskn=function(g){return this.clone().imaskn(g)},n.prototype.iaddn=function(g){return r(typeof g=="number"),r(g<67108864),g<0?this.isubn(-g):this.negative!==0?this.length===1&&(this.words[0]|0)<g?(this.words[0]=g-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(g),this.negative=1,this):this._iaddn(g)},n.prototype._iaddn=function(g){this.words[0]+=g;for(var I=0;I<this.length&&this.words[I]>=67108864;I++)this.words[I]-=67108864,I===this.length-1?this.words[I+1]=1:this.words[I+1]++;return this.length=Math.max(this.length,I+1),this},n.prototype.isubn=function(g){if(r(typeof g=="number"),r(g<67108864),g<0)return this.iaddn(-g);if(this.negative!==0)return this.negative=0,this.iaddn(g),this.negative=1,this;if(this.words[0]-=g,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var I=0;I<this.length&&this.words[I]<0;I++)this.words[I]+=67108864,this.words[I+1]-=1;return this.strip()},n.prototype.addn=function(g){return this.clone().iaddn(g)},n.prototype.subn=function(g){return this.clone().isubn(g)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(g,I,y){var f=g.length+y,p;this._expand(f);var _,x=0;for(p=0;p<g.length;p++){_=(this.words[p+y]|0)+x;var b=(g.words[p]|0)*I;_-=b&67108863,x=(_>>26)-(b/67108864|0),this.words[p+y]=_&67108863}for(;p<this.length-y;p++)_=(this.words[p+y]|0)+x,x=_>>26,this.words[p+y]=_&67108863;if(x===0)return this.strip();for(r(x===-1),x=0,p=0;p<this.length;p++)_=-(this.words[p]|0)+x,x=_>>26,this.words[p]=_&67108863;return this.negative=1,this.strip()},n.prototype._wordDiv=function(g,I){var y=this.length-g.length,f=this.clone(),p=g,_=p.words[p.length-1]|0,x=this._countBits(_);y=26-x,y!==0&&(p=p.ushln(y),f.iushln(y),_=p.words[p.length-1]|0);var b=f.length-p.length,d;if(I!=="mod"){d=new n(null),d.length=b+1,d.words=new Array(d.length);for(var O=0;O<d.length;O++)d.words[O]=0}var T=f.clone()._ishlnsubmul(p,1,b);T.negative===0&&(f=T,d&&(d.words[b]=1));for(var S=b-1;S>=0;S--){var R=(f.words[p.length+S]|0)*67108864+(f.words[p.length+S-1]|0);for(R=Math.min(R/_|0,67108863),f._ishlnsubmul(p,R,S);f.negative!==0;)R--,f.negative=0,f._ishlnsubmul(p,1,S),f.isZero()||(f.negative^=1);d&&(d.words[S]=R)}return d&&d.strip(),f.strip(),I!=="div"&&y!==0&&f.iushrn(y),{div:d||null,mod:f}},n.prototype.divmod=function(g,I,y){if(r(!g.isZero()),this.isZero())return{div:new n(0),mod:new n(0)};var f,p,_;return this.negative!==0&&g.negative===0?(_=this.neg().divmod(g,I),I!=="mod"&&(f=_.div.neg()),I!=="div"&&(p=_.mod.neg(),y&&p.negative!==0&&p.iadd(g)),{div:f,mod:p}):this.negative===0&&g.negative!==0?(_=this.divmod(g.neg(),I),I!=="mod"&&(f=_.div.neg()),{div:f,mod:_.mod}):(this.negative&g.negative)!==0?(_=this.neg().divmod(g.neg(),I),I!=="div"&&(p=_.mod.neg(),y&&p.negative!==0&&p.isub(g)),{div:_.div,mod:p}):g.length>this.length||this.cmp(g)<0?{div:new n(0),mod:this}:g.length===1?I==="div"?{div:this.divn(g.words[0]),mod:null}:I==="mod"?{div:null,mod:new n(this.modn(g.words[0]))}:{div:this.divn(g.words[0]),mod:new n(this.modn(g.words[0]))}:this._wordDiv(g,I)},n.prototype.div=function(g){return this.divmod(g,"div",!1).div},n.prototype.mod=function(g){return this.divmod(g,"mod",!1).mod},n.prototype.umod=function(g){return this.divmod(g,"mod",!0).mod},n.prototype.divRound=function(g){var I=this.divmod(g);if(I.mod.isZero())return I.div;var y=I.div.negative!==0?I.mod.isub(g):I.mod,f=g.ushrn(1),p=g.andln(1),_=y.cmp(f);return _<0||p===1&&_===0?I.div:I.div.negative!==0?I.div.isubn(1):I.div.iaddn(1)},n.prototype.modn=function(g){r(g<=67108863);for(var I=(1<<26)%g,y=0,f=this.length-1;f>=0;f--)y=(I*y+(this.words[f]|0))%g;return y},n.prototype.idivn=function(g){r(g<=67108863);for(var I=0,y=this.length-1;y>=0;y--){var f=(this.words[y]|0)+I*67108864;this.words[y]=f/g|0,I=f%g}return this.strip()},n.prototype.divn=function(g){return this.clone().idivn(g)},n.prototype.egcd=function(g){r(g.negative===0),r(!g.isZero());var I=this,y=g.clone();I.negative!==0?I=I.umod(g):I=I.clone();for(var f=new n(1),p=new n(0),_=new n(0),x=new n(1),b=0;I.isEven()&&y.isEven();)I.iushrn(1),y.iushrn(1),++b;for(var d=y.clone(),O=I.clone();!I.isZero();){for(var T=0,S=1;(I.words[0]&S)===0&&T<26;++T,S<<=1);if(T>0)for(I.iushrn(T);T-- >0;)(f.isOdd()||p.isOdd())&&(f.iadd(d),p.isub(O)),f.iushrn(1),p.iushrn(1);for(var R=0,Y=1;(y.words[0]&Y)===0&&R<26;++R,Y<<=1);if(R>0)for(y.iushrn(R);R-- >0;)(_.isOdd()||x.isOdd())&&(_.iadd(d),x.isub(O)),_.iushrn(1),x.iushrn(1);I.cmp(y)>=0?(I.isub(y),f.isub(_),p.isub(x)):(y.isub(I),_.isub(f),x.isub(p))}return{a:_,b:x,gcd:y.iushln(b)}},n.prototype._invmp=function(g){r(g.negative===0),r(!g.isZero());var I=this,y=g.clone();I.negative!==0?I=I.umod(g):I=I.clone();for(var f=new n(1),p=new n(0),_=y.clone();I.cmpn(1)>0&&y.cmpn(1)>0;){for(var x=0,b=1;(I.words[0]&b)===0&&x<26;++x,b<<=1);if(x>0)for(I.iushrn(x);x-- >0;)f.isOdd()&&f.iadd(_),f.iushrn(1);for(var d=0,O=1;(y.words[0]&O)===0&&d<26;++d,O<<=1);if(d>0)for(y.iushrn(d);d-- >0;)p.isOdd()&&p.iadd(_),p.iushrn(1);I.cmp(y)>=0?(I.isub(y),f.isub(p)):(y.isub(I),p.isub(f))}var T;return I.cmpn(1)===0?T=f:T=p,T.cmpn(0)<0&&T.iadd(g),T},n.prototype.gcd=function(g){if(this.isZero())return g.abs();if(g.isZero())return this.abs();var I=this.clone(),y=g.clone();I.negative=0,y.negative=0;for(var f=0;I.isEven()&&y.isEven();f++)I.iushrn(1),y.iushrn(1);do{for(;I.isEven();)I.iushrn(1);for(;y.isEven();)y.iushrn(1);var p=I.cmp(y);if(p<0){var _=I;I=y,y=_}else if(p===0||y.cmpn(1)===0)break;I.isub(y)}while(!0);return y.iushln(f)},n.prototype.invm=function(g){return this.egcd(g).a.umod(g)},n.prototype.isEven=function(){return(this.words[0]&1)===0},n.prototype.isOdd=function(){return(this.words[0]&1)===1},n.prototype.andln=function(g){return this.words[0]&g},n.prototype.bincn=function(g){r(typeof g=="number");var I=g%26,y=(g-I)/26,f=1<<I;if(this.length<=y)return this._expand(y+1),this.words[y]|=f,this;for(var p=f,_=y;p!==0&&_<this.length;_++){var x=this.words[_]|0;x+=p,p=x>>>26,x&=67108863,this.words[_]=x}return p!==0&&(this.words[_]=p,this.length++),this},n.prototype.isZero=function(){return this.length===1&&this.words[0]===0},n.prototype.cmpn=function(g){var I=g<0;if(this.negative!==0&&!I)return-1;if(this.negative===0&&I)return 1;this.strip();var y;if(this.length>1)y=1;else{I&&(g=-g),r(g<=67108863,"Number is too big");var f=this.words[0]|0;y=f===g?0:f<g?-1:1}return this.negative!==0?-y|0:y},n.prototype.cmp=function(g){if(this.negative!==0&&g.negative===0)return-1;if(this.negative===0&&g.negative!==0)return 1;var I=this.ucmp(g);return this.negative!==0?-I|0:I},n.prototype.ucmp=function(g){if(this.length>g.length)return 1;if(this.length<g.length)return-1;for(var I=0,y=this.length-1;y>=0;y--){var f=this.words[y]|0,p=g.words[y]|0;if(f!==p){f<p?I=-1:f>p&&(I=1);break}}return I},n.prototype.gtn=function(g){return this.cmpn(g)===1},n.prototype.gt=function(g){return this.cmp(g)===1},n.prototype.gten=function(g){return this.cmpn(g)>=0},n.prototype.gte=function(g){return this.cmp(g)>=0},n.prototype.ltn=function(g){return this.cmpn(g)===-1},n.prototype.lt=function(g){return this.cmp(g)===-1},n.prototype.lten=function(g){return this.cmpn(g)<=0},n.prototype.lte=function(g){return this.cmp(g)<=0},n.prototype.eqn=function(g){return this.cmpn(g)===0},n.prototype.eq=function(g){return this.cmp(g)===0},n.red=function(g){return new z(g)},n.prototype.toRed=function(g){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),g.convertTo(this)._forceRed(g)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(g){return this.red=g,this},n.prototype.forceRed=function(g){return r(!this.red,"Already a number in reduction context"),this._forceRed(g)},n.prototype.redAdd=function(g){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,g)},n.prototype.redIAdd=function(g){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,g)},n.prototype.redSub=function(g){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,g)},n.prototype.redISub=function(g){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,g)},n.prototype.redShl=function(g){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,g)},n.prototype.redMul=function(g){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,g),this.red.mul(this,g)},n.prototype.redIMul=function(g){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,g),this.red.imul(this,g)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(g){return r(this.red&&!g.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,g)};var U={k256:null,p224:null,p192:null,p25519:null};function K(B,g){this.name=B,this.p=new n(g,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}K.prototype._tmp=function(){var g=new n(null);return g.words=new Array(Math.ceil(this.n/13)),g},K.prototype.ireduce=function(g){var I=g,y;do this.split(I,this.tmp),I=this.imulK(I),I=I.iadd(this.tmp),y=I.bitLength();while(y>this.n);var f=y<this.n?-1:I.ucmp(this.p);return f===0?(I.words[0]=0,I.length=1):f>0?I.isub(this.p):I.strip!==void 0?I.strip():I._strip(),I},K.prototype.split=function(g,I){g.iushrn(this.n,0,I)},K.prototype.imulK=function(g){return g.imul(this.k)};function C(){K.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(C,K),C.prototype.split=function(g,I){for(var y=4194303,f=Math.min(g.length,9),p=0;p<f;p++)I.words[p]=g.words[p];if(I.length=f,g.length<=9){g.words[0]=0,g.length=1;return}var _=g.words[9];for(I.words[I.length++]=_&y,p=10;p<g.length;p++){var x=g.words[p]|0;g.words[p-10]=(x&y)<<4|_>>>22,_=x}_>>>=22,g.words[p-10]=_,_===0&&g.length>10?g.length-=10:g.length-=9},C.prototype.imulK=function(g){g.words[g.length]=0,g.words[g.length+1]=0,g.length+=2;for(var I=0,y=0;y<g.length;y++){var f=g.words[y]|0;I+=f*977,g.words[y]=I&67108863,I=f*64+(I/67108864|0)}return g.words[g.length-1]===0&&(g.length--,g.words[g.length-1]===0&&g.length--),g};function N(){K.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(N,K);function F(){K.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(F,K);function H(){K.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(H,K),H.prototype.imulK=function(g){for(var I=0,y=0;y<g.length;y++){var f=(g.words[y]|0)*19+I,p=f&67108863;f>>>=26,g.words[y]=p,I=f}return I!==0&&(g.words[g.length++]=I),g},n._prime=function(g){if(U[g])return U[g];var I;if(g==="k256")I=new C;else if(g==="p224")I=new N;else if(g==="p192")I=new F;else if(g==="p25519")I=new H;else throw new Error("Unknown prime "+g);return U[g]=I,I};function z(B){if(typeof B=="string"){var g=n._prime(B);this.m=g.p,this.prime=g}else r(B.gtn(1),"modulus must be greater than 1"),this.m=B,this.prime=null}z.prototype._verify1=function(g){r(g.negative===0,"red works only with positives"),r(g.red,"red works only with red numbers")},z.prototype._verify2=function(g,I){r((g.negative|I.negative)===0,"red works only with positives"),r(g.red&&g.red===I.red,"red works only with red numbers")},z.prototype.imod=function(g){return this.prime?this.prime.ireduce(g)._forceRed(this):g.umod(this.m)._forceRed(this)},z.prototype.neg=function(g){return g.isZero()?g.clone():this.m.sub(g)._forceRed(this)},z.prototype.add=function(g,I){this._verify2(g,I);var y=g.add(I);return y.cmp(this.m)>=0&&y.isub(this.m),y._forceRed(this)},z.prototype.iadd=function(g,I){this._verify2(g,I);var y=g.iadd(I);return y.cmp(this.m)>=0&&y.isub(this.m),y},z.prototype.sub=function(g,I){this._verify2(g,I);var y=g.sub(I);return y.cmpn(0)<0&&y.iadd(this.m),y._forceRed(this)},z.prototype.isub=function(g,I){this._verify2(g,I);var y=g.isub(I);return y.cmpn(0)<0&&y.iadd(this.m),y},z.prototype.shl=function(g,I){return this._verify1(g),this.imod(g.ushln(I))},z.prototype.imul=function(g,I){return this._verify2(g,I),this.imod(g.imul(I))},z.prototype.mul=function(g,I){return this._verify2(g,I),this.imod(g.mul(I))},z.prototype.isqr=function(g){return this.imul(g,g.clone())},z.prototype.sqr=function(g){return this.mul(g,g)},z.prototype.sqrt=function(g){if(g.isZero())return g.clone();var I=this.m.andln(3);if(r(I%2===1),I===3){var y=this.m.add(new n(1)).iushrn(2);return this.pow(g,y)}for(var f=this.m.subn(1),p=0;!f.isZero()&&f.andln(1)===0;)p++,f.iushrn(1);r(!f.isZero());var _=new n(1).toRed(this),x=_.redNeg(),b=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new n(2*d*d).toRed(this);this.pow(d,b).cmp(x)!==0;)d.redIAdd(x);for(var O=this.pow(d,f),T=this.pow(g,f.addn(1).iushrn(1)),S=this.pow(g,f),R=p;S.cmp(_)!==0;){for(var Y=S,X=0;Y.cmp(_)!==0;X++)Y=Y.redSqr();r(X<R);var ne=this.pow(O,new n(1).iushln(R-X-1));T=T.redMul(ne),O=ne.redSqr(),S=S.redMul(O),R=X}return T},z.prototype.invm=function(g){var I=g._invmp(this.m);return I.negative!==0?(I.negative=0,this.imod(I).redNeg()):this.imod(I)},z.prototype.pow=function(g,I){if(I.isZero())return new n(1).toRed(this);if(I.cmpn(1)===0)return g.clone();var y=4,f=new Array(1<<y);f[0]=new n(1).toRed(this),f[1]=g;for(var p=2;p<f.length;p++)f[p]=this.mul(f[p-1],g);var _=f[0],x=0,b=0,d=I.bitLength()%26;for(d===0&&(d=26),p=I.length-1;p>=0;p--){for(var O=I.words[p],T=d-1;T>=0;T--){var S=O>>T&1;if(_!==f[0]&&(_=this.sqr(_)),S===0&&x===0){b=0;continue}x<<=1,x|=S,b++,!(b!==y&&(p!==0||T!==0))&&(_=this.mul(_,f[x]),b=0,x=0)}d=26}return _},z.prototype.convertTo=function(g){var I=g.umod(this.m);return I===g?I.clone():I},z.prototype.convertFrom=function(g){var I=g.clone();return I.red=null,I},n.mont=function(g){return new V(g)};function V(B){z.call(this,B),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new n(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(V,z),V.prototype.convertTo=function(g){return this.imod(g.ushln(this.shift))},V.prototype.convertFrom=function(g){var I=this.imod(g.mul(this.rinv));return I.red=null,I},V.prototype.imul=function(g,I){if(g.isZero()||I.isZero())return g.words[0]=0,g.length=1,g;var y=g.imul(I),f=y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=y.isub(f).iushrn(this.shift),_=p;return p.cmp(this.m)>=0?_=p.isub(this.m):p.cmpn(0)<0&&(_=p.iadd(this.m)),_._forceRed(this)},V.prototype.mul=function(g,I){if(g.isZero()||I.isZero())return new n(0)._forceRed(this);var y=g.mul(I),f=y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=y.isub(f).iushrn(this.shift),_=p;return p.cmp(this.m)>=0?_=p.isub(this.m):p.cmpn(0)<0&&(_=p.iadd(this.m)),_._forceRed(this)},V.prototype.invm=function(g){var I=this.imod(g._invmp(this.m).mul(this.r2));return I._forceRed(this)}})(typeof tm>"u"||tm,EE)});var IE=k((x0e,nm)=>{v();var rm;nm.exports=function(t){return rm||(rm=new hs(null)),rm.generate(t)};function hs(e){this.rand=e}nm.exports.Rand=hs;hs.prototype.generate=function(t){return this._rand(t)};hs.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var r=new Uint8Array(t),i=0;i<r.length;i++)r[i]=this.rand.getByte();return r};if(typeof self=="object")self.crypto&&self.crypto.getRandomValues?hs.prototype._rand=function(t){var r=new Uint8Array(t);return self.crypto.getRandomValues(r),r}:self.msCrypto&&self.msCrypto.getRandomValues?hs.prototype._rand=function(t){var r=new Uint8Array(t);return self.msCrypto.getRandomValues(r),r}:typeof window=="object"&&(hs.prototype._rand=function(){throw new Error("Not implemented yet")});else try{if(im=_r(),typeof im.randomBytes!="function")throw new Error("Not supported");hs.prototype._rand=function(t){return im.randomBytes(t)}}catch{}var im});var om=k((I0e,OE)=>{v();var Hu=Cn(),EW=IE();function ju(e){this.rand=e||new EW.Rand}OE.exports=ju;ju.create=function(t){return new ju(t)};ju.prototype._randbelow=function(t){var r=t.bitLength(),i=Math.ceil(r/8);do var n=new Hu(this.rand.generate(i));while(n.cmp(t)>=0);return n};ju.prototype._randrange=function(t,r){var i=r.sub(t);return t.add(this._randbelow(i))};ju.prototype.test=function(t,r,i){var n=t.bitLength(),o=Hu.mont(t),a=new Hu(1).toRed(o);r||(r=Math.max(1,n/48|0));for(var s=t.subn(1),u=0;!s.testn(u);u++);for(var c=t.shrn(u),l=s.toRed(o),m=!0;r>0;r--){var w=this._randrange(new Hu(2),s);i&&i(w);var E=w.toRed(o).redPow(c);if(!(E.cmp(a)===0||E.cmp(l)===0)){for(var P=1;P<u;P++){if(E=E.redSqr(),E.cmp(a)===0)return!1;if(E.cmp(l)===0)break}if(P===u)return!1}}return m};ju.prototype.getDivisor=function(t,r){var i=t.bitLength(),n=Hu.mont(t),o=new Hu(1).toRed(n);r||(r=Math.max(1,i/48|0));for(var a=t.subn(1),s=0;!a.testn(s);s++);for(var u=t.shrn(s),c=a.toRed(n);r>0;r--){var l=this._randrange(new Hu(2),a),m=t.gcd(l);if(m.cmpn(1)!==0)return m;var w=l.toRed(n).redPow(u);if(!(w.cmp(o)===0||w.cmp(c)===0)){for(var E=1;E<s;E++){if(w=w.redSqr(),w.cmp(o)===0)return w.fromRed().subn(1).gcd(t);if(w.cmp(c)===0)break}if(E===s)return w=w.redSqr(),w.fromRed().subn(1).gcd(t)}}return!1}});var lm=k((R0e,TE)=>{v();var IW=bu();TE.exports=cm;cm.simpleSieve=um;cm.fermatTest=fm;var Jr=Cn(),OW=new Jr(24),AW=om(),AE=new AW,PW=new Jr(1),sm=new Jr(2),TW=new Jr(5),A0e=new Jr(16),P0e=new Jr(8),kW=new Jr(10),RW=new Jr(3),T0e=new Jr(7),BW=new Jr(11),PE=new Jr(4),k0e=new Jr(12),am=null;function MW(){if(am!==null)return am;var e=1048576,t=[];t[0]=2;for(var r=1,i=3;i<e;i+=2){for(var n=Math.ceil(Math.sqrt(i)),o=0;o<r&&t[o]<=n&&i%t[o]!==0;o++);r!==o&&t[o]<=n||(t[r++]=i)}return am=t,t}function um(e){for(var t=MW(),r=0;r<t.length;r++)if(e.modn(t[r])===0)return e.cmpn(t[r])===0;return!0}function fm(e){var t=Jr.mont(e);return sm.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1)===0}function cm(e,t){if(e<16)return t===2||t===5?new Jr([140,123]):new Jr([140,39]);t=new Jr(t);for(var r,i;;){for(r=new Jr(IW(Math.ceil(e/8)));r.bitLength()>e;)r.ishrn(1);if(r.isEven()&&r.iadd(PW),r.testn(1)||r.iadd(sm),t.cmp(sm)){if(!t.cmp(TW))for(;r.mod(kW).cmp(RW);)r.iadd(PE)}else for(;r.mod(OW).cmp(BW);)r.iadd(PE);if(i=r.shrn(1),um(i)&&um(r)&&fm(i)&&fm(r)&&AE.test(i)&&AE.test(r))return r}}});var kE=k((M0e,CW)=>{CW.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}});var CE=k((C0e,ME)=>{v();var fn=Cn(),NW=om(),RE=new NW,DW=new fn(24),LW=new fn(11),qW=new fn(10),UW=new fn(3),FW=new fn(7),BE=lm(),HW=bu();ME.exports=wa;function jW(e,t){return t=t||"utf8",h.Buffer.isBuffer(e)||(e=new h.Buffer(e,t)),this._pub=new fn(e),this}function zW(e,t){return t=t||"utf8",h.Buffer.isBuffer(e)||(e=new h.Buffer(e,t)),this._priv=new fn(e),this}var L2={};function KW(e,t){var r=t.toString("hex"),i=[r,e.toString(16)].join("_");if(i in L2)return L2[i];var n=0;if(e.isEven()||!BE.simpleSieve||!BE.fermatTest(e)||!RE.test(e))return n+=1,r==="02"||r==="05"?n+=8:n+=4,L2[i]=n,n;RE.test(e.shrn(1))||(n+=2);var o;switch(r){case"02":e.mod(DW).cmp(LW)&&(n+=8);break;case"05":o=e.mod(qW),o.cmp(UW)&&o.cmp(FW)&&(n+=8);break;default:n+=4}return L2[i]=n,n}function wa(e,t,r){this.setGenerator(t),this.__prime=new fn(e),this._prime=fn.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=jW,this.setPrivateKey=zW):this._primeCode=8}Object.defineProperty(wa.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=KW(this.__prime,this.__gen)),this._primeCode}});wa.prototype.generateKeys=function(){return this._priv||(this._priv=new fn(HW(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()};wa.prototype.computeSecret=function(e){e=new fn(e),e=e.toRed(this._prime);var t=e.redPow(this._priv).fromRed(),r=new h.Buffer(t.toArray()),i=this.getPrime();if(r.length<i.length){var n=new h.Buffer(i.length-r.length);n.fill(0),r=h.Buffer.concat([n,r])}return r};wa.prototype.getPublicKey=function(t){return q2(this._pub,t)};wa.prototype.getPrivateKey=function(t){return q2(this._priv,t)};wa.prototype.getPrime=function(e){return q2(this.__prime,e)};wa.prototype.getGenerator=function(e){return q2(this._gen,e)};wa.prototype.setGenerator=function(e,t){return t=t||"utf8",h.Buffer.isBuffer(e)||(e=new h.Buffer(e,t)),this.__gen=e,this._gen=new fn(e),this};function q2(e,t){var r=new h.Buffer(e.toArray());return t?r.toString(t):r}});var LE=k(Ic=>{v();var VW=lm(),NE=kE(),hm=CE();function GW(e){var t=new h.Buffer(NE[e].prime,"hex"),r=new h.Buffer(NE[e].gen,"hex");return new hm(t,r)}var ZW={binary:!0,hex:!0,base64:!0};function DE(e,t,r,i){return h.Buffer.isBuffer(t)||ZW[t]===void 0?DE(e,"binary",t,r):(t=t||"binary",i=i||"binary",r=r||new h.Buffer([2]),h.Buffer.isBuffer(r)||(r=new h.Buffer(r,i)),typeof e=="number"?new hm(VW(e,r),r,!0):(h.Buffer.isBuffer(e)||(e=new h.Buffer(e,t)),new hm(e,r,!0)))}Ic.DiffieHellmanGroup=Ic.createDiffieHellmanGroup=Ic.getDiffieHellman=GW;Ic.createDiffieHellman=Ic.DiffieHellman=DE});var qE=k((exports,module)=>{v();var indexOf=function(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0;r<e.length;r++)if(e[r]===t)return r;return-1},Object_keys=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var r in e)t.push(r);return t},forEach=function(e,t){if(e.forEach)return e.forEach(t);for(var r=0;r<e.length;r++)t(e[r],r,e)},defineProp=(function(){try{return Object.defineProperty({},"_",{}),function(e,t,r){Object.defineProperty(e,t,{writable:!0,enumerable:!1,configurable:!0,value:r})}}catch{return function(t,r,i){t[r]=i}}})(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports.Script=function(t){if(!(this instanceof Script))return new Script(t);this.code=t};Script.prototype.runInContext=function(e){if(!(e instanceof Context))throw new TypeError("needs a 'context' argument.");var t=document.createElement("iframe");t.style||(t.style={}),t.style.display="none",document.body.appendChild(t);var r=t.contentWindow,i=r.eval,n=r.execScript;!i&&n&&(n.call(r,"null"),i=r.eval),forEach(Object_keys(e),function(s){r[s]=e[s]}),forEach(globals,function(s){e[s]&&(r[s]=e[s])});var o=Object_keys(r),a=i.call(r,this.code);return forEach(Object_keys(r),function(s){(s in e||indexOf(o,s)===-1)&&(e[s]=r[s])}),forEach(globals,function(s){s in e||defineProp(e,s,r[s])}),document.body.removeChild(t),a};Script.prototype.runInThisContext=function(){return eval(this.code)};Script.prototype.runInNewContext=function(e){var t=Script.createContext(e),r=this.runInContext(t);return e&&forEach(Object_keys(t),function(i){e[i]=t[i]}),r};forEach(Object_keys(Script.prototype),function(e){exports[e]=Script[e]=function(t){var r=Script(t);return r[e].apply(r,[].slice.call(arguments,1))}});exports.isContext=function(e){return e instanceof Context};exports.createScript=function(e){return exports.Script(e)};exports.createContext=Script.createContext=function(e){var t=new Context;return typeof e=="object"&&forEach(Object_keys(e),function(r){t[r]=e[r]}),t}});var HE=k(FE=>{v();var UE=Ac(),WW=Te(),YW=FE;YW.define=function(t,r){return new Oc(t,r)};function Oc(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}Oc.prototype._createNamed=function(t){var r;try{r=qE().runInThisContext("(function "+this.name+`(entity) {
|
|
12
12
|
this._initNamed(entity);
|
|
13
|
-
})`)}catch{r=function(n){this._initNamed(n)}}return WW(r,t),r.prototype._initNamed=function(n){t.call(this,n)},new r(this)};Oc.prototype._getDecoder=function(t){return t=t||"der",this.decoders.hasOwnProperty(t)||(this.decoders[t]=this._createNamed(UE.decoders[t])),this.decoders[t]};Oc.prototype.decode=function(t,r,i){return this._getDecoder(r).decode(t,i)};Oc.prototype._getEncoder=function(t){return t=t||"der",this.encoders.hasOwnProperty(t)||(this.encoders[t]=this._createNamed(UE.encoders[t])),this.encoders[t]};Oc.prototype.encode=function(t,r,i){return this._getEncoder(r).encode(t,i)}});var zE=k(jE=>{v();var $W=Pe();function cn(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}jE.Reporter=cn;cn.prototype.isError=function(t){return t instanceof Pc};cn.prototype.save=function(){var t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}};cn.prototype.restore=function(t){var r=this._reporterState;r.obj=t.obj,r.path=r.path.slice(0,t.pathLen)};cn.prototype.enterKey=function(t){return this._reporterState.path.push(t)};cn.prototype.exitKey=function(t){var r=this._reporterState;r.path=r.path.slice(0,t-1)};cn.prototype.leaveKey=function(t,r,i){var n=this._reporterState;this.exitKey(t),n.obj!==null&&(n.obj[r]=i)};cn.prototype.path=function(){return this._reporterState.path.join("/")};cn.prototype.enterObject=function(){var t=this._reporterState,r=t.obj;return t.obj={},r};cn.prototype.leaveObject=function(t){var r=this._reporterState,i=r.obj;return r.obj=t,i};cn.prototype.error=function(t){var r,i=this._reporterState,n=t instanceof Pc;if(n?r=t:r=new Pc(i.path.map(function(o){return"["+JSON.stringify(o)+"]"}).join(""),t.message||t,t.stack),!i.options.partial)throw r;return n||i.errors.push(r),r};cn.prototype.wrapResult=function(t){var r=this._reporterState;return r.options.partial?{result:this.isError(t)?null:t,errors:r.errors}:t};function Pc(e,t){this.path=e,this.rethrow(t)}$W(Pc,Error);Pc.prototype.rethrow=function(t){if(this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,Pc),!this.stack)try{throw new Error(this.message)}catch(r){this.stack=r.stack}return this}});var pm=k(dm=>{v();var XW=Pe(),F2=Tc().Reporter,Jh=Kt().Buffer;function xo(e,t){if(F2.call(this,t),!Jh.isBuffer(e)){this.error("Input not Buffer");return}this.base=e,this.offset=0,this.length=e.length}XW(xo,F2);dm.DecoderBuffer=xo;xo.prototype.save=function(){return{offset:this.offset,reporter:F2.prototype.save.call(this)}};xo.prototype.restore=function(t){var r=new xo(this.base);return r.offset=t.offset,r.length=this.offset,this.offset=t.offset,F2.prototype.restore.call(this,t.reporter),r};xo.prototype.isEmpty=function(){return this.offset===this.length};xo.prototype.readUInt8=function(t){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(t||"DecoderBuffer overrun")};xo.prototype.skip=function(t,r){if(!(this.offset+t<=this.length))return this.error(r||"DecoderBuffer overrun");var i=new xo(this.base);return i._reporterState=this._reporterState,i.offset=this.offset,i.length=this.offset+t,this.offset+=t,i};xo.prototype.raw=function(t){return this.base.slice(t?t.offset:this.offset,this.length)};function U2(e,t){if(Array.isArray(e))this.length=0,this.value=e.map(function(r){return r instanceof U2||(r=new U2(r,t)),this.length+=r.length,r},this);else if(typeof e=="number"){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if(typeof e=="string")this.value=e,this.length=Jh.byteLength(e);else if(Jh.isBuffer(e))this.value=e,this.length=e.length;else return t.error("Unsupported type: "+typeof e)}dm.EncoderBuffer=U2;U2.prototype.join=function(t,r){return t||(t=new Jh(this.length)),r||(r=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(i){i.join(t,r),r+=i.length}):(typeof this.value=="number"?t[r]=this.value:typeof this.value=="string"?t.write(this.value,r):Jh.isBuffer(this.value)&&this.value.copy(t,r),r+=this.length)),t}});var GE=k((V0e,VE)=>{v();var JW=Tc().Reporter,QW=Tc().EncoderBuffer,eY=Tc().DecoderBuffer,yi=Rn(),KE=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],tY=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(KE),rY=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function Lt(e,t){var r={};this._baseState=r,r.enc=e,r.parent=t||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}VE.exports=Lt;var iY=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];Lt.prototype.clone=function(){var t=this._baseState,r={};iY.forEach(function(n){r[n]=t[n]});var i=new this.constructor(r.parent);return i._baseState=r,i};Lt.prototype._wrap=function(){var t=this._baseState;tY.forEach(function(r){this[r]=function(){var n=new this.constructor(this);return t.children.push(n),n[r].apply(n,arguments)}},this)};Lt.prototype._init=function(t){var r=this._baseState;yi(r.parent===null),t.call(this),r.children=r.children.filter(function(i){return i._baseState.parent===this},this),yi.equal(r.children.length,1,"Root node can have only one child")};Lt.prototype._useArgs=function(t){var r=this._baseState,i=t.filter(function(n){return n instanceof this.constructor},this);t=t.filter(function(n){return!(n instanceof this.constructor)},this),i.length!==0&&(yi(r.children===null),r.children=i,i.forEach(function(n){n._baseState.parent=this},this)),t.length!==0&&(yi(r.args===null),r.args=t,r.reverseArgs=t.map(function(n){if(typeof n!="object"||n.constructor!==Object)return n;var o={};return Object.keys(n).forEach(function(a){a==(a|0)&&(a|=0);var s=n[a];o[s]=a}),o}))};rY.forEach(function(e){Lt.prototype[e]=function(){var r=this._baseState;throw new Error(e+" not implemented for encoding: "+r.enc)}});KE.forEach(function(e){Lt.prototype[e]=function(){var r=this._baseState,i=Array.prototype.slice.call(arguments);return yi(r.tag===null),r.tag=e,this._useArgs(i),this}});Lt.prototype.use=function(t){yi(t);var r=this._baseState;return yi(r.use===null),r.use=t,this};Lt.prototype.optional=function(){var t=this._baseState;return t.optional=!0,this};Lt.prototype.def=function(t){var r=this._baseState;return yi(r.default===null),r.default=t,r.optional=!0,this};Lt.prototype.explicit=function(t){var r=this._baseState;return yi(r.explicit===null&&r.implicit===null),r.explicit=t,this};Lt.prototype.implicit=function(t){var r=this._baseState;return yi(r.explicit===null&&r.implicit===null),r.implicit=t,this};Lt.prototype.obj=function(){var t=this._baseState,r=Array.prototype.slice.call(arguments);return t.obj=!0,r.length!==0&&this._useArgs(r),this};Lt.prototype.key=function(t){var r=this._baseState;return yi(r.key===null),r.key=t,this};Lt.prototype.any=function(){var t=this._baseState;return t.any=!0,this};Lt.prototype.choice=function(t){var r=this._baseState;return yi(r.choice===null),r.choice=t,this._useArgs(Object.keys(t).map(function(i){return t[i]})),this};Lt.prototype.contains=function(t){var r=this._baseState;return yi(r.use===null),r.contains=t,this};Lt.prototype._decode=function(t,r){var i=this._baseState;if(i.parent===null)return t.wrapResult(i.children[0]._decode(t,r));var n=i.default,o=!0,a=null;if(i.key!==null&&(a=t.enterKey(i.key)),i.optional){var s=null;if(i.explicit!==null?s=i.explicit:i.implicit!==null?s=i.implicit:i.tag!==null&&(s=i.tag),s===null&&!i.any){var u=t.save();try{i.choice===null?this._decodeGeneric(i.tag,t,r):this._decodeChoice(t,r),o=!0}catch{o=!1}t.restore(u)}else if(o=this._peekTag(t,s,i.any),t.isError(o))return o}var c;if(i.obj&&o&&(c=t.enterObject()),o){if(i.explicit!==null){var l=this._decodeTag(t,i.explicit);if(t.isError(l))return l;t=l}var m=t.offset;if(i.use===null&&i.choice===null){if(i.any)var u=t.save();var w=this._decodeTag(t,i.implicit!==null?i.implicit:i.tag,i.any);if(t.isError(w))return w;i.any?n=t.raw(u):t=w}if(r&&r.track&&i.tag!==null&&r.track(t.path(),m,t.length,"tagged"),r&&r.track&&i.tag!==null&&r.track(t.path(),t.offset,t.length,"content"),i.any?n=n:i.choice===null?n=this._decodeGeneric(i.tag,t,r):n=this._decodeChoice(t,r),t.isError(n))return n;if(!i.any&&i.choice===null&&i.children!==null&&i.children.forEach(function(M){M._decode(t,r)}),i.contains&&(i.tag==="octstr"||i.tag==="bitstr")){var E=new eY(n);n=this._getUse(i.contains,t._reporterState.obj)._decode(E,r)}}return i.obj&&o&&(n=t.leaveObject(c)),i.key!==null&&(n!==null||o===!0)?t.leaveKey(a,i.key,n):a!==null&&t.exitKey(a),n};Lt.prototype._decodeGeneric=function(t,r,i){var n=this._baseState;return t==="seq"||t==="set"?null:t==="seqof"||t==="setof"?this._decodeList(r,t,n.args[0],i):/str$/.test(t)?this._decodeStr(r,t,i):t==="objid"&&n.args?this._decodeObjid(r,n.args[0],n.args[1],i):t==="objid"?this._decodeObjid(r,null,null,i):t==="gentime"||t==="utctime"?this._decodeTime(r,t,i):t==="null_"?this._decodeNull(r,i):t==="bool"?this._decodeBool(r,i):t==="objDesc"?this._decodeStr(r,t,i):t==="int"||t==="enum"?this._decodeInt(r,n.args&&n.args[0],i):n.use!==null?this._getUse(n.use,r._reporterState.obj)._decode(r,i):r.error("unknown tag: "+t)};Lt.prototype._getUse=function(t,r){var i=this._baseState;return i.useDecoder=this._use(t,r),yi(i.useDecoder._baseState.parent===null),i.useDecoder=i.useDecoder._baseState.children[0],i.implicit!==i.useDecoder._baseState.implicit&&(i.useDecoder=i.useDecoder.clone(),i.useDecoder._baseState.implicit=i.implicit),i.useDecoder};Lt.prototype._decodeChoice=function(t,r){var i=this._baseState,n=null,o=!1;return Object.keys(i.choice).some(function(a){var s=t.save(),u=i.choice[a];try{var c=u._decode(t,r);if(t.isError(c))return!1;n={type:a,value:c},o=!0}catch{return t.restore(s),!1}return!0},this),o?n:t.error("Choice not matched")};Lt.prototype._createEncoderBuffer=function(t){return new QW(t,this.reporter)};Lt.prototype._encode=function(t,r,i){var n=this._baseState;if(!(n.default!==null&&n.default===t)){var o=this._encodeValue(t,r,i);if(o!==void 0&&!this._skipDefault(o,r,i))return o}};Lt.prototype._encodeValue=function(t,r,i){var n=this._baseState;if(n.parent===null)return n.children[0]._encode(t,r||new JW);var u=null;if(this.reporter=r,n.optional&&t===void 0)if(n.default!==null)t=n.default;else return;var o=null,a=!1;if(n.any)u=this._createEncoderBuffer(t);else if(n.choice)u=this._encodeChoice(t,r);else if(n.contains)o=this._getUse(n.contains,i)._encode(t,r),a=!0;else if(n.children)o=n.children.map(function(m){if(m._baseState.tag==="null_")return m._encode(null,r,t);if(m._baseState.key===null)return r.error("Child should have a key");var w=r.enterKey(m._baseState.key);if(typeof t!="object")return r.error("Child expected, but input is not object");var E=m._encode(t[m._baseState.key],r,t);return r.leaveKey(w),E},this).filter(function(m){return m}),o=this._createEncoderBuffer(o);else if(n.tag==="seqof"||n.tag==="setof"){if(!(n.args&&n.args.length===1))return r.error("Too many args for : "+n.tag);if(!Array.isArray(t))return r.error("seqof/setof, but data is not Array");var s=this.clone();s._baseState.implicit=null,o=this._createEncoderBuffer(t.map(function(m){var w=this._baseState;return this._getUse(w.args[0],t)._encode(m,r)},s))}else n.use!==null?u=this._getUse(n.use,i)._encode(t,r):(o=this._encodePrimitive(n.tag,t),a=!0);var u;if(!n.any&&n.choice===null){var c=n.implicit!==null?n.implicit:n.tag,l=n.implicit===null?"universal":"context";c===null?n.use===null&&r.error("Tag could be omitted only for .use()"):n.use===null&&(u=this._encodeComposite(c,a,l,o))}return n.explicit!==null&&(u=this._encodeComposite(n.explicit,!1,"context",u)),u};Lt.prototype._encodeChoice=function(t,r){var i=this._baseState,n=i.choice[t.type];return n||yi(!1,t.type+" not found in "+JSON.stringify(Object.keys(i.choice))),n._encode(t.value,r)};Lt.prototype._encodePrimitive=function(t,r){var i=this._baseState;if(/str$/.test(t))return this._encodeStr(r,t);if(t==="objid"&&i.args)return this._encodeObjid(r,i.reverseArgs[0],i.args[1]);if(t==="objid")return this._encodeObjid(r,null,null);if(t==="gentime"||t==="utctime")return this._encodeTime(r,t);if(t==="null_")return this._encodeNull();if(t==="int"||t==="enum")return this._encodeInt(r,i.args&&i.reverseArgs[0]);if(t==="bool")return this._encodeBool(r);if(t==="objDesc")return this._encodeStr(r,t);throw new Error("Unsupported tag: "+t)};Lt.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)};Lt.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(t)}});var Tc=k(ZE=>{v();var H2=ZE;H2.Reporter=zE().Reporter;H2.DecoderBuffer=pm().DecoderBuffer;H2.EncoderBuffer=pm().EncoderBuffer;H2.Node=GE()});var YE=k(zu=>{v();var WE=gm();zu.tagClass={0:"universal",1:"application",2:"context",3:"private"};zu.tagClassByName=WE._reverse(zu.tagClass);zu.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"};zu.tagByName=WE._reverse(zu.tag)});var gm=k(XE=>{v();var $E=XE;$E._reverse=function(t){var r={};return Object.keys(t).forEach(function(i){(i|0)==i&&(i=i|0);var n=t[i];r[n]=i}),r};$E.der=YE()});var ym=k((Q0e,tI)=>{v();var nY=Pe(),vm=Ac(),j2=vm.base,oY=vm.bignum,JE=vm.constants.der;function QE(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new qi,this.tree._init(e.body)}tI.exports=QE;QE.prototype.decode=function(t,r){return t instanceof j2.DecoderBuffer||(t=new j2.DecoderBuffer(t,r)),this.tree._decode(t,r)};function qi(e){j2.Node.call(this,"der",e)}nY(qi,j2.Node);qi.prototype._peekTag=function(t,r,i){if(t.isEmpty())return!1;var n=t.save(),o=mm(t,'Failed to peek tag: "'+r+'"');return t.isError(o)?o:(t.restore(n),o.tag===r||o.tagStr===r||o.tagStr+"of"===r||i)};qi.prototype._decodeTag=function(t,r,i){var n=mm(t,'Failed to decode tag of "'+r+'"');if(t.isError(n))return n;var o=eI(t,n.primitive,'Failed to get length of "'+r+'"');if(t.isError(o))return o;if(!i&&n.tag!==r&&n.tagStr!==r&&n.tagStr+"of"!==r)return t.error('Failed to match tag: "'+r+'"');if(n.primitive||o!==null)return t.skip(o,'Failed to match body of: "'+r+'"');var a=t.save(),s=this._skipUntilEnd(t,'Failed to skip indefinite length body: "'+this.tag+'"');return t.isError(s)?s:(o=t.offset-a.offset,t.restore(a),t.skip(o,'Failed to match body of: "'+r+'"'))};qi.prototype._skipUntilEnd=function(t,r){for(;;){var i=mm(t,r);if(t.isError(i))return i;var n=eI(t,i.primitive,r);if(t.isError(n))return n;var o;if(i.primitive||n!==null?o=t.skip(n):o=this._skipUntilEnd(t,r),t.isError(o))return o;if(i.tagStr==="end")break}};qi.prototype._decodeList=function(t,r,i,n){for(var o=[];!t.isEmpty();){var a=this._peekTag(t,"end");if(t.isError(a))return a;var s=i.decode(t,"der",n);if(t.isError(s)&&a)break;o.push(s)}return o};qi.prototype._decodeStr=function(t,r){if(r==="bitstr"){var i=t.readUInt8();return t.isError(i)?i:{unused:i,data:t.raw()}}else if(r==="bmpstr"){var n=t.raw();if(n.length%2===1)return t.error("Decoding of string type: bmpstr length mismatch");for(var o="",a=0;a<n.length/2;a++)o+=String.fromCharCode(n.readUInt16BE(a*2));return o}else if(r==="numstr"){var s=t.raw().toString("ascii");return this._isNumstr(s)?s:t.error("Decoding of string type: numstr unsupported characters")}else{if(r==="octstr")return t.raw();if(r==="objDesc")return t.raw();if(r==="printstr"){var u=t.raw().toString("ascii");return this._isPrintstr(u)?u:t.error("Decoding of string type: printstr unsupported characters")}else return/str$/.test(r)?t.raw().toString():t.error("Decoding of string type: "+r+" unsupported")}};qi.prototype._decodeObjid=function(t,r,i){for(var n,o=[],a=0;!t.isEmpty();){var s=t.readUInt8();a<<=7,a|=s&127,(s&128)===0&&(o.push(a),a=0)}s&128&&o.push(a);var u=o[0]/40|0,c=o[0]%40;if(i?n=o:n=[u,c].concat(o.slice(1)),r){var l=r[n.join(" ")];l===void 0&&(l=r[n.join(".")]),l!==void 0&&(n=l)}return n};qi.prototype._decodeTime=function(t,r){var i=t.raw().toString();if(r==="gentime")var n=i.slice(0,4)|0,o=i.slice(4,6)|0,a=i.slice(6,8)|0,s=i.slice(8,10)|0,u=i.slice(10,12)|0,c=i.slice(12,14)|0;else if(r==="utctime"){var n=i.slice(0,2)|0,o=i.slice(2,4)|0,a=i.slice(4,6)|0,s=i.slice(6,8)|0,u=i.slice(8,10)|0,c=i.slice(10,12)|0;n<70?n=2e3+n:n=1900+n}else return t.error("Decoding "+r+" time is not supported yet");return Date.UTC(n,o-1,a,s,u,c,0)};qi.prototype._decodeNull=function(t){return null};qi.prototype._decodeBool=function(t){var r=t.readUInt8();return t.isError(r)?r:r!==0};qi.prototype._decodeInt=function(t,r){var i=t.raw(),n=new oY(i);return r&&(n=r[n.toString(10)]||n),n};qi.prototype._use=function(t,r){return typeof t=="function"&&(t=t(r)),t._getDecoder("der").tree};function mm(e,t){var r=e.readUInt8(t);if(e.isError(r))return r;var i=JE.tagClass[r>>6],n=(r&32)===0;if((r&31)===31){var o=r;for(r=0;(o&128)===128;){if(o=e.readUInt8(t),e.isError(o))return o;r<<=7,r|=o&127}}else r&=31;var a=JE.tag[r];return{cls:i,primitive:n,tag:r,tagStr:a}}function eI(e,t,r){var i=e.readUInt8(r);if(e.isError(i))return i;if(!t&&i===128)return null;if((i&128)===0)return i;var n=i&127;if(n>4)return e.error("length octect is too long");i=0;for(var o=0;o<n;o++){i<<=8;var a=e.readUInt8(r);if(e.isError(a))return a;i|=a}return i}});var iI=k((t1e,rI)=>{v();var aY=Pe(),sY=Kt().Buffer,bm=ym();function _m(e){bm.call(this,e),this.enc="pem"}aY(_m,bm);rI.exports=_m;_m.prototype.decode=function(t,r){for(var i=t.toString().split(/[\r\n]+/g),n=r.label.toUpperCase(),o=/^-----(BEGIN|END) ([^-]+)-----$/,a=-1,s=-1,u=0;u<i.length;u++){var c=i[u].match(o);if(c!==null&&c[2]===n)if(a===-1){if(c[1]!=="BEGIN")break;a=u}else{if(c[1]!=="END")break;s=u;break}}if(a===-1||s===-1)throw new Error("PEM section not found for: "+n);var l=i.slice(a+1,s).join("");l.replace(/[^a-z0-9\+\/=]+/gi,"");var m=new sY(l,"base64");return bm.prototype.decode.call(this,m,r)}});var aI=k(oI=>{v();var nI=oI;nI.der=ym();nI.pem=iI()});var Sm=k((o1e,cI)=>{v();var uY=Pe(),Sa=Kt().Buffer,sI=Ac(),uI=sI.base,wm=sI.constants.der;function fI(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new Nn,this.tree._init(e.body)}cI.exports=fI;fI.prototype.encode=function(t,r){return this.tree._encode(t,r).join()};function Nn(e){uI.Node.call(this,"der",e)}uY(Nn,uI.Node);Nn.prototype._encodeComposite=function(t,r,i,n){var o=fY(t,r,i,this.reporter);if(n.length<128){var u=new Sa(2);return u[0]=o,u[1]=n.length,this._createEncoderBuffer([u,n])}for(var a=1,s=n.length;s>=256;s>>=8)a++;var u=new Sa(2+a);u[0]=o,u[1]=128|a;for(var s=1+a,c=n.length;c>0;s--,c>>=8)u[s]=c&255;return this._createEncoderBuffer([u,n])};Nn.prototype._encodeStr=function(t,r){if(r==="bitstr")return this._createEncoderBuffer([t.unused|0,t.data]);if(r==="bmpstr"){for(var i=new Sa(t.length*2),n=0;n<t.length;n++)i.writeUInt16BE(t.charCodeAt(n),n*2);return this._createEncoderBuffer(i)}else return r==="numstr"?this._isNumstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: numstr supports only digits and space"):r==="printstr"?this._isPrintstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(r)?this._createEncoderBuffer(t):r==="objDesc"?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: "+r+" unsupported")};Nn.prototype._encodeObjid=function(t,r,i){if(typeof t=="string"){if(!r)return this.reporter.error("string objid given, but no values map found");if(!r.hasOwnProperty(t))return this.reporter.error("objid not found in values map");t=r[t].split(/[\s\.]+/g);for(var n=0;n<t.length;n++)t[n]|=0}else if(Array.isArray(t)){t=t.slice();for(var n=0;n<t.length;n++)t[n]|=0}if(!Array.isArray(t))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(t));if(!i){if(t[1]>=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,t[0]*40+t[1])}for(var o=0,n=0;n<t.length;n++){var a=t[n];for(o++;a>=128;a>>=7)o++}for(var s=new Sa(o),u=s.length-1,n=t.length-1;n>=0;n--){var a=t[n];for(s[u--]=a&127;(a>>=7)>0;)s[u--]=128|a&127}return this._createEncoderBuffer(s)};function ln(e){return e<10?"0"+e:e}Nn.prototype._encodeTime=function(t,r){var i,n=new Date(t);return r==="gentime"?i=[ln(n.getFullYear()),ln(n.getUTCMonth()+1),ln(n.getUTCDate()),ln(n.getUTCHours()),ln(n.getUTCMinutes()),ln(n.getUTCSeconds()),"Z"].join(""):r==="utctime"?i=[ln(n.getFullYear()%100),ln(n.getUTCMonth()+1),ln(n.getUTCDate()),ln(n.getUTCHours()),ln(n.getUTCMinutes()),ln(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+r+" time is not supported yet"),this._encodeStr(i,"octstr")};Nn.prototype._encodeNull=function(){return this._createEncoderBuffer("")};Nn.prototype._encodeInt=function(t,r){if(typeof t=="string"){if(!r)return this.reporter.error("String int or enum given, but no values map");if(!r.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=r[t]}if(typeof t!="number"&&!Sa.isBuffer(t)){var i=t.toArray();!t.sign&&i[0]&128&&i.unshift(0),t=new Sa(i)}if(Sa.isBuffer(t)){var n=t.length;t.length===0&&n++;var a=new Sa(n);return t.copy(a),t.length===0&&(a[0]=0),this._createEncoderBuffer(a)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);for(var n=1,o=t;o>=256;o>>=8)n++;for(var a=new Array(n),o=a.length-1;o>=0;o--)a[o]=t&255,t>>=8;return a[0]&128&&a.unshift(0),this._createEncoderBuffer(new Sa(a))};Nn.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)};Nn.prototype._use=function(t,r){return typeof t=="function"&&(t=t(r)),t._getEncoder("der").tree};Nn.prototype._skipDefault=function(t,r,i){var n=this._baseState,o;if(n.default===null)return!1;var a=t.join();if(n.defaultBuffer===void 0&&(n.defaultBuffer=this._encodeValue(n.default,r,i).join()),a.length!==n.defaultBuffer.length)return!1;for(o=0;o<a.length;o++)if(a[o]!==n.defaultBuffer[o])return!1;return!0};function fY(e,t,r,i){var n;if(e==="seqof"?e="seq":e==="setof"&&(e="set"),wm.tagByName.hasOwnProperty(e))n=wm.tagByName[e];else if(typeof e=="number"&&(e|0)===e)n=e;else return i.error("Unknown tag: "+e);return n>=31?i.error("Multi-octet tag encoding unsupported"):(t||(n|=32),n|=wm.tagClassByName[r||"universal"]<<6,n)}});var hI=k((s1e,lI)=>{v();var cY=Pe(),xm=Sm();function Em(e){xm.call(this,e),this.enc="pem"}cY(Em,xm);lI.exports=Em;Em.prototype.encode=function(t,r){for(var i=xm.prototype.encode.call(this,t),n=i.toString("base64"),o=["-----BEGIN "+r.label+"-----"],a=0;a<n.length;a+=64)o.push(n.slice(a,a+64));return o.push("-----END "+r.label+"-----"),o.join(`
|
|
14
|
-
`)}});var gI=k(pI=>{v();var dI=pI;dI.der=Sm();dI.pem=hI()});var Ac=k(vI=>{v();var kc=vI;kc.bignum=Cn();kc.define=HE().define;kc.base=Tc();kc.constants=gm();kc.decoders=aI();kc.encoders=gI()});var _I=k((d1e,bI)=>{"use strict";v();var Dn=Ac(),mI=Dn.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),lY=Dn.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),Im=Dn.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),hY=Dn.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(Im),this.key("subjectPublicKey").bitstr())}),dY=Dn.define("RelativeDistinguishedName",function(){this.setof(lY)}),pY=Dn.define("RDNSequence",function(){this.seqof(dY)}),yI=Dn.define("Name",function(){this.choice({rdnSequence:this.use(pY)})}),gY=Dn.define("Validity",function(){this.seq().obj(this.key("notBefore").use(mI),this.key("notAfter").use(mI))}),vY=Dn.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),mY=Dn.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(Im),this.key("issuer").use(yI),this.key("validity").use(gY),this.key("subject").use(yI),this.key("subjectPublicKeyInfo").use(hY),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(vY).optional())}),yY=Dn.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(mY),this.key("signatureAlgorithm").use(Im),this.key("signatureValue").bitstr())});bI.exports=yY});var SI=k(qn=>{"use strict";v();var Ln=Ac();qn.certificate=_I();var bY=Ln.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});qn.RSAPrivateKey=bY;var _Y=Ln.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});qn.RSAPublicKey=_Y;var wI=Ln.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),wY=Ln.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(wI),this.key("subjectPublicKey").bitstr())});qn.PublicKey=wY;var SY=Ln.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(wI),this.key("subjectPrivateKey").octstr())});qn.PrivateKey=SY;var xY=Ln.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});qn.EncryptedPrivateKey=xY;var EY=Ln.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});qn.DSAPrivateKey=EY;qn.DSAparam=Ln.define("DSAparam",function(){this.int()});var IY=Ln.define("ECParameters",function(){this.choice({namedCurve:this.objid()})}),OY=Ln.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(IY),this.key("publicKey").optional().explicit(1).bitstr())});qn.ECPrivateKey=OY;qn.signature=Ln.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})});var xI=k((m1e,AY)=>{AY.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}});var II=k((y1e,EI)=>{"use strict";v();var PY=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,TY=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,kY=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,RY=Yh(),BY=D2(),z2=ot().Buffer;EI.exports=function(e,t){var r=e.toString(),i=r.match(PY),n;if(i){var a="aes"+i[1],s=z2.from(i[2],"hex"),u=z2.from(i[3].replace(/[\r\n]/g,""),"base64"),c=RY(t,s.slice(0,8),parseInt(i[1],10)).key,l=[],m=BY.createDecipheriv(a,c,s);l.push(m.update(u)),l.push(m.final()),n=z2.concat(l)}else{var o=r.match(kY);n=z2.from(o[2].replace(/[\r\n]/g,""),"base64")}var w=r.match(TY)[1];return{tag:w,data:n}}});var Am=k((_1e,AI)=>{"use strict";v();var Ti=SI(),MY=xI(),CY=II(),NY=D2(),DY=Dv().pbkdf2Sync,Om=ot().Buffer;function LY(e,t){var r=e.algorithm.decrypt.kde.kdeparams.salt,i=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),n=MY[e.algorithm.decrypt.cipher.algo.join(".")],o=e.algorithm.decrypt.cipher.iv,a=e.subjectPrivateKey,s=parseInt(n.split("-")[1],10)/8,u=DY(t,r,i,s,"sha1"),c=NY.createDecipheriv(n,u,o),l=[];return l.push(c.update(a)),l.push(c.final()),Om.concat(l)}function OI(e){var t;typeof e=="object"&&!Om.isBuffer(e)&&(t=e.passphrase,e=e.key),typeof e=="string"&&(e=Om.from(e));var r=CY(e,t),i=r.tag,n=r.data,o,a;switch(i){case"CERTIFICATE":a=Ti.certificate.decode(n,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(a||(a=Ti.PublicKey.decode(n,"der")),o=a.algorithm.algorithm.join("."),o){case"1.2.840.113549.1.1.1":return Ti.RSAPublicKey.decode(a.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return a.subjectPrivateKey=a.subjectPublicKey,{type:"ec",data:a};case"1.2.840.10040.4.1":return a.algorithm.params.pub_key=Ti.DSAparam.decode(a.subjectPublicKey.data,"der"),{type:"dsa",data:a.algorithm.params};default:throw new Error("unknown key id "+o)}case"ENCRYPTED PRIVATE KEY":n=Ti.EncryptedPrivateKey.decode(n,"der"),n=LY(n,t);case"PRIVATE KEY":switch(a=Ti.PrivateKey.decode(n,"der"),o=a.algorithm.algorithm.join("."),o){case"1.2.840.113549.1.1.1":return Ti.RSAPrivateKey.decode(a.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:a.algorithm.curve,privateKey:Ti.ECPrivateKey.decode(a.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return a.algorithm.params.priv_key=Ti.DSAparam.decode(a.subjectPrivateKey,"der"),{type:"dsa",params:a.algorithm.params};default:throw new Error("unknown key id "+o)}case"RSA PUBLIC KEY":return Ti.RSAPublicKey.decode(n,"der");case"RSA PRIVATE KEY":return Ti.RSAPrivateKey.decode(n,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:Ti.DSAPrivateKey.decode(n,"der")};case"EC PRIVATE KEY":return n=Ti.ECPrivateKey.decode(n,"der"),{curve:n.parameters.value,privateKey:n.privateKey};default:throw new Error("unknown key type "+i)}}OI.signature=Ti.signature;AI.exports=OI});var Tm=k((S1e,PI)=>{v();var qY=Hh(),Pm=ot().Buffer;PI.exports=function(e,t){for(var r=Pm.alloc(0),i=0,n;r.length<t;)n=UY(i++),r=Pm.concat([r,qY("sha1").update(e).update(n).digest()]);return r.slice(0,t)};function UY(e){var t=Pm.allocUnsafe(4);return t.writeUInt32BE(e,0),t}});var km=k((E1e,TI)=>{v();TI.exports=function(t,r){for(var i=t.length,n=-1;++n<i;)t[n]^=r[n];return t}});var Rm=k((O1e,RI)=>{v();var kI=Cn(),FY=ot().Buffer;function HY(e,t){return FY.from(e.toRed(kI.mont(t.modulus)).redPow(new kI(t.publicExponent)).fromRed().toArray())}RI.exports=HY});var MI=k((BI,Bm)=>{v();(function(e,t){"use strict";function r(y,f){if(!y)throw new Error(f||"Assertion failed")}function i(y,f){y.super_=f;var p=function(){};p.prototype=f.prototype,y.prototype=new p,y.prototype.constructor=y}function n(y,f,p){if(n.isBN(y))return y;this.negative=0,this.words=null,this.length=0,this.red=null,y!==null&&((f==="le"||f==="be")&&(p=f,f=10),this._init(y||0,f||10,p||"be"))}typeof e=="object"?e.exports=n:t.BN=n,n.BN=n,n.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=Kt().Buffer}catch{}n.isBN=function(f){return f instanceof n?!0:f!==null&&typeof f=="object"&&f.constructor.wordSize===n.wordSize&&Array.isArray(f.words)},n.max=function(f,p){return f.cmp(p)>0?f:p},n.min=function(f,p){return f.cmp(p)<0?f:p},n.prototype._init=function(f,p,_){if(typeof f=="number")return this._initNumber(f,p,_);if(typeof f=="object")return this._initArray(f,p,_);p==="hex"&&(p=16),r(p===(p|0)&&p>=2&&p<=36),f=f.toString().replace(/\s+/g,"");var x=0;f[0]==="-"&&(x++,this.negative=1),x<f.length&&(p===16?this._parseHex(f,x,_):(this._parseBase(f,p,x),_==="le"&&this._initArray(this.toArray(),p,_)))},n.prototype._initNumber=function(f,p,_){f<0&&(this.negative=1,f=-f),f<67108864?(this.words=[f&67108863],this.length=1):f<4503599627370496?(this.words=[f&67108863,f/67108864&67108863],this.length=2):(r(f<9007199254740992),this.words=[f&67108863,f/67108864&67108863,1],this.length=3),_==="le"&&this._initArray(this.toArray(),p,_)},n.prototype._initArray=function(f,p,_){if(r(typeof f.length=="number"),f.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(f.length/3),this.words=new Array(this.length);for(var x=0;x<this.length;x++)this.words[x]=0;var b,d,O=0;if(_==="be")for(x=f.length-1,b=0;x>=0;x-=3)d=f[x]|f[x-1]<<8|f[x-2]<<16,this.words[b]|=d<<O&67108863,this.words[b+1]=d>>>26-O&67108863,O+=24,O>=26&&(O-=26,b++);else if(_==="le")for(x=0,b=0;x<f.length;x+=3)d=f[x]|f[x+1]<<8|f[x+2]<<16,this.words[b]|=d<<O&67108863,this.words[b+1]=d>>>26-O&67108863,O+=24,O>=26&&(O-=26,b++);return this._strip()};function a(y,f){var p=y.charCodeAt(f);if(p>=48&&p<=57)return p-48;if(p>=65&&p<=70)return p-55;if(p>=97&&p<=102)return p-87;r(!1,"Invalid character in "+y)}function s(y,f,p){var _=a(y,p);return p-1>=f&&(_|=a(y,p-1)<<4),_}n.prototype._parseHex=function(f,p,_){this.length=Math.ceil((f.length-p)/6),this.words=new Array(this.length);for(var x=0;x<this.length;x++)this.words[x]=0;var b=0,d=0,O;if(_==="be")for(x=f.length-1;x>=p;x-=2)O=s(f,p,x)<<b,this.words[d]|=O&67108863,b>=18?(b-=18,d+=1,this.words[d]|=O>>>26):b+=8;else{var T=f.length-p;for(x=T%2===0?p+1:p;x<f.length;x+=2)O=s(f,p,x)<<b,this.words[d]|=O&67108863,b>=18?(b-=18,d+=1,this.words[d]|=O>>>26):b+=8}this._strip()};function u(y,f,p,_){for(var x=0,b=0,d=Math.min(y.length,p),O=f;O<d;O++){var T=y.charCodeAt(O)-48;x*=_,T>=49?b=T-49+10:T>=17?b=T-17+10:b=T,r(T>=0&&b<_,"Invalid character"),x+=b}return x}n.prototype._parseBase=function(f,p,_){this.words=[0],this.length=1;for(var x=0,b=1;b<=67108863;b*=p)x++;x--,b=b/p|0;for(var d=f.length-_,O=d%x,T=Math.min(d,d-O)+_,S=0,R=_;R<T;R+=x)S=u(f,R,R+x,p),this.imuln(b),this.words[0]+S<67108864?this.words[0]+=S:this._iaddn(S);if(O!==0){var Y=1;for(S=u(f,R,f.length,p),R=0;R<O;R++)Y*=p;this.imuln(Y),this.words[0]+S<67108864?this.words[0]+=S:this._iaddn(S)}this._strip()},n.prototype.copy=function(f){f.words=new Array(this.length);for(var p=0;p<this.length;p++)f.words[p]=this.words[p];f.length=this.length,f.negative=this.negative,f.red=this.red};function c(y,f){y.words=f.words,y.length=f.length,y.negative=f.negative,y.red=f.red}if(n.prototype._move=function(f){c(f,this)},n.prototype.clone=function(){var f=new n(null);return this.copy(f),f},n.prototype._expand=function(f){for(;this.length<f;)this.words[this.length++]=0;return this},n.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},n.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{n.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch{n.prototype.inspect=l}else n.prototype.inspect=l;function l(){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"],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],E=[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];n.prototype.toString=function(f,p){f=f||10,p=p|0||1;var _;if(f===16||f==="hex"){_="";for(var x=0,b=0,d=0;d<this.length;d++){var O=this.words[d],T=((O<<x|b)&16777215).toString(16);b=O>>>24-x&16777215,x+=2,x>=26&&(x-=26,d--),b!==0||d!==this.length-1?_=m[6-T.length]+T+_:_=T+_}for(b!==0&&(_=b.toString(16)+_);_.length%p!==0;)_="0"+_;return this.negative!==0&&(_="-"+_),_}if(f===(f|0)&&f>=2&&f<=36){var S=w[f],R=E[f];_="";var Y=this.clone();for(Y.negative=0;!Y.isZero();){var X=Y.modrn(R).toString(f);Y=Y.idivn(R),Y.isZero()?_=X+_:_=m[S-X.length]+X+_}for(this.isZero()&&(_="0"+_);_.length%p!==0;)_="0"+_;return this.negative!==0&&(_="-"+_),_}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var f=this.words[0];return this.length===2?f+=this.words[1]*67108864:this.length===3&&this.words[2]===1?f+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-f:f},n.prototype.toJSON=function(){return this.toString(16,2)},o&&(n.prototype.toBuffer=function(f,p){return this.toArrayLike(o,f,p)}),n.prototype.toArray=function(f,p){return this.toArrayLike(Array,f,p)};var P=function(f,p){return f.allocUnsafe?f.allocUnsafe(p):new f(p)};n.prototype.toArrayLike=function(f,p,_){this._strip();var x=this.byteLength(),b=_||Math.max(1,x);r(x<=b,"byte array longer than desired length"),r(b>0,"Requested array length <= 0");var d=P(f,b),O=p==="le"?"LE":"BE";return this["_toArrayLike"+O](d,x),d},n.prototype._toArrayLikeLE=function(f,p){for(var _=0,x=0,b=0,d=0;b<this.length;b++){var O=this.words[b]<<d|x;f[_++]=O&255,_<f.length&&(f[_++]=O>>8&255),_<f.length&&(f[_++]=O>>16&255),d===6?(_<f.length&&(f[_++]=O>>24&255),x=0,d=0):(x=O>>>24,d+=2)}if(_<f.length)for(f[_++]=x;_<f.length;)f[_++]=0},n.prototype._toArrayLikeBE=function(f,p){for(var _=f.length-1,x=0,b=0,d=0;b<this.length;b++){var O=this.words[b]<<d|x;f[_--]=O&255,_>=0&&(f[_--]=O>>8&255),_>=0&&(f[_--]=O>>16&255),d===6?(_>=0&&(f[_--]=O>>24&255),x=0,d=0):(x=O>>>24,d+=2)}if(_>=0)for(f[_--]=x;_>=0;)f[_--]=0},Math.clz32?n.prototype._countBits=function(f){return 32-Math.clz32(f)}:n.prototype._countBits=function(f){var p=f,_=0;return p>=4096&&(_+=13,p>>>=13),p>=64&&(_+=7,p>>>=7),p>=8&&(_+=4,p>>>=4),p>=2&&(_+=2,p>>>=2),_+p},n.prototype._zeroBits=function(f){if(f===0)return 26;var p=f,_=0;return(p&8191)===0&&(_+=13,p>>>=13),(p&127)===0&&(_+=7,p>>>=7),(p&15)===0&&(_+=4,p>>>=4),(p&3)===0&&(_+=2,p>>>=2),(p&1)===0&&_++,_},n.prototype.bitLength=function(){var f=this.words[this.length-1],p=this._countBits(f);return(this.length-1)*26+p};function M(y){for(var f=new Array(y.bitLength()),p=0;p<f.length;p++){var _=p/26|0,x=p%26;f[p]=y.words[_]>>>x&1}return f}n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var f=0,p=0;p<this.length;p++){var _=this._zeroBits(this.words[p]);if(f+=_,_!==26)break}return f},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(f){return this.negative!==0?this.abs().inotn(f).iaddn(1):this.clone()},n.prototype.fromTwos=function(f){return this.testn(f-1)?this.notn(f).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return this.negative!==0},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(f){for(;this.length<f.length;)this.words[this.length++]=0;for(var p=0;p<f.length;p++)this.words[p]=this.words[p]|f.words[p];return this._strip()},n.prototype.ior=function(f){return r((this.negative|f.negative)===0),this.iuor(f)},n.prototype.or=function(f){return this.length>f.length?this.clone().ior(f):f.clone().ior(this)},n.prototype.uor=function(f){return this.length>f.length?this.clone().iuor(f):f.clone().iuor(this)},n.prototype.iuand=function(f){var p;this.length>f.length?p=f:p=this;for(var _=0;_<p.length;_++)this.words[_]=this.words[_]&f.words[_];return this.length=p.length,this._strip()},n.prototype.iand=function(f){return r((this.negative|f.negative)===0),this.iuand(f)},n.prototype.and=function(f){return this.length>f.length?this.clone().iand(f):f.clone().iand(this)},n.prototype.uand=function(f){return this.length>f.length?this.clone().iuand(f):f.clone().iuand(this)},n.prototype.iuxor=function(f){var p,_;this.length>f.length?(p=this,_=f):(p=f,_=this);for(var x=0;x<_.length;x++)this.words[x]=p.words[x]^_.words[x];if(this!==p)for(;x<p.length;x++)this.words[x]=p.words[x];return this.length=p.length,this._strip()},n.prototype.ixor=function(f){return r((this.negative|f.negative)===0),this.iuxor(f)},n.prototype.xor=function(f){return this.length>f.length?this.clone().ixor(f):f.clone().ixor(this)},n.prototype.uxor=function(f){return this.length>f.length?this.clone().iuxor(f):f.clone().iuxor(this)},n.prototype.inotn=function(f){r(typeof f=="number"&&f>=0);var p=Math.ceil(f/26)|0,_=f%26;this._expand(p),_>0&&p--;for(var x=0;x<p;x++)this.words[x]=~this.words[x]&67108863;return _>0&&(this.words[x]=~this.words[x]&67108863>>26-_),this._strip()},n.prototype.notn=function(f){return this.clone().inotn(f)},n.prototype.setn=function(f,p){r(typeof f=="number"&&f>=0);var _=f/26|0,x=f%26;return this._expand(_+1),p?this.words[_]=this.words[_]|1<<x:this.words[_]=this.words[_]&~(1<<x),this._strip()},n.prototype.iadd=function(f){var p;if(this.negative!==0&&f.negative===0)return this.negative=0,p=this.isub(f),this.negative^=1,this._normSign();if(this.negative===0&&f.negative!==0)return f.negative=0,p=this.isub(f),f.negative=1,p._normSign();var _,x;this.length>f.length?(_=this,x=f):(_=f,x=this);for(var b=0,d=0;d<x.length;d++)p=(_.words[d]|0)+(x.words[d]|0)+b,this.words[d]=p&67108863,b=p>>>26;for(;b!==0&&d<_.length;d++)p=(_.words[d]|0)+b,this.words[d]=p&67108863,b=p>>>26;if(this.length=_.length,b!==0)this.words[this.length]=b,this.length++;else if(_!==this)for(;d<_.length;d++)this.words[d]=_.words[d];return this},n.prototype.add=function(f){var p;return f.negative!==0&&this.negative===0?(f.negative=0,p=this.sub(f),f.negative^=1,p):f.negative===0&&this.negative!==0?(this.negative=0,p=f.sub(this),this.negative=1,p):this.length>f.length?this.clone().iadd(f):f.clone().iadd(this)},n.prototype.isub=function(f){if(f.negative!==0){f.negative=0;var p=this.iadd(f);return f.negative=1,p._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(f),this.negative=1,this._normSign();var _=this.cmp(f);if(_===0)return this.negative=0,this.length=1,this.words[0]=0,this;var x,b;_>0?(x=this,b=f):(x=f,b=this);for(var d=0,O=0;O<b.length;O++)p=(x.words[O]|0)-(b.words[O]|0)+d,d=p>>26,this.words[O]=p&67108863;for(;d!==0&&O<x.length;O++)p=(x.words[O]|0)+d,d=p>>26,this.words[O]=p&67108863;if(d===0&&O<x.length&&x!==this)for(;O<x.length;O++)this.words[O]=x.words[O];return this.length=Math.max(this.length,O),x!==this&&(this.negative=1),this._strip()},n.prototype.sub=function(f){return this.clone().isub(f)};function D(y,f,p){p.negative=f.negative^y.negative;var _=y.length+f.length|0;p.length=_,_=_-1|0;var x=y.words[0]|0,b=f.words[0]|0,d=x*b,O=d&67108863,T=d/67108864|0;p.words[0]=O;for(var S=1;S<_;S++){for(var R=T>>>26,Y=T&67108863,X=Math.min(S,f.length-1),ne=Math.max(0,S-y.length+1);ne<=X;ne++){var ce=S-ne|0;x=y.words[ce]|0,b=f.words[ne]|0,d=x*b+Y,R+=d/67108864|0,Y=d&67108863}p.words[S]=Y|0,T=R|0}return T!==0?p.words[S]=T|0:p.length--,p._strip()}var L=function(f,p,_){var x=f.words,b=p.words,d=_.words,O=0,T,S,R,Y=x[0]|0,X=Y&8191,ne=Y>>>13,ce=x[1]|0,pe=ce&8191,q=ce>>>13,W=x[2]|0,$=W&8191,ee=W>>>13,se=x[3]|0,ue=se&8191,le=se>>>13,Ae=x[4]|0,ge=Ae&8191,ve=Ae>>>13,sr=x[5]|0,xe=sr&8191,ye=sr>>>13,Be=x[6]|0,be=Be&8191,_e=Be>>>13,Qi=x[7]|0,Ce=Qi&8191,Re=Qi>>>13,Js=x[8]|0,De=Js&8191,qe=Js>>>13,Wl=x[9]|0,Ue=Wl&8191,Fe=Wl>>>13,Yl=b[0]|0,He=Yl&8191,je=Yl>>>13,$l=b[1]|0,ze=$l&8191,Ke=$l>>>13,Xl=b[2]|0,Ve=Xl&8191,Ge=Xl>>>13,Jl=b[3]|0,Ze=Jl&8191,We=Jl>>>13,Ql=b[4]|0,Ye=Ql&8191,$e=Ql>>>13,eh=b[5]|0,Xe=eh&8191,Je=eh>>>13,th=b[6]|0,Qe=th&8191,et=th>>>13,rh=b[7]|0,tt=rh&8191,rt=rh>>>13,ih=b[8]|0,it=ih&8191,nt=ih>>>13,Gf=b[9]|0,Jt=Gf&8191,Qt=Gf>>>13;_.negative=f.negative^p.negative,_.length=19,T=Math.imul(X,He),S=Math.imul(X,je),S=S+Math.imul(ne,He)|0,R=Math.imul(ne,je);var Qs=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(Qs>>>26)|0,Qs&=67108863,T=Math.imul(pe,He),S=Math.imul(pe,je),S=S+Math.imul(q,He)|0,R=Math.imul(q,je),T=T+Math.imul(X,ze)|0,S=S+Math.imul(X,Ke)|0,S=S+Math.imul(ne,ze)|0,R=R+Math.imul(ne,Ke)|0;var eu=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(eu>>>26)|0,eu&=67108863,T=Math.imul($,He),S=Math.imul($,je),S=S+Math.imul(ee,He)|0,R=Math.imul(ee,je),T=T+Math.imul(pe,ze)|0,S=S+Math.imul(pe,Ke)|0,S=S+Math.imul(q,ze)|0,R=R+Math.imul(q,Ke)|0,T=T+Math.imul(X,Ve)|0,S=S+Math.imul(X,Ge)|0,S=S+Math.imul(ne,Ve)|0,R=R+Math.imul(ne,Ge)|0;var tu=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(tu>>>26)|0,tu&=67108863,T=Math.imul(ue,He),S=Math.imul(ue,je),S=S+Math.imul(le,He)|0,R=Math.imul(le,je),T=T+Math.imul($,ze)|0,S=S+Math.imul($,Ke)|0,S=S+Math.imul(ee,ze)|0,R=R+Math.imul(ee,Ke)|0,T=T+Math.imul(pe,Ve)|0,S=S+Math.imul(pe,Ge)|0,S=S+Math.imul(q,Ve)|0,R=R+Math.imul(q,Ge)|0,T=T+Math.imul(X,Ze)|0,S=S+Math.imul(X,We)|0,S=S+Math.imul(ne,Ze)|0,R=R+Math.imul(ne,We)|0;var ru=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(ru>>>26)|0,ru&=67108863,T=Math.imul(ge,He),S=Math.imul(ge,je),S=S+Math.imul(ve,He)|0,R=Math.imul(ve,je),T=T+Math.imul(ue,ze)|0,S=S+Math.imul(ue,Ke)|0,S=S+Math.imul(le,ze)|0,R=R+Math.imul(le,Ke)|0,T=T+Math.imul($,Ve)|0,S=S+Math.imul($,Ge)|0,S=S+Math.imul(ee,Ve)|0,R=R+Math.imul(ee,Ge)|0,T=T+Math.imul(pe,Ze)|0,S=S+Math.imul(pe,We)|0,S=S+Math.imul(q,Ze)|0,R=R+Math.imul(q,We)|0,T=T+Math.imul(X,Ye)|0,S=S+Math.imul(X,$e)|0,S=S+Math.imul(ne,Ye)|0,R=R+Math.imul(ne,$e)|0;var iu=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(iu>>>26)|0,iu&=67108863,T=Math.imul(xe,He),S=Math.imul(xe,je),S=S+Math.imul(ye,He)|0,R=Math.imul(ye,je),T=T+Math.imul(ge,ze)|0,S=S+Math.imul(ge,Ke)|0,S=S+Math.imul(ve,ze)|0,R=R+Math.imul(ve,Ke)|0,T=T+Math.imul(ue,Ve)|0,S=S+Math.imul(ue,Ge)|0,S=S+Math.imul(le,Ve)|0,R=R+Math.imul(le,Ge)|0,T=T+Math.imul($,Ze)|0,S=S+Math.imul($,We)|0,S=S+Math.imul(ee,Ze)|0,R=R+Math.imul(ee,We)|0,T=T+Math.imul(pe,Ye)|0,S=S+Math.imul(pe,$e)|0,S=S+Math.imul(q,Ye)|0,R=R+Math.imul(q,$e)|0,T=T+Math.imul(X,Xe)|0,S=S+Math.imul(X,Je)|0,S=S+Math.imul(ne,Xe)|0,R=R+Math.imul(ne,Je)|0;var nu=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(nu>>>26)|0,nu&=67108863,T=Math.imul(be,He),S=Math.imul(be,je),S=S+Math.imul(_e,He)|0,R=Math.imul(_e,je),T=T+Math.imul(xe,ze)|0,S=S+Math.imul(xe,Ke)|0,S=S+Math.imul(ye,ze)|0,R=R+Math.imul(ye,Ke)|0,T=T+Math.imul(ge,Ve)|0,S=S+Math.imul(ge,Ge)|0,S=S+Math.imul(ve,Ve)|0,R=R+Math.imul(ve,Ge)|0,T=T+Math.imul(ue,Ze)|0,S=S+Math.imul(ue,We)|0,S=S+Math.imul(le,Ze)|0,R=R+Math.imul(le,We)|0,T=T+Math.imul($,Ye)|0,S=S+Math.imul($,$e)|0,S=S+Math.imul(ee,Ye)|0,R=R+Math.imul(ee,$e)|0,T=T+Math.imul(pe,Xe)|0,S=S+Math.imul(pe,Je)|0,S=S+Math.imul(q,Xe)|0,R=R+Math.imul(q,Je)|0,T=T+Math.imul(X,Qe)|0,S=S+Math.imul(X,et)|0,S=S+Math.imul(ne,Qe)|0,R=R+Math.imul(ne,et)|0;var ou=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(ou>>>26)|0,ou&=67108863,T=Math.imul(Ce,He),S=Math.imul(Ce,je),S=S+Math.imul(Re,He)|0,R=Math.imul(Re,je),T=T+Math.imul(be,ze)|0,S=S+Math.imul(be,Ke)|0,S=S+Math.imul(_e,ze)|0,R=R+Math.imul(_e,Ke)|0,T=T+Math.imul(xe,Ve)|0,S=S+Math.imul(xe,Ge)|0,S=S+Math.imul(ye,Ve)|0,R=R+Math.imul(ye,Ge)|0,T=T+Math.imul(ge,Ze)|0,S=S+Math.imul(ge,We)|0,S=S+Math.imul(ve,Ze)|0,R=R+Math.imul(ve,We)|0,T=T+Math.imul(ue,Ye)|0,S=S+Math.imul(ue,$e)|0,S=S+Math.imul(le,Ye)|0,R=R+Math.imul(le,$e)|0,T=T+Math.imul($,Xe)|0,S=S+Math.imul($,Je)|0,S=S+Math.imul(ee,Xe)|0,R=R+Math.imul(ee,Je)|0,T=T+Math.imul(pe,Qe)|0,S=S+Math.imul(pe,et)|0,S=S+Math.imul(q,Qe)|0,R=R+Math.imul(q,et)|0,T=T+Math.imul(X,tt)|0,S=S+Math.imul(X,rt)|0,S=S+Math.imul(ne,tt)|0,R=R+Math.imul(ne,rt)|0;var au=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(au>>>26)|0,au&=67108863,T=Math.imul(De,He),S=Math.imul(De,je),S=S+Math.imul(qe,He)|0,R=Math.imul(qe,je),T=T+Math.imul(Ce,ze)|0,S=S+Math.imul(Ce,Ke)|0,S=S+Math.imul(Re,ze)|0,R=R+Math.imul(Re,Ke)|0,T=T+Math.imul(be,Ve)|0,S=S+Math.imul(be,Ge)|0,S=S+Math.imul(_e,Ve)|0,R=R+Math.imul(_e,Ge)|0,T=T+Math.imul(xe,Ze)|0,S=S+Math.imul(xe,We)|0,S=S+Math.imul(ye,Ze)|0,R=R+Math.imul(ye,We)|0,T=T+Math.imul(ge,Ye)|0,S=S+Math.imul(ge,$e)|0,S=S+Math.imul(ve,Ye)|0,R=R+Math.imul(ve,$e)|0,T=T+Math.imul(ue,Xe)|0,S=S+Math.imul(ue,Je)|0,S=S+Math.imul(le,Xe)|0,R=R+Math.imul(le,Je)|0,T=T+Math.imul($,Qe)|0,S=S+Math.imul($,et)|0,S=S+Math.imul(ee,Qe)|0,R=R+Math.imul(ee,et)|0,T=T+Math.imul(pe,tt)|0,S=S+Math.imul(pe,rt)|0,S=S+Math.imul(q,tt)|0,R=R+Math.imul(q,rt)|0,T=T+Math.imul(X,it)|0,S=S+Math.imul(X,nt)|0,S=S+Math.imul(ne,it)|0,R=R+Math.imul(ne,nt)|0;var su=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(su>>>26)|0,su&=67108863,T=Math.imul(Ue,He),S=Math.imul(Ue,je),S=S+Math.imul(Fe,He)|0,R=Math.imul(Fe,je),T=T+Math.imul(De,ze)|0,S=S+Math.imul(De,Ke)|0,S=S+Math.imul(qe,ze)|0,R=R+Math.imul(qe,Ke)|0,T=T+Math.imul(Ce,Ve)|0,S=S+Math.imul(Ce,Ge)|0,S=S+Math.imul(Re,Ve)|0,R=R+Math.imul(Re,Ge)|0,T=T+Math.imul(be,Ze)|0,S=S+Math.imul(be,We)|0,S=S+Math.imul(_e,Ze)|0,R=R+Math.imul(_e,We)|0,T=T+Math.imul(xe,Ye)|0,S=S+Math.imul(xe,$e)|0,S=S+Math.imul(ye,Ye)|0,R=R+Math.imul(ye,$e)|0,T=T+Math.imul(ge,Xe)|0,S=S+Math.imul(ge,Je)|0,S=S+Math.imul(ve,Xe)|0,R=R+Math.imul(ve,Je)|0,T=T+Math.imul(ue,Qe)|0,S=S+Math.imul(ue,et)|0,S=S+Math.imul(le,Qe)|0,R=R+Math.imul(le,et)|0,T=T+Math.imul($,tt)|0,S=S+Math.imul($,rt)|0,S=S+Math.imul(ee,tt)|0,R=R+Math.imul(ee,rt)|0,T=T+Math.imul(pe,it)|0,S=S+Math.imul(pe,nt)|0,S=S+Math.imul(q,it)|0,R=R+Math.imul(q,nt)|0,T=T+Math.imul(X,Jt)|0,S=S+Math.imul(X,Qt)|0,S=S+Math.imul(ne,Jt)|0,R=R+Math.imul(ne,Qt)|0;var uu=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(uu>>>26)|0,uu&=67108863,T=Math.imul(Ue,ze),S=Math.imul(Ue,Ke),S=S+Math.imul(Fe,ze)|0,R=Math.imul(Fe,Ke),T=T+Math.imul(De,Ve)|0,S=S+Math.imul(De,Ge)|0,S=S+Math.imul(qe,Ve)|0,R=R+Math.imul(qe,Ge)|0,T=T+Math.imul(Ce,Ze)|0,S=S+Math.imul(Ce,We)|0,S=S+Math.imul(Re,Ze)|0,R=R+Math.imul(Re,We)|0,T=T+Math.imul(be,Ye)|0,S=S+Math.imul(be,$e)|0,S=S+Math.imul(_e,Ye)|0,R=R+Math.imul(_e,$e)|0,T=T+Math.imul(xe,Xe)|0,S=S+Math.imul(xe,Je)|0,S=S+Math.imul(ye,Xe)|0,R=R+Math.imul(ye,Je)|0,T=T+Math.imul(ge,Qe)|0,S=S+Math.imul(ge,et)|0,S=S+Math.imul(ve,Qe)|0,R=R+Math.imul(ve,et)|0,T=T+Math.imul(ue,tt)|0,S=S+Math.imul(ue,rt)|0,S=S+Math.imul(le,tt)|0,R=R+Math.imul(le,rt)|0,T=T+Math.imul($,it)|0,S=S+Math.imul($,nt)|0,S=S+Math.imul(ee,it)|0,R=R+Math.imul(ee,nt)|0,T=T+Math.imul(pe,Jt)|0,S=S+Math.imul(pe,Qt)|0,S=S+Math.imul(q,Jt)|0,R=R+Math.imul(q,Qt)|0;var fu=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(fu>>>26)|0,fu&=67108863,T=Math.imul(Ue,Ve),S=Math.imul(Ue,Ge),S=S+Math.imul(Fe,Ve)|0,R=Math.imul(Fe,Ge),T=T+Math.imul(De,Ze)|0,S=S+Math.imul(De,We)|0,S=S+Math.imul(qe,Ze)|0,R=R+Math.imul(qe,We)|0,T=T+Math.imul(Ce,Ye)|0,S=S+Math.imul(Ce,$e)|0,S=S+Math.imul(Re,Ye)|0,R=R+Math.imul(Re,$e)|0,T=T+Math.imul(be,Xe)|0,S=S+Math.imul(be,Je)|0,S=S+Math.imul(_e,Xe)|0,R=R+Math.imul(_e,Je)|0,T=T+Math.imul(xe,Qe)|0,S=S+Math.imul(xe,et)|0,S=S+Math.imul(ye,Qe)|0,R=R+Math.imul(ye,et)|0,T=T+Math.imul(ge,tt)|0,S=S+Math.imul(ge,rt)|0,S=S+Math.imul(ve,tt)|0,R=R+Math.imul(ve,rt)|0,T=T+Math.imul(ue,it)|0,S=S+Math.imul(ue,nt)|0,S=S+Math.imul(le,it)|0,R=R+Math.imul(le,nt)|0,T=T+Math.imul($,Jt)|0,S=S+Math.imul($,Qt)|0,S=S+Math.imul(ee,Jt)|0,R=R+Math.imul(ee,Qt)|0;var cu=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(cu>>>26)|0,cu&=67108863,T=Math.imul(Ue,Ze),S=Math.imul(Ue,We),S=S+Math.imul(Fe,Ze)|0,R=Math.imul(Fe,We),T=T+Math.imul(De,Ye)|0,S=S+Math.imul(De,$e)|0,S=S+Math.imul(qe,Ye)|0,R=R+Math.imul(qe,$e)|0,T=T+Math.imul(Ce,Xe)|0,S=S+Math.imul(Ce,Je)|0,S=S+Math.imul(Re,Xe)|0,R=R+Math.imul(Re,Je)|0,T=T+Math.imul(be,Qe)|0,S=S+Math.imul(be,et)|0,S=S+Math.imul(_e,Qe)|0,R=R+Math.imul(_e,et)|0,T=T+Math.imul(xe,tt)|0,S=S+Math.imul(xe,rt)|0,S=S+Math.imul(ye,tt)|0,R=R+Math.imul(ye,rt)|0,T=T+Math.imul(ge,it)|0,S=S+Math.imul(ge,nt)|0,S=S+Math.imul(ve,it)|0,R=R+Math.imul(ve,nt)|0,T=T+Math.imul(ue,Jt)|0,S=S+Math.imul(ue,Qt)|0,S=S+Math.imul(le,Jt)|0,R=R+Math.imul(le,Qt)|0;var lu=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(lu>>>26)|0,lu&=67108863,T=Math.imul(Ue,Ye),S=Math.imul(Ue,$e),S=S+Math.imul(Fe,Ye)|0,R=Math.imul(Fe,$e),T=T+Math.imul(De,Xe)|0,S=S+Math.imul(De,Je)|0,S=S+Math.imul(qe,Xe)|0,R=R+Math.imul(qe,Je)|0,T=T+Math.imul(Ce,Qe)|0,S=S+Math.imul(Ce,et)|0,S=S+Math.imul(Re,Qe)|0,R=R+Math.imul(Re,et)|0,T=T+Math.imul(be,tt)|0,S=S+Math.imul(be,rt)|0,S=S+Math.imul(_e,tt)|0,R=R+Math.imul(_e,rt)|0,T=T+Math.imul(xe,it)|0,S=S+Math.imul(xe,nt)|0,S=S+Math.imul(ye,it)|0,R=R+Math.imul(ye,nt)|0,T=T+Math.imul(ge,Jt)|0,S=S+Math.imul(ge,Qt)|0,S=S+Math.imul(ve,Jt)|0,R=R+Math.imul(ve,Qt)|0;var hu=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(hu>>>26)|0,hu&=67108863,T=Math.imul(Ue,Xe),S=Math.imul(Ue,Je),S=S+Math.imul(Fe,Xe)|0,R=Math.imul(Fe,Je),T=T+Math.imul(De,Qe)|0,S=S+Math.imul(De,et)|0,S=S+Math.imul(qe,Qe)|0,R=R+Math.imul(qe,et)|0,T=T+Math.imul(Ce,tt)|0,S=S+Math.imul(Ce,rt)|0,S=S+Math.imul(Re,tt)|0,R=R+Math.imul(Re,rt)|0,T=T+Math.imul(be,it)|0,S=S+Math.imul(be,nt)|0,S=S+Math.imul(_e,it)|0,R=R+Math.imul(_e,nt)|0,T=T+Math.imul(xe,Jt)|0,S=S+Math.imul(xe,Qt)|0,S=S+Math.imul(ye,Jt)|0,R=R+Math.imul(ye,Qt)|0;var du=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(du>>>26)|0,du&=67108863,T=Math.imul(Ue,Qe),S=Math.imul(Ue,et),S=S+Math.imul(Fe,Qe)|0,R=Math.imul(Fe,et),T=T+Math.imul(De,tt)|0,S=S+Math.imul(De,rt)|0,S=S+Math.imul(qe,tt)|0,R=R+Math.imul(qe,rt)|0,T=T+Math.imul(Ce,it)|0,S=S+Math.imul(Ce,nt)|0,S=S+Math.imul(Re,it)|0,R=R+Math.imul(Re,nt)|0,T=T+Math.imul(be,Jt)|0,S=S+Math.imul(be,Qt)|0,S=S+Math.imul(_e,Jt)|0,R=R+Math.imul(_e,Qt)|0;var pu=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(pu>>>26)|0,pu&=67108863,T=Math.imul(Ue,tt),S=Math.imul(Ue,rt),S=S+Math.imul(Fe,tt)|0,R=Math.imul(Fe,rt),T=T+Math.imul(De,it)|0,S=S+Math.imul(De,nt)|0,S=S+Math.imul(qe,it)|0,R=R+Math.imul(qe,nt)|0,T=T+Math.imul(Ce,Jt)|0,S=S+Math.imul(Ce,Qt)|0,S=S+Math.imul(Re,Jt)|0,R=R+Math.imul(Re,Qt)|0;var M5=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(M5>>>26)|0,M5&=67108863,T=Math.imul(Ue,it),S=Math.imul(Ue,nt),S=S+Math.imul(Fe,it)|0,R=Math.imul(Fe,nt),T=T+Math.imul(De,Jt)|0,S=S+Math.imul(De,Qt)|0,S=S+Math.imul(qe,Jt)|0,R=R+Math.imul(qe,Qt)|0;var C5=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(C5>>>26)|0,C5&=67108863,T=Math.imul(Ue,Jt),S=Math.imul(Ue,Qt),S=S+Math.imul(Fe,Jt)|0,R=Math.imul(Fe,Qt);var N5=(O+T|0)+((S&8191)<<13)|0;return O=(R+(S>>>13)|0)+(N5>>>26)|0,N5&=67108863,d[0]=Qs,d[1]=eu,d[2]=tu,d[3]=ru,d[4]=iu,d[5]=nu,d[6]=ou,d[7]=au,d[8]=su,d[9]=uu,d[10]=fu,d[11]=cu,d[12]=lu,d[13]=hu,d[14]=du,d[15]=pu,d[16]=M5,d[17]=C5,d[18]=N5,O!==0&&(d[19]=O,_.length++),_};Math.imul||(L=D);function U(y,f,p){p.negative=f.negative^y.negative,p.length=y.length+f.length;for(var _=0,x=0,b=0;b<p.length-1;b++){var d=x;x=0;for(var O=_&67108863,T=Math.min(b,f.length-1),S=Math.max(0,b-y.length+1);S<=T;S++){var R=b-S,Y=y.words[R]|0,X=f.words[S]|0,ne=Y*X,ce=ne&67108863;d=d+(ne/67108864|0)|0,ce=ce+O|0,O=ce&67108863,d=d+(ce>>>26)|0,x+=d>>>26,d&=67108863}p.words[b]=O,_=d,d=x}return _!==0?p.words[b]=_:p.length--,p._strip()}function K(y,f,p){return U(y,f,p)}n.prototype.mulTo=function(f,p){var _,x=this.length+f.length;return this.length===10&&f.length===10?_=L(this,f,p):x<63?_=D(this,f,p):x<1024?_=U(this,f,p):_=K(this,f,p),_};function C(y,f){this.x=y,this.y=f}C.prototype.makeRBT=function(f){for(var p=new Array(f),_=n.prototype._countBits(f)-1,x=0;x<f;x++)p[x]=this.revBin(x,_,f);return p},C.prototype.revBin=function(f,p,_){if(f===0||f===_-1)return f;for(var x=0,b=0;b<p;b++)x|=(f&1)<<p-b-1,f>>=1;return x},C.prototype.permute=function(f,p,_,x,b,d){for(var O=0;O<d;O++)x[O]=p[f[O]],b[O]=_[f[O]]},C.prototype.transform=function(f,p,_,x,b,d){this.permute(d,f,p,_,x,b);for(var O=1;O<b;O<<=1)for(var T=O<<1,S=Math.cos(2*Math.PI/T),R=Math.sin(2*Math.PI/T),Y=0;Y<b;Y+=T)for(var X=S,ne=R,ce=0;ce<O;ce++){var pe=_[Y+ce],q=x[Y+ce],W=_[Y+ce+O],$=x[Y+ce+O],ee=X*W-ne*$;$=X*$+ne*W,W=ee,_[Y+ce]=pe+W,x[Y+ce]=q+$,_[Y+ce+O]=pe-W,x[Y+ce+O]=q-$,ce!==T&&(ee=S*X-R*ne,ne=S*ne+R*X,X=ee)}},C.prototype.guessLen13b=function(f,p){var _=Math.max(p,f)|1,x=_&1,b=0;for(_=_/2|0;_;_=_>>>1)b++;return 1<<b+1+x},C.prototype.conjugate=function(f,p,_){if(!(_<=1))for(var x=0;x<_/2;x++){var b=f[x];f[x]=f[_-x-1],f[_-x-1]=b,b=p[x],p[x]=-p[_-x-1],p[_-x-1]=-b}},C.prototype.normalize13b=function(f,p){for(var _=0,x=0;x<p/2;x++){var b=Math.round(f[2*x+1]/p)*8192+Math.round(f[2*x]/p)+_;f[x]=b&67108863,b<67108864?_=0:_=b/67108864|0}return f},C.prototype.convert13b=function(f,p,_,x){for(var b=0,d=0;d<p;d++)b=b+(f[d]|0),_[2*d]=b&8191,b=b>>>13,_[2*d+1]=b&8191,b=b>>>13;for(d=2*p;d<x;++d)_[d]=0;r(b===0),r((b&-8192)===0)},C.prototype.stub=function(f){for(var p=new Array(f),_=0;_<f;_++)p[_]=0;return p},C.prototype.mulp=function(f,p,_){var x=2*this.guessLen13b(f.length,p.length),b=this.makeRBT(x),d=this.stub(x),O=new Array(x),T=new Array(x),S=new Array(x),R=new Array(x),Y=new Array(x),X=new Array(x),ne=_.words;ne.length=x,this.convert13b(f.words,f.length,O,x),this.convert13b(p.words,p.length,R,x),this.transform(O,d,T,S,x,b),this.transform(R,d,Y,X,x,b);for(var ce=0;ce<x;ce++){var pe=T[ce]*Y[ce]-S[ce]*X[ce];S[ce]=T[ce]*X[ce]+S[ce]*Y[ce],T[ce]=pe}return this.conjugate(T,S,x),this.transform(T,S,ne,d,x,b),this.conjugate(ne,d,x),this.normalize13b(ne,x),_.negative=f.negative^p.negative,_.length=f.length+p.length,_._strip()},n.prototype.mul=function(f){var p=new n(null);return p.words=new Array(this.length+f.length),this.mulTo(f,p)},n.prototype.mulf=function(f){var p=new n(null);return p.words=new Array(this.length+f.length),K(this,f,p)},n.prototype.imul=function(f){return this.clone().mulTo(f,this)},n.prototype.imuln=function(f){var p=f<0;p&&(f=-f),r(typeof f=="number"),r(f<67108864);for(var _=0,x=0;x<this.length;x++){var b=(this.words[x]|0)*f,d=(b&67108863)+(_&67108863);_>>=26,_+=b/67108864|0,_+=d>>>26,this.words[x]=d&67108863}return _!==0&&(this.words[x]=_,this.length++),this.length=f===0?1:this.length,p?this.ineg():this},n.prototype.muln=function(f){return this.clone().imuln(f)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(f){var p=M(f);if(p.length===0)return new n(1);for(var _=this,x=0;x<p.length&&p[x]===0;x++,_=_.sqr());if(++x<p.length)for(var b=_.sqr();x<p.length;x++,b=b.sqr())p[x]!==0&&(_=_.mul(b));return _},n.prototype.iushln=function(f){r(typeof f=="number"&&f>=0);var p=f%26,_=(f-p)/26,x=67108863>>>26-p<<26-p,b;if(p!==0){var d=0;for(b=0;b<this.length;b++){var O=this.words[b]&x,T=(this.words[b]|0)-O<<p;this.words[b]=T|d,d=O>>>26-p}d&&(this.words[b]=d,this.length++)}if(_!==0){for(b=this.length-1;b>=0;b--)this.words[b+_]=this.words[b];for(b=0;b<_;b++)this.words[b]=0;this.length+=_}return this._strip()},n.prototype.ishln=function(f){return r(this.negative===0),this.iushln(f)},n.prototype.iushrn=function(f,p,_){r(typeof f=="number"&&f>=0);var x;p?x=(p-p%26)/26:x=0;var b=f%26,d=Math.min((f-b)/26,this.length),O=67108863^67108863>>>b<<b,T=_;if(x-=d,x=Math.max(0,x),T){for(var S=0;S<d;S++)T.words[S]=this.words[S];T.length=d}if(d!==0)if(this.length>d)for(this.length-=d,S=0;S<this.length;S++)this.words[S]=this.words[S+d];else this.words[0]=0,this.length=1;var R=0;for(S=this.length-1;S>=0&&(R!==0||S>=x);S--){var Y=this.words[S]|0;this.words[S]=R<<26-b|Y>>>b,R=Y&O}return T&&R!==0&&(T.words[T.length++]=R),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.ishrn=function(f,p,_){return r(this.negative===0),this.iushrn(f,p,_)},n.prototype.shln=function(f){return this.clone().ishln(f)},n.prototype.ushln=function(f){return this.clone().iushln(f)},n.prototype.shrn=function(f){return this.clone().ishrn(f)},n.prototype.ushrn=function(f){return this.clone().iushrn(f)},n.prototype.testn=function(f){r(typeof f=="number"&&f>=0);var p=f%26,_=(f-p)/26,x=1<<p;if(this.length<=_)return!1;var b=this.words[_];return!!(b&x)},n.prototype.imaskn=function(f){r(typeof f=="number"&&f>=0);var p=f%26,_=(f-p)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=_)return this;if(p!==0&&_++,this.length=Math.min(_,this.length),p!==0){var x=67108863^67108863>>>p<<p;this.words[this.length-1]&=x}return this.length===0&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.maskn=function(f){return this.clone().imaskn(f)},n.prototype.iaddn=function(f){return r(typeof f=="number"),r(f<67108864),f<0?this.isubn(-f):this.negative!==0?this.length===1&&(this.words[0]|0)<=f?(this.words[0]=f-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(f),this.negative=1,this):this._iaddn(f)},n.prototype._iaddn=function(f){this.words[0]+=f;for(var p=0;p<this.length&&this.words[p]>=67108864;p++)this.words[p]-=67108864,p===this.length-1?this.words[p+1]=1:this.words[p+1]++;return this.length=Math.max(this.length,p+1),this},n.prototype.isubn=function(f){if(r(typeof f=="number"),r(f<67108864),f<0)return this.iaddn(-f);if(this.negative!==0)return this.negative=0,this.iaddn(f),this.negative=1,this;if(this.words[0]-=f,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var p=0;p<this.length&&this.words[p]<0;p++)this.words[p]+=67108864,this.words[p+1]-=1;return this._strip()},n.prototype.addn=function(f){return this.clone().iaddn(f)},n.prototype.subn=function(f){return this.clone().isubn(f)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(f,p,_){var x=f.length+_,b;this._expand(x);var d,O=0;for(b=0;b<f.length;b++){d=(this.words[b+_]|0)+O;var T=(f.words[b]|0)*p;d-=T&67108863,O=(d>>26)-(T/67108864|0),this.words[b+_]=d&67108863}for(;b<this.length-_;b++)d=(this.words[b+_]|0)+O,O=d>>26,this.words[b+_]=d&67108863;if(O===0)return this._strip();for(r(O===-1),O=0,b=0;b<this.length;b++)d=-(this.words[b]|0)+O,O=d>>26,this.words[b]=d&67108863;return this.negative=1,this._strip()},n.prototype._wordDiv=function(f,p){var _=this.length-f.length,x=this.clone(),b=f,d=b.words[b.length-1]|0,O=this._countBits(d);_=26-O,_!==0&&(b=b.ushln(_),x.iushln(_),d=b.words[b.length-1]|0);var T=x.length-b.length,S;if(p!=="mod"){S=new n(null),S.length=T+1,S.words=new Array(S.length);for(var R=0;R<S.length;R++)S.words[R]=0}var Y=x.clone()._ishlnsubmul(b,1,T);Y.negative===0&&(x=Y,S&&(S.words[T]=1));for(var X=T-1;X>=0;X--){var ne=(x.words[b.length+X]|0)*67108864+(x.words[b.length+X-1]|0);for(ne=Math.min(ne/d|0,67108863),x._ishlnsubmul(b,ne,X);x.negative!==0;)ne--,x.negative=0,x._ishlnsubmul(b,1,X),x.isZero()||(x.negative^=1);S&&(S.words[X]=ne)}return S&&S._strip(),x._strip(),p!=="div"&&_!==0&&x.iushrn(_),{div:S||null,mod:x}},n.prototype.divmod=function(f,p,_){if(r(!f.isZero()),this.isZero())return{div:new n(0),mod:new n(0)};var x,b,d;return this.negative!==0&&f.negative===0?(d=this.neg().divmod(f,p),p!=="mod"&&(x=d.div.neg()),p!=="div"&&(b=d.mod.neg(),_&&b.negative!==0&&b.iadd(f)),{div:x,mod:b}):this.negative===0&&f.negative!==0?(d=this.divmod(f.neg(),p),p!=="mod"&&(x=d.div.neg()),{div:x,mod:d.mod}):(this.negative&f.negative)!==0?(d=this.neg().divmod(f.neg(),p),p!=="div"&&(b=d.mod.neg(),_&&b.negative!==0&&b.isub(f)),{div:d.div,mod:b}):f.length>this.length||this.cmp(f)<0?{div:new n(0),mod:this}:f.length===1?p==="div"?{div:this.divn(f.words[0]),mod:null}:p==="mod"?{div:null,mod:new n(this.modrn(f.words[0]))}:{div:this.divn(f.words[0]),mod:new n(this.modrn(f.words[0]))}:this._wordDiv(f,p)},n.prototype.div=function(f){return this.divmod(f,"div",!1).div},n.prototype.mod=function(f){return this.divmod(f,"mod",!1).mod},n.prototype.umod=function(f){return this.divmod(f,"mod",!0).mod},n.prototype.divRound=function(f){var p=this.divmod(f);if(p.mod.isZero())return p.div;var _=p.div.negative!==0?p.mod.isub(f):p.mod,x=f.ushrn(1),b=f.andln(1),d=_.cmp(x);return d<0||b===1&&d===0?p.div:p.div.negative!==0?p.div.isubn(1):p.div.iaddn(1)},n.prototype.modrn=function(f){var p=f<0;p&&(f=-f),r(f<=67108863);for(var _=(1<<26)%f,x=0,b=this.length-1;b>=0;b--)x=(_*x+(this.words[b]|0))%f;return p?-x:x},n.prototype.modn=function(f){return this.modrn(f)},n.prototype.idivn=function(f){var p=f<0;p&&(f=-f),r(f<=67108863);for(var _=0,x=this.length-1;x>=0;x--){var b=(this.words[x]|0)+_*67108864;this.words[x]=b/f|0,_=b%f}return this._strip(),p?this.ineg():this},n.prototype.divn=function(f){return this.clone().idivn(f)},n.prototype.egcd=function(f){r(f.negative===0),r(!f.isZero());var p=this,_=f.clone();p.negative!==0?p=p.umod(f):p=p.clone();for(var x=new n(1),b=new n(0),d=new n(0),O=new n(1),T=0;p.isEven()&&_.isEven();)p.iushrn(1),_.iushrn(1),++T;for(var S=_.clone(),R=p.clone();!p.isZero();){for(var Y=0,X=1;(p.words[0]&X)===0&&Y<26;++Y,X<<=1);if(Y>0)for(p.iushrn(Y);Y-- >0;)(x.isOdd()||b.isOdd())&&(x.iadd(S),b.isub(R)),x.iushrn(1),b.iushrn(1);for(var ne=0,ce=1;(_.words[0]&ce)===0&&ne<26;++ne,ce<<=1);if(ne>0)for(_.iushrn(ne);ne-- >0;)(d.isOdd()||O.isOdd())&&(d.iadd(S),O.isub(R)),d.iushrn(1),O.iushrn(1);p.cmp(_)>=0?(p.isub(_),x.isub(d),b.isub(O)):(_.isub(p),d.isub(x),O.isub(b))}return{a:d,b:O,gcd:_.iushln(T)}},n.prototype._invmp=function(f){r(f.negative===0),r(!f.isZero());var p=this,_=f.clone();p.negative!==0?p=p.umod(f):p=p.clone();for(var x=new n(1),b=new n(0),d=_.clone();p.cmpn(1)>0&&_.cmpn(1)>0;){for(var O=0,T=1;(p.words[0]&T)===0&&O<26;++O,T<<=1);if(O>0)for(p.iushrn(O);O-- >0;)x.isOdd()&&x.iadd(d),x.iushrn(1);for(var S=0,R=1;(_.words[0]&R)===0&&S<26;++S,R<<=1);if(S>0)for(_.iushrn(S);S-- >0;)b.isOdd()&&b.iadd(d),b.iushrn(1);p.cmp(_)>=0?(p.isub(_),x.isub(b)):(_.isub(p),b.isub(x))}var Y;return p.cmpn(1)===0?Y=x:Y=b,Y.cmpn(0)<0&&Y.iadd(f),Y},n.prototype.gcd=function(f){if(this.isZero())return f.abs();if(f.isZero())return this.abs();var p=this.clone(),_=f.clone();p.negative=0,_.negative=0;for(var x=0;p.isEven()&&_.isEven();x++)p.iushrn(1),_.iushrn(1);do{for(;p.isEven();)p.iushrn(1);for(;_.isEven();)_.iushrn(1);var b=p.cmp(_);if(b<0){var d=p;p=_,_=d}else if(b===0||_.cmpn(1)===0)break;p.isub(_)}while(!0);return _.iushln(x)},n.prototype.invm=function(f){return this.egcd(f).a.umod(f)},n.prototype.isEven=function(){return(this.words[0]&1)===0},n.prototype.isOdd=function(){return(this.words[0]&1)===1},n.prototype.andln=function(f){return this.words[0]&f},n.prototype.bincn=function(f){r(typeof f=="number");var p=f%26,_=(f-p)/26,x=1<<p;if(this.length<=_)return this._expand(_+1),this.words[_]|=x,this;for(var b=x,d=_;b!==0&&d<this.length;d++){var O=this.words[d]|0;O+=b,b=O>>>26,O&=67108863,this.words[d]=O}return b!==0&&(this.words[d]=b,this.length++),this},n.prototype.isZero=function(){return this.length===1&&this.words[0]===0},n.prototype.cmpn=function(f){var p=f<0;if(this.negative!==0&&!p)return-1;if(this.negative===0&&p)return 1;this._strip();var _;if(this.length>1)_=1;else{p&&(f=-f),r(f<=67108863,"Number is too big");var x=this.words[0]|0;_=x===f?0:x<f?-1:1}return this.negative!==0?-_|0:_},n.prototype.cmp=function(f){if(this.negative!==0&&f.negative===0)return-1;if(this.negative===0&&f.negative!==0)return 1;var p=this.ucmp(f);return this.negative!==0?-p|0:p},n.prototype.ucmp=function(f){if(this.length>f.length)return 1;if(this.length<f.length)return-1;for(var p=0,_=this.length-1;_>=0;_--){var x=this.words[_]|0,b=f.words[_]|0;if(x!==b){x<b?p=-1:x>b&&(p=1);break}}return p},n.prototype.gtn=function(f){return this.cmpn(f)===1},n.prototype.gt=function(f){return this.cmp(f)===1},n.prototype.gten=function(f){return this.cmpn(f)>=0},n.prototype.gte=function(f){return this.cmp(f)>=0},n.prototype.ltn=function(f){return this.cmpn(f)===-1},n.prototype.lt=function(f){return this.cmp(f)===-1},n.prototype.lten=function(f){return this.cmpn(f)<=0},n.prototype.lte=function(f){return this.cmp(f)<=0},n.prototype.eqn=function(f){return this.cmpn(f)===0},n.prototype.eq=function(f){return this.cmp(f)===0},n.red=function(f){return new g(f)},n.prototype.toRed=function(f){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),f.convertTo(this)._forceRed(f)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(f){return this.red=f,this},n.prototype.forceRed=function(f){return r(!this.red,"Already a number in reduction context"),this._forceRed(f)},n.prototype.redAdd=function(f){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,f)},n.prototype.redIAdd=function(f){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,f)},n.prototype.redSub=function(f){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,f)},n.prototype.redISub=function(f){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,f)},n.prototype.redShl=function(f){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,f)},n.prototype.redMul=function(f){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.mul(this,f)},n.prototype.redIMul=function(f){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.imul(this,f)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(f){return r(this.red&&!f.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,f)};var N={k256:null,p224:null,p192:null,p25519:null};function F(y,f){this.name=y,this.p=new n(f,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}F.prototype._tmp=function(){var f=new n(null);return f.words=new Array(Math.ceil(this.n/13)),f},F.prototype.ireduce=function(f){var p=f,_;do this.split(p,this.tmp),p=this.imulK(p),p=p.iadd(this.tmp),_=p.bitLength();while(_>this.n);var x=_<this.n?-1:p.ucmp(this.p);return x===0?(p.words[0]=0,p.length=1):x>0?p.isub(this.p):p.strip!==void 0?p.strip():p._strip(),p},F.prototype.split=function(f,p){f.iushrn(this.n,0,p)},F.prototype.imulK=function(f){return f.imul(this.k)};function H(){F.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(H,F),H.prototype.split=function(f,p){for(var _=4194303,x=Math.min(f.length,9),b=0;b<x;b++)p.words[b]=f.words[b];if(p.length=x,f.length<=9){f.words[0]=0,f.length=1;return}var d=f.words[9];for(p.words[p.length++]=d&_,b=10;b<f.length;b++){var O=f.words[b]|0;f.words[b-10]=(O&_)<<4|d>>>22,d=O}d>>>=22,f.words[b-10]=d,d===0&&f.length>10?f.length-=10:f.length-=9},H.prototype.imulK=function(f){f.words[f.length]=0,f.words[f.length+1]=0,f.length+=2;for(var p=0,_=0;_<f.length;_++){var x=f.words[_]|0;p+=x*977,f.words[_]=p&67108863,p=x*64+(p/67108864|0)}return f.words[f.length-1]===0&&(f.length--,f.words[f.length-1]===0&&f.length--),f};function z(){F.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(z,F);function V(){F.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(V,F);function B(){F.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(B,F),B.prototype.imulK=function(f){for(var p=0,_=0;_<f.length;_++){var x=(f.words[_]|0)*19+p,b=x&67108863;x>>>=26,f.words[_]=b,p=x}return p!==0&&(f.words[f.length++]=p),f},n._prime=function(f){if(N[f])return N[f];var p;if(f==="k256")p=new H;else if(f==="p224")p=new z;else if(f==="p192")p=new V;else if(f==="p25519")p=new B;else throw new Error("Unknown prime "+f);return N[f]=p,p};function g(y){if(typeof y=="string"){var f=n._prime(y);this.m=f.p,this.prime=f}else r(y.gtn(1),"modulus must be greater than 1"),this.m=y,this.prime=null}g.prototype._verify1=function(f){r(f.negative===0,"red works only with positives"),r(f.red,"red works only with red numbers")},g.prototype._verify2=function(f,p){r((f.negative|p.negative)===0,"red works only with positives"),r(f.red&&f.red===p.red,"red works only with red numbers")},g.prototype.imod=function(f){return this.prime?this.prime.ireduce(f)._forceRed(this):(c(f,f.umod(this.m)._forceRed(this)),f)},g.prototype.neg=function(f){return f.isZero()?f.clone():this.m.sub(f)._forceRed(this)},g.prototype.add=function(f,p){this._verify2(f,p);var _=f.add(p);return _.cmp(this.m)>=0&&_.isub(this.m),_._forceRed(this)},g.prototype.iadd=function(f,p){this._verify2(f,p);var _=f.iadd(p);return _.cmp(this.m)>=0&&_.isub(this.m),_},g.prototype.sub=function(f,p){this._verify2(f,p);var _=f.sub(p);return _.cmpn(0)<0&&_.iadd(this.m),_._forceRed(this)},g.prototype.isub=function(f,p){this._verify2(f,p);var _=f.isub(p);return _.cmpn(0)<0&&_.iadd(this.m),_},g.prototype.shl=function(f,p){return this._verify1(f),this.imod(f.ushln(p))},g.prototype.imul=function(f,p){return this._verify2(f,p),this.imod(f.imul(p))},g.prototype.mul=function(f,p){return this._verify2(f,p),this.imod(f.mul(p))},g.prototype.isqr=function(f){return this.imul(f,f.clone())},g.prototype.sqr=function(f){return this.mul(f,f)},g.prototype.sqrt=function(f){if(f.isZero())return f.clone();var p=this.m.andln(3);if(r(p%2===1),p===3){var _=this.m.add(new n(1)).iushrn(2);return this.pow(f,_)}for(var x=this.m.subn(1),b=0;!x.isZero()&&x.andln(1)===0;)b++,x.iushrn(1);r(!x.isZero());var d=new n(1).toRed(this),O=d.redNeg(),T=this.m.subn(1).iushrn(1),S=this.m.bitLength();for(S=new n(2*S*S).toRed(this);this.pow(S,T).cmp(O)!==0;)S.redIAdd(O);for(var R=this.pow(S,x),Y=this.pow(f,x.addn(1).iushrn(1)),X=this.pow(f,x),ne=b;X.cmp(d)!==0;){for(var ce=X,pe=0;ce.cmp(d)!==0;pe++)ce=ce.redSqr();r(pe<ne);var q=this.pow(R,new n(1).iushln(ne-pe-1));Y=Y.redMul(q),R=q.redSqr(),X=X.redMul(R),ne=pe}return Y},g.prototype.invm=function(f){var p=f._invmp(this.m);return p.negative!==0?(p.negative=0,this.imod(p).redNeg()):this.imod(p)},g.prototype.pow=function(f,p){if(p.isZero())return new n(1).toRed(this);if(p.cmpn(1)===0)return f.clone();var _=4,x=new Array(1<<_);x[0]=new n(1).toRed(this),x[1]=f;for(var b=2;b<x.length;b++)x[b]=this.mul(x[b-1],f);var d=x[0],O=0,T=0,S=p.bitLength()%26;for(S===0&&(S=26),b=p.length-1;b>=0;b--){for(var R=p.words[b],Y=S-1;Y>=0;Y--){var X=R>>Y&1;if(d!==x[0]&&(d=this.sqr(d)),X===0&&O===0){T=0;continue}O<<=1,O|=X,T++,!(T!==_&&(b!==0||Y!==0))&&(d=this.mul(d,x[O]),T=0,O=0)}S=26}return d},g.prototype.convertTo=function(f){var p=f.umod(this.m);return p===f?p.clone():p},g.prototype.convertFrom=function(f){var p=f.clone();return p.red=null,p},n.mont=function(f){return new I(f)};function I(y){g.call(this,y),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new n(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(I,g),I.prototype.convertTo=function(f){return this.imod(f.ushln(this.shift))},I.prototype.convertFrom=function(f){var p=this.imod(f.mul(this.rinv));return p.red=null,p},I.prototype.imul=function(f,p){if(f.isZero()||p.isZero())return f.words[0]=0,f.length=1,f;var _=f.imul(p),x=_.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),b=_.isub(x).iushrn(this.shift),d=b;return b.cmp(this.m)>=0?d=b.isub(this.m):b.cmpn(0)<0&&(d=b.iadd(this.m)),d._forceRed(this)},I.prototype.mul=function(f,p){if(f.isZero()||p.isZero())return new n(0)._forceRed(this);var _=f.mul(p),x=_.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),b=_.isub(x).iushrn(this.shift),d=b;return b.cmp(this.m)>=0?d=b.isub(this.m):b.cmpn(0)<0&&(d=b.iadd(this.m)),d._forceRed(this)},I.prototype.invm=function(f){var p=this.imod(f._invmp(this.m).mul(this.r2));return p._forceRed(this)}})(typeof Bm>"u"||Bm,BI)});var Mm=k((T1e,DI)=>{"use strict";v();var Rc=MI(),jY=bu(),zY=ot().Buffer;function CI(e){var t=e.modulus.byteLength(),r;do r=new Rc(jY(t));while(r.cmp(e.modulus)>=0||!r.umod(e.prime1)||!r.umod(e.prime2));return r}function KY(e){var t=CI(e),r=t.toRed(Rc.mont(e.modulus)).redPow(new Rc(e.publicExponent)).fromRed();return{blinder:r,unblinder:t.invm(e.modulus)}}function NI(e,t){var r=KY(t),i=t.modulus.byteLength(),n=new Rc(e).mul(r.blinder).umod(t.modulus),o=n.toRed(Rc.mont(t.prime1)),a=n.toRed(Rc.mont(t.prime2)),s=t.coefficient,u=t.prime1,c=t.prime2,l=o.redPow(t.exponent1).fromRed(),m=a.redPow(t.exponent2).fromRed(),w=l.isub(m).imul(s).umod(u).imul(c);return m.iadd(w).imul(r.unblinder).umod(t.modulus).toArrayLike(zY,"be",i)}NI.getr=CI;DI.exports=NI});var FI=k((R1e,UI)=>{v();var VY=Am(),Cm=bu(),GY=Hh(),LI=Tm(),qI=km(),Nm=Cn(),ZY=Rm(),WY=Mm(),Un=ot().Buffer;UI.exports=function(t,r,i){var n;t.padding?n=t.padding:i?n=1:n=4;var o=VY(t),a;if(n===4)a=YY(o,r);else if(n===1)a=$Y(o,r,i);else if(n===3){if(a=new Nm(r),a.cmp(o.modulus)>=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");return i?WY(a,o):ZY(a,o)};function YY(e,t){var r=e.modulus.byteLength(),i=t.length,n=GY("sha1").update(Un.alloc(0)).digest(),o=n.length,a=2*o;if(i>r-a-2)throw new Error("message too long");var s=Un.alloc(r-i-a-2),u=r-o-1,c=Cm(o),l=qI(Un.concat([n,s,Un.alloc(1,1),t],u),LI(c,u)),m=qI(c,LI(l,o));return new Nm(Un.concat([Un.alloc(1),m,l],r))}function $Y(e,t,r){var i=t.length,n=e.modulus.byteLength();if(i>n-11)throw new Error("message too long");var o;return r?o=Un.alloc(n-i-3,255):o=XY(n-i-3),new Nm(Un.concat([Un.from([0,r?1:2]),o,Un.alloc(1),t],n))}function XY(e){for(var t=Un.allocUnsafe(e),r=0,i=Cm(e*2),n=0,o;r<e;)n===i.length&&(i=Cm(e*2),n=0),o=i[n++],o&&(t[r++]=o);return t}});var VI=k((M1e,KI)=>{v();var JY=Am(),HI=Tm(),jI=km(),zI=Cn(),QY=Mm(),e$=Hh(),t$=Rm(),Qh=ot().Buffer;KI.exports=function(t,r,i){var n;t.padding?n=t.padding:i?n=1:n=4;var o=JY(t),a=o.modulus.byteLength();if(r.length>a||new zI(r).cmp(o.modulus)>=0)throw new Error("decryption error");var s;i?s=t$(new zI(r),o):s=QY(r,o);var u=Qh.alloc(a-s.length);if(s=Qh.concat([u,s],a),n===4)return r$(o,s);if(n===1)return i$(o,s,i);if(n===3)return s;throw new Error("unknown padding")};function r$(e,t){var r=e.modulus.byteLength(),i=e$("sha1").update(Qh.alloc(0)).digest(),n=i.length;if(t[0]!==0)throw new Error("decryption error");var o=t.slice(1,n+1),a=t.slice(n+1),s=jI(o,HI(a,n)),u=jI(a,HI(s,r-n-1));if(n$(i,u.slice(0,n)))throw new Error("decryption error");for(var c=n;u[c]===0;)c++;if(u[c++]!==1)throw new Error("decryption error");return u.slice(c)}function i$(e,t,r){for(var i=t.slice(0,2),n=2,o=0;t[n++]!==0;)if(n>=t.length){o++;break}var a=t.slice(2,n-1);if((i.toString("hex")!=="0002"&&!r||i.toString("hex")!=="0001"&&r)&&o++,a.length<8&&o++,o)throw new Error("decryption error");return t.slice(n)}function n$(e,t){e=Qh.from(e),t=Qh.from(t);var r=0,i=e.length;e.length!==t.length&&(r++,i=Math.min(e.length,t.length));for(var n=-1;++n<i;)r+=e[n]^t[n];return r}});var GI=k(Ku=>{v();Ku.publicEncrypt=FI();Ku.privateDecrypt=VI();Ku.privateEncrypt=function(t,r){return Ku.publicEncrypt(t,r,!0)};Ku.publicDecrypt=function(t,r){return Ku.privateDecrypt(t,r,!0)}});var rO=k(e0=>{"use strict";v();function ZI(){throw new Error(`secure random number generation not supported by this browser
|
|
13
|
+
})`)}catch{r=function(n){this._initNamed(n)}}return WW(r,t),r.prototype._initNamed=function(n){t.call(this,n)},new r(this)};Oc.prototype._getDecoder=function(t){return t=t||"der",this.decoders.hasOwnProperty(t)||(this.decoders[t]=this._createNamed(UE.decoders[t])),this.decoders[t]};Oc.prototype.decode=function(t,r,i){return this._getDecoder(r).decode(t,i)};Oc.prototype._getEncoder=function(t){return t=t||"der",this.encoders.hasOwnProperty(t)||(this.encoders[t]=this._createNamed(UE.encoders[t])),this.encoders[t]};Oc.prototype.encode=function(t,r,i){return this._getEncoder(r).encode(t,i)}});var zE=k(jE=>{v();var $W=Te();function cn(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}jE.Reporter=cn;cn.prototype.isError=function(t){return t instanceof Pc};cn.prototype.save=function(){var t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}};cn.prototype.restore=function(t){var r=this._reporterState;r.obj=t.obj,r.path=r.path.slice(0,t.pathLen)};cn.prototype.enterKey=function(t){return this._reporterState.path.push(t)};cn.prototype.exitKey=function(t){var r=this._reporterState;r.path=r.path.slice(0,t-1)};cn.prototype.leaveKey=function(t,r,i){var n=this._reporterState;this.exitKey(t),n.obj!==null&&(n.obj[r]=i)};cn.prototype.path=function(){return this._reporterState.path.join("/")};cn.prototype.enterObject=function(){var t=this._reporterState,r=t.obj;return t.obj={},r};cn.prototype.leaveObject=function(t){var r=this._reporterState,i=r.obj;return r.obj=t,i};cn.prototype.error=function(t){var r,i=this._reporterState,n=t instanceof Pc;if(n?r=t:r=new Pc(i.path.map(function(o){return"["+JSON.stringify(o)+"]"}).join(""),t.message||t,t.stack),!i.options.partial)throw r;return n||i.errors.push(r),r};cn.prototype.wrapResult=function(t){var r=this._reporterState;return r.options.partial?{result:this.isError(t)?null:t,errors:r.errors}:t};function Pc(e,t){this.path=e,this.rethrow(t)}$W(Pc,Error);Pc.prototype.rethrow=function(t){if(this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,Pc),!this.stack)try{throw new Error(this.message)}catch(r){this.stack=r.stack}return this}});var pm=k(dm=>{v();var XW=Te(),F2=Tc().Reporter,Jh=Kt().Buffer;function xo(e,t){if(F2.call(this,t),!Jh.isBuffer(e)){this.error("Input not Buffer");return}this.base=e,this.offset=0,this.length=e.length}XW(xo,F2);dm.DecoderBuffer=xo;xo.prototype.save=function(){return{offset:this.offset,reporter:F2.prototype.save.call(this)}};xo.prototype.restore=function(t){var r=new xo(this.base);return r.offset=t.offset,r.length=this.offset,this.offset=t.offset,F2.prototype.restore.call(this,t.reporter),r};xo.prototype.isEmpty=function(){return this.offset===this.length};xo.prototype.readUInt8=function(t){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(t||"DecoderBuffer overrun")};xo.prototype.skip=function(t,r){if(!(this.offset+t<=this.length))return this.error(r||"DecoderBuffer overrun");var i=new xo(this.base);return i._reporterState=this._reporterState,i.offset=this.offset,i.length=this.offset+t,this.offset+=t,i};xo.prototype.raw=function(t){return this.base.slice(t?t.offset:this.offset,this.length)};function U2(e,t){if(Array.isArray(e))this.length=0,this.value=e.map(function(r){return r instanceof U2||(r=new U2(r,t)),this.length+=r.length,r},this);else if(typeof e=="number"){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if(typeof e=="string")this.value=e,this.length=Jh.byteLength(e);else if(Jh.isBuffer(e))this.value=e,this.length=e.length;else return t.error("Unsupported type: "+typeof e)}dm.EncoderBuffer=U2;U2.prototype.join=function(t,r){return t||(t=new Jh(this.length)),r||(r=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(i){i.join(t,r),r+=i.length}):(typeof this.value=="number"?t[r]=this.value:typeof this.value=="string"?t.write(this.value,r):Jh.isBuffer(this.value)&&this.value.copy(t,r),r+=this.length)),t}});var GE=k((V0e,VE)=>{v();var JW=Tc().Reporter,QW=Tc().EncoderBuffer,eY=Tc().DecoderBuffer,yi=Rn(),KE=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],tY=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(KE),rY=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function Lt(e,t){var r={};this._baseState=r,r.enc=e,r.parent=t||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}VE.exports=Lt;var iY=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];Lt.prototype.clone=function(){var t=this._baseState,r={};iY.forEach(function(n){r[n]=t[n]});var i=new this.constructor(r.parent);return i._baseState=r,i};Lt.prototype._wrap=function(){var t=this._baseState;tY.forEach(function(r){this[r]=function(){var n=new this.constructor(this);return t.children.push(n),n[r].apply(n,arguments)}},this)};Lt.prototype._init=function(t){var r=this._baseState;yi(r.parent===null),t.call(this),r.children=r.children.filter(function(i){return i._baseState.parent===this},this),yi.equal(r.children.length,1,"Root node can have only one child")};Lt.prototype._useArgs=function(t){var r=this._baseState,i=t.filter(function(n){return n instanceof this.constructor},this);t=t.filter(function(n){return!(n instanceof this.constructor)},this),i.length!==0&&(yi(r.children===null),r.children=i,i.forEach(function(n){n._baseState.parent=this},this)),t.length!==0&&(yi(r.args===null),r.args=t,r.reverseArgs=t.map(function(n){if(typeof n!="object"||n.constructor!==Object)return n;var o={};return Object.keys(n).forEach(function(a){a==(a|0)&&(a|=0);var s=n[a];o[s]=a}),o}))};rY.forEach(function(e){Lt.prototype[e]=function(){var r=this._baseState;throw new Error(e+" not implemented for encoding: "+r.enc)}});KE.forEach(function(e){Lt.prototype[e]=function(){var r=this._baseState,i=Array.prototype.slice.call(arguments);return yi(r.tag===null),r.tag=e,this._useArgs(i),this}});Lt.prototype.use=function(t){yi(t);var r=this._baseState;return yi(r.use===null),r.use=t,this};Lt.prototype.optional=function(){var t=this._baseState;return t.optional=!0,this};Lt.prototype.def=function(t){var r=this._baseState;return yi(r.default===null),r.default=t,r.optional=!0,this};Lt.prototype.explicit=function(t){var r=this._baseState;return yi(r.explicit===null&&r.implicit===null),r.explicit=t,this};Lt.prototype.implicit=function(t){var r=this._baseState;return yi(r.explicit===null&&r.implicit===null),r.implicit=t,this};Lt.prototype.obj=function(){var t=this._baseState,r=Array.prototype.slice.call(arguments);return t.obj=!0,r.length!==0&&this._useArgs(r),this};Lt.prototype.key=function(t){var r=this._baseState;return yi(r.key===null),r.key=t,this};Lt.prototype.any=function(){var t=this._baseState;return t.any=!0,this};Lt.prototype.choice=function(t){var r=this._baseState;return yi(r.choice===null),r.choice=t,this._useArgs(Object.keys(t).map(function(i){return t[i]})),this};Lt.prototype.contains=function(t){var r=this._baseState;return yi(r.use===null),r.contains=t,this};Lt.prototype._decode=function(t,r){var i=this._baseState;if(i.parent===null)return t.wrapResult(i.children[0]._decode(t,r));var n=i.default,o=!0,a=null;if(i.key!==null&&(a=t.enterKey(i.key)),i.optional){var s=null;if(i.explicit!==null?s=i.explicit:i.implicit!==null?s=i.implicit:i.tag!==null&&(s=i.tag),s===null&&!i.any){var u=t.save();try{i.choice===null?this._decodeGeneric(i.tag,t,r):this._decodeChoice(t,r),o=!0}catch{o=!1}t.restore(u)}else if(o=this._peekTag(t,s,i.any),t.isError(o))return o}var c;if(i.obj&&o&&(c=t.enterObject()),o){if(i.explicit!==null){var l=this._decodeTag(t,i.explicit);if(t.isError(l))return l;t=l}var m=t.offset;if(i.use===null&&i.choice===null){if(i.any)var u=t.save();var w=this._decodeTag(t,i.implicit!==null?i.implicit:i.tag,i.any);if(t.isError(w))return w;i.any?n=t.raw(u):t=w}if(r&&r.track&&i.tag!==null&&r.track(t.path(),m,t.length,"tagged"),r&&r.track&&i.tag!==null&&r.track(t.path(),t.offset,t.length,"content"),i.any?n=n:i.choice===null?n=this._decodeGeneric(i.tag,t,r):n=this._decodeChoice(t,r),t.isError(n))return n;if(!i.any&&i.choice===null&&i.children!==null&&i.children.forEach(function(M){M._decode(t,r)}),i.contains&&(i.tag==="octstr"||i.tag==="bitstr")){var E=new eY(n);n=this._getUse(i.contains,t._reporterState.obj)._decode(E,r)}}return i.obj&&o&&(n=t.leaveObject(c)),i.key!==null&&(n!==null||o===!0)?t.leaveKey(a,i.key,n):a!==null&&t.exitKey(a),n};Lt.prototype._decodeGeneric=function(t,r,i){var n=this._baseState;return t==="seq"||t==="set"?null:t==="seqof"||t==="setof"?this._decodeList(r,t,n.args[0],i):/str$/.test(t)?this._decodeStr(r,t,i):t==="objid"&&n.args?this._decodeObjid(r,n.args[0],n.args[1],i):t==="objid"?this._decodeObjid(r,null,null,i):t==="gentime"||t==="utctime"?this._decodeTime(r,t,i):t==="null_"?this._decodeNull(r,i):t==="bool"?this._decodeBool(r,i):t==="objDesc"?this._decodeStr(r,t,i):t==="int"||t==="enum"?this._decodeInt(r,n.args&&n.args[0],i):n.use!==null?this._getUse(n.use,r._reporterState.obj)._decode(r,i):r.error("unknown tag: "+t)};Lt.prototype._getUse=function(t,r){var i=this._baseState;return i.useDecoder=this._use(t,r),yi(i.useDecoder._baseState.parent===null),i.useDecoder=i.useDecoder._baseState.children[0],i.implicit!==i.useDecoder._baseState.implicit&&(i.useDecoder=i.useDecoder.clone(),i.useDecoder._baseState.implicit=i.implicit),i.useDecoder};Lt.prototype._decodeChoice=function(t,r){var i=this._baseState,n=null,o=!1;return Object.keys(i.choice).some(function(a){var s=t.save(),u=i.choice[a];try{var c=u._decode(t,r);if(t.isError(c))return!1;n={type:a,value:c},o=!0}catch{return t.restore(s),!1}return!0},this),o?n:t.error("Choice not matched")};Lt.prototype._createEncoderBuffer=function(t){return new QW(t,this.reporter)};Lt.prototype._encode=function(t,r,i){var n=this._baseState;if(!(n.default!==null&&n.default===t)){var o=this._encodeValue(t,r,i);if(o!==void 0&&!this._skipDefault(o,r,i))return o}};Lt.prototype._encodeValue=function(t,r,i){var n=this._baseState;if(n.parent===null)return n.children[0]._encode(t,r||new JW);var u=null;if(this.reporter=r,n.optional&&t===void 0)if(n.default!==null)t=n.default;else return;var o=null,a=!1;if(n.any)u=this._createEncoderBuffer(t);else if(n.choice)u=this._encodeChoice(t,r);else if(n.contains)o=this._getUse(n.contains,i)._encode(t,r),a=!0;else if(n.children)o=n.children.map(function(m){if(m._baseState.tag==="null_")return m._encode(null,r,t);if(m._baseState.key===null)return r.error("Child should have a key");var w=r.enterKey(m._baseState.key);if(typeof t!="object")return r.error("Child expected, but input is not object");var E=m._encode(t[m._baseState.key],r,t);return r.leaveKey(w),E},this).filter(function(m){return m}),o=this._createEncoderBuffer(o);else if(n.tag==="seqof"||n.tag==="setof"){if(!(n.args&&n.args.length===1))return r.error("Too many args for : "+n.tag);if(!Array.isArray(t))return r.error("seqof/setof, but data is not Array");var s=this.clone();s._baseState.implicit=null,o=this._createEncoderBuffer(t.map(function(m){var w=this._baseState;return this._getUse(w.args[0],t)._encode(m,r)},s))}else n.use!==null?u=this._getUse(n.use,i)._encode(t,r):(o=this._encodePrimitive(n.tag,t),a=!0);var u;if(!n.any&&n.choice===null){var c=n.implicit!==null?n.implicit:n.tag,l=n.implicit===null?"universal":"context";c===null?n.use===null&&r.error("Tag could be omitted only for .use()"):n.use===null&&(u=this._encodeComposite(c,a,l,o))}return n.explicit!==null&&(u=this._encodeComposite(n.explicit,!1,"context",u)),u};Lt.prototype._encodeChoice=function(t,r){var i=this._baseState,n=i.choice[t.type];return n||yi(!1,t.type+" not found in "+JSON.stringify(Object.keys(i.choice))),n._encode(t.value,r)};Lt.prototype._encodePrimitive=function(t,r){var i=this._baseState;if(/str$/.test(t))return this._encodeStr(r,t);if(t==="objid"&&i.args)return this._encodeObjid(r,i.reverseArgs[0],i.args[1]);if(t==="objid")return this._encodeObjid(r,null,null);if(t==="gentime"||t==="utctime")return this._encodeTime(r,t);if(t==="null_")return this._encodeNull();if(t==="int"||t==="enum")return this._encodeInt(r,i.args&&i.reverseArgs[0]);if(t==="bool")return this._encodeBool(r);if(t==="objDesc")return this._encodeStr(r,t);throw new Error("Unsupported tag: "+t)};Lt.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)};Lt.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(t)}});var Tc=k(ZE=>{v();var H2=ZE;H2.Reporter=zE().Reporter;H2.DecoderBuffer=pm().DecoderBuffer;H2.EncoderBuffer=pm().EncoderBuffer;H2.Node=GE()});var YE=k(zu=>{v();var WE=gm();zu.tagClass={0:"universal",1:"application",2:"context",3:"private"};zu.tagClassByName=WE._reverse(zu.tagClass);zu.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"};zu.tagByName=WE._reverse(zu.tag)});var gm=k(XE=>{v();var $E=XE;$E._reverse=function(t){var r={};return Object.keys(t).forEach(function(i){(i|0)==i&&(i=i|0);var n=t[i];r[n]=i}),r};$E.der=YE()});var ym=k((Q0e,tI)=>{v();var nY=Te(),vm=Ac(),j2=vm.base,oY=vm.bignum,JE=vm.constants.der;function QE(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new qi,this.tree._init(e.body)}tI.exports=QE;QE.prototype.decode=function(t,r){return t instanceof j2.DecoderBuffer||(t=new j2.DecoderBuffer(t,r)),this.tree._decode(t,r)};function qi(e){j2.Node.call(this,"der",e)}nY(qi,j2.Node);qi.prototype._peekTag=function(t,r,i){if(t.isEmpty())return!1;var n=t.save(),o=mm(t,'Failed to peek tag: "'+r+'"');return t.isError(o)?o:(t.restore(n),o.tag===r||o.tagStr===r||o.tagStr+"of"===r||i)};qi.prototype._decodeTag=function(t,r,i){var n=mm(t,'Failed to decode tag of "'+r+'"');if(t.isError(n))return n;var o=eI(t,n.primitive,'Failed to get length of "'+r+'"');if(t.isError(o))return o;if(!i&&n.tag!==r&&n.tagStr!==r&&n.tagStr+"of"!==r)return t.error('Failed to match tag: "'+r+'"');if(n.primitive||o!==null)return t.skip(o,'Failed to match body of: "'+r+'"');var a=t.save(),s=this._skipUntilEnd(t,'Failed to skip indefinite length body: "'+this.tag+'"');return t.isError(s)?s:(o=t.offset-a.offset,t.restore(a),t.skip(o,'Failed to match body of: "'+r+'"'))};qi.prototype._skipUntilEnd=function(t,r){for(;;){var i=mm(t,r);if(t.isError(i))return i;var n=eI(t,i.primitive,r);if(t.isError(n))return n;var o;if(i.primitive||n!==null?o=t.skip(n):o=this._skipUntilEnd(t,r),t.isError(o))return o;if(i.tagStr==="end")break}};qi.prototype._decodeList=function(t,r,i,n){for(var o=[];!t.isEmpty();){var a=this._peekTag(t,"end");if(t.isError(a))return a;var s=i.decode(t,"der",n);if(t.isError(s)&&a)break;o.push(s)}return o};qi.prototype._decodeStr=function(t,r){if(r==="bitstr"){var i=t.readUInt8();return t.isError(i)?i:{unused:i,data:t.raw()}}else if(r==="bmpstr"){var n=t.raw();if(n.length%2===1)return t.error("Decoding of string type: bmpstr length mismatch");for(var o="",a=0;a<n.length/2;a++)o+=String.fromCharCode(n.readUInt16BE(a*2));return o}else if(r==="numstr"){var s=t.raw().toString("ascii");return this._isNumstr(s)?s:t.error("Decoding of string type: numstr unsupported characters")}else{if(r==="octstr")return t.raw();if(r==="objDesc")return t.raw();if(r==="printstr"){var u=t.raw().toString("ascii");return this._isPrintstr(u)?u:t.error("Decoding of string type: printstr unsupported characters")}else return/str$/.test(r)?t.raw().toString():t.error("Decoding of string type: "+r+" unsupported")}};qi.prototype._decodeObjid=function(t,r,i){for(var n,o=[],a=0;!t.isEmpty();){var s=t.readUInt8();a<<=7,a|=s&127,(s&128)===0&&(o.push(a),a=0)}s&128&&o.push(a);var u=o[0]/40|0,c=o[0]%40;if(i?n=o:n=[u,c].concat(o.slice(1)),r){var l=r[n.join(" ")];l===void 0&&(l=r[n.join(".")]),l!==void 0&&(n=l)}return n};qi.prototype._decodeTime=function(t,r){var i=t.raw().toString();if(r==="gentime")var n=i.slice(0,4)|0,o=i.slice(4,6)|0,a=i.slice(6,8)|0,s=i.slice(8,10)|0,u=i.slice(10,12)|0,c=i.slice(12,14)|0;else if(r==="utctime"){var n=i.slice(0,2)|0,o=i.slice(2,4)|0,a=i.slice(4,6)|0,s=i.slice(6,8)|0,u=i.slice(8,10)|0,c=i.slice(10,12)|0;n<70?n=2e3+n:n=1900+n}else return t.error("Decoding "+r+" time is not supported yet");return Date.UTC(n,o-1,a,s,u,c,0)};qi.prototype._decodeNull=function(t){return null};qi.prototype._decodeBool=function(t){var r=t.readUInt8();return t.isError(r)?r:r!==0};qi.prototype._decodeInt=function(t,r){var i=t.raw(),n=new oY(i);return r&&(n=r[n.toString(10)]||n),n};qi.prototype._use=function(t,r){return typeof t=="function"&&(t=t(r)),t._getDecoder("der").tree};function mm(e,t){var r=e.readUInt8(t);if(e.isError(r))return r;var i=JE.tagClass[r>>6],n=(r&32)===0;if((r&31)===31){var o=r;for(r=0;(o&128)===128;){if(o=e.readUInt8(t),e.isError(o))return o;r<<=7,r|=o&127}}else r&=31;var a=JE.tag[r];return{cls:i,primitive:n,tag:r,tagStr:a}}function eI(e,t,r){var i=e.readUInt8(r);if(e.isError(i))return i;if(!t&&i===128)return null;if((i&128)===0)return i;var n=i&127;if(n>4)return e.error("length octect is too long");i=0;for(var o=0;o<n;o++){i<<=8;var a=e.readUInt8(r);if(e.isError(a))return a;i|=a}return i}});var iI=k((t1e,rI)=>{v();var aY=Te(),sY=Kt().Buffer,bm=ym();function _m(e){bm.call(this,e),this.enc="pem"}aY(_m,bm);rI.exports=_m;_m.prototype.decode=function(t,r){for(var i=t.toString().split(/[\r\n]+/g),n=r.label.toUpperCase(),o=/^-----(BEGIN|END) ([^-]+)-----$/,a=-1,s=-1,u=0;u<i.length;u++){var c=i[u].match(o);if(c!==null&&c[2]===n)if(a===-1){if(c[1]!=="BEGIN")break;a=u}else{if(c[1]!=="END")break;s=u;break}}if(a===-1||s===-1)throw new Error("PEM section not found for: "+n);var l=i.slice(a+1,s).join("");l.replace(/[^a-z0-9\+\/=]+/gi,"");var m=new sY(l,"base64");return bm.prototype.decode.call(this,m,r)}});var aI=k(oI=>{v();var nI=oI;nI.der=ym();nI.pem=iI()});var Sm=k((o1e,cI)=>{v();var uY=Te(),Sa=Kt().Buffer,sI=Ac(),uI=sI.base,wm=sI.constants.der;function fI(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new Nn,this.tree._init(e.body)}cI.exports=fI;fI.prototype.encode=function(t,r){return this.tree._encode(t,r).join()};function Nn(e){uI.Node.call(this,"der",e)}uY(Nn,uI.Node);Nn.prototype._encodeComposite=function(t,r,i,n){var o=fY(t,r,i,this.reporter);if(n.length<128){var u=new Sa(2);return u[0]=o,u[1]=n.length,this._createEncoderBuffer([u,n])}for(var a=1,s=n.length;s>=256;s>>=8)a++;var u=new Sa(2+a);u[0]=o,u[1]=128|a;for(var s=1+a,c=n.length;c>0;s--,c>>=8)u[s]=c&255;return this._createEncoderBuffer([u,n])};Nn.prototype._encodeStr=function(t,r){if(r==="bitstr")return this._createEncoderBuffer([t.unused|0,t.data]);if(r==="bmpstr"){for(var i=new Sa(t.length*2),n=0;n<t.length;n++)i.writeUInt16BE(t.charCodeAt(n),n*2);return this._createEncoderBuffer(i)}else return r==="numstr"?this._isNumstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: numstr supports only digits and space"):r==="printstr"?this._isPrintstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(r)?this._createEncoderBuffer(t):r==="objDesc"?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: "+r+" unsupported")};Nn.prototype._encodeObjid=function(t,r,i){if(typeof t=="string"){if(!r)return this.reporter.error("string objid given, but no values map found");if(!r.hasOwnProperty(t))return this.reporter.error("objid not found in values map");t=r[t].split(/[\s\.]+/g);for(var n=0;n<t.length;n++)t[n]|=0}else if(Array.isArray(t)){t=t.slice();for(var n=0;n<t.length;n++)t[n]|=0}if(!Array.isArray(t))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(t));if(!i){if(t[1]>=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,t[0]*40+t[1])}for(var o=0,n=0;n<t.length;n++){var a=t[n];for(o++;a>=128;a>>=7)o++}for(var s=new Sa(o),u=s.length-1,n=t.length-1;n>=0;n--){var a=t[n];for(s[u--]=a&127;(a>>=7)>0;)s[u--]=128|a&127}return this._createEncoderBuffer(s)};function ln(e){return e<10?"0"+e:e}Nn.prototype._encodeTime=function(t,r){var i,n=new Date(t);return r==="gentime"?i=[ln(n.getFullYear()),ln(n.getUTCMonth()+1),ln(n.getUTCDate()),ln(n.getUTCHours()),ln(n.getUTCMinutes()),ln(n.getUTCSeconds()),"Z"].join(""):r==="utctime"?i=[ln(n.getFullYear()%100),ln(n.getUTCMonth()+1),ln(n.getUTCDate()),ln(n.getUTCHours()),ln(n.getUTCMinutes()),ln(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+r+" time is not supported yet"),this._encodeStr(i,"octstr")};Nn.prototype._encodeNull=function(){return this._createEncoderBuffer("")};Nn.prototype._encodeInt=function(t,r){if(typeof t=="string"){if(!r)return this.reporter.error("String int or enum given, but no values map");if(!r.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=r[t]}if(typeof t!="number"&&!Sa.isBuffer(t)){var i=t.toArray();!t.sign&&i[0]&128&&i.unshift(0),t=new Sa(i)}if(Sa.isBuffer(t)){var n=t.length;t.length===0&&n++;var a=new Sa(n);return t.copy(a),t.length===0&&(a[0]=0),this._createEncoderBuffer(a)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);for(var n=1,o=t;o>=256;o>>=8)n++;for(var a=new Array(n),o=a.length-1;o>=0;o--)a[o]=t&255,t>>=8;return a[0]&128&&a.unshift(0),this._createEncoderBuffer(new Sa(a))};Nn.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)};Nn.prototype._use=function(t,r){return typeof t=="function"&&(t=t(r)),t._getEncoder("der").tree};Nn.prototype._skipDefault=function(t,r,i){var n=this._baseState,o;if(n.default===null)return!1;var a=t.join();if(n.defaultBuffer===void 0&&(n.defaultBuffer=this._encodeValue(n.default,r,i).join()),a.length!==n.defaultBuffer.length)return!1;for(o=0;o<a.length;o++)if(a[o]!==n.defaultBuffer[o])return!1;return!0};function fY(e,t,r,i){var n;if(e==="seqof"?e="seq":e==="setof"&&(e="set"),wm.tagByName.hasOwnProperty(e))n=wm.tagByName[e];else if(typeof e=="number"&&(e|0)===e)n=e;else return i.error("Unknown tag: "+e);return n>=31?i.error("Multi-octet tag encoding unsupported"):(t||(n|=32),n|=wm.tagClassByName[r||"universal"]<<6,n)}});var hI=k((s1e,lI)=>{v();var cY=Te(),xm=Sm();function Em(e){xm.call(this,e),this.enc="pem"}cY(Em,xm);lI.exports=Em;Em.prototype.encode=function(t,r){for(var i=xm.prototype.encode.call(this,t),n=i.toString("base64"),o=["-----BEGIN "+r.label+"-----"],a=0;a<n.length;a+=64)o.push(n.slice(a,a+64));return o.push("-----END "+r.label+"-----"),o.join(`
|
|
14
|
+
`)}});var gI=k(pI=>{v();var dI=pI;dI.der=Sm();dI.pem=hI()});var Ac=k(vI=>{v();var kc=vI;kc.bignum=Cn();kc.define=HE().define;kc.base=Tc();kc.constants=gm();kc.decoders=aI();kc.encoders=gI()});var _I=k((d1e,bI)=>{"use strict";v();var Dn=Ac(),mI=Dn.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),lY=Dn.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),Im=Dn.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),hY=Dn.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(Im),this.key("subjectPublicKey").bitstr())}),dY=Dn.define("RelativeDistinguishedName",function(){this.setof(lY)}),pY=Dn.define("RDNSequence",function(){this.seqof(dY)}),yI=Dn.define("Name",function(){this.choice({rdnSequence:this.use(pY)})}),gY=Dn.define("Validity",function(){this.seq().obj(this.key("notBefore").use(mI),this.key("notAfter").use(mI))}),vY=Dn.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),mY=Dn.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(Im),this.key("issuer").use(yI),this.key("validity").use(gY),this.key("subject").use(yI),this.key("subjectPublicKeyInfo").use(hY),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(vY).optional())}),yY=Dn.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(mY),this.key("signatureAlgorithm").use(Im),this.key("signatureValue").bitstr())});bI.exports=yY});var SI=k(qn=>{"use strict";v();var Ln=Ac();qn.certificate=_I();var bY=Ln.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});qn.RSAPrivateKey=bY;var _Y=Ln.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});qn.RSAPublicKey=_Y;var wI=Ln.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),wY=Ln.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(wI),this.key("subjectPublicKey").bitstr())});qn.PublicKey=wY;var SY=Ln.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(wI),this.key("subjectPrivateKey").octstr())});qn.PrivateKey=SY;var xY=Ln.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});qn.EncryptedPrivateKey=xY;var EY=Ln.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});qn.DSAPrivateKey=EY;qn.DSAparam=Ln.define("DSAparam",function(){this.int()});var IY=Ln.define("ECParameters",function(){this.choice({namedCurve:this.objid()})}),OY=Ln.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(IY),this.key("publicKey").optional().explicit(1).bitstr())});qn.ECPrivateKey=OY;qn.signature=Ln.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})});var xI=k((m1e,AY)=>{AY.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}});var II=k((y1e,EI)=>{"use strict";v();var PY=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,TY=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,kY=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,RY=Yh(),BY=D2(),z2=ot().Buffer;EI.exports=function(e,t){var r=e.toString(),i=r.match(PY),n;if(i){var a="aes"+i[1],s=z2.from(i[2],"hex"),u=z2.from(i[3].replace(/[\r\n]/g,""),"base64"),c=RY(t,s.slice(0,8),parseInt(i[1],10)).key,l=[],m=BY.createDecipheriv(a,c,s);l.push(m.update(u)),l.push(m.final()),n=z2.concat(l)}else{var o=r.match(kY);n=z2.from(o[2].replace(/[\r\n]/g,""),"base64")}var w=r.match(TY)[1];return{tag:w,data:n}}});var Am=k((_1e,AI)=>{"use strict";v();var Ti=SI(),MY=xI(),CY=II(),NY=D2(),DY=Dv().pbkdf2Sync,Om=ot().Buffer;function LY(e,t){var r=e.algorithm.decrypt.kde.kdeparams.salt,i=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),n=MY[e.algorithm.decrypt.cipher.algo.join(".")],o=e.algorithm.decrypt.cipher.iv,a=e.subjectPrivateKey,s=parseInt(n.split("-")[1],10)/8,u=DY(t,r,i,s,"sha1"),c=NY.createDecipheriv(n,u,o),l=[];return l.push(c.update(a)),l.push(c.final()),Om.concat(l)}function OI(e){var t;typeof e=="object"&&!Om.isBuffer(e)&&(t=e.passphrase,e=e.key),typeof e=="string"&&(e=Om.from(e));var r=CY(e,t),i=r.tag,n=r.data,o,a;switch(i){case"CERTIFICATE":a=Ti.certificate.decode(n,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(a||(a=Ti.PublicKey.decode(n,"der")),o=a.algorithm.algorithm.join("."),o){case"1.2.840.113549.1.1.1":return Ti.RSAPublicKey.decode(a.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return a.subjectPrivateKey=a.subjectPublicKey,{type:"ec",data:a};case"1.2.840.10040.4.1":return a.algorithm.params.pub_key=Ti.DSAparam.decode(a.subjectPublicKey.data,"der"),{type:"dsa",data:a.algorithm.params};default:throw new Error("unknown key id "+o)}case"ENCRYPTED PRIVATE KEY":n=Ti.EncryptedPrivateKey.decode(n,"der"),n=LY(n,t);case"PRIVATE KEY":switch(a=Ti.PrivateKey.decode(n,"der"),o=a.algorithm.algorithm.join("."),o){case"1.2.840.113549.1.1.1":return Ti.RSAPrivateKey.decode(a.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:a.algorithm.curve,privateKey:Ti.ECPrivateKey.decode(a.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return a.algorithm.params.priv_key=Ti.DSAparam.decode(a.subjectPrivateKey,"der"),{type:"dsa",params:a.algorithm.params};default:throw new Error("unknown key id "+o)}case"RSA PUBLIC KEY":return Ti.RSAPublicKey.decode(n,"der");case"RSA PRIVATE KEY":return Ti.RSAPrivateKey.decode(n,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:Ti.DSAPrivateKey.decode(n,"der")};case"EC PRIVATE KEY":return n=Ti.ECPrivateKey.decode(n,"der"),{curve:n.parameters.value,privateKey:n.privateKey};default:throw new Error("unknown key type "+i)}}OI.signature=Ti.signature;AI.exports=OI});var Tm=k((S1e,PI)=>{v();var qY=Hh(),Pm=ot().Buffer;PI.exports=function(e,t){for(var r=Pm.alloc(0),i=0,n;r.length<t;)n=UY(i++),r=Pm.concat([r,qY("sha1").update(e).update(n).digest()]);return r.slice(0,t)};function UY(e){var t=Pm.allocUnsafe(4);return t.writeUInt32BE(e,0),t}});var km=k((E1e,TI)=>{v();TI.exports=function(t,r){for(var i=t.length,n=-1;++n<i;)t[n]^=r[n];return t}});var Rm=k((O1e,RI)=>{v();var kI=Cn(),FY=ot().Buffer;function HY(e,t){return FY.from(e.toRed(kI.mont(t.modulus)).redPow(new kI(t.publicExponent)).fromRed().toArray())}RI.exports=HY});var MI=k((BI,Bm)=>{v();(function(e,t){"use strict";function r(y,f){if(!y)throw new Error(f||"Assertion failed")}function i(y,f){y.super_=f;var p=function(){};p.prototype=f.prototype,y.prototype=new p,y.prototype.constructor=y}function n(y,f,p){if(n.isBN(y))return y;this.negative=0,this.words=null,this.length=0,this.red=null,y!==null&&((f==="le"||f==="be")&&(p=f,f=10),this._init(y||0,f||10,p||"be"))}typeof e=="object"?e.exports=n:t.BN=n,n.BN=n,n.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=Kt().Buffer}catch{}n.isBN=function(f){return f instanceof n?!0:f!==null&&typeof f=="object"&&f.constructor.wordSize===n.wordSize&&Array.isArray(f.words)},n.max=function(f,p){return f.cmp(p)>0?f:p},n.min=function(f,p){return f.cmp(p)<0?f:p},n.prototype._init=function(f,p,_){if(typeof f=="number")return this._initNumber(f,p,_);if(typeof f=="object")return this._initArray(f,p,_);p==="hex"&&(p=16),r(p===(p|0)&&p>=2&&p<=36),f=f.toString().replace(/\s+/g,"");var x=0;f[0]==="-"&&(x++,this.negative=1),x<f.length&&(p===16?this._parseHex(f,x,_):(this._parseBase(f,p,x),_==="le"&&this._initArray(this.toArray(),p,_)))},n.prototype._initNumber=function(f,p,_){f<0&&(this.negative=1,f=-f),f<67108864?(this.words=[f&67108863],this.length=1):f<4503599627370496?(this.words=[f&67108863,f/67108864&67108863],this.length=2):(r(f<9007199254740992),this.words=[f&67108863,f/67108864&67108863,1],this.length=3),_==="le"&&this._initArray(this.toArray(),p,_)},n.prototype._initArray=function(f,p,_){if(r(typeof f.length=="number"),f.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(f.length/3),this.words=new Array(this.length);for(var x=0;x<this.length;x++)this.words[x]=0;var b,d,O=0;if(_==="be")for(x=f.length-1,b=0;x>=0;x-=3)d=f[x]|f[x-1]<<8|f[x-2]<<16,this.words[b]|=d<<O&67108863,this.words[b+1]=d>>>26-O&67108863,O+=24,O>=26&&(O-=26,b++);else if(_==="le")for(x=0,b=0;x<f.length;x+=3)d=f[x]|f[x+1]<<8|f[x+2]<<16,this.words[b]|=d<<O&67108863,this.words[b+1]=d>>>26-O&67108863,O+=24,O>=26&&(O-=26,b++);return this._strip()};function a(y,f){var p=y.charCodeAt(f);if(p>=48&&p<=57)return p-48;if(p>=65&&p<=70)return p-55;if(p>=97&&p<=102)return p-87;r(!1,"Invalid character in "+y)}function s(y,f,p){var _=a(y,p);return p-1>=f&&(_|=a(y,p-1)<<4),_}n.prototype._parseHex=function(f,p,_){this.length=Math.ceil((f.length-p)/6),this.words=new Array(this.length);for(var x=0;x<this.length;x++)this.words[x]=0;var b=0,d=0,O;if(_==="be")for(x=f.length-1;x>=p;x-=2)O=s(f,p,x)<<b,this.words[d]|=O&67108863,b>=18?(b-=18,d+=1,this.words[d]|=O>>>26):b+=8;else{var T=f.length-p;for(x=T%2===0?p+1:p;x<f.length;x+=2)O=s(f,p,x)<<b,this.words[d]|=O&67108863,b>=18?(b-=18,d+=1,this.words[d]|=O>>>26):b+=8}this._strip()};function u(y,f,p,_){for(var x=0,b=0,d=Math.min(y.length,p),O=f;O<d;O++){var T=y.charCodeAt(O)-48;x*=_,T>=49?b=T-49+10:T>=17?b=T-17+10:b=T,r(T>=0&&b<_,"Invalid character"),x+=b}return x}n.prototype._parseBase=function(f,p,_){this.words=[0],this.length=1;for(var x=0,b=1;b<=67108863;b*=p)x++;x--,b=b/p|0;for(var d=f.length-_,O=d%x,T=Math.min(d,d-O)+_,S=0,R=_;R<T;R+=x)S=u(f,R,R+x,p),this.imuln(b),this.words[0]+S<67108864?this.words[0]+=S:this._iaddn(S);if(O!==0){var Y=1;for(S=u(f,R,f.length,p),R=0;R<O;R++)Y*=p;this.imuln(Y),this.words[0]+S<67108864?this.words[0]+=S:this._iaddn(S)}this._strip()},n.prototype.copy=function(f){f.words=new Array(this.length);for(var p=0;p<this.length;p++)f.words[p]=this.words[p];f.length=this.length,f.negative=this.negative,f.red=this.red};function c(y,f){y.words=f.words,y.length=f.length,y.negative=f.negative,y.red=f.red}if(n.prototype._move=function(f){c(f,this)},n.prototype.clone=function(){var f=new n(null);return this.copy(f),f},n.prototype._expand=function(f){for(;this.length<f;)this.words[this.length++]=0;return this},n.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},n.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{n.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch{n.prototype.inspect=l}else n.prototype.inspect=l;function l(){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"],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],E=[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];n.prototype.toString=function(f,p){f=f||10,p=p|0||1;var _;if(f===16||f==="hex"){_="";for(var x=0,b=0,d=0;d<this.length;d++){var O=this.words[d],T=((O<<x|b)&16777215).toString(16);b=O>>>24-x&16777215,x+=2,x>=26&&(x-=26,d--),b!==0||d!==this.length-1?_=m[6-T.length]+T+_:_=T+_}for(b!==0&&(_=b.toString(16)+_);_.length%p!==0;)_="0"+_;return this.negative!==0&&(_="-"+_),_}if(f===(f|0)&&f>=2&&f<=36){var S=w[f],R=E[f];_="";var Y=this.clone();for(Y.negative=0;!Y.isZero();){var X=Y.modrn(R).toString(f);Y=Y.idivn(R),Y.isZero()?_=X+_:_=m[S-X.length]+X+_}for(this.isZero()&&(_="0"+_);_.length%p!==0;)_="0"+_;return this.negative!==0&&(_="-"+_),_}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var f=this.words[0];return this.length===2?f+=this.words[1]*67108864:this.length===3&&this.words[2]===1?f+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-f:f},n.prototype.toJSON=function(){return this.toString(16,2)},o&&(n.prototype.toBuffer=function(f,p){return this.toArrayLike(o,f,p)}),n.prototype.toArray=function(f,p){return this.toArrayLike(Array,f,p)};var P=function(f,p){return f.allocUnsafe?f.allocUnsafe(p):new f(p)};n.prototype.toArrayLike=function(f,p,_){this._strip();var x=this.byteLength(),b=_||Math.max(1,x);r(x<=b,"byte array longer than desired length"),r(b>0,"Requested array length <= 0");var d=P(f,b),O=p==="le"?"LE":"BE";return this["_toArrayLike"+O](d,x),d},n.prototype._toArrayLikeLE=function(f,p){for(var _=0,x=0,b=0,d=0;b<this.length;b++){var O=this.words[b]<<d|x;f[_++]=O&255,_<f.length&&(f[_++]=O>>8&255),_<f.length&&(f[_++]=O>>16&255),d===6?(_<f.length&&(f[_++]=O>>24&255),x=0,d=0):(x=O>>>24,d+=2)}if(_<f.length)for(f[_++]=x;_<f.length;)f[_++]=0},n.prototype._toArrayLikeBE=function(f,p){for(var _=f.length-1,x=0,b=0,d=0;b<this.length;b++){var O=this.words[b]<<d|x;f[_--]=O&255,_>=0&&(f[_--]=O>>8&255),_>=0&&(f[_--]=O>>16&255),d===6?(_>=0&&(f[_--]=O>>24&255),x=0,d=0):(x=O>>>24,d+=2)}if(_>=0)for(f[_--]=x;_>=0;)f[_--]=0},Math.clz32?n.prototype._countBits=function(f){return 32-Math.clz32(f)}:n.prototype._countBits=function(f){var p=f,_=0;return p>=4096&&(_+=13,p>>>=13),p>=64&&(_+=7,p>>>=7),p>=8&&(_+=4,p>>>=4),p>=2&&(_+=2,p>>>=2),_+p},n.prototype._zeroBits=function(f){if(f===0)return 26;var p=f,_=0;return(p&8191)===0&&(_+=13,p>>>=13),(p&127)===0&&(_+=7,p>>>=7),(p&15)===0&&(_+=4,p>>>=4),(p&3)===0&&(_+=2,p>>>=2),(p&1)===0&&_++,_},n.prototype.bitLength=function(){var f=this.words[this.length-1],p=this._countBits(f);return(this.length-1)*26+p};function M(y){for(var f=new Array(y.bitLength()),p=0;p<f.length;p++){var _=p/26|0,x=p%26;f[p]=y.words[_]>>>x&1}return f}n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var f=0,p=0;p<this.length;p++){var _=this._zeroBits(this.words[p]);if(f+=_,_!==26)break}return f},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(f){return this.negative!==0?this.abs().inotn(f).iaddn(1):this.clone()},n.prototype.fromTwos=function(f){return this.testn(f-1)?this.notn(f).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return this.negative!==0},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(f){for(;this.length<f.length;)this.words[this.length++]=0;for(var p=0;p<f.length;p++)this.words[p]=this.words[p]|f.words[p];return this._strip()},n.prototype.ior=function(f){return r((this.negative|f.negative)===0),this.iuor(f)},n.prototype.or=function(f){return this.length>f.length?this.clone().ior(f):f.clone().ior(this)},n.prototype.uor=function(f){return this.length>f.length?this.clone().iuor(f):f.clone().iuor(this)},n.prototype.iuand=function(f){var p;this.length>f.length?p=f:p=this;for(var _=0;_<p.length;_++)this.words[_]=this.words[_]&f.words[_];return this.length=p.length,this._strip()},n.prototype.iand=function(f){return r((this.negative|f.negative)===0),this.iuand(f)},n.prototype.and=function(f){return this.length>f.length?this.clone().iand(f):f.clone().iand(this)},n.prototype.uand=function(f){return this.length>f.length?this.clone().iuand(f):f.clone().iuand(this)},n.prototype.iuxor=function(f){var p,_;this.length>f.length?(p=this,_=f):(p=f,_=this);for(var x=0;x<_.length;x++)this.words[x]=p.words[x]^_.words[x];if(this!==p)for(;x<p.length;x++)this.words[x]=p.words[x];return this.length=p.length,this._strip()},n.prototype.ixor=function(f){return r((this.negative|f.negative)===0),this.iuxor(f)},n.prototype.xor=function(f){return this.length>f.length?this.clone().ixor(f):f.clone().ixor(this)},n.prototype.uxor=function(f){return this.length>f.length?this.clone().iuxor(f):f.clone().iuxor(this)},n.prototype.inotn=function(f){r(typeof f=="number"&&f>=0);var p=Math.ceil(f/26)|0,_=f%26;this._expand(p),_>0&&p--;for(var x=0;x<p;x++)this.words[x]=~this.words[x]&67108863;return _>0&&(this.words[x]=~this.words[x]&67108863>>26-_),this._strip()},n.prototype.notn=function(f){return this.clone().inotn(f)},n.prototype.setn=function(f,p){r(typeof f=="number"&&f>=0);var _=f/26|0,x=f%26;return this._expand(_+1),p?this.words[_]=this.words[_]|1<<x:this.words[_]=this.words[_]&~(1<<x),this._strip()},n.prototype.iadd=function(f){var p;if(this.negative!==0&&f.negative===0)return this.negative=0,p=this.isub(f),this.negative^=1,this._normSign();if(this.negative===0&&f.negative!==0)return f.negative=0,p=this.isub(f),f.negative=1,p._normSign();var _,x;this.length>f.length?(_=this,x=f):(_=f,x=this);for(var b=0,d=0;d<x.length;d++)p=(_.words[d]|0)+(x.words[d]|0)+b,this.words[d]=p&67108863,b=p>>>26;for(;b!==0&&d<_.length;d++)p=(_.words[d]|0)+b,this.words[d]=p&67108863,b=p>>>26;if(this.length=_.length,b!==0)this.words[this.length]=b,this.length++;else if(_!==this)for(;d<_.length;d++)this.words[d]=_.words[d];return this},n.prototype.add=function(f){var p;return f.negative!==0&&this.negative===0?(f.negative=0,p=this.sub(f),f.negative^=1,p):f.negative===0&&this.negative!==0?(this.negative=0,p=f.sub(this),this.negative=1,p):this.length>f.length?this.clone().iadd(f):f.clone().iadd(this)},n.prototype.isub=function(f){if(f.negative!==0){f.negative=0;var p=this.iadd(f);return f.negative=1,p._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(f),this.negative=1,this._normSign();var _=this.cmp(f);if(_===0)return this.negative=0,this.length=1,this.words[0]=0,this;var x,b;_>0?(x=this,b=f):(x=f,b=this);for(var d=0,O=0;O<b.length;O++)p=(x.words[O]|0)-(b.words[O]|0)+d,d=p>>26,this.words[O]=p&67108863;for(;d!==0&&O<x.length;O++)p=(x.words[O]|0)+d,d=p>>26,this.words[O]=p&67108863;if(d===0&&O<x.length&&x!==this)for(;O<x.length;O++)this.words[O]=x.words[O];return this.length=Math.max(this.length,O),x!==this&&(this.negative=1),this._strip()},n.prototype.sub=function(f){return this.clone().isub(f)};function D(y,f,p){p.negative=f.negative^y.negative;var _=y.length+f.length|0;p.length=_,_=_-1|0;var x=y.words[0]|0,b=f.words[0]|0,d=x*b,O=d&67108863,T=d/67108864|0;p.words[0]=O;for(var S=1;S<_;S++){for(var R=T>>>26,Y=T&67108863,X=Math.min(S,f.length-1),ne=Math.max(0,S-y.length+1);ne<=X;ne++){var ce=S-ne|0;x=y.words[ce]|0,b=f.words[ne]|0,d=x*b+Y,R+=d/67108864|0,Y=d&67108863}p.words[S]=Y|0,T=R|0}return T!==0?p.words[S]=T|0:p.length--,p._strip()}var L=function(f,p,_){var x=f.words,b=p.words,d=_.words,O=0,T,S,R,Y=x[0]|0,X=Y&8191,ne=Y>>>13,ce=x[1]|0,pe=ce&8191,q=ce>>>13,W=x[2]|0,$=W&8191,ee=W>>>13,se=x[3]|0,ue=se&8191,le=se>>>13,Pe=x[4]|0,ge=Pe&8191,ve=Pe>>>13,sr=x[5]|0,xe=sr&8191,ye=sr>>>13,Be=x[6]|0,be=Be&8191,_e=Be>>>13,Qi=x[7]|0,Ce=Qi&8191,Re=Qi>>>13,Js=x[8]|0,De=Js&8191,qe=Js>>>13,Wl=x[9]|0,Ue=Wl&8191,Fe=Wl>>>13,Yl=b[0]|0,He=Yl&8191,je=Yl>>>13,$l=b[1]|0,ze=$l&8191,Ke=$l>>>13,Xl=b[2]|0,Ve=Xl&8191,Ge=Xl>>>13,Jl=b[3]|0,Ze=Jl&8191,We=Jl>>>13,Ql=b[4]|0,Ye=Ql&8191,$e=Ql>>>13,eh=b[5]|0,Xe=eh&8191,Je=eh>>>13,th=b[6]|0,Qe=th&8191,et=th>>>13,rh=b[7]|0,tt=rh&8191,rt=rh>>>13,ih=b[8]|0,it=ih&8191,nt=ih>>>13,Gf=b[9]|0,Jt=Gf&8191,Qt=Gf>>>13;_.negative=f.negative^p.negative,_.length=19,T=Math.imul(X,He),S=Math.imul(X,je),S=S+Math.imul(ne,He)|0,R=Math.imul(ne,je);var Qs=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(Qs>>>26)|0,Qs&=67108863,T=Math.imul(pe,He),S=Math.imul(pe,je),S=S+Math.imul(q,He)|0,R=Math.imul(q,je),T=T+Math.imul(X,ze)|0,S=S+Math.imul(X,Ke)|0,S=S+Math.imul(ne,ze)|0,R=R+Math.imul(ne,Ke)|0;var eu=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(eu>>>26)|0,eu&=67108863,T=Math.imul($,He),S=Math.imul($,je),S=S+Math.imul(ee,He)|0,R=Math.imul(ee,je),T=T+Math.imul(pe,ze)|0,S=S+Math.imul(pe,Ke)|0,S=S+Math.imul(q,ze)|0,R=R+Math.imul(q,Ke)|0,T=T+Math.imul(X,Ve)|0,S=S+Math.imul(X,Ge)|0,S=S+Math.imul(ne,Ve)|0,R=R+Math.imul(ne,Ge)|0;var tu=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(tu>>>26)|0,tu&=67108863,T=Math.imul(ue,He),S=Math.imul(ue,je),S=S+Math.imul(le,He)|0,R=Math.imul(le,je),T=T+Math.imul($,ze)|0,S=S+Math.imul($,Ke)|0,S=S+Math.imul(ee,ze)|0,R=R+Math.imul(ee,Ke)|0,T=T+Math.imul(pe,Ve)|0,S=S+Math.imul(pe,Ge)|0,S=S+Math.imul(q,Ve)|0,R=R+Math.imul(q,Ge)|0,T=T+Math.imul(X,Ze)|0,S=S+Math.imul(X,We)|0,S=S+Math.imul(ne,Ze)|0,R=R+Math.imul(ne,We)|0;var ru=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(ru>>>26)|0,ru&=67108863,T=Math.imul(ge,He),S=Math.imul(ge,je),S=S+Math.imul(ve,He)|0,R=Math.imul(ve,je),T=T+Math.imul(ue,ze)|0,S=S+Math.imul(ue,Ke)|0,S=S+Math.imul(le,ze)|0,R=R+Math.imul(le,Ke)|0,T=T+Math.imul($,Ve)|0,S=S+Math.imul($,Ge)|0,S=S+Math.imul(ee,Ve)|0,R=R+Math.imul(ee,Ge)|0,T=T+Math.imul(pe,Ze)|0,S=S+Math.imul(pe,We)|0,S=S+Math.imul(q,Ze)|0,R=R+Math.imul(q,We)|0,T=T+Math.imul(X,Ye)|0,S=S+Math.imul(X,$e)|0,S=S+Math.imul(ne,Ye)|0,R=R+Math.imul(ne,$e)|0;var iu=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(iu>>>26)|0,iu&=67108863,T=Math.imul(xe,He),S=Math.imul(xe,je),S=S+Math.imul(ye,He)|0,R=Math.imul(ye,je),T=T+Math.imul(ge,ze)|0,S=S+Math.imul(ge,Ke)|0,S=S+Math.imul(ve,ze)|0,R=R+Math.imul(ve,Ke)|0,T=T+Math.imul(ue,Ve)|0,S=S+Math.imul(ue,Ge)|0,S=S+Math.imul(le,Ve)|0,R=R+Math.imul(le,Ge)|0,T=T+Math.imul($,Ze)|0,S=S+Math.imul($,We)|0,S=S+Math.imul(ee,Ze)|0,R=R+Math.imul(ee,We)|0,T=T+Math.imul(pe,Ye)|0,S=S+Math.imul(pe,$e)|0,S=S+Math.imul(q,Ye)|0,R=R+Math.imul(q,$e)|0,T=T+Math.imul(X,Xe)|0,S=S+Math.imul(X,Je)|0,S=S+Math.imul(ne,Xe)|0,R=R+Math.imul(ne,Je)|0;var nu=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(nu>>>26)|0,nu&=67108863,T=Math.imul(be,He),S=Math.imul(be,je),S=S+Math.imul(_e,He)|0,R=Math.imul(_e,je),T=T+Math.imul(xe,ze)|0,S=S+Math.imul(xe,Ke)|0,S=S+Math.imul(ye,ze)|0,R=R+Math.imul(ye,Ke)|0,T=T+Math.imul(ge,Ve)|0,S=S+Math.imul(ge,Ge)|0,S=S+Math.imul(ve,Ve)|0,R=R+Math.imul(ve,Ge)|0,T=T+Math.imul(ue,Ze)|0,S=S+Math.imul(ue,We)|0,S=S+Math.imul(le,Ze)|0,R=R+Math.imul(le,We)|0,T=T+Math.imul($,Ye)|0,S=S+Math.imul($,$e)|0,S=S+Math.imul(ee,Ye)|0,R=R+Math.imul(ee,$e)|0,T=T+Math.imul(pe,Xe)|0,S=S+Math.imul(pe,Je)|0,S=S+Math.imul(q,Xe)|0,R=R+Math.imul(q,Je)|0,T=T+Math.imul(X,Qe)|0,S=S+Math.imul(X,et)|0,S=S+Math.imul(ne,Qe)|0,R=R+Math.imul(ne,et)|0;var ou=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(ou>>>26)|0,ou&=67108863,T=Math.imul(Ce,He),S=Math.imul(Ce,je),S=S+Math.imul(Re,He)|0,R=Math.imul(Re,je),T=T+Math.imul(be,ze)|0,S=S+Math.imul(be,Ke)|0,S=S+Math.imul(_e,ze)|0,R=R+Math.imul(_e,Ke)|0,T=T+Math.imul(xe,Ve)|0,S=S+Math.imul(xe,Ge)|0,S=S+Math.imul(ye,Ve)|0,R=R+Math.imul(ye,Ge)|0,T=T+Math.imul(ge,Ze)|0,S=S+Math.imul(ge,We)|0,S=S+Math.imul(ve,Ze)|0,R=R+Math.imul(ve,We)|0,T=T+Math.imul(ue,Ye)|0,S=S+Math.imul(ue,$e)|0,S=S+Math.imul(le,Ye)|0,R=R+Math.imul(le,$e)|0,T=T+Math.imul($,Xe)|0,S=S+Math.imul($,Je)|0,S=S+Math.imul(ee,Xe)|0,R=R+Math.imul(ee,Je)|0,T=T+Math.imul(pe,Qe)|0,S=S+Math.imul(pe,et)|0,S=S+Math.imul(q,Qe)|0,R=R+Math.imul(q,et)|0,T=T+Math.imul(X,tt)|0,S=S+Math.imul(X,rt)|0,S=S+Math.imul(ne,tt)|0,R=R+Math.imul(ne,rt)|0;var au=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(au>>>26)|0,au&=67108863,T=Math.imul(De,He),S=Math.imul(De,je),S=S+Math.imul(qe,He)|0,R=Math.imul(qe,je),T=T+Math.imul(Ce,ze)|0,S=S+Math.imul(Ce,Ke)|0,S=S+Math.imul(Re,ze)|0,R=R+Math.imul(Re,Ke)|0,T=T+Math.imul(be,Ve)|0,S=S+Math.imul(be,Ge)|0,S=S+Math.imul(_e,Ve)|0,R=R+Math.imul(_e,Ge)|0,T=T+Math.imul(xe,Ze)|0,S=S+Math.imul(xe,We)|0,S=S+Math.imul(ye,Ze)|0,R=R+Math.imul(ye,We)|0,T=T+Math.imul(ge,Ye)|0,S=S+Math.imul(ge,$e)|0,S=S+Math.imul(ve,Ye)|0,R=R+Math.imul(ve,$e)|0,T=T+Math.imul(ue,Xe)|0,S=S+Math.imul(ue,Je)|0,S=S+Math.imul(le,Xe)|0,R=R+Math.imul(le,Je)|0,T=T+Math.imul($,Qe)|0,S=S+Math.imul($,et)|0,S=S+Math.imul(ee,Qe)|0,R=R+Math.imul(ee,et)|0,T=T+Math.imul(pe,tt)|0,S=S+Math.imul(pe,rt)|0,S=S+Math.imul(q,tt)|0,R=R+Math.imul(q,rt)|0,T=T+Math.imul(X,it)|0,S=S+Math.imul(X,nt)|0,S=S+Math.imul(ne,it)|0,R=R+Math.imul(ne,nt)|0;var su=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(su>>>26)|0,su&=67108863,T=Math.imul(Ue,He),S=Math.imul(Ue,je),S=S+Math.imul(Fe,He)|0,R=Math.imul(Fe,je),T=T+Math.imul(De,ze)|0,S=S+Math.imul(De,Ke)|0,S=S+Math.imul(qe,ze)|0,R=R+Math.imul(qe,Ke)|0,T=T+Math.imul(Ce,Ve)|0,S=S+Math.imul(Ce,Ge)|0,S=S+Math.imul(Re,Ve)|0,R=R+Math.imul(Re,Ge)|0,T=T+Math.imul(be,Ze)|0,S=S+Math.imul(be,We)|0,S=S+Math.imul(_e,Ze)|0,R=R+Math.imul(_e,We)|0,T=T+Math.imul(xe,Ye)|0,S=S+Math.imul(xe,$e)|0,S=S+Math.imul(ye,Ye)|0,R=R+Math.imul(ye,$e)|0,T=T+Math.imul(ge,Xe)|0,S=S+Math.imul(ge,Je)|0,S=S+Math.imul(ve,Xe)|0,R=R+Math.imul(ve,Je)|0,T=T+Math.imul(ue,Qe)|0,S=S+Math.imul(ue,et)|0,S=S+Math.imul(le,Qe)|0,R=R+Math.imul(le,et)|0,T=T+Math.imul($,tt)|0,S=S+Math.imul($,rt)|0,S=S+Math.imul(ee,tt)|0,R=R+Math.imul(ee,rt)|0,T=T+Math.imul(pe,it)|0,S=S+Math.imul(pe,nt)|0,S=S+Math.imul(q,it)|0,R=R+Math.imul(q,nt)|0,T=T+Math.imul(X,Jt)|0,S=S+Math.imul(X,Qt)|0,S=S+Math.imul(ne,Jt)|0,R=R+Math.imul(ne,Qt)|0;var uu=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(uu>>>26)|0,uu&=67108863,T=Math.imul(Ue,ze),S=Math.imul(Ue,Ke),S=S+Math.imul(Fe,ze)|0,R=Math.imul(Fe,Ke),T=T+Math.imul(De,Ve)|0,S=S+Math.imul(De,Ge)|0,S=S+Math.imul(qe,Ve)|0,R=R+Math.imul(qe,Ge)|0,T=T+Math.imul(Ce,Ze)|0,S=S+Math.imul(Ce,We)|0,S=S+Math.imul(Re,Ze)|0,R=R+Math.imul(Re,We)|0,T=T+Math.imul(be,Ye)|0,S=S+Math.imul(be,$e)|0,S=S+Math.imul(_e,Ye)|0,R=R+Math.imul(_e,$e)|0,T=T+Math.imul(xe,Xe)|0,S=S+Math.imul(xe,Je)|0,S=S+Math.imul(ye,Xe)|0,R=R+Math.imul(ye,Je)|0,T=T+Math.imul(ge,Qe)|0,S=S+Math.imul(ge,et)|0,S=S+Math.imul(ve,Qe)|0,R=R+Math.imul(ve,et)|0,T=T+Math.imul(ue,tt)|0,S=S+Math.imul(ue,rt)|0,S=S+Math.imul(le,tt)|0,R=R+Math.imul(le,rt)|0,T=T+Math.imul($,it)|0,S=S+Math.imul($,nt)|0,S=S+Math.imul(ee,it)|0,R=R+Math.imul(ee,nt)|0,T=T+Math.imul(pe,Jt)|0,S=S+Math.imul(pe,Qt)|0,S=S+Math.imul(q,Jt)|0,R=R+Math.imul(q,Qt)|0;var fu=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(fu>>>26)|0,fu&=67108863,T=Math.imul(Ue,Ve),S=Math.imul(Ue,Ge),S=S+Math.imul(Fe,Ve)|0,R=Math.imul(Fe,Ge),T=T+Math.imul(De,Ze)|0,S=S+Math.imul(De,We)|0,S=S+Math.imul(qe,Ze)|0,R=R+Math.imul(qe,We)|0,T=T+Math.imul(Ce,Ye)|0,S=S+Math.imul(Ce,$e)|0,S=S+Math.imul(Re,Ye)|0,R=R+Math.imul(Re,$e)|0,T=T+Math.imul(be,Xe)|0,S=S+Math.imul(be,Je)|0,S=S+Math.imul(_e,Xe)|0,R=R+Math.imul(_e,Je)|0,T=T+Math.imul(xe,Qe)|0,S=S+Math.imul(xe,et)|0,S=S+Math.imul(ye,Qe)|0,R=R+Math.imul(ye,et)|0,T=T+Math.imul(ge,tt)|0,S=S+Math.imul(ge,rt)|0,S=S+Math.imul(ve,tt)|0,R=R+Math.imul(ve,rt)|0,T=T+Math.imul(ue,it)|0,S=S+Math.imul(ue,nt)|0,S=S+Math.imul(le,it)|0,R=R+Math.imul(le,nt)|0,T=T+Math.imul($,Jt)|0,S=S+Math.imul($,Qt)|0,S=S+Math.imul(ee,Jt)|0,R=R+Math.imul(ee,Qt)|0;var cu=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(cu>>>26)|0,cu&=67108863,T=Math.imul(Ue,Ze),S=Math.imul(Ue,We),S=S+Math.imul(Fe,Ze)|0,R=Math.imul(Fe,We),T=T+Math.imul(De,Ye)|0,S=S+Math.imul(De,$e)|0,S=S+Math.imul(qe,Ye)|0,R=R+Math.imul(qe,$e)|0,T=T+Math.imul(Ce,Xe)|0,S=S+Math.imul(Ce,Je)|0,S=S+Math.imul(Re,Xe)|0,R=R+Math.imul(Re,Je)|0,T=T+Math.imul(be,Qe)|0,S=S+Math.imul(be,et)|0,S=S+Math.imul(_e,Qe)|0,R=R+Math.imul(_e,et)|0,T=T+Math.imul(xe,tt)|0,S=S+Math.imul(xe,rt)|0,S=S+Math.imul(ye,tt)|0,R=R+Math.imul(ye,rt)|0,T=T+Math.imul(ge,it)|0,S=S+Math.imul(ge,nt)|0,S=S+Math.imul(ve,it)|0,R=R+Math.imul(ve,nt)|0,T=T+Math.imul(ue,Jt)|0,S=S+Math.imul(ue,Qt)|0,S=S+Math.imul(le,Jt)|0,R=R+Math.imul(le,Qt)|0;var lu=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(lu>>>26)|0,lu&=67108863,T=Math.imul(Ue,Ye),S=Math.imul(Ue,$e),S=S+Math.imul(Fe,Ye)|0,R=Math.imul(Fe,$e),T=T+Math.imul(De,Xe)|0,S=S+Math.imul(De,Je)|0,S=S+Math.imul(qe,Xe)|0,R=R+Math.imul(qe,Je)|0,T=T+Math.imul(Ce,Qe)|0,S=S+Math.imul(Ce,et)|0,S=S+Math.imul(Re,Qe)|0,R=R+Math.imul(Re,et)|0,T=T+Math.imul(be,tt)|0,S=S+Math.imul(be,rt)|0,S=S+Math.imul(_e,tt)|0,R=R+Math.imul(_e,rt)|0,T=T+Math.imul(xe,it)|0,S=S+Math.imul(xe,nt)|0,S=S+Math.imul(ye,it)|0,R=R+Math.imul(ye,nt)|0,T=T+Math.imul(ge,Jt)|0,S=S+Math.imul(ge,Qt)|0,S=S+Math.imul(ve,Jt)|0,R=R+Math.imul(ve,Qt)|0;var hu=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(hu>>>26)|0,hu&=67108863,T=Math.imul(Ue,Xe),S=Math.imul(Ue,Je),S=S+Math.imul(Fe,Xe)|0,R=Math.imul(Fe,Je),T=T+Math.imul(De,Qe)|0,S=S+Math.imul(De,et)|0,S=S+Math.imul(qe,Qe)|0,R=R+Math.imul(qe,et)|0,T=T+Math.imul(Ce,tt)|0,S=S+Math.imul(Ce,rt)|0,S=S+Math.imul(Re,tt)|0,R=R+Math.imul(Re,rt)|0,T=T+Math.imul(be,it)|0,S=S+Math.imul(be,nt)|0,S=S+Math.imul(_e,it)|0,R=R+Math.imul(_e,nt)|0,T=T+Math.imul(xe,Jt)|0,S=S+Math.imul(xe,Qt)|0,S=S+Math.imul(ye,Jt)|0,R=R+Math.imul(ye,Qt)|0;var du=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(du>>>26)|0,du&=67108863,T=Math.imul(Ue,Qe),S=Math.imul(Ue,et),S=S+Math.imul(Fe,Qe)|0,R=Math.imul(Fe,et),T=T+Math.imul(De,tt)|0,S=S+Math.imul(De,rt)|0,S=S+Math.imul(qe,tt)|0,R=R+Math.imul(qe,rt)|0,T=T+Math.imul(Ce,it)|0,S=S+Math.imul(Ce,nt)|0,S=S+Math.imul(Re,it)|0,R=R+Math.imul(Re,nt)|0,T=T+Math.imul(be,Jt)|0,S=S+Math.imul(be,Qt)|0,S=S+Math.imul(_e,Jt)|0,R=R+Math.imul(_e,Qt)|0;var pu=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(pu>>>26)|0,pu&=67108863,T=Math.imul(Ue,tt),S=Math.imul(Ue,rt),S=S+Math.imul(Fe,tt)|0,R=Math.imul(Fe,rt),T=T+Math.imul(De,it)|0,S=S+Math.imul(De,nt)|0,S=S+Math.imul(qe,it)|0,R=R+Math.imul(qe,nt)|0,T=T+Math.imul(Ce,Jt)|0,S=S+Math.imul(Ce,Qt)|0,S=S+Math.imul(Re,Jt)|0,R=R+Math.imul(Re,Qt)|0;var M5=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(M5>>>26)|0,M5&=67108863,T=Math.imul(Ue,it),S=Math.imul(Ue,nt),S=S+Math.imul(Fe,it)|0,R=Math.imul(Fe,nt),T=T+Math.imul(De,Jt)|0,S=S+Math.imul(De,Qt)|0,S=S+Math.imul(qe,Jt)|0,R=R+Math.imul(qe,Qt)|0;var C5=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(C5>>>26)|0,C5&=67108863,T=Math.imul(Ue,Jt),S=Math.imul(Ue,Qt),S=S+Math.imul(Fe,Jt)|0,R=Math.imul(Fe,Qt);var N5=(O+T|0)+((S&8191)<<13)|0;return O=(R+(S>>>13)|0)+(N5>>>26)|0,N5&=67108863,d[0]=Qs,d[1]=eu,d[2]=tu,d[3]=ru,d[4]=iu,d[5]=nu,d[6]=ou,d[7]=au,d[8]=su,d[9]=uu,d[10]=fu,d[11]=cu,d[12]=lu,d[13]=hu,d[14]=du,d[15]=pu,d[16]=M5,d[17]=C5,d[18]=N5,O!==0&&(d[19]=O,_.length++),_};Math.imul||(L=D);function U(y,f,p){p.negative=f.negative^y.negative,p.length=y.length+f.length;for(var _=0,x=0,b=0;b<p.length-1;b++){var d=x;x=0;for(var O=_&67108863,T=Math.min(b,f.length-1),S=Math.max(0,b-y.length+1);S<=T;S++){var R=b-S,Y=y.words[R]|0,X=f.words[S]|0,ne=Y*X,ce=ne&67108863;d=d+(ne/67108864|0)|0,ce=ce+O|0,O=ce&67108863,d=d+(ce>>>26)|0,x+=d>>>26,d&=67108863}p.words[b]=O,_=d,d=x}return _!==0?p.words[b]=_:p.length--,p._strip()}function K(y,f,p){return U(y,f,p)}n.prototype.mulTo=function(f,p){var _,x=this.length+f.length;return this.length===10&&f.length===10?_=L(this,f,p):x<63?_=D(this,f,p):x<1024?_=U(this,f,p):_=K(this,f,p),_};function C(y,f){this.x=y,this.y=f}C.prototype.makeRBT=function(f){for(var p=new Array(f),_=n.prototype._countBits(f)-1,x=0;x<f;x++)p[x]=this.revBin(x,_,f);return p},C.prototype.revBin=function(f,p,_){if(f===0||f===_-1)return f;for(var x=0,b=0;b<p;b++)x|=(f&1)<<p-b-1,f>>=1;return x},C.prototype.permute=function(f,p,_,x,b,d){for(var O=0;O<d;O++)x[O]=p[f[O]],b[O]=_[f[O]]},C.prototype.transform=function(f,p,_,x,b,d){this.permute(d,f,p,_,x,b);for(var O=1;O<b;O<<=1)for(var T=O<<1,S=Math.cos(2*Math.PI/T),R=Math.sin(2*Math.PI/T),Y=0;Y<b;Y+=T)for(var X=S,ne=R,ce=0;ce<O;ce++){var pe=_[Y+ce],q=x[Y+ce],W=_[Y+ce+O],$=x[Y+ce+O],ee=X*W-ne*$;$=X*$+ne*W,W=ee,_[Y+ce]=pe+W,x[Y+ce]=q+$,_[Y+ce+O]=pe-W,x[Y+ce+O]=q-$,ce!==T&&(ee=S*X-R*ne,ne=S*ne+R*X,X=ee)}},C.prototype.guessLen13b=function(f,p){var _=Math.max(p,f)|1,x=_&1,b=0;for(_=_/2|0;_;_=_>>>1)b++;return 1<<b+1+x},C.prototype.conjugate=function(f,p,_){if(!(_<=1))for(var x=0;x<_/2;x++){var b=f[x];f[x]=f[_-x-1],f[_-x-1]=b,b=p[x],p[x]=-p[_-x-1],p[_-x-1]=-b}},C.prototype.normalize13b=function(f,p){for(var _=0,x=0;x<p/2;x++){var b=Math.round(f[2*x+1]/p)*8192+Math.round(f[2*x]/p)+_;f[x]=b&67108863,b<67108864?_=0:_=b/67108864|0}return f},C.prototype.convert13b=function(f,p,_,x){for(var b=0,d=0;d<p;d++)b=b+(f[d]|0),_[2*d]=b&8191,b=b>>>13,_[2*d+1]=b&8191,b=b>>>13;for(d=2*p;d<x;++d)_[d]=0;r(b===0),r((b&-8192)===0)},C.prototype.stub=function(f){for(var p=new Array(f),_=0;_<f;_++)p[_]=0;return p},C.prototype.mulp=function(f,p,_){var x=2*this.guessLen13b(f.length,p.length),b=this.makeRBT(x),d=this.stub(x),O=new Array(x),T=new Array(x),S=new Array(x),R=new Array(x),Y=new Array(x),X=new Array(x),ne=_.words;ne.length=x,this.convert13b(f.words,f.length,O,x),this.convert13b(p.words,p.length,R,x),this.transform(O,d,T,S,x,b),this.transform(R,d,Y,X,x,b);for(var ce=0;ce<x;ce++){var pe=T[ce]*Y[ce]-S[ce]*X[ce];S[ce]=T[ce]*X[ce]+S[ce]*Y[ce],T[ce]=pe}return this.conjugate(T,S,x),this.transform(T,S,ne,d,x,b),this.conjugate(ne,d,x),this.normalize13b(ne,x),_.negative=f.negative^p.negative,_.length=f.length+p.length,_._strip()},n.prototype.mul=function(f){var p=new n(null);return p.words=new Array(this.length+f.length),this.mulTo(f,p)},n.prototype.mulf=function(f){var p=new n(null);return p.words=new Array(this.length+f.length),K(this,f,p)},n.prototype.imul=function(f){return this.clone().mulTo(f,this)},n.prototype.imuln=function(f){var p=f<0;p&&(f=-f),r(typeof f=="number"),r(f<67108864);for(var _=0,x=0;x<this.length;x++){var b=(this.words[x]|0)*f,d=(b&67108863)+(_&67108863);_>>=26,_+=b/67108864|0,_+=d>>>26,this.words[x]=d&67108863}return _!==0&&(this.words[x]=_,this.length++),this.length=f===0?1:this.length,p?this.ineg():this},n.prototype.muln=function(f){return this.clone().imuln(f)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(f){var p=M(f);if(p.length===0)return new n(1);for(var _=this,x=0;x<p.length&&p[x]===0;x++,_=_.sqr());if(++x<p.length)for(var b=_.sqr();x<p.length;x++,b=b.sqr())p[x]!==0&&(_=_.mul(b));return _},n.prototype.iushln=function(f){r(typeof f=="number"&&f>=0);var p=f%26,_=(f-p)/26,x=67108863>>>26-p<<26-p,b;if(p!==0){var d=0;for(b=0;b<this.length;b++){var O=this.words[b]&x,T=(this.words[b]|0)-O<<p;this.words[b]=T|d,d=O>>>26-p}d&&(this.words[b]=d,this.length++)}if(_!==0){for(b=this.length-1;b>=0;b--)this.words[b+_]=this.words[b];for(b=0;b<_;b++)this.words[b]=0;this.length+=_}return this._strip()},n.prototype.ishln=function(f){return r(this.negative===0),this.iushln(f)},n.prototype.iushrn=function(f,p,_){r(typeof f=="number"&&f>=0);var x;p?x=(p-p%26)/26:x=0;var b=f%26,d=Math.min((f-b)/26,this.length),O=67108863^67108863>>>b<<b,T=_;if(x-=d,x=Math.max(0,x),T){for(var S=0;S<d;S++)T.words[S]=this.words[S];T.length=d}if(d!==0)if(this.length>d)for(this.length-=d,S=0;S<this.length;S++)this.words[S]=this.words[S+d];else this.words[0]=0,this.length=1;var R=0;for(S=this.length-1;S>=0&&(R!==0||S>=x);S--){var Y=this.words[S]|0;this.words[S]=R<<26-b|Y>>>b,R=Y&O}return T&&R!==0&&(T.words[T.length++]=R),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.ishrn=function(f,p,_){return r(this.negative===0),this.iushrn(f,p,_)},n.prototype.shln=function(f){return this.clone().ishln(f)},n.prototype.ushln=function(f){return this.clone().iushln(f)},n.prototype.shrn=function(f){return this.clone().ishrn(f)},n.prototype.ushrn=function(f){return this.clone().iushrn(f)},n.prototype.testn=function(f){r(typeof f=="number"&&f>=0);var p=f%26,_=(f-p)/26,x=1<<p;if(this.length<=_)return!1;var b=this.words[_];return!!(b&x)},n.prototype.imaskn=function(f){r(typeof f=="number"&&f>=0);var p=f%26,_=(f-p)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=_)return this;if(p!==0&&_++,this.length=Math.min(_,this.length),p!==0){var x=67108863^67108863>>>p<<p;this.words[this.length-1]&=x}return this.length===0&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.maskn=function(f){return this.clone().imaskn(f)},n.prototype.iaddn=function(f){return r(typeof f=="number"),r(f<67108864),f<0?this.isubn(-f):this.negative!==0?this.length===1&&(this.words[0]|0)<=f?(this.words[0]=f-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(f),this.negative=1,this):this._iaddn(f)},n.prototype._iaddn=function(f){this.words[0]+=f;for(var p=0;p<this.length&&this.words[p]>=67108864;p++)this.words[p]-=67108864,p===this.length-1?this.words[p+1]=1:this.words[p+1]++;return this.length=Math.max(this.length,p+1),this},n.prototype.isubn=function(f){if(r(typeof f=="number"),r(f<67108864),f<0)return this.iaddn(-f);if(this.negative!==0)return this.negative=0,this.iaddn(f),this.negative=1,this;if(this.words[0]-=f,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var p=0;p<this.length&&this.words[p]<0;p++)this.words[p]+=67108864,this.words[p+1]-=1;return this._strip()},n.prototype.addn=function(f){return this.clone().iaddn(f)},n.prototype.subn=function(f){return this.clone().isubn(f)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(f,p,_){var x=f.length+_,b;this._expand(x);var d,O=0;for(b=0;b<f.length;b++){d=(this.words[b+_]|0)+O;var T=(f.words[b]|0)*p;d-=T&67108863,O=(d>>26)-(T/67108864|0),this.words[b+_]=d&67108863}for(;b<this.length-_;b++)d=(this.words[b+_]|0)+O,O=d>>26,this.words[b+_]=d&67108863;if(O===0)return this._strip();for(r(O===-1),O=0,b=0;b<this.length;b++)d=-(this.words[b]|0)+O,O=d>>26,this.words[b]=d&67108863;return this.negative=1,this._strip()},n.prototype._wordDiv=function(f,p){var _=this.length-f.length,x=this.clone(),b=f,d=b.words[b.length-1]|0,O=this._countBits(d);_=26-O,_!==0&&(b=b.ushln(_),x.iushln(_),d=b.words[b.length-1]|0);var T=x.length-b.length,S;if(p!=="mod"){S=new n(null),S.length=T+1,S.words=new Array(S.length);for(var R=0;R<S.length;R++)S.words[R]=0}var Y=x.clone()._ishlnsubmul(b,1,T);Y.negative===0&&(x=Y,S&&(S.words[T]=1));for(var X=T-1;X>=0;X--){var ne=(x.words[b.length+X]|0)*67108864+(x.words[b.length+X-1]|0);for(ne=Math.min(ne/d|0,67108863),x._ishlnsubmul(b,ne,X);x.negative!==0;)ne--,x.negative=0,x._ishlnsubmul(b,1,X),x.isZero()||(x.negative^=1);S&&(S.words[X]=ne)}return S&&S._strip(),x._strip(),p!=="div"&&_!==0&&x.iushrn(_),{div:S||null,mod:x}},n.prototype.divmod=function(f,p,_){if(r(!f.isZero()),this.isZero())return{div:new n(0),mod:new n(0)};var x,b,d;return this.negative!==0&&f.negative===0?(d=this.neg().divmod(f,p),p!=="mod"&&(x=d.div.neg()),p!=="div"&&(b=d.mod.neg(),_&&b.negative!==0&&b.iadd(f)),{div:x,mod:b}):this.negative===0&&f.negative!==0?(d=this.divmod(f.neg(),p),p!=="mod"&&(x=d.div.neg()),{div:x,mod:d.mod}):(this.negative&f.negative)!==0?(d=this.neg().divmod(f.neg(),p),p!=="div"&&(b=d.mod.neg(),_&&b.negative!==0&&b.isub(f)),{div:d.div,mod:b}):f.length>this.length||this.cmp(f)<0?{div:new n(0),mod:this}:f.length===1?p==="div"?{div:this.divn(f.words[0]),mod:null}:p==="mod"?{div:null,mod:new n(this.modrn(f.words[0]))}:{div:this.divn(f.words[0]),mod:new n(this.modrn(f.words[0]))}:this._wordDiv(f,p)},n.prototype.div=function(f){return this.divmod(f,"div",!1).div},n.prototype.mod=function(f){return this.divmod(f,"mod",!1).mod},n.prototype.umod=function(f){return this.divmod(f,"mod",!0).mod},n.prototype.divRound=function(f){var p=this.divmod(f);if(p.mod.isZero())return p.div;var _=p.div.negative!==0?p.mod.isub(f):p.mod,x=f.ushrn(1),b=f.andln(1),d=_.cmp(x);return d<0||b===1&&d===0?p.div:p.div.negative!==0?p.div.isubn(1):p.div.iaddn(1)},n.prototype.modrn=function(f){var p=f<0;p&&(f=-f),r(f<=67108863);for(var _=(1<<26)%f,x=0,b=this.length-1;b>=0;b--)x=(_*x+(this.words[b]|0))%f;return p?-x:x},n.prototype.modn=function(f){return this.modrn(f)},n.prototype.idivn=function(f){var p=f<0;p&&(f=-f),r(f<=67108863);for(var _=0,x=this.length-1;x>=0;x--){var b=(this.words[x]|0)+_*67108864;this.words[x]=b/f|0,_=b%f}return this._strip(),p?this.ineg():this},n.prototype.divn=function(f){return this.clone().idivn(f)},n.prototype.egcd=function(f){r(f.negative===0),r(!f.isZero());var p=this,_=f.clone();p.negative!==0?p=p.umod(f):p=p.clone();for(var x=new n(1),b=new n(0),d=new n(0),O=new n(1),T=0;p.isEven()&&_.isEven();)p.iushrn(1),_.iushrn(1),++T;for(var S=_.clone(),R=p.clone();!p.isZero();){for(var Y=0,X=1;(p.words[0]&X)===0&&Y<26;++Y,X<<=1);if(Y>0)for(p.iushrn(Y);Y-- >0;)(x.isOdd()||b.isOdd())&&(x.iadd(S),b.isub(R)),x.iushrn(1),b.iushrn(1);for(var ne=0,ce=1;(_.words[0]&ce)===0&&ne<26;++ne,ce<<=1);if(ne>0)for(_.iushrn(ne);ne-- >0;)(d.isOdd()||O.isOdd())&&(d.iadd(S),O.isub(R)),d.iushrn(1),O.iushrn(1);p.cmp(_)>=0?(p.isub(_),x.isub(d),b.isub(O)):(_.isub(p),d.isub(x),O.isub(b))}return{a:d,b:O,gcd:_.iushln(T)}},n.prototype._invmp=function(f){r(f.negative===0),r(!f.isZero());var p=this,_=f.clone();p.negative!==0?p=p.umod(f):p=p.clone();for(var x=new n(1),b=new n(0),d=_.clone();p.cmpn(1)>0&&_.cmpn(1)>0;){for(var O=0,T=1;(p.words[0]&T)===0&&O<26;++O,T<<=1);if(O>0)for(p.iushrn(O);O-- >0;)x.isOdd()&&x.iadd(d),x.iushrn(1);for(var S=0,R=1;(_.words[0]&R)===0&&S<26;++S,R<<=1);if(S>0)for(_.iushrn(S);S-- >0;)b.isOdd()&&b.iadd(d),b.iushrn(1);p.cmp(_)>=0?(p.isub(_),x.isub(b)):(_.isub(p),b.isub(x))}var Y;return p.cmpn(1)===0?Y=x:Y=b,Y.cmpn(0)<0&&Y.iadd(f),Y},n.prototype.gcd=function(f){if(this.isZero())return f.abs();if(f.isZero())return this.abs();var p=this.clone(),_=f.clone();p.negative=0,_.negative=0;for(var x=0;p.isEven()&&_.isEven();x++)p.iushrn(1),_.iushrn(1);do{for(;p.isEven();)p.iushrn(1);for(;_.isEven();)_.iushrn(1);var b=p.cmp(_);if(b<0){var d=p;p=_,_=d}else if(b===0||_.cmpn(1)===0)break;p.isub(_)}while(!0);return _.iushln(x)},n.prototype.invm=function(f){return this.egcd(f).a.umod(f)},n.prototype.isEven=function(){return(this.words[0]&1)===0},n.prototype.isOdd=function(){return(this.words[0]&1)===1},n.prototype.andln=function(f){return this.words[0]&f},n.prototype.bincn=function(f){r(typeof f=="number");var p=f%26,_=(f-p)/26,x=1<<p;if(this.length<=_)return this._expand(_+1),this.words[_]|=x,this;for(var b=x,d=_;b!==0&&d<this.length;d++){var O=this.words[d]|0;O+=b,b=O>>>26,O&=67108863,this.words[d]=O}return b!==0&&(this.words[d]=b,this.length++),this},n.prototype.isZero=function(){return this.length===1&&this.words[0]===0},n.prototype.cmpn=function(f){var p=f<0;if(this.negative!==0&&!p)return-1;if(this.negative===0&&p)return 1;this._strip();var _;if(this.length>1)_=1;else{p&&(f=-f),r(f<=67108863,"Number is too big");var x=this.words[0]|0;_=x===f?0:x<f?-1:1}return this.negative!==0?-_|0:_},n.prototype.cmp=function(f){if(this.negative!==0&&f.negative===0)return-1;if(this.negative===0&&f.negative!==0)return 1;var p=this.ucmp(f);return this.negative!==0?-p|0:p},n.prototype.ucmp=function(f){if(this.length>f.length)return 1;if(this.length<f.length)return-1;for(var p=0,_=this.length-1;_>=0;_--){var x=this.words[_]|0,b=f.words[_]|0;if(x!==b){x<b?p=-1:x>b&&(p=1);break}}return p},n.prototype.gtn=function(f){return this.cmpn(f)===1},n.prototype.gt=function(f){return this.cmp(f)===1},n.prototype.gten=function(f){return this.cmpn(f)>=0},n.prototype.gte=function(f){return this.cmp(f)>=0},n.prototype.ltn=function(f){return this.cmpn(f)===-1},n.prototype.lt=function(f){return this.cmp(f)===-1},n.prototype.lten=function(f){return this.cmpn(f)<=0},n.prototype.lte=function(f){return this.cmp(f)<=0},n.prototype.eqn=function(f){return this.cmpn(f)===0},n.prototype.eq=function(f){return this.cmp(f)===0},n.red=function(f){return new g(f)},n.prototype.toRed=function(f){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),f.convertTo(this)._forceRed(f)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(f){return this.red=f,this},n.prototype.forceRed=function(f){return r(!this.red,"Already a number in reduction context"),this._forceRed(f)},n.prototype.redAdd=function(f){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,f)},n.prototype.redIAdd=function(f){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,f)},n.prototype.redSub=function(f){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,f)},n.prototype.redISub=function(f){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,f)},n.prototype.redShl=function(f){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,f)},n.prototype.redMul=function(f){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.mul(this,f)},n.prototype.redIMul=function(f){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.imul(this,f)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(f){return r(this.red&&!f.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,f)};var N={k256:null,p224:null,p192:null,p25519:null};function F(y,f){this.name=y,this.p=new n(f,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}F.prototype._tmp=function(){var f=new n(null);return f.words=new Array(Math.ceil(this.n/13)),f},F.prototype.ireduce=function(f){var p=f,_;do this.split(p,this.tmp),p=this.imulK(p),p=p.iadd(this.tmp),_=p.bitLength();while(_>this.n);var x=_<this.n?-1:p.ucmp(this.p);return x===0?(p.words[0]=0,p.length=1):x>0?p.isub(this.p):p.strip!==void 0?p.strip():p._strip(),p},F.prototype.split=function(f,p){f.iushrn(this.n,0,p)},F.prototype.imulK=function(f){return f.imul(this.k)};function H(){F.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(H,F),H.prototype.split=function(f,p){for(var _=4194303,x=Math.min(f.length,9),b=0;b<x;b++)p.words[b]=f.words[b];if(p.length=x,f.length<=9){f.words[0]=0,f.length=1;return}var d=f.words[9];for(p.words[p.length++]=d&_,b=10;b<f.length;b++){var O=f.words[b]|0;f.words[b-10]=(O&_)<<4|d>>>22,d=O}d>>>=22,f.words[b-10]=d,d===0&&f.length>10?f.length-=10:f.length-=9},H.prototype.imulK=function(f){f.words[f.length]=0,f.words[f.length+1]=0,f.length+=2;for(var p=0,_=0;_<f.length;_++){var x=f.words[_]|0;p+=x*977,f.words[_]=p&67108863,p=x*64+(p/67108864|0)}return f.words[f.length-1]===0&&(f.length--,f.words[f.length-1]===0&&f.length--),f};function z(){F.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(z,F);function V(){F.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(V,F);function B(){F.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(B,F),B.prototype.imulK=function(f){for(var p=0,_=0;_<f.length;_++){var x=(f.words[_]|0)*19+p,b=x&67108863;x>>>=26,f.words[_]=b,p=x}return p!==0&&(f.words[f.length++]=p),f},n._prime=function(f){if(N[f])return N[f];var p;if(f==="k256")p=new H;else if(f==="p224")p=new z;else if(f==="p192")p=new V;else if(f==="p25519")p=new B;else throw new Error("Unknown prime "+f);return N[f]=p,p};function g(y){if(typeof y=="string"){var f=n._prime(y);this.m=f.p,this.prime=f}else r(y.gtn(1),"modulus must be greater than 1"),this.m=y,this.prime=null}g.prototype._verify1=function(f){r(f.negative===0,"red works only with positives"),r(f.red,"red works only with red numbers")},g.prototype._verify2=function(f,p){r((f.negative|p.negative)===0,"red works only with positives"),r(f.red&&f.red===p.red,"red works only with red numbers")},g.prototype.imod=function(f){return this.prime?this.prime.ireduce(f)._forceRed(this):(c(f,f.umod(this.m)._forceRed(this)),f)},g.prototype.neg=function(f){return f.isZero()?f.clone():this.m.sub(f)._forceRed(this)},g.prototype.add=function(f,p){this._verify2(f,p);var _=f.add(p);return _.cmp(this.m)>=0&&_.isub(this.m),_._forceRed(this)},g.prototype.iadd=function(f,p){this._verify2(f,p);var _=f.iadd(p);return _.cmp(this.m)>=0&&_.isub(this.m),_},g.prototype.sub=function(f,p){this._verify2(f,p);var _=f.sub(p);return _.cmpn(0)<0&&_.iadd(this.m),_._forceRed(this)},g.prototype.isub=function(f,p){this._verify2(f,p);var _=f.isub(p);return _.cmpn(0)<0&&_.iadd(this.m),_},g.prototype.shl=function(f,p){return this._verify1(f),this.imod(f.ushln(p))},g.prototype.imul=function(f,p){return this._verify2(f,p),this.imod(f.imul(p))},g.prototype.mul=function(f,p){return this._verify2(f,p),this.imod(f.mul(p))},g.prototype.isqr=function(f){return this.imul(f,f.clone())},g.prototype.sqr=function(f){return this.mul(f,f)},g.prototype.sqrt=function(f){if(f.isZero())return f.clone();var p=this.m.andln(3);if(r(p%2===1),p===3){var _=this.m.add(new n(1)).iushrn(2);return this.pow(f,_)}for(var x=this.m.subn(1),b=0;!x.isZero()&&x.andln(1)===0;)b++,x.iushrn(1);r(!x.isZero());var d=new n(1).toRed(this),O=d.redNeg(),T=this.m.subn(1).iushrn(1),S=this.m.bitLength();for(S=new n(2*S*S).toRed(this);this.pow(S,T).cmp(O)!==0;)S.redIAdd(O);for(var R=this.pow(S,x),Y=this.pow(f,x.addn(1).iushrn(1)),X=this.pow(f,x),ne=b;X.cmp(d)!==0;){for(var ce=X,pe=0;ce.cmp(d)!==0;pe++)ce=ce.redSqr();r(pe<ne);var q=this.pow(R,new n(1).iushln(ne-pe-1));Y=Y.redMul(q),R=q.redSqr(),X=X.redMul(R),ne=pe}return Y},g.prototype.invm=function(f){var p=f._invmp(this.m);return p.negative!==0?(p.negative=0,this.imod(p).redNeg()):this.imod(p)},g.prototype.pow=function(f,p){if(p.isZero())return new n(1).toRed(this);if(p.cmpn(1)===0)return f.clone();var _=4,x=new Array(1<<_);x[0]=new n(1).toRed(this),x[1]=f;for(var b=2;b<x.length;b++)x[b]=this.mul(x[b-1],f);var d=x[0],O=0,T=0,S=p.bitLength()%26;for(S===0&&(S=26),b=p.length-1;b>=0;b--){for(var R=p.words[b],Y=S-1;Y>=0;Y--){var X=R>>Y&1;if(d!==x[0]&&(d=this.sqr(d)),X===0&&O===0){T=0;continue}O<<=1,O|=X,T++,!(T!==_&&(b!==0||Y!==0))&&(d=this.mul(d,x[O]),T=0,O=0)}S=26}return d},g.prototype.convertTo=function(f){var p=f.umod(this.m);return p===f?p.clone():p},g.prototype.convertFrom=function(f){var p=f.clone();return p.red=null,p},n.mont=function(f){return new I(f)};function I(y){g.call(this,y),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new n(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(I,g),I.prototype.convertTo=function(f){return this.imod(f.ushln(this.shift))},I.prototype.convertFrom=function(f){var p=this.imod(f.mul(this.rinv));return p.red=null,p},I.prototype.imul=function(f,p){if(f.isZero()||p.isZero())return f.words[0]=0,f.length=1,f;var _=f.imul(p),x=_.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),b=_.isub(x).iushrn(this.shift),d=b;return b.cmp(this.m)>=0?d=b.isub(this.m):b.cmpn(0)<0&&(d=b.iadd(this.m)),d._forceRed(this)},I.prototype.mul=function(f,p){if(f.isZero()||p.isZero())return new n(0)._forceRed(this);var _=f.mul(p),x=_.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),b=_.isub(x).iushrn(this.shift),d=b;return b.cmp(this.m)>=0?d=b.isub(this.m):b.cmpn(0)<0&&(d=b.iadd(this.m)),d._forceRed(this)},I.prototype.invm=function(f){var p=this.imod(f._invmp(this.m).mul(this.r2));return p._forceRed(this)}})(typeof Bm>"u"||Bm,BI)});var Mm=k((T1e,DI)=>{"use strict";v();var Rc=MI(),jY=bu(),zY=ot().Buffer;function CI(e){var t=e.modulus.byteLength(),r;do r=new Rc(jY(t));while(r.cmp(e.modulus)>=0||!r.umod(e.prime1)||!r.umod(e.prime2));return r}function KY(e){var t=CI(e),r=t.toRed(Rc.mont(e.modulus)).redPow(new Rc(e.publicExponent)).fromRed();return{blinder:r,unblinder:t.invm(e.modulus)}}function NI(e,t){var r=KY(t),i=t.modulus.byteLength(),n=new Rc(e).mul(r.blinder).umod(t.modulus),o=n.toRed(Rc.mont(t.prime1)),a=n.toRed(Rc.mont(t.prime2)),s=t.coefficient,u=t.prime1,c=t.prime2,l=o.redPow(t.exponent1).fromRed(),m=a.redPow(t.exponent2).fromRed(),w=l.isub(m).imul(s).umod(u).imul(c);return m.iadd(w).imul(r.unblinder).umod(t.modulus).toArrayLike(zY,"be",i)}NI.getr=CI;DI.exports=NI});var FI=k((R1e,UI)=>{v();var VY=Am(),Cm=bu(),GY=Hh(),LI=Tm(),qI=km(),Nm=Cn(),ZY=Rm(),WY=Mm(),Un=ot().Buffer;UI.exports=function(t,r,i){var n;t.padding?n=t.padding:i?n=1:n=4;var o=VY(t),a;if(n===4)a=YY(o,r);else if(n===1)a=$Y(o,r,i);else if(n===3){if(a=new Nm(r),a.cmp(o.modulus)>=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");return i?WY(a,o):ZY(a,o)};function YY(e,t){var r=e.modulus.byteLength(),i=t.length,n=GY("sha1").update(Un.alloc(0)).digest(),o=n.length,a=2*o;if(i>r-a-2)throw new Error("message too long");var s=Un.alloc(r-i-a-2),u=r-o-1,c=Cm(o),l=qI(Un.concat([n,s,Un.alloc(1,1),t],u),LI(c,u)),m=qI(c,LI(l,o));return new Nm(Un.concat([Un.alloc(1),m,l],r))}function $Y(e,t,r){var i=t.length,n=e.modulus.byteLength();if(i>n-11)throw new Error("message too long");var o;return r?o=Un.alloc(n-i-3,255):o=XY(n-i-3),new Nm(Un.concat([Un.from([0,r?1:2]),o,Un.alloc(1),t],n))}function XY(e){for(var t=Un.allocUnsafe(e),r=0,i=Cm(e*2),n=0,o;r<e;)n===i.length&&(i=Cm(e*2),n=0),o=i[n++],o&&(t[r++]=o);return t}});var VI=k((M1e,KI)=>{v();var JY=Am(),HI=Tm(),jI=km(),zI=Cn(),QY=Mm(),e$=Hh(),t$=Rm(),Qh=ot().Buffer;KI.exports=function(t,r,i){var n;t.padding?n=t.padding:i?n=1:n=4;var o=JY(t),a=o.modulus.byteLength();if(r.length>a||new zI(r).cmp(o.modulus)>=0)throw new Error("decryption error");var s;i?s=t$(new zI(r),o):s=QY(r,o);var u=Qh.alloc(a-s.length);if(s=Qh.concat([u,s],a),n===4)return r$(o,s);if(n===1)return i$(o,s,i);if(n===3)return s;throw new Error("unknown padding")};function r$(e,t){var r=e.modulus.byteLength(),i=e$("sha1").update(Qh.alloc(0)).digest(),n=i.length;if(t[0]!==0)throw new Error("decryption error");var o=t.slice(1,n+1),a=t.slice(n+1),s=jI(o,HI(a,n)),u=jI(a,HI(s,r-n-1));if(n$(i,u.slice(0,n)))throw new Error("decryption error");for(var c=n;u[c]===0;)c++;if(u[c++]!==1)throw new Error("decryption error");return u.slice(c)}function i$(e,t,r){for(var i=t.slice(0,2),n=2,o=0;t[n++]!==0;)if(n>=t.length){o++;break}var a=t.slice(2,n-1);if((i.toString("hex")!=="0002"&&!r||i.toString("hex")!=="0001"&&r)&&o++,a.length<8&&o++,o)throw new Error("decryption error");return t.slice(n)}function n$(e,t){e=Qh.from(e),t=Qh.from(t);var r=0,i=e.length;e.length!==t.length&&(r++,i=Math.min(e.length,t.length));for(var n=-1;++n<i;)r+=e[n]^t[n];return r}});var GI=k(Ku=>{v();Ku.publicEncrypt=FI();Ku.privateDecrypt=VI();Ku.privateEncrypt=function(t,r){return Ku.publicEncrypt(t,r,!0)};Ku.publicDecrypt=function(t,r){return Ku.privateDecrypt(t,r,!0)}});var rO=k(e0=>{"use strict";v();function ZI(){throw new Error(`secure random number generation not supported by this browser
|
|
15
15
|
use chrome, FireFox or Internet Explorer 11`)}var YI=ot(),WI=bu(),$I=YI.Buffer,XI=YI.kMaxLength,Dm=globalThis.crypto||globalThis.msCrypto,JI=Math.pow(2,32)-1;function QI(e,t){if(typeof e!="number"||e!==e)throw new TypeError("offset must be a number");if(e>JI||e<0)throw new TypeError("offset must be a uint32");if(e>XI||e>t)throw new RangeError("offset out of range")}function eO(e,t,r){if(typeof e!="number"||e!==e)throw new TypeError("size must be a number");if(e>JI||e<0)throw new TypeError("size must be a uint32");if(e+t>r||e>XI)throw new RangeError("buffer too small")}Dm&&Dm.getRandomValues||!A.default.browser?(e0.randomFill=o$,e0.randomFillSync=a$):(e0.randomFill=ZI,e0.randomFillSync=ZI);function o$(e,t,r,i){if(!$I.isBuffer(e)&&!(e instanceof globalThis.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof t=="function")i=t,t=0,r=e.length;else if(typeof r=="function")i=r,r=e.length-t;else if(typeof i!="function")throw new TypeError('"cb" argument must be a function');return QI(t,e.length),eO(r,t,e.length),tO(e,t,r,i)}function tO(e,t,r,i){if(A.default.browser){var n=e.buffer,o=new Uint8Array(n,t,r);if(Dm.getRandomValues(o),i){A.default.nextTick(function(){i(null,e)});return}return e}if(i){WI(r,function(s,u){if(s)return i(s);u.copy(e,t),i(null,e)});return}var a=WI(r);return a.copy(e,t),e}function a$(e,t,r){if(typeof t>"u"&&(t=0),!$I.isBuffer(e)&&!(e instanceof globalThis.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return QI(t,e.length),r===void 0&&(r=e.length-t),eO(r,t,e.length),tO(e,t,r)}});var _r=k(at=>{"use strict";v();at.randomBytes=at.rng=at.pseudoRandomBytes=at.prng=bu();at.createHash=at.Hash=Hh();at.createHmac=at.Hmac=JS();var s$=fs(),u$=Object.keys(s$),f$=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(u$);at.getHashes=function(){return f$};var iO=Dv();at.pbkdf2=iO.pbkdf2;at.pbkdf2Sync=iO.pbkdf2Sync;var Eo=xE();at.Cipher=Eo.Cipher;at.createCipher=Eo.createCipher;at.Cipheriv=Eo.Cipheriv;at.createCipheriv=Eo.createCipheriv;at.Decipher=Eo.Decipher;at.createDecipher=Eo.createDecipher;at.Decipheriv=Eo.Decipheriv;at.createDecipheriv=Eo.createDecipheriv;at.getCiphers=Eo.getCiphers;at.listCiphers=Eo.listCiphers;var t0=LE();at.DiffieHellmanGroup=t0.DiffieHellmanGroup;at.createDiffieHellmanGroup=t0.createDiffieHellmanGroup;at.getDiffieHellman=t0.getDiffieHellman;at.createDiffieHellman=t0.createDiffieHellman;at.DiffieHellman=t0.DiffieHellman;var K2=fs();at.createSign=K2.createSign;at.Sign=K2.Sign;at.createVerify=K2.createVerify;at.Verify=K2.Verify;at.createECDH=fs();var V2=GI();at.publicEncrypt=V2.publicEncrypt;at.privateEncrypt=V2.privateEncrypt;at.publicDecrypt=V2.publicDecrypt;at.privateDecrypt=V2.privateDecrypt;var nO=rO();at.randomFill=nO.randomFill;at.randomFillSync=nO.randomFillSync;at.createCredentials=function(){throw new Error(`sorry, createCredentials is not implemented yet
|
|
16
16
|
we accept pull requests
|
|
17
|
-
https://github.com/browserify/crypto-browserify`)};at.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}});var ds=k((H1e,oO)=>{"use strict";v();function Bc(){}Bc.getRandomBuffer=function(e){return A.default.browser?Bc.getRandomBufferBrowser(e):Bc.getRandomBufferNode(e)};Bc.getRandomBufferNode=function(e){var t=_r();return t.randomBytes(e)};Bc.getRandomBufferBrowser=function(e){if(!window.crypto&&!window.msCrypto)throw new Error("window.crypto not available");var t;if(window.crypto&&window.crypto.getRandomValues)t=window.crypto;else if(window.msCrypto&&window.msCrypto.getRandomValues)t=window.msCrypto;else throw new Error("window.crypto.getRandomValues not available");var r=new Uint8Array(e);t.getRandomValues(r);var i=h.Buffer.from(r);return i};oO.exports=Bc});var Et=k((z1e,aO)=>{"use strict";v();var c$=ds(),Vt={};Vt.isArray=e=>Array.isArray(e);Vt.isNumber=e=>typeof e=="number";Vt.isObject=e=>e&&typeof e=="object";Vt.isString=e=>typeof e=="string";Vt.isUndefined=e=>typeof e>"u";Vt.isFunction=e=>typeof e=="function";Vt.isNull=e=>e===null;Vt.isDate=e=>e instanceof Date;Vt.extend=(e,t)=>Object.assign(e,t);Vt.noop=()=>{};Vt.every=(e,t)=>e.every(t||(r=>r));Vt.map=(e,t)=>Array.from(e).map(t||(r=>r));Vt.includes=(e,t)=>e.includes(t);Vt.each=(e,t)=>e.forEach(t);Vt.clone=e=>Object.assign({},e);Vt.pick=(e,t)=>{let r={};return t.forEach(i=>{typeof e[i]<"u"&&(r[i]=e[i])}),r};Vt.values=e=>Object.values(e);Vt.filter=(e,t)=>e.filter(t);Vt.reduce=(e,t,r)=>e.reduce(t,r);Vt.without=(e,t)=>e.filter(r=>r!==t);Vt.shuffle=e=>{let t=e.slice(0);for(let r=t.length-1;r>0;r--){let n=c$.getRandomBuffer(4).readUInt32BE(0)/4294967296,o=Math.floor(n*(r+1));[t[r],t[o]]=[t[o],t[r]]}return t};Vt.difference=(e,t)=>e.filter(r=>!t.includes(r));Vt.findIndex=(e,t)=>e.findIndex(t);Vt.some=(e,t)=>e.some(t);Vt.range=e=>[...Array(e).keys()];aO.exports=Vt});var uO=k((V1e,sO)=>{"use strict";v();var G2=ot().Buffer;function l$(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r<t.length;r++)t[r]=255;for(var i=0;i<e.length;i++){var n=e.charAt(i),o=n.charCodeAt(0);if(t[o]!==255)throw new TypeError(n+" is ambiguous");t[o]=i}var a=e.length,s=e.charAt(0),u=Math.log(a)/Math.log(256),c=Math.log(256)/Math.log(a);function l(E){if((Array.isArray(E)||E instanceof Uint8Array)&&(E=G2.from(E)),!G2.isBuffer(E))throw new TypeError("Expected Buffer");if(E.length===0)return"";for(var P=0,M=0,D=0,L=E.length;D!==L&&E[D]===0;)D++,P++;for(var U=(L-D)*c+1>>>0,K=new Uint8Array(U);D!==L;){for(var C=E[D],N=0,F=U-1;(C!==0||N<M)&&F!==-1;F--,N++)C+=256*K[F]>>>0,K[F]=C%a>>>0,C=C/a>>>0;if(C!==0)throw new Error("Non-zero carry");M=N,D++}for(var H=U-M;H!==U&&K[H]===0;)H++;for(var z=s.repeat(P);H<U;++H)z+=e.charAt(K[H]);return z}function m(E){if(typeof E!="string")throw new TypeError("Expected String");if(E.length===0)return G2.alloc(0);for(var P=0,M=0,D=0;E[P]===s;)M++,P++;for(var L=(E.length-P)*u+1>>>0,U=new Uint8Array(L);P<E.length;){var K=E.charCodeAt(P);if(K>255)return;var C=t[K];if(C===255)return;for(var N=0,F=L-1;(C!==0||N<D)&&F!==-1;F--,N++)C+=a*U[F]>>>0,U[F]=C%256>>>0,C=C/256>>>0;if(C!==0)throw new Error("Non-zero carry");D=N,P++}for(var H=L-D;H!==L&&U[H]===0;)H++;var z=G2.allocUnsafe(M+(L-H));z.fill(0,0,M);for(var V=M;H!==L;)z[V++]=U[H++];return z}function w(E){var P=m(E);if(P)return P;throw new Error("Non-base"+a+" character")}return{encode:l,decodeUnsafe:m,decode:w}}sO.exports=l$});var Z2=k((Z1e,fO)=>{v();var h$=uO(),d$="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";fO.exports=h$(d$)});var Lm=k((Y1e,cO)=>{"use strict";v();cO.exports="7.6.
|
|
17
|
+
https://github.com/browserify/crypto-browserify`)};at.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}});var ds=k((H1e,oO)=>{"use strict";v();function Bc(){}Bc.getRandomBuffer=function(e){return A.default.browser?Bc.getRandomBufferBrowser(e):Bc.getRandomBufferNode(e)};Bc.getRandomBufferNode=function(e){var t=_r();return t.randomBytes(e)};Bc.getRandomBufferBrowser=function(e){if(!window.crypto&&!window.msCrypto)throw new Error("window.crypto not available");var t;if(window.crypto&&window.crypto.getRandomValues)t=window.crypto;else if(window.msCrypto&&window.msCrypto.getRandomValues)t=window.msCrypto;else throw new Error("window.crypto.getRandomValues not available");var r=new Uint8Array(e);t.getRandomValues(r);var i=h.Buffer.from(r);return i};oO.exports=Bc});var Et=k((z1e,aO)=>{"use strict";v();var c$=ds(),Vt={};Vt.isArray=e=>Array.isArray(e);Vt.isNumber=e=>typeof e=="number";Vt.isObject=e=>e&&typeof e=="object";Vt.isString=e=>typeof e=="string";Vt.isUndefined=e=>typeof e>"u";Vt.isFunction=e=>typeof e=="function";Vt.isNull=e=>e===null;Vt.isDate=e=>e instanceof Date;Vt.extend=(e,t)=>Object.assign(e,t);Vt.noop=()=>{};Vt.every=(e,t)=>e.every(t||(r=>r));Vt.map=(e,t)=>Array.from(e).map(t||(r=>r));Vt.includes=(e,t)=>e.includes(t);Vt.each=(e,t)=>e.forEach(t);Vt.clone=e=>Object.assign({},e);Vt.pick=(e,t)=>{let r={};return t.forEach(i=>{typeof e[i]<"u"&&(r[i]=e[i])}),r};Vt.values=e=>Object.values(e);Vt.filter=(e,t)=>e.filter(t);Vt.reduce=(e,t,r)=>e.reduce(t,r);Vt.without=(e,t)=>e.filter(r=>r!==t);Vt.shuffle=e=>{let t=e.slice(0);for(let r=t.length-1;r>0;r--){let n=c$.getRandomBuffer(4).readUInt32BE(0)/4294967296,o=Math.floor(n*(r+1));[t[r],t[o]]=[t[o],t[r]]}return t};Vt.difference=(e,t)=>e.filter(r=>!t.includes(r));Vt.findIndex=(e,t)=>e.findIndex(t);Vt.some=(e,t)=>e.some(t);Vt.range=e=>[...Array(e).keys()];aO.exports=Vt});var uO=k((V1e,sO)=>{"use strict";v();var G2=ot().Buffer;function l$(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r<t.length;r++)t[r]=255;for(var i=0;i<e.length;i++){var n=e.charAt(i),o=n.charCodeAt(0);if(t[o]!==255)throw new TypeError(n+" is ambiguous");t[o]=i}var a=e.length,s=e.charAt(0),u=Math.log(a)/Math.log(256),c=Math.log(256)/Math.log(a);function l(E){if((Array.isArray(E)||E instanceof Uint8Array)&&(E=G2.from(E)),!G2.isBuffer(E))throw new TypeError("Expected Buffer");if(E.length===0)return"";for(var P=0,M=0,D=0,L=E.length;D!==L&&E[D]===0;)D++,P++;for(var U=(L-D)*c+1>>>0,K=new Uint8Array(U);D!==L;){for(var C=E[D],N=0,F=U-1;(C!==0||N<M)&&F!==-1;F--,N++)C+=256*K[F]>>>0,K[F]=C%a>>>0,C=C/a>>>0;if(C!==0)throw new Error("Non-zero carry");M=N,D++}for(var H=U-M;H!==U&&K[H]===0;)H++;for(var z=s.repeat(P);H<U;++H)z+=e.charAt(K[H]);return z}function m(E){if(typeof E!="string")throw new TypeError("Expected String");if(E.length===0)return G2.alloc(0);for(var P=0,M=0,D=0;E[P]===s;)M++,P++;for(var L=(E.length-P)*u+1>>>0,U=new Uint8Array(L);P<E.length;){var K=E.charCodeAt(P);if(K>255)return;var C=t[K];if(C===255)return;for(var N=0,F=L-1;(C!==0||N<D)&&F!==-1;F--,N++)C+=a*U[F]>>>0,U[F]=C%256>>>0,C=C/256>>>0;if(C!==0)throw new Error("Non-zero carry");D=N,P++}for(var H=L-D;H!==L&&U[H]===0;)H++;var z=G2.allocUnsafe(M+(L-H));z.fill(0,0,M);for(var V=M;H!==L;)z[V++]=U[H++];return z}function w(E){var P=m(E);if(P)return P;throw new Error("Non-base"+a+" character")}return{encode:l,decodeUnsafe:m,decode:w}}sO.exports=l$});var Z2=k((Z1e,fO)=>{v();var h$=uO(),d$="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";fO.exports=h$(d$)});var Lm=k((Y1e,cO)=>{"use strict";v();cO.exports="7.6.1"});var hO=k((X1e,lO)=>{"use strict";v();var p$="https://docs.moneybutton.com/";lO.exports=[{name:"InvalidB58Char",message:"Invalid Base58 character: {0} in {1}"},{name:"InvalidB58Checksum",message:"Invalid Base58 checksum for {0}"},{name:"InvalidNetwork",message:"Invalid version for network: got {0}"},{name:"InvalidState",message:"Invalid state: {0}"},{name:"NotImplemented",message:"Function {0} was not implemented yet"},{name:"InvalidNetworkArgument",message:'Invalid network: must be "livenet" or "testnet", got {0}'},{name:"InvalidArgument",message:function(){return"Invalid Argument"+(arguments[0]?": "+arguments[0]:"")+(arguments[1]?" Documentation: "+p$+arguments[1]:"")}},{name:"AbstractMethodInvoked",message:"Abstract Method Invocation: {0}"},{name:"InvalidArgumentType",message:function(){return"Invalid Argument for "+arguments[2]+", expected "+arguments[1]+" but got "+typeof arguments[0]}},{name:"Unit",message:"Internal Error on Unit {0}",errors:[{name:"UnknownCode",message:"Unrecognized unit code: {0}"},{name:"InvalidRate",message:"Invalid exchange rate: {0}"}]},{name:"MerkleBlock",message:"Internal Error on MerkleBlock {0}",errors:[{name:"InvalidMerkleTree",message:"This MerkleBlock contain an invalid Merkle Tree"}]},{name:"Transaction",message:"Internal Error on Transaction {0}",errors:[{name:"Input",message:"Internal Error on Input {0}",errors:[{name:"MissingScript",message:"Need a script to create an input"},{name:"UnsupportedScript",message:"Unsupported input script type: {0}"},{name:"MissingPreviousOutput",message:"No previous output information."}]},{name:"NeedMoreInfo",message:"{0}"},{name:"InvalidSorting",message:"The sorting function provided did not return the change output as one of the array elements"},{name:"InvalidOutputAmountSum",message:"{0}"},{name:"MissingSignatures",message:"Some inputs have not been fully signed"},{name:"InvalidIndex",message:"Invalid index: {0} is not between 0, {1}"},{name:"UnableToVerifySignature",message:"Unable to verify signature: {0}"},{name:"DustOutputs",message:"Dust amount detected in one output"},{name:"InvalidSatoshis",message:"Output satoshis are invalid"},{name:"FeeError",message:"Internal Error on Fee {0}",errors:[{name:"TooSmall",message:"Fee is too small: {0}"},{name:"TooLarge",message:"Fee is too large: {0}"},{name:"Different",message:"Unspent value is different from specified fee: {0}"}]},{name:"ChangeAddressMissing",message:"Change address is missing"},{name:"BlockHeightTooHigh",message:"Block Height can be at most 2^32 -1"},{name:"NLockTimeOutOfRange",message:"Block Height can only be between 0 and 499 999 999"},{name:"LockTimeTooEarly",message:"Lock Time can't be earlier than UNIX date 500 000 000"}]},{name:"Script",message:"Internal Error on Script {0}",errors:[{name:"UnrecognizedAddress",message:"Expected argument {0} to be an address"},{name:"CantDeriveAddress",message:"Can't derive address associated with script {0}, needs to be p2pkh in, p2pkh out, p2sh in, or p2sh out."},{name:"InvalidBuffer",message:"Invalid script buffer: can't parse valid script from given buffer {0}"}]},{name:"HDPrivateKey",message:"Internal Error on HDPrivateKey {0}",errors:[{name:"InvalidDerivationArgument",message:"Invalid derivation argument {0}, expected string, or number and boolean"},{name:"InvalidEntropyArgument",message:"Invalid entropy: must be an hexa string or binary buffer, got {0}",errors:[{name:"TooMuchEntropy",message:'Invalid entropy: more than 512 bits is non standard, got "{0}"'},{name:"NotEnoughEntropy",message:'Invalid entropy: at least 128 bits needed, got "{0}"'}]},{name:"InvalidLength",message:"Invalid length for xprivkey string in {0}"},{name:"InvalidPath",message:"Invalid derivation path: {0}"},{name:"UnrecognizedArgument",message:'Invalid argument: creating a HDPrivateKey requires a string, buffer, json or object, got "{0}"'}]},{name:"HDPublicKey",message:"Internal Error on HDPublicKey {0}",errors:[{name:"ArgumentIsPrivateExtended",message:"Argument is an extended private key: {0}"},{name:"InvalidDerivationArgument",message:"Invalid derivation argument: got {0}"},{name:"InvalidLength",message:'Invalid length for xpubkey: got "{0}"'},{name:"InvalidPath",message:'Invalid derivation path, it should look like: "m/1/100", got "{0}"'},{name:"InvalidIndexCantDeriveHardened",message:"Invalid argument: creating a hardened path requires an HDPrivateKey"},{name:"MustSupplyArgument",message:"Must supply an argument to create a HDPublicKey"},{name:"UnrecognizedArgument",message:"Invalid argument for creation, must be string, json, buffer, or object"}]}]});var hn=k((Q1e,Um)=>{"use strict";v();var qm=Et();function g$(e,t){return e.replace("{0}",t[0]).replace("{1}",t[1]).replace("{2}",t[2])}var dO=function(e,t){var r=function(){if(qm.isString(t.message))this.message=g$(t.message,arguments);else if(qm.isFunction(t.message))this.message=t.message.apply(null,arguments);else throw new Error("Invalid error definition for "+t.name);this.stack=this.message+`
|
|
18
18
|
`+new Error().stack};return r.prototype=Object.create(e.prototype),r.prototype.name=e.prototype.name+t.name,e[t.name]=r,t.errors&&pO(r,t.errors),r},pO=function(e,t){qm.each(t,function(r){dO(e,r)})},v$=function(e,t){return pO(e,t),e},Mc={};Mc.Error=function(){this.message="Internal error",this.stack=this.message+`
|
|
19
|
-
`+new Error().stack};Mc.Error.prototype=Object.create(Error.prototype);Mc.Error.prototype.name="bsv.Error";var m$=hO();v$(Mc.Error,m$);Um.exports=Mc.Error;Um.exports.extend=function(e){return dO(Mc.Error,e)}});var Bt=k((tde,gO)=>{"use strict";v();var r0=hn(),y$=Et();gO.exports={checkState:function(e,t){if(!e)throw new r0.InvalidState(t)},checkArgument:function(e,t,r,i){if(!e)throw new r0.InvalidArgument(t,r,i)},checkArgumentType:function(e,t,r){if(r=r||"(unknown name)",y$.isString(t)){if(t==="Buffer"){var i=Kt();if(!i.Buffer.isBuffer(e))throw new r0.InvalidArgumentType(e,t,r)}else if(typeof e!==t)throw new r0.InvalidArgumentType(e,t,r)}else if(!(e instanceof t))throw new r0.InvalidArgumentType(e,t.name,r)}}});var fr=k((ide,mO)=>{"use strict";v();var Ot=Cn(),Fm=Bt(),vO=Et(),W2=function(e){for(var t=h.Buffer.alloc(e.length),r=0;r<e.length;r++)t[r]=e[e.length-1-r];return t};Ot.Zero=new Ot(0);Ot.One=new Ot(1);Ot.Minus1=new Ot(-1);Ot.fromNumber=function(e){return Fm.checkArgument(vO.isNumber(e)),new Ot(e)};Ot.fromString=function(e,t){return Fm.checkArgument(vO.isString(e)),new Ot(e,t)};Ot.fromBuffer=function(e,t){typeof t<"u"&&t.endian==="little"&&(e=W2(e));var r=e.toString("hex"),i=new Ot(r,16);return i};Ot.fromSM=function(e,t){var r;if(e.length===0)return Ot.fromBuffer(h.Buffer.from([0]));var i="big";return t&&(i=t.endian),i==="little"&&(e=W2(e)),e[0]&128?(e[0]=e[0]&127,r=Ot.fromBuffer(e),r.neg().copy(r)):r=Ot.fromBuffer(e),r};Ot.prototype.toNumber=function(){return parseInt(this.toString(10),10)};Ot.prototype.toBuffer=function(e){var t,r;if(e&&e.size){r=this.toString(16,2);var i=r.length/2;t=h.Buffer.from(r,"hex"),i===e.size||(i>e.size?t=Ot.trim(t,i):i<e.size&&(t=Ot.pad(t,i,e.size)))}else r=this.toString(16,2),t=h.Buffer.from(r,"hex");return typeof e<"u"&&e.endian==="little"&&(t=W2(t)),t};Ot.prototype.toSMBigEndian=function(){var e;return this.cmp(Ot.Zero)===-1?(e=this.neg().toBuffer(),e[0]&128?e=h.Buffer.concat([h.Buffer.from([128]),e]):e[0]=e[0]|128):(e=this.toBuffer(),e[0]&128&&(e=h.Buffer.concat([h.Buffer.from([0]),e]))),e.length===1&&e[0]===0&&(e=h.Buffer.from([])),e};Ot.prototype.toSM=function(e){var t=e?e.endian:"big",r=this.toSMBigEndian();return t==="little"&&(r=W2(r)),r};Ot.fromScriptNumBuffer=function(e,t,r){var i=r||4;if(Fm.checkArgument(e.length<=i,new Error("script number overflow")),t&&e.length>0&&(e[e.length-1]&127)===0&&(e.length<=1||(e[e.length-2]&128)===0))throw new Error("non-minimally encoded script number");return Ot.fromSM(e,{endian:"little"})};Ot.prototype.toScriptNumBuffer=function(){return this.toSM({endian:"little"})};Ot.trim=function(e,t){return e.slice(t-e.length,e.length)};Ot.pad=function(e,t,r){for(var i=h.Buffer.alloc(r),n=0;n<e.length;n++)i[i.length-1-n]=e[e.length-1-n];for(n=0;n<r-t;n++)i[n]=0;return i};Ot.prototype.toHex=function(...e){return this.toBuffer(...e).toString("hex")};Ot.fromHex=function(e,...t){return Ot.fromBuffer(h.Buffer.from(e,"hex"),...t)};mO.exports=Ot});function Hm(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in e&&e.BYTES_PER_ELEMENT===1}function ps(e,t=""){if(typeof e!="number"){let r=t&&`"${t}" `;throw new TypeError(`${r}expected number, got ${typeof e}`)}if(!Number.isSafeInteger(e)||e<0){let r=t&&`"${t}" `;throw new RangeError(`${r}expected integer >= 0, got ${e}`)}}function Io(e,t,r=""){let i=Hm(e),n=e?.length,o=t!==void 0;if(!i||o&&n!==t){let a=r&&`"${r}" `,s=o?` of length ${t}`:"",u=i?`length=${n}`:`type=${typeof e}`,c=a+"expected Uint8Array"+s+", got "+u;throw i?new RangeError(c):new TypeError(c)}return e}function Y2(e){if(typeof e!="function"||typeof e.create!="function")throw new TypeError("Hash must wrapped by utils.createHasher");if(ps(e.outputLen),ps(e.blockLen),e.outputLen<1)throw new Error('"outputLen" must be >= 1');if(e.blockLen<1)throw new Error('"blockLen" must be >= 1')}function Cc(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 $2(e,t){Io(e,void 0,"digestInto() output");let r=t.outputLen;if(e.length<r)throw new RangeError('"digestInto() output" expected to be of length >='+r)}function Ea(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function X2(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Fn(e,t){return e<<32-t|e>>>t}function J2(e){if(Io(e),bO)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=b$[e[r]];return t}function yO(e){if(e>=xa._0&&e<=xa._9)return e-xa._0;if(e>=xa.A&&e<=xa.F)return e-(xa.A-10);if(e>=xa.a&&e<=xa.f)return e-(xa.a-10)}function jm(e){if(typeof e!="string")throw new TypeError("hex string expected, got "+typeof e);if(bO)try{return Uint8Array.fromHex(e)}catch(n){throw n instanceof SyntaxError?new RangeError(n.message):n}let t=e.length,r=t/2;if(t%2)throw new RangeError("hex string expected, got unpadded hex of length "+t);let i=new Uint8Array(r);for(let n=0,o=0;n<r;n++,o+=2){let a=yO(e.charCodeAt(o)),s=yO(e.charCodeAt(o+1));if(a===void 0||s===void 0){let u=e[o]+e[o+1];throw new RangeError('hex string expected, got non-hex character "'+u+'" at index '+o)}i[n]=a*16+s}return i}function Ia(e){if(typeof e!="string")throw new TypeError("string expected");return new Uint8Array(new TextEncoder().encode(e))}function _O(...e){let t=0;for(let i=0;i<e.length;i++){let n=e[i];Io(n),t+=n.length}let r=new Uint8Array(t);for(let i=0,n=0;i<e.length;i++){let o=e[i];r.set(o,n),n+=o.length}return r}function Vu(e,t={}){let r=(n,o)=>e(o).update(n).digest(),i=e(void 0);return r.outputLen=i.outputLen,r.blockLen=i.blockLen,r.canXOF=i.canXOF,r.create=n=>e(n),Object.assign(r,t),Object.freeze(r)}function i0(e=32){ps(e,"bytesLength");let t=typeof globalThis=="object"?globalThis.crypto:null;if(typeof t?.getRandomValues!="function")throw new Error("crypto.getRandomValues must be defined");if(e>65536)throw new RangeError(`"bytesLength" expected <= 65536, got ${e}`);return t.getRandomValues(new Uint8Array(e))}var bO,b$,xa,Gu,gs=Xr(()=>{v();bO=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",b$=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));xa={_0:48,_9:57,A:65,F:70,a:97,f:102};Gu=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])})});function wO(e,t,r){return e&t^~e&r}function SO(e,t,r){return e&t^e&r^t&r}var n0,Oa,Aa,Qr,ei,xO=Xr(()=>{v();gs();n0=class{constructor(t,r,i,n){Z(this,"blockLen");Z(this,"outputLen");Z(this,"canXOF",!1);Z(this,"padOffset");Z(this,"isLE");Z(this,"buffer");Z(this,"view");Z(this,"finished",!1);Z(this,"length",0);Z(this,"pos",0);Z(this,"destroyed",!1);this.blockLen=t,this.outputLen=r,this.padOffset=i,this.isLE=n,this.buffer=new Uint8Array(t),this.view=X2(this.buffer)}update(t){Cc(this),Io(t);let{view:r,buffer:i,blockLen:n}=this,o=t.length;for(let a=0;a<o;){let s=Math.min(n-this.pos,o-a);if(s===n){let u=X2(t);for(;n<=o-a;a+=n)this.process(u,a);continue}i.set(t.subarray(a,a+s),this.pos),this.pos+=s,a+=s,this.pos===n&&(this.process(r,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Cc(this),$2(t,this),this.finished=!0;let{buffer:r,view:i,blockLen:n,isLE:o}=this,{pos:a}=this;r[a++]=128,Ea(this.buffer.subarray(a)),this.padOffset>n-a&&(this.process(i,0),a=0);for(let m=a;m<n;m++)r[m]=0;i.setBigUint64(n-8,BigInt(this.length*8),o),this.process(i,0);let s=X2(t),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen must be aligned to 32bit");let c=u/4,l=this.get();if(c>l.length)throw new Error("_sha2: outputLen bigger than state");for(let m=0;m<c;m++)s.setUint32(4*m,l[m],o)}digest(){let{buffer:t,outputLen:r}=this;this.digestInto(t);let i=t.slice(0,r);return this.destroy(),i}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());let{blockLen:r,buffer:i,length:n,finished:o,destroyed:a,pos:s}=this;return t.destroyed=a,t.finished=o,t.length=n,t.pos=s,n%r&&t.buffer.set(i),t}clone(){return this._cloneInto()}},Oa=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Aa=Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),Qr=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),ei=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209])});function _$(e,t=!1){return t?{h:Number(e&Q2),l:Number(e>>EO&Q2)}:{h:Number(e>>EO&Q2)|0,l:Number(e&Q2)|0}}function IO(e,t=!1){let r=e.length,i=new Uint32Array(r),n=new Uint32Array(r);for(let o=0;o<r;o++){let{h:a,l:s}=_$(e[o],t);[i[o],n[o]]=[a,s]}return[i,n]}function Oo(e,t,r,i){let n=(t>>>0)+(i>>>0);return{h:e+r+(n/2**32|0)|0,l:n|0}}var Q2,EO,zm,Km,Zu,Wu,o0,a0,OO,AO,PO,TO,kO,RO,BO=Xr(()=>{v();Q2=BigInt(4294967295),EO=BigInt(32);zm=(e,t,r)=>e>>>r,Km=(e,t,r)=>e<<32-r|t>>>r,Zu=(e,t,r)=>e>>>r|t<<32-r,Wu=(e,t,r)=>e<<32-r|t>>>r,o0=(e,t,r)=>e<<64-r|t>>>r-32,a0=(e,t,r)=>e>>>r-32|t<<64-r;OO=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),AO=(e,t,r,i)=>t+r+i+(e/2**32|0)|0,PO=(e,t,r,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(i>>>0),TO=(e,t,r,i,n)=>t+r+i+n+(e/2**32|0)|0,kO=(e,t,r,i,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(i>>>0)+(n>>>0),RO=(e,t,r,i,n,o)=>t+r+i+n+o+(e/2**32|0)|0});var Vm={};X1(Vm,{_SHA224:()=>rp,_SHA256:()=>tp,_SHA384:()=>np,_SHA512:()=>ip,_SHA512_224:()=>op,_SHA512_256:()=>ap,sha224:()=>I$,sha256:()=>bs,sha384:()=>A$,sha512:()=>O$,sha512_224:()=>T$,sha512_256:()=>P$});var S$,vs,ep,tp,rp,MO,x$,E$,ms,ys,Nc,ip,np,hi,di,op,ap,bs,I$,O$,A$,P$,T$,sp=Xr(()=>{v();xO();BO();gs();S$=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]),vs=new Uint32Array(64),ep=class extends n0{constructor(t){super(64,t,8,!1)}get(){let{A:t,B:r,C:i,D:n,E:o,F:a,G:s,H:u}=this;return[t,r,i,n,o,a,s,u]}set(t,r,i,n,o,a,s,u){this.A=t|0,this.B=r|0,this.C=i|0,this.D=n|0,this.E=o|0,this.F=a|0,this.G=s|0,this.H=u|0}process(t,r){for(let m=0;m<16;m++,r+=4)vs[m]=t.getUint32(r,!1);for(let m=16;m<64;m++){let w=vs[m-15],E=vs[m-2],P=Fn(w,7)^Fn(w,18)^w>>>3,M=Fn(E,17)^Fn(E,19)^E>>>10;vs[m]=M+vs[m-7]+P+vs[m-16]|0}let{A:i,B:n,C:o,D:a,E:s,F:u,G:c,H:l}=this;for(let m=0;m<64;m++){let w=Fn(s,6)^Fn(s,11)^Fn(s,25),E=l+w+wO(s,u,c)+S$[m]+vs[m]|0,M=(Fn(i,2)^Fn(i,13)^Fn(i,22))+SO(i,n,o)|0;l=c,c=u,u=s,s=a+E|0,a=o,o=n,n=i,i=E+M|0}i=i+this.A|0,n=n+this.B|0,o=o+this.C|0,a=a+this.D|0,s=s+this.E|0,u=u+this.F|0,c=c+this.G|0,l=l+this.H|0,this.set(i,n,o,a,s,u,c,l)}roundClean(){Ea(vs)}destroy(){this.destroyed=!0,this.set(0,0,0,0,0,0,0,0),Ea(this.buffer)}},tp=class extends ep{constructor(){super(32);Z(this,"A",Oa[0]|0);Z(this,"B",Oa[1]|0);Z(this,"C",Oa[2]|0);Z(this,"D",Oa[3]|0);Z(this,"E",Oa[4]|0);Z(this,"F",Oa[5]|0);Z(this,"G",Oa[6]|0);Z(this,"H",Oa[7]|0)}},rp=class extends ep{constructor(){super(28);Z(this,"A",Aa[0]|0);Z(this,"B",Aa[1]|0);Z(this,"C",Aa[2]|0);Z(this,"D",Aa[3]|0);Z(this,"E",Aa[4]|0);Z(this,"F",Aa[5]|0);Z(this,"G",Aa[6]|0);Z(this,"H",Aa[7]|0)}},MO=IO(["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))),x$=MO[0],E$=MO[1],ms=new Uint32Array(80),ys=new Uint32Array(80),Nc=class extends n0{constructor(t){super(128,t,16,!1)}get(){let{Ah:t,Al:r,Bh:i,Bl:n,Ch:o,Cl:a,Dh:s,Dl:u,Eh:c,El:l,Fh:m,Fl:w,Gh:E,Gl:P,Hh:M,Hl:D}=this;return[t,r,i,n,o,a,s,u,c,l,m,w,E,P,M,D]}set(t,r,i,n,o,a,s,u,c,l,m,w,E,P,M,D){this.Ah=t|0,this.Al=r|0,this.Bh=i|0,this.Bl=n|0,this.Ch=o|0,this.Cl=a|0,this.Dh=s|0,this.Dl=u|0,this.Eh=c|0,this.El=l|0,this.Fh=m|0,this.Fl=w|0,this.Gh=E|0,this.Gl=P|0,this.Hh=M|0,this.Hl=D|0}process(t,r){for(let K=0;K<16;K++,r+=4)ms[K]=t.getUint32(r),ys[K]=t.getUint32(r+=4);for(let K=16;K<80;K++){let C=ms[K-15]|0,N=ys[K-15]|0,F=Zu(C,N,1)^Zu(C,N,8)^zm(C,N,7),H=Wu(C,N,1)^Wu(C,N,8)^Km(C,N,7),z=ms[K-2]|0,V=ys[K-2]|0,B=Zu(z,V,19)^o0(z,V,61)^zm(z,V,6),g=Wu(z,V,19)^a0(z,V,61)^Km(z,V,6),I=PO(H,g,ys[K-7],ys[K-16]),y=TO(I,F,B,ms[K-7],ms[K-16]);ms[K]=y|0,ys[K]=I|0}let{Ah:i,Al:n,Bh:o,Bl:a,Ch:s,Cl:u,Dh:c,Dl:l,Eh:m,El:w,Fh:E,Fl:P,Gh:M,Gl:D,Hh:L,Hl:U}=this;for(let K=0;K<80;K++){let C=Zu(m,w,14)^Zu(m,w,18)^o0(m,w,41),N=Wu(m,w,14)^Wu(m,w,18)^a0(m,w,41),F=m&E^~m&M,H=w&P^~w&D,z=kO(U,N,H,E$[K],ys[K]),V=RO(z,L,C,F,x$[K],ms[K]),B=z|0,g=Zu(i,n,28)^o0(i,n,34)^o0(i,n,39),I=Wu(i,n,28)^a0(i,n,34)^a0(i,n,39),y=i&o^i&s^o&s,f=n&a^n&u^a&u;L=M|0,U=D|0,M=E|0,D=P|0,E=m|0,P=w|0,{h:m,l:w}=Oo(c|0,l|0,V|0,B|0),c=s|0,l=u|0,s=o|0,u=a|0,o=i|0,a=n|0;let p=OO(B,I,f);i=AO(p,V,g,y),n=p|0}({h:i,l:n}=Oo(this.Ah|0,this.Al|0,i|0,n|0)),{h:o,l:a}=Oo(this.Bh|0,this.Bl|0,o|0,a|0),{h:s,l:u}=Oo(this.Ch|0,this.Cl|0,s|0,u|0),{h:c,l}=Oo(this.Dh|0,this.Dl|0,c|0,l|0),{h:m,l:w}=Oo(this.Eh|0,this.El|0,m|0,w|0),{h:E,l:P}=Oo(this.Fh|0,this.Fl|0,E|0,P|0),{h:M,l:D}=Oo(this.Gh|0,this.Gl|0,M|0,D|0),{h:L,l:U}=Oo(this.Hh|0,this.Hl|0,L|0,U|0),this.set(i,n,o,a,s,u,c,l,m,w,E,P,M,D,L,U)}roundClean(){Ea(ms,ys)}destroy(){this.destroyed=!0,Ea(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}},ip=class extends Nc{constructor(){super(64);Z(this,"Ah",ei[0]|0);Z(this,"Al",ei[1]|0);Z(this,"Bh",ei[2]|0);Z(this,"Bl",ei[3]|0);Z(this,"Ch",ei[4]|0);Z(this,"Cl",ei[5]|0);Z(this,"Dh",ei[6]|0);Z(this,"Dl",ei[7]|0);Z(this,"Eh",ei[8]|0);Z(this,"El",ei[9]|0);Z(this,"Fh",ei[10]|0);Z(this,"Fl",ei[11]|0);Z(this,"Gh",ei[12]|0);Z(this,"Gl",ei[13]|0);Z(this,"Hh",ei[14]|0);Z(this,"Hl",ei[15]|0)}},np=class extends Nc{constructor(){super(48);Z(this,"Ah",Qr[0]|0);Z(this,"Al",Qr[1]|0);Z(this,"Bh",Qr[2]|0);Z(this,"Bl",Qr[3]|0);Z(this,"Ch",Qr[4]|0);Z(this,"Cl",Qr[5]|0);Z(this,"Dh",Qr[6]|0);Z(this,"Dl",Qr[7]|0);Z(this,"Eh",Qr[8]|0);Z(this,"El",Qr[9]|0);Z(this,"Fh",Qr[10]|0);Z(this,"Fl",Qr[11]|0);Z(this,"Gh",Qr[12]|0);Z(this,"Gl",Qr[13]|0);Z(this,"Hh",Qr[14]|0);Z(this,"Hl",Qr[15]|0)}},hi=Uint32Array.from([2352822216,424955298,1944164710,2312950998,502970286,855612546,1738396948,1479516111,258812777,2077511080,2011393907,79989058,1067287976,1780299464,286451373,2446758561]),di=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]),op=class extends Nc{constructor(){super(28);Z(this,"Ah",hi[0]|0);Z(this,"Al",hi[1]|0);Z(this,"Bh",hi[2]|0);Z(this,"Bl",hi[3]|0);Z(this,"Ch",hi[4]|0);Z(this,"Cl",hi[5]|0);Z(this,"Dh",hi[6]|0);Z(this,"Dl",hi[7]|0);Z(this,"Eh",hi[8]|0);Z(this,"El",hi[9]|0);Z(this,"Fh",hi[10]|0);Z(this,"Fl",hi[11]|0);Z(this,"Gh",hi[12]|0);Z(this,"Gl",hi[13]|0);Z(this,"Hh",hi[14]|0);Z(this,"Hl",hi[15]|0)}},ap=class extends Nc{constructor(){super(32);Z(this,"Ah",di[0]|0);Z(this,"Al",di[1]|0);Z(this,"Bh",di[2]|0);Z(this,"Bl",di[3]|0);Z(this,"Ch",di[4]|0);Z(this,"Cl",di[5]|0);Z(this,"Dh",di[6]|0);Z(this,"Dl",di[7]|0);Z(this,"Eh",di[8]|0);Z(this,"El",di[9]|0);Z(this,"Fh",di[10]|0);Z(this,"Fl",di[11]|0);Z(this,"Gh",di[12]|0);Z(this,"Gl",di[13]|0);Z(this,"Hh",di[14]|0);Z(this,"Hl",di[15]|0)}},bs=Vu(()=>new tp,Gu(1)),I$=Vu(()=>new rp,Gu(4)),O$=Vu(()=>new ip,Gu(3)),A$=Vu(()=>new np,Gu(2)),P$=Vu(()=>new ap,Gu(6)),T$=Vu(()=>new op,Gu(5))});function $u(e,t=""){if(typeof e!="boolean"){let r=t&&`"${t}" `;throw new TypeError(r+"expected boolean, got type="+typeof e)}return e}function cp(e){if(typeof e=="bigint"){if(!up(e))throw new RangeError("positive bigint expected, got "+e)}else Zm(e);return e}function dn(e,t=""){if(typeof e!="number"){let r=t&&`"${t}" `;throw new TypeError(r+"expected number, got type="+typeof e)}if(!Number.isSafeInteger(e)){let r=t&&`"${t}" `;throw new RangeError(r+"expected safe integer, got "+e)}}function s0(e){let t=cp(e).toString(16);return t.length&1?"0"+t:t}function CO(e){if(typeof e!="string")throw new TypeError("hex string expected, got "+typeof e);return e===""?fp:BigInt("0x"+e)}function bi(e){return CO(J2(e))}function Lc(e){return CO(J2(hp(Io(e)).reverse()))}function lp(e,t){if(ps(t),t===0)throw new RangeError("zero length");e=cp(e);let r=e.toString(16);if(r.length>t*2)throw new RangeError("number too large");return jm(r.padStart(t*2,"0"))}function Wm(e,t){return lp(e,t).reverse()}function hp(e){return Uint8Array.from(qt(e))}function qc(e){if(typeof e!="string")throw new TypeError("ascii string expected, got "+typeof e);return Uint8Array.from(e,(t,r)=>{let i=t.charCodeAt(0);if(t.length!==1||i>127)throw new RangeError(`string contains non-ASCII character "${e[r]}" with code ${i} at position ${r}`);return i})}function k$(e,t,r){return up(e)&&up(t)&&up(r)&&t<=e&&e<r}function Ym(e,t,r,i){if(!k$(t,r,i))throw new RangeError("expected valid "+e+": "+r+" <= n < "+i+", got "+t)}function Xu(e){if(e<fp)throw new Error("expected non-negative bigint, got "+e);let t;for(t=0;e>fp;e>>=Gm,t+=1);return t}function NO(e,t,r){if(ps(e,"hashLen"),ps(t,"qByteLen"),typeof r!="function")throw new TypeError("hmacFn must be a function");let i=D=>new Uint8Array(D),n=Uint8Array.of(),o=Uint8Array.of(0),a=Uint8Array.of(1),s=1e3,u=i(e),c=i(e),l=0,m=()=>{u.fill(1),c.fill(0),l=0},w=(...D)=>r(c,kt(u,...D)),E=(D=n)=>{c=w(o,D),u=w(),D.length!==0&&(c=w(a,D),u=w())},P=()=>{if(l++>=s)throw new Error("drbg: tried max amount of iterations");let D=0,L=[];for(;D<t;){u=w();let U=u.slice();L.push(U),D+=u.length}return kt(...L)};return(D,L)=>{m(),E(D);let U;for(;(U=L(P()))===void 0;)E();return m(),U}}function pn(e,t={},r={}){if(Object.prototype.toString.call(e)!=="[object Object]")throw new TypeError("expected valid options object");function i(o,a,s){if(!s&&a!=="function"&&!Object.hasOwn(e,o))throw new TypeError(`param "${o}" is invalid: expected own property`);let u=e[o];if(s&&u===void 0)return;let c=typeof u;if(c!==a||u===null)throw new TypeError(`param "${o}" is invalid: expected ${a}, got ${c}`)}let n=(o,a)=>Object.entries(o).forEach(([s,u])=>i(s,u,a));n(t,!1),n(r,!0)}var qt,Zm,Pa,kt,Dc,Yu,ki,fp,Gm,up,Uc,Ju=Xr(()=>{v();gs();qt=(e,t,r)=>Io(e,t,r),Zm=ps,Pa=J2,kt=(...e)=>_O(...e),Dc=e=>jm(e),Yu=Hm,ki=e=>i0(e),fp=BigInt(0),Gm=BigInt(1);up=e=>typeof e=="bigint"&&fp<=e;Uc=e=>(Gm<<BigInt(e))-Gm});function Ui(e,t){if(t<=ti)throw new Error("mod: expected positive modulus, got "+t);let r=e%t;return r>=ti?r:t+r}function Fi(e,t,r){if(t<ti)throw new Error("pow2: expected non-negative exponent, got "+t);let i=e;for(;t-- >ti;)i*=i,i%=r;return i}function DO(e,t){if(e===ti)throw new Error("invert: expected non-zero number");if(t<=ti)throw new Error("invert: expected positive modulus, got "+t);let r=Ui(e,t),i=t,n=ti,o=wr,a=wr,s=ti;for(;r!==ti;){let c=i/r,l=i-r*c,m=n-a*c,w=o-s*c;i=r,r=l,n=a,o=s,a=m,s=w}if(i!==wr)throw new Error("invert: does not exist");return Ui(n,t)}function Xm(e,t,r){let i=e;if(!i.eql(i.sqr(t),r))throw new Error("Cannot find square root")}function zO(e,t){let r=e,i=(r.ORDER+wr)/UO,n=r.pow(t,i);return Xm(r,n,t),n}function M$(e,t){let r=e,i=(r.ORDER-FO)/HO,n=r.mul(t,Qu),o=r.pow(n,i),a=r.mul(t,o),s=r.mul(r.mul(a,Qu),o),u=r.mul(a,r.sub(s,r.ONE));return Xm(r,u,t),u}function C$(e){let t=Fc(e),r=KO(e),i=r(t,t.neg(t.ONE)),n=r(t,i),o=r(t,t.neg(i)),a=(e+R$)/jO;return((s,u)=>{let c=s,l=c.pow(u,a),m=c.mul(l,i),w=c.mul(l,n),E=c.mul(l,o),P=c.eql(c.sqr(m),u),M=c.eql(c.sqr(w),u);l=c.cmov(l,m,P),m=c.cmov(E,w,M);let D=c.eql(c.sqr(m),u),L=c.cmov(l,m,D);return Xm(c,L,u),L})}function KO(e){if(e<qO)throw new Error("sqrt is not defined for small field");let t=e-wr,r=0;for(;t%Qu===ti;)t/=Qu,r++;let i=Qu,n=Fc(e);for(;$m(n,i)===1;)if(i++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(r===1)return zO;let o=n.pow(i,t),a=(t+wr)/Qu;return function(u,c){let l=u;if(l.is0(c))return c;if($m(l,c)!==1)throw new Error("Cannot find square root");let m=r,w=l.mul(l.ONE,o),E=l.pow(c,t),P=l.pow(c,a);for(;!l.eql(E,l.ONE);){if(l.is0(E))return l.ZERO;let M=1,D=l.sqr(E);for(;!l.eql(D,l.ONE);)if(M++,D=l.sqr(D),M===m)throw new Error("Cannot find square root");let L=wr<<BigInt(m-M-1),U=l.pow(w,L);m=M,w=l.sqr(U),E=l.mul(E,w),P=l.mul(P,U)}return P}}function N$(e){return e%UO===qO?zO:e%HO===FO?M$:e%jO===B$?C$(e):KO(e)}function ef(e){let t={ORDER:"bigint",BYTES:"number",BITS:"number"},r=D$.reduce((i,n)=>(i[n]="function",i),t);if(pn(e,r),dn(e.BYTES,"BYTES"),dn(e.BITS,"BITS"),e.BYTES<1||e.BITS<1)throw new Error("invalid field: expected BYTES/BITS > 0");if(e.ORDER<=wr)throw new Error("invalid field: expected ORDER > 1, got "+e.ORDER);return e}function L$(e,t,r){let i=e;if(r<ti)throw new Error("invalid exponent, negatives unsupported");if(r===ti)return i.ONE;if(r===wr)return t;let n=i.ONE,o=t;for(;r>ti;)r&wr&&(n=i.mul(n,o)),o=i.sqr(o),r>>=wr;return n}function tf(e,t,r=!1){let i=e,n=new Array(t.length).fill(r?i.ZERO:void 0),o=t.reduce((s,u,c)=>i.is0(u)?s:(n[c]=s,i.mul(s,u)),i.ONE),a=i.inv(o);return t.reduceRight((s,u,c)=>i.is0(u)?s:(n[c]=i.mul(s,n[c]),i.mul(s,u)),a),n}function $m(e,t){let r=e,i=(r.ORDER-wr)/Qu,n=r.pow(t,i),o=r.eql(n,r.ONE),a=r.eql(n,r.ZERO),s=r.eql(n,r.neg(r.ONE));if(!o&&!a&&!s)throw new Error("invalid Legendre symbol result");return o?1:a?0:-1}function Jm(e,t){return $m(e,t)!==-1}function q$(e,t){if(t!==void 0&&Zm(t),e<=ti)throw new Error("invalid n length: expected positive n, got "+e);if(t!==void 0&&t<1)throw new Error("invalid n length: expected positive bit length, got "+t);let r=Xu(e);if(t!==void 0&&t<r)throw new Error(`invalid n length: expected bit length (${r}) >= n.length (${t})`);let i=t!==void 0?t:r,n=Math.ceil(i/8);return{nBitLength:i,nByteLength:n}}function Fc(e,t={}){return new dp(e,t)}function VO(e){if(typeof e!="bigint")throw new Error("field order must be bigint");if(e<=wr)throw new Error("field order must be greater than 1");let t=Xu(e-wr);return Math.ceil(t/8)}function u0(e){let t=VO(e);return t+Math.ceil(t/2)}function Hc(e,t,r=!1){qt(e);let i=e.length,n=VO(t),o=Math.max(u0(t),16);if(i<o||i>1024)throw new Error("expected "+o+"-1024 bytes of input, got "+i);let a=r?Lc(e):bi(e),s=Ui(a,t-wr)+wr;return r?Wm(s,n):lp(s,n)}var ti,wr,Qu,qO,UO,FO,R$,HO,B$,jO,D$,LO,dp,jc=Xr(()=>{v();Ju();ti=BigInt(0),wr=BigInt(1),Qu=BigInt(2),qO=BigInt(3),UO=BigInt(4),FO=BigInt(5),R$=BigInt(7),HO=BigInt(8),B$=BigInt(9),jO=BigInt(16);D$=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];LO=new WeakMap,dp=class{constructor(t,r={}){Z(this,"ORDER");Z(this,"BITS");Z(this,"BYTES");Z(this,"isLE");Z(this,"ZERO",ti);Z(this,"ONE",wr);Z(this,"_lengths");Z(this,"_mod");if(t<=wr)throw new Error("invalid field: expected ORDER > 1, got "+t);let i;this.isLE=!1,r!=null&&typeof r=="object"&&(typeof r.BITS=="number"&&(i=r.BITS),typeof r.sqrt=="function"&&Object.defineProperty(this,"sqrt",{value:r.sqrt,enumerable:!0}),typeof r.isLE=="boolean"&&(this.isLE=r.isLE),r.allowedLengths&&(this._lengths=Object.freeze(r.allowedLengths.slice())),typeof r.modFromBytes=="boolean"&&(this._mod=r.modFromBytes));let{nBitLength:n,nByteLength:o}=q$(t,i);if(o>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");this.ORDER=t,this.BITS=n,this.BYTES=o,Object.freeze(this)}create(t){return Ui(t,this.ORDER)}isValid(t){if(typeof t!="bigint")throw new TypeError("invalid field element: expected bigint, got "+typeof t);return ti<=t&&t<this.ORDER}is0(t){return t===ti}isValidNot0(t){return!this.is0(t)&&this.isValid(t)}isOdd(t){return(t&wr)===wr}neg(t){return Ui(-t,this.ORDER)}eql(t,r){return t===r}sqr(t){return Ui(t*t,this.ORDER)}add(t,r){return Ui(t+r,this.ORDER)}sub(t,r){return Ui(t-r,this.ORDER)}mul(t,r){return Ui(t*r,this.ORDER)}pow(t,r){return L$(this,t,r)}div(t,r){return Ui(t*DO(r,this.ORDER),this.ORDER)}sqrN(t){return t*t}addN(t,r){return t+r}subN(t,r){return t-r}mulN(t,r){return t*r}inv(t){return DO(t,this.ORDER)}sqrt(t){let r=LO.get(this);return r||LO.set(this,r=N$(this.ORDER)),r(this,t)}toBytes(t){return this.isLE?Wm(t,this.BYTES):lp(t,this.BYTES)}fromBytes(t,r=!1){qt(t);let{_lengths:i,BYTES:n,isLE:o,ORDER:a,_mod:s}=this;if(i){if(t.length<1||!i.includes(t.length)||t.length>n)throw new Error("Field.fromBytes: expected "+i+" bytes, got "+t.length);let c=new Uint8Array(n);c.set(t,o?0:c.length-t.length),t=c}if(t.length!==n)throw new Error("Field.fromBytes: expected "+n+" bytes, got "+t.length);let u=o?Lc(t):bi(t);if(s&&(u=Ui(u,a)),!r&&!this.isValid(u))throw new Error("invalid field element: outside of range 0..ORDER");return u}invertBatch(t){return tf(this,t)}cmov(t,r,i){return $u(i,"condition"),i?r:t}};Object.freeze(dp.prototype)});function YO(e){let t=e;if(typeof t!="function")throw new TypeError("Point must be a constructor");pn({Fp:t.Fp,Fn:t.Fn,fromAffine:t.fromAffine,fromBytes:t.fromBytes,fromHex:t.fromHex},{Fp:"object",Fn:"object",fromAffine:"function",fromBytes:"function",fromHex:"function"}),ef(t.Fp),ef(t.Fn)}function f0(e,t){let r=t.negate();return e?r:t}function ry(e,t){let r=tf(e.Fp,t.map(i=>i.Z));return t.map((i,n)=>e.fromAffine(i.toAffine(r[n])))}function $O(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function Qm(e,t){$O(e,t);let r=Math.ceil(t/e)+1,i=2**(e-1),n=2**e,o=Uc(e),a=BigInt(e);return{windows:r,windowSize:i,mask:o,maxNumber:n,shiftBy:a}}function GO(e,t,r){let{windowSize:i,mask:n,maxNumber:o,shiftBy:a}=r,s=Number(e&n),u=e>>a;s>i&&(s-=o,u+=rf);let c=t*i,l=c+Math.abs(s)-1,m=s===0,w=s<0,E=t%2!==0;return{nextN:u,offset:l,isZero:m,isNeg:w,isNegF:E,offsetF:c}}function U$(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((r,i)=>{if(!(r instanceof t))throw new Error("invalid point at index "+i)})}function F$(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((r,i)=>{if(!t.isValid(r))throw new Error("invalid scalar at index "+i)})}function ty(e){return XO.get(e)||1}function ZO(e){if(e!==zc)throw new Error("invalid wNAF")}function JO(e,t,r,i){let n=t,o=e.ZERO,a=e.ZERO;for(;r>zc||i>zc;)r&rf&&(o=o.add(n)),i&rf&&(a=a.add(n)),n=n.double(),r>>=rf,i>>=rf;return{p1:o,p2:a}}function QO(e,t,r){let i=e.Fn;U$(t,e),F$(r,i);let n=t.length,o=r.length;if(n!==o)throw new Error("arrays of points and scalars must have equal length");let a=e.ZERO,s=Xu(BigInt(n)),u=1;s>12?u=s-3:s>4?u=s-2:s>0&&(u=2);let c=Uc(u),l=new Array(Number(c)+1).fill(a),m=Math.floor((i.BITS-1)/u)*u,w=a;for(let E=m;E>=0;E-=u){l.fill(a);for(let M=0;M<o;M++){let D=r[M],L=Number(D>>BigInt(E)&c);l[L]=l[L].add(t[M])}let P=a;for(let M=l.length-1,D=a;M>0;M--)D=D.add(l[M]),P=P.add(D);if(w=w.add(P),E!==0)for(let M=0;M<u;M++)w=w.double()}return w}function WO(e,t,r){if(t){if(t.ORDER!==e)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return ef(t),t}else return Fc(e,{isLE:r})}function eA(e,t,r={},i){if(i===void 0&&(i=e==="edwards"),!t||typeof t!="object")throw new Error(`expected valid ${e} CURVE object`);for(let u of["p","n","h"]){let c=t[u];if(!(typeof c=="bigint"&&c>zc))throw new Error(`CURVE.${u} must be positive bigint`)}let n=WO(t.p,r.Fp,i),o=WO(t.n,r.Fn,i),s=["Gx","Gy","a",e==="weierstrass"?"b":"d"];for(let u of s)if(!n.isValid(t[u]))throw new Error(`CURVE.${u} must be valid field element of CURVE.Fp`);return t=Object.freeze(Object.assign({},t)),{CURVE:t,Fp:n,Fn:o}}function gp(e,t){return function(i){let n=e(i);return{secretKey:n,publicKey:t(n)}}}var zc,rf,ey,XO,pp,vp=Xr(()=>{v();Ju();jc();zc=BigInt(0),rf=BigInt(1);ey=new WeakMap,XO=new WeakMap;pp=class{constructor(t,r){Z(this,"BASE");Z(this,"ZERO");Z(this,"Fn");Z(this,"bits");this.BASE=t.BASE,this.ZERO=t.ZERO,this.Fn=t.Fn,this.bits=r}_unsafeLadder(t,r,i=this.ZERO){let n=t;for(;r>zc;)r&rf&&(i=i.add(n)),n=n.double(),r>>=rf;return i}precomputeWindow(t,r){let{windows:i,windowSize:n}=Qm(r,this.bits),o=[],a=t,s=a;for(let u=0;u<i;u++){s=a,o.push(s);for(let c=1;c<n;c++)s=s.add(a),o.push(s);a=s.double()}return o}wNAF(t,r,i){if(!this.Fn.isValid(i))throw new Error("invalid scalar");let n=this.ZERO,o=this.BASE,a=Qm(t,this.bits);for(let s=0;s<a.windows;s++){let{nextN:u,offset:c,isZero:l,isNeg:m,isNegF:w,offsetF:E}=GO(i,s,a);i=u,l?o=o.add(f0(w,r[E])):n=n.add(f0(m,r[c]))}return ZO(i),{p:n,f:o}}wNAFUnsafe(t,r,i,n=this.ZERO){let o=Qm(t,this.bits);for(let a=0;a<o.windows&&i!==zc;a++){let{nextN:s,offset:u,isZero:c,isNeg:l}=GO(i,a,o);if(i=s,!c){let m=r[u];n=n.add(l?m.negate():m)}}return ZO(i),n}getPrecomputes(t,r,i){let n=ey.get(r);return n||(n=this.precomputeWindow(r,t),t!==1&&(typeof i=="function"&&(n=i(n)),ey.set(r,n))),n}cached(t,r,i){let n=ty(t);return this.wNAF(n,this.getPrecomputes(n,t,i),r)}unsafe(t,r,i,n){let o=ty(t);return o===1?this._unsafeLadder(t,r,n):this.wNAFUnsafe(o,this.getPrecomputes(o,t,i),r,n)}createCache(t,r){$O(r,this.bits),XO.set(t,r),ey.delete(t)}hasCache(t){return ty(t)!==1}}});function tA(e){if(!Number.isSafeInteger(e)||e<0||e>4294967295)throw new Error("wrong u32 integer:"+e);return e}function H$(e){if(tA(e),e<=1)return 1;if(e>2147483648)throw new Error("nextPowerOfTwo overflow: result does not fit u32");return 1<<iy(e-1)+1>>>0}function iy(e){return tA(e),31-Math.clz32(e)}function rA(e,t,r,i,n){let o=e,a=r||((l,m)=>new Array(l).fill(m??o.ZERO)),s=l=>{if(Array.isArray(l))return!0;if(!ArrayBuffer.isView(l))return!1;let m=l;return typeof m.length=="number"&&typeof m.slice=="function"&&typeof m[Symbol.iterator]=="function"},u=(...l)=>{if(!l.length)return 0;for(let w of l)if(!s(w))throw new Error("poly: not polynomial: "+w);let m=l[0].length;for(let w=1;w<l.length;w++)if(l[w].length!==m)throw new Error(`poly: mismatched lengths ${m} vs ${l[w].length}`);if(n!==void 0&&m!==n)throw new Error(`poly: expected fixed length ${n}, got ${m}`);return m};function c(l,m,w=!1){let E=iy(m),P=w?t.brp(E):t.roots(E);for(let M=0;M<m;M++)if(o.eql(l,P[M]))return M;return-1}return{roots:t,create:a,length:n,extend:(l,m)=>{u(l);let w=a(m,o.ZERO);for(let E=0;E<Math.min(l.length,m);E++)w[E]=l[E];return w},degree:l=>{u(l);for(let m=l.length-1;m>=0;m--)if(!o.is0(l[m]))return m;return-1},add:(l,m)=>{let w=u(l,m),E=a(w);for(let P=0;P<w;P++)E[P]=o.add(l[P],m[P]);return E},sub:(l,m)=>{let w=u(l,m),E=a(w);for(let P=0;P<w;P++)E[P]=o.sub(l[P],m[P]);return E},dot:(l,m)=>{let w=u(l,m),E=a(w);for(let P=0;P<w;P++)E[P]=o.mul(l[P],m[P]);return E},mul:(l,m)=>{if(s(m)){let w=u(l,m);if(i){let E=i.direct(l,!1,!0),P=i.direct(m,!1,!0);for(let M=0;M<E.length;M++)E[M]=o.mul(E[M],P[M]);return i.inverse(E,!0,!1)}else{let E=a(w);for(let P=0;P<w;P++)for(let M=0;M<w;M++){let D=(P+M)%w;E[D]=o.add(E[D],o.mul(l[P],m[M]))}return E}}else{let w=a(u(l));for(let E=0;E<w.length;E++)w[E]=o.mul(l[E],m);return w}},convolve(l,m){let w=H$(l.length+m.length-1);return this.mul(this.extend(l,w),this.extend(m,w))},shift(l,m){let w=a(u(l));w[0]=l[0];for(let E=1,P=o.ONE;E<l.length;E++)P=o.mul(P,m),w[E]=o.mul(l[E],P);return w},clone:l=>{u(l);let m=a(l.length);for(let w=0;w<l.length;w++)m[w]=l[w];return m},eval:(l,m)=>{u(l,m);let w=o.ZERO;for(let E=0;E<l.length;E++)w=o.add(w,o.mul(l[E],m[E]));return w},monomial:{basis:(l,m)=>{let w=a(m),E=o.ONE;for(let P=0;P<m;P++)w[P]=E,E=o.mul(E,l);return w},eval:(l,m)=>{u(l);let w=o.ZERO;for(let E=l.length-1;E>=0;E--)w=o.add(o.mul(w,m),l[E]);return w}},lagrange:{basis:(l,m,w=!1,E)=>{let P=iy(m),M=E||(w?t.brp(P):t.roots(P)),D=a(m),L=c(l,m,w);if(L!==-1)return D[L]=o.ONE,D;let U=o.pow(l,BigInt(m)),K=o.mul(o.sub(U,o.ONE),o.inv(BigInt(m))),C=a(m);for(let F=0;F<m;F++)C[F]=o.sub(l,M[F]);let N=o.invertBatch(C);for(let F=0;F<m;F++)D[F]=o.mul(K,o.mul(M[F],N[F]));return D},eval(l,m,w=!1){u(l);let E=c(m,l.length,w);if(E!==-1)return l[E];let P=this.basis(m,l.length,w),M=o.ZERO;for(let D=0;D<l.length;D++)o.is0(l[D])||(M=o.add(M,o.mul(l[D],P[D])));return M}},vanishing(l){u(l);let m=a(l.length+1,o.ZERO);m[0]=o.ONE;for(let w of l){let E=o.neg(w);for(let P=m.length-1;P>0;P--)m[P]=o.add(o.mul(m[P],E),m[P-1]);m[0]=o.mul(m[0],E)}return m}}}var iA=Xr(()=>{v()});function nf(e,t){if(dn(e),dn(t),t<0||t>4)throw new Error("invalid I2OSP length: "+t);if(e<0||e>2**(8*t)-1)throw new Error("invalid I2OSP input: "+e);let r=Array.from({length:t}).fill(0);for(let i=t-1;i>=0;i--)r[i]=e&255,e>>>=8;return new Uint8Array(r)}function z$(e,t){let r=new Uint8Array(e.length);for(let i=0;i<e.length;i++)r[i]=e[i]^t[i];return r}function nA(e){if(!Yu(e)&&typeof e!="string")throw new Error("DST must be Uint8Array or ascii string");let t=typeof e=="string"?qc(e):e;if(t.length===0)throw new Error("DST must be non-empty");return t}function K$(e,t,r,i){qt(e),dn(r),t=nA(t),t.length>255&&(t=i(kt(qc("H2C-OVERSIZE-DST-"),t)));let{outputLen:n,blockLen:o}=i,a=Math.ceil(r/n);if(r>65535||a>255)throw new Error("expand_message_xmd: invalid lenInBytes");let s=kt(t,nf(t.length,1)),u=new Uint8Array(o),c=nf(r,2),l=new Array(a),m=i(kt(u,e,c,nf(0,1),s));l[0]=i(kt(m,nf(1,1),s));for(let E=1;E<a;E++){let P=[z$(m,l[E-1]),nf(E+1,1),s];l[E]=i(kt(...P))}return kt(...l).slice(0,r)}function V$(e,t,r,i,n){if(qt(e),dn(r),t=nA(t),t.length>255){let o=Math.ceil(2*i/8);t=n.create({dkLen:o}).update(qc("H2C-OVERSIZE-DST-")).update(t).digest()}if(r>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return n.create({dkLen:r}).update(e).update(nf(r,2)).update(t).update(nf(t.length,1)).digest()}function ny(e,t,r){pn(r,{p:"bigint",m:"number",k:"number",hash:"function"});let{p:i,k:n,m:o,hash:a,expand:s,DST:u}=r;if(dn(a.outputLen,"valid hash"),qt(e),dn(t),t<1)throw new Error("hash_to_field: expected count >= 1");if(o<1)throw new Error("hash_to_field: expected m >= 1");let c=i.toString(2).length,l=Math.ceil((c+n)/8),m=t*o*l,w;if(s==="xmd")w=K$(e,u,m,a);else if(s==="xof")w=V$(e,u,m,n,a);else if(s==="_internal_pass")w=e;else throw new Error('expand must be "xmd" or "xof"');let E=new Array(t);for(let P=0;P<t;P++){let M=new Array(o);for(let D=0;D<o;D++){let L=l*(D+P*o),U=w.subarray(L,L+l);M[D]=Ui(j$(U),i)}E[P]=M}return E}function oA(e,t){let r=t.map(i=>Array.from(i).reverse());return(i,n)=>{let[o,a,s,u]=r.map(m=>m.reduce((w,E)=>e.add(e.mul(w,i),E))),[c,l]=tf(e,[a,u],!0);return i=e.mul(o,c),n=e.mul(n,e.mul(s,l)),{x:i,y:n}}}function aA(e,t,r){if(typeof t!="function")throw new Error("mapToCurve() must be defined");let i=s=>Object.freeze({...s,DST:Yu(s.DST)?hp(s.DST):s.DST,...s.encodeDST===void 0?{}:{encodeDST:Yu(s.encodeDST)?hp(s.encodeDST):s.encodeDST}}),n=i(r);function o(s){return e.fromAffine(t(s))}function a(s){let u=s.clearCofactor();return u.equals(e.ZERO)?e.ZERO:(u.assertValidity(),u)}return Object.freeze({get defaults(){return i(n)},Point:e,hashToCurve(s,u){let c=Object.assign({},n,u),l=ny(s,2,c),m=o(l[0]),w=o(l[1]);return a(m.add(w))},encodeToCurve(s,u){let c=n.encodeDST?{DST:n.encodeDST}:{},l=Object.assign({},n,c,u),m=ny(s,1,l),w=o(m[0]);return a(w)},mapToCurve(s){if(n.m===1){if(typeof s!="bigint")throw new Error("expected bigint (m=1)");return a(o([s]))}if(!Array.isArray(s))throw new Error("expected array of bigints");for(let u of s)if(typeof u!="bigint")throw new Error("expected array of bigints");return a(o(s))},hashToScalar(s,u){let c=e.Fn.ORDER,l=Object.assign({},n,{p:c,m:1,DST:G$},u);return ny(s,1,l)[0][0]}})}var j$,G$,sA=Xr(()=>{v();Ju();jc();j$=bi;G$="HashToScalar-"});function oy(e){pn(e,{name:"string",hash:"function"},{hashToScalar:"function",validatePoint:"function",parsePublicKey:"function",adjustScalar:"function",adjustPoint:"function",challenge:"function",adjustNonces:"function",adjustSecret:"function",adjustPublic:"function",adjustGroupCommitmentShare:"function",adjustDKG:"function"}),YO(e.Point);let{Point:t}=e,r=e.Fn===void 0?t.Fn:e.Fn,i=e.hash,n=e.hashToScalar===void 0?(q,W={DST:new Uint8Array})=>{let $=i(kt(W.DST,q));return r.create(r.isLE?Lc($):bi($))}:e.hashToScalar,o=Ia(e.H1!==void 0?e.H1:e.name+"rho"),a=Ia(e.H2!==void 0?e.H2:e.name+"chal"),s=Ia(e.H3!==void 0?e.H3:e.name+"nonce"),u=Ia(e.H4!==void 0?e.H4:e.name+"msg"),c=Ia(e.H5!==void 0?e.H5:e.name+"com"),l=Ia(e.HDKG!==void 0?e.HDKG:e.name+"dkg"),m=Ia(e.HID!==void 0?e.HID:e.name+"id"),w=q=>n(q,{DST:o}),E=q=>n(q,{DST:a}),P=q=>n(q,{DST:s}),M=q=>i(kt(u,q)),D=q=>i(kt(c,q)),L=q=>n(q,{DST:l}),U=q=>n(q,{DST:m}),K=(q=ki)=>{let W=Hc(q(u0(r.ORDER)),r.ORDER,r.isLE);return r.isLE?Lc(W):bi(W)},C=q=>q.toBytes(),N=q=>{let W=t.fromBytes(q);return e.validatePoint&&e.validatePoint(W),W},F=(q,W)=>({identifier:q,hiding:C(t.BASE.multiply(r.fromBytes(W.hiding))),binding:C(t.BASE.multiply(r.fromBytes(W.binding)))}),H=e.adjustPoint===void 0?q=>q:e.adjustPoint,z=q=>{if(!r.isValid(q)||r.is0(q))throw new Error("Invalid identifier "+q);return q},V=q=>Pa(r.toBytes(z(q))),B=q=>{let W=z(r.fromBytes(Dc(q)));if(V(W)!==q)throw new Error("expected canonical identifier hex");return W},g={encode:(q,W)=>{let $=kt(C(q),r.toBytes(W));return e.adjustTx&&($=e.adjustTx.encode($)),$},decode:q=>{e.adjustTx&&(q=e.adjustTx.decode(q));let W=N(q.subarray(0,-r.BYTES)),$=r.fromBytes(q.subarray(-r.BYTES));return{R:W,z:$}}},I=(q=ki)=>{let W=K(q);e.adjustScalar&&(W=e.adjustScalar(W));let $=t.BASE.multiply(W);return{scalar:W,point:$}},y="roots are unavailable in FROST polynomial mode",f={info:{G:r.ZERO,oddFactor:r.ZERO,powerOfTwo:0},roots(){throw new Error(y)},brp(){throw new Error(y)},inverse(){throw new Error(y)},omega(){throw new Error(y)},clear(){}},p=rA(r,f),_=(q,W)=>QO(t,q,W),x=(q,W)=>{if(!W.length)throw new Error("empty coefficients");return p.monomial.eval(W,q)},b=(q,W)=>{let $="invalid parameters";if(!q.some(le=>r.eql(le,W)))throw new Error($);let ee=new Set(q);if(ee.size!==q.length)throw new Error($);if(!ee.has(W))throw new Error($);let se=r.ONE,ue=r.ONE;for(let le of q)r.eql(le,W)||(se=r.mul(se,le),ue=r.mul(ue,r.sub(le,W)));return r.div(se,ue)},d=(q,W)=>{let $=p.monomial.basis(q,W.length);return _(W,$)},O=(q,W,$,ee=ki)=>{mp(q);let se=W===void 0?K(ee):r.fromBytes(W);if(!$){$=[];for(let Ae=0;Ae<q.min-1;Ae++)$.push(K(ee))}if($.length!==q.min-1)throw new Error("wrong coefficients length");let ue=[se,...$],le=ue.map(Ae=>t.BASE.multiply(Ae));return{coefficients:ue,commitment:le,secret:se}},T={challenge:(q,W,$)=>L(kt(r.toBytes(q),C(W),C($))),compute(q,W,$,ee=ki){if(W.length<1)throw new Error("coefficients should have at least one element");let{point:se,scalar:ue}=I(ee),le=$[0],Ae=this.challenge(q,le,se),ge=r.add(ue,r.mul(W[0],Ae));return g.encode(se,ge)},validate(q,W,$){if(W.length<1)throw new Error("commitment should have at least one element");let{R:ee,z:se}=g.decode($),ue=N(W[0]),le=this.challenge(q,ue,ee);if(!ee.equals(t.BASE.multiply(se).subtract(ue.multiply(le))))throw new Error("invalid proof of knowledge")}},S={challenge:(q,W,$)=>e.challenge?e.challenge(q,W,$):E(kt(C(q),C(W),$)),sign(q,W,$=ki){let{point:ee,scalar:se}=I($),ue=t.BASE.multiply(W),le=this.challenge(ee,ue,q),Ae=r.add(se,r.mul(le,W));return[ee,Ae]},verify(q,W,$,ee){e.adjustPoint&&(ee=e.adjustPoint(ee)),e.adjustPoint&&(W=e.adjustPoint(W));let se=this.challenge(W,ee,q),ue=t.BASE.multiply($),le=ee.multiply(se),Ae=ue.subtract(le).subtract(W);return Ae.clearCofactor&&(Ae=Ae.clearCofactor()),t.ZERO.equals(Ae)}},R=(q,W,$)=>{if(!t.BASE.multiply($).equals(d(q,W)))throw new Error("invalid secret share")},Y={fromNumber(q){if(!Number.isSafeInteger(q))throw new Error("expected safe interger");return V(BigInt(q))},derive(q){if(typeof q!="string")throw new Error("wrong identifier string: "+q);return V(U(Ia(q)))}},X=(q,W=ki)=>P(kt(W(32),r.toBytes(q))),ne=(q,W,$)=>{let ee=W.map(ye=>[ye.identifier,B(ye.identifier),N(ye.hiding),N(ye.binding)]);ee.sort((ye,Be)=>ye[1]<Be[1]?-1:ye[1]>Be[1]?1:0);let se=[];for(let[ye,Be,be,_e]of ee)se.push(r.toBytes(Be),C(be),C(_e));let ue=D(kt(...se)),le=kt(C(q),M($),ue),Ae={};for(let[ye,Be]of ee)Ae[ye]=w(kt(le,r.toBytes(Be)));let ge=[],ve=[];for(let[ye,Be,be,_e]of ee){if(t.ZERO.equals(be)||t.ZERO.equals(_e))throw new Error("infinity commitment");ge.push(be,_e),ve.push(r.ONE,Ae[ye])}let sr=_(ge,ve);return{identifiers:ee.map(ye=>ye[1]),groupCommitment:sr,bindingFactors:Ae}},ce=(q,W,$,ee)=>{let se=H(N(q)),ue=B(ee),{identifiers:le,groupCommitment:Ae,bindingFactors:ge}=ne(se,W,$),ve=ge[ee],sr=b(le,ue),xe=S.challenge(Ae,se,$);return{lambda:sr,challenge:xe,bindingFactor:ve,groupCommitment:Ae}};Object.freeze(Y);let pe={Identifier:Y,DKG:Object.freeze({round1:(q,W,$,ee=ki)=>{mp(W);let se=B(q),{coefficients:ue,commitment:le}=O(W,$,void 0,ee),Ae=T.compute(se,ue,le,ee),ge=le.map(C),ve={identifier:V(se),commitment:ge,proofOfKnowledge:Ae},sr={identifier:se,coefficients:ue,commitment:le.map(C),signers:{min:W.min,max:W.max},step:1};return{public:ve,secret:sr}},round2:(q,W)=>{if(W.length!==q.signers.max-1)throw new Error("wrong number of round1 packages");if(!q.coefficients||q.step===3)throw new Error("round3 package used in round2");let $={};for(let ee of W){if(ee.commitment.length!==q.signers.min)throw new Error("wrong number of commitments");let se=B(ee.identifier);if(se===q.identifier)throw new Error("duplicate id="+V(se));T.validate(se,ee.commitment,ee.proofOfKnowledge);for(let le of ee.commitment)N(le);if($[ee.identifier])throw new Error("Duplicate id="+se);let ue=r.toBytes(x(se,q.coefficients));$[ee.identifier]={identifier:V(q.identifier),signingShare:ue}}return q.step=2,$},round3:(q,W,$)=>{if(W.length!==q.signers.max-1)throw new Error("wrong length of round1 packages");if(!q.coefficients||q.step!==2)throw new Error("round2 package used in round3");if($.length!==W.length)throw new Error("wrong length of round2 packages");let ee={};for(let Be of W){if(!Be.identifier||!Be.commitment)throw new Error("wrong round1 share");ee[Be.identifier]={...Be}}for(let Be of $){if(!Be.identifier||!Be.signingShare)throw new Error("wrong round2 share");if(!ee[Be.identifier])throw new Error("round1 share for "+Be.identifier+" is missing");ee[Be.identifier].signingShare=Be.signingShare}if(Object.keys(ee).length!==W.length)throw new Error("mismatch identifiers between rounds");let se=r.ZERO;if(q.commitment.length!==q.signers.min)throw new Error("wrong commitments length");let ue=q.commitment.map(N),le=x(q.identifier,q.coefficients);R(q.identifier,ue,le);let Ae=ue.map(C),ge={[V(q.identifier)]:Ae};for(let Be in ee){let be=ee[Be];if(!be.signingShare||!be.commitment)throw new Error("mismatch identifiers");let _e=B(Be),Qi=r.fromBytes(be.signingShare),Ce=be.commitment.map(N);R(q.identifier,Ce,Qi),se=r.add(se,Qi);let Re=V(_e);if(ge[Re])throw new Error("duplicated id="+Re);ge[Re]=be.commitment}se=r.add(se,le);let ve=new Array(q.signers.min).fill(t.ZERO);for(let Be in ge){let be=ge[Be];if(be.length!==q.signers.min)throw new Error("wrong commitments length");for(let _e=0;_e<be.length;_e++)ve[_e]=ve[_e].add(N(be[_e]))}let sr=ve.map(C),xe={};for(let Be in ge)xe[Be]=C(d(B(Be),ve));let ye={public:{signers:{min:q.signers.min,max:q.signers.max},commitments:sr,verifyingShares:Object.fromEntries(Object.entries(xe).map(([Be,be])=>[Be,be.slice()]))},secret:{identifier:V(q.identifier),signingShare:r.toBytes(se)}};e.adjustDKG&&(ye=e.adjustDKG(ye));for(let Be=0;Be<q.coefficients.length;Be++)q.coefficients[Be]-=q.coefficients[Be];return delete q.coefficients,q.step=3,ye},clean(q){if(q.identifier-=q.identifier,q.coefficients)for(let W=0;W<q.coefficients.length;W++)q.coefficients[W]-=q.coefficients[W];q.step=3}}),trustedDealer(q,W,$,ee=ki){if(mp(q),W===void 0){W=[];for(let ve=1;ve<=q.max;ve++)W.push(Y.fromNumber(ve))}else if(!Array.isArray(W)||W.length!==q.max)throw new Error("identifiers should be array of "+q.max);let se={};for(let ve of W){let sr=B(ve);if(ve in se)throw new Error("duplicated id="+ve);se[ve]=sr}let ue=O(q,$,void 0,ee),le=ue.commitment.map(C),Ae={},ge={};for(let ve of W){let sr=x(se[ve],ue.coefficients);ge[ve]=C(t.BASE.multiply(sr)),Ae[ve]={identifier:ve,signingShare:r.toBytes(sr)}}return{public:{signers:{min:q.min,max:q.max},commitments:le,verifyingShares:ge},secretShares:Ae}},validateSecret(q,W){let $=B(q.identifier),ee=W.commitments.map(N),se=r.fromBytes(q.signingShare);R($,ee,se)},commit(q,W=ki){let $=r.fromBytes(q.signingShare),ee=X($,W),se=X($,W),ue={hiding:r.toBytes(ee),binding:r.toBytes(se)};return{nonces:ue,commitments:F(q.identifier,ue)}},signShare(q,W,$,ee,se){uA(W.signers,ee.length);let ue=r.fromBytes($.hiding),le=r.fromBytes($.binding);if(r.is0(ue)||r.is0(le))throw new Error("signing nonces already used");let Ae={identifier:q.identifier,hiding:C(t.BASE.multiply(ue)),binding:C(t.BASE.multiply(le))},ge=ee.find(De=>De.identifier===q.identifier);if(!ge)throw new Error("missing signer commitment");if(Pa(ge.hiding)!==Pa(Ae.hiding)||Pa(ge.binding)!==Pa(Ae.binding))throw new Error("incorrect signer commitment");e.adjustSecret&&(q=e.adjustSecret(q,W)),e.adjustPublic&&(W=e.adjustPublic(W));let ve=r.fromBytes(q.signingShare),{lambda:sr,challenge:xe,bindingFactor:ye,groupCommitment:Be}=ce(W.commitments[0],ee,se,q.identifier),be=e.adjustNonces?e.adjustNonces(Be,$):$,_e=e.adjustNonces?r.fromBytes(be.hiding):ue,Qi=e.adjustNonces?r.fromBytes(be.binding):le,Ce=r.mul(r.mul(sr,ve),xe),Re=r.mul(Qi,ye),Js=r.toBytes(r.add(r.add(_e,Re),Ce));return $.hiding.fill(0),$.binding.fill(0),Js},verifyShare(q,W,$,ee,se){e.adjustPublic&&(q=e.adjustPublic(q));let ue=W.find(Qi=>Qi.identifier===ee);if(!ue)throw new Error("cannot find identifier commitment");let le=N(q.verifyingShares[ee]),Ae=N(ue.hiding),ge=N(ue.binding),{lambda:ve,challenge:sr,bindingFactor:xe,groupCommitment:ye}=ce(q.commitments[0],W,$,ee),Be=Ae.add(ge.multiply(xe));e.adjustGroupCommitmentShare&&(Be=e.adjustGroupCommitmentShare(ye,Be));let be=t.BASE.multiply(r.fromBytes(se)),_e=Be.add(le.multiply(r.mul(sr,ve)));return be.equals(_e)},aggregate(q,W,$,ee){e.adjustPublic&&(q=e.adjustPublic(q));try{uA(q.signers,W.length)}catch{throw new Kc("aggregation failed",[])}let se=W.map(ge=>ge.identifier);if(se.length!==Object.keys(ee).length)throw new Kc("aggregation failed",[]);for(let ge of se)if(!(ge in ee)||!(ge in q.verifyingShares))throw new Kc("aggregation failed",[]);let ue=N(q.commitments[0]),{groupCommitment:le}=ne(ue,W,$),Ae=r.ZERO;for(let ge of se)Ae=r.add(Ae,r.fromBytes(ee[ge]));if(!S.verify($,le,Ae,ue)){let ge=[];for(let ve of se)this.verifyShare(q,W,$,ve,ee[ve])||ge.push(ve);throw new Kc("aggregation failed",ge)}return g.encode(le,Ae)},sign(q,W){let $=r.fromBytes(W);e.adjustScalar&&($=e.adjustScalar($));let[ee,se]=S.sign(q,$);return g.encode(ee,se)},verify(q,W,$){let ee=e.parsePublicKey?e.parsePublicKey($):N($),{R:se,z:ue}=g.decode(q);return S.verify(W,se,ue,ee)},combineSecret(q,W){if(mp(W),!Array.isArray(q)||q.length<W.min)throw new Error("wrong secret shares array");let $=[],ee={};for(let le of q){let Ae=B(le.identifier),ge=V(Ae);if(ee[ge])throw new Error("duplicated id="+ge);ee[ge]=!0,$.push([Ae,r.fromBytes(le.signingShare)])}let se=$.map(([le])=>le),ue=r.ZERO;for(let[le,Ae]of $)ue=r.add(ue,r.mul(Ae,b(se,le)));return r.toBytes(ue)},utils:Object.freeze({Fn:r,randomScalar:(q=ki)=>r.toBytes(I(q).scalar),generateSecretPolynomial:(q,W,$,ee)=>{let se=O(q,W,$,ee);return{...se,commitment:se.commitment.map(C)}}})};return Object.freeze(pe)}var mp,uA,Kc,fA=Xr(()=>{v();gs();Ju();vp();iA();jc();mp=e=>{if(!Number.isSafeInteger(e.min)||!Number.isSafeInteger(e.max))throw new Error("Wrong signers info: min="+e.min+" max="+e.max);if(e.min<2||e.max<2||e.min>e.max)throw new Error("Wrong signers info: min="+e.min+" max="+e.max)},uA=(e,t)=>{if(t<e.min||t>e.max)throw new Error("Wrong number of commitments="+t)},Kc=class extends Error{constructor(r,i){super(r);Z(this,"cheaters");this.cheaters=i}}});var sy={};X1(sy,{_HMAC:()=>c0,hmac:()=>ay});var c0,ay,yp=Xr(()=>{v();gs();c0=class{constructor(t,r){Z(this,"oHash");Z(this,"iHash");Z(this,"blockLen");Z(this,"outputLen");Z(this,"canXOF",!1);Z(this,"finished",!1);Z(this,"destroyed",!1);if(Y2(t),Io(r,void 0,"key"),this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let i=this.blockLen,n=new Uint8Array(i);n.set(r.length>i?t.create().update(r).digest():r);for(let o=0;o<n.length;o++)n[o]^=54;this.iHash.update(n),this.oHash=t.create();for(let o=0;o<n.length;o++)n[o]^=106;this.oHash.update(n),Ea(n)}update(t){return Cc(this),this.iHash.update(t),this}digestInto(t){Cc(this),$2(t,this),this.finished=!0;let r=t.subarray(0,this.outputLen);this.iHash.digestInto(r),this.oHash.update(r),this.oHash.digestInto(r),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:r,iHash:i,finished:n,destroyed:o,blockLen:a,outputLen:s}=this;return t=t,t.finished=n,t.destroyed=o,t.blockLen=a,t.outputLen=s,t.oHash=r._cloneInto(t.oHash),t.iHash=i._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}},ay=(()=>{let e=((t,r,i)=>new c0(t,r).update(i).digest());return e.create=(t,r)=>new c0(t,r),e})()});function Z$(e,t,r){Ym("scalar",e,gn,r);let[[i,n],[o,a]]=t,s=cA(a*e,r),u=cA(-n*e,r),c=e-s*i-u*o,l=-s*n-u*a,m=c<gn,w=l<gn;m&&(c=-c),w&&(l=-l);let E=Uc(Math.ceil(Xu(r)/2))+Kr;if(c<gn||c>=E||l<gn||l>=E)throw new Error("splitScalar (endomorphism): failed for k");return{k1neg:m,k1:c,k2neg:w,k2:l}}function fy(e){if(!["compact","recovered","der"].includes(e))throw new Error('Signature format must be "compact", "recovered", or "der"');return e}function uy(e,t){pn(e);let r={};for(let i of Object.keys(t))r[i]=e[i]===void 0?t[i]:e[i];return $u(r.lowS,"lowS"),$u(r.prehash,"prehash"),r.format!==void 0&&fy(r.format),r}function lA(e,t={}){let r=eA("weierstrass",e,t),i=r.Fp,n=r.Fn,o=r.CURVE,{h:a,n:s}=o;pn(t,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object"});let{endo:u,allowInfinityPoint:c}=t;if(u&&(!i.is0(o.a)||typeof u.beta!="bigint"||!Array.isArray(u.basises)))throw new Error('invalid endo: expected "beta": bigint and "basises": array');let l=pA(i,n);function m(){if(!i.isOdd)throw new Error("compression is not supported: Field does not have .isOdd()")}function w(I,y,f){if(c&&y.is0())return Uint8Array.of(0);let{x:p,y:_}=y.toAffine(),x=i.toBytes(p);if($u(f,"isCompressed"),f){m();let b=!i.isOdd(_);return kt(hA(b),x)}else return kt(Uint8Array.of(4),x,i.toBytes(_))}function E(I){qt(I,void 0,"Point");let{publicKey:y,publicKeyUncompressed:f}=l,p=I.length,_=I[0],x=I.subarray(1);if(c&&p===1&&_===0)return{x:i.ZERO,y:i.ZERO};if(p===y&&(_===2||_===3)){let b=i.fromBytes(x);if(!i.isValid(b))throw new Error("bad point: is not on curve, wrong x");let d=D(b),O;try{O=i.sqrt(d)}catch(R){let Y=R instanceof Error?": "+R.message:"";throw new Error("bad point: is not on curve, sqrt error"+Y)}m();let T=i.isOdd(O);return(_&1)===1!==T&&(O=i.neg(O)),{x:b,y:O}}else if(p===f&&_===4){let b=i.BYTES,d=i.fromBytes(x.subarray(0,b)),O=i.fromBytes(x.subarray(b,b*2));if(!L(d,O))throw new Error("bad point: is not on curve");return{x:d,y:O}}else throw new Error(`bad point: got length ${p}, expected compressed=${y} or uncompressed=${f}`)}let P=t.toBytes===void 0?w:t.toBytes,M=t.fromBytes===void 0?E:t.fromBytes;function D(I){let y=i.sqr(I),f=i.mul(y,I);return i.add(i.add(f,i.mul(I,o.a)),o.b)}function L(I,y){let f=i.sqr(y),p=D(I);return i.eql(f,p)}if(!L(o.Gx,o.Gy))throw new Error("bad curve params: generator point");let U=i.mul(i.pow(o.a,Vc),ly),K=i.mul(i.sqr(o.b),BigInt(27));if(i.is0(i.add(U,K)))throw new Error("bad curve params: a or b");function C(I,y,f=!1){if(!i.isValid(y)||f&&i.is0(y))throw new Error(`bad point coordinate ${I}`);return y}function N(I){if(!(I instanceof z))throw new Error("Weierstrass Point expected")}function F(I){if(!u||!u.basises)throw new Error("no endo");return Z$(I,u.basises,n.ORDER)}function H(I,y,f,p,_){return f=new z(i.mul(f.X,I),f.Y,f.Z),y=f0(p,y),f=f0(_,f),y.add(f)}let g=class g{constructor(y,f,p){Z(this,"X");Z(this,"Y");Z(this,"Z");this.X=C("x",y),this.Y=C("y",f,!0),this.Z=C("z",p),Object.freeze(this)}static CURVE(){return o}static fromAffine(y){let{x:f,y:p}=y||{};if(!y||!i.isValid(f)||!i.isValid(p))throw new Error("invalid affine point");if(y instanceof g)throw new Error("projective point not allowed");return i.is0(f)&&i.is0(p)?g.ZERO:new g(f,p,i.ONE)}static fromBytes(y){let f=g.fromAffine(M(qt(y,void 0,"point")));return f.assertValidity(),f}static fromHex(y){return g.fromBytes(Dc(y))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(y=8,f=!0){return B.createCache(this,y),f||this.multiply(Vc),this}assertValidity(){let y=this;if(y.is0()){if(t.allowInfinityPoint&&i.is0(y.X)&&i.eql(y.Y,i.ONE)&&i.is0(y.Z))return;throw new Error("bad point: ZERO")}let{x:f,y:p}=y.toAffine();if(!i.isValid(f)||!i.isValid(p))throw new Error("bad point: x or y not field elements");if(!L(f,p))throw new Error("bad point: equation left != right");if(!y.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){let{y}=this.toAffine();if(!i.isOdd)throw new Error("Field doesn't support isOdd");return!i.isOdd(y)}equals(y){N(y);let{X:f,Y:p,Z:_}=this,{X:x,Y:b,Z:d}=y,O=i.eql(i.mul(f,d),i.mul(x,_)),T=i.eql(i.mul(p,d),i.mul(b,_));return O&&T}negate(){return new g(this.X,i.neg(this.Y),this.Z)}double(){let{a:y,b:f}=o,p=i.mul(f,Vc),{X:_,Y:x,Z:b}=this,d=i.ZERO,O=i.ZERO,T=i.ZERO,S=i.mul(_,_),R=i.mul(x,x),Y=i.mul(b,b),X=i.mul(_,x);return X=i.add(X,X),T=i.mul(_,b),T=i.add(T,T),d=i.mul(y,T),O=i.mul(p,Y),O=i.add(d,O),d=i.sub(R,O),O=i.add(R,O),O=i.mul(d,O),d=i.mul(X,d),T=i.mul(p,T),Y=i.mul(y,Y),X=i.sub(S,Y),X=i.mul(y,X),X=i.add(X,T),T=i.add(S,S),S=i.add(T,S),S=i.add(S,Y),S=i.mul(S,X),O=i.add(O,S),Y=i.mul(x,b),Y=i.add(Y,Y),S=i.mul(Y,X),d=i.sub(d,S),T=i.mul(Y,R),T=i.add(T,T),T=i.add(T,T),new g(d,O,T)}add(y){N(y);let{X:f,Y:p,Z:_}=this,{X:x,Y:b,Z:d}=y,O=i.ZERO,T=i.ZERO,S=i.ZERO,R=o.a,Y=i.mul(o.b,Vc),X=i.mul(f,x),ne=i.mul(p,b),ce=i.mul(_,d),pe=i.add(f,p),q=i.add(x,b);pe=i.mul(pe,q),q=i.add(X,ne),pe=i.sub(pe,q),q=i.add(f,_);let W=i.add(x,d);return q=i.mul(q,W),W=i.add(X,ce),q=i.sub(q,W),W=i.add(p,_),O=i.add(b,d),W=i.mul(W,O),O=i.add(ne,ce),W=i.sub(W,O),S=i.mul(R,q),O=i.mul(Y,ce),S=i.add(O,S),O=i.sub(ne,S),S=i.add(ne,S),T=i.mul(O,S),ne=i.add(X,X),ne=i.add(ne,X),ce=i.mul(R,ce),q=i.mul(Y,q),ne=i.add(ne,ce),ce=i.sub(X,ce),ce=i.mul(R,ce),q=i.add(q,ce),X=i.mul(ne,q),T=i.add(T,X),X=i.mul(W,q),O=i.mul(pe,O),O=i.sub(O,X),X=i.mul(pe,ne),S=i.mul(W,S),S=i.add(S,X),new g(O,T,S)}subtract(y){return N(y),this.add(y.negate())}is0(){return this.equals(g.ZERO)}multiply(y){let{endo:f}=t;if(!n.isValidNot0(y))throw new RangeError("invalid scalar: out of range");let p,_,x=b=>B.cached(this,b,d=>ry(g,d));if(f){let{k1neg:b,k1:d,k2neg:O,k2:T}=F(y),{p:S,f:R}=x(d),{p:Y,f:X}=x(T);_=R.add(X),p=H(f.beta,S,Y,b,O)}else{let{p:b,f:d}=x(y);p=b,_=d}return ry(g,[p,_])[0]}multiplyUnsafe(y){let{endo:f}=t,p=this,_=y;if(!n.isValid(_))throw new RangeError("invalid scalar: out of range");if(_===gn||p.is0())return g.ZERO;if(_===Kr)return p;if(B.hasCache(this))return this.multiply(_);if(f){let{k1neg:x,k1:b,k2neg:d,k2:O}=F(_),{p1:T,p2:S}=JO(g,p,b,O);return H(f.beta,T,S,x,d)}else return B.unsafe(p,_)}toAffine(y){let f=this,p=y,{X:_,Y:x,Z:b}=f;if(i.eql(b,i.ONE))return{x:_,y:x};let d=f.is0();p==null&&(p=d?i.ONE:i.inv(b));let O=i.mul(_,p),T=i.mul(x,p),S=i.mul(b,p);if(d)return{x:i.ZERO,y:i.ZERO};if(!i.eql(S,i.ONE))throw new Error("invZ was invalid");return{x:O,y:T}}isTorsionFree(){let{isTorsionFree:y}=t;return a===Kr?!0:y?y(g,this):B.unsafe(this,s).is0()}clearCofactor(){let{clearCofactor:y}=t;return a===Kr?this:y?y(g,this):this.multiplyUnsafe(a)}isSmallOrder(){return a===Kr?this.is0():this.clearCofactor().is0()}toBytes(y=!0){return $u(y,"isCompressed"),this.assertValidity(),P(g,this,y)}toHex(y=!0){return Pa(this.toBytes(y))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}};Z(g,"BASE",new g(o.Gx,o.Gy,i.ONE)),Z(g,"ZERO",new g(i.ZERO,i.ONE,i.ZERO)),Z(g,"Fp",i),Z(g,"Fn",n);let z=g,V=n.BITS,B=new pp(z,t.endo?Math.ceil(V/2):V);return V>=8&&z.BASE.precompute(8),Object.freeze(z.prototype),Object.freeze(z),z}function hA(e){return Uint8Array.of(e?2:3)}function W$(e,t){let r=ef(e),i=r.ORDER,n=gn;for(let M=i-Kr;M%Ao===gn;M/=Ao)n+=Kr;let o=n,a=Ao<<o-Kr-Kr,s=a*Ao,u=(i-Kr)/s,c=(u-Kr)/Ao,l=s-Kr,m=a,w=r.pow(t,u),E=r.pow(t,(u+Kr)/Ao),P=(M,D)=>{let L=w,U=r.pow(D,l),K=r.sqr(U);K=r.mul(K,D);let C=r.mul(M,K);C=r.pow(C,c),C=r.mul(C,U),U=r.mul(C,D),K=r.mul(C,M);let N=r.mul(K,U);C=r.pow(N,m);let F=r.eql(C,r.ONE);U=r.mul(K,E),C=r.mul(N,L),K=r.cmov(U,K,F),N=r.cmov(C,N,F);for(let H=o;H>Kr;H--){let z=H-Ao;z=Ao<<z-Kr;let V=r.pow(N,z),B=r.eql(V,r.ONE);U=r.mul(K,L),L=r.mul(L,L),V=r.mul(N,L),K=r.cmov(U,K,B),N=r.cmov(V,N,B)}return{isValid:!r.is0(D)&&(F||r.is0(M)),value:K}};if(r.ORDER%ly===Vc){let M=(r.ORDER-Vc)/ly,D=r.sqrt(r.neg(t));P=(L,U)=>{let K=r.sqr(U),C=r.mul(L,U);K=r.mul(K,C);let N=r.pow(K,M);N=r.mul(N,C);let F=r.mul(N,D),H=r.mul(r.sqr(N),U),z=r.eql(H,L),V=r.cmov(F,N,z);return{isValid:!r.is0(U)&&z,value:V}}}return P}function dA(e,t){let r=ef(e),{A:i,B:n,Z:o}=t;if(!r.isValidNot0(i)||!r.isValidNot0(n)||!r.isValid(o))throw new Error("mapToCurveSimpleSWU: invalid opts");if(r.eql(o,r.neg(r.ONE))||Jm(r,o))throw new Error("mapToCurveSimpleSWU: invalid opts");let a=r.mul(n,r.inv(r.mul(o,i))),s=r.add(r.add(r.mul(r.sqr(a),a),r.mul(i,a)),n);if(!Jm(r,s))throw new Error("mapToCurveSimpleSWU: invalid opts");let u=W$(r,o);if(!r.isOdd)throw new Error("Field does not have .isOdd()");return c=>{let l,m,w,E,P,M,D,L;l=r.sqr(c),l=r.mul(l,o),m=r.sqr(l),m=r.add(m,l),w=r.add(m,r.ONE),w=r.mul(w,n),E=r.cmov(o,r.neg(m),!r.eql(m,r.ZERO)),E=r.mul(E,i),m=r.sqr(w),M=r.sqr(E),P=r.mul(M,i),m=r.add(m,P),m=r.mul(m,w),M=r.mul(M,E),P=r.mul(M,n),m=r.add(m,P),D=r.mul(l,w);let{isValid:U,value:K}=u(m,M);L=r.mul(l,c),L=r.mul(L,K),D=r.cmov(D,w,U),L=r.cmov(L,K,U);let C=r.isOdd(c)===r.isOdd(L);L=r.cmov(r.neg(L),L,C);let N=tf(r,[E],!0)[0];return D=r.mul(D,N),{x:D,y:L}}}function pA(e,t){return{secretKey:t.BYTES,publicKey:1+e.BYTES,publicKeyUncompressed:1+2*e.BYTES,publicKeyHasPrefix:!0,signature:2*t.BYTES}}function Y$(e,t={}){let{Fn:r}=e,i=t.randomBytes===void 0?ki:t.randomBytes,n=Object.assign(pA(e.Fp,r),{seed:Math.max(u0(r.ORDER),16)});function o(E){try{let P=r.fromBytes(E);return r.isValidNot0(P)}catch{return!1}}function a(E,P){let{publicKey:M,publicKeyUncompressed:D}=n;try{let L=E.length;return P===!0&&L!==M||P===!1&&L!==D?!1:!!e.fromBytes(E)}catch{return!1}}function s(E){return E=E===void 0?i(n.seed):E,Hc(qt(E,n.seed,"seed"),r.ORDER)}function u(E,P=!0){return e.BASE.multiply(r.fromBytes(E)).toBytes(P)}function c(E){let{secretKey:P,publicKey:M,publicKeyUncompressed:D}=n,L=r._lengths;if(!Yu(E))return;let U=qt(E,void 0,"key").length,K=U===M||U===D,C=U===P||!!L?.includes(U);if(!(K&&C))return K}function l(E,P,M=!0){if(c(E)===!0)throw new Error("first arg must be private key");if(c(P)===!1)throw new Error("second arg must be public key");let D=r.fromBytes(E);return e.fromBytes(P).multiply(D).toBytes(M)}let m={isValidSecretKey:o,isValidPublicKey:a,randomSecretKey:s},w=gp(s,u);return Object.freeze(m),Object.freeze(n),Object.freeze({getPublicKey:u,getSharedSecret:l,keygen:w,Point:e,utils:m,lengths:n})}function gA(e,t,r={}){let i=t;Y2(i),pn(r,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"}),r=Object.assign({},r);let n=r.randomBytes===void 0?ki:r.randomBytes,o=r.hmac===void 0?(p,_)=>ay(i,p,_):r.hmac,{Fp:a,Fn:s}=e,{ORDER:u,BITS:c}=s,{keygen:l,getPublicKey:m,getSharedSecret:w,utils:E,lengths:P}=Y$(e,r),M={prehash:!0,lowS:typeof r.lowS=="boolean"?r.lowS:!0,format:"compact",extraEntropy:!1},D=u*Ao+Kr<a.ORDER;function L(p){let _=u>>Kr;return p>_}function U(p,_){if(!s.isValidNot0(_))throw new Error(`invalid signature ${p}: out of range 1..Point.Fn.ORDER`);return _}function K(){if(D)throw new Error('"recovered" sig type is not supported for cofactor >2 curves')}function C(p,_){fy(_);let x=P.signature,b=_==="compact"?x:_==="recovered"?x+1:void 0;return qt(p,b)}class N{constructor(_,x,b){Z(this,"r");Z(this,"s");Z(this,"recovery");if(this.r=U("r",_),this.s=U("s",x),b!=null){if(K(),![0,1,2,3].includes(b))throw new Error("invalid recovery id");this.recovery=b}Object.freeze(this)}static fromBytes(_,x=M.format){C(_,x);let b;if(x==="der"){let{r:S,s:R}=Hn.toSig(qt(_));return new N(S,R)}x==="recovered"&&(b=_[0],x="compact",_=_.subarray(1));let d=P.signature/2,O=_.subarray(0,d),T=_.subarray(d,d*2);return new N(s.fromBytes(O),s.fromBytes(T),b)}static fromHex(_,x){return this.fromBytes(Dc(_),x)}assertRecovery(){let{recovery:_}=this;if(_==null)throw new Error("invalid recovery id: must be present");return _}addRecoveryBit(_){return new N(this.r,this.s,_)}recoverPublicKey(_){let{r:x,s:b}=this,d=this.assertRecovery(),O=d===2||d===3?x+u:x;if(!a.isValid(O))throw new Error("invalid recovery id: sig.r+curve.n != R.x");let T=a.toBytes(O),S=e.fromBytes(kt(hA((d&1)===0),T)),R=s.inv(O),Y=H(qt(_,void 0,"msgHash")),X=s.create(-Y*R),ne=s.create(b*R),ce=e.BASE.multiplyUnsafe(X).add(S.multiplyUnsafe(ne));if(ce.is0())throw new Error("invalid recovery: point at infinify");return ce.assertValidity(),ce}hasHighS(){return L(this.s)}toBytes(_=M.format){if(fy(_),_==="der")return Dc(Hn.hexFromSig(this));let{r:x,s:b}=this,d=s.toBytes(x),O=s.toBytes(b);return _==="recovered"?(K(),kt(Uint8Array.of(this.assertRecovery()),d,O)):kt(d,O)}toHex(_){return Pa(this.toBytes(_))}}Object.freeze(N.prototype),Object.freeze(N);let F=r.bits2int===void 0?function(_){if(_.length>8192)throw new Error("input is too large");let x=bi(_),b=_.length*8-c;return b>0?x>>BigInt(b):x}:r.bits2int,H=r.bits2int_modN===void 0?function(_){return s.create(F(_))}:r.bits2int_modN,z=Uc(c);function V(p){return Ym("num < 2^"+c,p,gn,z),s.toBytes(p)}function B(p,_){return qt(p,void 0,"message"),_?qt(i(p),void 0,"prehashed message"):p}function g(p,_,x){let{lowS:b,prehash:d,extraEntropy:O}=uy(x,M);p=B(p,d);let T=H(p),S=s.fromBytes(_);if(!s.isValidNot0(S))throw new Error("invalid private key");let R=[V(S),V(T)];if(O!=null&&O!==!1){let ce=O===!0?n(P.secretKey):O;R.push(qt(ce,void 0,"extraEntropy"))}let Y=kt(...R),X=T;function ne(ce){let pe=F(ce);if(!s.isValidNot0(pe))return;let q=s.inv(pe),W=e.BASE.multiply(pe).toAffine(),$=s.create(W.x);if($===gn)return;let ee=s.create(q*s.create(X+$*S));if(ee===gn)return;let se=(W.x===$?0:2)|Number(W.y&Kr),ue=ee;return b&&L(ee)&&(ue=s.neg(ee),se^=1),new N($,ue,D?void 0:se)}return{seed:Y,k2sig:ne}}function I(p,_,x={}){let{seed:b,k2sig:d}=g(p,_,x);return NO(i.outputLen,s.BYTES,o)(b,d).toBytes(x.format)}function y(p,_,x,b={}){let{lowS:d,prehash:O,format:T}=uy(b,M);if(x=qt(x,void 0,"publicKey"),_=B(_,O),!Yu(p)){let S=p instanceof N?", use sig.toBytes()":"";throw new Error("verify expects Uint8Array signature"+S)}C(p,T);try{let S=N.fromBytes(p,T),R=e.fromBytes(x);if(d&&S.hasHighS())return!1;let{r:Y,s:X}=S,ne=H(_),ce=s.inv(X),pe=s.create(ne*ce),q=s.create(Y*ce),W=e.BASE.multiplyUnsafe(pe).add(R.multiplyUnsafe(q));return W.is0()?!1:s.create(W.x)===Y}catch{return!1}}function f(p,_,x={}){let{prehash:b}=uy(x,M);return _=B(_,b),N.fromBytes(p,"recovered").recoverPublicKey(_).toBytes()}return Object.freeze({keygen:l,getPublicKey:m,getSharedSecret:w,utils:E,lengths:P,Point:e,sign:I,verify:y,recoverPublicKey:f,Signature:N,hash:i})}var cA,cy,Hn,gn,Kr,Ao,Vc,ly,vA=Xr(()=>{v();yp();gs();Ju();vp();jc();cA=(e,t)=>(e+(e>=0?t:-t)/Ao)/t;cy=class extends Error{constructor(t=""){super(t)}},Hn={Err:cy,_tlv:{encode:(e,t)=>{let{Err:r}=Hn;if(dn(e,"tag"),e<0||e>255)throw new r("tlv.encode: wrong tag");if(typeof t!="string")throw new TypeError('"data" expected string, got type='+typeof t);if(t.length&1)throw new r("tlv.encode: unpadded data");let i=t.length/2,n=s0(i);if(n.length/2&128)throw new r("tlv.encode: long form length too big");let o=i>127?s0(n.length/2|128):"";return s0(e)+o+n+t},decode(e,t){let{Err:r}=Hn;t=qt(t,void 0,"DER data");let i=0;if(e<0||e>255)throw new r("tlv.encode: wrong tag");if(t.length<2||t[i++]!==e)throw new r("tlv.decode: wrong tlv");let n=t[i++],o=!!(n&128),a=0;if(!o)a=n;else{let u=n&127;if(!u)throw new r("tlv.decode(long): indefinite length not supported");if(u>4)throw new r("tlv.decode(long): byte length is too big");let c=t.subarray(i,i+u);if(c.length!==u)throw new r("tlv.decode: length bytes not complete");if(c[0]===0)throw new r("tlv.decode(long): zero leftmost byte");for(let l of c)a=a<<8|l;if(i+=u,a<128)throw new r("tlv.decode(long): not minimal encoding")}let s=t.subarray(i,i+a);if(s.length!==a)throw new r("tlv.decode: wrong value length");return{v:s,l:t.subarray(i+a)}}},_int:{encode(e){let{Err:t}=Hn;if(cp(e),e<gn)throw new t("integer: negative integers are not allowed");let r=s0(e);if(Number.parseInt(r[0],16)&8&&(r="00"+r),r.length&1)throw new t("unexpected DER parsing assertion: unpadded hex");return r},decode(e){let{Err:t}=Hn;if(e.length<1)throw new t("invalid signature integer: empty");if(e[0]&128)throw new t("invalid signature integer: negative");if(e.length>1&&e[0]===0&&!(e[1]&128))throw new t("invalid signature integer: unnecessary leading zero");return bi(e)}},toSig(e){let{Err:t,_int:r,_tlv:i}=Hn,n=qt(e,void 0,"signature"),{v:o,l:a}=i.decode(48,n);if(a.length)throw new t("invalid signature: left bytes after parsing");let{v:s,l:u}=i.decode(2,o),{v:c,l}=i.decode(2,u);if(l.length)throw new t("invalid signature: left bytes after parsing");return{r:r.decode(s),s:r.decode(c)}},hexFromSig(e){let{_tlv:t,_int:r}=Hn,i=t.encode(2,r.encode(e.r)),n=t.encode(2,r.encode(e.s)),o=i+n;return t.encode(48,o)}};Object.freeze(Hn._tlv);Object.freeze(Hn._int);Object.freeze(Hn);gn=BigInt(0),Kr=BigInt(1),Ao=BigInt(2),Vc=BigInt(3),ly=BigInt(4)});var h0={};X1(h0,{__TEST:()=>eX,schnorr:()=>tX,schnorr_FROST:()=>uX,secp256k1:()=>J$,secp256k1_FROST:()=>nX,secp256k1_hasher:()=>py});function X$(e){let t=bp.p,r=BigInt(3),i=BigInt(6),n=BigInt(11),o=BigInt(22),a=BigInt(23),s=BigInt(44),u=BigInt(88),c=e*e*e%t,l=c*c*e%t,m=Fi(l,r,t)*l%t,w=Fi(m,r,t)*l%t,E=Fi(w,hy,t)*c%t,P=Fi(E,n,t)*E%t,M=Fi(P,o,t)*P%t,D=Fi(M,s,t)*M%t,L=Fi(D,u,t)*D%t,U=Fi(L,s,t)*M%t,K=Fi(U,r,t)*l%t,C=Fi(K,a,t)*P%t,N=Fi(C,i,t)*c%t,F=Fi(N,hy,t);if(!Ta.eql(Ta.sqr(F),e))throw new Error("Cannot find square root");return F}function l0(e,...t){let r=mA[e];if(r===void 0){let i=bs(qc(e));r=kt(i,i),mA[e]=r}return bs(kt(r,...t))}function wA(e){let{Fn:t,BASE:r}=Ut,i=t.fromBytes(e),n=r.multiply(i);return{scalar:Po(n.y)?i:t.neg(i),bytes:of(n)}}function _p(e){let t=Ta;if(!t.isValidNot0(e))throw new Error("invalid x: Fail if x \u2265 p");let r=t.create(e*e),i=t.create(r*e+BigInt(7)),n=t.sqrt(i);Po(n)||(n=t.neg(n));let o=Ut.fromAffine({x:e,y:n});return o.assertValidity(),o}function dy(...e){return Ut.Fn.create(Gc(l0("BIP0340/challenge",...e)))}function yA(e){return wA(e).bytes}function Q$(e,t,r=i0(32)){let{Fn:i,BASE:n}=Ut,o=qt(e,void 0,"message"),{bytes:a,scalar:s}=wA(t),u=qt(r,32,"auxRand"),c=i.toBytes(s^Gc(l0("BIP0340/aux",u))),l=l0("BIP0340/nonce",c,a,o),m=i.create(Gc(l));if(m===0n)throw new Error("sign failed: k is zero");let w=n.multiply(m),E=Po(w.y)?m:i.neg(m),P=of(w),M=dy(P,a,o),D=new Uint8Array(64);if(D.set(P,0),D.set(i.toBytes(i.create(E+M*s)),32),!SA(D,o,a))throw new Error("sign: Invalid signature produced");return D}function SA(e,t,r){let{Fp:i,Fn:n,BASE:o}=Ut,a=qt(e,64,"signature"),s=qt(t,void 0,"message"),u=qt(r,32,"publicKey");try{let c=_p(Gc(u)),l=Gc(a.subarray(0,32));if(!i.isValidNot0(l))return!1;let m=Gc(a.subarray(32,64));if(!n.isValidNot0(m))return!1;let w=dy(n.toBytes(l),of(c),s),E=o.multiplyUnsafe(m).add(c.multiplyUnsafe(n.neg(w))),{x:P,y:M}=E.toAffine();return!(E.is0()||!Po(M)||P!==l)}catch{return!1}}function xA(e,t){if(t===void 0)return _A;let r=of(e),i=bi(l0("TapTweak",r,t));if(!Ut.Fn.isValid(i))throw new Error("invalid TapTweak hash");return i}function gy(e){let t=Ut.fromBytes(e.commitments[0]);return Po(t.y)?e:{signers:{min:e.signers.min,max:e.signers.max},commitments:e.commitments.map(r=>Ut.fromBytes(r).negate().toBytes()),verifyingShares:Object.fromEntries(Object.entries(e.verifyingShares).map(([r,i])=>[r,Ut.fromBytes(i).negate().toBytes()]))}}function EA(e,t){let r=Ut.fromBytes(t.commitments[0]);if(Po(r.y))return e;let i=Ut.Fn;return{...e,signingShare:i.toBytes(i.neg(i.fromBytes(e.signingShare)))}}function oX(e,t){if(Po(e.y))return t;let r=Ut.Fn;return{binding:r.toBytes(r.neg(r.fromBytes(t.binding))),hiding:r.toBytes(r.neg(r.fromBytes(t.hiding)))}}function aX(e,t,r){let i=Ut.Fn,n=EA(e,t),o=gy(t),a=xA(Ut.fromBytes(o.commitments[0]),r),s=i.toBytes(i.add(i.fromBytes(n.signingShare),a));return{identifier:n.identifier,signingShare:s}}function sX(e,t){let r=gy(e),i=xA(Ut.fromBytes(r.commitments[0]),t),n=Ut.BASE.multiply(i),o=r.commitments.map((s,u)=>(u===0?Ut.fromBytes(s).add(n):Ut.fromBytes(s)).toBytes()),a={};for(let s in r.verifyingShares)a[s]=Ut.fromBytes(r.verifyingShares[s]).add(n).toBytes();return{signers:{min:r.signers.min,max:r.signers.max},commitments:o,verifyingShares:a}}var bp,$$,_A,hy,Ta,Ut,J$,mA,of,Po,Gc,eX,tX,rX,bA,iX,py,nX,uX,d0=Xr(()=>{v();sp();gs();vp();fA();sA();jc();vA();Ju();bp={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},$$={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),basises:[[BigInt("0x3086d221a7d46bcde86c90e49284eb15"),-BigInt("0xe4437ed6010e88286f547fa90abfe4c3")],[BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),BigInt("0x3086d221a7d46bcde86c90e49284eb15")]]},_A=BigInt(0),hy=BigInt(2);Ta=Fc(bp.p,{sqrt:X$}),Ut=lA(bp,{Fp:Ta,endo:$$}),J$=gA(Ut,bs),mA={};of=e=>e.toBytes(!0).slice(1),Po=e=>e%hy===_A;Gc=bi;eX=Object.freeze({lift_x:_p}),tX=(()=>{let r=i=>(i=i===void 0?i0(48):i,Hc(i,bp.n));return Object.freeze({keygen:gp(r,yA),getPublicKey:yA,sign:Q$,verify:SA,Point:Ut,utils:Object.freeze({randomSecretKey:r,taggedHash:l0,lift_x:_p,pointToBytes:of}),lengths:Object.freeze({secretKey:32,publicKey:32,publicKeyHasPrefix:!1,signature:64,seed:48})})})(),rX=oA(Ta,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(e=>e.map(t=>BigInt(t)))),iX=()=>bA||(bA=dA(Ta,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:Ta.create(BigInt("-11"))})),py=aA(Ut,e=>{let{x:t,y:r}=iX()(Ta.create(e[0]));return rX(t,r)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:Ta.ORDER,m:1,k:128,expand:"xmd",hash:bs}),nX=oy({name:"FROST-secp256k1-SHA256-v1",Point:Ut,hashToScalar:py.hashToScalar,hash:bs});uX=oy({name:"FROST-secp256k1-SHA256-TR-v1",Point:Ut,hashToScalar:py.hashToScalar,hash:bs,parsePublicKey(e){if(e.length===32)return _p(bi(e));if(e.length===33)return Ut.fromBytes(e);throw new Error(`expected x-only or compressed public key, got length=${e.length}`)},adjustScalar(e){let t=Ut.BASE.multiply(e);return Po(t.y)?e:Ut.Fn.neg(e)},adjustPoint:e=>Po(e.y)?e:e.negate(),challenge(e,t,r){return dy(of(e),of(t),r)},adjustNonces:oX,adjustGroupCommitmentShare:(e,t)=>Po(e.y)?t:t.negate(),adjustPublic:gy,adjustSecret:EA,adjustTx:{encode:e=>e.subarray(1),decode:e=>kt(Uint8Array.of(2),e)},adjustDKG:e=>{let t=new Uint8Array(0);return{public:sX(e.public,t),secret:aX(e.secret,e.public,t)}}})});var vn=k((u2e,PA)=>{"use strict";v();var IA=fr(),{secp256k1:fX}=(d0(),ho(h0)),g0=fX.Point,wp=g0.Fn.ORDER;function cX(e){return BigInt("0x"+(e.toString(16)||"0"))}function vy(e){var t=e.toString(16);return t.length%2&&(t="0"+t),new IA(t,16)}function Sp(e){if(e==null)throw new Error("Invalid Point");if(typeof e=="bigint")return e;if(typeof e=="number")return BigInt(e);if(typeof e=="string")return BigInt(e.indexOf("0x")===0?e:"0x"+e);if(typeof e.toString=="function")return cX(e);throw new Error("Invalid Point")}function p0(e){var t=Object.create(Ft.prototype);return t._p=e,t}function OA(e,t){var r=Sp(t).toString(16).padStart(64,"0");return g0.fromHex((e?"03":"02")+r)}function AA(e,t){var r;try{r=OA((t&1n)===1n,e)}catch{throw new Error("Point does not lie on the curve")}if(r.toAffine().y!==t)throw new Error("Invalid y value for curve.")}function Ft(e,t,r){if(!(this instanceof Ft))return new Ft(e,t,r);var i,n;try{i=Sp(e),n=Sp(t)}catch{throw new Error("Invalid Point")}AA(i,n);try{this._p=g0.fromAffine({x:i,y:n})}catch{throw new Error("Invalid Point")}return this}Ft.fromX=function(t,r){try{var i=p0(OA(t,r))}catch{throw new Error("Invalid X")}return i.validate(),i};Ft.getG=function(){return p0(g0.BASE)};Ft.getN=function(){return vy(wp)};Ft.prototype.getX=function(){return vy(this._p.toAffine().x)};Ft.prototype.getY=function(){return vy(this._p.toAffine().y)};Object.defineProperty(Ft.prototype,"x",{configurable:!0,enumerable:!0,get:function(){return this.getX()}});Object.defineProperty(Ft.prototype,"y",{configurable:!0,enumerable:!0,get:function(){return this.getY()}});Ft.prototype.mul=function(t){var r=(Sp(t)%wp+wp)%wp;return r===0n||this._p.is0()?p0(g0.ZERO):p0(this._p.multiply(r))};Ft.prototype.add=function(t){return p0(this._p.add(t._p))};Ft.prototype.mulAdd=function(t,r,i){return this.mul(t).add(r.mul(i))};Ft.prototype.eq=function(t){return this._p.equals(t._p)};Ft.prototype.isInfinity=function(){return this._p.is0()};Ft.prototype.validate=function(){if(this.isInfinity())throw new Error("Point cannot be equal to Infinity");var t=this._p.toAffine();return AA(t.x,t.y),this};Ft.pointToCompressed=function(t){var r=t.getX().toBuffer({size:32}),i=t.getY().toBuffer({size:32}),n,o=i[i.length-1]%2;return o?n=h.Buffer.from([3]):n=h.Buffer.from([2]),h.Buffer.concat([n,r])};Ft.pointFromCompressed=function(e){if(e.length!==33)throw new Error("invalid buffer length");var t=e[0],r;if(t===3)r=!0;else if(t===2)r=!1;else throw new Error("invalid value of compressed prefix");var i=IA.fromBuffer(e.slice(1,33));return Ft.fromX(r,i)};Ft.prototype.toBuffer=function(){return Ft.pointToCompressed(this)};Ft.prototype.toHex=function(){return this.toBuffer().toString("hex")};Ft.fromBuffer=function(e){return Ft.pointFromCompressed(e)};Ft.fromHex=function(e){return Ft.fromBuffer(h.Buffer.from(e,"hex"))};PA.exports=Ft});var pi=k((c2e,RA)=>{"use strict";v();var kA=Et(),lX=Bt(),TA=function(t){return kA.isString(t)?/^[0-9a-fA-F]+$/.test(t):!1};RA.exports={isValidJSON:function(t){var r;if(!kA.isString(t))return!1;try{r=JSON.parse(t)}catch{return!1}return typeof r=="object"},isHexa:TA,isHexaString:TA,defineImmutable:function(t,r){return Object.keys(r).forEach(function(i){Object.defineProperty(t,i,{configurable:!1,enumerable:!0,value:r[i]})}),t},isNaturalNumber:function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&t>=0},integerAsBuffer:function(t){lX.checkArgumentType(t,"number","integer");let r=h.Buffer.allocUnsafe(4);return r.writeUInt32BE(t,0),r}}});var Vr=k((h2e,MA)=>{"use strict";v();var af=fr(),hX=Et(),_i=Bt(),dX=pi(),yt=function e(t,r){if(!(this instanceof e))return new e(t,r);if(t instanceof af)this.set({r:t,s:r});else if(t){var i=t;this.set(i)}};yt.prototype.set=function(e){return this.r=e.r||this.r||void 0,this.s=e.s||this.s||void 0,this.i=typeof e.i<"u"?e.i:this.i,this.compressed=typeof e.compressed<"u"?e.compressed:this.compressed,this.nhashtype=e.nhashtype||this.nhashtype||void 0,this};yt.fromCompact=function(e){_i.checkArgument(h.Buffer.isBuffer(e),"Argument is expected to be a Buffer");var t=new yt,r=!0,i=e.slice(0,1)[0]-27-4;i<0&&(r=!1,i=i+4);var n=e.slice(1,33),o=e.slice(33,65);return _i.checkArgument(i===0||i===1||i===2||i===3,new Error("i must be 0, 1, 2, or 3")),_i.checkArgument(n.length===32,new Error("r must be 32 bytes")),_i.checkArgument(o.length===32,new Error("s must be 32 bytes")),t.compressed=r,t.i=i,t.r=af.fromBuffer(n),t.s=af.fromBuffer(o),t};yt.fromDER=yt.fromBuffer=function(e,t){var r=yt.parseDER(e,t),i=new yt;return i.r=r.r,i.s=r.s,i};yt.fromTxFormat=function(e){var t=e.readUInt8(e.length-1),r=e.slice(0,e.length-1),i=yt.fromDER(r,!1);return i.nhashtype=t,i};yt.fromString=function(e){var t=h.Buffer.from(e,"hex");return yt.fromDER(t)};function BA(e,t){_i.checkArgument(t.length>0,new Error("Length of "+e+" is zero")),_i.checkArgument(!(t[0]&128),new Error("Value of "+e+" is negative")),_i.checkArgument(!(t.length>1&&t[0]===0&&!(t[1]&128)),new Error("Value of "+e+" is excessively padded"))}yt.parseDER=function(e,t){_i.checkArgument(h.Buffer.isBuffer(e),new Error("DER formatted signature should be a buffer")),hX.isUndefined(t)&&(t=!0);var r=e[0];_i.checkArgument(r===48,new Error("Header byte should be 0x30"));var i=e[1],n=e.slice(2).length;_i.checkArgument(!t||i===n,new Error("Length byte should length of what follows")),i=i<n?i:n;var o=e[2];_i.checkArgument(o===2,new Error("Integer byte for r should be 0x02"));var a=e[3],s=e.slice(4,4+a),u=af.fromBuffer(s),c=e[4]===0;_i.checkArgument(a===s.length,new Error("Length of r incorrect"));var l=e[4+a+0];_i.checkArgument(l===2,new Error("Integer byte for s should be 0x02"));var m=e[4+a+1],w=e.slice(4+a+2,4+a+2+m),E=af.fromBuffer(w),P=e[4+a+2]===0;_i.checkArgument(m===w.length,new Error("Length of s incorrect"));var M=4+a+2+m;_i.checkArgument(i===M-2,new Error("Length of signature incorrect")),t&&(BA("r",s),BA("s",w));var D={header:r,length:i,rheader:o,rlength:a,rneg:c,rbuf:s,r:u,sheader:l,slength:m,sneg:P,sbuf:w,s:E};return D};yt.prototype.toCompact=function(e,t){if(e=typeof e=="number"?e:this.i,t=typeof t=="boolean"?t:this.compressed,!(e===0||e===1||e===2||e===3))throw new Error("i must be equal to 0, 1, 2, or 3");var r=e+27+4;t===!1&&(r=r-4);var i=h.Buffer.from([r]),n=this.r.toBuffer({size:32}),o=this.s.toBuffer({size:32});return h.Buffer.concat([i,n,o])};yt.prototype.toBuffer=yt.prototype.toDER=function(){var e=this.r.toBuffer(),t=this.s.toBuffer(),r=!!(e[0]&128),i=!!(t[0]&128),n=r?h.Buffer.concat([h.Buffer.from([0]),e]):e,o=i?h.Buffer.concat([h.Buffer.from([0]),t]):t,a=n.length,s=o.length,u=2+a+2+s,c=2,l=2,m=48,w=h.Buffer.concat([h.Buffer.from([m,u,c,a]),n,h.Buffer.from([l,s]),o]);return w};yt.prototype.toString=function(){var e=this.toDER();return e.toString("hex")};yt.isTxDER=function(e){if(e.length<9||e.length>73||e[0]!==48||e[1]!==e.length-3)return!1;var t=e[3];if(5+t>=e.length)return!1;var r=e[5+t];if(t+r+7!==e.length)return!1;var i=e.slice(4);if(e[2]!==2||t===0||i[0]&128||t>1&&i[0]===0&&!(i[1]&128))return!1;var n=e.slice(6+t);return!(e[6+t-2]!==2||r===0||n[0]&128||r>1&&n[0]===0&&!(n[1]&128))};yt.prototype.hasLowS=function(){return!(this.s.lt(new af(1))||this.s.gt(new af("7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0","hex")))};yt.prototype.hasDefinedHashtype=function(){if(!dX.isNaturalNumber(this.nhashtype))return!1;var e=this.nhashtype&31;return!(e<yt.SIGHASH_ALL||e>yt.SIGHASH_SINGLE)};yt.prototype.toTxFormat=function(){var e=this.toDER(),t=h.Buffer.alloc(1);return t.writeUInt8(this.nhashtype,0),h.Buffer.concat([e,t])};yt.SIGHASH_ALL=1;yt.SIGHASH_NONE=2;yt.SIGHASH_SINGLE=3;yt.SIGHASH_FORKID=64;yt.SIGHASH_ANYONECANPAY=128;yt.prototype.isCanonical=function(){var e=vn(),t=e.getN().shrn(1);return this.s.lte(t)};yt.prototype.toCanonical=function(){if(this.isCanonical())return new yt({r:this.r,s:this.s,i:this.i,compressed:this.compressed,nhashtype:this.nhashtype});var e=vn(),t=e.getN(),r=t.sub(this.s);return new yt({r:this.r,s:r,i:this.i,compressed:this.compressed,nhashtype:this.nhashtype})};yt.prototype.validate=function(){if(!this.r||!this.s)throw new Error("Signature missing r or s component");if(this.r.isZero())throw new Error("Signature r component is zero");if(this.s.isZero())throw new Error("Signature s component is zero");var e=vn(),t=e.getN();if(this.r.gte(t))throw new Error("Signature r component >= curve order");if(this.s.gte(t))throw new Error("Signature s component >= curve order");if(this.r.isNeg())throw new Error("Signature r component is negative");if(this.s.isNeg())throw new Error("Signature s component is negative");return!0};yt.prototype.isValid=function(){try{return this.validate(),!0}catch{return!1}};yt.prototype.applySecurityPatches=function(){var e=vn(),t=e.getN(),r=t.shrn(1);if(this.r.isZero()||this.s.isZero())throw new Error("Invalid signature: zero r or s");if(this.r.gte(t)||this.s.gte(t))throw new Error("Invalid signature: out of range");if(this.s.gt(r))throw new Error("Invalid signature: non-canonical (high) s");return this};MA.exports=yt});var jn=k(Ht=>{"use strict";v();var pX=Rn(),gX=Pe();Ht.inherits=gX;function vX(e,t){return(e.charCodeAt(t)&64512)!==55296||t<0||t+1>=e.length?!1:(e.charCodeAt(t+1)&64512)===56320}function mX(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if(typeof e=="string")if(t){if(t==="hex")for(e=e.replace(/[^a-z0-9]+/ig,""),e.length%2!==0&&(e="0"+e),n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16))}else for(var i=0,n=0;n<e.length;n++){var o=e.charCodeAt(n);o<128?r[i++]=o:o<2048?(r[i++]=o>>6|192,r[i++]=o&63|128):vX(e,n)?(o=65536+((o&1023)<<10)+(e.charCodeAt(++n)&1023),r[i++]=o>>18|240,r[i++]=o>>12&63|128,r[i++]=o>>6&63|128,r[i++]=o&63|128):(r[i++]=o>>12|224,r[i++]=o>>6&63|128,r[i++]=o&63|128)}else for(n=0;n<e.length;n++)r[n]=e[n]|0;return r}Ht.toArray=mX;function yX(e){for(var t="",r=0;r<e.length;r++)t+=NA(e[r].toString(16));return t}Ht.toHex=yX;function CA(e){var t=e>>>24|e>>>8&65280|e<<8&16711680|(e&255)<<24;return t>>>0}Ht.htonl=CA;function bX(e,t){for(var r="",i=0;i<e.length;i++){var n=e[i];t==="little"&&(n=CA(n)),r+=DA(n.toString(16))}return r}Ht.toHex32=bX;function NA(e){return e.length===1?"0"+e:e}Ht.zero2=NA;function DA(e){return e.length===7?"0"+e:e.length===6?"00"+e:e.length===5?"000"+e:e.length===4?"0000"+e:e.length===3?"00000"+e:e.length===2?"000000"+e:e.length===1?"0000000"+e:e}Ht.zero8=DA;function _X(e,t,r,i){var n=r-t;pX(n%4===0);for(var o=new Array(n/4),a=0,s=t;a<o.length;a++,s+=4){var u;i==="big"?u=e[s]<<24|e[s+1]<<16|e[s+2]<<8|e[s+3]:u=e[s+3]<<24|e[s+2]<<16|e[s+1]<<8|e[s],o[a]=u>>>0}return o}Ht.join32=_X;function wX(e,t){for(var r=new Array(e.length*4),i=0,n=0;i<e.length;i++,n+=4){var o=e[i];t==="big"?(r[n]=o>>>24,r[n+1]=o>>>16&255,r[n+2]=o>>>8&255,r[n+3]=o&255):(r[n+3]=o>>>24,r[n+2]=o>>>16&255,r[n+1]=o>>>8&255,r[n]=o&255)}return r}Ht.split32=wX;function SX(e,t){return e>>>t|e<<32-t}Ht.rotr32=SX;function xX(e,t){return e<<t|e>>>32-t}Ht.rotl32=xX;function EX(e,t){return e+t>>>0}Ht.sum32=EX;function IX(e,t,r){return e+t+r>>>0}Ht.sum32_3=IX;function OX(e,t,r,i){return e+t+r+i>>>0}Ht.sum32_4=OX;function AX(e,t,r,i,n){return e+t+r+i+n>>>0}Ht.sum32_5=AX;function PX(e,t,r,i){var n=e[t],o=e[t+1],a=i+o>>>0,s=(a<i?1:0)+r+n;e[t]=s>>>0,e[t+1]=a}Ht.sum64=PX;function TX(e,t,r,i){var n=t+i>>>0,o=(n<t?1:0)+e+r;return o>>>0}Ht.sum64_hi=TX;function kX(e,t,r,i){var n=t+i;return n>>>0}Ht.sum64_lo=kX;function RX(e,t,r,i,n,o,a,s){var u=0,c=t;c=c+i>>>0,u+=c<t?1:0,c=c+o>>>0,u+=c<o?1:0,c=c+s>>>0,u+=c<s?1:0;var l=e+r+n+a+u;return l>>>0}Ht.sum64_4_hi=RX;function BX(e,t,r,i,n,o,a,s){var u=t+i+o+s;return u>>>0}Ht.sum64_4_lo=BX;function MX(e,t,r,i,n,o,a,s,u,c){var l=0,m=t;m=m+i>>>0,l+=m<t?1:0,m=m+o>>>0,l+=m<o?1:0,m=m+s>>>0,l+=m<s?1:0,m=m+c>>>0,l+=m<c?1:0;var w=e+r+n+a+u+l;return w>>>0}Ht.sum64_5_hi=MX;function CX(e,t,r,i,n,o,a,s,u,c){var l=t+i+o+s+c;return l>>>0}Ht.sum64_5_lo=CX;function NX(e,t,r){var i=t<<32-r|e>>>r;return i>>>0}Ht.rotr64_hi=NX;function DX(e,t,r){var i=e<<32-r|t>>>r;return i>>>0}Ht.rotr64_lo=DX;function LX(e,t,r){return e>>>r}Ht.shr64_hi=LX;function qX(e,t,r){var i=e<<32-r|t>>>r;return i>>>0}Ht.shr64_lo=qX});var Zc=k(qA=>{"use strict";v();var LA=jn(),UX=Rn();function xp(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}qA.BlockHash=xp;xp.prototype.update=function(t,r){if(t=LA.toArray(t,r),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){t=this.pending;var i=t.length%this._delta8;this.pending=t.slice(t.length-i,t.length),this.pending.length===0&&(this.pending=null),t=LA.join32(t,0,t.length-i,this.endian);for(var n=0;n<t.length;n+=this._delta32)this._update(t,n,n+this._delta32)}return this};xp.prototype.digest=function(t){return this.update(this._pad()),UX(this.pending===null),this._digest(t)};xp.prototype._pad=function(){var t=this.pendingTotal,r=this._delta8,i=r-(t+this.padLength)%r,n=new Array(i+this.padLength);n[0]=128;for(var o=1;o<i;o++)n[o]=0;if(t<<=3,this.endian==="big"){for(var a=8;a<this.padLength;a++)n[o++]=0;n[o++]=0,n[o++]=0,n[o++]=0,n[o++]=0,n[o++]=t>>>24&255,n[o++]=t>>>16&255,n[o++]=t>>>8&255,n[o++]=t&255}else for(n[o++]=t&255,n[o++]=t>>>8&255,n[o++]=t>>>16&255,n[o++]=t>>>24&255,n[o++]=0,n[o++]=0,n[o++]=0,n[o++]=0,a=8;a<this.padLength;a++)n[o++]=0;return n}});var my=k(ka=>{"use strict";v();var FX=jn(),To=FX.rotr32;function HX(e,t,r,i){if(e===0)return UA(t,r,i);if(e===1||e===3)return HA(t,r,i);if(e===2)return FA(t,r,i)}ka.ft_1=HX;function UA(e,t,r){return e&t^~e&r}ka.ch32=UA;function FA(e,t,r){return e&t^e&r^t&r}ka.maj32=FA;function HA(e,t,r){return e^t^r}ka.p32=HA;function jX(e){return To(e,2)^To(e,13)^To(e,22)}ka.s0_256=jX;function zX(e){return To(e,6)^To(e,11)^To(e,25)}ka.s1_256=zX;function KX(e){return To(e,7)^To(e,18)^e>>>3}ka.g0_256=KX;function VX(e){return To(e,17)^To(e,19)^e>>>10}ka.g1_256=VX});var KA=k((_2e,zA)=>{"use strict";v();var Wc=jn(),GX=Zc(),ZX=my(),yy=Wc.rotl32,v0=Wc.sum32,WX=Wc.sum32_5,YX=ZX.ft_1,jA=GX.BlockHash,$X=[1518500249,1859775393,2400959708,3395469782];function ko(){if(!(this instanceof ko))return new ko;jA.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Wc.inherits(ko,jA);zA.exports=ko;ko.blockSize=512;ko.outSize=160;ko.hmacStrength=80;ko.padLength=64;ko.prototype._update=function(t,r){for(var i=this.W,n=0;n<16;n++)i[n]=t[r+n];for(;n<i.length;n++)i[n]=yy(i[n-3]^i[n-8]^i[n-14]^i[n-16],1);var o=this.h[0],a=this.h[1],s=this.h[2],u=this.h[3],c=this.h[4];for(n=0;n<i.length;n++){var l=~~(n/20),m=WX(yy(o,5),YX(l,a,s,u),c,i[n],$X[l]);c=u,u=s,s=yy(a,30),a=o,o=m}this.h[0]=v0(this.h[0],o),this.h[1]=v0(this.h[1],a),this.h[2]=v0(this.h[2],s),this.h[3]=v0(this.h[3],u),this.h[4]=v0(this.h[4],c)};ko.prototype._digest=function(t){return t==="hex"?Wc.toHex32(this.h,"big"):Wc.split32(this.h,"big")}});var by=k((S2e,GA)=>{"use strict";v();var Yc=jn(),XX=Zc(),$c=my(),JX=Rn(),zn=Yc.sum32,QX=Yc.sum32_4,eJ=Yc.sum32_5,tJ=$c.ch32,rJ=$c.maj32,iJ=$c.s0_256,nJ=$c.s1_256,oJ=$c.g0_256,aJ=$c.g1_256,VA=XX.BlockHash,sJ=[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 Ro(){if(!(this instanceof Ro))return new Ro;VA.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=sJ,this.W=new Array(64)}Yc.inherits(Ro,VA);GA.exports=Ro;Ro.blockSize=512;Ro.outSize=256;Ro.hmacStrength=192;Ro.padLength=64;Ro.prototype._update=function(t,r){for(var i=this.W,n=0;n<16;n++)i[n]=t[r+n];for(;n<i.length;n++)i[n]=QX(aJ(i[n-2]),i[n-7],oJ(i[n-15]),i[n-16]);var o=this.h[0],a=this.h[1],s=this.h[2],u=this.h[3],c=this.h[4],l=this.h[5],m=this.h[6],w=this.h[7];for(JX(this.k.length===i.length),n=0;n<i.length;n++){var E=eJ(w,nJ(c),tJ(c,l,m),this.k[n],i[n]),P=zn(iJ(o),rJ(o,a,s));w=m,m=l,l=c,c=zn(u,E),u=s,s=a,a=o,o=zn(E,P)}this.h[0]=zn(this.h[0],o),this.h[1]=zn(this.h[1],a),this.h[2]=zn(this.h[2],s),this.h[3]=zn(this.h[3],u),this.h[4]=zn(this.h[4],c),this.h[5]=zn(this.h[5],l),this.h[6]=zn(this.h[6],m),this.h[7]=zn(this.h[7],w)};Ro.prototype._digest=function(t){return t==="hex"?Yc.toHex32(this.h,"big"):Yc.split32(this.h,"big")}});var YA=k((E2e,WA)=>{"use strict";v();var _y=jn(),ZA=by();function Ra(){if(!(this instanceof Ra))return new Ra;ZA.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}_y.inherits(Ra,ZA);WA.exports=Ra;Ra.blockSize=512;Ra.outSize=224;Ra.hmacStrength=192;Ra.padLength=64;Ra.prototype._digest=function(t){return t==="hex"?_y.toHex32(this.h.slice(0,7),"big"):_y.split32(this.h.slice(0,7),"big")}});var xy=k((O2e,QA)=>{"use strict";v();var Ri=jn(),uJ=Zc(),fJ=Rn(),Bo=Ri.rotr64_hi,Mo=Ri.rotr64_lo,$A=Ri.shr64_hi,XA=Ri.shr64_lo,_s=Ri.sum64,wy=Ri.sum64_hi,Sy=Ri.sum64_lo,cJ=Ri.sum64_4_hi,lJ=Ri.sum64_4_lo,hJ=Ri.sum64_5_hi,dJ=Ri.sum64_5_lo,JA=uJ.BlockHash,pJ=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function Kn(){if(!(this instanceof Kn))return new Kn;JA.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=pJ,this.W=new Array(160)}Ri.inherits(Kn,JA);QA.exports=Kn;Kn.blockSize=1024;Kn.outSize=512;Kn.hmacStrength=192;Kn.padLength=128;Kn.prototype._prepareBlock=function(t,r){for(var i=this.W,n=0;n<32;n++)i[n]=t[r+n];for(;n<i.length;n+=2){var o=IJ(i[n-4],i[n-3]),a=OJ(i[n-4],i[n-3]),s=i[n-14],u=i[n-13],c=xJ(i[n-30],i[n-29]),l=EJ(i[n-30],i[n-29]),m=i[n-32],w=i[n-31];i[n]=cJ(o,a,s,u,c,l,m,w),i[n+1]=lJ(o,a,s,u,c,l,m,w)}};Kn.prototype._update=function(t,r){this._prepareBlock(t,r);var i=this.W,n=this.h[0],o=this.h[1],a=this.h[2],s=this.h[3],u=this.h[4],c=this.h[5],l=this.h[6],m=this.h[7],w=this.h[8],E=this.h[9],P=this.h[10],M=this.h[11],D=this.h[12],L=this.h[13],U=this.h[14],K=this.h[15];fJ(this.k.length===i.length);for(var C=0;C<i.length;C+=2){var N=U,F=K,H=wJ(w,E),z=SJ(w,E),V=gJ(w,E,P,M,D,L),B=vJ(w,E,P,M,D,L),g=this.k[C],I=this.k[C+1],y=i[C],f=i[C+1],p=hJ(N,F,H,z,V,B,g,I,y,f),_=dJ(N,F,H,z,V,B,g,I,y,f);N=bJ(n,o),F=_J(n,o),H=mJ(n,o,a,s,u,c),z=yJ(n,o,a,s,u,c);var x=wy(N,F,H,z),b=Sy(N,F,H,z);U=D,K=L,D=P,L=M,P=w,M=E,w=wy(l,m,p,_),E=Sy(m,m,p,_),l=u,m=c,u=a,c=s,a=n,s=o,n=wy(p,_,x,b),o=Sy(p,_,x,b)}_s(this.h,0,n,o),_s(this.h,2,a,s),_s(this.h,4,u,c),_s(this.h,6,l,m),_s(this.h,8,w,E),_s(this.h,10,P,M),_s(this.h,12,D,L),_s(this.h,14,U,K)};Kn.prototype._digest=function(t){return t==="hex"?Ri.toHex32(this.h,"big"):Ri.split32(this.h,"big")};function gJ(e,t,r,i,n){var o=e&r^~e&n;return o<0&&(o+=4294967296),o}function vJ(e,t,r,i,n,o){var a=t&i^~t&o;return a<0&&(a+=4294967296),a}function mJ(e,t,r,i,n){var o=e&r^e&n^r&n;return o<0&&(o+=4294967296),o}function yJ(e,t,r,i,n,o){var a=t&i^t&o^i&o;return a<0&&(a+=4294967296),a}function bJ(e,t){var r=Bo(e,t,28),i=Bo(t,e,2),n=Bo(t,e,7),o=r^i^n;return o<0&&(o+=4294967296),o}function _J(e,t){var r=Mo(e,t,28),i=Mo(t,e,2),n=Mo(t,e,7),o=r^i^n;return o<0&&(o+=4294967296),o}function wJ(e,t){var r=Bo(e,t,14),i=Bo(e,t,18),n=Bo(t,e,9),o=r^i^n;return o<0&&(o+=4294967296),o}function SJ(e,t){var r=Mo(e,t,14),i=Mo(e,t,18),n=Mo(t,e,9),o=r^i^n;return o<0&&(o+=4294967296),o}function xJ(e,t){var r=Bo(e,t,1),i=Bo(e,t,8),n=$A(e,t,7),o=r^i^n;return o<0&&(o+=4294967296),o}function EJ(e,t){var r=Mo(e,t,1),i=Mo(e,t,8),n=XA(e,t,7),o=r^i^n;return o<0&&(o+=4294967296),o}function IJ(e,t){var r=Bo(e,t,19),i=Bo(t,e,29),n=$A(e,t,6),o=r^i^n;return o<0&&(o+=4294967296),o}function OJ(e,t){var r=Mo(e,t,19),i=Mo(t,e,29),n=XA(e,t,6),o=r^i^n;return o<0&&(o+=4294967296),o}});var rP=k((P2e,tP)=>{"use strict";v();var Ey=jn(),eP=xy();function Ba(){if(!(this instanceof Ba))return new Ba;eP.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Ey.inherits(Ba,eP);tP.exports=Ba;Ba.blockSize=1024;Ba.outSize=384;Ba.hmacStrength=192;Ba.padLength=128;Ba.prototype._digest=function(t){return t==="hex"?Ey.toHex32(this.h.slice(0,12),"big"):Ey.split32(this.h.slice(0,12),"big")}});var iP=k(Xc=>{"use strict";v();Xc.sha1=KA();Xc.sha224=YA();Xc.sha256=by();Xc.sha384=rP();Xc.sha512=xy()});var fP=k(uP=>{"use strict";v();var sf=jn(),AJ=Zc(),Ep=sf.rotl32,nP=sf.sum32,m0=sf.sum32_3,oP=sf.sum32_4,sP=AJ.BlockHash;function Co(){if(!(this instanceof Co))return new Co;sP.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}sf.inherits(Co,sP);uP.ripemd160=Co;Co.blockSize=512;Co.outSize=160;Co.hmacStrength=192;Co.padLength=64;Co.prototype._update=function(t,r){for(var i=this.h[0],n=this.h[1],o=this.h[2],a=this.h[3],s=this.h[4],u=i,c=n,l=o,m=a,w=s,E=0;E<80;E++){var P=nP(Ep(oP(i,aP(E,n,o,a),t[kJ[E]+r],PJ(E)),BJ[E]),s);i=s,s=a,a=Ep(o,10),o=n,n=P,P=nP(Ep(oP(u,aP(79-E,c,l,m),t[RJ[E]+r],TJ(E)),MJ[E]),w),u=w,w=m,m=Ep(l,10),l=c,c=P}P=m0(this.h[1],o,m),this.h[1]=m0(this.h[2],a,w),this.h[2]=m0(this.h[3],s,u),this.h[3]=m0(this.h[4],i,c),this.h[4]=m0(this.h[0],n,l),this.h[0]=P};Co.prototype._digest=function(t){return t==="hex"?sf.toHex32(this.h,"little"):sf.split32(this.h,"little")};function aP(e,t,r,i){return e<=15?t^r^i:e<=31?t&r|~t&i:e<=47?(t|~r)^i:e<=63?t&i|r&~i:t^(r|~i)}function PJ(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function TJ(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}var kJ=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],RJ=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],BJ=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],MJ=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]});var lP=k((C2e,cP)=>{"use strict";v();var CJ=jn(),NJ=Rn();function Jc(e,t,r){if(!(this instanceof Jc))return new Jc(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(CJ.toArray(t,r))}cP.exports=Jc;Jc.prototype._init=function(t){t.length>this.blockSize&&(t=new this.Hash().update(t).digest()),NJ(t.length<=this.blockSize);for(var r=t.length;r<this.blockSize;r++)t.push(0);for(r=0;r<t.length;r++)t[r]^=54;for(this.inner=new this.Hash().update(t),r=0;r<t.length;r++)t[r]^=106;this.outer=new this.Hash().update(t)};Jc.prototype.update=function(t,r){return this.inner.update(t,r),this};Jc.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}});var dP=k(hP=>{v();var ri=hP;ri.utils=jn();ri.common=Zc();ri.sha=iP();ri.ripemd=fP();ri.hmac=lP();ri.sha1=ri.sha.sha1;ri.sha256=ri.sha.sha256;ri.sha224=ri.sha.sha224;ri.sha384=ri.sha.sha384;ri.sha512=ri.sha.sha512;ri.ripemd160=ri.ripemd.ripemd160});var gP=k((q2e,pP)=>{"use strict";v();var Ip=dP(),Ma=Bt(),Sr=pP.exports;Sr.sha1=function(e){return Ma.checkArgument(h.Buffer.isBuffer(e)),h.Buffer.from(Ip.sha1().update(e).digest("hex"),"hex")};Sr.sha1.blocksize=512;Sr.sha256=function(e){return Ma.checkArgument(h.Buffer.isBuffer(e)),h.Buffer.from(Ip.sha256().update(e).digest("hex"),"hex")};Sr.sha256.blocksize=512;Sr.sha256sha256=function(e){return Ma.checkArgument(h.Buffer.isBuffer(e)),Sr.sha256(Sr.sha256(e))};Sr.ripemd160=function(e){return Ma.checkArgument(h.Buffer.isBuffer(e)),h.Buffer.from(Ip.ripemd160().update(e).digest("hex"),"hex")};Sr.sha256ripemd160=function(e){return Ma.checkArgument(h.Buffer.isBuffer(e)),Sr.ripemd160(Sr.sha256(e))};Sr.sha512=function(e){return Ma.checkArgument(h.Buffer.isBuffer(e)),h.Buffer.from(Ip.sha512().update(e).digest("hex"),"hex")};Sr.sha512.blocksize=1024;Sr.hmac=function(e,t,r){Ma.checkArgument(h.Buffer.isBuffer(t)),Ma.checkArgument(h.Buffer.isBuffer(r)),Ma.checkArgument(e.blocksize);var i=e.blocksize/8;if(r.length>i)r=e(r);else if(r.length<i){var n=h.Buffer.alloc(i);n.fill(0),r.copy(n),r=n}var o=h.Buffer.alloc(i);o.fill(92);var a=h.Buffer.alloc(i);a.fill(54);for(var s=h.Buffer.alloc(i),u=h.Buffer.alloc(i),c=0;c<i;c++)s[c]=o[c]^r[c],u[c]=a[c]^r[c];return e(h.Buffer.concat([s,e(h.Buffer.concat([u,t]))]))};Sr.sha256hmac=function(e,t){return Sr.hmac(Sr.sha256,e,t)};Sr.sha512hmac=function(e,t){return Sr.hmac(Sr.sha512,e,t)}});var mP=k((F2e,vP)=>{"use strict";v();var Op=_r(),Ca=Bt(),xr=vP.exports;xr.sha1=function(e){return Ca.checkArgument(h.Buffer.isBuffer(e)),Op.createHash("sha1").update(e).digest()};xr.sha1.blocksize=512;xr.sha256=function(e){return Ca.checkArgument(h.Buffer.isBuffer(e)),Op.createHash("sha256").update(e).digest()};xr.sha256.blocksize=512;xr.sha256sha256=function(e){return Ca.checkArgument(h.Buffer.isBuffer(e)),xr.sha256(xr.sha256(e))};xr.ripemd160=function(e){return Ca.checkArgument(h.Buffer.isBuffer(e)),Op.createHash("ripemd160").update(e).digest()};xr.sha256ripemd160=function(e){return Ca.checkArgument(h.Buffer.isBuffer(e)),xr.ripemd160(xr.sha256(e))};xr.sha512=function(e){return Ca.checkArgument(h.Buffer.isBuffer(e)),Op.createHash("sha512").update(e).digest()};xr.sha512.blocksize=1024;xr.hmac=function(e,t,r){Ca.checkArgument(h.Buffer.isBuffer(t)),Ca.checkArgument(h.Buffer.isBuffer(r)),Ca.checkArgument(e.blocksize);var i=e.blocksize/8;if(r.length>i)r=e(r);else if(r.length<i){var n=h.Buffer.alloc(i);n.fill(0),r.copy(n),r=n}var o=h.Buffer.alloc(i);o.fill(92);var a=h.Buffer.alloc(i);a.fill(54);for(var s=h.Buffer.alloc(i),u=h.Buffer.alloc(i),c=0;c<i;c++)s[c]=o[c]^r[c],u[c]=a[c]^r[c];return e(h.Buffer.concat([s,e(h.Buffer.concat([u,t]))]))};xr.sha256hmac=function(e,t){return xr.hmac(xr.sha256,e,t)};xr.sha512hmac=function(e,t){return xr.hmac(xr.sha512,e,t)}});var cr=k((j2e,Iy)=>{v();A.default.browser?Iy.exports=gP():Iy.exports=mP()});var xs=k((K2e,_P)=>{"use strict";v();var Na=Et(),y0=pi(),uf=[],b0={};function yP(){}yP.prototype.toString=function(){return this.name};function _0(e,t){if(~uf.indexOf(e))return e;if(t){Na.isArray(t)||(t=[t]);for(var r=0;r<uf.length;r++){var i=uf[r],n=Na.pick(i,t),o=Na.values(n);if(~o.indexOf(e))return i}return}return b0[e]}function Ap(e){for(var t=[],r=0;r<e.length;r++)t.push(e.charCodeAt(r)&31);return t}function w0(e){var t=new yP;y0.defineImmutable(t,{name:e.name,alias:e.alias,pubkeyhash:e.pubkeyhash,privatekey:e.privatekey,scripthash:e.scripthash,xpubkey:e.xpubkey,xprivkey:e.xprivkey});var r=e.indexBy||Object.keys(e);return e.cashAddrPrefix&&Na.extend(t,{cashAddrPrefix:e.cashAddrPrefix,cashAddrPrefixArray:Ap(e.cashAddrPrefix)}),e.networkMagic&&Na.extend(t,{networkMagic:y0.integerAsBuffer(e.networkMagic)}),e.port&&Na.extend(t,{port:e.port}),e.dnsSeeds&&Na.extend(t,{dnsSeeds:e.dnsSeeds}),uf.push(t),DJ(t,r),t}function DJ(e,t){for(var r=0;r<t.length;r++){var i=t[r],n=e[i];!Na.isUndefined(n)&&!Na.isObject(n)&&(b0[n]=e)}}function LJ(e,t){for(var r=0;r<t.length;r++){var i=t[r];b0[i]===e&&delete b0[i]}}function qJ(e){for(var t=0;t<uf.length;t++)uf[t]===e&&uf.splice(t,1);LJ(e,Object.keys(b0))}var Pp={livenet:3823236072,testnet:4108710900,regtest:3669344250,stn:4224632057},bP=["seed.bitcoinsv.org","seed.bitcoinunlimited.info"],ws={PORT:18333,NETWORK_MAGIC:Pp.testnet,DNS_SEEDS:bP,PREFIX:"testnet",CASHADDRPREFIX:"bchtest"},Da={PORT:18444,NETWORK_MAGIC:Pp.regtest,DNS_SEEDS:[],PREFIX:"regtest",CASHADDRPREFIX:"bchreg"},Ss={PORT:9333,NETWORK_MAGIC:Pp.stn,DNS_SEEDS:["stn-seed.bitcoinsv.io"],PREFIX:"stn",CASHADDRPREFIX:"bsvstn"},UJ={name:"livenet",alias:"mainnet",prefix:"bitcoin",cashAddrPrefix:"bitcoincash",pubkeyhash:0,privatekey:128,scripthash:5,xpubkey:76067358,xprivkey:76066276,networkMagic:Pp.livenet,port:8333,dnsSeeds:bP},FJ={name:"testnet",prefix:ws.PREFIX,cashAddrPrefix:ws.CASHADDRPREFIX,pubkeyhash:111,privatekey:239,scripthash:196,xpubkey:70617039,xprivkey:70615956,networkMagic:ws.NETWORK_MAGIC},HJ={name:"regtest",prefix:Da.PREFIX,cashAddrPrefix:Da.CASHADDRPREFIX,pubkeyhash:111,privatekey:239,scripthash:196,xpubkey:70617039,xprivkey:70615956,networkMagic:Da.NETWORK_MAGIC,port:Da.PORT,dnsSeeds:[],indexBy:["port","name","cashAddrPrefix","networkMagic"]},jJ={name:"stn",prefix:Ss.PREFIX,cashAddrPrefix:Ss.CASHADDRPREFIX,pubkeyhash:111,privatekey:239,scripthash:196,xpubkey:70617039,xprivkey:70615956,networkMagic:Ss.NETWORK_MAGIC,indexBy:["port","name","cashAddrPrefix","networkMagic"]};w0(FJ);w0(jJ);w0(HJ);w0(UJ);var Oy=_0("livenet"),zJ=_0("regtest"),No=_0("testnet"),KJ=_0("stn");Object.defineProperty(No,"port",{enumerable:!0,configurable:!1,get:function(){return this.regtestEnabled?Da.PORT:this.stnEnabled?Ss.PORT:ws.PORT}});Object.defineProperty(No,"networkMagic",{enumerable:!0,configurable:!1,get:function(){return this.regtestEnabled?y0.integerAsBuffer(Da.NETWORK_MAGIC):this.stnEnabled?y0.integerAsBuffer(Ss.NETWORK_MAGIC):y0.integerAsBuffer(ws.NETWORK_MAGIC)}});Object.defineProperty(No,"dnsSeeds",{enumerable:!0,configurable:!1,get:function(){return this.regtestEnabled?Da.DNS_SEEDS:this.stnEnabled?Ss.DNS_SEEDS:ws.DNS_SEEDS}});Object.defineProperty(No,"cashAddrPrefix",{enumerable:!0,configurable:!1,get:function(){return this.regtestEnabled?Da.CASHADDRPREFIX:this.stnEnabled?Ss.CASHADDRPREFIX:ws.CASHADDRPREFIX}});Object.defineProperty(No,"cashAddrPrefixArray",{enumerable:!0,configurable:!1,get:function(){return this.regtestEnabled?Ap(Da.CASHADDRPREFIX):this.stnEnabled?Ap(Ss.CASHADDRPREFIX):Ap(ws.CASHADDRPREFIX)}});function VJ(){No.regtestEnabled=!0}function GJ(){No.regtestEnabled=!1}function ZJ(){No.stnEnabled=!0}function WJ(){No.stnEnabled=!1}_P.exports={add:w0,remove:qJ,defaultNetwork:Oy,livenet:Oy,mainnet:Oy,testnet:No,regtest:zJ,stn:KJ,get:_0,enableRegtest:VJ,disableRegtest:GJ,enableStn:ZJ,disableStn:WJ}});var S0=k((G2e,xP)=>{"use strict";v();var Ay=Et(),wP=Z2(),SP=Kt(),YJ="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz".split(""),Gr=function e(t){if(!(this instanceof e))return new e(t);if(h.Buffer.isBuffer(t)){var r=t;this.fromBuffer(r)}else if(typeof t=="string"){var i=t;this.fromString(i)}};Gr.validCharacters=function(t){return SP.Buffer.isBuffer(t)&&(t=t.toString()),Ay.every(Ay.map(t,function(r){return Ay.includes(YJ,r)}))};Gr.prototype.set=function(e){return this.buf=e.buf||this.buf||void 0,this};Gr.encode=function(e){if(!SP.Buffer.isBuffer(e))throw new Error("Input should be a buffer");return wP.encode(e)};Gr.decode=function(e){if(typeof e!="string")throw new Error("Input should be a string");return h.Buffer.from(wP.decode(e))};Gr.prototype.fromBuffer=function(e){return this.buf=e,this};Gr.fromBuffer=function(e){return new Gr().fromBuffer(e)};Gr.fromHex=function(e){return Gr.fromBuffer(h.Buffer.from(e,"hex"))};Gr.prototype.fromString=function(e){var t=Gr.decode(e);return this.buf=t,this};Gr.fromString=function(e){return new Gr().fromString(e)};Gr.prototype.toBuffer=function(){return this.buf};Gr.prototype.toHex=function(){return this.toBuffer().toString("hex")};Gr.prototype.toString=function(){return Gr.encode(this.buf)};xP.exports=Gr});var Qc=k((W2e,AP)=>{"use strict";v();var EP=Et(),Tp=S0(),IP=Kt(),OP=cr().sha256sha256,lr=function e(t){if(!(this instanceof e))return new e(t);if(h.Buffer.isBuffer(t)){var r=t;this.fromBuffer(r)}else if(typeof t=="string"){var i=t;this.fromString(i)}};lr.prototype.set=function(e){return this.buf=e.buf||this.buf||void 0,this};lr.validChecksum=function(t,r){return EP.isString(t)&&(t=IP.Buffer.from(Tp.decode(t))),EP.isString(r)&&(r=IP.Buffer.from(Tp.decode(r))),r||(r=t.slice(-4),t=t.slice(0,-4)),lr.checksum(t).toString("hex")===r.toString("hex")};lr.decode=function(e){if(typeof e!="string")throw new Error("Input must be a string");var t=h.Buffer.from(Tp.decode(e));if(t.length<4)throw new Error("Input string too short");var r=t.slice(0,-4),i=t.slice(-4),n=OP(r),o=n.slice(0,4);if(i.toString("hex")!==o.toString("hex"))throw new Error("Checksum mismatch");return r};lr.checksum=function(e){return OP(e).slice(0,4)};lr.encode=function(e){if(!h.Buffer.isBuffer(e))throw new Error("Input must be a buffer");var t=h.Buffer.alloc(e.length+4),r=lr.checksum(e);return e.copy(t),r.copy(t,e.length),Tp.encode(t)};lr.prototype.fromBuffer=function(e){return this.buf=e,this};lr.fromBuffer=function(e){return new lr().fromBuffer(e)};lr.fromHex=function(e){return lr.fromBuffer(h.Buffer.from(e,"hex"))};lr.prototype.fromString=function(e){var t=lr.decode(e);return this.buf=t,this};lr.fromString=function(e){var t=lr.decode(e);return new lr(t)};lr.prototype.toBuffer=function(){return this.buf};lr.prototype.toHex=function(){return this.toBuffer().toString("hex")};lr.prototype.toString=function(){return lr.encode(this.buf)};AP.exports=lr});var La=k(($2e,TP)=>{"use strict";v();var x0=Et(),PP=Bt(),el=fr(),gr=function e(t){if(!(this instanceof e))return new e(t);if(!x0.isUndefined(t))if(h.Buffer.isBuffer(t))this.set({buf:t});else if(x0.isString(t)){var r=h.Buffer.from(t,"hex");if(r.length*2!==t.length)throw new TypeError("Invalid hex string");this.set({buf:r})}else if(x0.isObject(t)){var i=t;this.set(i)}else throw new TypeError("Unrecognized argument for BufferReader")};gr.prototype.set=function(e){return this.buf=e.buf||this.buf||void 0,this.pos=e.pos||this.pos||0,this};gr.prototype.eof=function(){return this.pos>=this.buf.length};gr.prototype.finished=gr.prototype.eof;gr.prototype.read=function(e){PP.checkArgument(!x0.isUndefined(e),"Must specify a length");var t=this.buf.slice(this.pos,this.pos+e);return this.pos=this.pos+e,t};gr.prototype.readAll=function(){var e=this.buf.slice(this.pos,this.buf.length);return this.pos=this.buf.length,e};gr.prototype.readUInt8=function(){var e=this.buf.readUInt8(this.pos);return this.pos=this.pos+1,e};gr.prototype.readUInt16BE=function(){var e=this.buf.readUInt16BE(this.pos);return this.pos=this.pos+2,e};gr.prototype.readUInt16LE=function(){var e=this.buf.readUInt16LE(this.pos);return this.pos=this.pos+2,e};gr.prototype.readUInt32BE=function(){var e=this.buf.readUInt32BE(this.pos);return this.pos=this.pos+4,e};gr.prototype.readUInt32LE=function(){var e=this.buf.readUInt32LE(this.pos);return this.pos=this.pos+4,e};gr.prototype.readInt32LE=function(){var e=this.buf.readInt32LE(this.pos);return this.pos=this.pos+4,e};gr.prototype.readUInt64BEBN=function(){var e=this.buf.slice(this.pos,this.pos+8),t=el.fromBuffer(e);return this.pos=this.pos+8,t};gr.prototype.readUInt64LEBN=function(){var e=this.buf.readUInt32LE(this.pos),t=this.buf.readUInt32LE(this.pos+4),r=t*4294967296+e,i;if(r<=9007199254740991)i=new el(r);else{var n=Array.prototype.slice.call(this.buf,this.pos,this.pos+8);i=new el(n,10,"le")}return this.pos=this.pos+8,i};gr.prototype.readVarintNum=function(){var e=this.readUInt8();switch(e){case 253:return this.readUInt16LE();case 254:return this.readUInt32LE();case 255:var t=this.readUInt64LEBN(),r=t.toNumber();if(r<=Math.pow(2,53))return r;throw new Error("number too large to retain precision - use readVarintBN");default:return e}};gr.prototype.readVarLengthBuffer=function(){var e=this.readVarintNum(),t=this.read(e);return PP.checkState(t.length===e,"Invalid length while reading varlength buffer. Expected to read: "+e+" and read "+t.length),t};gr.prototype.readVarintBuf=function(){var e=this.buf.readUInt8(this.pos);switch(e){case 253:return this.read(3);case 254:return this.read(5);case 255:return this.read(9);default:return this.read(1)}};gr.prototype.readVarintBN=function(){var e=this.readUInt8();switch(e){case 253:return new el(this.readUInt16LE());case 254:return new el(this.readUInt32LE());case 255:return this.readUInt64LEBN();default:return new el(e)}};gr.prototype.reverse=function(){for(var e=h.Buffer.alloc(this.buf.length),t=0;t<e.length;t++)e[t]=this.buf[this.buf.length-1-t];return this.buf=e,this};gr.prototype.readReverse=function(e){x0.isUndefined(e)&&(e=this.buf.length);var t=this.buf.slice(this.pos,this.pos+e);return this.pos=this.pos+e,h.Buffer.from(t).reverse()};TP.exports=gr});var ky=k((J2e,MP)=>{"use strict";v();function Es(e){"@babel/helpers - typeof";return Es=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Es(e)}function kP(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,XJ(i.key),i)}}function $J(e,t,r){return t&&kP(e.prototype,t),r&&kP(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function XJ(e){var t=JJ(e,"string");return Es(t)==="symbol"?t:String(t)}function JJ(e,t){if(Es(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(Es(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function QJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eQ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ty(e,t)}function Ty(e,t){return Ty=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},Ty(e,t)}function tQ(e){var t=nQ();return function(){var i=kp(e),n;if(t){var o=kp(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return rQ(this,n)}}function rQ(e,t){if(t&&(Es(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return iQ(e)}function iQ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nQ(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function kp(e){return kp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},kp(e)}var BP={},tl,Py;function E0(e,t,r){r||(r=Error);function i(o,a,s){return typeof t=="string"?t:t(o,a,s)}var n=(function(o){eQ(s,o);var a=tQ(s);function s(u,c,l){var m;return QJ(this,s),m=a.call(this,i(u,c,l)),m.code=e,m}return $J(s)})(r);BP[e]=n}function RP(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(i){return String(i)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function oQ(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function aQ(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function sQ(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}E0("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError);E0("ERR_INVALID_ARG_TYPE",function(e,t,r){tl===void 0&&(tl=Is()),tl(typeof e=="string","'name' must be a string");var i;typeof t=="string"&&oQ(t,"not ")?(i="must not be",t=t.replace(/^not /,"")):i="must be";var n;if(aQ(e," argument"))n="The ".concat(e," ").concat(i," ").concat(RP(t,"type"));else{var o=sQ(e,".")?"property":"argument";n='The "'.concat(e,'" ').concat(o," ").concat(i," ").concat(RP(t,"type"))}return n+=". Received type ".concat(Es(r)),n},TypeError);E0("ERR_INVALID_ARG_VALUE",function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";Py===void 0&&(Py=rn());var i=Py.inspect(t);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(r,". Received ").concat(i)},TypeError,RangeError);E0("ERR_INVALID_RETURN_VALUE",function(e,t,r){var i;return r&&r.constructor&&r.constructor.name?i="instance of ".concat(r.constructor.name):i="type ".concat(Es(r)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(i,".")},TypeError);E0("ERR_MISSING_ARGS",function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];tl===void 0&&(tl=Is()),tl(t.length>0,"At least one arg needs to be specified");var i="The ",n=t.length;switch(t=t.map(function(o){return'"'.concat(o,'"')}),n){case 1:i+="".concat(t[0]," argument");break;case 2:i+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:i+=t.slice(0,n-1).join(", "),i+=", and ".concat(t[n-1]," arguments");break}return"".concat(i," must be specified")},TypeError);MP.exports.codes=BP});var zP=k((epe,jP)=>{"use strict";v();function CP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function NP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?CP(Object(r),!0).forEach(function(i){uQ(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):CP(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function uQ(e,t,r){return t=UP(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DP(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,UP(i.key),i)}}function cQ(e,t,r){return t&&DP(e.prototype,t),r&&DP(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function UP(e){var t=lQ(e,"string");return Bi(t)==="symbol"?t:String(t)}function lQ(e,t){if(Bi(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(Bi(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hQ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&P0(e,t)}function dQ(e){var t=HP();return function(){var i=T0(e),n;if(t){var o=T0(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return FP(this,n)}}function FP(e,t){if(t&&(Bi(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ry(e)}function Ry(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function By(e){var t=typeof Map=="function"?new Map:void 0;return By=function(i){if(i===null||!pQ(i))return i;if(typeof i!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(i))return t.get(i);t.set(i,n)}function n(){return Rp(i,arguments,T0(this).constructor)}return n.prototype=Object.create(i.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),P0(n,i)},By(e)}function Rp(e,t,r){return HP()?Rp=Reflect.construct.bind():Rp=function(n,o,a){var s=[null];s.push.apply(s,o);var u=Function.bind.apply(n,s),c=new u;return a&&P0(c,a.prototype),c},Rp.apply(null,arguments)}function HP(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function pQ(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function P0(e,t){return P0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},P0(e,t)}function T0(e){return T0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},T0(e)}function Bi(e){"@babel/helpers - typeof";return Bi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bi(e)}var gQ=rn(),My=gQ.inspect,vQ=ky(),mQ=vQ.codes.ERR_INVALID_ARG_TYPE;function LP(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function yQ(e,t){if(t=Math.floor(t),e.length==0||t==0)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+=e.substring(0,r-e.length),e}var Vn="",I0="",O0="",ii="",ff={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},bQ=10;function qP(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach(function(i){r[i]=e[i]}),Object.defineProperty(r,"message",{value:e.message}),r}function A0(e){return My(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function _Q(e,t,r){var i="",n="",o=0,a="",s=!1,u=A0(e),c=u.split(`
|
|
19
|
+
`+new Error().stack};Mc.Error.prototype=Object.create(Error.prototype);Mc.Error.prototype.name="bsv.Error";var m$=hO();v$(Mc.Error,m$);Um.exports=Mc.Error;Um.exports.extend=function(e){return dO(Mc.Error,e)}});var Bt=k((tde,gO)=>{"use strict";v();var r0=hn(),y$=Et();gO.exports={checkState:function(e,t){if(!e)throw new r0.InvalidState(t)},checkArgument:function(e,t,r,i){if(!e)throw new r0.InvalidArgument(t,r,i)},checkArgumentType:function(e,t,r){if(r=r||"(unknown name)",y$.isString(t)){if(t==="Buffer"){var i=Kt();if(!i.Buffer.isBuffer(e))throw new r0.InvalidArgumentType(e,t,r)}else if(typeof e!==t)throw new r0.InvalidArgumentType(e,t,r)}else if(!(e instanceof t))throw new r0.InvalidArgumentType(e,t.name,r)}}});var fr=k((ide,mO)=>{"use strict";v();var Ot=Cn(),Fm=Bt(),vO=Et(),W2=function(e){for(var t=h.Buffer.alloc(e.length),r=0;r<e.length;r++)t[r]=e[e.length-1-r];return t};Ot.Zero=new Ot(0);Ot.One=new Ot(1);Ot.Minus1=new Ot(-1);Ot.fromNumber=function(e){return Fm.checkArgument(vO.isNumber(e)),new Ot(e)};Ot.fromString=function(e,t){return Fm.checkArgument(vO.isString(e)),new Ot(e,t)};Ot.fromBuffer=function(e,t){typeof t<"u"&&t.endian==="little"&&(e=W2(e));var r=e.toString("hex"),i=new Ot(r,16);return i};Ot.fromSM=function(e,t){var r;if(e.length===0)return Ot.fromBuffer(h.Buffer.from([0]));var i="big";return t&&(i=t.endian),i==="little"&&(e=W2(e)),e[0]&128?(e[0]=e[0]&127,r=Ot.fromBuffer(e),r.neg().copy(r)):r=Ot.fromBuffer(e),r};Ot.prototype.toNumber=function(){return parseInt(this.toString(10),10)};Ot.prototype.toBuffer=function(e){var t,r;if(e&&e.size){r=this.toString(16,2);var i=r.length/2;t=h.Buffer.from(r,"hex"),i===e.size||(i>e.size?t=Ot.trim(t,i):i<e.size&&(t=Ot.pad(t,i,e.size)))}else r=this.toString(16,2),t=h.Buffer.from(r,"hex");return typeof e<"u"&&e.endian==="little"&&(t=W2(t)),t};Ot.prototype.toSMBigEndian=function(){var e;return this.cmp(Ot.Zero)===-1?(e=this.neg().toBuffer(),e[0]&128?e=h.Buffer.concat([h.Buffer.from([128]),e]):e[0]=e[0]|128):(e=this.toBuffer(),e[0]&128&&(e=h.Buffer.concat([h.Buffer.from([0]),e]))),e.length===1&&e[0]===0&&(e=h.Buffer.from([])),e};Ot.prototype.toSM=function(e){var t=e?e.endian:"big",r=this.toSMBigEndian();return t==="little"&&(r=W2(r)),r};Ot.fromScriptNumBuffer=function(e,t,r){var i=r||4;if(Fm.checkArgument(e.length<=i,new Error("script number overflow")),t&&e.length>0&&(e[e.length-1]&127)===0&&(e.length<=1||(e[e.length-2]&128)===0))throw new Error("non-minimally encoded script number");return Ot.fromSM(e,{endian:"little"})};Ot.prototype.toScriptNumBuffer=function(){return this.toSM({endian:"little"})};Ot.trim=function(e,t){return e.slice(t-e.length,e.length)};Ot.pad=function(e,t,r){for(var i=h.Buffer.alloc(r),n=0;n<e.length;n++)i[i.length-1-n]=e[e.length-1-n];for(n=0;n<r-t;n++)i[n]=0;return i};Ot.prototype.toHex=function(...e){return this.toBuffer(...e).toString("hex")};Ot.fromHex=function(e,...t){return Ot.fromBuffer(h.Buffer.from(e,"hex"),...t)};mO.exports=Ot});function Hm(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in e&&e.BYTES_PER_ELEMENT===1}function ps(e,t=""){if(typeof e!="number"){let r=t&&`"${t}" `;throw new TypeError(`${r}expected number, got ${typeof e}`)}if(!Number.isSafeInteger(e)||e<0){let r=t&&`"${t}" `;throw new RangeError(`${r}expected integer >= 0, got ${e}`)}}function Io(e,t,r=""){let i=Hm(e),n=e?.length,o=t!==void 0;if(!i||o&&n!==t){let a=r&&`"${r}" `,s=o?` of length ${t}`:"",u=i?`length=${n}`:`type=${typeof e}`,c=a+"expected Uint8Array"+s+", got "+u;throw i?new RangeError(c):new TypeError(c)}return e}function Y2(e){if(typeof e!="function"||typeof e.create!="function")throw new TypeError("Hash must wrapped by utils.createHasher");if(ps(e.outputLen),ps(e.blockLen),e.outputLen<1)throw new Error('"outputLen" must be >= 1');if(e.blockLen<1)throw new Error('"blockLen" must be >= 1')}function Cc(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 $2(e,t){Io(e,void 0,"digestInto() output");let r=t.outputLen;if(e.length<r)throw new RangeError('"digestInto() output" expected to be of length >='+r)}function Ea(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function X2(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Fn(e,t){return e<<32-t|e>>>t}function J2(e){if(Io(e),bO)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=b$[e[r]];return t}function yO(e){if(e>=xa._0&&e<=xa._9)return e-xa._0;if(e>=xa.A&&e<=xa.F)return e-(xa.A-10);if(e>=xa.a&&e<=xa.f)return e-(xa.a-10)}function jm(e){if(typeof e!="string")throw new TypeError("hex string expected, got "+typeof e);if(bO)try{return Uint8Array.fromHex(e)}catch(n){throw n instanceof SyntaxError?new RangeError(n.message):n}let t=e.length,r=t/2;if(t%2)throw new RangeError("hex string expected, got unpadded hex of length "+t);let i=new Uint8Array(r);for(let n=0,o=0;n<r;n++,o+=2){let a=yO(e.charCodeAt(o)),s=yO(e.charCodeAt(o+1));if(a===void 0||s===void 0){let u=e[o]+e[o+1];throw new RangeError('hex string expected, got non-hex character "'+u+'" at index '+o)}i[n]=a*16+s}return i}function Ia(e){if(typeof e!="string")throw new TypeError("string expected");return new Uint8Array(new TextEncoder().encode(e))}function _O(...e){let t=0;for(let i=0;i<e.length;i++){let n=e[i];Io(n),t+=n.length}let r=new Uint8Array(t);for(let i=0,n=0;i<e.length;i++){let o=e[i];r.set(o,n),n+=o.length}return r}function Vu(e,t={}){let r=(n,o)=>e(o).update(n).digest(),i=e(void 0);return r.outputLen=i.outputLen,r.blockLen=i.blockLen,r.canXOF=i.canXOF,r.create=n=>e(n),Object.assign(r,t),Object.freeze(r)}function i0(e=32){ps(e,"bytesLength");let t=typeof globalThis=="object"?globalThis.crypto:null;if(typeof t?.getRandomValues!="function")throw new Error("crypto.getRandomValues must be defined");if(e>65536)throw new RangeError(`"bytesLength" expected <= 65536, got ${e}`);return t.getRandomValues(new Uint8Array(e))}var bO,b$,xa,Gu,gs=Xr(()=>{v();bO=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",b$=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));xa={_0:48,_9:57,A:65,F:70,a:97,f:102};Gu=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])})});function wO(e,t,r){return e&t^~e&r}function SO(e,t,r){return e&t^e&r^t&r}var n0,Oa,Aa,Qr,ei,xO=Xr(()=>{v();gs();n0=class{constructor(t,r,i,n){Z(this,"blockLen");Z(this,"outputLen");Z(this,"canXOF",!1);Z(this,"padOffset");Z(this,"isLE");Z(this,"buffer");Z(this,"view");Z(this,"finished",!1);Z(this,"length",0);Z(this,"pos",0);Z(this,"destroyed",!1);this.blockLen=t,this.outputLen=r,this.padOffset=i,this.isLE=n,this.buffer=new Uint8Array(t),this.view=X2(this.buffer)}update(t){Cc(this),Io(t);let{view:r,buffer:i,blockLen:n}=this,o=t.length;for(let a=0;a<o;){let s=Math.min(n-this.pos,o-a);if(s===n){let u=X2(t);for(;n<=o-a;a+=n)this.process(u,a);continue}i.set(t.subarray(a,a+s),this.pos),this.pos+=s,a+=s,this.pos===n&&(this.process(r,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Cc(this),$2(t,this),this.finished=!0;let{buffer:r,view:i,blockLen:n,isLE:o}=this,{pos:a}=this;r[a++]=128,Ea(this.buffer.subarray(a)),this.padOffset>n-a&&(this.process(i,0),a=0);for(let m=a;m<n;m++)r[m]=0;i.setBigUint64(n-8,BigInt(this.length*8),o),this.process(i,0);let s=X2(t),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen must be aligned to 32bit");let c=u/4,l=this.get();if(c>l.length)throw new Error("_sha2: outputLen bigger than state");for(let m=0;m<c;m++)s.setUint32(4*m,l[m],o)}digest(){let{buffer:t,outputLen:r}=this;this.digestInto(t);let i=t.slice(0,r);return this.destroy(),i}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());let{blockLen:r,buffer:i,length:n,finished:o,destroyed:a,pos:s}=this;return t.destroyed=a,t.finished=o,t.length=n,t.pos=s,n%r&&t.buffer.set(i),t}clone(){return this._cloneInto()}},Oa=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Aa=Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),Qr=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),ei=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209])});function _$(e,t=!1){return t?{h:Number(e&Q2),l:Number(e>>EO&Q2)}:{h:Number(e>>EO&Q2)|0,l:Number(e&Q2)|0}}function IO(e,t=!1){let r=e.length,i=new Uint32Array(r),n=new Uint32Array(r);for(let o=0;o<r;o++){let{h:a,l:s}=_$(e[o],t);[i[o],n[o]]=[a,s]}return[i,n]}function Oo(e,t,r,i){let n=(t>>>0)+(i>>>0);return{h:e+r+(n/2**32|0)|0,l:n|0}}var Q2,EO,zm,Km,Zu,Wu,o0,a0,OO,AO,PO,TO,kO,RO,BO=Xr(()=>{v();Q2=BigInt(4294967295),EO=BigInt(32);zm=(e,t,r)=>e>>>r,Km=(e,t,r)=>e<<32-r|t>>>r,Zu=(e,t,r)=>e>>>r|t<<32-r,Wu=(e,t,r)=>e<<32-r|t>>>r,o0=(e,t,r)=>e<<64-r|t>>>r-32,a0=(e,t,r)=>e>>>r-32|t<<64-r;OO=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),AO=(e,t,r,i)=>t+r+i+(e/2**32|0)|0,PO=(e,t,r,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(i>>>0),TO=(e,t,r,i,n)=>t+r+i+n+(e/2**32|0)|0,kO=(e,t,r,i,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(i>>>0)+(n>>>0),RO=(e,t,r,i,n,o)=>t+r+i+n+o+(e/2**32|0)|0});var Vm={};X1(Vm,{_SHA224:()=>rp,_SHA256:()=>tp,_SHA384:()=>np,_SHA512:()=>ip,_SHA512_224:()=>op,_SHA512_256:()=>ap,sha224:()=>I$,sha256:()=>bs,sha384:()=>A$,sha512:()=>O$,sha512_224:()=>T$,sha512_256:()=>P$});var S$,vs,ep,tp,rp,MO,x$,E$,ms,ys,Nc,ip,np,hi,di,op,ap,bs,I$,O$,A$,P$,T$,sp=Xr(()=>{v();xO();BO();gs();S$=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]),vs=new Uint32Array(64),ep=class extends n0{constructor(t){super(64,t,8,!1)}get(){let{A:t,B:r,C:i,D:n,E:o,F:a,G:s,H:u}=this;return[t,r,i,n,o,a,s,u]}set(t,r,i,n,o,a,s,u){this.A=t|0,this.B=r|0,this.C=i|0,this.D=n|0,this.E=o|0,this.F=a|0,this.G=s|0,this.H=u|0}process(t,r){for(let m=0;m<16;m++,r+=4)vs[m]=t.getUint32(r,!1);for(let m=16;m<64;m++){let w=vs[m-15],E=vs[m-2],P=Fn(w,7)^Fn(w,18)^w>>>3,M=Fn(E,17)^Fn(E,19)^E>>>10;vs[m]=M+vs[m-7]+P+vs[m-16]|0}let{A:i,B:n,C:o,D:a,E:s,F:u,G:c,H:l}=this;for(let m=0;m<64;m++){let w=Fn(s,6)^Fn(s,11)^Fn(s,25),E=l+w+wO(s,u,c)+S$[m]+vs[m]|0,M=(Fn(i,2)^Fn(i,13)^Fn(i,22))+SO(i,n,o)|0;l=c,c=u,u=s,s=a+E|0,a=o,o=n,n=i,i=E+M|0}i=i+this.A|0,n=n+this.B|0,o=o+this.C|0,a=a+this.D|0,s=s+this.E|0,u=u+this.F|0,c=c+this.G|0,l=l+this.H|0,this.set(i,n,o,a,s,u,c,l)}roundClean(){Ea(vs)}destroy(){this.destroyed=!0,this.set(0,0,0,0,0,0,0,0),Ea(this.buffer)}},tp=class extends ep{constructor(){super(32);Z(this,"A",Oa[0]|0);Z(this,"B",Oa[1]|0);Z(this,"C",Oa[2]|0);Z(this,"D",Oa[3]|0);Z(this,"E",Oa[4]|0);Z(this,"F",Oa[5]|0);Z(this,"G",Oa[6]|0);Z(this,"H",Oa[7]|0)}},rp=class extends ep{constructor(){super(28);Z(this,"A",Aa[0]|0);Z(this,"B",Aa[1]|0);Z(this,"C",Aa[2]|0);Z(this,"D",Aa[3]|0);Z(this,"E",Aa[4]|0);Z(this,"F",Aa[5]|0);Z(this,"G",Aa[6]|0);Z(this,"H",Aa[7]|0)}},MO=IO(["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))),x$=MO[0],E$=MO[1],ms=new Uint32Array(80),ys=new Uint32Array(80),Nc=class extends n0{constructor(t){super(128,t,16,!1)}get(){let{Ah:t,Al:r,Bh:i,Bl:n,Ch:o,Cl:a,Dh:s,Dl:u,Eh:c,El:l,Fh:m,Fl:w,Gh:E,Gl:P,Hh:M,Hl:D}=this;return[t,r,i,n,o,a,s,u,c,l,m,w,E,P,M,D]}set(t,r,i,n,o,a,s,u,c,l,m,w,E,P,M,D){this.Ah=t|0,this.Al=r|0,this.Bh=i|0,this.Bl=n|0,this.Ch=o|0,this.Cl=a|0,this.Dh=s|0,this.Dl=u|0,this.Eh=c|0,this.El=l|0,this.Fh=m|0,this.Fl=w|0,this.Gh=E|0,this.Gl=P|0,this.Hh=M|0,this.Hl=D|0}process(t,r){for(let K=0;K<16;K++,r+=4)ms[K]=t.getUint32(r),ys[K]=t.getUint32(r+=4);for(let K=16;K<80;K++){let C=ms[K-15]|0,N=ys[K-15]|0,F=Zu(C,N,1)^Zu(C,N,8)^zm(C,N,7),H=Wu(C,N,1)^Wu(C,N,8)^Km(C,N,7),z=ms[K-2]|0,V=ys[K-2]|0,B=Zu(z,V,19)^o0(z,V,61)^zm(z,V,6),g=Wu(z,V,19)^a0(z,V,61)^Km(z,V,6),I=PO(H,g,ys[K-7],ys[K-16]),y=TO(I,F,B,ms[K-7],ms[K-16]);ms[K]=y|0,ys[K]=I|0}let{Ah:i,Al:n,Bh:o,Bl:a,Ch:s,Cl:u,Dh:c,Dl:l,Eh:m,El:w,Fh:E,Fl:P,Gh:M,Gl:D,Hh:L,Hl:U}=this;for(let K=0;K<80;K++){let C=Zu(m,w,14)^Zu(m,w,18)^o0(m,w,41),N=Wu(m,w,14)^Wu(m,w,18)^a0(m,w,41),F=m&E^~m&M,H=w&P^~w&D,z=kO(U,N,H,E$[K],ys[K]),V=RO(z,L,C,F,x$[K],ms[K]),B=z|0,g=Zu(i,n,28)^o0(i,n,34)^o0(i,n,39),I=Wu(i,n,28)^a0(i,n,34)^a0(i,n,39),y=i&o^i&s^o&s,f=n&a^n&u^a&u;L=M|0,U=D|0,M=E|0,D=P|0,E=m|0,P=w|0,{h:m,l:w}=Oo(c|0,l|0,V|0,B|0),c=s|0,l=u|0,s=o|0,u=a|0,o=i|0,a=n|0;let p=OO(B,I,f);i=AO(p,V,g,y),n=p|0}({h:i,l:n}=Oo(this.Ah|0,this.Al|0,i|0,n|0)),{h:o,l:a}=Oo(this.Bh|0,this.Bl|0,o|0,a|0),{h:s,l:u}=Oo(this.Ch|0,this.Cl|0,s|0,u|0),{h:c,l}=Oo(this.Dh|0,this.Dl|0,c|0,l|0),{h:m,l:w}=Oo(this.Eh|0,this.El|0,m|0,w|0),{h:E,l:P}=Oo(this.Fh|0,this.Fl|0,E|0,P|0),{h:M,l:D}=Oo(this.Gh|0,this.Gl|0,M|0,D|0),{h:L,l:U}=Oo(this.Hh|0,this.Hl|0,L|0,U|0),this.set(i,n,o,a,s,u,c,l,m,w,E,P,M,D,L,U)}roundClean(){Ea(ms,ys)}destroy(){this.destroyed=!0,Ea(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}},ip=class extends Nc{constructor(){super(64);Z(this,"Ah",ei[0]|0);Z(this,"Al",ei[1]|0);Z(this,"Bh",ei[2]|0);Z(this,"Bl",ei[3]|0);Z(this,"Ch",ei[4]|0);Z(this,"Cl",ei[5]|0);Z(this,"Dh",ei[6]|0);Z(this,"Dl",ei[7]|0);Z(this,"Eh",ei[8]|0);Z(this,"El",ei[9]|0);Z(this,"Fh",ei[10]|0);Z(this,"Fl",ei[11]|0);Z(this,"Gh",ei[12]|0);Z(this,"Gl",ei[13]|0);Z(this,"Hh",ei[14]|0);Z(this,"Hl",ei[15]|0)}},np=class extends Nc{constructor(){super(48);Z(this,"Ah",Qr[0]|0);Z(this,"Al",Qr[1]|0);Z(this,"Bh",Qr[2]|0);Z(this,"Bl",Qr[3]|0);Z(this,"Ch",Qr[4]|0);Z(this,"Cl",Qr[5]|0);Z(this,"Dh",Qr[6]|0);Z(this,"Dl",Qr[7]|0);Z(this,"Eh",Qr[8]|0);Z(this,"El",Qr[9]|0);Z(this,"Fh",Qr[10]|0);Z(this,"Fl",Qr[11]|0);Z(this,"Gh",Qr[12]|0);Z(this,"Gl",Qr[13]|0);Z(this,"Hh",Qr[14]|0);Z(this,"Hl",Qr[15]|0)}},hi=Uint32Array.from([2352822216,424955298,1944164710,2312950998,502970286,855612546,1738396948,1479516111,258812777,2077511080,2011393907,79989058,1067287976,1780299464,286451373,2446758561]),di=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]),op=class extends Nc{constructor(){super(28);Z(this,"Ah",hi[0]|0);Z(this,"Al",hi[1]|0);Z(this,"Bh",hi[2]|0);Z(this,"Bl",hi[3]|0);Z(this,"Ch",hi[4]|0);Z(this,"Cl",hi[5]|0);Z(this,"Dh",hi[6]|0);Z(this,"Dl",hi[7]|0);Z(this,"Eh",hi[8]|0);Z(this,"El",hi[9]|0);Z(this,"Fh",hi[10]|0);Z(this,"Fl",hi[11]|0);Z(this,"Gh",hi[12]|0);Z(this,"Gl",hi[13]|0);Z(this,"Hh",hi[14]|0);Z(this,"Hl",hi[15]|0)}},ap=class extends Nc{constructor(){super(32);Z(this,"Ah",di[0]|0);Z(this,"Al",di[1]|0);Z(this,"Bh",di[2]|0);Z(this,"Bl",di[3]|0);Z(this,"Ch",di[4]|0);Z(this,"Cl",di[5]|0);Z(this,"Dh",di[6]|0);Z(this,"Dl",di[7]|0);Z(this,"Eh",di[8]|0);Z(this,"El",di[9]|0);Z(this,"Fh",di[10]|0);Z(this,"Fl",di[11]|0);Z(this,"Gh",di[12]|0);Z(this,"Gl",di[13]|0);Z(this,"Hh",di[14]|0);Z(this,"Hl",di[15]|0)}},bs=Vu(()=>new tp,Gu(1)),I$=Vu(()=>new rp,Gu(4)),O$=Vu(()=>new ip,Gu(3)),A$=Vu(()=>new np,Gu(2)),P$=Vu(()=>new ap,Gu(6)),T$=Vu(()=>new op,Gu(5))});function $u(e,t=""){if(typeof e!="boolean"){let r=t&&`"${t}" `;throw new TypeError(r+"expected boolean, got type="+typeof e)}return e}function cp(e){if(typeof e=="bigint"){if(!up(e))throw new RangeError("positive bigint expected, got "+e)}else Zm(e);return e}function dn(e,t=""){if(typeof e!="number"){let r=t&&`"${t}" `;throw new TypeError(r+"expected number, got type="+typeof e)}if(!Number.isSafeInteger(e)){let r=t&&`"${t}" `;throw new RangeError(r+"expected safe integer, got "+e)}}function s0(e){let t=cp(e).toString(16);return t.length&1?"0"+t:t}function CO(e){if(typeof e!="string")throw new TypeError("hex string expected, got "+typeof e);return e===""?fp:BigInt("0x"+e)}function bi(e){return CO(J2(e))}function Lc(e){return CO(J2(hp(Io(e)).reverse()))}function lp(e,t){if(ps(t),t===0)throw new RangeError("zero length");e=cp(e);let r=e.toString(16);if(r.length>t*2)throw new RangeError("number too large");return jm(r.padStart(t*2,"0"))}function Wm(e,t){return lp(e,t).reverse()}function hp(e){return Uint8Array.from(qt(e))}function qc(e){if(typeof e!="string")throw new TypeError("ascii string expected, got "+typeof e);return Uint8Array.from(e,(t,r)=>{let i=t.charCodeAt(0);if(t.length!==1||i>127)throw new RangeError(`string contains non-ASCII character "${e[r]}" with code ${i} at position ${r}`);return i})}function k$(e,t,r){return up(e)&&up(t)&&up(r)&&t<=e&&e<r}function Ym(e,t,r,i){if(!k$(t,r,i))throw new RangeError("expected valid "+e+": "+r+" <= n < "+i+", got "+t)}function Xu(e){if(e<fp)throw new Error("expected non-negative bigint, got "+e);let t;for(t=0;e>fp;e>>=Gm,t+=1);return t}function NO(e,t,r){if(ps(e,"hashLen"),ps(t,"qByteLen"),typeof r!="function")throw new TypeError("hmacFn must be a function");let i=D=>new Uint8Array(D),n=Uint8Array.of(),o=Uint8Array.of(0),a=Uint8Array.of(1),s=1e3,u=i(e),c=i(e),l=0,m=()=>{u.fill(1),c.fill(0),l=0},w=(...D)=>r(c,kt(u,...D)),E=(D=n)=>{c=w(o,D),u=w(),D.length!==0&&(c=w(a,D),u=w())},P=()=>{if(l++>=s)throw new Error("drbg: tried max amount of iterations");let D=0,L=[];for(;D<t;){u=w();let U=u.slice();L.push(U),D+=u.length}return kt(...L)};return(D,L)=>{m(),E(D);let U;for(;(U=L(P()))===void 0;)E();return m(),U}}function pn(e,t={},r={}){if(Object.prototype.toString.call(e)!=="[object Object]")throw new TypeError("expected valid options object");function i(o,a,s){if(!s&&a!=="function"&&!Object.hasOwn(e,o))throw new TypeError(`param "${o}" is invalid: expected own property`);let u=e[o];if(s&&u===void 0)return;let c=typeof u;if(c!==a||u===null)throw new TypeError(`param "${o}" is invalid: expected ${a}, got ${c}`)}let n=(o,a)=>Object.entries(o).forEach(([s,u])=>i(s,u,a));n(t,!1),n(r,!0)}var qt,Zm,Pa,kt,Dc,Yu,ki,fp,Gm,up,Uc,Ju=Xr(()=>{v();gs();qt=(e,t,r)=>Io(e,t,r),Zm=ps,Pa=J2,kt=(...e)=>_O(...e),Dc=e=>jm(e),Yu=Hm,ki=e=>i0(e),fp=BigInt(0),Gm=BigInt(1);up=e=>typeof e=="bigint"&&fp<=e;Uc=e=>(Gm<<BigInt(e))-Gm});function Ui(e,t){if(t<=ti)throw new Error("mod: expected positive modulus, got "+t);let r=e%t;return r>=ti?r:t+r}function Fi(e,t,r){if(t<ti)throw new Error("pow2: expected non-negative exponent, got "+t);let i=e;for(;t-- >ti;)i*=i,i%=r;return i}function DO(e,t){if(e===ti)throw new Error("invert: expected non-zero number");if(t<=ti)throw new Error("invert: expected positive modulus, got "+t);let r=Ui(e,t),i=t,n=ti,o=wr,a=wr,s=ti;for(;r!==ti;){let c=i/r,l=i-r*c,m=n-a*c,w=o-s*c;i=r,r=l,n=a,o=s,a=m,s=w}if(i!==wr)throw new Error("invert: does not exist");return Ui(n,t)}function Xm(e,t,r){let i=e;if(!i.eql(i.sqr(t),r))throw new Error("Cannot find square root")}function zO(e,t){let r=e,i=(r.ORDER+wr)/UO,n=r.pow(t,i);return Xm(r,n,t),n}function M$(e,t){let r=e,i=(r.ORDER-FO)/HO,n=r.mul(t,Qu),o=r.pow(n,i),a=r.mul(t,o),s=r.mul(r.mul(a,Qu),o),u=r.mul(a,r.sub(s,r.ONE));return Xm(r,u,t),u}function C$(e){let t=Fc(e),r=KO(e),i=r(t,t.neg(t.ONE)),n=r(t,i),o=r(t,t.neg(i)),a=(e+R$)/jO;return((s,u)=>{let c=s,l=c.pow(u,a),m=c.mul(l,i),w=c.mul(l,n),E=c.mul(l,o),P=c.eql(c.sqr(m),u),M=c.eql(c.sqr(w),u);l=c.cmov(l,m,P),m=c.cmov(E,w,M);let D=c.eql(c.sqr(m),u),L=c.cmov(l,m,D);return Xm(c,L,u),L})}function KO(e){if(e<qO)throw new Error("sqrt is not defined for small field");let t=e-wr,r=0;for(;t%Qu===ti;)t/=Qu,r++;let i=Qu,n=Fc(e);for(;$m(n,i)===1;)if(i++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(r===1)return zO;let o=n.pow(i,t),a=(t+wr)/Qu;return function(u,c){let l=u;if(l.is0(c))return c;if($m(l,c)!==1)throw new Error("Cannot find square root");let m=r,w=l.mul(l.ONE,o),E=l.pow(c,t),P=l.pow(c,a);for(;!l.eql(E,l.ONE);){if(l.is0(E))return l.ZERO;let M=1,D=l.sqr(E);for(;!l.eql(D,l.ONE);)if(M++,D=l.sqr(D),M===m)throw new Error("Cannot find square root");let L=wr<<BigInt(m-M-1),U=l.pow(w,L);m=M,w=l.sqr(U),E=l.mul(E,w),P=l.mul(P,U)}return P}}function N$(e){return e%UO===qO?zO:e%HO===FO?M$:e%jO===B$?C$(e):KO(e)}function ef(e){let t={ORDER:"bigint",BYTES:"number",BITS:"number"},r=D$.reduce((i,n)=>(i[n]="function",i),t);if(pn(e,r),dn(e.BYTES,"BYTES"),dn(e.BITS,"BITS"),e.BYTES<1||e.BITS<1)throw new Error("invalid field: expected BYTES/BITS > 0");if(e.ORDER<=wr)throw new Error("invalid field: expected ORDER > 1, got "+e.ORDER);return e}function L$(e,t,r){let i=e;if(r<ti)throw new Error("invalid exponent, negatives unsupported");if(r===ti)return i.ONE;if(r===wr)return t;let n=i.ONE,o=t;for(;r>ti;)r&wr&&(n=i.mul(n,o)),o=i.sqr(o),r>>=wr;return n}function tf(e,t,r=!1){let i=e,n=new Array(t.length).fill(r?i.ZERO:void 0),o=t.reduce((s,u,c)=>i.is0(u)?s:(n[c]=s,i.mul(s,u)),i.ONE),a=i.inv(o);return t.reduceRight((s,u,c)=>i.is0(u)?s:(n[c]=i.mul(s,n[c]),i.mul(s,u)),a),n}function $m(e,t){let r=e,i=(r.ORDER-wr)/Qu,n=r.pow(t,i),o=r.eql(n,r.ONE),a=r.eql(n,r.ZERO),s=r.eql(n,r.neg(r.ONE));if(!o&&!a&&!s)throw new Error("invalid Legendre symbol result");return o?1:a?0:-1}function Jm(e,t){return $m(e,t)!==-1}function q$(e,t){if(t!==void 0&&Zm(t),e<=ti)throw new Error("invalid n length: expected positive n, got "+e);if(t!==void 0&&t<1)throw new Error("invalid n length: expected positive bit length, got "+t);let r=Xu(e);if(t!==void 0&&t<r)throw new Error(`invalid n length: expected bit length (${r}) >= n.length (${t})`);let i=t!==void 0?t:r,n=Math.ceil(i/8);return{nBitLength:i,nByteLength:n}}function Fc(e,t={}){return new dp(e,t)}function VO(e){if(typeof e!="bigint")throw new Error("field order must be bigint");if(e<=wr)throw new Error("field order must be greater than 1");let t=Xu(e-wr);return Math.ceil(t/8)}function u0(e){let t=VO(e);return t+Math.ceil(t/2)}function Hc(e,t,r=!1){qt(e);let i=e.length,n=VO(t),o=Math.max(u0(t),16);if(i<o||i>1024)throw new Error("expected "+o+"-1024 bytes of input, got "+i);let a=r?Lc(e):bi(e),s=Ui(a,t-wr)+wr;return r?Wm(s,n):lp(s,n)}var ti,wr,Qu,qO,UO,FO,R$,HO,B$,jO,D$,LO,dp,jc=Xr(()=>{v();Ju();ti=BigInt(0),wr=BigInt(1),Qu=BigInt(2),qO=BigInt(3),UO=BigInt(4),FO=BigInt(5),R$=BigInt(7),HO=BigInt(8),B$=BigInt(9),jO=BigInt(16);D$=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];LO=new WeakMap,dp=class{constructor(t,r={}){Z(this,"ORDER");Z(this,"BITS");Z(this,"BYTES");Z(this,"isLE");Z(this,"ZERO",ti);Z(this,"ONE",wr);Z(this,"_lengths");Z(this,"_mod");if(t<=wr)throw new Error("invalid field: expected ORDER > 1, got "+t);let i;this.isLE=!1,r!=null&&typeof r=="object"&&(typeof r.BITS=="number"&&(i=r.BITS),typeof r.sqrt=="function"&&Object.defineProperty(this,"sqrt",{value:r.sqrt,enumerable:!0}),typeof r.isLE=="boolean"&&(this.isLE=r.isLE),r.allowedLengths&&(this._lengths=Object.freeze(r.allowedLengths.slice())),typeof r.modFromBytes=="boolean"&&(this._mod=r.modFromBytes));let{nBitLength:n,nByteLength:o}=q$(t,i);if(o>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");this.ORDER=t,this.BITS=n,this.BYTES=o,Object.freeze(this)}create(t){return Ui(t,this.ORDER)}isValid(t){if(typeof t!="bigint")throw new TypeError("invalid field element: expected bigint, got "+typeof t);return ti<=t&&t<this.ORDER}is0(t){return t===ti}isValidNot0(t){return!this.is0(t)&&this.isValid(t)}isOdd(t){return(t&wr)===wr}neg(t){return Ui(-t,this.ORDER)}eql(t,r){return t===r}sqr(t){return Ui(t*t,this.ORDER)}add(t,r){return Ui(t+r,this.ORDER)}sub(t,r){return Ui(t-r,this.ORDER)}mul(t,r){return Ui(t*r,this.ORDER)}pow(t,r){return L$(this,t,r)}div(t,r){return Ui(t*DO(r,this.ORDER),this.ORDER)}sqrN(t){return t*t}addN(t,r){return t+r}subN(t,r){return t-r}mulN(t,r){return t*r}inv(t){return DO(t,this.ORDER)}sqrt(t){let r=LO.get(this);return r||LO.set(this,r=N$(this.ORDER)),r(this,t)}toBytes(t){return this.isLE?Wm(t,this.BYTES):lp(t,this.BYTES)}fromBytes(t,r=!1){qt(t);let{_lengths:i,BYTES:n,isLE:o,ORDER:a,_mod:s}=this;if(i){if(t.length<1||!i.includes(t.length)||t.length>n)throw new Error("Field.fromBytes: expected "+i+" bytes, got "+t.length);let c=new Uint8Array(n);c.set(t,o?0:c.length-t.length),t=c}if(t.length!==n)throw new Error("Field.fromBytes: expected "+n+" bytes, got "+t.length);let u=o?Lc(t):bi(t);if(s&&(u=Ui(u,a)),!r&&!this.isValid(u))throw new Error("invalid field element: outside of range 0..ORDER");return u}invertBatch(t){return tf(this,t)}cmov(t,r,i){return $u(i,"condition"),i?r:t}};Object.freeze(dp.prototype)});function YO(e){let t=e;if(typeof t!="function")throw new TypeError("Point must be a constructor");pn({Fp:t.Fp,Fn:t.Fn,fromAffine:t.fromAffine,fromBytes:t.fromBytes,fromHex:t.fromHex},{Fp:"object",Fn:"object",fromAffine:"function",fromBytes:"function",fromHex:"function"}),ef(t.Fp),ef(t.Fn)}function f0(e,t){let r=t.negate();return e?r:t}function ry(e,t){let r=tf(e.Fp,t.map(i=>i.Z));return t.map((i,n)=>e.fromAffine(i.toAffine(r[n])))}function $O(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function Qm(e,t){$O(e,t);let r=Math.ceil(t/e)+1,i=2**(e-1),n=2**e,o=Uc(e),a=BigInt(e);return{windows:r,windowSize:i,mask:o,maxNumber:n,shiftBy:a}}function GO(e,t,r){let{windowSize:i,mask:n,maxNumber:o,shiftBy:a}=r,s=Number(e&n),u=e>>a;s>i&&(s-=o,u+=rf);let c=t*i,l=c+Math.abs(s)-1,m=s===0,w=s<0,E=t%2!==0;return{nextN:u,offset:l,isZero:m,isNeg:w,isNegF:E,offsetF:c}}function U$(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((r,i)=>{if(!(r instanceof t))throw new Error("invalid point at index "+i)})}function F$(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((r,i)=>{if(!t.isValid(r))throw new Error("invalid scalar at index "+i)})}function ty(e){return XO.get(e)||1}function ZO(e){if(e!==zc)throw new Error("invalid wNAF")}function JO(e,t,r,i){let n=t,o=e.ZERO,a=e.ZERO;for(;r>zc||i>zc;)r&rf&&(o=o.add(n)),i&rf&&(a=a.add(n)),n=n.double(),r>>=rf,i>>=rf;return{p1:o,p2:a}}function QO(e,t,r){let i=e.Fn;U$(t,e),F$(r,i);let n=t.length,o=r.length;if(n!==o)throw new Error("arrays of points and scalars must have equal length");let a=e.ZERO,s=Xu(BigInt(n)),u=1;s>12?u=s-3:s>4?u=s-2:s>0&&(u=2);let c=Uc(u),l=new Array(Number(c)+1).fill(a),m=Math.floor((i.BITS-1)/u)*u,w=a;for(let E=m;E>=0;E-=u){l.fill(a);for(let M=0;M<o;M++){let D=r[M],L=Number(D>>BigInt(E)&c);l[L]=l[L].add(t[M])}let P=a;for(let M=l.length-1,D=a;M>0;M--)D=D.add(l[M]),P=P.add(D);if(w=w.add(P),E!==0)for(let M=0;M<u;M++)w=w.double()}return w}function WO(e,t,r){if(t){if(t.ORDER!==e)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return ef(t),t}else return Fc(e,{isLE:r})}function eA(e,t,r={},i){if(i===void 0&&(i=e==="edwards"),!t||typeof t!="object")throw new Error(`expected valid ${e} CURVE object`);for(let u of["p","n","h"]){let c=t[u];if(!(typeof c=="bigint"&&c>zc))throw new Error(`CURVE.${u} must be positive bigint`)}let n=WO(t.p,r.Fp,i),o=WO(t.n,r.Fn,i),s=["Gx","Gy","a",e==="weierstrass"?"b":"d"];for(let u of s)if(!n.isValid(t[u]))throw new Error(`CURVE.${u} must be valid field element of CURVE.Fp`);return t=Object.freeze(Object.assign({},t)),{CURVE:t,Fp:n,Fn:o}}function gp(e,t){return function(i){let n=e(i);return{secretKey:n,publicKey:t(n)}}}var zc,rf,ey,XO,pp,vp=Xr(()=>{v();Ju();jc();zc=BigInt(0),rf=BigInt(1);ey=new WeakMap,XO=new WeakMap;pp=class{constructor(t,r){Z(this,"BASE");Z(this,"ZERO");Z(this,"Fn");Z(this,"bits");this.BASE=t.BASE,this.ZERO=t.ZERO,this.Fn=t.Fn,this.bits=r}_unsafeLadder(t,r,i=this.ZERO){let n=t;for(;r>zc;)r&rf&&(i=i.add(n)),n=n.double(),r>>=rf;return i}precomputeWindow(t,r){let{windows:i,windowSize:n}=Qm(r,this.bits),o=[],a=t,s=a;for(let u=0;u<i;u++){s=a,o.push(s);for(let c=1;c<n;c++)s=s.add(a),o.push(s);a=s.double()}return o}wNAF(t,r,i){if(!this.Fn.isValid(i))throw new Error("invalid scalar");let n=this.ZERO,o=this.BASE,a=Qm(t,this.bits);for(let s=0;s<a.windows;s++){let{nextN:u,offset:c,isZero:l,isNeg:m,isNegF:w,offsetF:E}=GO(i,s,a);i=u,l?o=o.add(f0(w,r[E])):n=n.add(f0(m,r[c]))}return ZO(i),{p:n,f:o}}wNAFUnsafe(t,r,i,n=this.ZERO){let o=Qm(t,this.bits);for(let a=0;a<o.windows&&i!==zc;a++){let{nextN:s,offset:u,isZero:c,isNeg:l}=GO(i,a,o);if(i=s,!c){let m=r[u];n=n.add(l?m.negate():m)}}return ZO(i),n}getPrecomputes(t,r,i){let n=ey.get(r);return n||(n=this.precomputeWindow(r,t),t!==1&&(typeof i=="function"&&(n=i(n)),ey.set(r,n))),n}cached(t,r,i){let n=ty(t);return this.wNAF(n,this.getPrecomputes(n,t,i),r)}unsafe(t,r,i,n){let o=ty(t);return o===1?this._unsafeLadder(t,r,n):this.wNAFUnsafe(o,this.getPrecomputes(o,t,i),r,n)}createCache(t,r){$O(r,this.bits),XO.set(t,r),ey.delete(t)}hasCache(t){return ty(t)!==1}}});function tA(e){if(!Number.isSafeInteger(e)||e<0||e>4294967295)throw new Error("wrong u32 integer:"+e);return e}function H$(e){if(tA(e),e<=1)return 1;if(e>2147483648)throw new Error("nextPowerOfTwo overflow: result does not fit u32");return 1<<iy(e-1)+1>>>0}function iy(e){return tA(e),31-Math.clz32(e)}function rA(e,t,r,i,n){let o=e,a=r||((l,m)=>new Array(l).fill(m??o.ZERO)),s=l=>{if(Array.isArray(l))return!0;if(!ArrayBuffer.isView(l))return!1;let m=l;return typeof m.length=="number"&&typeof m.slice=="function"&&typeof m[Symbol.iterator]=="function"},u=(...l)=>{if(!l.length)return 0;for(let w of l)if(!s(w))throw new Error("poly: not polynomial: "+w);let m=l[0].length;for(let w=1;w<l.length;w++)if(l[w].length!==m)throw new Error(`poly: mismatched lengths ${m} vs ${l[w].length}`);if(n!==void 0&&m!==n)throw new Error(`poly: expected fixed length ${n}, got ${m}`);return m};function c(l,m,w=!1){let E=iy(m),P=w?t.brp(E):t.roots(E);for(let M=0;M<m;M++)if(o.eql(l,P[M]))return M;return-1}return{roots:t,create:a,length:n,extend:(l,m)=>{u(l);let w=a(m,o.ZERO);for(let E=0;E<Math.min(l.length,m);E++)w[E]=l[E];return w},degree:l=>{u(l);for(let m=l.length-1;m>=0;m--)if(!o.is0(l[m]))return m;return-1},add:(l,m)=>{let w=u(l,m),E=a(w);for(let P=0;P<w;P++)E[P]=o.add(l[P],m[P]);return E},sub:(l,m)=>{let w=u(l,m),E=a(w);for(let P=0;P<w;P++)E[P]=o.sub(l[P],m[P]);return E},dot:(l,m)=>{let w=u(l,m),E=a(w);for(let P=0;P<w;P++)E[P]=o.mul(l[P],m[P]);return E},mul:(l,m)=>{if(s(m)){let w=u(l,m);if(i){let E=i.direct(l,!1,!0),P=i.direct(m,!1,!0);for(let M=0;M<E.length;M++)E[M]=o.mul(E[M],P[M]);return i.inverse(E,!0,!1)}else{let E=a(w);for(let P=0;P<w;P++)for(let M=0;M<w;M++){let D=(P+M)%w;E[D]=o.add(E[D],o.mul(l[P],m[M]))}return E}}else{let w=a(u(l));for(let E=0;E<w.length;E++)w[E]=o.mul(l[E],m);return w}},convolve(l,m){let w=H$(l.length+m.length-1);return this.mul(this.extend(l,w),this.extend(m,w))},shift(l,m){let w=a(u(l));w[0]=l[0];for(let E=1,P=o.ONE;E<l.length;E++)P=o.mul(P,m),w[E]=o.mul(l[E],P);return w},clone:l=>{u(l);let m=a(l.length);for(let w=0;w<l.length;w++)m[w]=l[w];return m},eval:(l,m)=>{u(l,m);let w=o.ZERO;for(let E=0;E<l.length;E++)w=o.add(w,o.mul(l[E],m[E]));return w},monomial:{basis:(l,m)=>{let w=a(m),E=o.ONE;for(let P=0;P<m;P++)w[P]=E,E=o.mul(E,l);return w},eval:(l,m)=>{u(l);let w=o.ZERO;for(let E=l.length-1;E>=0;E--)w=o.add(o.mul(w,m),l[E]);return w}},lagrange:{basis:(l,m,w=!1,E)=>{let P=iy(m),M=E||(w?t.brp(P):t.roots(P)),D=a(m),L=c(l,m,w);if(L!==-1)return D[L]=o.ONE,D;let U=o.pow(l,BigInt(m)),K=o.mul(o.sub(U,o.ONE),o.inv(BigInt(m))),C=a(m);for(let F=0;F<m;F++)C[F]=o.sub(l,M[F]);let N=o.invertBatch(C);for(let F=0;F<m;F++)D[F]=o.mul(K,o.mul(M[F],N[F]));return D},eval(l,m,w=!1){u(l);let E=c(m,l.length,w);if(E!==-1)return l[E];let P=this.basis(m,l.length,w),M=o.ZERO;for(let D=0;D<l.length;D++)o.is0(l[D])||(M=o.add(M,o.mul(l[D],P[D])));return M}},vanishing(l){u(l);let m=a(l.length+1,o.ZERO);m[0]=o.ONE;for(let w of l){let E=o.neg(w);for(let P=m.length-1;P>0;P--)m[P]=o.add(o.mul(m[P],E),m[P-1]);m[0]=o.mul(m[0],E)}return m}}}var iA=Xr(()=>{v()});function nf(e,t){if(dn(e),dn(t),t<0||t>4)throw new Error("invalid I2OSP length: "+t);if(e<0||e>2**(8*t)-1)throw new Error("invalid I2OSP input: "+e);let r=Array.from({length:t}).fill(0);for(let i=t-1;i>=0;i--)r[i]=e&255,e>>>=8;return new Uint8Array(r)}function z$(e,t){let r=new Uint8Array(e.length);for(let i=0;i<e.length;i++)r[i]=e[i]^t[i];return r}function nA(e){if(!Yu(e)&&typeof e!="string")throw new Error("DST must be Uint8Array or ascii string");let t=typeof e=="string"?qc(e):e;if(t.length===0)throw new Error("DST must be non-empty");return t}function K$(e,t,r,i){qt(e),dn(r),t=nA(t),t.length>255&&(t=i(kt(qc("H2C-OVERSIZE-DST-"),t)));let{outputLen:n,blockLen:o}=i,a=Math.ceil(r/n);if(r>65535||a>255)throw new Error("expand_message_xmd: invalid lenInBytes");let s=kt(t,nf(t.length,1)),u=new Uint8Array(o),c=nf(r,2),l=new Array(a),m=i(kt(u,e,c,nf(0,1),s));l[0]=i(kt(m,nf(1,1),s));for(let E=1;E<a;E++){let P=[z$(m,l[E-1]),nf(E+1,1),s];l[E]=i(kt(...P))}return kt(...l).slice(0,r)}function V$(e,t,r,i,n){if(qt(e),dn(r),t=nA(t),t.length>255){let o=Math.ceil(2*i/8);t=n.create({dkLen:o}).update(qc("H2C-OVERSIZE-DST-")).update(t).digest()}if(r>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return n.create({dkLen:r}).update(e).update(nf(r,2)).update(t).update(nf(t.length,1)).digest()}function ny(e,t,r){pn(r,{p:"bigint",m:"number",k:"number",hash:"function"});let{p:i,k:n,m:o,hash:a,expand:s,DST:u}=r;if(dn(a.outputLen,"valid hash"),qt(e),dn(t),t<1)throw new Error("hash_to_field: expected count >= 1");if(o<1)throw new Error("hash_to_field: expected m >= 1");let c=i.toString(2).length,l=Math.ceil((c+n)/8),m=t*o*l,w;if(s==="xmd")w=K$(e,u,m,a);else if(s==="xof")w=V$(e,u,m,n,a);else if(s==="_internal_pass")w=e;else throw new Error('expand must be "xmd" or "xof"');let E=new Array(t);for(let P=0;P<t;P++){let M=new Array(o);for(let D=0;D<o;D++){let L=l*(D+P*o),U=w.subarray(L,L+l);M[D]=Ui(j$(U),i)}E[P]=M}return E}function oA(e,t){let r=t.map(i=>Array.from(i).reverse());return(i,n)=>{let[o,a,s,u]=r.map(m=>m.reduce((w,E)=>e.add(e.mul(w,i),E))),[c,l]=tf(e,[a,u],!0);return i=e.mul(o,c),n=e.mul(n,e.mul(s,l)),{x:i,y:n}}}function aA(e,t,r){if(typeof t!="function")throw new Error("mapToCurve() must be defined");let i=s=>Object.freeze({...s,DST:Yu(s.DST)?hp(s.DST):s.DST,...s.encodeDST===void 0?{}:{encodeDST:Yu(s.encodeDST)?hp(s.encodeDST):s.encodeDST}}),n=i(r);function o(s){return e.fromAffine(t(s))}function a(s){let u=s.clearCofactor();return u.equals(e.ZERO)?e.ZERO:(u.assertValidity(),u)}return Object.freeze({get defaults(){return i(n)},Point:e,hashToCurve(s,u){let c=Object.assign({},n,u),l=ny(s,2,c),m=o(l[0]),w=o(l[1]);return a(m.add(w))},encodeToCurve(s,u){let c=n.encodeDST?{DST:n.encodeDST}:{},l=Object.assign({},n,c,u),m=ny(s,1,l),w=o(m[0]);return a(w)},mapToCurve(s){if(n.m===1){if(typeof s!="bigint")throw new Error("expected bigint (m=1)");return a(o([s]))}if(!Array.isArray(s))throw new Error("expected array of bigints");for(let u of s)if(typeof u!="bigint")throw new Error("expected array of bigints");return a(o(s))},hashToScalar(s,u){let c=e.Fn.ORDER,l=Object.assign({},n,{p:c,m:1,DST:G$},u);return ny(s,1,l)[0][0]}})}var j$,G$,sA=Xr(()=>{v();Ju();jc();j$=bi;G$="HashToScalar-"});function oy(e){pn(e,{name:"string",hash:"function"},{hashToScalar:"function",validatePoint:"function",parsePublicKey:"function",adjustScalar:"function",adjustPoint:"function",challenge:"function",adjustNonces:"function",adjustSecret:"function",adjustPublic:"function",adjustGroupCommitmentShare:"function",adjustDKG:"function"}),YO(e.Point);let{Point:t}=e,r=e.Fn===void 0?t.Fn:e.Fn,i=e.hash,n=e.hashToScalar===void 0?(q,W={DST:new Uint8Array})=>{let $=i(kt(W.DST,q));return r.create(r.isLE?Lc($):bi($))}:e.hashToScalar,o=Ia(e.H1!==void 0?e.H1:e.name+"rho"),a=Ia(e.H2!==void 0?e.H2:e.name+"chal"),s=Ia(e.H3!==void 0?e.H3:e.name+"nonce"),u=Ia(e.H4!==void 0?e.H4:e.name+"msg"),c=Ia(e.H5!==void 0?e.H5:e.name+"com"),l=Ia(e.HDKG!==void 0?e.HDKG:e.name+"dkg"),m=Ia(e.HID!==void 0?e.HID:e.name+"id"),w=q=>n(q,{DST:o}),E=q=>n(q,{DST:a}),P=q=>n(q,{DST:s}),M=q=>i(kt(u,q)),D=q=>i(kt(c,q)),L=q=>n(q,{DST:l}),U=q=>n(q,{DST:m}),K=(q=ki)=>{let W=Hc(q(u0(r.ORDER)),r.ORDER,r.isLE);return r.isLE?Lc(W):bi(W)},C=q=>q.toBytes(),N=q=>{let W=t.fromBytes(q);return e.validatePoint&&e.validatePoint(W),W},F=(q,W)=>({identifier:q,hiding:C(t.BASE.multiply(r.fromBytes(W.hiding))),binding:C(t.BASE.multiply(r.fromBytes(W.binding)))}),H=e.adjustPoint===void 0?q=>q:e.adjustPoint,z=q=>{if(!r.isValid(q)||r.is0(q))throw new Error("Invalid identifier "+q);return q},V=q=>Pa(r.toBytes(z(q))),B=q=>{let W=z(r.fromBytes(Dc(q)));if(V(W)!==q)throw new Error("expected canonical identifier hex");return W},g={encode:(q,W)=>{let $=kt(C(q),r.toBytes(W));return e.adjustTx&&($=e.adjustTx.encode($)),$},decode:q=>{e.adjustTx&&(q=e.adjustTx.decode(q));let W=N(q.subarray(0,-r.BYTES)),$=r.fromBytes(q.subarray(-r.BYTES));return{R:W,z:$}}},I=(q=ki)=>{let W=K(q);e.adjustScalar&&(W=e.adjustScalar(W));let $=t.BASE.multiply(W);return{scalar:W,point:$}},y="roots are unavailable in FROST polynomial mode",f={info:{G:r.ZERO,oddFactor:r.ZERO,powerOfTwo:0},roots(){throw new Error(y)},brp(){throw new Error(y)},inverse(){throw new Error(y)},omega(){throw new Error(y)},clear(){}},p=rA(r,f),_=(q,W)=>QO(t,q,W),x=(q,W)=>{if(!W.length)throw new Error("empty coefficients");return p.monomial.eval(W,q)},b=(q,W)=>{let $="invalid parameters";if(!q.some(le=>r.eql(le,W)))throw new Error($);let ee=new Set(q);if(ee.size!==q.length)throw new Error($);if(!ee.has(W))throw new Error($);let se=r.ONE,ue=r.ONE;for(let le of q)r.eql(le,W)||(se=r.mul(se,le),ue=r.mul(ue,r.sub(le,W)));return r.div(se,ue)},d=(q,W)=>{let $=p.monomial.basis(q,W.length);return _(W,$)},O=(q,W,$,ee=ki)=>{mp(q);let se=W===void 0?K(ee):r.fromBytes(W);if(!$){$=[];for(let Pe=0;Pe<q.min-1;Pe++)$.push(K(ee))}if($.length!==q.min-1)throw new Error("wrong coefficients length");let ue=[se,...$],le=ue.map(Pe=>t.BASE.multiply(Pe));return{coefficients:ue,commitment:le,secret:se}},T={challenge:(q,W,$)=>L(kt(r.toBytes(q),C(W),C($))),compute(q,W,$,ee=ki){if(W.length<1)throw new Error("coefficients should have at least one element");let{point:se,scalar:ue}=I(ee),le=$[0],Pe=this.challenge(q,le,se),ge=r.add(ue,r.mul(W[0],Pe));return g.encode(se,ge)},validate(q,W,$){if(W.length<1)throw new Error("commitment should have at least one element");let{R:ee,z:se}=g.decode($),ue=N(W[0]),le=this.challenge(q,ue,ee);if(!ee.equals(t.BASE.multiply(se).subtract(ue.multiply(le))))throw new Error("invalid proof of knowledge")}},S={challenge:(q,W,$)=>e.challenge?e.challenge(q,W,$):E(kt(C(q),C(W),$)),sign(q,W,$=ki){let{point:ee,scalar:se}=I($),ue=t.BASE.multiply(W),le=this.challenge(ee,ue,q),Pe=r.add(se,r.mul(le,W));return[ee,Pe]},verify(q,W,$,ee){e.adjustPoint&&(ee=e.adjustPoint(ee)),e.adjustPoint&&(W=e.adjustPoint(W));let se=this.challenge(W,ee,q),ue=t.BASE.multiply($),le=ee.multiply(se),Pe=ue.subtract(le).subtract(W);return Pe.clearCofactor&&(Pe=Pe.clearCofactor()),t.ZERO.equals(Pe)}},R=(q,W,$)=>{if(!t.BASE.multiply($).equals(d(q,W)))throw new Error("invalid secret share")},Y={fromNumber(q){if(!Number.isSafeInteger(q))throw new Error("expected safe interger");return V(BigInt(q))},derive(q){if(typeof q!="string")throw new Error("wrong identifier string: "+q);return V(U(Ia(q)))}},X=(q,W=ki)=>P(kt(W(32),r.toBytes(q))),ne=(q,W,$)=>{let ee=W.map(ye=>[ye.identifier,B(ye.identifier),N(ye.hiding),N(ye.binding)]);ee.sort((ye,Be)=>ye[1]<Be[1]?-1:ye[1]>Be[1]?1:0);let se=[];for(let[ye,Be,be,_e]of ee)se.push(r.toBytes(Be),C(be),C(_e));let ue=D(kt(...se)),le=kt(C(q),M($),ue),Pe={};for(let[ye,Be]of ee)Pe[ye]=w(kt(le,r.toBytes(Be)));let ge=[],ve=[];for(let[ye,Be,be,_e]of ee){if(t.ZERO.equals(be)||t.ZERO.equals(_e))throw new Error("infinity commitment");ge.push(be,_e),ve.push(r.ONE,Pe[ye])}let sr=_(ge,ve);return{identifiers:ee.map(ye=>ye[1]),groupCommitment:sr,bindingFactors:Pe}},ce=(q,W,$,ee)=>{let se=H(N(q)),ue=B(ee),{identifiers:le,groupCommitment:Pe,bindingFactors:ge}=ne(se,W,$),ve=ge[ee],sr=b(le,ue),xe=S.challenge(Pe,se,$);return{lambda:sr,challenge:xe,bindingFactor:ve,groupCommitment:Pe}};Object.freeze(Y);let pe={Identifier:Y,DKG:Object.freeze({round1:(q,W,$,ee=ki)=>{mp(W);let se=B(q),{coefficients:ue,commitment:le}=O(W,$,void 0,ee),Pe=T.compute(se,ue,le,ee),ge=le.map(C),ve={identifier:V(se),commitment:ge,proofOfKnowledge:Pe},sr={identifier:se,coefficients:ue,commitment:le.map(C),signers:{min:W.min,max:W.max},step:1};return{public:ve,secret:sr}},round2:(q,W)=>{if(W.length!==q.signers.max-1)throw new Error("wrong number of round1 packages");if(!q.coefficients||q.step===3)throw new Error("round3 package used in round2");let $={};for(let ee of W){if(ee.commitment.length!==q.signers.min)throw new Error("wrong number of commitments");let se=B(ee.identifier);if(se===q.identifier)throw new Error("duplicate id="+V(se));T.validate(se,ee.commitment,ee.proofOfKnowledge);for(let le of ee.commitment)N(le);if($[ee.identifier])throw new Error("Duplicate id="+se);let ue=r.toBytes(x(se,q.coefficients));$[ee.identifier]={identifier:V(q.identifier),signingShare:ue}}return q.step=2,$},round3:(q,W,$)=>{if(W.length!==q.signers.max-1)throw new Error("wrong length of round1 packages");if(!q.coefficients||q.step!==2)throw new Error("round2 package used in round3");if($.length!==W.length)throw new Error("wrong length of round2 packages");let ee={};for(let Be of W){if(!Be.identifier||!Be.commitment)throw new Error("wrong round1 share");ee[Be.identifier]={...Be}}for(let Be of $){if(!Be.identifier||!Be.signingShare)throw new Error("wrong round2 share");if(!ee[Be.identifier])throw new Error("round1 share for "+Be.identifier+" is missing");ee[Be.identifier].signingShare=Be.signingShare}if(Object.keys(ee).length!==W.length)throw new Error("mismatch identifiers between rounds");let se=r.ZERO;if(q.commitment.length!==q.signers.min)throw new Error("wrong commitments length");let ue=q.commitment.map(N),le=x(q.identifier,q.coefficients);R(q.identifier,ue,le);let Pe=ue.map(C),ge={[V(q.identifier)]:Pe};for(let Be in ee){let be=ee[Be];if(!be.signingShare||!be.commitment)throw new Error("mismatch identifiers");let _e=B(Be),Qi=r.fromBytes(be.signingShare),Ce=be.commitment.map(N);R(q.identifier,Ce,Qi),se=r.add(se,Qi);let Re=V(_e);if(ge[Re])throw new Error("duplicated id="+Re);ge[Re]=be.commitment}se=r.add(se,le);let ve=new Array(q.signers.min).fill(t.ZERO);for(let Be in ge){let be=ge[Be];if(be.length!==q.signers.min)throw new Error("wrong commitments length");for(let _e=0;_e<be.length;_e++)ve[_e]=ve[_e].add(N(be[_e]))}let sr=ve.map(C),xe={};for(let Be in ge)xe[Be]=C(d(B(Be),ve));let ye={public:{signers:{min:q.signers.min,max:q.signers.max},commitments:sr,verifyingShares:Object.fromEntries(Object.entries(xe).map(([Be,be])=>[Be,be.slice()]))},secret:{identifier:V(q.identifier),signingShare:r.toBytes(se)}};e.adjustDKG&&(ye=e.adjustDKG(ye));for(let Be=0;Be<q.coefficients.length;Be++)q.coefficients[Be]-=q.coefficients[Be];return delete q.coefficients,q.step=3,ye},clean(q){if(q.identifier-=q.identifier,q.coefficients)for(let W=0;W<q.coefficients.length;W++)q.coefficients[W]-=q.coefficients[W];q.step=3}}),trustedDealer(q,W,$,ee=ki){if(mp(q),W===void 0){W=[];for(let ve=1;ve<=q.max;ve++)W.push(Y.fromNumber(ve))}else if(!Array.isArray(W)||W.length!==q.max)throw new Error("identifiers should be array of "+q.max);let se={};for(let ve of W){let sr=B(ve);if(ve in se)throw new Error("duplicated id="+ve);se[ve]=sr}let ue=O(q,$,void 0,ee),le=ue.commitment.map(C),Pe={},ge={};for(let ve of W){let sr=x(se[ve],ue.coefficients);ge[ve]=C(t.BASE.multiply(sr)),Pe[ve]={identifier:ve,signingShare:r.toBytes(sr)}}return{public:{signers:{min:q.min,max:q.max},commitments:le,verifyingShares:ge},secretShares:Pe}},validateSecret(q,W){let $=B(q.identifier),ee=W.commitments.map(N),se=r.fromBytes(q.signingShare);R($,ee,se)},commit(q,W=ki){let $=r.fromBytes(q.signingShare),ee=X($,W),se=X($,W),ue={hiding:r.toBytes(ee),binding:r.toBytes(se)};return{nonces:ue,commitments:F(q.identifier,ue)}},signShare(q,W,$,ee,se){uA(W.signers,ee.length);let ue=r.fromBytes($.hiding),le=r.fromBytes($.binding);if(r.is0(ue)||r.is0(le))throw new Error("signing nonces already used");let Pe={identifier:q.identifier,hiding:C(t.BASE.multiply(ue)),binding:C(t.BASE.multiply(le))},ge=ee.find(De=>De.identifier===q.identifier);if(!ge)throw new Error("missing signer commitment");if(Pa(ge.hiding)!==Pa(Pe.hiding)||Pa(ge.binding)!==Pa(Pe.binding))throw new Error("incorrect signer commitment");e.adjustSecret&&(q=e.adjustSecret(q,W)),e.adjustPublic&&(W=e.adjustPublic(W));let ve=r.fromBytes(q.signingShare),{lambda:sr,challenge:xe,bindingFactor:ye,groupCommitment:Be}=ce(W.commitments[0],ee,se,q.identifier),be=e.adjustNonces?e.adjustNonces(Be,$):$,_e=e.adjustNonces?r.fromBytes(be.hiding):ue,Qi=e.adjustNonces?r.fromBytes(be.binding):le,Ce=r.mul(r.mul(sr,ve),xe),Re=r.mul(Qi,ye),Js=r.toBytes(r.add(r.add(_e,Re),Ce));return $.hiding.fill(0),$.binding.fill(0),Js},verifyShare(q,W,$,ee,se){e.adjustPublic&&(q=e.adjustPublic(q));let ue=W.find(Qi=>Qi.identifier===ee);if(!ue)throw new Error("cannot find identifier commitment");let le=N(q.verifyingShares[ee]),Pe=N(ue.hiding),ge=N(ue.binding),{lambda:ve,challenge:sr,bindingFactor:xe,groupCommitment:ye}=ce(q.commitments[0],W,$,ee),Be=Pe.add(ge.multiply(xe));e.adjustGroupCommitmentShare&&(Be=e.adjustGroupCommitmentShare(ye,Be));let be=t.BASE.multiply(r.fromBytes(se)),_e=Be.add(le.multiply(r.mul(sr,ve)));return be.equals(_e)},aggregate(q,W,$,ee){e.adjustPublic&&(q=e.adjustPublic(q));try{uA(q.signers,W.length)}catch{throw new Kc("aggregation failed",[])}let se=W.map(ge=>ge.identifier);if(se.length!==Object.keys(ee).length)throw new Kc("aggregation failed",[]);for(let ge of se)if(!(ge in ee)||!(ge in q.verifyingShares))throw new Kc("aggregation failed",[]);let ue=N(q.commitments[0]),{groupCommitment:le}=ne(ue,W,$),Pe=r.ZERO;for(let ge of se)Pe=r.add(Pe,r.fromBytes(ee[ge]));if(!S.verify($,le,Pe,ue)){let ge=[];for(let ve of se)this.verifyShare(q,W,$,ve,ee[ve])||ge.push(ve);throw new Kc("aggregation failed",ge)}return g.encode(le,Pe)},sign(q,W){let $=r.fromBytes(W);e.adjustScalar&&($=e.adjustScalar($));let[ee,se]=S.sign(q,$);return g.encode(ee,se)},verify(q,W,$){let ee=e.parsePublicKey?e.parsePublicKey($):N($),{R:se,z:ue}=g.decode(q);return S.verify(W,se,ue,ee)},combineSecret(q,W){if(mp(W),!Array.isArray(q)||q.length<W.min)throw new Error("wrong secret shares array");let $=[],ee={};for(let le of q){let Pe=B(le.identifier),ge=V(Pe);if(ee[ge])throw new Error("duplicated id="+ge);ee[ge]=!0,$.push([Pe,r.fromBytes(le.signingShare)])}let se=$.map(([le])=>le),ue=r.ZERO;for(let[le,Pe]of $)ue=r.add(ue,r.mul(Pe,b(se,le)));return r.toBytes(ue)},utils:Object.freeze({Fn:r,randomScalar:(q=ki)=>r.toBytes(I(q).scalar),generateSecretPolynomial:(q,W,$,ee)=>{let se=O(q,W,$,ee);return{...se,commitment:se.commitment.map(C)}}})};return Object.freeze(pe)}var mp,uA,Kc,fA=Xr(()=>{v();gs();Ju();vp();iA();jc();mp=e=>{if(!Number.isSafeInteger(e.min)||!Number.isSafeInteger(e.max))throw new Error("Wrong signers info: min="+e.min+" max="+e.max);if(e.min<2||e.max<2||e.min>e.max)throw new Error("Wrong signers info: min="+e.min+" max="+e.max)},uA=(e,t)=>{if(t<e.min||t>e.max)throw new Error("Wrong number of commitments="+t)},Kc=class extends Error{constructor(r,i){super(r);Z(this,"cheaters");this.cheaters=i}}});var sy={};X1(sy,{_HMAC:()=>c0,hmac:()=>ay});var c0,ay,yp=Xr(()=>{v();gs();c0=class{constructor(t,r){Z(this,"oHash");Z(this,"iHash");Z(this,"blockLen");Z(this,"outputLen");Z(this,"canXOF",!1);Z(this,"finished",!1);Z(this,"destroyed",!1);if(Y2(t),Io(r,void 0,"key"),this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let i=this.blockLen,n=new Uint8Array(i);n.set(r.length>i?t.create().update(r).digest():r);for(let o=0;o<n.length;o++)n[o]^=54;this.iHash.update(n),this.oHash=t.create();for(let o=0;o<n.length;o++)n[o]^=106;this.oHash.update(n),Ea(n)}update(t){return Cc(this),this.iHash.update(t),this}digestInto(t){Cc(this),$2(t,this),this.finished=!0;let r=t.subarray(0,this.outputLen);this.iHash.digestInto(r),this.oHash.update(r),this.oHash.digestInto(r),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:r,iHash:i,finished:n,destroyed:o,blockLen:a,outputLen:s}=this;return t=t,t.finished=n,t.destroyed=o,t.blockLen=a,t.outputLen=s,t.oHash=r._cloneInto(t.oHash),t.iHash=i._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}},ay=(()=>{let e=((t,r,i)=>new c0(t,r).update(i).digest());return e.create=(t,r)=>new c0(t,r),e})()});function Z$(e,t,r){Ym("scalar",e,gn,r);let[[i,n],[o,a]]=t,s=cA(a*e,r),u=cA(-n*e,r),c=e-s*i-u*o,l=-s*n-u*a,m=c<gn,w=l<gn;m&&(c=-c),w&&(l=-l);let E=Uc(Math.ceil(Xu(r)/2))+Kr;if(c<gn||c>=E||l<gn||l>=E)throw new Error("splitScalar (endomorphism): failed for k");return{k1neg:m,k1:c,k2neg:w,k2:l}}function fy(e){if(!["compact","recovered","der"].includes(e))throw new Error('Signature format must be "compact", "recovered", or "der"');return e}function uy(e,t){pn(e);let r={};for(let i of Object.keys(t))r[i]=e[i]===void 0?t[i]:e[i];return $u(r.lowS,"lowS"),$u(r.prehash,"prehash"),r.format!==void 0&&fy(r.format),r}function lA(e,t={}){let r=eA("weierstrass",e,t),i=r.Fp,n=r.Fn,o=r.CURVE,{h:a,n:s}=o;pn(t,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object"});let{endo:u,allowInfinityPoint:c}=t;if(u&&(!i.is0(o.a)||typeof u.beta!="bigint"||!Array.isArray(u.basises)))throw new Error('invalid endo: expected "beta": bigint and "basises": array');let l=pA(i,n);function m(){if(!i.isOdd)throw new Error("compression is not supported: Field does not have .isOdd()")}function w(I,y,f){if(c&&y.is0())return Uint8Array.of(0);let{x:p,y:_}=y.toAffine(),x=i.toBytes(p);if($u(f,"isCompressed"),f){m();let b=!i.isOdd(_);return kt(hA(b),x)}else return kt(Uint8Array.of(4),x,i.toBytes(_))}function E(I){qt(I,void 0,"Point");let{publicKey:y,publicKeyUncompressed:f}=l,p=I.length,_=I[0],x=I.subarray(1);if(c&&p===1&&_===0)return{x:i.ZERO,y:i.ZERO};if(p===y&&(_===2||_===3)){let b=i.fromBytes(x);if(!i.isValid(b))throw new Error("bad point: is not on curve, wrong x");let d=D(b),O;try{O=i.sqrt(d)}catch(R){let Y=R instanceof Error?": "+R.message:"";throw new Error("bad point: is not on curve, sqrt error"+Y)}m();let T=i.isOdd(O);return(_&1)===1!==T&&(O=i.neg(O)),{x:b,y:O}}else if(p===f&&_===4){let b=i.BYTES,d=i.fromBytes(x.subarray(0,b)),O=i.fromBytes(x.subarray(b,b*2));if(!L(d,O))throw new Error("bad point: is not on curve");return{x:d,y:O}}else throw new Error(`bad point: got length ${p}, expected compressed=${y} or uncompressed=${f}`)}let P=t.toBytes===void 0?w:t.toBytes,M=t.fromBytes===void 0?E:t.fromBytes;function D(I){let y=i.sqr(I),f=i.mul(y,I);return i.add(i.add(f,i.mul(I,o.a)),o.b)}function L(I,y){let f=i.sqr(y),p=D(I);return i.eql(f,p)}if(!L(o.Gx,o.Gy))throw new Error("bad curve params: generator point");let U=i.mul(i.pow(o.a,Vc),ly),K=i.mul(i.sqr(o.b),BigInt(27));if(i.is0(i.add(U,K)))throw new Error("bad curve params: a or b");function C(I,y,f=!1){if(!i.isValid(y)||f&&i.is0(y))throw new Error(`bad point coordinate ${I}`);return y}function N(I){if(!(I instanceof z))throw new Error("Weierstrass Point expected")}function F(I){if(!u||!u.basises)throw new Error("no endo");return Z$(I,u.basises,n.ORDER)}function H(I,y,f,p,_){return f=new z(i.mul(f.X,I),f.Y,f.Z),y=f0(p,y),f=f0(_,f),y.add(f)}let g=class g{constructor(y,f,p){Z(this,"X");Z(this,"Y");Z(this,"Z");this.X=C("x",y),this.Y=C("y",f,!0),this.Z=C("z",p),Object.freeze(this)}static CURVE(){return o}static fromAffine(y){let{x:f,y:p}=y||{};if(!y||!i.isValid(f)||!i.isValid(p))throw new Error("invalid affine point");if(y instanceof g)throw new Error("projective point not allowed");return i.is0(f)&&i.is0(p)?g.ZERO:new g(f,p,i.ONE)}static fromBytes(y){let f=g.fromAffine(M(qt(y,void 0,"point")));return f.assertValidity(),f}static fromHex(y){return g.fromBytes(Dc(y))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(y=8,f=!0){return B.createCache(this,y),f||this.multiply(Vc),this}assertValidity(){let y=this;if(y.is0()){if(t.allowInfinityPoint&&i.is0(y.X)&&i.eql(y.Y,i.ONE)&&i.is0(y.Z))return;throw new Error("bad point: ZERO")}let{x:f,y:p}=y.toAffine();if(!i.isValid(f)||!i.isValid(p))throw new Error("bad point: x or y not field elements");if(!L(f,p))throw new Error("bad point: equation left != right");if(!y.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){let{y}=this.toAffine();if(!i.isOdd)throw new Error("Field doesn't support isOdd");return!i.isOdd(y)}equals(y){N(y);let{X:f,Y:p,Z:_}=this,{X:x,Y:b,Z:d}=y,O=i.eql(i.mul(f,d),i.mul(x,_)),T=i.eql(i.mul(p,d),i.mul(b,_));return O&&T}negate(){return new g(this.X,i.neg(this.Y),this.Z)}double(){let{a:y,b:f}=o,p=i.mul(f,Vc),{X:_,Y:x,Z:b}=this,d=i.ZERO,O=i.ZERO,T=i.ZERO,S=i.mul(_,_),R=i.mul(x,x),Y=i.mul(b,b),X=i.mul(_,x);return X=i.add(X,X),T=i.mul(_,b),T=i.add(T,T),d=i.mul(y,T),O=i.mul(p,Y),O=i.add(d,O),d=i.sub(R,O),O=i.add(R,O),O=i.mul(d,O),d=i.mul(X,d),T=i.mul(p,T),Y=i.mul(y,Y),X=i.sub(S,Y),X=i.mul(y,X),X=i.add(X,T),T=i.add(S,S),S=i.add(T,S),S=i.add(S,Y),S=i.mul(S,X),O=i.add(O,S),Y=i.mul(x,b),Y=i.add(Y,Y),S=i.mul(Y,X),d=i.sub(d,S),T=i.mul(Y,R),T=i.add(T,T),T=i.add(T,T),new g(d,O,T)}add(y){N(y);let{X:f,Y:p,Z:_}=this,{X:x,Y:b,Z:d}=y,O=i.ZERO,T=i.ZERO,S=i.ZERO,R=o.a,Y=i.mul(o.b,Vc),X=i.mul(f,x),ne=i.mul(p,b),ce=i.mul(_,d),pe=i.add(f,p),q=i.add(x,b);pe=i.mul(pe,q),q=i.add(X,ne),pe=i.sub(pe,q),q=i.add(f,_);let W=i.add(x,d);return q=i.mul(q,W),W=i.add(X,ce),q=i.sub(q,W),W=i.add(p,_),O=i.add(b,d),W=i.mul(W,O),O=i.add(ne,ce),W=i.sub(W,O),S=i.mul(R,q),O=i.mul(Y,ce),S=i.add(O,S),O=i.sub(ne,S),S=i.add(ne,S),T=i.mul(O,S),ne=i.add(X,X),ne=i.add(ne,X),ce=i.mul(R,ce),q=i.mul(Y,q),ne=i.add(ne,ce),ce=i.sub(X,ce),ce=i.mul(R,ce),q=i.add(q,ce),X=i.mul(ne,q),T=i.add(T,X),X=i.mul(W,q),O=i.mul(pe,O),O=i.sub(O,X),X=i.mul(pe,ne),S=i.mul(W,S),S=i.add(S,X),new g(O,T,S)}subtract(y){return N(y),this.add(y.negate())}is0(){return this.equals(g.ZERO)}multiply(y){let{endo:f}=t;if(!n.isValidNot0(y))throw new RangeError("invalid scalar: out of range");let p,_,x=b=>B.cached(this,b,d=>ry(g,d));if(f){let{k1neg:b,k1:d,k2neg:O,k2:T}=F(y),{p:S,f:R}=x(d),{p:Y,f:X}=x(T);_=R.add(X),p=H(f.beta,S,Y,b,O)}else{let{p:b,f:d}=x(y);p=b,_=d}return ry(g,[p,_])[0]}multiplyUnsafe(y){let{endo:f}=t,p=this,_=y;if(!n.isValid(_))throw new RangeError("invalid scalar: out of range");if(_===gn||p.is0())return g.ZERO;if(_===Kr)return p;if(B.hasCache(this))return this.multiply(_);if(f){let{k1neg:x,k1:b,k2neg:d,k2:O}=F(_),{p1:T,p2:S}=JO(g,p,b,O);return H(f.beta,T,S,x,d)}else return B.unsafe(p,_)}toAffine(y){let f=this,p=y,{X:_,Y:x,Z:b}=f;if(i.eql(b,i.ONE))return{x:_,y:x};let d=f.is0();p==null&&(p=d?i.ONE:i.inv(b));let O=i.mul(_,p),T=i.mul(x,p),S=i.mul(b,p);if(d)return{x:i.ZERO,y:i.ZERO};if(!i.eql(S,i.ONE))throw new Error("invZ was invalid");return{x:O,y:T}}isTorsionFree(){let{isTorsionFree:y}=t;return a===Kr?!0:y?y(g,this):B.unsafe(this,s).is0()}clearCofactor(){let{clearCofactor:y}=t;return a===Kr?this:y?y(g,this):this.multiplyUnsafe(a)}isSmallOrder(){return a===Kr?this.is0():this.clearCofactor().is0()}toBytes(y=!0){return $u(y,"isCompressed"),this.assertValidity(),P(g,this,y)}toHex(y=!0){return Pa(this.toBytes(y))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}};Z(g,"BASE",new g(o.Gx,o.Gy,i.ONE)),Z(g,"ZERO",new g(i.ZERO,i.ONE,i.ZERO)),Z(g,"Fp",i),Z(g,"Fn",n);let z=g,V=n.BITS,B=new pp(z,t.endo?Math.ceil(V/2):V);return V>=8&&z.BASE.precompute(8),Object.freeze(z.prototype),Object.freeze(z),z}function hA(e){return Uint8Array.of(e?2:3)}function W$(e,t){let r=ef(e),i=r.ORDER,n=gn;for(let M=i-Kr;M%Ao===gn;M/=Ao)n+=Kr;let o=n,a=Ao<<o-Kr-Kr,s=a*Ao,u=(i-Kr)/s,c=(u-Kr)/Ao,l=s-Kr,m=a,w=r.pow(t,u),E=r.pow(t,(u+Kr)/Ao),P=(M,D)=>{let L=w,U=r.pow(D,l),K=r.sqr(U);K=r.mul(K,D);let C=r.mul(M,K);C=r.pow(C,c),C=r.mul(C,U),U=r.mul(C,D),K=r.mul(C,M);let N=r.mul(K,U);C=r.pow(N,m);let F=r.eql(C,r.ONE);U=r.mul(K,E),C=r.mul(N,L),K=r.cmov(U,K,F),N=r.cmov(C,N,F);for(let H=o;H>Kr;H--){let z=H-Ao;z=Ao<<z-Kr;let V=r.pow(N,z),B=r.eql(V,r.ONE);U=r.mul(K,L),L=r.mul(L,L),V=r.mul(N,L),K=r.cmov(U,K,B),N=r.cmov(V,N,B)}return{isValid:!r.is0(D)&&(F||r.is0(M)),value:K}};if(r.ORDER%ly===Vc){let M=(r.ORDER-Vc)/ly,D=r.sqrt(r.neg(t));P=(L,U)=>{let K=r.sqr(U),C=r.mul(L,U);K=r.mul(K,C);let N=r.pow(K,M);N=r.mul(N,C);let F=r.mul(N,D),H=r.mul(r.sqr(N),U),z=r.eql(H,L),V=r.cmov(F,N,z);return{isValid:!r.is0(U)&&z,value:V}}}return P}function dA(e,t){let r=ef(e),{A:i,B:n,Z:o}=t;if(!r.isValidNot0(i)||!r.isValidNot0(n)||!r.isValid(o))throw new Error("mapToCurveSimpleSWU: invalid opts");if(r.eql(o,r.neg(r.ONE))||Jm(r,o))throw new Error("mapToCurveSimpleSWU: invalid opts");let a=r.mul(n,r.inv(r.mul(o,i))),s=r.add(r.add(r.mul(r.sqr(a),a),r.mul(i,a)),n);if(!Jm(r,s))throw new Error("mapToCurveSimpleSWU: invalid opts");let u=W$(r,o);if(!r.isOdd)throw new Error("Field does not have .isOdd()");return c=>{let l,m,w,E,P,M,D,L;l=r.sqr(c),l=r.mul(l,o),m=r.sqr(l),m=r.add(m,l),w=r.add(m,r.ONE),w=r.mul(w,n),E=r.cmov(o,r.neg(m),!r.eql(m,r.ZERO)),E=r.mul(E,i),m=r.sqr(w),M=r.sqr(E),P=r.mul(M,i),m=r.add(m,P),m=r.mul(m,w),M=r.mul(M,E),P=r.mul(M,n),m=r.add(m,P),D=r.mul(l,w);let{isValid:U,value:K}=u(m,M);L=r.mul(l,c),L=r.mul(L,K),D=r.cmov(D,w,U),L=r.cmov(L,K,U);let C=r.isOdd(c)===r.isOdd(L);L=r.cmov(r.neg(L),L,C);let N=tf(r,[E],!0)[0];return D=r.mul(D,N),{x:D,y:L}}}function pA(e,t){return{secretKey:t.BYTES,publicKey:1+e.BYTES,publicKeyUncompressed:1+2*e.BYTES,publicKeyHasPrefix:!0,signature:2*t.BYTES}}function Y$(e,t={}){let{Fn:r}=e,i=t.randomBytes===void 0?ki:t.randomBytes,n=Object.assign(pA(e.Fp,r),{seed:Math.max(u0(r.ORDER),16)});function o(E){try{let P=r.fromBytes(E);return r.isValidNot0(P)}catch{return!1}}function a(E,P){let{publicKey:M,publicKeyUncompressed:D}=n;try{let L=E.length;return P===!0&&L!==M||P===!1&&L!==D?!1:!!e.fromBytes(E)}catch{return!1}}function s(E){return E=E===void 0?i(n.seed):E,Hc(qt(E,n.seed,"seed"),r.ORDER)}function u(E,P=!0){return e.BASE.multiply(r.fromBytes(E)).toBytes(P)}function c(E){let{secretKey:P,publicKey:M,publicKeyUncompressed:D}=n,L=r._lengths;if(!Yu(E))return;let U=qt(E,void 0,"key").length,K=U===M||U===D,C=U===P||!!L?.includes(U);if(!(K&&C))return K}function l(E,P,M=!0){if(c(E)===!0)throw new Error("first arg must be private key");if(c(P)===!1)throw new Error("second arg must be public key");let D=r.fromBytes(E);return e.fromBytes(P).multiply(D).toBytes(M)}let m={isValidSecretKey:o,isValidPublicKey:a,randomSecretKey:s},w=gp(s,u);return Object.freeze(m),Object.freeze(n),Object.freeze({getPublicKey:u,getSharedSecret:l,keygen:w,Point:e,utils:m,lengths:n})}function gA(e,t,r={}){let i=t;Y2(i),pn(r,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"}),r=Object.assign({},r);let n=r.randomBytes===void 0?ki:r.randomBytes,o=r.hmac===void 0?(p,_)=>ay(i,p,_):r.hmac,{Fp:a,Fn:s}=e,{ORDER:u,BITS:c}=s,{keygen:l,getPublicKey:m,getSharedSecret:w,utils:E,lengths:P}=Y$(e,r),M={prehash:!0,lowS:typeof r.lowS=="boolean"?r.lowS:!0,format:"compact",extraEntropy:!1},D=u*Ao+Kr<a.ORDER;function L(p){let _=u>>Kr;return p>_}function U(p,_){if(!s.isValidNot0(_))throw new Error(`invalid signature ${p}: out of range 1..Point.Fn.ORDER`);return _}function K(){if(D)throw new Error('"recovered" sig type is not supported for cofactor >2 curves')}function C(p,_){fy(_);let x=P.signature,b=_==="compact"?x:_==="recovered"?x+1:void 0;return qt(p,b)}class N{constructor(_,x,b){Z(this,"r");Z(this,"s");Z(this,"recovery");if(this.r=U("r",_),this.s=U("s",x),b!=null){if(K(),![0,1,2,3].includes(b))throw new Error("invalid recovery id");this.recovery=b}Object.freeze(this)}static fromBytes(_,x=M.format){C(_,x);let b;if(x==="der"){let{r:S,s:R}=Hn.toSig(qt(_));return new N(S,R)}x==="recovered"&&(b=_[0],x="compact",_=_.subarray(1));let d=P.signature/2,O=_.subarray(0,d),T=_.subarray(d,d*2);return new N(s.fromBytes(O),s.fromBytes(T),b)}static fromHex(_,x){return this.fromBytes(Dc(_),x)}assertRecovery(){let{recovery:_}=this;if(_==null)throw new Error("invalid recovery id: must be present");return _}addRecoveryBit(_){return new N(this.r,this.s,_)}recoverPublicKey(_){let{r:x,s:b}=this,d=this.assertRecovery(),O=d===2||d===3?x+u:x;if(!a.isValid(O))throw new Error("invalid recovery id: sig.r+curve.n != R.x");let T=a.toBytes(O),S=e.fromBytes(kt(hA((d&1)===0),T)),R=s.inv(O),Y=H(qt(_,void 0,"msgHash")),X=s.create(-Y*R),ne=s.create(b*R),ce=e.BASE.multiplyUnsafe(X).add(S.multiplyUnsafe(ne));if(ce.is0())throw new Error("invalid recovery: point at infinify");return ce.assertValidity(),ce}hasHighS(){return L(this.s)}toBytes(_=M.format){if(fy(_),_==="der")return Dc(Hn.hexFromSig(this));let{r:x,s:b}=this,d=s.toBytes(x),O=s.toBytes(b);return _==="recovered"?(K(),kt(Uint8Array.of(this.assertRecovery()),d,O)):kt(d,O)}toHex(_){return Pa(this.toBytes(_))}}Object.freeze(N.prototype),Object.freeze(N);let F=r.bits2int===void 0?function(_){if(_.length>8192)throw new Error("input is too large");let x=bi(_),b=_.length*8-c;return b>0?x>>BigInt(b):x}:r.bits2int,H=r.bits2int_modN===void 0?function(_){return s.create(F(_))}:r.bits2int_modN,z=Uc(c);function V(p){return Ym("num < 2^"+c,p,gn,z),s.toBytes(p)}function B(p,_){return qt(p,void 0,"message"),_?qt(i(p),void 0,"prehashed message"):p}function g(p,_,x){let{lowS:b,prehash:d,extraEntropy:O}=uy(x,M);p=B(p,d);let T=H(p),S=s.fromBytes(_);if(!s.isValidNot0(S))throw new Error("invalid private key");let R=[V(S),V(T)];if(O!=null&&O!==!1){let ce=O===!0?n(P.secretKey):O;R.push(qt(ce,void 0,"extraEntropy"))}let Y=kt(...R),X=T;function ne(ce){let pe=F(ce);if(!s.isValidNot0(pe))return;let q=s.inv(pe),W=e.BASE.multiply(pe).toAffine(),$=s.create(W.x);if($===gn)return;let ee=s.create(q*s.create(X+$*S));if(ee===gn)return;let se=(W.x===$?0:2)|Number(W.y&Kr),ue=ee;return b&&L(ee)&&(ue=s.neg(ee),se^=1),new N($,ue,D?void 0:se)}return{seed:Y,k2sig:ne}}function I(p,_,x={}){let{seed:b,k2sig:d}=g(p,_,x);return NO(i.outputLen,s.BYTES,o)(b,d).toBytes(x.format)}function y(p,_,x,b={}){let{lowS:d,prehash:O,format:T}=uy(b,M);if(x=qt(x,void 0,"publicKey"),_=B(_,O),!Yu(p)){let S=p instanceof N?", use sig.toBytes()":"";throw new Error("verify expects Uint8Array signature"+S)}C(p,T);try{let S=N.fromBytes(p,T),R=e.fromBytes(x);if(d&&S.hasHighS())return!1;let{r:Y,s:X}=S,ne=H(_),ce=s.inv(X),pe=s.create(ne*ce),q=s.create(Y*ce),W=e.BASE.multiplyUnsafe(pe).add(R.multiplyUnsafe(q));return W.is0()?!1:s.create(W.x)===Y}catch{return!1}}function f(p,_,x={}){let{prehash:b}=uy(x,M);return _=B(_,b),N.fromBytes(p,"recovered").recoverPublicKey(_).toBytes()}return Object.freeze({keygen:l,getPublicKey:m,getSharedSecret:w,utils:E,lengths:P,Point:e,sign:I,verify:y,recoverPublicKey:f,Signature:N,hash:i})}var cA,cy,Hn,gn,Kr,Ao,Vc,ly,vA=Xr(()=>{v();yp();gs();Ju();vp();jc();cA=(e,t)=>(e+(e>=0?t:-t)/Ao)/t;cy=class extends Error{constructor(t=""){super(t)}},Hn={Err:cy,_tlv:{encode:(e,t)=>{let{Err:r}=Hn;if(dn(e,"tag"),e<0||e>255)throw new r("tlv.encode: wrong tag");if(typeof t!="string")throw new TypeError('"data" expected string, got type='+typeof t);if(t.length&1)throw new r("tlv.encode: unpadded data");let i=t.length/2,n=s0(i);if(n.length/2&128)throw new r("tlv.encode: long form length too big");let o=i>127?s0(n.length/2|128):"";return s0(e)+o+n+t},decode(e,t){let{Err:r}=Hn;t=qt(t,void 0,"DER data");let i=0;if(e<0||e>255)throw new r("tlv.encode: wrong tag");if(t.length<2||t[i++]!==e)throw new r("tlv.decode: wrong tlv");let n=t[i++],o=!!(n&128),a=0;if(!o)a=n;else{let u=n&127;if(!u)throw new r("tlv.decode(long): indefinite length not supported");if(u>4)throw new r("tlv.decode(long): byte length is too big");let c=t.subarray(i,i+u);if(c.length!==u)throw new r("tlv.decode: length bytes not complete");if(c[0]===0)throw new r("tlv.decode(long): zero leftmost byte");for(let l of c)a=a<<8|l;if(i+=u,a<128)throw new r("tlv.decode(long): not minimal encoding")}let s=t.subarray(i,i+a);if(s.length!==a)throw new r("tlv.decode: wrong value length");return{v:s,l:t.subarray(i+a)}}},_int:{encode(e){let{Err:t}=Hn;if(cp(e),e<gn)throw new t("integer: negative integers are not allowed");let r=s0(e);if(Number.parseInt(r[0],16)&8&&(r="00"+r),r.length&1)throw new t("unexpected DER parsing assertion: unpadded hex");return r},decode(e){let{Err:t}=Hn;if(e.length<1)throw new t("invalid signature integer: empty");if(e[0]&128)throw new t("invalid signature integer: negative");if(e.length>1&&e[0]===0&&!(e[1]&128))throw new t("invalid signature integer: unnecessary leading zero");return bi(e)}},toSig(e){let{Err:t,_int:r,_tlv:i}=Hn,n=qt(e,void 0,"signature"),{v:o,l:a}=i.decode(48,n);if(a.length)throw new t("invalid signature: left bytes after parsing");let{v:s,l:u}=i.decode(2,o),{v:c,l}=i.decode(2,u);if(l.length)throw new t("invalid signature: left bytes after parsing");return{r:r.decode(s),s:r.decode(c)}},hexFromSig(e){let{_tlv:t,_int:r}=Hn,i=t.encode(2,r.encode(e.r)),n=t.encode(2,r.encode(e.s)),o=i+n;return t.encode(48,o)}};Object.freeze(Hn._tlv);Object.freeze(Hn._int);Object.freeze(Hn);gn=BigInt(0),Kr=BigInt(1),Ao=BigInt(2),Vc=BigInt(3),ly=BigInt(4)});var h0={};X1(h0,{__TEST:()=>eX,schnorr:()=>tX,schnorr_FROST:()=>uX,secp256k1:()=>J$,secp256k1_FROST:()=>nX,secp256k1_hasher:()=>py});function X$(e){let t=bp.p,r=BigInt(3),i=BigInt(6),n=BigInt(11),o=BigInt(22),a=BigInt(23),s=BigInt(44),u=BigInt(88),c=e*e*e%t,l=c*c*e%t,m=Fi(l,r,t)*l%t,w=Fi(m,r,t)*l%t,E=Fi(w,hy,t)*c%t,P=Fi(E,n,t)*E%t,M=Fi(P,o,t)*P%t,D=Fi(M,s,t)*M%t,L=Fi(D,u,t)*D%t,U=Fi(L,s,t)*M%t,K=Fi(U,r,t)*l%t,C=Fi(K,a,t)*P%t,N=Fi(C,i,t)*c%t,F=Fi(N,hy,t);if(!Ta.eql(Ta.sqr(F),e))throw new Error("Cannot find square root");return F}function l0(e,...t){let r=mA[e];if(r===void 0){let i=bs(qc(e));r=kt(i,i),mA[e]=r}return bs(kt(r,...t))}function wA(e){let{Fn:t,BASE:r}=Ut,i=t.fromBytes(e),n=r.multiply(i);return{scalar:Po(n.y)?i:t.neg(i),bytes:of(n)}}function _p(e){let t=Ta;if(!t.isValidNot0(e))throw new Error("invalid x: Fail if x \u2265 p");let r=t.create(e*e),i=t.create(r*e+BigInt(7)),n=t.sqrt(i);Po(n)||(n=t.neg(n));let o=Ut.fromAffine({x:e,y:n});return o.assertValidity(),o}function dy(...e){return Ut.Fn.create(Gc(l0("BIP0340/challenge",...e)))}function yA(e){return wA(e).bytes}function Q$(e,t,r=i0(32)){let{Fn:i,BASE:n}=Ut,o=qt(e,void 0,"message"),{bytes:a,scalar:s}=wA(t),u=qt(r,32,"auxRand"),c=i.toBytes(s^Gc(l0("BIP0340/aux",u))),l=l0("BIP0340/nonce",c,a,o),m=i.create(Gc(l));if(m===0n)throw new Error("sign failed: k is zero");let w=n.multiply(m),E=Po(w.y)?m:i.neg(m),P=of(w),M=dy(P,a,o),D=new Uint8Array(64);if(D.set(P,0),D.set(i.toBytes(i.create(E+M*s)),32),!SA(D,o,a))throw new Error("sign: Invalid signature produced");return D}function SA(e,t,r){let{Fp:i,Fn:n,BASE:o}=Ut,a=qt(e,64,"signature"),s=qt(t,void 0,"message"),u=qt(r,32,"publicKey");try{let c=_p(Gc(u)),l=Gc(a.subarray(0,32));if(!i.isValidNot0(l))return!1;let m=Gc(a.subarray(32,64));if(!n.isValidNot0(m))return!1;let w=dy(n.toBytes(l),of(c),s),E=o.multiplyUnsafe(m).add(c.multiplyUnsafe(n.neg(w))),{x:P,y:M}=E.toAffine();return!(E.is0()||!Po(M)||P!==l)}catch{return!1}}function xA(e,t){if(t===void 0)return _A;let r=of(e),i=bi(l0("TapTweak",r,t));if(!Ut.Fn.isValid(i))throw new Error("invalid TapTweak hash");return i}function gy(e){let t=Ut.fromBytes(e.commitments[0]);return Po(t.y)?e:{signers:{min:e.signers.min,max:e.signers.max},commitments:e.commitments.map(r=>Ut.fromBytes(r).negate().toBytes()),verifyingShares:Object.fromEntries(Object.entries(e.verifyingShares).map(([r,i])=>[r,Ut.fromBytes(i).negate().toBytes()]))}}function EA(e,t){let r=Ut.fromBytes(t.commitments[0]);if(Po(r.y))return e;let i=Ut.Fn;return{...e,signingShare:i.toBytes(i.neg(i.fromBytes(e.signingShare)))}}function oX(e,t){if(Po(e.y))return t;let r=Ut.Fn;return{binding:r.toBytes(r.neg(r.fromBytes(t.binding))),hiding:r.toBytes(r.neg(r.fromBytes(t.hiding)))}}function aX(e,t,r){let i=Ut.Fn,n=EA(e,t),o=gy(t),a=xA(Ut.fromBytes(o.commitments[0]),r),s=i.toBytes(i.add(i.fromBytes(n.signingShare),a));return{identifier:n.identifier,signingShare:s}}function sX(e,t){let r=gy(e),i=xA(Ut.fromBytes(r.commitments[0]),t),n=Ut.BASE.multiply(i),o=r.commitments.map((s,u)=>(u===0?Ut.fromBytes(s).add(n):Ut.fromBytes(s)).toBytes()),a={};for(let s in r.verifyingShares)a[s]=Ut.fromBytes(r.verifyingShares[s]).add(n).toBytes();return{signers:{min:r.signers.min,max:r.signers.max},commitments:o,verifyingShares:a}}var bp,$$,_A,hy,Ta,Ut,J$,mA,of,Po,Gc,eX,tX,rX,bA,iX,py,nX,uX,d0=Xr(()=>{v();sp();gs();vp();fA();sA();jc();vA();Ju();bp={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},$$={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),basises:[[BigInt("0x3086d221a7d46bcde86c90e49284eb15"),-BigInt("0xe4437ed6010e88286f547fa90abfe4c3")],[BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),BigInt("0x3086d221a7d46bcde86c90e49284eb15")]]},_A=BigInt(0),hy=BigInt(2);Ta=Fc(bp.p,{sqrt:X$}),Ut=lA(bp,{Fp:Ta,endo:$$}),J$=gA(Ut,bs),mA={};of=e=>e.toBytes(!0).slice(1),Po=e=>e%hy===_A;Gc=bi;eX=Object.freeze({lift_x:_p}),tX=(()=>{let r=i=>(i=i===void 0?i0(48):i,Hc(i,bp.n));return Object.freeze({keygen:gp(r,yA),getPublicKey:yA,sign:Q$,verify:SA,Point:Ut,utils:Object.freeze({randomSecretKey:r,taggedHash:l0,lift_x:_p,pointToBytes:of}),lengths:Object.freeze({secretKey:32,publicKey:32,publicKeyHasPrefix:!1,signature:64,seed:48})})})(),rX=oA(Ta,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(e=>e.map(t=>BigInt(t)))),iX=()=>bA||(bA=dA(Ta,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:Ta.create(BigInt("-11"))})),py=aA(Ut,e=>{let{x:t,y:r}=iX()(Ta.create(e[0]));return rX(t,r)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:Ta.ORDER,m:1,k:128,expand:"xmd",hash:bs}),nX=oy({name:"FROST-secp256k1-SHA256-v1",Point:Ut,hashToScalar:py.hashToScalar,hash:bs});uX=oy({name:"FROST-secp256k1-SHA256-TR-v1",Point:Ut,hashToScalar:py.hashToScalar,hash:bs,parsePublicKey(e){if(e.length===32)return _p(bi(e));if(e.length===33)return Ut.fromBytes(e);throw new Error(`expected x-only or compressed public key, got length=${e.length}`)},adjustScalar(e){let t=Ut.BASE.multiply(e);return Po(t.y)?e:Ut.Fn.neg(e)},adjustPoint:e=>Po(e.y)?e:e.negate(),challenge(e,t,r){return dy(of(e),of(t),r)},adjustNonces:oX,adjustGroupCommitmentShare:(e,t)=>Po(e.y)?t:t.negate(),adjustPublic:gy,adjustSecret:EA,adjustTx:{encode:e=>e.subarray(1),decode:e=>kt(Uint8Array.of(2),e)},adjustDKG:e=>{let t=new Uint8Array(0);return{public:sX(e.public,t),secret:aX(e.secret,e.public,t)}}})});var vn=k((u2e,PA)=>{"use strict";v();var IA=fr(),{secp256k1:fX}=(d0(),ho(h0)),g0=fX.Point,wp=g0.Fn.ORDER;function cX(e){return BigInt("0x"+(e.toString(16)||"0"))}function vy(e){var t=e.toString(16);return t.length%2&&(t="0"+t),new IA(t,16)}function Sp(e){if(e==null)throw new Error("Invalid Point");if(typeof e=="bigint")return e;if(typeof e=="number")return BigInt(e);if(typeof e=="string")return BigInt(e.indexOf("0x")===0?e:"0x"+e);if(typeof e.toString=="function")return cX(e);throw new Error("Invalid Point")}function p0(e){var t=Object.create(Ft.prototype);return t._p=e,t}function OA(e,t){var r=Sp(t).toString(16).padStart(64,"0");return g0.fromHex((e?"03":"02")+r)}function AA(e,t){var r;try{r=OA((t&1n)===1n,e)}catch{throw new Error("Point does not lie on the curve")}if(r.toAffine().y!==t)throw new Error("Invalid y value for curve.")}function Ft(e,t,r){if(!(this instanceof Ft))return new Ft(e,t,r);var i,n;try{i=Sp(e),n=Sp(t)}catch{throw new Error("Invalid Point")}AA(i,n);try{this._p=g0.fromAffine({x:i,y:n})}catch{throw new Error("Invalid Point")}return this}Ft.fromX=function(t,r){try{var i=p0(OA(t,r))}catch{throw new Error("Invalid X")}return i.validate(),i};Ft.getG=function(){return p0(g0.BASE)};Ft.getN=function(){return vy(wp)};Ft.prototype.getX=function(){return vy(this._p.toAffine().x)};Ft.prototype.getY=function(){return vy(this._p.toAffine().y)};Object.defineProperty(Ft.prototype,"x",{configurable:!0,enumerable:!0,get:function(){return this.getX()}});Object.defineProperty(Ft.prototype,"y",{configurable:!0,enumerable:!0,get:function(){return this.getY()}});Ft.prototype.mul=function(t){var r=(Sp(t)%wp+wp)%wp;return r===0n||this._p.is0()?p0(g0.ZERO):p0(this._p.multiply(r))};Ft.prototype.add=function(t){return p0(this._p.add(t._p))};Ft.prototype.mulAdd=function(t,r,i){return this.mul(t).add(r.mul(i))};Ft.prototype.eq=function(t){return this._p.equals(t._p)};Ft.prototype.isInfinity=function(){return this._p.is0()};Ft.prototype.validate=function(){if(this.isInfinity())throw new Error("Point cannot be equal to Infinity");var t=this._p.toAffine();return AA(t.x,t.y),this};Ft.pointToCompressed=function(t){var r=t.getX().toBuffer({size:32}),i=t.getY().toBuffer({size:32}),n,o=i[i.length-1]%2;return o?n=h.Buffer.from([3]):n=h.Buffer.from([2]),h.Buffer.concat([n,r])};Ft.pointFromCompressed=function(e){if(e.length!==33)throw new Error("invalid buffer length");var t=e[0],r;if(t===3)r=!0;else if(t===2)r=!1;else throw new Error("invalid value of compressed prefix");var i=IA.fromBuffer(e.slice(1,33));return Ft.fromX(r,i)};Ft.prototype.toBuffer=function(){return Ft.pointToCompressed(this)};Ft.prototype.toHex=function(){return this.toBuffer().toString("hex")};Ft.fromBuffer=function(e){return Ft.pointFromCompressed(e)};Ft.fromHex=function(e){return Ft.fromBuffer(h.Buffer.from(e,"hex"))};PA.exports=Ft});var pi=k((c2e,RA)=>{"use strict";v();var kA=Et(),lX=Bt(),TA=function(t){return kA.isString(t)?/^[0-9a-fA-F]+$/.test(t):!1};RA.exports={isValidJSON:function(t){var r;if(!kA.isString(t))return!1;try{r=JSON.parse(t)}catch{return!1}return typeof r=="object"},isHexa:TA,isHexaString:TA,defineImmutable:function(t,r){return Object.keys(r).forEach(function(i){Object.defineProperty(t,i,{configurable:!1,enumerable:!0,value:r[i]})}),t},isNaturalNumber:function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&t>=0},integerAsBuffer:function(t){lX.checkArgumentType(t,"number","integer");let r=h.Buffer.allocUnsafe(4);return r.writeUInt32BE(t,0),r}}});var Vr=k((h2e,MA)=>{"use strict";v();var af=fr(),hX=Et(),_i=Bt(),dX=pi(),yt=function e(t,r){if(!(this instanceof e))return new e(t,r);if(t instanceof af)this.set({r:t,s:r});else if(t){var i=t;this.set(i)}};yt.prototype.set=function(e){return this.r=e.r||this.r||void 0,this.s=e.s||this.s||void 0,this.i=typeof e.i<"u"?e.i:this.i,this.compressed=typeof e.compressed<"u"?e.compressed:this.compressed,this.nhashtype=e.nhashtype||this.nhashtype||void 0,this};yt.fromCompact=function(e){_i.checkArgument(h.Buffer.isBuffer(e),"Argument is expected to be a Buffer");var t=new yt,r=!0,i=e.slice(0,1)[0]-27-4;i<0&&(r=!1,i=i+4);var n=e.slice(1,33),o=e.slice(33,65);return _i.checkArgument(i===0||i===1||i===2||i===3,new Error("i must be 0, 1, 2, or 3")),_i.checkArgument(n.length===32,new Error("r must be 32 bytes")),_i.checkArgument(o.length===32,new Error("s must be 32 bytes")),t.compressed=r,t.i=i,t.r=af.fromBuffer(n),t.s=af.fromBuffer(o),t};yt.fromDER=yt.fromBuffer=function(e,t){var r=yt.parseDER(e,t),i=new yt;return i.r=r.r,i.s=r.s,i};yt.fromTxFormat=function(e){var t=e.readUInt8(e.length-1),r=e.slice(0,e.length-1),i=yt.fromDER(r,!1);return i.nhashtype=t,i};yt.fromString=function(e){var t=h.Buffer.from(e,"hex");return yt.fromDER(t)};function BA(e,t){_i.checkArgument(t.length>0,new Error("Length of "+e+" is zero")),_i.checkArgument(!(t[0]&128),new Error("Value of "+e+" is negative")),_i.checkArgument(!(t.length>1&&t[0]===0&&!(t[1]&128)),new Error("Value of "+e+" is excessively padded"))}yt.parseDER=function(e,t){_i.checkArgument(h.Buffer.isBuffer(e),new Error("DER formatted signature should be a buffer")),hX.isUndefined(t)&&(t=!0);var r=e[0];_i.checkArgument(r===48,new Error("Header byte should be 0x30"));var i=e[1],n=e.slice(2).length;_i.checkArgument(!t||i===n,new Error("Length byte should length of what follows")),i=i<n?i:n;var o=e[2];_i.checkArgument(o===2,new Error("Integer byte for r should be 0x02"));var a=e[3],s=e.slice(4,4+a),u=af.fromBuffer(s),c=e[4]===0;_i.checkArgument(a===s.length,new Error("Length of r incorrect"));var l=e[4+a+0];_i.checkArgument(l===2,new Error("Integer byte for s should be 0x02"));var m=e[4+a+1],w=e.slice(4+a+2,4+a+2+m),E=af.fromBuffer(w),P=e[4+a+2]===0;_i.checkArgument(m===w.length,new Error("Length of s incorrect"));var M=4+a+2+m;_i.checkArgument(i===M-2,new Error("Length of signature incorrect")),t&&(BA("r",s),BA("s",w));var D={header:r,length:i,rheader:o,rlength:a,rneg:c,rbuf:s,r:u,sheader:l,slength:m,sneg:P,sbuf:w,s:E};return D};yt.prototype.toCompact=function(e,t){if(e=typeof e=="number"?e:this.i,t=typeof t=="boolean"?t:this.compressed,!(e===0||e===1||e===2||e===3))throw new Error("i must be equal to 0, 1, 2, or 3");var r=e+27+4;t===!1&&(r=r-4);var i=h.Buffer.from([r]),n=this.r.toBuffer({size:32}),o=this.s.toBuffer({size:32});return h.Buffer.concat([i,n,o])};yt.prototype.toBuffer=yt.prototype.toDER=function(){var e=this.r.toBuffer(),t=this.s.toBuffer(),r=!!(e[0]&128),i=!!(t[0]&128),n=r?h.Buffer.concat([h.Buffer.from([0]),e]):e,o=i?h.Buffer.concat([h.Buffer.from([0]),t]):t,a=n.length,s=o.length,u=2+a+2+s,c=2,l=2,m=48,w=h.Buffer.concat([h.Buffer.from([m,u,c,a]),n,h.Buffer.from([l,s]),o]);return w};yt.prototype.toString=function(){var e=this.toDER();return e.toString("hex")};yt.isTxDER=function(e){if(e.length<9||e.length>73||e[0]!==48||e[1]!==e.length-3)return!1;var t=e[3];if(5+t>=e.length)return!1;var r=e[5+t];if(t+r+7!==e.length)return!1;var i=e.slice(4);if(e[2]!==2||t===0||i[0]&128||t>1&&i[0]===0&&!(i[1]&128))return!1;var n=e.slice(6+t);return!(e[6+t-2]!==2||r===0||n[0]&128||r>1&&n[0]===0&&!(n[1]&128))};yt.prototype.hasLowS=function(){return!(this.s.lt(new af(1))||this.s.gt(new af("7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0","hex")))};yt.prototype.hasDefinedHashtype=function(){if(!dX.isNaturalNumber(this.nhashtype))return!1;var e=this.nhashtype&31;return!(e<yt.SIGHASH_ALL||e>yt.SIGHASH_SINGLE)};yt.prototype.toTxFormat=function(){var e=this.toDER(),t=h.Buffer.alloc(1);return t.writeUInt8(this.nhashtype,0),h.Buffer.concat([e,t])};yt.SIGHASH_ALL=1;yt.SIGHASH_NONE=2;yt.SIGHASH_SINGLE=3;yt.SIGHASH_FORKID=64;yt.SIGHASH_ANYONECANPAY=128;yt.prototype.isCanonical=function(){var e=vn(),t=e.getN().shrn(1);return this.s.lte(t)};yt.prototype.toCanonical=function(){if(this.isCanonical())return new yt({r:this.r,s:this.s,i:this.i,compressed:this.compressed,nhashtype:this.nhashtype});var e=vn(),t=e.getN(),r=t.sub(this.s);return new yt({r:this.r,s:r,i:this.i,compressed:this.compressed,nhashtype:this.nhashtype})};yt.prototype.validate=function(){if(!this.r||!this.s)throw new Error("Signature missing r or s component");if(this.r.isZero())throw new Error("Signature r component is zero");if(this.s.isZero())throw new Error("Signature s component is zero");var e=vn(),t=e.getN();if(this.r.gte(t))throw new Error("Signature r component >= curve order");if(this.s.gte(t))throw new Error("Signature s component >= curve order");if(this.r.isNeg())throw new Error("Signature r component is negative");if(this.s.isNeg())throw new Error("Signature s component is negative");return!0};yt.prototype.isValid=function(){try{return this.validate(),!0}catch{return!1}};yt.prototype.applySecurityPatches=function(){var e=vn(),t=e.getN(),r=t.shrn(1);if(this.r.isZero()||this.s.isZero())throw new Error("Invalid signature: zero r or s");if(this.r.gte(t)||this.s.gte(t))throw new Error("Invalid signature: out of range");if(this.s.gt(r))throw new Error("Invalid signature: non-canonical (high) s");return this};MA.exports=yt});var jn=k(Ht=>{"use strict";v();var pX=Rn(),gX=Te();Ht.inherits=gX;function vX(e,t){return(e.charCodeAt(t)&64512)!==55296||t<0||t+1>=e.length?!1:(e.charCodeAt(t+1)&64512)===56320}function mX(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if(typeof e=="string")if(t){if(t==="hex")for(e=e.replace(/[^a-z0-9]+/ig,""),e.length%2!==0&&(e="0"+e),n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16))}else for(var i=0,n=0;n<e.length;n++){var o=e.charCodeAt(n);o<128?r[i++]=o:o<2048?(r[i++]=o>>6|192,r[i++]=o&63|128):vX(e,n)?(o=65536+((o&1023)<<10)+(e.charCodeAt(++n)&1023),r[i++]=o>>18|240,r[i++]=o>>12&63|128,r[i++]=o>>6&63|128,r[i++]=o&63|128):(r[i++]=o>>12|224,r[i++]=o>>6&63|128,r[i++]=o&63|128)}else for(n=0;n<e.length;n++)r[n]=e[n]|0;return r}Ht.toArray=mX;function yX(e){for(var t="",r=0;r<e.length;r++)t+=NA(e[r].toString(16));return t}Ht.toHex=yX;function CA(e){var t=e>>>24|e>>>8&65280|e<<8&16711680|(e&255)<<24;return t>>>0}Ht.htonl=CA;function bX(e,t){for(var r="",i=0;i<e.length;i++){var n=e[i];t==="little"&&(n=CA(n)),r+=DA(n.toString(16))}return r}Ht.toHex32=bX;function NA(e){return e.length===1?"0"+e:e}Ht.zero2=NA;function DA(e){return e.length===7?"0"+e:e.length===6?"00"+e:e.length===5?"000"+e:e.length===4?"0000"+e:e.length===3?"00000"+e:e.length===2?"000000"+e:e.length===1?"0000000"+e:e}Ht.zero8=DA;function _X(e,t,r,i){var n=r-t;pX(n%4===0);for(var o=new Array(n/4),a=0,s=t;a<o.length;a++,s+=4){var u;i==="big"?u=e[s]<<24|e[s+1]<<16|e[s+2]<<8|e[s+3]:u=e[s+3]<<24|e[s+2]<<16|e[s+1]<<8|e[s],o[a]=u>>>0}return o}Ht.join32=_X;function wX(e,t){for(var r=new Array(e.length*4),i=0,n=0;i<e.length;i++,n+=4){var o=e[i];t==="big"?(r[n]=o>>>24,r[n+1]=o>>>16&255,r[n+2]=o>>>8&255,r[n+3]=o&255):(r[n+3]=o>>>24,r[n+2]=o>>>16&255,r[n+1]=o>>>8&255,r[n]=o&255)}return r}Ht.split32=wX;function SX(e,t){return e>>>t|e<<32-t}Ht.rotr32=SX;function xX(e,t){return e<<t|e>>>32-t}Ht.rotl32=xX;function EX(e,t){return e+t>>>0}Ht.sum32=EX;function IX(e,t,r){return e+t+r>>>0}Ht.sum32_3=IX;function OX(e,t,r,i){return e+t+r+i>>>0}Ht.sum32_4=OX;function AX(e,t,r,i,n){return e+t+r+i+n>>>0}Ht.sum32_5=AX;function PX(e,t,r,i){var n=e[t],o=e[t+1],a=i+o>>>0,s=(a<i?1:0)+r+n;e[t]=s>>>0,e[t+1]=a}Ht.sum64=PX;function TX(e,t,r,i){var n=t+i>>>0,o=(n<t?1:0)+e+r;return o>>>0}Ht.sum64_hi=TX;function kX(e,t,r,i){var n=t+i;return n>>>0}Ht.sum64_lo=kX;function RX(e,t,r,i,n,o,a,s){var u=0,c=t;c=c+i>>>0,u+=c<t?1:0,c=c+o>>>0,u+=c<o?1:0,c=c+s>>>0,u+=c<s?1:0;var l=e+r+n+a+u;return l>>>0}Ht.sum64_4_hi=RX;function BX(e,t,r,i,n,o,a,s){var u=t+i+o+s;return u>>>0}Ht.sum64_4_lo=BX;function MX(e,t,r,i,n,o,a,s,u,c){var l=0,m=t;m=m+i>>>0,l+=m<t?1:0,m=m+o>>>0,l+=m<o?1:0,m=m+s>>>0,l+=m<s?1:0,m=m+c>>>0,l+=m<c?1:0;var w=e+r+n+a+u+l;return w>>>0}Ht.sum64_5_hi=MX;function CX(e,t,r,i,n,o,a,s,u,c){var l=t+i+o+s+c;return l>>>0}Ht.sum64_5_lo=CX;function NX(e,t,r){var i=t<<32-r|e>>>r;return i>>>0}Ht.rotr64_hi=NX;function DX(e,t,r){var i=e<<32-r|t>>>r;return i>>>0}Ht.rotr64_lo=DX;function LX(e,t,r){return e>>>r}Ht.shr64_hi=LX;function qX(e,t,r){var i=e<<32-r|t>>>r;return i>>>0}Ht.shr64_lo=qX});var Zc=k(qA=>{"use strict";v();var LA=jn(),UX=Rn();function xp(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}qA.BlockHash=xp;xp.prototype.update=function(t,r){if(t=LA.toArray(t,r),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){t=this.pending;var i=t.length%this._delta8;this.pending=t.slice(t.length-i,t.length),this.pending.length===0&&(this.pending=null),t=LA.join32(t,0,t.length-i,this.endian);for(var n=0;n<t.length;n+=this._delta32)this._update(t,n,n+this._delta32)}return this};xp.prototype.digest=function(t){return this.update(this._pad()),UX(this.pending===null),this._digest(t)};xp.prototype._pad=function(){var t=this.pendingTotal,r=this._delta8,i=r-(t+this.padLength)%r,n=new Array(i+this.padLength);n[0]=128;for(var o=1;o<i;o++)n[o]=0;if(t<<=3,this.endian==="big"){for(var a=8;a<this.padLength;a++)n[o++]=0;n[o++]=0,n[o++]=0,n[o++]=0,n[o++]=0,n[o++]=t>>>24&255,n[o++]=t>>>16&255,n[o++]=t>>>8&255,n[o++]=t&255}else for(n[o++]=t&255,n[o++]=t>>>8&255,n[o++]=t>>>16&255,n[o++]=t>>>24&255,n[o++]=0,n[o++]=0,n[o++]=0,n[o++]=0,a=8;a<this.padLength;a++)n[o++]=0;return n}});var my=k(ka=>{"use strict";v();var FX=jn(),To=FX.rotr32;function HX(e,t,r,i){if(e===0)return UA(t,r,i);if(e===1||e===3)return HA(t,r,i);if(e===2)return FA(t,r,i)}ka.ft_1=HX;function UA(e,t,r){return e&t^~e&r}ka.ch32=UA;function FA(e,t,r){return e&t^e&r^t&r}ka.maj32=FA;function HA(e,t,r){return e^t^r}ka.p32=HA;function jX(e){return To(e,2)^To(e,13)^To(e,22)}ka.s0_256=jX;function zX(e){return To(e,6)^To(e,11)^To(e,25)}ka.s1_256=zX;function KX(e){return To(e,7)^To(e,18)^e>>>3}ka.g0_256=KX;function VX(e){return To(e,17)^To(e,19)^e>>>10}ka.g1_256=VX});var KA=k((_2e,zA)=>{"use strict";v();var Wc=jn(),GX=Zc(),ZX=my(),yy=Wc.rotl32,v0=Wc.sum32,WX=Wc.sum32_5,YX=ZX.ft_1,jA=GX.BlockHash,$X=[1518500249,1859775393,2400959708,3395469782];function ko(){if(!(this instanceof ko))return new ko;jA.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Wc.inherits(ko,jA);zA.exports=ko;ko.blockSize=512;ko.outSize=160;ko.hmacStrength=80;ko.padLength=64;ko.prototype._update=function(t,r){for(var i=this.W,n=0;n<16;n++)i[n]=t[r+n];for(;n<i.length;n++)i[n]=yy(i[n-3]^i[n-8]^i[n-14]^i[n-16],1);var o=this.h[0],a=this.h[1],s=this.h[2],u=this.h[3],c=this.h[4];for(n=0;n<i.length;n++){var l=~~(n/20),m=WX(yy(o,5),YX(l,a,s,u),c,i[n],$X[l]);c=u,u=s,s=yy(a,30),a=o,o=m}this.h[0]=v0(this.h[0],o),this.h[1]=v0(this.h[1],a),this.h[2]=v0(this.h[2],s),this.h[3]=v0(this.h[3],u),this.h[4]=v0(this.h[4],c)};ko.prototype._digest=function(t){return t==="hex"?Wc.toHex32(this.h,"big"):Wc.split32(this.h,"big")}});var by=k((S2e,GA)=>{"use strict";v();var Yc=jn(),XX=Zc(),$c=my(),JX=Rn(),zn=Yc.sum32,QX=Yc.sum32_4,eJ=Yc.sum32_5,tJ=$c.ch32,rJ=$c.maj32,iJ=$c.s0_256,nJ=$c.s1_256,oJ=$c.g0_256,aJ=$c.g1_256,VA=XX.BlockHash,sJ=[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 Ro(){if(!(this instanceof Ro))return new Ro;VA.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=sJ,this.W=new Array(64)}Yc.inherits(Ro,VA);GA.exports=Ro;Ro.blockSize=512;Ro.outSize=256;Ro.hmacStrength=192;Ro.padLength=64;Ro.prototype._update=function(t,r){for(var i=this.W,n=0;n<16;n++)i[n]=t[r+n];for(;n<i.length;n++)i[n]=QX(aJ(i[n-2]),i[n-7],oJ(i[n-15]),i[n-16]);var o=this.h[0],a=this.h[1],s=this.h[2],u=this.h[3],c=this.h[4],l=this.h[5],m=this.h[6],w=this.h[7];for(JX(this.k.length===i.length),n=0;n<i.length;n++){var E=eJ(w,nJ(c),tJ(c,l,m),this.k[n],i[n]),P=zn(iJ(o),rJ(o,a,s));w=m,m=l,l=c,c=zn(u,E),u=s,s=a,a=o,o=zn(E,P)}this.h[0]=zn(this.h[0],o),this.h[1]=zn(this.h[1],a),this.h[2]=zn(this.h[2],s),this.h[3]=zn(this.h[3],u),this.h[4]=zn(this.h[4],c),this.h[5]=zn(this.h[5],l),this.h[6]=zn(this.h[6],m),this.h[7]=zn(this.h[7],w)};Ro.prototype._digest=function(t){return t==="hex"?Yc.toHex32(this.h,"big"):Yc.split32(this.h,"big")}});var YA=k((E2e,WA)=>{"use strict";v();var _y=jn(),ZA=by();function Ra(){if(!(this instanceof Ra))return new Ra;ZA.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}_y.inherits(Ra,ZA);WA.exports=Ra;Ra.blockSize=512;Ra.outSize=224;Ra.hmacStrength=192;Ra.padLength=64;Ra.prototype._digest=function(t){return t==="hex"?_y.toHex32(this.h.slice(0,7),"big"):_y.split32(this.h.slice(0,7),"big")}});var xy=k((O2e,QA)=>{"use strict";v();var Ri=jn(),uJ=Zc(),fJ=Rn(),Bo=Ri.rotr64_hi,Mo=Ri.rotr64_lo,$A=Ri.shr64_hi,XA=Ri.shr64_lo,_s=Ri.sum64,wy=Ri.sum64_hi,Sy=Ri.sum64_lo,cJ=Ri.sum64_4_hi,lJ=Ri.sum64_4_lo,hJ=Ri.sum64_5_hi,dJ=Ri.sum64_5_lo,JA=uJ.BlockHash,pJ=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function Kn(){if(!(this instanceof Kn))return new Kn;JA.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=pJ,this.W=new Array(160)}Ri.inherits(Kn,JA);QA.exports=Kn;Kn.blockSize=1024;Kn.outSize=512;Kn.hmacStrength=192;Kn.padLength=128;Kn.prototype._prepareBlock=function(t,r){for(var i=this.W,n=0;n<32;n++)i[n]=t[r+n];for(;n<i.length;n+=2){var o=IJ(i[n-4],i[n-3]),a=OJ(i[n-4],i[n-3]),s=i[n-14],u=i[n-13],c=xJ(i[n-30],i[n-29]),l=EJ(i[n-30],i[n-29]),m=i[n-32],w=i[n-31];i[n]=cJ(o,a,s,u,c,l,m,w),i[n+1]=lJ(o,a,s,u,c,l,m,w)}};Kn.prototype._update=function(t,r){this._prepareBlock(t,r);var i=this.W,n=this.h[0],o=this.h[1],a=this.h[2],s=this.h[3],u=this.h[4],c=this.h[5],l=this.h[6],m=this.h[7],w=this.h[8],E=this.h[9],P=this.h[10],M=this.h[11],D=this.h[12],L=this.h[13],U=this.h[14],K=this.h[15];fJ(this.k.length===i.length);for(var C=0;C<i.length;C+=2){var N=U,F=K,H=wJ(w,E),z=SJ(w,E),V=gJ(w,E,P,M,D,L),B=vJ(w,E,P,M,D,L),g=this.k[C],I=this.k[C+1],y=i[C],f=i[C+1],p=hJ(N,F,H,z,V,B,g,I,y,f),_=dJ(N,F,H,z,V,B,g,I,y,f);N=bJ(n,o),F=_J(n,o),H=mJ(n,o,a,s,u,c),z=yJ(n,o,a,s,u,c);var x=wy(N,F,H,z),b=Sy(N,F,H,z);U=D,K=L,D=P,L=M,P=w,M=E,w=wy(l,m,p,_),E=Sy(m,m,p,_),l=u,m=c,u=a,c=s,a=n,s=o,n=wy(p,_,x,b),o=Sy(p,_,x,b)}_s(this.h,0,n,o),_s(this.h,2,a,s),_s(this.h,4,u,c),_s(this.h,6,l,m),_s(this.h,8,w,E),_s(this.h,10,P,M),_s(this.h,12,D,L),_s(this.h,14,U,K)};Kn.prototype._digest=function(t){return t==="hex"?Ri.toHex32(this.h,"big"):Ri.split32(this.h,"big")};function gJ(e,t,r,i,n){var o=e&r^~e&n;return o<0&&(o+=4294967296),o}function vJ(e,t,r,i,n,o){var a=t&i^~t&o;return a<0&&(a+=4294967296),a}function mJ(e,t,r,i,n){var o=e&r^e&n^r&n;return o<0&&(o+=4294967296),o}function yJ(e,t,r,i,n,o){var a=t&i^t&o^i&o;return a<0&&(a+=4294967296),a}function bJ(e,t){var r=Bo(e,t,28),i=Bo(t,e,2),n=Bo(t,e,7),o=r^i^n;return o<0&&(o+=4294967296),o}function _J(e,t){var r=Mo(e,t,28),i=Mo(t,e,2),n=Mo(t,e,7),o=r^i^n;return o<0&&(o+=4294967296),o}function wJ(e,t){var r=Bo(e,t,14),i=Bo(e,t,18),n=Bo(t,e,9),o=r^i^n;return o<0&&(o+=4294967296),o}function SJ(e,t){var r=Mo(e,t,14),i=Mo(e,t,18),n=Mo(t,e,9),o=r^i^n;return o<0&&(o+=4294967296),o}function xJ(e,t){var r=Bo(e,t,1),i=Bo(e,t,8),n=$A(e,t,7),o=r^i^n;return o<0&&(o+=4294967296),o}function EJ(e,t){var r=Mo(e,t,1),i=Mo(e,t,8),n=XA(e,t,7),o=r^i^n;return o<0&&(o+=4294967296),o}function IJ(e,t){var r=Bo(e,t,19),i=Bo(t,e,29),n=$A(e,t,6),o=r^i^n;return o<0&&(o+=4294967296),o}function OJ(e,t){var r=Mo(e,t,19),i=Mo(t,e,29),n=XA(e,t,6),o=r^i^n;return o<0&&(o+=4294967296),o}});var rP=k((P2e,tP)=>{"use strict";v();var Ey=jn(),eP=xy();function Ba(){if(!(this instanceof Ba))return new Ba;eP.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Ey.inherits(Ba,eP);tP.exports=Ba;Ba.blockSize=1024;Ba.outSize=384;Ba.hmacStrength=192;Ba.padLength=128;Ba.prototype._digest=function(t){return t==="hex"?Ey.toHex32(this.h.slice(0,12),"big"):Ey.split32(this.h.slice(0,12),"big")}});var iP=k(Xc=>{"use strict";v();Xc.sha1=KA();Xc.sha224=YA();Xc.sha256=by();Xc.sha384=rP();Xc.sha512=xy()});var fP=k(uP=>{"use strict";v();var sf=jn(),AJ=Zc(),Ep=sf.rotl32,nP=sf.sum32,m0=sf.sum32_3,oP=sf.sum32_4,sP=AJ.BlockHash;function Co(){if(!(this instanceof Co))return new Co;sP.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}sf.inherits(Co,sP);uP.ripemd160=Co;Co.blockSize=512;Co.outSize=160;Co.hmacStrength=192;Co.padLength=64;Co.prototype._update=function(t,r){for(var i=this.h[0],n=this.h[1],o=this.h[2],a=this.h[3],s=this.h[4],u=i,c=n,l=o,m=a,w=s,E=0;E<80;E++){var P=nP(Ep(oP(i,aP(E,n,o,a),t[kJ[E]+r],PJ(E)),BJ[E]),s);i=s,s=a,a=Ep(o,10),o=n,n=P,P=nP(Ep(oP(u,aP(79-E,c,l,m),t[RJ[E]+r],TJ(E)),MJ[E]),w),u=w,w=m,m=Ep(l,10),l=c,c=P}P=m0(this.h[1],o,m),this.h[1]=m0(this.h[2],a,w),this.h[2]=m0(this.h[3],s,u),this.h[3]=m0(this.h[4],i,c),this.h[4]=m0(this.h[0],n,l),this.h[0]=P};Co.prototype._digest=function(t){return t==="hex"?sf.toHex32(this.h,"little"):sf.split32(this.h,"little")};function aP(e,t,r,i){return e<=15?t^r^i:e<=31?t&r|~t&i:e<=47?(t|~r)^i:e<=63?t&i|r&~i:t^(r|~i)}function PJ(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function TJ(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}var kJ=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],RJ=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],BJ=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],MJ=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]});var lP=k((C2e,cP)=>{"use strict";v();var CJ=jn(),NJ=Rn();function Jc(e,t,r){if(!(this instanceof Jc))return new Jc(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(CJ.toArray(t,r))}cP.exports=Jc;Jc.prototype._init=function(t){t.length>this.blockSize&&(t=new this.Hash().update(t).digest()),NJ(t.length<=this.blockSize);for(var r=t.length;r<this.blockSize;r++)t.push(0);for(r=0;r<t.length;r++)t[r]^=54;for(this.inner=new this.Hash().update(t),r=0;r<t.length;r++)t[r]^=106;this.outer=new this.Hash().update(t)};Jc.prototype.update=function(t,r){return this.inner.update(t,r),this};Jc.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}});var dP=k(hP=>{v();var ri=hP;ri.utils=jn();ri.common=Zc();ri.sha=iP();ri.ripemd=fP();ri.hmac=lP();ri.sha1=ri.sha.sha1;ri.sha256=ri.sha.sha256;ri.sha224=ri.sha.sha224;ri.sha384=ri.sha.sha384;ri.sha512=ri.sha.sha512;ri.ripemd160=ri.ripemd.ripemd160});var gP=k((q2e,pP)=>{"use strict";v();var Ip=dP(),Ma=Bt(),Sr=pP.exports;Sr.sha1=function(e){return Ma.checkArgument(h.Buffer.isBuffer(e)),h.Buffer.from(Ip.sha1().update(e).digest("hex"),"hex")};Sr.sha1.blocksize=512;Sr.sha256=function(e){return Ma.checkArgument(h.Buffer.isBuffer(e)),h.Buffer.from(Ip.sha256().update(e).digest("hex"),"hex")};Sr.sha256.blocksize=512;Sr.sha256sha256=function(e){return Ma.checkArgument(h.Buffer.isBuffer(e)),Sr.sha256(Sr.sha256(e))};Sr.ripemd160=function(e){return Ma.checkArgument(h.Buffer.isBuffer(e)),h.Buffer.from(Ip.ripemd160().update(e).digest("hex"),"hex")};Sr.sha256ripemd160=function(e){return Ma.checkArgument(h.Buffer.isBuffer(e)),Sr.ripemd160(Sr.sha256(e))};Sr.sha512=function(e){return Ma.checkArgument(h.Buffer.isBuffer(e)),h.Buffer.from(Ip.sha512().update(e).digest("hex"),"hex")};Sr.sha512.blocksize=1024;Sr.hmac=function(e,t,r){Ma.checkArgument(h.Buffer.isBuffer(t)),Ma.checkArgument(h.Buffer.isBuffer(r)),Ma.checkArgument(e.blocksize);var i=e.blocksize/8;if(r.length>i)r=e(r);else if(r.length<i){var n=h.Buffer.alloc(i);n.fill(0),r.copy(n),r=n}var o=h.Buffer.alloc(i);o.fill(92);var a=h.Buffer.alloc(i);a.fill(54);for(var s=h.Buffer.alloc(i),u=h.Buffer.alloc(i),c=0;c<i;c++)s[c]=o[c]^r[c],u[c]=a[c]^r[c];return e(h.Buffer.concat([s,e(h.Buffer.concat([u,t]))]))};Sr.sha256hmac=function(e,t){return Sr.hmac(Sr.sha256,e,t)};Sr.sha512hmac=function(e,t){return Sr.hmac(Sr.sha512,e,t)}});var mP=k((F2e,vP)=>{"use strict";v();var Op=_r(),Ca=Bt(),xr=vP.exports;xr.sha1=function(e){return Ca.checkArgument(h.Buffer.isBuffer(e)),Op.createHash("sha1").update(e).digest()};xr.sha1.blocksize=512;xr.sha256=function(e){return Ca.checkArgument(h.Buffer.isBuffer(e)),Op.createHash("sha256").update(e).digest()};xr.sha256.blocksize=512;xr.sha256sha256=function(e){return Ca.checkArgument(h.Buffer.isBuffer(e)),xr.sha256(xr.sha256(e))};xr.ripemd160=function(e){return Ca.checkArgument(h.Buffer.isBuffer(e)),Op.createHash("ripemd160").update(e).digest()};xr.sha256ripemd160=function(e){return Ca.checkArgument(h.Buffer.isBuffer(e)),xr.ripemd160(xr.sha256(e))};xr.sha512=function(e){return Ca.checkArgument(h.Buffer.isBuffer(e)),Op.createHash("sha512").update(e).digest()};xr.sha512.blocksize=1024;xr.hmac=function(e,t,r){Ca.checkArgument(h.Buffer.isBuffer(t)),Ca.checkArgument(h.Buffer.isBuffer(r)),Ca.checkArgument(e.blocksize);var i=e.blocksize/8;if(r.length>i)r=e(r);else if(r.length<i){var n=h.Buffer.alloc(i);n.fill(0),r.copy(n),r=n}var o=h.Buffer.alloc(i);o.fill(92);var a=h.Buffer.alloc(i);a.fill(54);for(var s=h.Buffer.alloc(i),u=h.Buffer.alloc(i),c=0;c<i;c++)s[c]=o[c]^r[c],u[c]=a[c]^r[c];return e(h.Buffer.concat([s,e(h.Buffer.concat([u,t]))]))};xr.sha256hmac=function(e,t){return xr.hmac(xr.sha256,e,t)};xr.sha512hmac=function(e,t){return xr.hmac(xr.sha512,e,t)}});var cr=k((j2e,Iy)=>{v();A.default.browser?Iy.exports=gP():Iy.exports=mP()});var xs=k((K2e,_P)=>{"use strict";v();var Na=Et(),y0=pi(),uf=[],b0={};function yP(){}yP.prototype.toString=function(){return this.name};function _0(e,t){if(~uf.indexOf(e))return e;if(t){Na.isArray(t)||(t=[t]);for(var r=0;r<uf.length;r++){var i=uf[r],n=Na.pick(i,t),o=Na.values(n);if(~o.indexOf(e))return i}return}return b0[e]}function Ap(e){for(var t=[],r=0;r<e.length;r++)t.push(e.charCodeAt(r)&31);return t}function w0(e){var t=new yP;y0.defineImmutable(t,{name:e.name,alias:e.alias,pubkeyhash:e.pubkeyhash,privatekey:e.privatekey,scripthash:e.scripthash,xpubkey:e.xpubkey,xprivkey:e.xprivkey});var r=e.indexBy||Object.keys(e);return e.cashAddrPrefix&&Na.extend(t,{cashAddrPrefix:e.cashAddrPrefix,cashAddrPrefixArray:Ap(e.cashAddrPrefix)}),e.networkMagic&&Na.extend(t,{networkMagic:y0.integerAsBuffer(e.networkMagic)}),e.port&&Na.extend(t,{port:e.port}),e.dnsSeeds&&Na.extend(t,{dnsSeeds:e.dnsSeeds}),uf.push(t),DJ(t,r),t}function DJ(e,t){for(var r=0;r<t.length;r++){var i=t[r],n=e[i];!Na.isUndefined(n)&&!Na.isObject(n)&&(b0[n]=e)}}function LJ(e,t){for(var r=0;r<t.length;r++){var i=t[r];b0[i]===e&&delete b0[i]}}function qJ(e){for(var t=0;t<uf.length;t++)uf[t]===e&&uf.splice(t,1);LJ(e,Object.keys(b0))}var Pp={livenet:3823236072,testnet:4108710900,regtest:3669344250,stn:4224632057},bP=["seed.bitcoinsv.org","seed.bitcoinunlimited.info"],ws={PORT:18333,NETWORK_MAGIC:Pp.testnet,DNS_SEEDS:bP,PREFIX:"testnet",CASHADDRPREFIX:"bchtest"},Da={PORT:18444,NETWORK_MAGIC:Pp.regtest,DNS_SEEDS:[],PREFIX:"regtest",CASHADDRPREFIX:"bchreg"},Ss={PORT:9333,NETWORK_MAGIC:Pp.stn,DNS_SEEDS:["stn-seed.bitcoinsv.io"],PREFIX:"stn",CASHADDRPREFIX:"bsvstn"},UJ={name:"livenet",alias:"mainnet",prefix:"bitcoin",cashAddrPrefix:"bitcoincash",pubkeyhash:0,privatekey:128,scripthash:5,xpubkey:76067358,xprivkey:76066276,networkMagic:Pp.livenet,port:8333,dnsSeeds:bP},FJ={name:"testnet",prefix:ws.PREFIX,cashAddrPrefix:ws.CASHADDRPREFIX,pubkeyhash:111,privatekey:239,scripthash:196,xpubkey:70617039,xprivkey:70615956,networkMagic:ws.NETWORK_MAGIC},HJ={name:"regtest",prefix:Da.PREFIX,cashAddrPrefix:Da.CASHADDRPREFIX,pubkeyhash:111,privatekey:239,scripthash:196,xpubkey:70617039,xprivkey:70615956,networkMagic:Da.NETWORK_MAGIC,port:Da.PORT,dnsSeeds:[],indexBy:["port","name","cashAddrPrefix","networkMagic"]},jJ={name:"stn",prefix:Ss.PREFIX,cashAddrPrefix:Ss.CASHADDRPREFIX,pubkeyhash:111,privatekey:239,scripthash:196,xpubkey:70617039,xprivkey:70615956,networkMagic:Ss.NETWORK_MAGIC,indexBy:["port","name","cashAddrPrefix","networkMagic"]};w0(FJ);w0(jJ);w0(HJ);w0(UJ);var Oy=_0("livenet"),zJ=_0("regtest"),No=_0("testnet"),KJ=_0("stn");Object.defineProperty(No,"port",{enumerable:!0,configurable:!1,get:function(){return this.regtestEnabled?Da.PORT:this.stnEnabled?Ss.PORT:ws.PORT}});Object.defineProperty(No,"networkMagic",{enumerable:!0,configurable:!1,get:function(){return this.regtestEnabled?y0.integerAsBuffer(Da.NETWORK_MAGIC):this.stnEnabled?y0.integerAsBuffer(Ss.NETWORK_MAGIC):y0.integerAsBuffer(ws.NETWORK_MAGIC)}});Object.defineProperty(No,"dnsSeeds",{enumerable:!0,configurable:!1,get:function(){return this.regtestEnabled?Da.DNS_SEEDS:this.stnEnabled?Ss.DNS_SEEDS:ws.DNS_SEEDS}});Object.defineProperty(No,"cashAddrPrefix",{enumerable:!0,configurable:!1,get:function(){return this.regtestEnabled?Da.CASHADDRPREFIX:this.stnEnabled?Ss.CASHADDRPREFIX:ws.CASHADDRPREFIX}});Object.defineProperty(No,"cashAddrPrefixArray",{enumerable:!0,configurable:!1,get:function(){return this.regtestEnabled?Ap(Da.CASHADDRPREFIX):this.stnEnabled?Ap(Ss.CASHADDRPREFIX):Ap(ws.CASHADDRPREFIX)}});function VJ(){No.regtestEnabled=!0}function GJ(){No.regtestEnabled=!1}function ZJ(){No.stnEnabled=!0}function WJ(){No.stnEnabled=!1}_P.exports={add:w0,remove:qJ,defaultNetwork:Oy,livenet:Oy,mainnet:Oy,testnet:No,regtest:zJ,stn:KJ,get:_0,enableRegtest:VJ,disableRegtest:GJ,enableStn:ZJ,disableStn:WJ}});var S0=k((G2e,xP)=>{"use strict";v();var Ay=Et(),wP=Z2(),SP=Kt(),YJ="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz".split(""),Gr=function e(t){if(!(this instanceof e))return new e(t);if(h.Buffer.isBuffer(t)){var r=t;this.fromBuffer(r)}else if(typeof t=="string"){var i=t;this.fromString(i)}};Gr.validCharacters=function(t){return SP.Buffer.isBuffer(t)&&(t=t.toString()),Ay.every(Ay.map(t,function(r){return Ay.includes(YJ,r)}))};Gr.prototype.set=function(e){return this.buf=e.buf||this.buf||void 0,this};Gr.encode=function(e){if(!SP.Buffer.isBuffer(e))throw new Error("Input should be a buffer");return wP.encode(e)};Gr.decode=function(e){if(typeof e!="string")throw new Error("Input should be a string");return h.Buffer.from(wP.decode(e))};Gr.prototype.fromBuffer=function(e){return this.buf=e,this};Gr.fromBuffer=function(e){return new Gr().fromBuffer(e)};Gr.fromHex=function(e){return Gr.fromBuffer(h.Buffer.from(e,"hex"))};Gr.prototype.fromString=function(e){var t=Gr.decode(e);return this.buf=t,this};Gr.fromString=function(e){return new Gr().fromString(e)};Gr.prototype.toBuffer=function(){return this.buf};Gr.prototype.toHex=function(){return this.toBuffer().toString("hex")};Gr.prototype.toString=function(){return Gr.encode(this.buf)};xP.exports=Gr});var Qc=k((W2e,AP)=>{"use strict";v();var EP=Et(),Tp=S0(),IP=Kt(),OP=cr().sha256sha256,lr=function e(t){if(!(this instanceof e))return new e(t);if(h.Buffer.isBuffer(t)){var r=t;this.fromBuffer(r)}else if(typeof t=="string"){var i=t;this.fromString(i)}};lr.prototype.set=function(e){return this.buf=e.buf||this.buf||void 0,this};lr.validChecksum=function(t,r){return EP.isString(t)&&(t=IP.Buffer.from(Tp.decode(t))),EP.isString(r)&&(r=IP.Buffer.from(Tp.decode(r))),r||(r=t.slice(-4),t=t.slice(0,-4)),lr.checksum(t).toString("hex")===r.toString("hex")};lr.decode=function(e){if(typeof e!="string")throw new Error("Input must be a string");var t=h.Buffer.from(Tp.decode(e));if(t.length<4)throw new Error("Input string too short");var r=t.slice(0,-4),i=t.slice(-4),n=OP(r),o=n.slice(0,4);if(i.toString("hex")!==o.toString("hex"))throw new Error("Checksum mismatch");return r};lr.checksum=function(e){return OP(e).slice(0,4)};lr.encode=function(e){if(!h.Buffer.isBuffer(e))throw new Error("Input must be a buffer");var t=h.Buffer.alloc(e.length+4),r=lr.checksum(e);return e.copy(t),r.copy(t,e.length),Tp.encode(t)};lr.prototype.fromBuffer=function(e){return this.buf=e,this};lr.fromBuffer=function(e){return new lr().fromBuffer(e)};lr.fromHex=function(e){return lr.fromBuffer(h.Buffer.from(e,"hex"))};lr.prototype.fromString=function(e){var t=lr.decode(e);return this.buf=t,this};lr.fromString=function(e){var t=lr.decode(e);return new lr(t)};lr.prototype.toBuffer=function(){return this.buf};lr.prototype.toHex=function(){return this.toBuffer().toString("hex")};lr.prototype.toString=function(){return lr.encode(this.buf)};AP.exports=lr});var La=k(($2e,TP)=>{"use strict";v();var x0=Et(),PP=Bt(),el=fr(),gr=function e(t){if(!(this instanceof e))return new e(t);if(!x0.isUndefined(t))if(h.Buffer.isBuffer(t))this.set({buf:t});else if(x0.isString(t)){var r=h.Buffer.from(t,"hex");if(r.length*2!==t.length)throw new TypeError("Invalid hex string");this.set({buf:r})}else if(x0.isObject(t)){var i=t;this.set(i)}else throw new TypeError("Unrecognized argument for BufferReader")};gr.prototype.set=function(e){return this.buf=e.buf||this.buf||void 0,this.pos=e.pos||this.pos||0,this};gr.prototype.eof=function(){return this.pos>=this.buf.length};gr.prototype.finished=gr.prototype.eof;gr.prototype.read=function(e){PP.checkArgument(!x0.isUndefined(e),"Must specify a length");var t=this.buf.slice(this.pos,this.pos+e);return this.pos=this.pos+e,t};gr.prototype.readAll=function(){var e=this.buf.slice(this.pos,this.buf.length);return this.pos=this.buf.length,e};gr.prototype.readUInt8=function(){var e=this.buf.readUInt8(this.pos);return this.pos=this.pos+1,e};gr.prototype.readUInt16BE=function(){var e=this.buf.readUInt16BE(this.pos);return this.pos=this.pos+2,e};gr.prototype.readUInt16LE=function(){var e=this.buf.readUInt16LE(this.pos);return this.pos=this.pos+2,e};gr.prototype.readUInt32BE=function(){var e=this.buf.readUInt32BE(this.pos);return this.pos=this.pos+4,e};gr.prototype.readUInt32LE=function(){var e=this.buf.readUInt32LE(this.pos);return this.pos=this.pos+4,e};gr.prototype.readInt32LE=function(){var e=this.buf.readInt32LE(this.pos);return this.pos=this.pos+4,e};gr.prototype.readUInt64BEBN=function(){var e=this.buf.slice(this.pos,this.pos+8),t=el.fromBuffer(e);return this.pos=this.pos+8,t};gr.prototype.readUInt64LEBN=function(){var e=this.buf.readUInt32LE(this.pos),t=this.buf.readUInt32LE(this.pos+4),r=t*4294967296+e,i;if(r<=9007199254740991)i=new el(r);else{var n=Array.prototype.slice.call(this.buf,this.pos,this.pos+8);i=new el(n,10,"le")}return this.pos=this.pos+8,i};gr.prototype.readVarintNum=function(){var e=this.readUInt8();switch(e){case 253:return this.readUInt16LE();case 254:return this.readUInt32LE();case 255:var t=this.readUInt64LEBN(),r=t.toNumber();if(r<=Math.pow(2,53))return r;throw new Error("number too large to retain precision - use readVarintBN");default:return e}};gr.prototype.readVarLengthBuffer=function(){var e=this.readVarintNum(),t=this.read(e);return PP.checkState(t.length===e,"Invalid length while reading varlength buffer. Expected to read: "+e+" and read "+t.length),t};gr.prototype.readVarintBuf=function(){var e=this.buf.readUInt8(this.pos);switch(e){case 253:return this.read(3);case 254:return this.read(5);case 255:return this.read(9);default:return this.read(1)}};gr.prototype.readVarintBN=function(){var e=this.readUInt8();switch(e){case 253:return new el(this.readUInt16LE());case 254:return new el(this.readUInt32LE());case 255:return this.readUInt64LEBN();default:return new el(e)}};gr.prototype.reverse=function(){for(var e=h.Buffer.alloc(this.buf.length),t=0;t<e.length;t++)e[t]=this.buf[this.buf.length-1-t];return this.buf=e,this};gr.prototype.readReverse=function(e){x0.isUndefined(e)&&(e=this.buf.length);var t=this.buf.slice(this.pos,this.pos+e);return this.pos=this.pos+e,h.Buffer.from(t).reverse()};TP.exports=gr});var ky=k((J2e,MP)=>{"use strict";v();function Es(e){"@babel/helpers - typeof";return Es=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Es(e)}function kP(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,XJ(i.key),i)}}function $J(e,t,r){return t&&kP(e.prototype,t),r&&kP(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function XJ(e){var t=JJ(e,"string");return Es(t)==="symbol"?t:String(t)}function JJ(e,t){if(Es(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(Es(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function QJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eQ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ty(e,t)}function Ty(e,t){return Ty=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},Ty(e,t)}function tQ(e){var t=nQ();return function(){var i=kp(e),n;if(t){var o=kp(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return rQ(this,n)}}function rQ(e,t){if(t&&(Es(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return iQ(e)}function iQ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nQ(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function kp(e){return kp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},kp(e)}var BP={},tl,Py;function E0(e,t,r){r||(r=Error);function i(o,a,s){return typeof t=="string"?t:t(o,a,s)}var n=(function(o){eQ(s,o);var a=tQ(s);function s(u,c,l){var m;return QJ(this,s),m=a.call(this,i(u,c,l)),m.code=e,m}return $J(s)})(r);BP[e]=n}function RP(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(i){return String(i)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function oQ(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function aQ(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function sQ(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}E0("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError);E0("ERR_INVALID_ARG_TYPE",function(e,t,r){tl===void 0&&(tl=Is()),tl(typeof e=="string","'name' must be a string");var i;typeof t=="string"&&oQ(t,"not ")?(i="must not be",t=t.replace(/^not /,"")):i="must be";var n;if(aQ(e," argument"))n="The ".concat(e," ").concat(i," ").concat(RP(t,"type"));else{var o=sQ(e,".")?"property":"argument";n='The "'.concat(e,'" ').concat(o," ").concat(i," ").concat(RP(t,"type"))}return n+=". Received type ".concat(Es(r)),n},TypeError);E0("ERR_INVALID_ARG_VALUE",function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";Py===void 0&&(Py=rn());var i=Py.inspect(t);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(r,". Received ").concat(i)},TypeError,RangeError);E0("ERR_INVALID_RETURN_VALUE",function(e,t,r){var i;return r&&r.constructor&&r.constructor.name?i="instance of ".concat(r.constructor.name):i="type ".concat(Es(r)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(i,".")},TypeError);E0("ERR_MISSING_ARGS",function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];tl===void 0&&(tl=Is()),tl(t.length>0,"At least one arg needs to be specified");var i="The ",n=t.length;switch(t=t.map(function(o){return'"'.concat(o,'"')}),n){case 1:i+="".concat(t[0]," argument");break;case 2:i+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:i+=t.slice(0,n-1).join(", "),i+=", and ".concat(t[n-1]," arguments");break}return"".concat(i," must be specified")},TypeError);MP.exports.codes=BP});var zP=k((epe,jP)=>{"use strict";v();function CP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function NP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?CP(Object(r),!0).forEach(function(i){uQ(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):CP(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function uQ(e,t,r){return t=UP(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DP(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,UP(i.key),i)}}function cQ(e,t,r){return t&&DP(e.prototype,t),r&&DP(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function UP(e){var t=lQ(e,"string");return Bi(t)==="symbol"?t:String(t)}function lQ(e,t){if(Bi(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(Bi(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hQ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&P0(e,t)}function dQ(e){var t=HP();return function(){var i=T0(e),n;if(t){var o=T0(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return FP(this,n)}}function FP(e,t){if(t&&(Bi(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ry(e)}function Ry(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function By(e){var t=typeof Map=="function"?new Map:void 0;return By=function(i){if(i===null||!pQ(i))return i;if(typeof i!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(i))return t.get(i);t.set(i,n)}function n(){return Rp(i,arguments,T0(this).constructor)}return n.prototype=Object.create(i.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),P0(n,i)},By(e)}function Rp(e,t,r){return HP()?Rp=Reflect.construct.bind():Rp=function(n,o,a){var s=[null];s.push.apply(s,o);var u=Function.bind.apply(n,s),c=new u;return a&&P0(c,a.prototype),c},Rp.apply(null,arguments)}function HP(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function pQ(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function P0(e,t){return P0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},P0(e,t)}function T0(e){return T0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},T0(e)}function Bi(e){"@babel/helpers - typeof";return Bi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bi(e)}var gQ=rn(),My=gQ.inspect,vQ=ky(),mQ=vQ.codes.ERR_INVALID_ARG_TYPE;function LP(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function yQ(e,t){if(t=Math.floor(t),e.length==0||t==0)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+=e.substring(0,r-e.length),e}var Vn="",I0="",O0="",ii="",ff={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},bQ=10;function qP(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach(function(i){r[i]=e[i]}),Object.defineProperty(r,"message",{value:e.message}),r}function A0(e){return My(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function _Q(e,t,r){var i="",n="",o=0,a="",s=!1,u=A0(e),c=u.split(`
|
|
20
20
|
`),l=A0(t).split(`
|
|
21
21
|
`),m=0,w="";if(r==="strictEqual"&&Bi(e)==="object"&&Bi(t)==="object"&&e!==null&&t!==null&&(r="strictEqualObject"),c.length===1&&l.length===1&&c[0]!==l[0]){var E=c[0].length+l[0].length;if(E<=bQ){if((Bi(e)!=="object"||e===null)&&(Bi(t)!=="object"||t===null)&&(e!==0||t!==0))return"".concat(ff[r],`
|
|
22
22
|
|
|
@@ -72,7 +72,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
72
72
|
`))}throw i}};function mk(e,t,r,i,n){if(!Kp(t))throw new rl("regexp","RegExp",t);var o=n==="match";if(typeof e!="string"||Vp(t,e)!==o){if(r instanceof Error)throw r;var a=!r;r=r||(typeof e!="string"?'The "string" argument must be of type string. Received type '+"".concat(Gn(e)," (").concat(zp(e),")"):(o?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(zp(t),`. Input:
|
|
73
73
|
|
|
74
74
|
`).concat(zp(e),`
|
|
75
|
-
`));var s=new Ps({actual:e,expected:t,message:r,operator:n,stackStartFn:i});throw s.generatedMessage=a,s}}Gt.match=function e(t,r,i){mk(t,r,i,e,"match")};Gt.doesNotMatch=function e(t,r,i){mk(t,r,i,e,"doesNotMatch")};function yk(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];ck.apply(void 0,[yk,t.length].concat(t))}Gt.strict=Bee(yk,Gt,{equal:Gt.strictEqual,deepEqual:Gt.deepStrictEqual,notEqual:Gt.notStrictEqual,notDeepEqual:Gt.notDeepStrictEqual});Gt.strict.strict=Gt.strict});var Wn=k((Dpe,wk)=>{"use strict";v();var _k=Is(),vr=function e(t){if(!(this instanceof e))return new e(t);this.bufLen=0,t?this.set(t):this.bufs=[]};vr.prototype.set=function(e){return this.bufs=e.bufs||this.bufs||[],this.bufLen=this.bufs.reduce(function(t,r){return t+r.length},0),this};vr.prototype.toBuffer=function(){return this.concat()};vr.prototype.concat=function(){return h.Buffer.concat(this.bufs,this.bufLen)};vr.prototype.write=function(e){return _k(h.Buffer.isBuffer(e)),this.bufs.push(e),this.bufLen+=e.length,this};vr.prototype.writeReverse=function(e){return _k(h.Buffer.isBuffer(e)),this.bufs.push(h.Buffer.from(e).reverse()),this.bufLen+=e.length,this};vr.prototype.writeUInt8=function(e){var t=h.Buffer.alloc(1);return t.writeUInt8(e,0),this.write(t),this};vr.prototype.writeUInt16BE=function(e){var t=h.Buffer.alloc(2);return t.writeUInt16BE(e,0),this.write(t),this};vr.prototype.writeUInt16LE=function(e){var t=h.Buffer.alloc(2);return t.writeUInt16LE(e,0),this.write(t),this};vr.prototype.writeUInt32BE=function(e){var t=h.Buffer.alloc(4);return t.writeUInt32BE(e,0),this.write(t),this};vr.prototype.writeInt32LE=function(e){var t=h.Buffer.alloc(4);return t.writeInt32LE(e,0),this.write(t),this};vr.prototype.writeUInt32LE=function(e){var t=h.Buffer.alloc(4);return t.writeUInt32LE(e,0),this.write(t),this};vr.prototype.writeUInt64BEBN=function(e){var t=e.toBuffer({size:8});return this.write(t),this};vr.prototype.writeUInt64LEBN=function(e){var t=e.toBuffer({size:8});return this.writeReverse(t),this};vr.prototype.writeVarintNum=function(e){var t=vr.varintBufNum(e);return this.write(t),this};vr.prototype.writeVarintBN=function(e){var t=vr.varintBufBN(e);return this.write(t),this};vr.varintBufNum=function(e){var t;return e<253?(t=h.Buffer.alloc(1),t.writeUInt8(e,0)):e<65536?(t=h.Buffer.alloc(3),t.writeUInt8(253,0),t.writeUInt16LE(e,1)):e<4294967296?(t=h.Buffer.alloc(5),t.writeUInt8(254,0),t.writeUInt32LE(e,1)):(t=h.Buffer.alloc(9),t.writeUInt8(255,0),t.writeInt32LE(e&-1,1),t.writeUInt32LE(Math.floor(e/4294967296),5)),t};vr.varintBufBN=function(e){var t,r=e.toNumber();if(r<253)t=h.Buffer.alloc(1),t.writeUInt8(r,0);else if(r<65536)t=h.Buffer.alloc(3),t.writeUInt8(253,0),t.writeUInt16LE(r,1);else if(r<4294967296)t=h.Buffer.alloc(5),t.writeUInt8(254,0),t.writeUInt32LE(r,1);else{var i=new vr;i.writeUInt8(255),i.writeUInt64LEBN(e),t=i.concat()}return t};wk.exports=vr});var Wp=k((qpe,Sk)=>{"use strict";v();var il=Et(),L0=Bt(),Cee=pi();function It(e){if(!(this instanceof It))return new It(e);var t;if(il.isNumber(e))t=e;else if(il.isString(e))t=It.map[e];else throw new TypeError('Unrecognized num type: "'+typeof e+'" for Opcode');return Cee.defineImmutable(this,{num:t}),this}It.fromBuffer=function(e){return L0.checkArgument(h.Buffer.isBuffer(e)),new It(+("0x"+e.toString("hex")))};It.fromNumber=function(e){return L0.checkArgument(il.isNumber(e)),new It(e)};It.fromString=function(e){L0.checkArgument(il.isString(e));var t=It.map[e];if(typeof t>"u")throw new TypeError("Invalid opcodestr");return new It(t)};It.prototype.toHex=function(){return this.num.toString(16)};It.prototype.toBuffer=function(){return h.Buffer.from(this.toHex(),"hex")};It.prototype.toNumber=function(){return this.num};It.prototype.toString=function(){var e=It.reverseMap[this.num];if(typeof e>"u")throw new Error("Opcode does not have a string representation");return e};It.smallInt=function(e){return L0.checkArgument(il.isNumber(e),"Invalid Argument: n should be number"),L0.checkArgument(e>=0&&e<=16,"Invalid Argument: n must be between 0 and 16"),e===0?It("OP_0"):new It(It.map.OP_1+e-1)};It.map={OP_FALSE:0,OP_0:0,OP_PUSHDATA1:76,OP_PUSHDATA2:77,OP_PUSHDATA4:78,OP_1NEGATE:79,OP_RESERVED:80,OP_TRUE:81,OP_1:81,OP_2:82,OP_3:83,OP_4:84,OP_5:85,OP_6:86,OP_7:87,OP_8:88,OP_9:89,OP_10:90,OP_11:91,OP_12:92,OP_13:93,OP_14:94,OP_15:95,OP_16:96,OP_NOP:97,OP_VER:98,OP_IF:99,OP_NOTIF:100,OP_VERIF:101,OP_VERNOTIF:102,OP_ELSE:103,OP_ENDIF:104,OP_VERIFY:105,OP_RETURN:106,OP_TOALTSTACK:107,OP_FROMALTSTACK:108,OP_2DROP:109,OP_2DUP:110,OP_3DUP:111,OP_2OVER:112,OP_2ROT:113,OP_2SWAP:114,OP_IFDUP:115,OP_DEPTH:116,OP_DROP:117,OP_DUP:118,OP_NIP:119,OP_OVER:120,OP_PICK:121,OP_ROLL:122,OP_ROT:123,OP_SWAP:124,OP_TUCK:125,OP_CAT:126,OP_SPLIT:127,OP_NUM2BIN:128,OP_BIN2NUM:129,OP_SIZE:130,OP_INVERT:131,OP_AND:132,OP_OR:133,OP_XOR:134,OP_EQUAL:135,OP_EQUALVERIFY:136,OP_RESERVED1:137,OP_RESERVED2:138,OP_1ADD:139,OP_1SUB:140,OP_2MUL:141,OP_2DIV:142,OP_NEGATE:143,OP_ABS:144,OP_NOT:145,OP_0NOTEQUAL:146,OP_ADD:147,OP_SUB:148,OP_MUL:149,OP_DIV:150,OP_MOD:151,OP_LSHIFT:152,OP_RSHIFT:153,OP_BOOLAND:154,OP_BOOLOR:155,OP_NUMEQUAL:156,OP_NUMEQUALVERIFY:157,OP_NUMNOTEQUAL:158,OP_LESSTHAN:159,OP_GREATERTHAN:160,OP_LESSTHANOREQUAL:161,OP_GREATERTHANOREQUAL:162,OP_MIN:163,OP_MAX:164,OP_WITHIN:165,OP_RIPEMD160:166,OP_SHA1:167,OP_SHA256:168,OP_HASH160:169,OP_HASH256:170,OP_CODESEPARATOR:171,OP_CHECKSIG:172,OP_CHECKSIGVERIFY:173,OP_CHECKMULTISIG:174,OP_CHECKMULTISIGVERIFY:175,OP_CHECKLOCKTIMEVERIFY:177,OP_CHECKSEQUENCEVERIFY:178,OP_NOP1:176,OP_NOP2:177,OP_NOP3:178,OP_SUBSTR:179,OP_LEFT:180,OP_RIGHT:181,OP_LSHIFTNUM:182,OP_RSHIFTNUM:183,OP_NOP9:184,OP_NOP10:185,OP_PUBKEYHASH:253,OP_PUBKEY:254,OP_INVALIDOPCODE:255};It.reverseMap=[];for(Zy in It.map)It.reverseMap[It.map[Zy]]=Zy;var Zy;il.extend(It,It.map);It.isSmallIntOp=function(e){return e instanceof It&&(e=e.toNumber()),e===It.map.OP_0||e>=It.map.OP_1&&e<=It.map.OP_16};It.prototype.inspect=function(){return"<Opcode: "+this.toString()+", hex: "+this.toHex()+", decimal: "+this.num+">"};Sk.exports=It});var $y=k((Fpe,Ik)=>{"use strict";v();var Yn=hf(),Nee=La(),Dee=Wn(),Wy=cr(),he=Wp(),lf=$n(),cf=Vr(),xk=xs(),er=Bt(),bt=Et(),Yy=hn(),Ek=Kt(),Lee=pi(),Q=function e(t){if(!(this instanceof e))return new e(t);if(this.chunks=[],h.Buffer.isBuffer(t))return e.fromBuffer(t);if(t instanceof Yn)return e.fromAddress(t);if(t instanceof e)return e.fromBuffer(t.toBuffer());if(bt.isString(t))return e.fromString(t);bt.isObject(t)&&bt.isArray(t.chunks)&&this.set(t)};Q.prototype.set=function(e){return er.checkArgument(bt.isObject(e)),er.checkArgument(bt.isArray(e.chunks)),this.chunks=e.chunks,this};Q.fromBuffer=function(e){var t=new Q;t.chunks=[];for(var r=new Nee(e);!r.finished();)try{var i=r.readUInt8(),n,o;i>0&&i<he.OP_PUSHDATA1?(n=i,t.chunks.push({buf:r.read(n),len:n,opcodenum:i})):i===he.OP_PUSHDATA1?(n=r.readUInt8(),o=r.read(n),t.chunks.push({buf:o,len:n,opcodenum:i})):i===he.OP_PUSHDATA2?(n=r.readUInt16LE(),o=r.read(n),t.chunks.push({buf:o,len:n,opcodenum:i})):i===he.OP_PUSHDATA4?(n=r.readUInt32LE(),o=r.read(n),t.chunks.push({buf:o,len:n,opcodenum:i})):t.chunks.push({opcodenum:i})}catch(a){throw a instanceof RangeError?new Yy.Script.InvalidBuffer(e.toString("hex")):a}return t};Q.prototype.toBuffer=function(){for(var e=new Dee,t=0;t<this.chunks.length;t++){var r=this.chunks[t],i=r.opcodenum;e.writeUInt8(r.opcodenum),r.buf&&(i<he.OP_PUSHDATA1?e.write(r.buf):i===he.OP_PUSHDATA1?(e.writeUInt8(r.len),e.write(r.buf)):i===he.OP_PUSHDATA2?(e.writeUInt16LE(r.len),e.write(r.buf)):i===he.OP_PUSHDATA4&&(e.writeUInt32LE(r.len),e.write(r.buf)))}return e.concat()};Q.fromASM=function(e){var t=new Q;t.chunks=[];for(var r=e.split(" "),i=0;i<r.length;){var n=r[i],o=he(n),a=o.toNumber();if(n==="0")a=0,t.chunks.push({opcodenum:a}),i=i+1;else if(n==="-1")a=he.OP_1NEGATE,t.chunks.push({opcodenum:a}),i=i+1;else if(bt.isUndefined(a)){var s=h.Buffer.from(r[i],"hex");if(s.toString("hex")!==r[i])throw new Error("invalid hex string in script");var u=s.length;u>=0&&u<he.OP_PUSHDATA1?a=u:u<Math.pow(2,8)?a=he.OP_PUSHDATA1:u<Math.pow(2,16)?a=he.OP_PUSHDATA2:u<Math.pow(2,32)&&(a=he.OP_PUSHDATA4),t.chunks.push({buf:s,len:s.length,opcodenum:a}),i=i+1}else t.chunks.push({opcodenum:a}),i=i+1}return t};Q.fromHex=function(e){return new Q(Ek.Buffer.from(e,"hex"))};Q.fromString=function(e){if(Lee.isHexa(e)||e.length===0)return new Q(Ek.Buffer.from(e,"hex"));var t=new Q;t.chunks=[];for(var r=e.split(" "),i=0;i<r.length;){var n=r[i],o=he(n),a=o.toNumber();if(bt.isUndefined(a))if(a=parseInt(n),a>0&&a<he.OP_PUSHDATA1)t.chunks.push({buf:h.Buffer.from(r[i+1].slice(2),"hex"),len:a,opcodenum:a}),i=i+2;else throw new Error("Invalid script: "+JSON.stringify(e));else if(a===he.OP_PUSHDATA1||a===he.OP_PUSHDATA2||a===he.OP_PUSHDATA4){if(r[i+2].slice(0,2)!=="0x")throw new Error("Pushdata data must start with 0x");t.chunks.push({buf:h.Buffer.from(r[i+2].slice(2),"hex"),len:parseInt(r[i+1]),opcodenum:a}),i=i+3}else t.chunks.push({opcodenum:a}),i=i+1}return t};Q.prototype._chunkToString=function(e,t){var r=e.opcodenum,i=t==="asm",n="";if(e.buf)!i&&(r===he.OP_PUSHDATA1||r===he.OP_PUSHDATA2||r===he.OP_PUSHDATA4)&&(n=n+" "+he(r).toString()),e.len>0&&(i?n=n+" "+e.buf.toString("hex"):n=n+" "+e.len+" 0x"+e.buf.toString("hex"));else if(typeof he.reverseMap[r]<"u")i?r===0?n=n+" 0":r===79?n=n+" -1":n=n+" "+he(r).toString():n=n+" "+he(r).toString();else{var o=r.toString(16);o.length%2!==0&&(o="0"+o),i?n=n+" "+o:n=n+" 0x"+o}return n};Q.prototype.toASM=function(){for(var e="",t=0;t<this.chunks.length;t++){var r=this.chunks[t];e+=this._chunkToString(r,"asm")}return e.substr(1)};Q.prototype.toString=function(){for(var e="",t=0;t<this.chunks.length;t++){var r=this.chunks[t];e+=this._chunkToString(r)}return e.substr(1)};Q.prototype.toHex=function(){return this.toBuffer().toString("hex")};Q.prototype.inspect=function(){return"<Script: "+this.toString()+">"};Q.prototype.isPublicKeyHashOut=function(){return!!(this.chunks.length===5&&this.chunks[0].opcodenum===he.OP_DUP&&this.chunks[1].opcodenum===he.OP_HASH160&&this.chunks[2].buf&&this.chunks[2].buf.length===20&&this.chunks[3].opcodenum===he.OP_EQUALVERIFY&&this.chunks[4].opcodenum===he.OP_CHECKSIG)};Q.prototype.isPublicKeyHashOutPrefix=function(){return!!(this.chunks.length>=5&&this.chunks[0].opcodenum===he.OP_DUP&&this.chunks[1].opcodenum===he.OP_HASH160&&this.chunks[2].buf&&this.chunks[2].buf.length===20&&this.chunks[3].opcodenum===he.OP_EQUALVERIFY&&this.chunks[4].opcodenum===he.OP_CHECKSIG)};Q.prototype.isPublicKeyHashIn=function(){if(this.chunks.length===2){var e=this.chunks[0].buf,t=this.chunks[1].buf;if(e&&e.length&&e[0]===48&&t&&t.length){var r=t[0];if((r===4||r===6||r===7)&&t.length===65)return!0;if((r===3||r===2)&&t.length===33)return!0}}return!1};Q.prototype.getPublicKey=function(){return er.checkState(this.isPublicKeyOut(),"Can't retrieve PublicKey from a non-PK output"),this.chunks[0].buf};Q.prototype.getPublicKeyHash=function(){return er.checkState(this.isPublicKeyHashOut(),"Can't retrieve PublicKeyHash from a non-PKH output"),this.chunks[2].buf};Q.prototype.isPublicKeyOut=function(){if(this.chunks.length===2&&this.chunks[0].buf&&this.chunks[0].buf.length&&this.chunks[1].opcodenum===he.OP_CHECKSIG){var e=this.chunks[0].buf,t=e[0],r=!1;if(((t===4||t===6||t===7)&&e.length===65||(t===3||t===2)&&e.length===33)&&(r=!0),r)return lf.isValid(e)}return!1};Q.prototype.isPublicKeyIn=function(){if(this.chunks.length===1){var e=this.chunks[0].buf;if(e&&e.length&&e[0]===48)return!0}return!1};Q.prototype.isScriptHashOut=function(){var e=this.toBuffer();return e.length===23&&e[0]===he.OP_HASH160&&e[1]===20&&e[e.length-1]===he.OP_EQUAL};Q.prototype.isScriptHashIn=function(){if(this.chunks.length<=1)return!1;var e=this.chunks[this.chunks.length-1],t=e.buf;if(!t)return!1;var r;try{r=Q.fromBuffer(t)}catch(n){if(n instanceof Yy.Script.InvalidBuffer)return!1;throw n}var i=r.classify();return i!==Q.types.UNKNOWN};Q.prototype.isMultisigOut=function(){return this.chunks.length>3&&he.isSmallIntOp(this.chunks[0].opcodenum)&&this.chunks.slice(1,this.chunks.length-2).every(function(e){return e.buf&&h.Buffer.isBuffer(e.buf)})&&he.isSmallIntOp(this.chunks[this.chunks.length-2].opcodenum)&&this.chunks[this.chunks.length-1].opcodenum===he.OP_CHECKMULTISIG};Q.prototype.isMultisigIn=function(){return this.chunks.length>=2&&this.chunks[0].opcodenum===0&&this.chunks.slice(1,this.chunks.length).every(function(e){return e.buf&&h.Buffer.isBuffer(e.buf)&&cf.isTxDER(e.buf)})};Q.prototype.isDataOut=function(){var e=this.chunks.length>=1&&this.chunks[0].opcodenum===he.OP_RETURN;if(!e)return!1;var t=this.chunks.slice(1),r=new Q({chunks:t});return r.isPushOnly()};Q.prototype.isSafeDataOut=function(){if(this.chunks.length<2||this.chunks[0].opcodenum!==he.OP_FALSE)return!1;var e=this.chunks.slice(1),t=new Q({chunks:e});return t.isDataOut()};Q.prototype.getData=function(){if(this.isSafeDataOut()){var e=this.chunks.slice(2),t=e.map(r=>r.buf);return t}if(this.isDataOut()||this.isScriptHashOut())return bt.isUndefined(this.chunks[1])?h.Buffer.alloc(0):h.Buffer.from(this.chunks[1].buf);if(this.isPublicKeyHashOut())return h.Buffer.from(this.chunks[2].buf);throw new Error("Unrecognized script type to get data from")};Q.prototype.isPushOnly=function(){return bt.every(this.chunks,function(e){return e.opcodenum<=he.OP_16||e.opcodenum===he.OP_PUSHDATA1||e.opcodenum===he.OP_PUSHDATA2||e.opcodenum===he.OP_PUSHDATA4})};Q.types={};Q.types.UNKNOWN="Unknown";Q.types.PUBKEY_OUT="Pay to public key";Q.types.PUBKEY_IN="Spend from public key";Q.types.PUBKEYHASH_OUT="Pay to public key hash";Q.types.PUBKEYHASH_IN="Spend from public key hash";Q.types.SCRIPTHASH_OUT="Pay to script hash";Q.types.SCRIPTHASH_IN="Spend from script hash";Q.types.MULTISIG_OUT="Pay to multisig";Q.types.MULTISIG_IN="Spend from multisig";Q.types.DATA_OUT="Data push";Q.types.SAFE_DATA_OUT="Safe data push";Q.OP_RETURN_STANDARD_SIZE=220;Q.prototype.classify=function(){if(this._isInput)return this.classifyInput();if(this._isOutput)return this.classifyOutput();var e=this.classifyOutput();return e!==Q.types.UNKNOWN?e:this.classifyInput()};Q.outputIdentifiers={};Q.outputIdentifiers.PUBKEY_OUT=Q.prototype.isPublicKeyOut;Q.outputIdentifiers.PUBKEYHASH_OUT=Q.prototype.isPublicKeyHashOut;Q.outputIdentifiers.MULTISIG_OUT=Q.prototype.isMultisigOut;Q.outputIdentifiers.SCRIPTHASH_OUT=Q.prototype.isScriptHashOut;Q.outputIdentifiers.DATA_OUT=Q.prototype.isDataOut;Q.outputIdentifiers.SAFE_DATA_OUT=Q.prototype.isSafeDataOut;Q.prototype.classifyOutput=function(){for(var e in Q.outputIdentifiers)if(Q.outputIdentifiers[e].bind(this)())return Q.types[e];return Q.types.UNKNOWN};Q.inputIdentifiers={};Q.inputIdentifiers.PUBKEY_IN=Q.prototype.isPublicKeyIn;Q.inputIdentifiers.PUBKEYHASH_IN=Q.prototype.isPublicKeyHashIn;Q.inputIdentifiers.MULTISIG_IN=Q.prototype.isMultisigIn;Q.inputIdentifiers.SCRIPTHASH_IN=Q.prototype.isScriptHashIn;Q.prototype.classifyInput=function(){for(var e in Q.inputIdentifiers)if(Q.inputIdentifiers[e].bind(this)())return Q.types[e];return Q.types.UNKNOWN};Q.prototype.isStandard=function(){return this.classify()!==Q.types.UNKNOWN};Q.prototype.prepend=function(e){return this._addByType(e,!0),this};Q.prototype.equals=function(e){if(er.checkState(e instanceof Q,"Must provide another script"),this.chunks.length!==e.chunks.length)return!1;var t;for(t=0;t<this.chunks.length;t++){if(h.Buffer.isBuffer(this.chunks[t].buf)&&!h.Buffer.isBuffer(e.chunks[t].buf)||h.Buffer.isBuffer(this.chunks[t].buf)&&!this.chunks[t].buf.equals(e.chunks[t].buf))return!1;if(this.chunks[t].opcodenum!==e.chunks[t].opcodenum)return!1}return!0};Q.prototype.add=function(e){return this._addByType(e,!1),this};Q.prototype._addByType=function(e,t){if(typeof e=="string")this._addOpcode(e,t);else if(typeof e=="number")this._addOpcode(e,t);else if(e instanceof he)this._addOpcode(e,t);else if(h.Buffer.isBuffer(e))this._addBuffer(e,t);else if(e instanceof Q)this.chunks=this.chunks.concat(e.chunks);else if(typeof e=="object")this._insertAtPosition(e,t);else throw new Error("Invalid script chunk")};Q.prototype._insertAtPosition=function(e,t){t?this.chunks.unshift(e):this.chunks.push(e)};Q.prototype._addOpcode=function(e,t){var r;return typeof e=="number"?r=e:e instanceof he?r=e.toNumber():r=he(e).toNumber(),this._insertAtPosition({opcodenum:r},t),this};Q.prototype._addBuffer=function(e,t){var r,i=e.length;if(i>=0&&i<he.OP_PUSHDATA1)r=i;else if(i<Math.pow(2,8))r=he.OP_PUSHDATA1;else if(i<Math.pow(2,16))r=he.OP_PUSHDATA2;else if(i<Math.pow(2,32))r=he.OP_PUSHDATA4;else throw new Error("You can't push that much data");return this._insertAtPosition({buf:e,len:i,opcodenum:r},t),this};Q.prototype.removeCodeseparators=function(){for(var e=[],t=0;t<this.chunks.length;t++)this.chunks[t].opcodenum!==he.OP_CODESEPARATOR&&e.push(this.chunks[t]);return this.chunks=e,this};Q.buildMultisigOut=function(e,t,r){er.checkArgument(t<=e.length,"Number of required signatures must be less than or equal to the number of public keys"),r=r||{};var i=new Q;i.add(he.smallInt(t)),e=bt.map(e,lf);var n=e;r.noSorting||(n=e.map(s=>s.toString("hex")).sort().map(s=>new lf(s)));for(var o=0;o<n.length;o++){var a=n[o];i.add(a.toBuffer())}return i.add(he.smallInt(e.length)),i.add(he.OP_CHECKMULTISIG),i};Q.buildMultisigIn=function(e,t,r,i){er.checkArgument(bt.isArray(e)),er.checkArgument(bt.isNumber(t)),er.checkArgument(bt.isArray(r)),i=i||{};var n=new Q;return n.add(he.OP_0),bt.each(r,function(o){er.checkArgument(h.Buffer.isBuffer(o),"Signatures must be an array of Buffers"),n.add(o)}),n};Q.buildP2SHMultisigIn=function(e,t,r,i){er.checkArgument(bt.isArray(e)),er.checkArgument(bt.isNumber(t)),er.checkArgument(bt.isArray(r)),i=i||{};var n=new Q;return n.add(he.OP_0),bt.each(r,function(o){er.checkArgument(h.Buffer.isBuffer(o),"Signatures must be an array of Buffers"),n.add(o)}),n.add((i.cachedMultisig||Q.buildMultisigOut(e,t,i)).toBuffer()),n};Q.buildPublicKeyHashOut=function(e){er.checkArgument(!bt.isUndefined(e)),er.checkArgument(e instanceof lf||e instanceof Yn||bt.isString(e)),e instanceof lf?e=e.toAddress():bt.isString(e)&&(e=new Yn(e));var t=new Q;return t.add(he.OP_DUP).add(he.OP_HASH160).add(e.hashBuffer).add(he.OP_EQUALVERIFY).add(he.OP_CHECKSIG),t._network=e.network,t};Q.buildPublicKeyOut=function(e){er.checkArgument(e instanceof lf);var t=new Q;return t.add(e.toBuffer()).add(he.OP_CHECKSIG),t};Q.buildDataOut=function(e,t){er.checkArgument(bt.isUndefined(e)||bt.isString(e)||bt.isArray(e)||h.Buffer.isBuffer(e));var r=e;bt.isArray(r)||(r=[e]);var i=new Q;i.add(he.OP_RETURN);for(let n of r)er.checkArgument(bt.isUndefined(n)||bt.isString(n)||h.Buffer.isBuffer(n)),bt.isString(n)&&(n=h.Buffer.from(n,t)),bt.isUndefined(n)||i.add(n);return i};Q.buildSafeDataOut=function(e,t){var r=Q.buildDataOut(e,t),i=new Q;return i.add(he.OP_FALSE),i.add(r),i};Q.buildScriptHashOut=function(e){er.checkArgument(e instanceof Q||e instanceof Yn&&e.isPayToScriptHash());var t=new Q;return t.add(he.OP_HASH160).add(e instanceof Yn?e.hashBuffer:Wy.sha256ripemd160(e.toBuffer())).add(he.OP_EQUAL),t._network=e._network||e.network,t};Q.buildPublicKeyIn=function(e,t){er.checkArgument(e instanceof cf||h.Buffer.isBuffer(e)),er.checkArgument(bt.isUndefined(t)||bt.isNumber(t)),e instanceof cf&&(e=e.toBuffer());var r=new Q;return r.add(h.Buffer.concat([e,h.Buffer.from([(t||cf.SIGHASH_ALL)&255])])),r};Q.buildPublicKeyHashIn=function(e,t,r){er.checkArgument(t instanceof cf||h.Buffer.isBuffer(t)),er.checkArgument(bt.isUndefined(r)||bt.isNumber(r)),t instanceof cf&&(t=t.toBuffer());var i=new Q().add(h.Buffer.concat([t,h.Buffer.from([(r||cf.SIGHASH_ALL)&255])])).add(new lf(e).toBuffer());return i};Q.empty=function(){return new Q};Q.prototype.toScriptHashOut=function(){return Q.buildScriptHashOut(this)};Q.fromAddress=function(e){if(e=Yn(e),e.isPayToScriptHash())return Q.buildScriptHashOut(e);if(e.isPayToPublicKeyHash())return Q.buildPublicKeyHashOut(e);throw new Yy.Script.UnrecognizedAddress(e)};Q.prototype.getAddressInfo=function(e){if(this._isInput)return this._getInputAddressInfo();if(this._isOutput)return this._getOutputAddressInfo();var t=this._getOutputAddressInfo();return t||this._getInputAddressInfo()};Q.prototype._getOutputAddressInfo=function(){var e={};if(this.isScriptHashOut())e.hashBuffer=this.getData(),e.type=Yn.PayToScriptHash;else if(this.isPublicKeyHashOut())e.hashBuffer=this.getData(),e.type=Yn.PayToPublicKeyHash;else return!1;return e};Q.prototype._getInputAddressInfo=function(){var e={};if(this.isPublicKeyHashIn())e.hashBuffer=Wy.sha256ripemd160(this.chunks[1].buf),e.type=Yn.PayToPublicKeyHash;else if(this.isScriptHashIn())e.hashBuffer=Wy.sha256ripemd160(this.chunks[this.chunks.length-1].buf),e.type=Yn.PayToScriptHash;else return!1;return e};Q.prototype.toAddress=function(e){var t=this.getAddressInfo();return t?(t.network=xk.get(e)||this._network||xk.defaultNetwork,new Yn(t)):!1};Q.prototype.findAndDelete=function(e){for(var t=e.toBuffer(),r=t.toString("hex"),i=0;i<this.chunks.length;i++){var n=Q({chunks:[this.chunks[i]]}),o=n.toBuffer(),a=o.toString("hex");r===a&&this.chunks.splice(i,1)}return this};Q.prototype.checkMinimalPush=function(e){var t=this.chunks[e],r=t.buf,i=t.opcodenum;return r?r.length===0?i===he.OP_0:r.length===1&&r[0]>=1&&r[0]<=16?i===he.OP_1+(r[0]-1):r.length===1&&r[0]===129?i===he.OP_1NEGATE:r.length<=75?i===r.length:r.length<=255?i===he.OP_PUSHDATA1:r.length<=65535?i===he.OP_PUSHDATA2:!0:!0};Q.prototype._decodeOP_N=function(e){if(e===he.OP_0)return 0;if(e>=he.OP_1&&e<=he.OP_16)return e-(he.OP_1-1);throw new Error("Invalid opcode: "+JSON.stringify(e))};Q.prototype.getSignatureOperationsCount=function(e){e=bt.isUndefined(e)?!0:e;var t=this,r=0,i=he.OP_INVALIDOPCODE;return bt.each(t.chunks,function(o){var a=o.opcodenum;a===he.OP_CHECKSIG||a===he.OP_CHECKSIGVERIFY?r++:(a===he.OP_CHECKMULTISIG||a===he.OP_CHECKMULTISIGVERIFY)&&(e&&i>=he.OP_1&&i<=he.OP_16?r+=t._decodeOP_N(i):r+=20),i=a}),r};Ik.exports=Q});var Xy=k((jpe,Ak)=>{v();var qee=Object.prototype.toString;Ak.exports=function(t){if(t===void 0)return"undefined";if(t===null)return"null";var r=typeof t;if(r==="boolean")return"boolean";if(r==="string")return"string";if(r==="number")return"number";if(r==="symbol")return"symbol";if(r==="function")return zee(t)?"generatorfunction":"function";if(Uee(t))return"array";if(Gee(t))return"buffer";if(Vee(t))return"arguments";if(Hee(t))return"date";if(Fee(t))return"error";if(jee(t))return"regexp";switch(Ok(t)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(Kee(t))return"generator";switch(r=qee.call(t),r){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return r.slice(8,-1).toLowerCase().replace(/\s/g,"")};function Ok(e){return typeof e.constructor=="function"?e.constructor.name:null}function Uee(e){return Array.isArray?Array.isArray(e):e instanceof Array}function Fee(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function Hee(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function jee(e){return e instanceof RegExp?!0:typeof e.flags=="string"&&typeof e.ignoreCase=="boolean"&&typeof e.multiline=="boolean"&&typeof e.global=="boolean"}function zee(e,t){return Ok(e)==="GeneratorFunction"}function Kee(e){return typeof e.throw=="function"&&typeof e.return=="function"&&typeof e.next=="function"}function Vee(e){try{if(typeof e.length=="number"&&typeof e.callee=="function")return!0}catch(t){if(t.message.indexOf("callee")!==-1)return!0}return!1}function Gee(e){return e.constructor&&typeof e.constructor.isBuffer=="function"?e.constructor.isBuffer(e):!1}});var kk=k((Kpe,Tk)=>{"use strict";v();var Pk=Symbol.prototype.valueOf,Zee=Xy();function Wee(e,t){switch(Zee(e)){case"array":return e.slice();case"object":return Object.assign({},e);case"date":return new e.constructor(Number(e));case"map":return new Map(e);case"set":return new Set(e);case"buffer":return Jee(e);case"symbol":return Qee(e);case"arraybuffer":return $ee(e);case"float32array":case"float64array":case"int16array":case"int32array":case"int8array":case"uint16array":case"uint32array":case"uint8clampedarray":case"uint8array":return Xee(e);case"regexp":return Yee(e);case"error":return Object.create(e);default:return e}}function Yee(e){let t=e.flags!==void 0?e.flags:/\w+$/.exec(e)||void 0,r=new e.constructor(e.source,t);return r.lastIndex=e.lastIndex,r}function $ee(e){let t=new e.constructor(e.byteLength);return new Uint8Array(t).set(new Uint8Array(e)),t}function Xee(e,t){return new e.constructor(e.buffer,e.byteOffset,e.length)}function Jee(e){let t=e.length,r=h.Buffer.allocUnsafe?h.Buffer.allocUnsafe(t):h.Buffer.from(t);return e.copy(r),r}function Qee(e){return Pk?Object(Pk.call(e)):{}}Tk.exports=Wee});var Bk=k((Gpe,Rk)=>{"use strict";v();Rk.exports=function(t){return t!=null&&typeof t=="object"&&Array.isArray(t)===!1}});var Nk=k((Wpe,Ck)=>{"use strict";v();var ete=Bk();function Mk(e){return ete(e)===!0&&Object.prototype.toString.call(e)==="[object Object]"}Ck.exports=function(t){var r,i;return!(Mk(t)===!1||(r=t.constructor,typeof r!="function")||(i=r.prototype,Mk(i)===!1)||i.hasOwnProperty("isPrototypeOf")===!1)}});var Lk=k(($pe,Dk)=>{"use strict";v();var tte=kk(),rte=Xy(),ite=Nk();function Jy(e,t){switch(rte(e)){case"object":return nte(e,t);case"array":return ote(e,t);default:return tte(e)}}function nte(e,t){if(typeof t=="function")return t(e);if(t||ite(e)){let r=new e.constructor;for(let i in e)r[i]=Jy(e[i],t);return r}return e}function ote(e,t){let r=new e.constructor(e.length);for(let i=0;i<e.length;i++)r[i]=Jy(e[i],t);return r}Dk.exports=Jy});var nl=k((Jpe,Fk)=>{"use strict";v();var qk=Wn(),Uk=La(),ate=fr(),Xn=function e(t){if(!(this instanceof e))return new e(t);if(h.Buffer.isBuffer(t))this.buf=t;else if(typeof t=="number"){var r=t;this.fromNumber(r)}else if(t instanceof ate){var i=t;this.fromBN(i)}else if(t){var n=t;this.set(n)}};Xn.prototype.set=function(e){return this.buf=e.buf||this.buf,this};Xn.prototype.fromString=function(e){return this.set({buf:h.Buffer.from(e,"hex")}),this};Xn.prototype.toString=function(){return this.buf.toString("hex")};Xn.prototype.fromBuffer=function(e){return this.buf=e,this};Xn.prototype.fromBufferReader=function(e){return this.buf=e.readVarintBuf(),this};Xn.prototype.fromBN=function(e){return this.buf=qk().writeVarintBN(e).concat(),this};Xn.prototype.fromNumber=function(e){return this.buf=qk().writeVarintNum(e).concat(),this};Xn.prototype.toBuffer=function(){return this.buf};Xn.prototype.toBN=function(){return Uk(this.buf).readVarintBN()};Xn.prototype.toNumber=function(){return Uk(this.buf).readVarintNum()};Fk.exports=Xn});var qa=k((e6e,jk)=>{"use strict";v();var Yp=Et(),Qy=fr(),Hk=Kt(),$p=pi(),ste=Wn(),ute=nl(),e4=bn(),t4=Bt(),fte=hn(),cte=9007199254740991;function Zr(e){if(!(this instanceof Zr))return new Zr(e);if(Yp.isObject(e))if(this.satoshis=e.satoshis,h.Buffer.isBuffer(e.script))this._scriptBuffer=e.script;else{var t;Yp.isString(e.script)&&$p.isHexa(e.script)?t=Hk.Buffer.from(e.script,"hex"):t=e.script,this.setScript(t)}else throw new TypeError("Unrecognized argument for Output")}Object.defineProperty(Zr.prototype,"script",{configurable:!1,enumerable:!0,get:function(){return this._script?this._script:(this.setScriptFromBuffer(this._scriptBuffer),this._script)}});Object.defineProperty(Zr.prototype,"satoshis",{configurable:!1,enumerable:!0,get:function(){return this._satoshis},set:function(e){e instanceof Qy?(this._satoshisBN=e,this._satoshis=e.toNumber()):Yp.isString(e)?(this._satoshis=parseInt(e),this._satoshisBN=Qy.fromNumber(this._satoshis)):(t4.checkArgument($p.isNaturalNumber(e),"Output satoshis is not a natural number"),this._satoshisBN=Qy.fromNumber(e),this._satoshis=e),t4.checkState($p.isNaturalNumber(this._satoshis),"Output satoshis is not a natural number")}});Zr.prototype.invalidSatoshis=function(){return this._satoshis>cte?"transaction txout satoshis greater than max safe integer":this._satoshis!==this._satoshisBN.toNumber()?"transaction txout satoshis has corrupted value":this._satoshis<0?"transaction txout negative":!1};Object.defineProperty(Zr.prototype,"satoshisBN",{configurable:!1,enumerable:!0,get:function(){return this._satoshisBN},set:function(e){this._satoshisBN=e,this._satoshis=e.toNumber(),t4.checkState($p.isNaturalNumber(this._satoshis),"Output satoshis is not a natural number")}});Zr.prototype.toObject=Zr.prototype.toJSON=function(){var t={satoshis:this.satoshis};return t.script=this._scriptBuffer.toString("hex"),t};Zr.fromObject=function(e){return new Zr(e)};Zr.prototype.setScriptFromBuffer=function(e){this._scriptBuffer=e;try{this._script=e4.fromBuffer(this._scriptBuffer),this._script._isOutput=!0}catch(t){if(t instanceof fte.Script.InvalidBuffer)this._script=null;else throw t}};Zr.prototype.setScript=function(e){if(e instanceof e4)this._scriptBuffer=e.toBuffer(),this._script=e,this._script._isOutput=!0;else if(Yp.isString(e))this._script=e4.fromString(e),this._scriptBuffer=this._script.toBuffer(),this._script._isOutput=!0;else if(h.Buffer.isBuffer(e))this.setScriptFromBuffer(e);else throw new TypeError("Invalid argument type: script");return this};Zr.prototype.inspect=function(){var e;return this.script?e=this.script.inspect():e=this._scriptBuffer.toString("hex"),"<Output ("+this.satoshis+" sats) "+e+">"};Zr.fromBufferReader=function(e){var t={};t.satoshis=e.readUInt64LEBN();var r=e.readVarintNum();return r!==0?t.script=e.read(r):t.script=Hk.Buffer.from([]),new Zr(t)};Zr.prototype.toBufferWriter=function(e){e||(e=new ste),e.writeUInt64LEBN(this._satoshisBN);var t=this._scriptBuffer;return e.writeVarintNum(t.length),e.write(t),e};Zr.prototype.getSize=function(){var e=this.script.toBuffer().length,t=ute(e).toBuffer().length;return 8+t+e};jk.exports=Zr});var ol=k((r6e,Gk)=>{"use strict";v();var Ts=Et(),lte=Bt(),q0=hn(),hte=Wn(),r4=Kt(),Kk=pi(),Xp=bn(),dte=Ua(),zk=qa(),Jp=4294967295,pte=Jp-2,Vk=Jp,gte=Jp-1;function jt(e){if(!(this instanceof jt))return new jt(e);if(e)return this._fromObject(e)}jt.MAXINT=Jp;jt.DEFAULT_SEQNUMBER=Vk;jt.DEFAULT_LOCKTIME_SEQNUMBER=gte;jt.DEFAULT_RBF_SEQNUMBER=pte;jt.BASE_SIZE=40;Object.defineProperty(jt.prototype,"script",{configurable:!1,enumerable:!0,get:function(){return this.isNull()?null:(this._script||(this._script=new Xp(this._scriptBuffer),this._script._isInput=!0),this._script)}});jt.fromObject=function(e){lte.checkArgument(Ts.isObject(e));var t=new jt;return t._fromObject(e)};jt.prototype._fromObject=function(e){var t;if(Ts.isString(e.prevTxId)&&Kk.isHexa(e.prevTxId)?t=r4.Buffer.from(e.prevTxId,"hex"):t=e.prevTxId,this.output=e.output?e.output instanceof zk?e.output:new zk(e.output):void 0,this.prevTxId=t||e.txidbuf,this.outputIndex=Ts.isUndefined(e.outputIndex)?e.txoutnum:e.outputIndex,this.sequenceNumber=Ts.isUndefined(e.sequenceNumber)?Ts.isUndefined(e.seqnum)?Vk:e.seqnum:e.sequenceNumber,Ts.isUndefined(e.script)&&Ts.isUndefined(e.scriptBuffer))throw new q0.Transaction.Input.MissingScript;return this.setScript(e.scriptBuffer||e.script),this};jt.prototype.toObject=jt.prototype.toJSON=function(){var t={prevTxId:this.prevTxId.toString("hex"),outputIndex:this.outputIndex,sequenceNumber:this.sequenceNumber,script:this._scriptBuffer.toString("hex")};return this.script&&(t.scriptString=this.script.toString()),this.output&&(t.output=this.output.toObject()),t};jt.fromBufferReader=function(e){var t=new jt;return t.prevTxId=e.readReverse(32),t.outputIndex=e.readUInt32LE(),t._scriptBuffer=e.readVarLengthBuffer(),t.sequenceNumber=e.readUInt32LE(),t};jt.prototype.toBufferWriter=function(e){e||(e=new hte),e.writeReverse(this.prevTxId),e.writeUInt32LE(this.outputIndex);var t=this._scriptBuffer;return e.writeVarintNum(t.length),e.write(t),e.writeUInt32LE(this.sequenceNumber),e};jt.prototype.setScript=function(e){if(this._script=null,e instanceof Xp)this._script=e,this._script._isInput=!0,this._scriptBuffer=e.toBuffer();else if(e===null)this._script=Xp.empty(),this._script._isInput=!0,this._scriptBuffer=this._script.toBuffer();else if(Kk.isHexa(e))this._scriptBuffer=r4.Buffer.from(e,"hex");else if(Ts.isString(e))this._script=new Xp(e),this._script._isInput=!0,this._scriptBuffer=this._script.toBuffer();else if(h.Buffer.isBuffer(e))this._scriptBuffer=r4.Buffer.from(e);else throw new TypeError("Invalid argument type: script");return this};jt.prototype.getSignatures=function(){throw new q0.AbstractMethodInvoked("Trying to sign unsupported output type (only P2PKH and P2SH multisig inputs are supported) for input: "+JSON.stringify(this))};jt.prototype.isFullySigned=function(){throw new q0.AbstractMethodInvoked("Input#isFullySigned")};jt.prototype.isFinal=function(){return this.sequenceNumber===jt.MAXINT};jt.prototype.addSignature=function(){throw new q0.AbstractMethodInvoked("Input#addSignature")};jt.prototype.clearSignatures=function(){throw new q0.AbstractMethodInvoked("Input#clearSignatures")};jt.prototype.isValidSignature=function(e,t){return t.signature.nhashtype=t.sigtype,dte.verify(e,t.signature,t.publicKey,t.inputIndex,this.output.script,this.output.satoshisBN)};jt.prototype.isNull=function(){return this.prevTxId.toString("hex")==="0000000000000000000000000000000000000000000000000000000000000000"&&this.outputIndex===4294967295};jt.prototype._estimateSize=function(){return this.toBufferWriter().toBuffer().length};Gk.exports=jt});var sl=k((n6e,Yk)=>{"use strict";v();var al=Et(),_n=Bt(),vte=Pe(),Zk=pi(),Wk=$n(),mte=hn(),U0=Vr();function Jn(e){if(!(this instanceof Jn))return new Jn(e);if(e instanceof Jn)return e;if(al.isObject(e))return this._fromObject(e);throw new mte.InvalidArgument("TransactionSignatures must be instantiated from an object")}vte(Jn,U0);Jn.prototype._fromObject=function(e){return this._checkObjectArgs(e),this.publicKey=new Wk(e.publicKey),this.prevTxId=h.Buffer.isBuffer(e.prevTxId)?e.prevTxId:h.Buffer.from(e.prevTxId,"hex"),this.outputIndex=e.outputIndex,this.inputIndex=e.inputIndex,this.signature=e.signature instanceof U0?e.signature:h.Buffer.isBuffer(e.signature)?U0.fromBuffer(e.signature):U0.fromString(e.signature),this.sigtype=e.sigtype,this};Jn.prototype._checkObjectArgs=function(e){_n.checkArgument(Wk(e.publicKey),"publicKey"),_n.checkArgument(!al.isUndefined(e.inputIndex),"inputIndex"),_n.checkArgument(!al.isUndefined(e.outputIndex),"outputIndex"),_n.checkState(al.isNumber(e.inputIndex),"inputIndex must be a number"),_n.checkState(al.isNumber(e.outputIndex),"outputIndex must be a number"),_n.checkArgument(e.signature,"signature"),_n.checkArgument(e.prevTxId,"prevTxId"),_n.checkState(e.signature instanceof U0||h.Buffer.isBuffer(e.signature)||Zk.isHexa(e.signature),"signature must be a buffer or hexa value"),_n.checkState(h.Buffer.isBuffer(e.prevTxId)||Zk.isHexa(e.prevTxId),"prevTxId must be a buffer or hexa value"),_n.checkArgument(e.sigtype,"sigtype"),_n.checkState(al.isNumber(e.sigtype),"sigtype must be a number")};Jn.prototype.toObject=Jn.prototype.toJSON=function(){return{publicKey:this.publicKey.toString(),prevTxId:this.prevTxId.toString("hex"),outputIndex:this.outputIndex,inputIndex:this.inputIndex,signature:this.signature.toString(),sigtype:this.sigtype}};Jn.fromObject=function(e){return _n.checkArgument(e),new Jn(e)};Yk.exports=Jn});var eR=k((a6e,Qk)=>{"use strict";v();var yte=Pe(),Xk=Bt(),i4=ol(),bte=qa(),_te=Ua(),Jk=bn(),$k=Vr(),wte=sl();function Fa(){i4.apply(this,arguments)}yte(Fa,i4);Fa.prototype.getSignatures=function(e,t,r,i){Xk.checkState(this.output instanceof bte),i=i||$k.SIGHASH_ALL|$k.SIGHASH_FORKID;var n=t.toPublicKey();return n.toString()===this.output.script.getPublicKey().toString("hex")?[new wte({publicKey:n,prevTxId:this.prevTxId,outputIndex:this.outputIndex,inputIndex:r,signature:_te.sign(e,t,i,r,this.output.script,this.output.satoshisBN),sigtype:i})]:[]};Fa.prototype.addSignature=function(e,t){return Xk.checkState(this.isValidSignature(e,t),"Signature is invalid"),this.setScript(Jk.buildPublicKeyIn(t.signature.toDER(),t.sigtype)),this};Fa.prototype.clearSignatures=function(){return this.setScript(Jk.empty()),this};Fa.prototype.isFullySigned=function(){return this.script.isPublicKeyIn()};Fa.SCRIPT_MAX_SIZE=74;Fa.prototype._estimateSize=function(){return i4.BASE_SIZE+Fa.SCRIPT_MAX_SIZE};Qk.exports=Fa});var oR=k((u6e,nR)=>{"use strict";v();var Ste=Pe(),rR=Bt(),xte=cr(),n4=ol(),Ete=qa(),Ite=Ua(),iR=bn(),tR=Vr(),Ote=sl();function Ha(){n4.apply(this,arguments)}Ste(Ha,n4);Ha.prototype.getSignatures=function(e,t,r,i,n){rR.checkState(this.output instanceof Ete),n=n||xte.sha256ripemd160(t.publicKey.toBuffer()),i=i||tR.SIGHASH_ALL|tR.SIGHASH_FORKID;var o=this.output.script.chunks[2]&&this.output.script.chunks[2].buf;return o&&n.equals(o)?[new Ote({publicKey:t.publicKey,prevTxId:this.prevTxId,outputIndex:this.outputIndex,inputIndex:r,signature:Ite.sign(e,t,i,r,this.output.script,this.output.satoshisBN),sigtype:i})]:[]};Ha.prototype.addSignature=function(e,t){return rR.checkState(this.isValidSignature(e,t),"Signature is invalid"),this.setScript(iR.buildPublicKeyHashIn(t.publicKey,t.signature.toDER(),t.sigtype)),this};Ha.prototype.clearSignatures=function(){return this.setScript(iR.empty()),this};Ha.prototype.isFullySigned=function(){return this.script.isPublicKeyHashIn()};Ha.SCRIPT_MAX_SIZE=108;Ha.prototype._estimateSize=function(){return n4.BASE_SIZE+Ha.SCRIPT_MAX_SIZE};nR.exports=Ha});var uR=k((c6e,sR)=>{"use strict";v();var Qn=Et(),Ate=Pe(),e6=ol(),Pte=qa(),F0=Bt(),aR=bn(),Qp=Vr(),o4=Ua(),a4=sl(),Tte=$n(),kte=nl();function Br(e,t,r,i){e6.apply(this,arguments);var n=this;t=t||e.publicKeys,r=r||e.threshold,i=i||e.signatures,this.publicKeys=t.map(o=>o.toString("hex")).sort().map(o=>new Tte(o)),F0.checkState(aR.buildMultisigOut(this.publicKeys,r).equals(this.output.script),"Provided public keys don't match to the provided output script"),this.publicKeyIndex={},Qn.each(this.publicKeys,function(o,a){n.publicKeyIndex[o.toString()]=a}),this.threshold=r,this.signatures=i?this._deserializeSignatures(i):new Array(this.publicKeys.length)}Ate(Br,e6);Br.prototype.toObject=function(){var e=e6.prototype.toObject.apply(this,arguments);return e.threshold=this.threshold,e.publicKeys=Qn.map(this.publicKeys,function(t){return t.toString()}),e.signatures=this._serializeSignatures(),e};Br.prototype._deserializeSignatures=function(e){return Qn.map(e,function(t){if(t)return new a4(t)})};Br.prototype._serializeSignatures=function(){return Qn.map(this.signatures,function(e){if(e)return e.toObject()})};Br.prototype.getSignatures=function(e,t,r,i){F0.checkState(this.output instanceof Pte),i=i||Qp.SIGHASH_ALL|Qp.SIGHASH_FORKID;var n=this,o=[];return Qn.each(this.publicKeys,function(a){a.toString()===t.publicKey.toString()&&o.push(new a4({publicKey:t.publicKey,prevTxId:n.prevTxId,outputIndex:n.outputIndex,inputIndex:r,signature:o4.sign(e,t,i,r,n.output.script,n.output.satoshisBN),sigtype:i}))}),o};Br.prototype.addSignature=function(e,t){return F0.checkState(!this.isFullySigned(),"All needed signatures have already been added"),F0.checkArgument(!Qn.isUndefined(this.publicKeyIndex[t.publicKey.toString()]),"Signature has no matching public key"),F0.checkState(this.isValidSignature(e,t)),this.signatures[this.publicKeyIndex[t.publicKey.toString()]]=t,this._updateScript(),this};Br.prototype._updateScript=function(){return this.setScript(aR.buildMultisigIn(this.publicKeys,this.threshold,this._createSignatures())),this};Br.prototype._createSignatures=function(){return Qn.map(Qn.filter(this.signatures,function(e){return!Qn.isUndefined(e)}),function(e){return h.Buffer.concat([e.signature.toDER(),h.Buffer.from([e.sigtype&255])])})};Br.prototype.clearSignatures=function(){this.signatures=new Array(this.publicKeys.length),this._updateScript()};Br.prototype.isFullySigned=function(){return this.countSignatures()===this.threshold};Br.prototype.countMissingSignatures=function(){return this.threshold-this.countSignatures()};Br.prototype.countSignatures=function(){return Qn.reduce(this.signatures,function(e,t){return e+!!t},0)};Br.prototype.publicKeysWithoutSignature=function(){var e=this;return Qn.filter(this.publicKeys,function(t){return!e.signatures[e.publicKeyIndex[t.toString()]]})};Br.prototype.isValidSignature=function(e,t){return t.signature.nhashtype=t.sigtype,o4.verify(e,t.signature,t.publicKey,t.inputIndex,this.output.script,this.output.satoshisBN)};Br.normalizeSignatures=function(e,t,r,i,n){return n.map(function(o){var a=null;return i=i.filter(function(s){if(a)return!0;var u=new a4({signature:Qp.fromTxFormat(s),publicKey:o,prevTxId:t.prevTxId,outputIndex:t.outputIndex,inputIndex:r,sigtype:Qp.SIGHASH_ALL});u.signature.nhashtype=u.sigtype;var c=o4.verify(e,u.signature,u.publicKey,u.inputIndex,t.output.script);return c?(a=u,!1):!0}),a||null})};Br.SIGNATURE_SIZE=73;Br.prototype._estimateSize=function(){var e=1+this.threshold*Br.SIGNATURE_SIZE;return e6.BASE_SIZE+kte(e).toBuffer().length+e};sR.exports=Br});var dR=k((h6e,hR)=>{"use strict";v();var eo=Et(),Rte=Pe(),t6=ol(),Bte=qa(),H0=Bt(),s4=bn(),fR=Vr(),cR=Ua(),lR=sl(),Mte=$n(),Cte=nl();function Er(e,t,r,i){t6.apply(this,arguments);var n=this;t=t||e.publicKeys,r=r||e.threshold,i=i||e.signatures,this.publicKeys=t.map(o=>o.toString("hex")).sort().map(o=>new Mte(o)),this.redeemScript=s4.buildMultisigOut(this.publicKeys,r),H0.checkState(s4.buildScriptHashOut(this.redeemScript).equals(this.output.script),"Provided public keys don't hash to the provided output"),this.publicKeyIndex={},eo.each(this.publicKeys,function(o,a){n.publicKeyIndex[o.toString()]=a}),this.threshold=r,this.signatures=i?this._deserializeSignatures(i):new Array(this.publicKeys.length)}Rte(Er,t6);Er.prototype.toObject=function(){var e=t6.prototype.toObject.apply(this,arguments);return e.threshold=this.threshold,e.publicKeys=eo.map(this.publicKeys,function(t){return t.toString()}),e.signatures=this._serializeSignatures(),e};Er.prototype._deserializeSignatures=function(e){return eo.map(e,function(t){if(t)return new lR(t)})};Er.prototype._serializeSignatures=function(){return eo.map(this.signatures,function(e){if(e)return e.toObject()})};Er.prototype.getSignatures=function(e,t,r,i){H0.checkState(this.output instanceof Bte),i=i||fR.SIGHASH_ALL|fR.SIGHASH_FORKID;var n=this,o=[];return eo.each(this.publicKeys,function(a){a.toString()===t.publicKey.toString()&&o.push(new lR({publicKey:t.publicKey,prevTxId:n.prevTxId,outputIndex:n.outputIndex,inputIndex:r,signature:cR.sign(e,t,i,r,n.redeemScript,n.output.satoshisBN),sigtype:i}))}),o};Er.prototype.addSignature=function(e,t){return H0.checkState(!this.isFullySigned(),"All needed signatures have already been added"),H0.checkArgument(!eo.isUndefined(this.publicKeyIndex[t.publicKey.toString()]),"Signature has no matching public key"),H0.checkState(this.isValidSignature(e,t)),this.signatures[this.publicKeyIndex[t.publicKey.toString()]]=t,this._updateScript(),this};Er.prototype._updateScript=function(){return this.setScript(s4.buildP2SHMultisigIn(this.publicKeys,this.threshold,this._createSignatures(),{cachedMultisig:this.redeemScript})),this};Er.prototype._createSignatures=function(){return eo.map(eo.filter(this.signatures,function(e){return!eo.isUndefined(e)}),function(e){return h.Buffer.concat([e.signature.toDER(),h.Buffer.from([e.sigtype&255])])})};Er.prototype.clearSignatures=function(){this.signatures=new Array(this.publicKeys.length),this._updateScript()};Er.prototype.isFullySigned=function(){return this.countSignatures()===this.threshold};Er.prototype.countMissingSignatures=function(){return this.threshold-this.countSignatures()};Er.prototype.countSignatures=function(){return eo.reduce(this.signatures,function(e,t){return e+!!t},0)};Er.prototype.publicKeysWithoutSignature=function(){var e=this;return eo.filter(this.publicKeys,function(t){return!e.signatures[e.publicKeyIndex[t.toString()]]})};Er.prototype.isValidSignature=function(e,t){return t.signature.nhashtype=t.sigtype,cR.verify(e,t.signature,t.publicKey,t.inputIndex,this.redeemScript,this.output.satoshisBN)};Er.SIGNATURE_SIZE=73;Er.PUBKEY_SIZE=34;Er.prototype._estimateSize=function(){var e=this.publicKeys.length*Er.PUBKEY_SIZE,t=this.threshold*Er.SIGNATURE_SIZE,r=3+e,i=r<=75?1:r<=255?2:3,n=t+1+i+r;return t6.BASE_SIZE+Cte(n).toBuffer().length+n};hR.exports=Er});var r6=k((p6e,ul)=>{v();ul.exports=ol();ul.exports.PublicKey=eR();ul.exports.PublicKeyHash=oR();ul.exports.MultiSig=uR();ul.exports.MultiSigScriptHash=dR()});var Ua=k((v6e,yR)=>{"use strict";v();var Nte=Kt(),Hi=Vr(),u4=bn(),Dte=qa(),Lte=La(),j0=Wn(),pR=fr(),i6=cr(),gR=o6(),f4=Bt(),c4=n6(),ks=Et(),vR=h.Buffer.from("0000000000000000000000000000000000000000000000000000000000000001","hex"),qte="ffffffffffffffff",Ute=c4.SCRIPT_ENABLE_SIGHASH_FORKID,Fte=function(e,t,r,i,n){var o=e.inputs[r];f4.checkArgument(n instanceof pR,"For ForkId=0 signatures, satoshis or complete input must be provided");function a(M){var D=new j0;ks.each(M.inputs,function(K){D.writeReverse(K.prevTxId),D.writeUInt32LE(K.outputIndex)});var L=D.toBuffer(),U=i6.sha256sha256(L);return U}function s(M){var D=new j0;ks.each(M.inputs,function(K){D.writeUInt32LE(K.sequenceNumber)});var L=D.toBuffer(),U=i6.sha256sha256(L);return U}function u(M,D){var L=new j0;ks.isUndefined(D)?ks.each(M.outputs,function(C){C.toBufferWriter(L)}):M.outputs[D].toBufferWriter(L);var U=L.toBuffer(),K=i6.sha256sha256(U);return K}var c=h.Buffer.alloc(32),l=h.Buffer.alloc(32),m=h.Buffer.alloc(32);t&Hi.SIGHASH_ANYONECANPAY||(c=a(e)),!(t&Hi.SIGHASH_ANYONECANPAY)&&(t&31)!==Hi.SIGHASH_SINGLE&&(t&31)!==Hi.SIGHASH_NONE&&(l=s(e)),(t&31)!==Hi.SIGHASH_SINGLE&&(t&31)!==Hi.SIGHASH_NONE?m=u(e):(t&31)===Hi.SIGHASH_SINGLE&&r<e.outputs.length&&(m=u(e,r));var w=new j0;w.writeInt32LE(e.version),w.write(c),w.write(l),w.writeReverse(o.prevTxId),w.writeUInt32LE(o.outputIndex),w.writeVarintNum(i.toBuffer().length),w.write(i.toBuffer()),w.writeUInt64LEBN(n);var E=o.sequenceNumber;w.writeUInt32LE(E),w.write(m),w.writeUInt32LE(e.nLockTime),w.writeUInt32LE(t>>>0);var P=w.toBuffer();return P},mR=function(t,r,i,n,o,a){var s=h4(),u=r6();ks.isUndefined(a)&&(a=Ute);var c=s.shallowCopy(t);if(n=new u4(n),a&c4.SCRIPT_ENABLE_REPLAY_PROTECTION){var l=r>>8,m=16711680|l^57005;r=m<<8|r&255}if(r&Hi.SIGHASH_FORKID&&a&c4.SCRIPT_ENABLE_SIGHASH_FORKID)return Fte(c,r,i,n,o);n.removeCodeseparators();var w;for(w=0;w<c.inputs.length;w++)c.inputs[w]=new u(c.inputs[w]).setScript(u4.empty());if(c.inputs[i]=new u(c.inputs[i]).setScript(n),(r&31)===Hi.SIGHASH_NONE||(r&31)===Hi.SIGHASH_SINGLE)for(w=0;w<c.inputs.length;w++)w!==i&&(c.inputs[w].sequenceNumber=0);if((r&31)===Hi.SIGHASH_NONE)c.outputs=[];else if((r&31)===Hi.SIGHASH_SINGLE){if(i>=c.outputs.length)return vR;for(c.outputs.length=i+1,w=0;w<i;w++)c.outputs[w]=new Dte({satoshis:pR.fromBuffer(Nte.Buffer.from(qte,"hex")),script:u4.empty()})}r&Hi.SIGHASH_ANYONECANPAY&&(c.inputs=[c.inputs[i]]);var E=new j0().write(c.toBuffer()).writeInt32LE(r).toBuffer();return E},l4=function(t,r,i,n,o,a){var s=mR(t,r,i,n,o,a);if(s.compare(vR)===0)return s;var u=i6.sha256sha256(s);return u=new Lte(u).readReverse(),u};function Hte(e,t,r,i,n,o,a){var s=l4(e,r,i,n,o,a),u=gR.sign(s,t,"little").set({nhashtype:r});return u}function jte(e,t,r,i,n,o,a){f4.checkArgument(!ks.isUndefined(e)),f4.checkArgument(!ks.isUndefined(t)&&!ks.isUndefined(t.nhashtype));var s=l4(e,t.nhashtype,i,n,o,a);return gR.verify(s,t,r,"little")}yR.exports={sighashPreimage:mR,sighash:l4,sign:Hte,verify:jte}});var d4=k((y6e,_R)=>{"use strict";v();var ja=Et(),a6=Bt(),bR=pi(),zte=bn(),Kte=hf();function za(e){if(!(this instanceof za))return new za(e);a6.checkArgument(ja.isObject(e),"Must provide an object from where to extract data");var t=e.address?new Kte(e.address):void 0,r=e.txid?e.txid:e.txId;if(!r||!bR.isHexaString(r)||r.length>64)throw new Error("Invalid TXID in object",e);var i=ja.isUndefined(e.vout)?e.outputIndex:e.vout;if(!ja.isNumber(i))throw new Error("Invalid outputIndex, received "+i);a6.checkArgument(!ja.isUndefined(e.scriptPubKey)||!ja.isUndefined(e.script),"Must provide the scriptPubKey for that output!");var n=new zte(e.scriptPubKey||e.script);a6.checkArgument(!ja.isUndefined(e.amount)||!ja.isUndefined(e.satoshis),"Must provide an amount for the output");var o=ja.isUndefined(e.amount)?e.satoshis:Math.round(e.amount*1e8);a6.checkArgument(ja.isNumber(o),"Amount must be a number"),bR.defineImmutable(this,{address:t,txId:r,outputIndex:i,script:n,satoshis:o})}za.prototype.inspect=function(){return"<UnspentOutput: "+this.txId+":"+this.outputIndex+", satoshis: "+this.satoshis+", address: "+this.address+">"};za.prototype.toString=function(){return this.txId+":"+this.outputIndex};za.fromObject=function(e){return new za(e)};za.prototype.toObject=za.prototype.toJSON=function(){return{address:this.address?this.address.toString():void 0,txid:this.txId,vout:this.outputIndex,scriptPubKey:this.script.toBuffer().toString("hex"),amount:Number.parseFloat((this.satoshis/1e8).toFixed(8))}};_R.exports=za});var h4=k((_6e,PR)=>{"use strict";v();var Ee=Et(),Wr=Bt(),Vte=Kt(),Cr=hn(),SR=pi(),xR=La(),Gte=Wn(),wR=nl(),ER=cr(),u6=Vr(),IR=Ua(),Zte=hf(),OR=d4(),Mr=r6(),Wte=Mr.PublicKeyHash,Yte=Mr.PublicKey,$te=Mr.MultiSigScriptHash,Xte=Mr.MultiSig,to=qa(),Do=bn(),Jte=z0(),s6=fr(),Qte=n6(),ere=Qte.SCRIPT_ENABLE_SIGHASH_FORKID;function fe(e){if(!(this instanceof fe))return new fe(e);if(this.inputs=[],this.outputs=[],this._inputAmount=void 0,this._outputAmount=void 0,e){if(e instanceof fe)return fe.shallowCopy(e);if(SR.isHexa(e))this.fromString(e);else if(h.Buffer.isBuffer(e))this.fromBuffer(e);else if(Ee.isObject(e))this.fromObject(e);else throw new Cr.InvalidArgument("Must provide an object or string to deserialize a transaction")}else this._newTransaction()}var tre=1,rre=0,ire=1e6;fe.DUST_AMOUNT=546;fe.FEE_SECURITY_MARGIN=150;fe.MAX_MONEY=21e6*1e8;fe.NLOCKTIME_BLOCKHEIGHT_LIMIT=5e8;fe.NLOCKTIME_MAX_VALUE=4294967295;fe.FEE_PER_KB=500;fe.CHANGE_OUTPUT_MAX_SIZE=62;fe.shallowCopy=function(e){var t=new fe(e.toBuffer());return t};var AR={configurable:!1,enumerable:!0,get:function(){return this._hash=new xR(this._getHash()).readReverse().toString("hex"),this._hash}};Object.defineProperty(fe.prototype,"hash",AR);Object.defineProperty(fe.prototype,"id",AR);var p4={configurable:!1,enumerable:!0,get:function(){return this._getInputAmount()}};Object.defineProperty(fe.prototype,"inputAmount",p4);p4.get=function(){return this._getOutputAmount()};Object.defineProperty(fe.prototype,"outputAmount",p4);fe.prototype._getHash=function(){return ER.sha256sha256(this.toBuffer())};fe.prototype.serialize=function(e){return e===!0||e&&e.disableAll?this.uncheckedSerialize():this.checkedSerialize(e)};fe.prototype.uncheckedSerialize=fe.prototype.toString=function(){return this.toBuffer().toString("hex")};fe.prototype.checkedSerialize=function(e){var t=this.getSerializationError(e);if(t)throw t.message+=" - For more information please see: https://bsv.io/api/lib/transaction#serialization-checks",t;return this.uncheckedSerialize()};fe.prototype.invalidSatoshis=function(){for(var e=!1,t=0;t<this.outputs.length;t++)this.outputs[t].invalidSatoshis()&&(e=!0);return e};fe.prototype.getSerializationError=function(e){if(e=e||{},this.invalidSatoshis())return new Cr.Transaction.InvalidSatoshis;var t=this._getUnspentValue(),r;return t<0?e.disableMoreOutputThanInput||(r=new Cr.Transaction.InvalidOutputAmountSum):r=this._hasFeeError(e,t),r||this._hasDustOutputs(e)||this._isMissingSignatures(e)};fe.prototype._hasFeeError=function(e,t){if(!Ee.isUndefined(this._fee)&&this._fee!==t)return new Cr.Transaction.FeeError.Different("Unspent value is "+t+" but specified fee is "+this._fee);if(!e.disableLargeFees){var r=Math.floor(fe.FEE_SECURITY_MARGIN*this._estimateFee());if(t>r)return this._missingChange()?new Cr.Transaction.ChangeAddressMissing("Fee is too large and no change address was provided"):new Cr.Transaction.FeeError.TooLarge("expected less than "+r+" but got "+t)}};fe.prototype._missingChange=function(){return!this._changeScript};fe.prototype._hasDustOutputs=function(e){if(!e.disableDustOutputs){var t,r;for(t in this.outputs)if(r=this.outputs[t],r.satoshis<fe.DUST_AMOUNT&&!r.script.isDataOut()&&!r.script.isSafeDataOut())return new Cr.Transaction.DustOutputs}};fe.prototype._isMissingSignatures=function(e){if(!e.disableIsFullySigned&&!this.isFullySigned())return new Cr.Transaction.MissingSignatures};fe.prototype.inspect=function(){return"<Transaction: "+this.uncheckedSerialize()+">"};fe.prototype.toBuffer=function(){var e=new Gte;return this.toBufferWriter(e).toBuffer()};fe.prototype.toBufferWriter=function(e){return e.writeInt32LE(this.version),e.writeVarintNum(this.inputs.length),Ee.each(this.inputs,function(t){t.toBufferWriter(e)}),e.writeVarintNum(this.outputs.length),Ee.each(this.outputs,function(t){t.toBufferWriter(e)}),e.writeUInt32LE(this.nLockTime),e};fe.prototype.fromBuffer=function(e){var t=new xR(e);return this.fromBufferReader(t)};fe.prototype.fromBufferReader=function(e){Wr.checkArgument(!e.finished(),"No transaction data received");var t,r,i;for(this.version=e.readInt32LE(),r=e.readVarintNum(),t=0;t<r;t++){var n=Mr.fromBufferReader(e);this.inputs.push(n)}for(i=e.readVarintNum(),t=0;t<i;t++)this.outputs.push(to.fromBufferReader(e));return this.nLockTime=e.readUInt32LE(),this};fe.prototype.toObject=fe.prototype.toJSON=function(){var t=[];this.inputs.forEach(function(n){t.push(n.toObject())});var r=[];this.outputs.forEach(function(n){r.push(n.toObject())});var i={hash:this.hash,version:this.version,inputs:t,outputs:r,nLockTime:this.nLockTime};return this._changeScript&&(i.changeScript=this._changeScript.toString()),Ee.isUndefined(this._changeIndex)||(i.changeIndex=this._changeIndex),Ee.isUndefined(this._fee)||(i.fee=this._fee),i};fe.prototype.fromObject=function(t){Wr.checkArgument(Ee.isObject(t)||t instanceof fe);var r=this,i;return t instanceof fe?i=i.toObject():i=t,Ee.each(i.inputs,function(n){if(!n.output||!n.output.script){r.uncheckedAddInput(new Mr(n));return}var o=new Do(n.output.script),a;if(o.isPublicKeyHashOut())a=new Mr.PublicKeyHash(n);else if(o.isScriptHashOut()&&n.publicKeys&&n.threshold)a=new Mr.MultiSigScriptHash(n,n.publicKeys,n.threshold,n.signatures);else if(o.isPublicKeyOut())a=new Mr.PublicKey(n);else throw new Cr.Transaction.Input.UnsupportedScript(n.output.script);r.addInput(a)}),Ee.each(i.outputs,function(n){r.addOutput(new to(n))}),i.changeIndex&&(this._changeIndex=i.changeIndex),i.changeScript&&(this._changeScript=new Do(i.changeScript)),i.fee&&(this._fee=i.fee),this.nLockTime=i.nLockTime,this.version=i.version,this._checkConsistency(t),this};fe.prototype._checkConsistency=function(e){Ee.isUndefined(this._changeIndex)||(Wr.checkState(this._changeScript,"Change script is expected."),Wr.checkState(this.outputs[this._changeIndex],"Change index points to undefined output."),Wr.checkState(this.outputs[this._changeIndex].script.toString()===this._changeScript.toString(),"Change output has an unexpected script.")),e&&e.hash&&Wr.checkState(e.hash===this.hash,"Hash in object does not match transaction hash.")};fe.prototype.lockUntilDate=function(e){if(Wr.checkArgument(e),Ee.isNumber(e)&&e<fe.NLOCKTIME_BLOCKHEIGHT_LIMIT)throw new Cr.Transaction.LockTimeTooEarly;Ee.isDate(e)&&(e=e.getTime()/1e3);for(var t=0;t<this.inputs.length;t++)this.inputs[t].sequenceNumber===Mr.DEFAULT_SEQNUMBER&&(this.inputs[t].sequenceNumber=Mr.DEFAULT_LOCKTIME_SEQNUMBER);return this.nLockTime=e,this};fe.prototype.lockUntilBlockHeight=function(e){if(Wr.checkArgument(Ee.isNumber(e)),e>=fe.NLOCKTIME_BLOCKHEIGHT_LIMIT)throw new Cr.Transaction.BlockHeightTooHigh;if(e<0)throw new Cr.Transaction.NLockTimeOutOfRange;for(var t=0;t<this.inputs.length;t++)this.inputs[t].sequenceNumber===Mr.DEFAULT_SEQNUMBER&&(this.inputs[t].sequenceNumber=Mr.DEFAULT_LOCKTIME_SEQNUMBER);return this.nLockTime=e,this};fe.prototype.getLockTime=function(){return this.nLockTime?this.nLockTime<fe.NLOCKTIME_BLOCKHEIGHT_LIMIT?this.nLockTime:new Date(1e3*this.nLockTime):null};fe.prototype.fromString=function(e){this.fromBuffer(Vte.Buffer.from(e,"hex"))};fe.prototype._newTransaction=function(){this.version=tre,this.nLockTime=rre};fe.prototype.from=function(e,t,r){if(Ee.isArray(e)){var i=this;return Ee.each(e,function(o){i.from(o,t,r)}),this}var n=Ee.some(this.inputs,function(o){return o.prevTxId.toString("hex")===e.txId&&o.outputIndex===e.outputIndex});return n?this:(t&&r?this._fromMultisigUtxo(e,t,r):this._fromNonP2SH(e),this)};fe.prototype._fromNonP2SH=function(e){var t;e=new OR(e),e.script.isPublicKeyHashOutPrefix()?t=Wte:e.script.isPublicKeyOut()?t=Yte:t=Mr,this.addInput(new t({output:new to({script:e.script,satoshis:e.satoshis}),prevTxId:e.txId,outputIndex:e.outputIndex,script:Do.empty()}))};fe.prototype._fromMultisigUtxo=function(e,t,r){Wr.checkArgument(r<=t.length,"Number of required signatures must be greater than the number of public keys");var i;if(e=new OR(e),e.script.isMultisigOut())i=Xte;else if(e.script.isScriptHashOut())i=$te;else throw new Cr.Transaction.Input.UnsupportedScript(e.script.toString());this.addInput(new i({output:new to({script:e.script,satoshis:e.satoshis}),prevTxId:e.txId,outputIndex:e.outputIndex,script:Do.empty()},t,r))};fe.prototype.addInput=function(e,t,r){if(Wr.checkArgumentType(e,Mr,"input"),!e.output&&(Ee.isUndefined(t)||Ee.isUndefined(r)))throw new Cr.Transaction.NeedMoreInfo("Need information about the UTXO script and satoshis");return!e.output&&t&&!Ee.isUndefined(r)&&(t=t instanceof Do?t:new Do(t),Wr.checkArgumentType(r,"number","satoshis"),e.output=new to({script:t,satoshis:r})),this.uncheckedAddInput(e)};fe.prototype.uncheckedAddInput=function(e){return Wr.checkArgumentType(e,Mr,"input"),this.inputs.push(e),this._inputAmount=void 0,this._updateChangeOutput(),this};fe.prototype.hasAllUtxoInfo=function(){return Ee.every(this.inputs.map(function(e){return!!e.output}))};fe.prototype.fee=function(e){return Wr.checkArgument(Ee.isNumber(e),"amount must be a number"),this._fee=e,this._updateChangeOutput(),this};fe.prototype.feePerKb=function(e){return Wr.checkArgument(Ee.isNumber(e),"amount must be a number"),this._feePerKb=e,this._updateChangeOutput(),this};fe.prototype.change=function(e){return Wr.checkArgument(e,"address is required"),this._changeScript=Do.fromAddress(e),this._updateChangeOutput(),this};fe.prototype.getChangeOutput=function(){return Ee.isUndefined(this._changeIndex)?null:this.outputs[this._changeIndex]};fe.prototype.to=function(e,t){if(Ee.isArray(e)){var r=this;return Ee.each(e,function(i){r.to(i.address,i.satoshis)}),this}return Wr.checkArgument(SR.isNaturalNumber(t),"Amount is expected to be a positive integer"),this.addOutput(new to({script:Do(new Zte(e)),satoshis:t})),this};fe.prototype.addData=function(e){return this.addOutput(new to({script:Do.buildDataOut(e),satoshis:0})),this};fe.prototype.addSafeData=function(e){return this.addOutput(new to({script:Do.buildSafeDataOut(e),satoshis:0})),this};fe.prototype.addOutput=function(e){return Wr.checkArgumentType(e,to,"output"),this._addOutput(e),this._updateChangeOutput(),this};fe.prototype.clearOutputs=function(){return this.outputs=[],this._clearSignatures(),this._outputAmount=void 0,this._changeIndex=void 0,this._updateChangeOutput(),this};fe.prototype._addOutput=function(e){this.outputs.push(e),this._outputAmount=void 0};fe.prototype._getOutputAmount=function(){if(Ee.isUndefined(this._outputAmount)){var e=this;this._outputAmount=0,Ee.each(this.outputs,function(t){e._outputAmount+=t.satoshis})}return this._outputAmount};fe.prototype._getInputAmount=function(){if(Ee.isUndefined(this._inputAmount)){var e=this;this._inputAmount=0,Ee.each(this.inputs,function(t){if(Ee.isUndefined(t.output))throw new Cr.Transaction.Input.MissingPreviousOutput;e._inputAmount+=t.output.satoshis})}return this._inputAmount};fe.prototype._updateChangeOutput=function(){if(this._changeScript){this._clearSignatures(),Ee.isUndefined(this._changeIndex)||this._removeOutput(this._changeIndex),this._changeIndex=this.outputs.length,this._addOutput(new to({script:this._changeScript,satoshis:0}));var e=this._getUnspentValue(),t=this.getFee(),r=e-t;this._removeOutput(this._changeIndex),this._changeIndex=void 0,r>=fe.DUST_AMOUNT&&(this._changeIndex=this.outputs.length,this._addOutput(new to({script:this._changeScript,satoshis:r})))}};fe.prototype.getFee=function(){return this.isCoinbase()?0:Ee.isUndefined(this._fee)?this._changeScript?this._estimateFee():this._getUnspentValue():this._fee};fe.prototype._estimateFee=function(){var e=this._estimateSize();return Math.ceil(e/1e3*(this._feePerKb||fe.FEE_PER_KB))};fe.prototype._getUnspentValue=function(){return this._getInputAmount()-this._getOutputAmount()};fe.prototype._clearSignatures=function(){Ee.each(this.inputs,function(e){e.clearSignatures!==Mr.prototype.clearSignatures&&e.clearSignatures()})};fe.prototype._estimateSize=function(){var e=8;return e+=wR(this.inputs.length).toBuffer().length,e+=wR(this.outputs.length).toBuffer().length,Ee.each(this.inputs,function(t){e+=t._estimateSize()}),Ee.each(this.outputs,function(t){e+=t.getSize()}),e};fe.prototype._removeOutput=function(e){var t=this.outputs[e];this.outputs=Ee.without(this.outputs,t),this._outputAmount=void 0};fe.prototype.removeOutput=function(e){this._removeOutput(e),this._updateChangeOutput()};fe.prototype.sort=function(){return this.sortInputs(function(e){var t=Array.prototype.concat.apply([],e);return t.sort(function(r,i){return r.prevTxId.compare(i.prevTxId)||r.outputIndex-i.outputIndex}),t}),this.sortOutputs(function(e){var t=Array.prototype.concat.apply([],e);return t.sort(function(r,i){return r.satoshis-i.satoshis||r.script.toBuffer().compare(i.script.toBuffer())}),t}),this};fe.prototype.shuffleOutputs=function(){return this.sortOutputs(Ee.shuffle)};fe.prototype.sortOutputs=function(e){var t=e(this.outputs);return this._newOutputOrder(t)};fe.prototype.sortInputs=function(e){return this.inputs=e(this.inputs),this._clearSignatures(),this};fe.prototype._newOutputOrder=function(e){var t=this.outputs.length!==e.length||Ee.difference(this.outputs,e).length!==0;if(t)throw new Cr.Transaction.InvalidSorting;if(!Ee.isUndefined(this._changeIndex)){var r=this.outputs[this._changeIndex];this._changeIndex=e.indexOf(r)}return this.outputs=e,this};fe.prototype.removeInput=function(e,t){var r;if(!t&&Ee.isNumber(e)?r=e:r=Ee.findIndex(this.inputs,function(n){return n.prevTxId.toString("hex")===e&&n.outputIndex===t}),r<0||r>=this.inputs.length)throw new Cr.Transaction.InvalidIndex(r,this.inputs.length);var i=this.inputs[r];this.inputs=Ee.without(this.inputs,i),this._inputAmount=void 0,this._updateChangeOutput()};fe.prototype.sign=function(e,t){Wr.checkState(this.hasAllUtxoInfo(),"Not all utxo information is available to sign the transaction.");var r=this;return Ee.isArray(e)?(Ee.each(e,function(i){r.sign(i,t)}),this):(Ee.each(this.getSignatures(e,t),function(i){r.applySignature(i)}),this)};fe.prototype.getSignatures=function(e,t){e=new Jte(e),t=t||u6.SIGHASH_ALL|u6.SIGHASH_FORKID;var r=this,i=[],n=ER.sha256ripemd160(e.publicKey.toBuffer());return Ee.each(this.inputs,function(a,s){Ee.each(a.getSignatures(r,e,s,t,n),function(u){i.push(u)})}),i};fe.prototype.applySignature=function(e){return this.inputs[e.inputIndex].addSignature(this,e),this};fe.prototype.isFullySigned=function(){return Ee.each(this.inputs,function(e){if(e.isFullySigned===Mr.prototype.isFullySigned)throw new Cr.Transaction.UnableToVerifySignature("Unrecognized script kind, or not enough information to execute script.This usually happens when creating a transaction from a serialized transaction")}),Ee.every(Ee.map(this.inputs,function(e){return e.isFullySigned()}))};fe.prototype.isValidSignature=function(e){var t=this;if(this.inputs[e.inputIndex].isValidSignature===Mr.prototype.isValidSignature)throw new Cr.Transaction.UnableToVerifySignature("Unrecognized script kind, or not enough information to execute script.This usually happens when creating a transaction from a serialized transaction");return this.inputs[e.inputIndex].isValidSignature(t,e)};fe.prototype.verifySignature=function(e,t,r,i,n,o){return IR.verify(this,e,t,r,i,n,o)};fe.prototype.verify=function(){if(this.inputs.length===0)return"transaction txins empty";if(this.outputs.length===0)return"transaction txouts empty";for(var e=new s6(0),t=0;t<this.outputs.length;t++){var r=this.outputs[t];if(r.invalidSatoshis())return"transaction txout "+t+" satoshis is invalid";if(r._satoshisBN.gt(new s6(fe.MAX_MONEY,10)))return"transaction txout "+t+" greater than MAX_MONEY";if(e=e.add(r._satoshisBN),e.gt(new s6(fe.MAX_MONEY)))return"transaction txout "+t+" total output greater than MAX_MONEY"}if(this.toBuffer().length>ire)return"transaction over the maximum block size";var i={};for(t=0;t<this.inputs.length;t++){var n=this.inputs[t],o=n.prevTxId+":"+n.outputIndex;if(!Ee.isUndefined(i[o]))return"transaction input "+t+" duplicate input";i[o]=!0}var a=this.isCoinbase();if(a){var s=this.inputs[0]._scriptBuffer;if(s.length<2||s.length>100)return"coinbase transaction script size invalid"}else for(t=0;t<this.inputs.length;t++)if(this.inputs[t].isNull())return"transaction input "+t+" has null input";return!0};fe.prototype.isCoinbase=function(){return this.inputs.length===1&&this.inputs[0].isNull()};fe.prototype.sighash=function(e,t,r,i,n){t=t||u6.SIGHASH_ALL|u6.SIGHASH_FORKID;var o=this.inputs[e];if(!o)throw new Error("Input index "+e+" does not exist");return!r&&o.output&&(r=o.output.script),!i&&o.output&&(i=new s6(o.output.satoshis)),n=n||ere,IR.sighash(this,t,e,r,i,n)};PR.exports=fe});var Rs=k((S6e,df)=>{v();df.exports=h4();df.exports.Input=r6();df.exports.Output=qa();df.exports.UnspentOutput=d4();df.exports.Signature=sl();df.exports.Sighash=Ua()});var n6=k((E6e,kR)=>{"use strict";v();var f6=Et(),V0=$y(),G=Wp(),Te=fr(),K0=cr(),pf=Vr(),g4=$n(),TR=Lk(),re=function e(t){if(!(this instanceof e))return new e(t);t?(this.initialize(),this.set(t)):this.initialize()};re.prototype.verify=function(e,t,r,i,n,o){var a=Rs();if(f6.isUndefined(r)&&(r=new a),f6.isUndefined(i)&&(i=0),f6.isUndefined(n)&&(n=0),n&re.SCRIPT_ENABLE_SIGHASH_FORKID&&(n|=re.SCRIPT_VERIFY_STRICTENC,!o))throw new Error("internal error - need satoshisBN to verify FORKID transactions");this.set({script:e,tx:r,nin:i,flags:n,satoshisBN:o});var s;if((n&re.SCRIPT_VERIFY_SIGPUSHONLY)!==0&&!e.isPushOnly())return this.errstr="SCRIPT_ERR_SIG_PUSHONLY",!1;if(!this.evaluate())return!1;n&re.SCRIPT_VERIFY_P2SH&&(s=this.stack.slice());var u=this.stack;if(this.initialize(),this.set({script:t,stack:u,tx:r,nin:i,flags:n,satoshisBN:o}),!this.evaluate())return!1;if(this.stack.length===0)return this.errstr="SCRIPT_ERR_EVAL_FALSE_NO_RESULT",!1;var c=this.stack[this.stack.length-1];if(!re.castToBool(c))return this.errstr="SCRIPT_ERR_EVAL_FALSE_IN_STACK",!1;if(n&re.SCRIPT_VERIFY_P2SH&&t.isScriptHashOut()){if(!e.isPushOnly())return this.errstr="SCRIPT_ERR_SIG_PUSHONLY",!1;if(s.length===0)throw new Error("internal error - stack copy empty");var l=s[s.length-1],m=V0.fromBuffer(l);if(s.pop(),this.initialize(),this.set({script:m,stack:s,tx:r,nin:i,flags:n,satoshisBN:o}),!this.evaluate())return!1;if(s.length===0)return this.errstr="SCRIPT_ERR_EVAL_FALSE_NO_P2SH_STACK",!1;if(!re.castToBool(s[s.length-1]))return this.errstr="SCRIPT_ERR_EVAL_FALSE_IN_P2SH_STACK",!1}if((n&re.SCRIPT_VERIFY_CLEANSTACK)!==0){if((n&re.SCRIPT_VERIFY_P2SH)===0)throw new Error("internal error - CLEANSTACK without P2SH");if(s.length!==1)return this.errstr="SCRIPT_ERR_CLEANSTACK",!1}return!0};kR.exports=re;re.prototype.initialize=function(e){this.stack=[],this.altstack=[],this.pc=0,this.pbegincodehash=0,this.nOpCount=0,this.vfExec=[],this.errstr="",this.flags=0};re.prototype.set=function(e){this.script=e.script||this.script,this.tx=e.tx||this.tx,this.nin=typeof e.nin<"u"?e.nin:this.nin,this.satoshisBN=e.satoshisBN||this.satoshisBN,this.stack=e.stack||this.stack,this.altstack=e.altstack||this.altstack,this.pc=typeof e.pc<"u"?e.pc:this.pc,this.pbegincodehash=typeof e.pbegincodehash<"u"?e.pbegincodehash:this.pbegincodehash,this.nOpCount=typeof e.nOpCount<"u"?e.nOpCount:this.nOpCount,this.vfExec=e.vfExec||this.vfExec,this.errstr=e.errstr||this.errstr,this.flags=typeof e.flags<"u"?e.flags:this.flags};re.true=h.Buffer.from([1]);re.false=h.Buffer.from([]);re.MAX_SCRIPT_ELEMENT_SIZE=520;re.MAXIMUM_ELEMENT_SIZE=4;re.MAX_OPS_PER_SCRIPT=201;re.MAX_SCRIPT_SIZE=1e4;re.LOCKTIME_THRESHOLD=5e8;re.LOCKTIME_THRESHOLD_BN=new Te(re.LOCKTIME_THRESHOLD);re.useGenesisLimits=function(e){return e=e||2147483647,re.MAX_SCRIPT_ELEMENT_SIZE=e,re.MAXIMUM_ELEMENT_SIZE=e,re.MAX_OPS_PER_SCRIPT=e,re.MAX_SCRIPT_SIZE=e,re};re.getLimits=function(){return{maxScriptElementSize:re.MAX_SCRIPT_ELEMENT_SIZE,maximumElementSize:re.MAXIMUM_ELEMENT_SIZE,maxOpsPerScript:re.MAX_OPS_PER_SCRIPT,maxScriptSize:re.MAX_SCRIPT_SIZE}};re.setLimits=function(e){return e=e||{},e.maxScriptElementSize!=null&&(re.MAX_SCRIPT_ELEMENT_SIZE=e.maxScriptElementSize),e.maximumElementSize!=null&&(re.MAXIMUM_ELEMENT_SIZE=e.maximumElementSize),e.maxOpsPerScript!=null&&(re.MAX_OPS_PER_SCRIPT=e.maxOpsPerScript),e.maxScriptSize!=null&&(re.MAX_SCRIPT_SIZE=e.maxScriptSize),re};re.SCRIPT_VERIFY_NONE=0;re.SCRIPT_VERIFY_P2SH=1;re.SCRIPT_VERIFY_STRICTENC=2;re.SCRIPT_VERIFY_DERSIG=4;re.SCRIPT_VERIFY_LOW_S=8;re.SCRIPT_VERIFY_NULLDUMMY=16;re.SCRIPT_VERIFY_SIGPUSHONLY=32;re.SCRIPT_VERIFY_MINIMALDATA=64;re.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS=128;re.SCRIPT_VERIFY_CLEANSTACK=256;re.SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY=512;re.SCRIPT_VERIFY_CHECKSEQUENCEVERIFY=1024;re.SCRIPT_VERIFY_MINIMALIF=8192;re.SCRIPT_VERIFY_NULLFAIL=16384;re.SCRIPT_VERIFY_COMPRESSED_PUBKEYTYPE=32768;re.SCRIPT_ENABLE_SIGHASH_FORKID=65536;re.SCRIPT_ENABLE_REPLAY_PROTECTION=1<<17;re.SCRIPT_ENABLE_MONOLITH_OPCODES=1<<18;re.SCRIPT_ENABLE_MAGNETIC_OPCODES=1<<19;re.SEQUENCE_LOCKTIME_DISABLE_FLAG=1<<31;re.SEQUENCE_LOCKTIME_TYPE_FLAG=1<<22;re.SEQUENCE_LOCKTIME_MASK=65535;re.castToBool=function(e){for(var t=0;t<e.length;t++)if(e[t]!==0)return!(t===e.length-1&&e[t]===128);return!1};re.prototype.checkSignatureEncoding=function(e){var t;if(e.length===0)return!0;if((this.flags&(re.SCRIPT_VERIFY_DERSIG|re.SCRIPT_VERIFY_LOW_S|re.SCRIPT_VERIFY_STRICTENC))!==0&&!pf.isTxDER(e))return this.errstr="SCRIPT_ERR_SIG_DER_INVALID_FORMAT",!1;if((this.flags&re.SCRIPT_VERIFY_LOW_S)!==0){if(t=pf.fromTxFormat(e),!t.hasLowS())return this.errstr="SCRIPT_ERR_SIG_DER_HIGH_S",!1}else if((this.flags&re.SCRIPT_VERIFY_STRICTENC)!==0){if(t=pf.fromTxFormat(e),!t.hasDefinedHashtype())return this.errstr="SCRIPT_ERR_SIG_HASHTYPE",!1;if(!(this.flags&re.SCRIPT_ENABLE_SIGHASH_FORKID)&&t.nhashtype&pf.SIGHASH_FORKID)return this.errstr="SCRIPT_ERR_ILLEGAL_FORKID",!1;if(this.flags&re.SCRIPT_ENABLE_SIGHASH_FORKID&&!(t.nhashtype&pf.SIGHASH_FORKID))return this.errstr="SCRIPT_ERR_MUST_USE_FORKID",!1}return!0};re.prototype.checkPubkeyEncoding=function(e){return(this.flags&re.SCRIPT_VERIFY_STRICTENC)!==0&&!g4.isValid(e)?(this.errstr="SCRIPT_ERR_PUBKEYTYPE",!1):!0};re._isMinimallyEncoded=function(e,t){return t=t||re.MAXIMUM_ELEMENT_SIZE,!(e.length>t||e.length>0&&(e[e.length-1]&127)===0&&(e.length<=1||(e[e.length-2]&128)===0))};re._minimallyEncode=function(e){if(e.length===0)return e;var t=e[e.length-1];if(t&127)return e;if(e.length===1)return h.Buffer.from("");if(e[e.length-2]&128)return e;for(var r=e.length-1;r>0;r--)if(e[r-1]!==0)return e[r-1]&128?e[r++]=t:e[r-1]|=t,e.slice(0,r);return h.Buffer.from("")};re.prototype.evaluate=function(){if(this.script.toBuffer().length>re.MAX_SCRIPT_SIZE)return this.errstr="SCRIPT_ERR_SCRIPT_SIZE",!1;try{for(;this.pc<this.script.chunks.length;){let t={pc:this.pc,opcode:G.fromNumber(this.script.chunks[this.pc].opcodenum)};var e=this.step();if(!e)return!1;this._callbackStep(t)}if(this.stack.length+this.altstack.length>1e3)return this.errstr="SCRIPT_ERR_STACK_SIZE",!1}catch(t){return this.errstr="SCRIPT_ERR_UNKNOWN_ERROR: "+t,!1}return this.vfExec.length>0?(this.errstr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1):!0};re.prototype._callbackStep=function(e){if(typeof this.stepListener=="function")try{this.stepListener(e,TR(this.stack,!0),TR(this.altstack,!0))}catch(t){console.log(`Error in Step callback:${t}`)}};re.prototype.checkLockTime=function(e){return!(!(this.tx.nLockTime<re.LOCKTIME_THRESHOLD&&e.lt(re.LOCKTIME_THRESHOLD_BN)||this.tx.nLockTime>=re.LOCKTIME_THRESHOLD&&e.gte(re.LOCKTIME_THRESHOLD_BN))||e.gt(new Te(this.tx.nLockTime))||this.tx.inputs[this.nin].isFinal())};re.prototype.checkSequence=function(e){var t=this.tx.inputs[this.nin].sequenceNumber;if(this.tx.version<2||t&re.SEQUENCE_LOCKTIME_DISABLE_FLAG)return!1;var r=re.SEQUENCE_LOCKTIME_TYPE_FLAG|re.SEQUENCE_LOCKTIME_MASK,i=new Te(t&r),n=e.and(r),o=new Te(re.SEQUENCE_LOCKTIME_TYPE_FLAG);return!(!(i.lt(o)&&n.lt(o)||i.gte(o)&&n.gte(o))||n.gt(i))};function nre(e,t){let r=e;for(;r.length<t;)r=h.Buffer.concat([h.Buffer.from([0]),r]);return r}re.prototype.step=function(){var e=this;function t(se){return e.stack[e.stack.length+se]}function r(se){switch(se){case G.OP_2MUL:case G.OP_2DIV:return!0;case G.OP_INVERT:case G.OP_MUL:case G.OP_LSHIFT:case G.OP_RSHIFT:if((e.flags&re.SCRIPT_ENABLE_MAGNETIC_OPCODES)===0)return!0;break;case G.OP_DIV:case G.OP_MOD:case G.OP_SPLIT:case G.OP_CAT:case G.OP_AND:case G.OP_OR:case G.OP_XOR:case G.OP_BIN2NUM:case G.OP_NUM2BIN:return!1;default:break}return!1}var i=(this.flags&re.SCRIPT_VERIFY_MINIMALDATA)!==0,n=this.vfExec.indexOf(!1)===-1,o,a,s,u,c,l,m,w,E,P,M,D,L,U,K,C,N,F=this.script.chunks[this.pc];this.pc++;var H=F.opcodenum;if(f6.isUndefined(H))return this.errstr="SCRIPT_ERR_UNDEFINED_OPCODE",!1;if(F.buf&&F.buf.length>re.MAX_SCRIPT_ELEMENT_SIZE)return this.errstr="SCRIPT_ERR_PUSH_SIZE",!1;if(H>G.OP_16&&++this.nOpCount>re.MAX_OPS_PER_SCRIPT)return this.errstr="SCRIPT_ERR_OP_COUNT",!1;if(r(H))return this.errstr="SCRIPT_ERR_DISABLED_OPCODE",!1;if(n&&H>=0&&H<=G.OP_PUSHDATA4){if(i&&!this.script.checkMinimalPush(this.pc-1))return this.errstr="SCRIPT_ERR_MINIMALDATA",!1;if(!F.buf)this.stack.push(re.false);else{if(F.len!==F.buf.length)throw new Error(`Length of push value not equal to length of data (${F.len},${F.buf.length})`);this.stack.push(F.buf)}}else if(n||G.OP_IF<=H&&H<=G.OP_ENDIF)switch(H){case G.OP_1NEGATE:case G.OP_1:case G.OP_2:case G.OP_3:case G.OP_4:case G.OP_5:case G.OP_6:case G.OP_7:case G.OP_8:case G.OP_9:case G.OP_10:case G.OP_11:case G.OP_12:case G.OP_13:case G.OP_14:case G.OP_15:case G.OP_16:c=H-(G.OP_1-1),o=new Te(c).toScriptNumBuffer(),this.stack.push(o);break;case G.OP_NOP:break;case G.OP_NOP2:case G.OP_CHECKLOCKTIMEVERIFY:if(!(this.flags&re.SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY)){if(this.flags&re.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS)return this.errstr="SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS",!1;break}if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;var z=Te.fromScriptNumBuffer(this.stack[this.stack.length-1],i,5);if(z.lt(new Te(0)))return this.errstr="SCRIPT_ERR_NEGATIVE_LOCKTIME",!1;if(!this.checkLockTime(z))return this.errstr="SCRIPT_ERR_UNSATISFIED_LOCKTIME",!1;break;case G.OP_NOP3:case G.OP_CHECKSEQUENCEVERIFY:if(!(this.flags&re.SCRIPT_VERIFY_CHECKSEQUENCEVERIFY)){if(this.flags&re.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS)return this.errstr="SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS",!1;break}if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;var V=Te.fromScriptNumBuffer(t(-1),i,5);if(V.lt(new Te(0)))return this.errstr="SCRIPT_ERR_NEGATIVE_LOCKTIME",!1;if((V&re.SEQUENCE_LOCKTIME_DISABLE_FLAG)!==0)break;if(!this.checkSequence(V))return this.errstr="SCRIPT_ERR_UNSATISFIED_LOCKTIME",!1;break;case G.OP_NOP1:case G.OP_NOP9:case G.OP_NOP10:if(this.flags&re.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS)return this.errstr="SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS",!1;break;case G.OP_IF:case G.OP_NOTIF:if(C=!1,n){if(this.stack.length<1)return this.errstr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1;if(o=t(-1),this.flags&re.SCRIPT_VERIFY_MINIMALIF){if(o.length>1)return this.errstr="SCRIPT_ERR_MINIMALIF",!1;if(o.length===1&&o[0]!==1)return this.errstr="SCRIPT_ERR_MINIMALIF",!1}C=re.castToBool(o),H===G.OP_NOTIF&&(C=!C),this.stack.pop()}this.vfExec.push(C);break;case G.OP_ELSE:if(this.vfExec.length===0)return this.errstr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1;this.vfExec[this.vfExec.length-1]=!this.vfExec[this.vfExec.length-1];break;case G.OP_ENDIF:if(this.vfExec.length===0)return this.errstr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1;this.vfExec.pop();break;case G.OP_VERIFY:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(o=t(-1),C=re.castToBool(o),C)this.stack.pop();else return this.errstr="SCRIPT_ERR_VERIFY",!1;break;case G.OP_RETURN:return this.errstr="SCRIPT_ERR_OP_RETURN",!1;case G.OP_TOALTSTACK:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.altstack.push(this.stack.pop());break;case G.OP_FROMALTSTACK:if(this.altstack.length<1)return this.errstr="SCRIPT_ERR_INVALID_ALTSTACK_OPERATION",!1;this.stack.push(this.altstack.pop());break;case G.OP_2DROP:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.pop(),this.stack.pop();break;case G.OP_2DUP:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;a=t(-2),s=t(-1),this.stack.push(h.Buffer.from(a)),this.stack.push(h.Buffer.from(s));break;case G.OP_3DUP:if(this.stack.length<3)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;a=t(-3),s=t(-2);var B=t(-1);this.stack.push(h.Buffer.from(a)),this.stack.push(h.Buffer.from(s)),this.stack.push(h.Buffer.from(B));break;case G.OP_2OVER:if(this.stack.length<4)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;a=t(-4),s=t(-3),this.stack.push(h.Buffer.from(a)),this.stack.push(h.Buffer.from(s));break;case G.OP_2ROT:if(this.stack.length<6)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;u=this.stack.splice(this.stack.length-6,2),this.stack.push(u[0]),this.stack.push(u[1]);break;case G.OP_2SWAP:if(this.stack.length<4)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;u=this.stack.splice(this.stack.length-4,2),this.stack.push(u[0]),this.stack.push(u[1]);break;case G.OP_IFDUP:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;o=t(-1),C=re.castToBool(o),C&&this.stack.push(h.Buffer.from(o));break;case G.OP_DEPTH:o=new Te(this.stack.length).toScriptNumBuffer(),this.stack.push(o);break;case G.OP_DROP:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.pop();break;case G.OP_DUP:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.push(h.Buffer.from(t(-1)));break;case G.OP_NIP:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.splice(this.stack.length-2,1);break;case G.OP_OVER:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.push(h.Buffer.from(t(-2)));break;case G.OP_PICK:case G.OP_ROLL:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(o=t(-1),w=Te.fromScriptNumBuffer(o,i),c=w.toNumber(),this.stack.pop(),c<0||c>=this.stack.length)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;o=t(-c-1),H===G.OP_ROLL&&this.stack.splice(this.stack.length-c-1,1),this.stack.push(h.Buffer.from(o));break;case G.OP_ROT:if(this.stack.length<3)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;l=t(-3),m=t(-2);var g=t(-1);this.stack[this.stack.length-3]=m,this.stack[this.stack.length-2]=g,this.stack[this.stack.length-1]=l;break;case G.OP_SWAP:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;l=t(-2),m=t(-1),this.stack[this.stack.length-2]=m,this.stack[this.stack.length-1]=l;break;case G.OP_TUCK:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.splice(this.stack.length-2,0,h.Buffer.from(t(-1)));break;case G.OP_SIZE:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;w=new Te(t(-1).length),this.stack.push(w.toScriptNumBuffer());break;case G.OP_AND:case G.OP_OR:case G.OP_XOR:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(a=t(-2),s=t(-1),a.length!==s.length)return this.errstr="SCRIPT_ERR_INVALID_OPERAND_SIZE",!1;switch(H){case G.OP_AND:for(let se=0;se<a.length;se++)a[se]&=s[se];break;case G.OP_OR:for(let se=0;se<a.length;se++)a[se]|=s[se];break;case G.OP_XOR:for(let se=0;se<a.length;se++)a[se]^=s[se];break;default:break}this.stack.pop();break;case G.OP_INVERT:this.stack.length<1&&(this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION"),o=t(-1);for(let se=0;se<o.length;se++)o[se]=~o[se];break;case G.OP_LSHIFT:case G.OP_RSHIFT:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(a=t(-2),a.length===0)this.stack.pop();else{if(E=new Te(a),P=Te.fromScriptNumBuffer(t(-1),i),c=P.toNumber(),c<0)return this.errstr="SCRIPT_ERR_INVALID_NUMBER_RANGE",!1;this.stack.pop(),this.stack.pop();let se;H===G.OP_LSHIFT&&(se=E.ushln(c)),H===G.OP_RSHIFT&&(se=E.ushrn(c));let ue=nre(h.Buffer.from(se.toArray().slice(a.length*-1)),a.length);this.stack.push(ue)}break;case G.OP_EQUAL:case G.OP_EQUALVERIFY:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;a=t(-2),s=t(-1);var I=a.toString("hex")===s.toString("hex");if(this.stack.pop(),this.stack.pop(),this.stack.push(I?re.true:re.false),H===G.OP_EQUALVERIFY)if(I)this.stack.pop();else return this.errstr="SCRIPT_ERR_EQUALVERIFY",!1;break;case G.OP_1ADD:case G.OP_1SUB:case G.OP_NEGATE:case G.OP_ABS:case G.OP_NOT:case G.OP_0NOTEQUAL:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;switch(o=t(-1),w=Te.fromScriptNumBuffer(o,i),H){case G.OP_1ADD:w=w.add(Te.One);break;case G.OP_1SUB:w=w.sub(Te.One);break;case G.OP_NEGATE:w=w.neg();break;case G.OP_ABS:w.cmp(Te.Zero)<0&&(w=w.neg());break;case G.OP_NOT:w=new Te((w.cmp(Te.Zero)===0)+0);break;case G.OP_0NOTEQUAL:w=new Te((w.cmp(Te.Zero)!==0)+0);break}this.stack.pop(),this.stack.push(w.toScriptNumBuffer());break;case G.OP_ADD:case G.OP_SUB:case G.OP_MUL:case G.OP_MOD:case G.OP_DIV:case G.OP_BOOLAND:case G.OP_BOOLOR:case G.OP_NUMEQUAL:case G.OP_NUMEQUALVERIFY:case G.OP_NUMNOTEQUAL:case G.OP_LESSTHAN:case G.OP_GREATERTHAN:case G.OP_LESSTHANOREQUAL:case G.OP_GREATERTHANOREQUAL:case G.OP_MIN:case G.OP_MAX:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;switch(E=Te.fromScriptNumBuffer(t(-2),i,re.MAXIMUM_ELEMENT_SIZE),P=Te.fromScriptNumBuffer(t(-1),i,re.MAXIMUM_ELEMENT_SIZE),w=new Te(0),H){case G.OP_ADD:w=E.add(P);break;case G.OP_SUB:w=E.sub(P);break;case G.OP_MUL:w=E.mul(P);break;case G.OP_DIV:if(P===0)return this.errstr="SCRIPT_ERR_DIV_BY_ZERO",!1;w=E.div(P);break;case G.OP_MOD:if(P===0)return this.errstr="SCRIPT_ERR_DIV_BY_ZERO",!1;w=E.mod(P);break;case G.OP_BOOLAND:w=new Te((E.cmp(Te.Zero)!==0&&P.cmp(Te.Zero)!==0)+0);break;case G.OP_BOOLOR:w=new Te((E.cmp(Te.Zero)!==0||P.cmp(Te.Zero)!==0)+0);break;case G.OP_NUMEQUAL:w=new Te((E.cmp(P)===0)+0);break;case G.OP_NUMEQUALVERIFY:w=new Te((E.cmp(P)===0)+0);break;case G.OP_NUMNOTEQUAL:w=new Te((E.cmp(P)!==0)+0);break;case G.OP_LESSTHAN:w=new Te((E.cmp(P)<0)+0);break;case G.OP_GREATERTHAN:w=new Te((E.cmp(P)>0)+0);break;case G.OP_LESSTHANOREQUAL:w=new Te((E.cmp(P)<=0)+0);break;case G.OP_GREATERTHANOREQUAL:w=new Te((E.cmp(P)>=0)+0);break;case G.OP_MIN:w=E.cmp(P)<0?E:P;break;case G.OP_MAX:w=E.cmp(P)>0?E:P;break}if(this.stack.pop(),this.stack.pop(),this.stack.push(w.toScriptNumBuffer()),H===G.OP_NUMEQUALVERIFY)if(re.castToBool(t(-1)))this.stack.pop();else return this.errstr="SCRIPT_ERR_NUMEQUALVERIFY",!1;break;case G.OP_WITHIN:if(this.stack.length<3)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;E=Te.fromScriptNumBuffer(t(-3),i,re.MAXIMUM_ELEMENT_SIZE),P=Te.fromScriptNumBuffer(t(-2),i,re.MAXIMUM_ELEMENT_SIZE);var y=Te.fromScriptNumBuffer(t(-1),i,re.MAXIMUM_ELEMENT_SIZE);C=P.cmp(E)<=0&&E.cmp(y)<0,this.stack.pop(),this.stack.pop(),this.stack.pop(),this.stack.push(C?re.true:re.false);break;case G.OP_RIPEMD160:case G.OP_SHA1:case G.OP_SHA256:case G.OP_HASH160:case G.OP_HASH256:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;o=t(-1);var f;H===G.OP_RIPEMD160?f=K0.ripemd160(o):H===G.OP_SHA1?f=K0.sha1(o):H===G.OP_SHA256?f=K0.sha256(o):H===G.OP_HASH160?f=K0.sha256ripemd160(o):H===G.OP_HASH256&&(f=K0.sha256sha256(o)),this.stack.pop(),this.stack.push(f);break;case G.OP_CODESEPARATOR:this.pbegincodehash=this.pc;break;case G.OP_CHECKSIG:case G.OP_CHECKSIGVERIFY:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(M=t(-2),D=t(-1),!this.checkSignatureEncoding(M)||!this.checkPubkeyEncoding(D))return!1;L=new V0().set({chunks:this.script.chunks.slice(this.pbegincodehash)});var p=new V0().add(M);L.findAndDelete(p);try{U=pf.fromTxFormat(M),K=g4.fromBuffer(D,!1),N=this.tx.verifySignature(U,K,this.nin,L,this.satoshisBN,this.flags)}catch{N=!1}if(!N&&this.flags&re.SCRIPT_VERIFY_NULLFAIL&&M.length)return this.errstr="SCRIPT_ERR_NULLFAIL",!1;if(this.stack.pop(),this.stack.pop(),this.stack.push(N?re.true:re.false),H===G.OP_CHECKSIGVERIFY)if(N)this.stack.pop();else return this.errstr="SCRIPT_ERR_CHECKSIGVERIFY",!1;break;case G.OP_CHECKMULTISIG:case G.OP_CHECKMULTISIGVERIFY:var _=1;if(this.stack.length<_)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;var x=Te.fromScriptNumBuffer(t(-_),i).toNumber();if(x<0||x>20)return this.errstr="SCRIPT_ERR_PUBKEY_COUNT",!1;if(this.nOpCount+=x,this.nOpCount>re.MAX_OPS_PER_SCRIPT)return this.errstr="SCRIPT_ERR_OP_COUNT",!1;var b=++_;_+=x;var d=x+2;if(this.stack.length<_)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;var O=Te.fromScriptNumBuffer(t(-_),i).toNumber();if(O<0||O>x)return this.errstr="SCRIPT_ERR_SIG_COUNT",!1;var T=++_;if(_+=O,this.stack.length<_)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;L=new V0().set({chunks:this.script.chunks.slice(this.pbegincodehash)});for(var S=0;S<O;S++)M=t(-T-S),L.findAndDelete(new V0().add(M));for(N=!0;N&&O>0;){if(M=t(-T),D=t(-b),!this.checkSignatureEncoding(M)||!this.checkPubkeyEncoding(D))return!1;var R;try{U=pf.fromTxFormat(M),K=g4.fromBuffer(D,!1),R=this.tx.verifySignature(U,K,this.nin,L,this.satoshisBN,this.flags)}catch{R=!1}R&&(T++,O--),b++,x--,O>x&&(N=!1)}for(;_-- >1;){if(!N&&this.flags&re.SCRIPT_VERIFY_NULLFAIL&&!d&&t(-1).length)return this.errstr="SCRIPT_ERR_NULLFAIL",!1;d>0&&d--,this.stack.pop()}if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(this.flags&re.SCRIPT_VERIFY_NULLDUMMY&&t(-1).length)return this.errstr="SCRIPT_ERR_SIG_NULLDUMMY",!1;if(this.stack.pop(),this.stack.push(N?re.true:re.false),H===G.OP_CHECKMULTISIGVERIFY)if(N)this.stack.pop();else return this.errstr="SCRIPT_ERR_CHECKMULTISIGVERIFY",!1;break;case G.OP_CAT:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(a=t(-2),s=t(-1),a.length+s.length>re.MAX_SCRIPT_ELEMENT_SIZE)return this.errstr="SCRIPT_ERR_PUSH_SIZE",!1;this.stack[this.stack.length-2]=h.Buffer.concat([a,s]),this.stack.pop();break;case G.OP_SPLIT:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;a=t(-2);var Y=Te.fromScriptNumBuffer(t(-1),i).toNumber();if(Y<0||Y>a.length)return this.errstr="SCRIPT_ERR_INVALID_SPLIT_RANGE",!1;var X=h.Buffer.from(a);this.stack[this.stack.length-2]=X.slice(0,Y),this.stack[this.stack.length-1]=X.slice(Y);break;case G.OP_LEFT:case G.OP_RIGHT:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(a=t(-2),c=Te.fromScriptNumBuffer(t(-1),i).toNumber(),c<0)return this.errstr="SCRIPT_ERR_INVALID_NUMBER_RANGE",!1;c>a.length&&(c=a.length),this.stack.pop(),H===G.OP_LEFT?this.stack[this.stack.length-1]=h.Buffer.from(a).slice(0,c):this.stack[this.stack.length-1]=h.Buffer.from(a).slice(a.length-c);break;case G.OP_SUBSTR:if(this.stack.length<3)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;a=t(-3);var ne=Te.fromScriptNumBuffer(t(-1),i).toNumber(),ce=Te.fromScriptNumBuffer(t(-2),i).toNumber();if(ce<0||ne<0)return this.errstr="SCRIPT_ERR_INVALID_NUMBER_RANGE",!1;ce>a.length&&(ce=a.length),ce+ne>a.length&&(ne=a.length-ce),this.stack.pop(),this.stack.pop(),this.stack[this.stack.length-1]=h.Buffer.from(a).slice(ce,ce+ne);break;case G.OP_NUM2BIN:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;var pe=Te.fromScriptNumBuffer(t(-1),i).toNumber();if(pe>re.MAX_SCRIPT_ELEMENT_SIZE)return this.errstr="SCRIPT_ERR_PUSH_SIZE",!1;this.stack.pop();var q=t(-1);if(q=re._minimallyEncode(q),q.length>pe)return this.errstr="SCRIPT_ERR_IMPOSSIBLE_ENCODING",!1;if(q.length===pe){this.stack[this.stack.length-1]=q;break}var W=0;q.length>0&&(W=q[q.length-1]&128,q[q.length-1]&=127);var $=h.Buffer.alloc(pe);q.copy($,0);for(var ee=q.length-1;ee++<pe-2;)$[ee]=0;$[ee]=W,this.stack[this.stack.length-1]=$;break;case G.OP_BIN2NUM:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(a=t(-1),s=re._minimallyEncode(a),this.stack[this.stack.length-1]=s,!re._isMinimallyEncoded(s))return this.errstr="SCRIPT_ERR_INVALID_NUMBER_RANGE",!1;break;default:return this.errstr="SCRIPT_ERR_BAD_OPCODE",!1}return!0}});var bn=k((O6e,v4)=>{v();v4.exports=$y();v4.exports.Interpreter=n6()});var hf=k((P6e,CR)=>{"use strict";v();var m4=Et(),Ka=Bt(),ore=hn(),RR=Qc(),wn=xs(),BR=cr(),MR=pi(),y4=$n();function me(e,t,r){if(!(this instanceof me))return new me(e,t,r);if(m4.isArray(e)&&m4.isNumber(t))return me.createMultisig(e,t,r);if(e instanceof me)return e;if(Ka.checkArgument(e,"First argument is required, please include address data.","guide/address.html"),t&&!wn.get(t))throw new TypeError('Second argument must be "livenet", "testnet", or "regtest".');if(r&&r!==me.PayToPublicKeyHash&&r!==me.PayToScriptHash)throw new TypeError('Third argument must be "pubkeyhash" or "scripthash".');var i=this._classifyArguments(e,t,r);return i.network=i.network||wn.get(t)||wn.defaultNetwork,i.type=i.type||r||me.PayToPublicKeyHash,MR.defineImmutable(this,{hashBuffer:i.hashBuffer,network:i.network,type:i.type}),this}me.prototype._classifyArguments=function(e,t,r){if((e instanceof h.Buffer||e instanceof Uint8Array)&&e.length===20)return me._transformHash(e);if((e instanceof h.Buffer||e instanceof Uint8Array)&&e.length===21)return me._transformBuffer(e,t,r);if(e instanceof y4)return me._transformPublicKey(e);if(e instanceof G0())return me._transformScript(e,t);if(typeof e=="string")return me._transformString(e,t,r);if(m4.isObject(e))return me._transformObject(e);throw new TypeError("First argument is an unrecognized data format.")};me.PayToPublicKeyHash="pubkeyhash";me.PayToScriptHash="scripthash";me._transformHash=function(e){var t={};if(!(e instanceof h.Buffer)&&!(e instanceof Uint8Array))throw new TypeError("Address supplied is not a buffer.");if(e.length!==20)throw new TypeError("Address hashbuffers must be exactly 20 bytes.");return t.hashBuffer=e,t};me._transformObject=function(e){return Ka.checkArgument(e.hash||e.hashBuffer,"Must provide a `hash` or `hashBuffer` property"),Ka.checkArgument(e.type,"Must provide a `type` property"),{hashBuffer:e.hash?h.Buffer.from(e.hash,"hex"):e.hashBuffer,network:wn.get(e.network)||wn.defaultNetwork,type:e.type}};me._classifyFromVersion=function(e){var t={},r=wn.get(e[0],"pubkeyhash"),i=wn.get(e[0],"scripthash");return r?(t.network=r,t.type=me.PayToPublicKeyHash):i&&(t.network=i,t.type=me.PayToScriptHash),t};me._transformBuffer=function(e,t,r){var i={};if(!(e instanceof h.Buffer)&&!(e instanceof Uint8Array))throw new TypeError("Address supplied is not a buffer.");if(e.length!==21)throw new TypeError("Address buffers must be exactly 21 bytes.");var n=wn.get(t),o=me._classifyFromVersion(e);if(t&&!n)throw new TypeError("Unknown network");if(!o.network||n&&n!==o.network)throw new TypeError("Address has mismatched network type.");if(!o.type||r&&r!==o.type)throw new TypeError("Address has mismatched type.");return i.hashBuffer=e.slice(1),i.network=o.network,i.type=o.type,i};me._transformPublicKey=function(e){var t={};if(!(e instanceof y4))throw new TypeError("Address must be an instance of PublicKey.");return t.hashBuffer=BR.sha256ripemd160(e.toBuffer()),t.type=me.PayToPublicKeyHash,t};me._transformScript=function(e,t){Ka.checkArgument(e instanceof G0(),"script must be a Script instance");var r=e.getAddressInfo(t);if(!r)throw new ore.Script.CantDeriveAddress(e);return r};me.createMultisig=function(e,t,r){return r=r||e[0].network||wn.defaultNetwork,me.payingTo(G0().buildMultisigOut(e,t),r)};me._transformString=function(e,t,r){if(typeof e!="string")throw new TypeError("data parameter supplied is not a string.");if(e.length<27)throw new Error("Invalid Address string provided");e=e.trim();var i=wn.get(t);if(t&&!i)throw new TypeError("Unknown network");var n=RR.decode(e);return me._transformBuffer(n,t,r)};me.fromPublicKey=function(e,t){var r=me._transformPublicKey(e);return t=t||wn.defaultNetwork,new me(r.hashBuffer,t,r.type)};me.fromPrivateKey=function(e,t){let r=y4.fromPrivateKey(e);return t=t||e.network||wn.defaultNetwork,me.fromPublicKey(r,t)};me.fromPublicKeyHash=function(e,t){var r=me._transformHash(e);return new me(r.hashBuffer,t,me.PayToPublicKeyHash)};me.fromScriptHash=function(e,t){Ka.checkArgument(e,"hash parameter is required");var r=me._transformHash(e);return new me(r.hashBuffer,t,me.PayToScriptHash)};me.payingTo=function(e,t){return Ka.checkArgument(e,"script is required"),Ka.checkArgument(e instanceof G0(),"script must be instance of Script"),me.fromScriptHash(BR.sha256ripemd160(e.toBuffer()),t)};me.fromScript=function(e,t){Ka.checkArgument(e instanceof G0(),"script must be a Script instance");var r=me._transformScript(e,t);return new me(r.hashBuffer,t,r.type)};me.fromBuffer=function(e,t,r){var i=me._transformBuffer(e,t,r);return new me(i.hashBuffer,i.network,i.type)};me.fromHex=function(e,t,r){return me.fromBuffer(h.Buffer.from(e,"hex"),t,r)};me.fromString=function(e,t,r){var i=me._transformString(e,t,r);return new me(i.hashBuffer,i.network,i.type)};me.fromObject=function(t){Ka.checkState(MR.isHexa(t.hash),'Unexpected hash property, "'+t.hash+'", expected to be hex.');var r=h.Buffer.from(t.hash,"hex");return new me(r,t.network,t.type)};me.getValidationError=function(e,t,r){var i;try{new me(e,t,r)}catch(n){i=n}return i};me.isValid=function(e,t,r){return!me.getValidationError(e,t,r)};me.prototype.isPayToPublicKeyHash=function(){return this.type===me.PayToPublicKeyHash};me.prototype.isPayToScriptHash=function(){return this.type===me.PayToScriptHash};me.prototype.toBuffer=function(){var e=h.Buffer.from([this.network[this.type]]),t=h.Buffer.concat([e,this.hashBuffer]);return t};me.prototype.toHex=function(){return this.toBuffer().toString("hex")};me.prototype.toObject=me.prototype.toJSON=function(){return{hash:this.hashBuffer.toString("hex"),type:this.type,network:this.network.toString()}};me.prototype.inspect=function(){return"<Address: "+this.toString()+", type: "+this.type+", network: "+this.network+">"};me.prototype.toString=function(){return RR.encode(this.toBuffer())};CR.exports=me;function G0(){return bn()}});var z0=k((k6e,qR)=>{"use strict";v();var c6=Et(),are=hf(),NR=Qc(),Bs=fr(),DR=pi(),Lo=xs(),_4=vn(),sre=$n(),ure=ds(),LR=Bt(),b4="[REDACTED]";function Me(e,t){if(!(this instanceof Me))return new Me(e,t);if(e instanceof Me)return e;var r=this._classifyArguments(e,t);if(!r.bn||r.bn.cmp(new Bs(0))===0)throw new TypeError("Number can not be equal to zero, undefined, null or false");if(!r.bn.lt(_4.getN()))throw new TypeError("Number must be less than N");if(typeof r.network>"u")throw new TypeError('Must specify the network ("livenet" or "testnet")');return DR.defineImmutable(this,{bn:r.bn,compressed:r.compressed,network:r.network}),Object.defineProperty(this,"publicKey",{configurable:!1,enumerable:!0,get:this.toPublicKey.bind(this)}),this}Me.prototype._classifyArguments=function(e,t){var r={compressed:!0,network:t?Lo.get(t):Lo.defaultNetwork};if(c6.isUndefined(e)||c6.isNull(e))r.bn=Me._getRandomBN();else if(e instanceof Bs)r.bn=e;else if(e instanceof h.Buffer||e instanceof Uint8Array)r=Me._transformBuffer(e,t);else if(e.bn&&e.network)r=Me._transformObject(e);else if(!t&&Lo.get(e))r.bn=Me._getRandomBN(),r.network=Lo.get(e);else if(typeof e=="string")DR.isHexa(e)?r.bn=new Bs(h.Buffer.from(e,"hex")):r=Me._transformWIF(e,t);else throw new TypeError("First argument is an unrecognized data type.");return r};Me._getRandomBN=function(){var e,t;do{var r=ure.getRandomBuffer(32);t=Bs.fromBuffer(r),e=t.lt(_4.getN())}while(!e);return t};Me._transformBuffer=function(e,t){var r={};if(e.length===32)return Me._transformBNBuffer(e,t);if(r.network=Lo.get(e[0],"privatekey"),!r.network)throw new Error("Invalid network");if(t&&r.network!==Lo.get(t))throw new TypeError("Private key network mismatch");if(e.length===34&&e[33]===1)r.compressed=!0;else if(e.length===33)r.compressed=!1;else throw new Error("Length of buffer must be 33 (uncompressed) or 34 (compressed)");return r.bn=Bs.fromBuffer(e.slice(1,33)),r};Me._transformBNBuffer=function(e,t,r){var i={};return i.network=Lo.get(t)||Lo.defaultNetwork,i.bn=Bs.fromBuffer(e),i.compressed=r===void 0?!0:!!r,i};Me._transformWIF=function(e,t){return Me._transformBuffer(NR.decode(e),t)};Me.fromBuffer=function(e,t,r){return r!==void 0&&e&&e.length===32?new Me(Me._transformBNBuffer(e,t,r)):new Me(e,t)};Me.fromHex=function(e,t,r){return Me.fromBuffer(h.Buffer.from(e,"hex"),t,r)};Me._transformObject=function(e){if(e.bn instanceof Bs)return{bn:e.bn,network:Lo.get(e.network),compressed:e.compressed};if(typeof e.bn!="string"||!e.bn.length)throw new TypeError("Invalid private key: `bn` must be a hex string");if(e.bn===b4)throw new TypeError('Invalid private key: `bn` is "'+b4+'". JSON.stringify() redacts the secret on purpose \u2014 use toObject() for a round-trippable export, or toWIF().');if(!/^[0-9a-fA-F]+$/.test(e.bn))throw new TypeError("Invalid private key: `bn` is not hexadecimal");var t=new Bs(e.bn,"hex");if(t.isZero()||t.gte(_4.getN()))throw new TypeError("Invalid private key: outside the range of valid keys");var r=Lo.get(e.network);return{bn:t,network:r,compressed:e.compressed}};Me.fromString=Me.fromWIF=function(e,t){return LR.checkArgument(c6.isString(e),"First argument is expected to be a string."),new Me(e,t)};Me.fromObject=Me.fromJSON=function(e){return LR.checkArgument(c6.isObject(e),"First argument is expected to be an object."),new Me(e)};Me.fromRandom=function(e){var t=Me._getRandomBN();return new Me(t,e)};Me.getValidationError=function(e,t){var r;try{new Me(e,t)}catch(i){r=i}return r};Me.isValid=function(e,t){return e?!Me.getValidationError(e,t):!1};Me.prototype.toString=function(){return this.toWIF()};Me.prototype.toWIF=function(){var e=this.network,t=this.compressed,r;return t?r=h.Buffer.concat([h.Buffer.from([e.privatekey]),this.bn.toBuffer({size:32}),h.Buffer.from([1])]):r=h.Buffer.concat([h.Buffer.from([e.privatekey]),this.bn.toBuffer({size:32})]),NR.encode(r)};Me.prototype.toBigNumber=function(){return this.bn};Me.prototype.toBuffer=function(){return this.bn.toBuffer({size:32})};Me.prototype.toHex=function(){return this.toBuffer().toString("hex")};Me.prototype.toPublicKey=function(){return this._pubkey||(this._pubkey=sre.fromPrivateKey(this)),this._pubkey};Me.prototype.toAddress=function(e){var t=this.toPublicKey();return are.fromPublicKey(t,e||this.network)};Me.prototype.toObject=function(){return{bn:this.bn.toString("hex"),compressed:this.compressed,network:this.network.toString()}};Me.prototype.toJSON=function(){return{bn:b4,compressed:this.compressed,network:this.network.toString()}};Me.prototype.inspect=function(){var e=this.compressed?"":", uncompressed";return"<PrivateKey: "+this.toHex()+", network: "+this.network+e+">"};qR.exports=Me});var $n=k((B6e,FR)=>{"use strict";v();var fl=fr(),cl=vn(),fre=cr(),cre=pi(),UR=xs(),w4=Et(),gf=Bt();function Se(e,t){if(!(this instanceof Se))return new Se(e,t);if(gf.checkArgument(e,"First argument is required, please include public key data."),e instanceof Se)return e;t=t||{};var r=this._classifyArgs(e,t);return r.point.validate(),cre.defineImmutable(this,{point:r.point,compressed:r.compressed,network:r.network||UR.defaultNetwork}),this}Se.prototype._classifyArgs=function(e,t){var r={compressed:w4.isUndefined(t.compressed)||t.compressed};if(e instanceof cl)r.point=e;else if(e.x&&e.y)r=Se._transformObject(e);else if(typeof e=="string")r=Se._transformDER(h.Buffer.from(e,"hex"));else if(Se._isBuffer(e))r=Se._transformDER(e);else if(Se._isPrivateKey(e))r=Se._transformPrivateKey(e);else throw new TypeError("First argument is an unrecognized data format.");return r.network||(r.network=w4.isUndefined(t.network)?void 0:UR.get(t.network)),r};Se._isPrivateKey=function(e){var t=z0();return e instanceof t};Se._isBuffer=function(e){return e instanceof h.Buffer||e instanceof Uint8Array};Se._transformPrivateKey=function(e){gf.checkArgument(Se._isPrivateKey(e),"Must be an instance of PrivateKey");var t={};return t.point=cl.getG().mul(e.bn),t.compressed=e.compressed,t.network=e.network,t};Se._transformDER=function(e,t){gf.checkArgument(Se._isBuffer(e),"Must be a buffer of DER encoded public key");var r={};t=w4.isUndefined(t)?!0:t;var i,n,o,a;if(e[0]===4||!t&&(e[0]===6||e[0]===7)){if(o=e.slice(1,33),a=e.slice(33,65),o.length!==32||a.length!==32||e.length!==65)throw new TypeError("Length of x and y must be 32 bytes");i=new fl(o),n=new fl(a),r.point=new cl(i,n),r.compressed=!1}else if(e[0]===3)o=e.slice(1),i=new fl(o),r=Se._transformX(!0,i),r.compressed=!0;else if(e[0]===2)o=e.slice(1),i=new fl(o),r=Se._transformX(!1,i),r.compressed=!0;else throw new TypeError("Invalid DER format public key");return r};Se._transformX=function(e,t){gf.checkArgument(typeof e=="boolean","Must specify whether y is odd or not (true or false)");var r={};return r.point=cl.fromX(e,t),r};Se._transformObject=function(e){var t=new fl(e.x,"hex"),r=new fl(e.y,"hex"),i=new cl(t,r);return new Se(i,{compressed:e.compressed})};Se.fromPrivateKey=function(e){gf.checkArgument(Se._isPrivateKey(e),"Must be an instance of PrivateKey");var t=Se._transformPrivateKey(e);return new Se(t.point,{compressed:t.compressed,network:t.network})};Se.fromDER=Se.fromBuffer=function(e,t){gf.checkArgument(Se._isBuffer(e),"Must be a buffer of DER encoded public key");var r=Se._transformDER(e,t);return new Se(r.point,{compressed:r.compressed})};Se.fromPoint=function(e,t){return gf.checkArgument(e instanceof cl,"First argument must be an instance of Point."),new Se(e,{compressed:t})};Se.fromHex=Se.fromString=function(e,t){var r=h.Buffer.from(e,t||"hex"),i=Se._transformDER(r);return new Se(i.point,{compressed:i.compressed})};Se.fromX=function(e,t){var r=Se._transformX(e,t);return new Se(r.point,{compressed:r.compressed})};Se.getValidationError=function(e){var t;try{new Se(e)}catch(r){t=r}return t};Se.isValid=function(e){return!Se.getValidationError(e)};Se.prototype.toObject=Se.prototype.toJSON=function(){return{x:this.point.getX().toString("hex",2),y:this.point.getY().toString("hex",2),compressed:this.compressed}};Se.prototype.toBuffer=Se.prototype.toDER=function(){var e=this.point.getX(),t=this.point.getY(),r=e.toBuffer({size:32}),i=t.toBuffer({size:32}),n;if(this.compressed){var o=i[i.length-1]%2;return o?n=h.Buffer.from([3]):n=h.Buffer.from([2]),h.Buffer.concat([n,r])}else return n=h.Buffer.from([4]),h.Buffer.concat([n,r,i])};Se.prototype._getID=function(){return fre.sha256ripemd160(this.toBuffer())};Se.prototype.toAddress=function(e){var t=hf();return t.fromPublicKey(this,e||this.network)};Se.prototype.toString=Se.prototype.toHex=function(){return this.toDER().toString("hex")};Se.prototype.inspect=function(){return"<PublicKey: "+this.toHex()+(this.compressed?"":", uncompressed")+">"};FR.exports=Se});var o6=k((C6e,HR)=>{"use strict";v();var ji=fr(),qo=vn(),lre=Vr(),hre=$n(),dre=ds(),Ms=cr(),pre=Et(),S4=Bt(),zt=function e(t){if(!(this instanceof e))return new e(t);t&&this.set(t)};Object.defineProperty(zt.prototype,"k",{get:function(){return this._k},set:function(e){this._k=e,this._kFresh=!0},enumerable:!0,configurable:!0});zt.prototype.set=function(e){if(this.hashbuf=e.hashbuf||this.hashbuf,this.endian=e.endian||this.endian,this.privkey=e.privkey||this.privkey,this.pubkey=e.pubkey||(this.privkey?this.privkey.publicKey:this.pubkey),e.sig)if(h.Buffer.isBuffer(e.sig)){var t=Vr();this.sig=t.fromDER(e.sig)}else this.sig=e.sig;else this.sig=this.sig;return e.k&&(this.k=e.k),this.verified=e.verified||this.verified,this};zt.prototype.privkey2pubkey=function(){this.pubkey=this.privkey.toPublicKey()};zt.prototype.calci=function(){for(var e=0;e<4;e++){this.sig.i=e;var t;try{t=this.toPublicKey()}catch(r){console.error(r);continue}if(t.point.eq(this.pubkey.point))return this.sig.compressed=this.pubkey.compressed,this}throw this.sig.i=void 0,new Error("Unable to find valid recovery factor")};zt.fromString=function(e){var t=JSON.parse(e);return new zt(t)};zt.prototype.randomK=function(){var e=qo.getN(),t;do t=ji.fromBuffer(dre.getRandomBuffer(32));while(!(t.lt(e)&&t.gt(ji.Zero)));return this.k=t,this};zt.prototype.deterministicK=function(e){pre.isUndefined(e)&&(e=0);var t=h.Buffer.alloc(32);t.fill(1);var r=h.Buffer.alloc(32);r.fill(0);var i=this.privkey.bn.toBuffer({size:32}),n=this.endian==="little"?h.Buffer.from(this.hashbuf).reverse():this.hashbuf;r=Ms.sha256hmac(h.Buffer.concat([t,h.Buffer.from([0]),i,n]),r),t=Ms.sha256hmac(t,r),r=Ms.sha256hmac(h.Buffer.concat([t,h.Buffer.from([1]),i,n]),r),t=Ms.sha256hmac(t,r),t=Ms.sha256hmac(t,r);for(var o=ji.fromBuffer(t),a=qo.getN(),s=0;s<e||!(o.lt(a)&&o.gt(ji.Zero));s++)r=Ms.sha256hmac(h.Buffer.concat([t,h.Buffer.from([0])]),r),t=Ms.sha256hmac(t,r),t=Ms.sha256hmac(t,r),o=ji.fromBuffer(t);return this.k=o,this};zt.prototype.toPublicKey=function(){var e=this.sig.i;S4.checkArgument(e===0||e===1||e===2||e===3,new Error("i must be equal to 0, 1, 2, or 3"));var t=ji.fromBuffer(this.hashbuf),r=this.sig.r,i=this.sig.s,n=e&1,o=e>>1,a=qo.getN(),s=qo.getG(),u=o?r.add(a):r,c=qo.fromX(n,u),l=c.mul(a);if(!l.isInfinity())throw new Error("nR is not a valid curve point");var m=t.neg().umod(a),w=r.invm(a),E=c.mul(i).add(s.mul(m)).mul(w),P=hre.fromPoint(E,this.sig.compressed);return P};zt.prototype.sigError=function(){if(!h.Buffer.isBuffer(this.hashbuf)||this.hashbuf.length!==32)return"hashbuf must be a 32 byte buffer";var e=this.sig.r,t=this.sig.s,r=qo.getN();try{if(e.lte(ji.Zero)||t.lte(ji.Zero)||e.gte(r)||t.gte(r))return"r and s not in range";var i=ji.fromBuffer(this.hashbuf,this.endian?{endian:this.endian}:void 0),n=t.invm(r),o=n.mul(i).umod(r),a=n.mul(e).umod(r),s=qo.getG().mulAdd(o,this.pubkey.point,a);return s.isInfinity()?"p is infinity":s.getX().umod(r).cmp(e)!==0?"Invalid signature":!1}catch(u){return"Signature security validation failed: "+u.message}};zt.toLowS=function(e){return e.gt(ji.fromBuffer(h.Buffer.from("7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0","hex")))&&(e=qo.getN().sub(e)),e};zt.prototype._findSignature=function(e,t){var r=qo.getN(),i=qo.getG(),n=0,o,a,s,u;do(!this.k||!this._kFresh||n>0)&&this.deterministicK(n),n++,o=this.k,a=i.mul(o),s=a.x.umod(r),u=o.invm(r).mul(t.add(e.mul(s))).umod(r);while(s.cmp(ji.Zero)<=0||u.cmp(ji.Zero)<=0);return this._kFresh=!1,u=zt.toLowS(u),{s:u,r:s}};zt.prototype.sign=function(){var e=this.hashbuf,t=this.privkey,r=t.bn;S4.checkState(e&&t&&r,new Error("invalid parameters")),S4.checkState(h.Buffer.isBuffer(e)&&e.length===32,new Error("hashbuf must be a 32 byte buffer"));var i=ji.fromBuffer(e,this.endian?{endian:this.endian}:void 0),n=this._findSignature(r,i);return n.compressed=this.pubkey.compressed,this.sig=new lre(n),this};zt.prototype.signRandomK=function(){return this.randomK(),this.sign()};zt.prototype.toString=function(){var e={};return this.hashbuf&&(e.hashbuf=this.hashbuf.toString("hex")),this.privkey&&(e.privkey=this.privkey.toString()),this.pubkey&&(e.pubkey=this.pubkey.toString()),this.sig&&(e.sig=this.sig.toString()),this.k&&(e.k=this.k.toString()),JSON.stringify(e)};zt.prototype.verify=function(){return this.verified=!this.sigError(),this.verified};zt.prototype.verifyBool=function(){return this.verify()===!0};zt.sign=function(e,t,r){return zt().set({hashbuf:e,endian:r,privkey:t}).sign().sig};zt.signWithCalcI=function(e,t,r){return zt().set({hashbuf:e,endian:r,privkey:t}).sign().calci().sig};zt.signRandomK=function(e,t,r){return zt().set({hashbuf:e,endian:r,privkey:t}).signRandomK().sig};zt.verify=function(e,t,r,i){return zt().set({hashbuf:e,endian:i,sig:t,pubkey:r}).verify()};HR.exports=zt});var zR=k((x4,jR)=>{v();(function(e,t){"use strict";typeof define=="function"&&define.amd?define([],function(){return e.secrets=t()}):typeof x4=="object"?jR.exports=t(_r()):e.secrets=t(e.crypto)})(x4,function(e){"use strict";var t,r,i,n,o;function a(){t={bits:8,radix:16,minBits:3,maxBits:20,bytesPerChar:2,maxBytesPerChar:6,primitivePolynomials:[null,null,1,3,3,5,3,3,29,17,9,5,83,27,43,3,45,9,39,39,9,5,3,33,27,9,71,39,9,5,83]},r={},i=new Array(1024).join("0"),n=!0,o=["nodeCryptoRandomBytes","browserCryptoGetRandomValues","testRandom"]}function s(){return!!(r&&r.rng&&typeof r.rng=="function")}function u(C,N){var F;if(N===0||N===1)return C;if(N&&N>1024)throw new Error("Padding must be multiples of no larger than 1024 bits.");return N=N||r.bits,C&&(F=C.length%N),F?(i+C).slice(-(N-F+C.length)):C}function c(C){var N="",F,H;for(H=C.length-1;H>=0;H--){if(F=parseInt(C[H],16),isNaN(F))throw new Error("Invalid hex character.");N=u(F.toString(2),4)+N}return N}function l(C){var N="",F,H;for(C=u(C,4),H=C.length;H>=4;H-=4){if(F=parseInt(C.slice(H-4,H),2),isNaN(F))throw new Error("Invalid binary character.");N=F.toString(16)+N}return N}function m(){return!!(e&&typeof e=="object"&&(typeof e.getRandomValues=="function"||typeof e.getRandomValues=="object")&&(typeof Uint32Array=="function"||typeof Uint32Array=="object"))}function w(){return typeof e=="object"&&typeof e.randomBytes=="function"}function E(C){function N(V,B,g,I){var y=0,f,p="",_;for(B&&(f=B.length-1);y<f||p.length<V;)_=Math.abs(parseInt(B[y],g)),p=p+u(_.toString(2),I),y++;return p=p.substr(-V),(p.match(/0/g)||[]).length===p.length?null:p}function F(V){var B,g,I,y,f=null;for(I=16,y=4,g=Math.ceil(V/8);f===null;)B=e.randomBytes(g),f=N(V,B.toString("hex"),I,y);return f}function H(V){var B,g,I,y=null;for(g=10,I=32,B=Math.ceil(V/32);y===null;)y=N(V,e.getRandomValues(new Uint32Array(B)),g,I);return y}function z(V){var B,g,I,y,f,p=null;y=10,f=32,g=Math.ceil(V/32),I=123456789,B=new Uint32Array(g);for(var _=0;_<B.length;_++)B[_]=I;for(;p===null;)p=N(V,B,y,f);return p}if(C&&C==="testRandom")return r.typeCSPRNG=C,z;if(C&&C==="nodeCryptoRandomBytes")return r.typeCSPRNG=C,F;if(C&&C==="browserCryptoGetRandomValues")return r.typeCSPRNG=C,H;if(w())return r.typeCSPRNG="nodeCryptoRandomBytes",F;if(m())return r.typeCSPRNG="browserCryptoGetRandomValues",H}function P(C,N){var F=[],H;for(N&&(C=u(C,N)),H=C.length;H>r.bits;H-=r.bits)F.push(parseInt(C.slice(H-r.bits,H),2));return F.push(parseInt(C.slice(0,H),2)),F}function M(C,N){var F=r.logs[C],H=0,z;for(z=N.length-1;z>=0;z--)H!==0?H=r.exps[(F+r.logs[H])%r.maxShares]^N[z]:H=N[z];return H}function D(C,N,F){var H=0,z,V,B,g;for(B=0,z=N.length;B<z;B++)if(F[B]){for(V=r.logs[F[B]],g=0;g<z;g++)if(B!==g){if(C===N[g]){V=-1;break}V=(V+r.logs[C^N[g]]-r.logs[N[B]^N[g]]+r.maxShares)%r.maxShares}H=V===-1?H:H^r.exps[V]}return H}function L(C,N,F){var H=[],z=[C],V,B;for(V=1;V<F;V++)z[V]=parseInt(r.rng(r.bits),2);for(V=1,B=N+1;V<B;V++)H[V-1]={x:V,y:M(V,z)};return H}function U(C,N,F){var H,z,V,B,g;if(N=parseInt(N,r.radix),C=parseInt(C,10)||r.bits,H=C.toString(36).toUpperCase(),V=Math.pow(2,C)-1,B=V.toString(r.radix).length,z=u(N.toString(r.radix),B),typeof N!="number"||N%1!==0||N<1||N>V)throw new Error("Share id must be an integer between 1 and "+V+", inclusive.");return g=H+z+F,g}var K={init:function(C,N){var F=[],H=[],z=1,V,B;if(a(),C&&(typeof C!="number"||C%1!==0||C<t.minBits||C>t.maxBits))throw new Error("Number of bits must be an integer between "+t.minBits+" and "+t.maxBits+", inclusive.");if(N&&o.indexOf(N)===-1)throw new Error("Invalid RNG type argument : '"+N+"'");for(r.radix=t.radix,r.bits=C||t.bits,r.size=Math.pow(2,r.bits),r.maxShares=r.size-1,V=t.primitivePolynomials[r.bits],B=0;B<r.size;B++)H[B]=z,F[z]=B,z=z<<1,z>=r.size&&(z=z^V,z=z&r.maxShares);if(r.logs=F,r.exps=H,N&&this.setRNG(N),s()||this.setRNG(),!s()||!r.bits||!r.size||!r.maxShares||!r.logs||!r.exps||r.logs.length!==r.size||r.exps.length!==r.size)throw new Error("Initialization failed.")},combine:function(C,N){var F,H,z,V,B="",g,I,y,f=[],p=[];for(N=N||0,F=0,z=C.length;F<z;F++){if(I=this.extractShareComponents(C[F]),g===void 0)g=I.bits;else if(I.bits!==g)throw new Error("Mismatched shares: Different bit settings.");if(r.bits!==g&&this.init(g),f.indexOf(I.id)===-1)for(f.push(I.id),y=P(c(I.data)),H=0,V=y.length;H<V;H++)p[H]=p[H]||[],p[H][f.length-1]=y[H]}for(F=0,z=p.length;F<z;F++)B=u(D(N,f,p[F]).toString(2))+B;return l(N>=1?B:B.slice(B.indexOf("1")+1))},getConfig:function(){var C={};return C.radix=r.radix,C.bits=r.bits,C.maxShares=r.maxShares,C.hasCSPRNG=s(),C.typeCSPRNG=r.typeCSPRNG,C},extractShareComponents:function(C){var N,F,H,z,V={},B,g;if(N=parseInt(C.substr(0,1),36),N&&(typeof N!="number"||N%1!==0||N<t.minBits||N>t.maxBits))throw new Error("Invalid share : Number of bits must be an integer between "+t.minBits+" and "+t.maxBits+", inclusive.");if(z=Math.pow(2,N)-1,H=(Math.pow(2,N)-1).toString(r.radix).length,B="^([a-kA-K3-9]{1})([a-fA-F0-9]{"+H+"})([a-fA-F0-9]+)$",g=new RegExp(B).exec(C),g&&(F=parseInt(g[2],r.radix)),typeof F!="number"||F%1!==0||F<1||F>z)throw new Error("Invalid share : Share id must be an integer between 1 and "+r.maxShares+", inclusive.");if(g&&g[3])return V.bits=N,V.id=F,V.data=g[3],V;throw new Error("The share data provided is invalid : "+C)},setRNG:function(C){var N="Random number generator is invalid ",F=" Supply an CSPRNG of the form function(bits){} that returns a string containing 'bits' number of random 1's and 0's.";if(C&&typeof C=="string"&&o.indexOf(C)===-1)throw new Error("Invalid RNG type argument : '"+C+"'");if(C||(C=E()),C&&typeof C=="string"&&(C=E(C)),n){if(C&&typeof C!="function")throw new Error(N+"(Not a function)."+F);if(C&&typeof C(r.bits)!="string")throw new Error(N+"(Output is not a string)."+F);if(C&&!parseInt(C(r.bits),2))throw new Error(N+"(Binary string output not parseable to an Integer)."+F);if(C&&C(r.bits).length>r.bits)throw new Error(N+"(Output length is greater than config.bits)."+F);if(C&&C(r.bits).length<r.bits)throw new Error(N+"(Output length is less than config.bits)."+F)}return r.rng=C,!0},str2hex:function(C,N){var F,H,z="",V,B,g,I;if(typeof C!="string")throw new Error("Input must be a character string.");if(N||(N=t.bytesPerChar),typeof N!="number"||N<1||N>t.maxBytesPerChar||N%1!==0)throw new Error("Bytes per character must be an integer between 1 and "+t.maxBytesPerChar+", inclusive.");for(F=2*N,H=Math.pow(16,F)-1,g=0,I=C.length;g<I;g++){if(B=C[g].charCodeAt(),isNaN(B))throw new Error("Invalid character: "+C[g]);if(B>H)throw V=Math.ceil(Math.log(B+1)/Math.log(256)),new Error("Invalid character code ("+B+"). Maximum allowable is 256^bytes-1 ("+H+"). To convert this character, use at least "+V+" bytes.");z=u(B.toString(16),F)+z}return z},hex2str:function(C,N){var F,H="",z,V;if(typeof C!="string")throw new Error("Input must be a hexadecimal string.");if(N=N||t.bytesPerChar,typeof N!="number"||N%1!==0||N<1||N>t.maxBytesPerChar)throw new Error("Bytes per character must be an integer between 1 and "+t.maxBytesPerChar+", inclusive.");for(F=2*N,C=u(C,F),z=0,V=C.length;z<V;z+=F)H=String.fromCharCode(parseInt(C.slice(z,z+F),16))+H;return H},random:function(C){if(typeof C!="number"||C%1!==0||C<2||C>65536)throw new Error("Number of bits must be an Integer between 1 and 65536.");return l(r.rng(C))},share:function(C,N,F,H){var z,V,B=new Array(N),g=new Array(N),I,y,f;if(H=H||128,typeof C!="string")throw new Error("Secret must be a string.");if(typeof N!="number"||N%1!==0||N<2)throw new Error("Number of shares must be an integer between 2 and 2^bits-1 ("+r.maxShares+"), inclusive.");if(N>r.maxShares)throw z=Math.ceil(Math.log(N+1)/Math.LN2),new Error("Number of shares must be an integer between 2 and 2^bits-1 ("+r.maxShares+"), inclusive. To create "+N+" shares, use at least "+z+" bits.");if(typeof F!="number"||F%1!==0||F<2)throw new Error("Threshold number of shares must be an integer between 2 and 2^bits-1 ("+r.maxShares+"), inclusive.");if(F>r.maxShares)throw z=Math.ceil(Math.log(F+1)/Math.LN2),new Error("Threshold number of shares must be an integer between 2 and 2^bits-1 ("+r.maxShares+"), inclusive. To use a threshold of "+F+", use at least "+z+" bits.");if(F>N)throw new Error("Threshold number of shares was "+F+" but must be less than or equal to the "+N+" shares specified as the total to generate.");if(typeof H!="number"||H%1!==0||H<0||H>1024)throw new Error("Zero-pad length must be an integer between 0 and 1024 inclusive.");for(C="1"+c(C),C=P(C,H),I=0,f=C.length;I<f;I++)for(V=L(C[I],N,F),y=0;y<N;y++)B[y]=B[y]||V[y].x.toString(r.radix),g[y]=u(V[y].y.toString(2))+(g[y]||"");for(I=0;I<N;I++)B[I]=U(r.bits,B[I],l(g[I]));return B},newShare:function(C,N){var F,H;if(C&&typeof C=="string"&&(C=parseInt(C,r.radix)),H=C.toString(r.radix),C&&H&&N&&N[0])return F=this.extractShareComponents(N[0]),U(F.bits,H,this.combine(N,C));throw new Error("Invalid 'id' or 'shares' Array argument to newShare().")},_reset:a,_padLeft:u,_hex2bin:c,_bin2hex:l,_hasCryptoGetRandomValues:m,_hasCryptoRandomBytes:w,_getRNG:E,_isSetRNG:s,_splitNumStringToIntArray:P,_horner:M,_lagrange:D,_getShares:L,_constructPublicShareString:U};return K.init(),K})});var I4=k((L6e,ZR)=>{"use strict";v();var gi=fr(),KR=ds(),VR=cr(),l6=null;function E4(){if(l6)return l6;var e=zR();return e.setRNG(function(t){for(var r=64,i=0;i<r;i++){for(var n=KR.getRandomBuffer(Math.ceil(t/8)),o="",a=0;a<n.length;a++)o+=("00000000"+n[a].toString(2)).slice(-8);if(o=o.slice(0,t),/1/.test(o))return o}throw new Error("shamir: CSPRNG returned all-zero draws "+r+" times in a row \u2014 refusing to hang on a degenerate/stubbed random source")}),l6=e,l6}var h6="ff",GR=2;function Ir(e){return this instanceof Ir?(this.options=e||{},this):new Ir(e)}Ir.split=function(e,t,r,i){if(i=i||{},e==null)throw new Error("Secret is required");if(t<2)throw new Error("Threshold must be at least 2");if(r<t)throw new Error("Number of shares must be at least threshold");if(t>255||r>255)throw new Error("Threshold and shares must be <= 255");for(var n=h.Buffer.isBuffer(e)?e:h.Buffer.from(e,"utf8"),o=h6+n.toString("hex"),a=E4().share(o,r,t),s=KR.getRandomBuffer(8).toString("hex"),u=i.checksum===!0,c=u?VR.sha256(n).slice(0,4).toString("hex"):null,l=[],m=0;m<a.length;m++)l.push({v:GR,id:m+1,threshold:t,shares:r,length:n.length,splitId:s,share:a[m],checksum:c});return l};Ir.combine=function(e){if(!e||e.length===0)throw new Error("Shares array is required");if(e[0]&&Array.isArray(e[0].bytes)&&e[0].share===void 0)return Ir._combineLegacy(e);var t=e[0].threshold,r=e[0].splitId;if(e.length<t)throw new Error("Insufficient shares: need "+t+", got "+e.length);for(var i=[],n=0;n<e.length;n++){var o=e[n];if(!o||typeof o.share!="string")throw new Error("Invalid share at index "+n);if(r!==void 0&&o.splitId!==r)throw new Error("Shares are from different splits (splitId mismatch)");if(o.threshold!==t)throw new Error("Shares have inconsistent threshold");i.push(o.share)}var a=E4().combine(i);if(a.slice(0,h6.length)!==h6)throw new Error("Reconstruction failed: invalid or insufficient shares");var s=h.Buffer.from(a.slice(h6.length),"hex"),u=e[0].checksum;if(u){var c=VR.sha256(s).slice(0,4).toString("hex");if(c!==u)throw new Error("Integrity check failed: shares are inconsistent or tampered")}return s};Ir.verifyShare=function(e){try{return!e||typeof e!="object"?!1:Array.isArray(e.bytes)&&e.share===void 0?Ir._verifyLegacyShare(e):e.v!==GR||typeof e.share!="string"||!/^[0-9a-fA-F]+$/.test(e.share)||typeof e.threshold!="number"||typeof e.shares!="number"||e.threshold<2||e.shares<e.threshold||e.shares>255||e.id<1||e.id>e.shares||e.checksum!==null&&e.checksum!==void 0&&!/^[0-9a-fA-F]{8}$/.test(e.checksum)?!1:(E4().extractShareComponents(e.share),!0)}catch{return!1}};Ir.generateTestVectors=function(){var e="Hello, Bitcoin SV!",t=3,r=5,i=Ir.split(e,t,r),n=Ir.combine(i.slice(0,t));return{secret:e,threshold:t,totalShares:r,shares:i,reconstructed:n.toString("utf8"),valid:n.toString("utf8")===e}};var Cs=new gi(2147483647);Ir._combineLegacy=function(e){var t=e[0].threshold,r=e[0].shares,i=e[0].length;if(e.length<t)throw new Error("Insufficient shares: need "+t+", got "+e.length);for(var n=0;n<e.length;n++){if(e[n].threshold!==t||e[n].shares!==r)throw new Error("Shares have inconsistent parameters");if(e[n].length!==i)throw new Error("Shares have different secret lengths")}for(var o=[],a=0;a<i;a++){for(var s=[],u=0;u<Math.min(e.length,t);u++)s.push(e[u].bytes[a]);o.push(Ir._combineByteLegacy(s))}return h.Buffer.from(o)};Ir._combineByteLegacy=function(e){for(var t=new gi(0),r=0;r<e.length;r++){for(var i=new gi(e[r].x),n=new gi(e[r].y,16),o=new gi(1),a=new gi(1),s=0;s<e.length;s++)if(r!==s){var u=new gi(e[s].x),c=new gi(0).sub(u);c.lt(new gi(0))&&(c=c.add(Cs)),o=o.mul(c).mod(Cs);var l=i.sub(u);l.lt(new gi(0))&&(l=l.add(Cs)),a=a.mul(l).mod(Cs)}var m=Ir._modInverseLegacy(a,Cs),w=o.mul(m).mod(Cs);t=t.add(n.mul(w)).mod(Cs)}return t.mod(Cs).mod(new gi(256)).toNumber()};Ir._modInverseLegacy=function(e,t){e.lt(new gi(0))&&(e=e.mod(t).add(t));var r=Ir._extendedGCDLegacy(e,t);if(!r.gcd.eq(new gi(1)))throw new Error("Modular inverse does not exist");return r.x.mod(t).add(t).mod(t)};Ir._extendedGCDLegacy=function(e,t){if(e.eq(new gi(0)))return{gcd:t,x:new gi(0),y:new gi(1)};var r=Ir._extendedGCDLegacy(t.mod(e),e);return{gcd:r.gcd,x:r.y.sub(t.div(e).mul(r.x)),y:r.x}};Ir._verifyLegacyShare=function(e){if(!e.id||!e.threshold||!e.shares||!e.bytes||typeof e.length!="number"||e.threshold<2||e.shares<e.threshold||!Array.isArray(e.bytes)||e.bytes.length!==e.length)return!1;for(var t=0;t<e.bytes.length;t++){var r=e.bytes[t];if(!r||!r.x||!r.y||r.x<1||r.x>e.shares||!/^[0-9a-fA-F]+$/.test(r.y))return!1}return!0};ZR.exports=Ir});var p6=k((U6e,WR)=>{"use strict";v();var Uo=fr(),gre=vn(),vre=o6(),Z0=gre.getN(),d6=Z0.shrn(1);function mre(e,t,r){if(!h.Buffer.isBuffer(e)||e.length!==32)throw new Error("Invalid message hash: must be 32-byte buffer");if(!t)return!1;let i=t;if(h.Buffer.isBuffer(t))try{i=Vr().fromDER(t)}catch{return!1}if(!i||!i.r||!i.s)return!1;let n=Uo.isBN(i.r)?i.r:new Uo(i.r),o=Uo.isBN(i.s)?i.s:new Uo(i.s);if(n.isZero()||o.isZero()||n.gte(Z0)||o.gte(Z0)||o.gt(d6))return!1;let a=Vr(),s=new a({r:n,s:o});return vre.verify(e,s,r)}function yre(e){if(!e)return!1;let t=e;if(h.Buffer.isBuffer(e))try{t=Vr().fromDER(e)}catch{return!1}return!t||!t.s?!1:(Uo.isBN(t.s)?t.s:new Uo(t.s)).lte(d6)}function bre(e){if(!e||!e.r||!e.s)throw new Error("Invalid signature object");let t=Uo.isBN(e.r)?e.r:new Uo(e.r),r=Uo.isBN(e.s)?e.s:new Uo(e.s),i=r;return r.gt(d6)&&(i=Z0.sub(r)),{r:t,s:i}}WR.exports={smartVerify:mre,isCanonical:yre,canonicalize:bre,constants:{n:Z0,nh:d6}}});var g6=k((H6e,XR)=>{"use strict";v();var _re=fr(),{secp256k1:ll}=(d0(),ho(h0)),YR=ll.Point,wre=YR.Fn.ORDER;function O4(e){var t=e.toString(16);return t.length%2&&(t="0"+t),new _re(t,16)}function A4(e){return h.Buffer.isBuffer(e)?Uint8Array.from(e):e instanceof Uint8Array?e:Uint8Array.from(h.Buffer.from(e,"hex"))}function P4(e){this._p=e}P4.prototype.eq=function(e){var t=e&&e._p?e._p:e;return this._p.equals(t)};var $R={curve:{n:O4(wre)},keyFromPrivate:function(e,t){var r;h.Buffer.isBuffer(e)?r=e:e instanceof Uint8Array?r=h.Buffer.from(e):r=h.Buffer.from(e,t||"hex");var i=Uint8Array.from(r);return{_priv:i,getPublic:function(){return new P4(YR.fromBytes(ll.getPublicKey(i,!0)))}}},sign:function(e,t){var r=ll.sign(A4(e),t._priv,{lowS:!0,prehash:!1,format:"recovered"}),i=r[0],n=O4(BigInt("0x"+h.Buffer.from(r.subarray(1,33)).toString("hex"))),o=O4(BigInt("0x"+h.Buffer.from(r.subarray(33,65)).toString("hex")));return{r:n,s:o,recoveryParam:i}},verify:function(e,t,r){try{if(!t||typeof t!="object")return!1;var i=t.r,n=t.s;if(!i||!n||typeof i.cmp!="function"||typeof n.cmp!="function"||i.isZero()||n.isZero())return!1;var o=$R.curve.n;if(i.cmp(o)>=0||n.cmp(o)>=0)return!1;var a=h.Buffer.concat([i.toBuffer({size:32}),n.toBuffer({size:32})]),s=r._priv?ll.getPublicKey(r._priv,!0):r._p?r._p.toBytes(!0):r;return ll.verify(Uint8Array.from(a),A4(e),Uint8Array.from(s),{lowS:!1,prehash:!1})}catch{return!1}},recoverPubKey:function(e,t,r){var i=h.Buffer.concat([t.r.toBuffer({size:32}),t.s.toBuffer({size:32})]),n=ll.Signature.fromBytes(Uint8Array.from(i),"compact").addRecoveryBit(r);return new P4(n.recoverPublicKey(A4(e)))}};XR.exports=$R});var Y0=k((z6e,eB)=>{"use strict";v();var v6=Et(),W0=fr(),m6=La(),Sre=Wn(),xre=cr(),JR=Bt(),Ere=486604799,vt=function e(t){if(!(this instanceof e))return new e(t);var r=e._from(t);return this.version=r.version,this.prevHash=r.prevHash,this.merkleRoot=r.merkleRoot,this.time=r.time,this.timestamp=r.time,this.bits=r.bits,this.nonce=r.nonce,r.hash&&JR.checkState(this.hash===r.hash,"Argument object hash property does not match block hash."),this};vt._from=function(t){var r={};if(h.Buffer.isBuffer(t))r=vt._fromBufferReader(m6(t));else if(v6.isObject(t))r=vt._fromObject(t);else throw new TypeError("Unrecognized argument for BlockHeader");return r};vt._fromObject=function(t){JR.checkArgument(t,"data is required");var r=t.prevHash,i=t.merkleRoot;v6.isString(t.prevHash)&&(r=h.Buffer.from(t.prevHash,"hex").reverse()),v6.isString(t.merkleRoot)&&(i=h.Buffer.from(t.merkleRoot,"hex").reverse());var n={hash:t.hash,version:t.version,prevHash:r,merkleRoot:i,time:t.time,timestamp:t.time,bits:t.bits,nonce:t.nonce};return n};vt.fromObject=function(t){var r=vt._fromObject(t);return new vt(r)};vt.fromRawBlock=function(t){h.Buffer.isBuffer(t)||(t=h.Buffer.from(t,"binary"));var r=m6(t);r.pos=vt.Constants.START_OF_HEADER;var i=vt._fromBufferReader(r);return new vt(i)};vt.fromBuffer=function(t){var r=vt._fromBufferReader(m6(t));return new vt(r)};vt.fromString=function(t){var r=h.Buffer.from(t,"hex");return vt.fromBuffer(r)};vt._fromBufferReader=function(t){var r={};return r.version=t.readInt32LE(),r.prevHash=t.read(32),r.merkleRoot=t.read(32),r.time=t.readUInt32LE(),r.bits=t.readUInt32LE(),r.nonce=t.readUInt32LE(),r};vt.fromBufferReader=function(t){var r=vt._fromBufferReader(t);return new vt(r)};vt.prototype.toObject=vt.prototype.toJSON=function(){return{hash:this.hash,version:this.version,prevHash:h.Buffer.from(this.prevHash).reverse().toString("hex"),merkleRoot:h.Buffer.from(this.merkleRoot).reverse().toString("hex"),time:this.time,bits:this.bits,nonce:this.nonce}};vt.prototype.toBuffer=function(){return this.toBufferWriter().concat()};vt.prototype.toString=function(){return this.toBuffer().toString("hex")};vt.prototype.toBufferWriter=function(t){return t||(t=new Sre),t.writeInt32LE(this.version),t.write(this.prevHash),t.write(this.merkleRoot),t.writeUInt32LE(this.time),t.writeUInt32LE(this.bits),t.writeUInt32LE(this.nonce),t};vt.prototype.getTargetDifficulty=function(t){t=t||this.bits;for(var r=new W0(t&16777215),i=8*((t>>>24)-3);i-- >0;)r=r.mul(new W0(2));return r};vt.prototype.getDifficulty=function(){var t=this.getTargetDifficulty(Ere).mul(new W0(Math.pow(10,8))),r=this.getTargetDifficulty(),i=t.div(r).toString(10),n=i.length-8;return i=i.slice(0,n)+"."+i.slice(n),parseFloat(i)};vt.prototype._getHash=function(){var t=this.toBuffer();return xre.sha256sha256(t)};var QR={configurable:!1,enumerable:!0,get:function(){return this._id||(this._id=m6(this._getHash()).readReverse().toString("hex")),this._id},set:v6.noop};Object.defineProperty(vt.prototype,"id",QR);Object.defineProperty(vt.prototype,"hash",QR);vt.prototype.validTimestamp=function(){var t=Math.round(new Date().getTime()/1e3);return!(this.time>t+vt.Constants.MAX_TIME_OFFSET)};vt.prototype.validProofOfWork=function(){var t=new W0(this.id,"hex"),r=this.getTargetDifficulty();return!(t.cmp(r)>0)};vt.prototype.inspect=function(){return"<BlockHeader "+this.id+">"};vt.Constants={START_OF_HEADER:8,MAX_TIME_OFFSET:7200,LARGEST_HASH:new W0("10000000000000000000000000000000000000000000000000000000000000000","hex")};eB.exports=vt});var aB=k((V6e,oB)=>{"use strict";v();var k4=Et(),rB=Y0(),tB=fr(),R4=La(),Ire=Wn(),Ore=cr(),T4=Rs(),iB=Bt();function st(e){return this instanceof st?(k4.extend(this,st._from(e)),this):new st(e)}st.MAX_BLOCK_SIZE=128e6;st._from=function(t){var r={};if(h.Buffer.isBuffer(t))r=st._fromBufferReader(R4(t));else if(k4.isObject(t))r=st._fromObject(t);else throw new TypeError("Unrecognized argument for Block");return r};st._fromObject=function(t){var r=[];t.transactions.forEach(function(n){n instanceof T4?r.push(n):r.push(T4().fromObject(n))});var i={header:rB.fromObject(t.header),transactions:r};return i};st.fromObject=function(t){var r=st._fromObject(t);return new st(r)};st._fromBufferReader=function(t){var r={};iB.checkState(!t.finished(),"No block data received"),r.header=rB.fromBufferReader(t);var i=t.readVarintNum();r.transactions=[];for(var n=0;n<i;n++)r.transactions.push(T4().fromBufferReader(t));return r};st.fromBufferReader=function(t){iB.checkArgument(t,"br is required");var r=st._fromBufferReader(t);return new st(r)};st.fromBuffer=function(t){return st.fromBufferReader(new R4(t))};st.fromString=function(t){var r=h.Buffer.from(t,"hex");return st.fromBuffer(r)};st.fromRawBlock=function(t){h.Buffer.isBuffer(t)||(t=h.Buffer.from(t,"binary"));var r=R4(t);r.pos=st.Values.START_OF_BLOCK;var i=st._fromBufferReader(r);return new st(i)};st.prototype.toObject=st.prototype.toJSON=function(){var t=[];return this.transactions.forEach(function(r){t.push(r.toObject())}),{header:this.header.toObject(),transactions:t}};st.prototype.toBuffer=function(){return this.toBufferWriter().concat()};st.prototype.toString=function(){return this.toBuffer().toString("hex")};st.prototype.toBufferWriter=function(t){t||(t=new Ire),t.write(this.header.toBuffer()),t.writeVarintNum(this.transactions.length);for(var r=0;r<this.transactions.length;r++)this.transactions[r].toBufferWriter(t);return t};st.prototype.getTransactionHashes=function(){var t=[];if(this.transactions.length===0)return[st.Values.NULL_HASH];for(var r=0;r<this.transactions.length;r++)t.push(this.transactions[r]._getHash());return t};st.prototype.getMerkleTree=function(){for(var t=this.getTransactionHashes(),r=0,i=this.transactions.length;i>1;i=Math.floor((i+1)/2)){for(var n=0;n<i;n+=2){var o=Math.min(n+1,i-1),a=h.Buffer.concat([t[r+n],t[r+o]]);t.push(Ore.sha256sha256(a))}r+=i}return t};st.prototype.getMerkleRoot=function(){var t=this.getMerkleTree();return t[t.length-1]};st.prototype.validMerkleRoot=function(){var t=new tB(this.header.merkleRoot.toString("hex"),"hex"),r=new tB(this.getMerkleRoot().toString("hex"),"hex");return t.cmp(r)===0};st.prototype._getHash=function(){return this.header._getHash()};var nB={configurable:!1,enumerable:!0,get:function(){return this._id||(this._id=this.header.id),this._id},set:k4.noop};Object.defineProperty(st.prototype,"id",nB);Object.defineProperty(st.prototype,"hash",nB);st.prototype.inspect=function(){return"<Block "+this.id+">"};st.Values={START_OF_BLOCK:8,NULL_HASH:h.Buffer.from("0000000000000000000000000000000000000000000000000000000000000000","hex")};oB.exports=st});var C4=k((Z6e,fB)=>{"use strict";v();var vf=Et(),M4=Y0(),uB=La(),Are=Wn(),Pre=cr(),sB=Rs(),B4=hn(),mf=Bt();function nr(e){if(!(this instanceof nr))return new nr(e);var t={};if(h.Buffer.isBuffer(e))t=nr._fromBufferReader(uB(e));else if(vf.isObject(e)){var r;e.header instanceof M4?r=e.header:r=M4.fromObject(e.header),t={header:r,numTransactions:e.numTransactions,hashes:e.hashes,flags:e.flags}}else throw new TypeError("Unrecognized argument for MerkleBlock");return vf.extend(this,t),this._flagBitsUsed=0,this._hashesUsed=0,this}nr.fromBuffer=function(t){return nr.fromBufferReader(uB(t))};nr.fromBufferReader=function(t){return new nr(nr._fromBufferReader(t))};nr.prototype.toBuffer=function(){return this.toBufferWriter().concat()};nr.prototype.toBufferWriter=function(t){t||(t=new Are),t.write(this.header.toBuffer()),t.writeUInt32LE(this.numTransactions),t.writeVarintNum(this.hashes.length);for(var r=0;r<this.hashes.length;r++)t.write(h.Buffer.from(this.hashes[r],"hex"));for(t.writeVarintNum(this.flags.length),r=0;r<this.flags.length;r++)t.writeUInt8(this.flags[r]);return t};nr.prototype.toObject=nr.prototype.toJSON=function(){return{header:this.header.toObject(),numTransactions:this.numTransactions,hashes:this.hashes,flags:this.flags}};nr.prototype.validMerkleTree=function(){if(mf.checkState(vf.isArray(this.flags),"MerkleBlock flags is not an array"),mf.checkState(vf.isArray(this.hashes),"MerkleBlock hashes is not an array"),this.hashes.length>this.numTransactions||this.flags.length*8<this.hashes.length)return!1;var t=this._calcTreeHeight(),r={hashesUsed:0,flagBitsUsed:0},i=this._traverseMerkleTree(t,0,r);return r.hashesUsed!==this.hashes.length?!1:i.equals(this.header.merkleRoot)};nr.prototype.filterdTxsHash=function(){throw new Error("filterdTxsHash has been deprecated. use filteredTxsHash.")};nr.prototype.filteredTxsHash=function(){if(mf.checkState(vf.isArray(this.flags),"MerkleBlock flags is not an array"),mf.checkState(vf.isArray(this.hashes),"MerkleBlock hashes is not an array"),this.hashes.length>this.numTransactions)throw new B4.MerkleBlock.InvalidMerkleTree;if(this.flags.length*8<this.hashes.length)throw new B4.MerkleBlock.InvalidMerkleTree;if(this.hashes.length===1)return[];var t=this._calcTreeHeight(),r={hashesUsed:0,flagBitsUsed:0},i=this._traverseMerkleTree(t,0,r,!0);if(r.hashesUsed!==this.hashes.length)throw new B4.MerkleBlock.InvalidMerkleTree;return i};nr.prototype._traverseMerkleTree=function(t,r,i,n){if(i=i||{},i.txs=i.txs||[],i.flagBitsUsed=i.flagBitsUsed||0,i.hashesUsed=i.hashesUsed||0,n=n||!1,i.flagBitsUsed>this.flags.length*8)return null;var o=this.flags[i.flagBitsUsed>>3]>>>(i.flagBitsUsed++&7)&1;if(t===0||!o){if(i.hashesUsed>=this.hashes.length)return null;var a=this.hashes[i.hashesUsed++];return t===0&&o&&i.txs.push(a),h.Buffer.from(a,"hex")}else{var s=this._traverseMerkleTree(t-1,r*2,i),u=s;return r*2+1<this._calcTreeWidth(t-1)&&(u=this._traverseMerkleTree(t-1,r*2+1,i)),n?i.txs:Pre.sha256sha256(h.Buffer.concat([s,u]))}};nr.prototype._calcTreeWidth=function(t){return this.numTransactions+(1<<t)-1>>t};nr.prototype._calcTreeHeight=function(){for(var t=0;this._calcTreeWidth(t)>1;)t++;return t};nr.prototype.hasTransaction=function(t){mf.checkArgument(!vf.isUndefined(t),"tx cannot be undefined"),mf.checkArgument(t instanceof sB||typeof t=="string",'Invalid tx given, tx must be a "string" or "Transaction"');var r=t;t instanceof sB&&(r=h.Buffer.from(t.id,"hex").reverse().toString("hex"));var i=[],n=this._calcTreeHeight();return this._traverseMerkleTree(n,0,{txs:i}),i.indexOf(r)!==-1};nr._fromBufferReader=function(t){mf.checkState(!t.finished(),"No merkleblock data received");var r={};r.header=M4.fromBufferReader(t),r.numTransactions=t.readUInt32LE();var i=t.readVarintNum();r.hashes=[];for(var n=0;n<i;n++)r.hashes.push(t.read(32).toString("hex"));var o=t.readVarintNum();for(r.flags=[],n=0;n<o;n++)r.flags.push(t.readUInt8());return r};nr.fromObject=function(t){return new nr(t)};fB.exports=nr});var cB=k((Y6e,y6)=>{v();y6.exports=aB();y6.exports.BlockHeader=Y0();y6.exports.MerkleBlock=C4()});var yB=k((X6e,mB)=>{"use strict";v();var pB=ke(),lB=pB.crypto.Hash,hB=/^[0-9a-fA-F]{64}$/;function gB(e){return h.Buffer.from(e).reverse()}function dB(e){return gB(h.Buffer.from(e,"hex"))}function vB(e){return gB(e).toString("hex")}function N4(e,t,r){if(!hB.test(String(e)))throw new Error("txid must be 32-byte hex");if(!Number.isInteger(t)||t<0)throw new Error("index must be a non-negative integer");r=r||[];for(var i=dB(e),n=t,o=0;o<r.length;o++){var a=r[o],s;if(a==="*"||a===""||a==null)s=i;else{if(!hB.test(String(a)))throw new Error("proof node "+o+' must be 32-byte hex or "*"');s=dB(a)}i=n&1?lB.sha256sha256(h.Buffer.concat([s,i])):lB.sha256sha256(h.Buffer.concat([i,s])),n=Math.floor(n/2)}return vB(i)}function Tre(e){if(!e||!e.merkleRoot)throw new Error("proof.merkleRoot is required");var t=N4(e.txid,e.index,e.nodes);return t.toLowerCase()===String(e.merkleRoot).toLowerCase()}function kre(e){var t=e.header;if((h.Buffer.isBuffer(t)||typeof t=="string")&&(t=pB.BlockHeader.fromBuffer(h.Buffer.isBuffer(t)?t:h.Buffer.from(t,"hex"))),!t||!t.merkleRoot)throw new Error("a valid block header is required");var r=vB(t.merkleRoot),i=N4(e.txid,e.index,e.nodes),n=i.toLowerCase()===r.toLowerCase(),o=e.requirePow!==!1,a=t.validProofOfWork();return{valid:n&&(!o||a),rootMatches:n,powValid:a,merkleRoot:i,blockHash:t.id}}mB.exports={merkleRootFromBranch:N4,verifyMerkleProof:Tre,verifyTxInclusion:kre}});var wB=k((Q6e,_B)=>{"use strict";v();var bB=ke();function Rre(e){return h.Buffer.from(e).reverse()}function Bre(e){if(e&&typeof e.validProofOfWork=="function")return e;if(h.Buffer.isBuffer(e))return bB.BlockHeader.fromBuffer(e);if(typeof e=="string")return bB.BlockHeader.fromBuffer(h.Buffer.from(e,"hex"));throw new Error("each header must be a BlockHeader, an 80-byte Buffer, or hex")}function Mre(e,t){if(t=t||{},!Array.isArray(e)||e.length===0)throw new Error("headers must be a non-empty array");for(var r=e.map(Bre),i=t.requirePow!==!1,n=0,o=0;o<r.length;o++){if(i&&!r[o].validProofOfWork())return{valid:!1,reason:"invalid proof-of-work at index "+o,count:r.length};if(n+=r[o].getDifficulty(),o>0){var a=Rre(r[o].prevHash).toString("hex").toLowerCase()===r[o-1].id.toLowerCase();if(!a)return{valid:!1,reason:"broken link at index "+o,count:r.length}}}var s=r[0].id,u=r[r.length-1].id;if(t.trustedHash){var c=String(t.trustedHash).toLowerCase();if(c!==u.toLowerCase()&&c!==s.toLowerCase())return{valid:!1,reason:"chain is not anchored at the trusted hash",count:r.length,anchorHash:s,tipHash:u}}return{valid:!0,count:r.length,anchorHash:s,tipHash:u,work:n}}_B.exports={verifyHeaderChain:Mre}});var xB=k((t5e,SB)=>{"use strict";v();var D4=yB(),Cre=wB();SB.exports={merkleRootFromBranch:D4.merkleRootFromBranch,verifyMerkleProof:D4.verifyMerkleProof,verifyTxInclusion:D4.verifyTxInclusion,verifyHeaderChain:Cre.verifyHeaderChain}});var q4=k((i5e,TB)=>{"use strict";v();var Or=Et(),EB=Bt(),IB=fr(),Nre=S0(),b6=Qc(),OB=cr(),_6=U4(),yf=xs(),L4=vn(),AB=$n(),PB=hn(),$0=PB,ro=PB.HDPublicKey,w6=Is(),Ns=pi();function oe(e){if(e instanceof oe)return e;if(!(this instanceof oe))return new oe(e);if(e)if(Or.isString(e)||h.Buffer.isBuffer(e)){var t=oe.getSerializedError(e);if(t){if(h.Buffer.isBuffer(e)&&!oe.getSerializedError(e.toString()))return this._buildFromSerialized(e.toString());if(t instanceof ro.ArgumentIsPrivateExtended)return new _6(e).hdPublicKey;throw t}else return this._buildFromSerialized(e)}else{if(Or.isObject(e))return e instanceof _6?this._buildFromPrivate(e):this._buildFromObject(e);throw new ro.UnrecognizedArgument(e)}else throw new ro.MustSupplyArgument}oe.fromHDPrivateKey=function(e){return new oe(e)};oe.isValidPath=function(e){if(Or.isString(e)){var t=_6._getDerivationIndexes(e);return t!==null&&Or.every(t,oe.isValidPath)}return Or.isNumber(e)?e>=0&&e<oe.Hardened:!1};oe.prototype.derive=function(){throw new Error("derive has been deprecated. use deriveChild or, for the old way, deriveNonCompliantChild.")};oe.prototype.deriveChild=function(e,t){if(Or.isNumber(e))return this._deriveWithNumber(e,t);if(Or.isString(e))return this._deriveFromString(e);throw new ro.InvalidDerivationArgument(e)};oe.prototype._deriveWithNumber=function(e,t){if(e>=oe.Hardened||t)throw new ro.InvalidIndexCantDeriveHardened;if(e<0)throw new ro.InvalidPath(e);var r=Ns.integerAsBuffer(e),i=h.Buffer.concat([this.publicKey.toBuffer(),r]),n=OB.sha512hmac(i,this._buffers.chainCode),o=IB.fromBuffer(n.slice(0,32),{size:32}),a=n.slice(32,64),s;try{s=AB.fromPoint(L4.getG().mul(o).add(this.publicKey.point))}catch{return this._deriveWithNumber(e+1)}var u=new oe({network:this.network,depth:this.depth+1,parentFingerPrint:this.fingerPrint,childIndex:e,chainCode:a,publicKey:s});return u};oe.prototype._deriveFromString=function(e){if(Or.includes(e,"'"))throw new ro.InvalidIndexCantDeriveHardened;if(!oe.isValidPath(e))throw new ro.InvalidPath(e);var t=_6._getDerivationIndexes(e),r=t.reduce(function(i,n){return i._deriveWithNumber(n)},this);return r};oe.isValidSerialized=function(e,t){return Or.isNull(oe.getSerializedError(e,t))};oe.getSerializedError=function(e,t){if(!(Or.isString(e)||h.Buffer.isBuffer(e)))return new ro.UnrecognizedArgument("expected buffer or string");if(!Nre.validCharacters(e))return new $0.InvalidB58Char("(unknown)",e);try{e=b6.decode(e)}catch{return new $0.InvalidB58Checksum(e)}if(e.length!==oe.DataSize)return new ro.InvalidLength(e);if(!Or.isUndefined(t)){var r=oe._validateNetwork(e,t);if(r)return r}var i=e.readUInt32BE(0);return i===yf.livenet.xprivkey||i===yf.testnet.xprivkey?new ro.ArgumentIsPrivateExtended:null};oe._validateNetwork=function(e,t){var r=yf.get(t);if(!r)return new $0.InvalidNetworkArgument(t);var i=e.slice(oe.VersionStart,oe.VersionEnd);return i.readUInt32BE(0)!==r.xpubkey?new $0.InvalidNetwork(i):null};oe.prototype._buildFromPrivate=function(e){var t=Or.clone(e._buffers),r=L4.getG().mul(IB.fromBuffer(t.privateKey));return t.publicKey=L4.pointToCompressed(r),t.version=Ns.integerAsBuffer(yf.get(t.version.readUInt32BE(0)).xpubkey),t.privateKey=void 0,t.checksum=void 0,t.xprivkey=void 0,this._buildFromBuffers(t)};oe.prototype._buildFromObject=function(e){var t={version:e.network?Ns.integerAsBuffer(yf.get(e.network).xpubkey):e.version,depth:Or.isNumber(e.depth)?h.Buffer.from([e.depth&255]):e.depth,parentFingerPrint:Or.isNumber(e.parentFingerPrint)?Ns.integerAsBuffer(e.parentFingerPrint):e.parentFingerPrint,childIndex:Or.isNumber(e.childIndex)?Ns.integerAsBuffer(e.childIndex):e.childIndex,chainCode:Or.isString(e.chainCode)?h.Buffer.from(e.chainCode,"hex"):e.chainCode,publicKey:Or.isString(e.publicKey)?h.Buffer.from(e.publicKey,"hex"):h.Buffer.isBuffer(e.publicKey)?e.publicKey:e.publicKey.toBuffer(),checksum:Or.isNumber(e.checksum)?Ns.integerAsBuffer(e.checksum):e.checksum};return this._buildFromBuffers(t)};oe.prototype._buildFromSerialized=function(e){var t=b6.decode(e),r={version:t.slice(oe.VersionStart,oe.VersionEnd),depth:t.slice(oe.DepthStart,oe.DepthEnd),parentFingerPrint:t.slice(oe.ParentFingerPrintStart,oe.ParentFingerPrintEnd),childIndex:t.slice(oe.ChildIndexStart,oe.ChildIndexEnd),chainCode:t.slice(oe.ChainCodeStart,oe.ChainCodeEnd),publicKey:t.slice(oe.PublicKeyStart,oe.PublicKeyEnd),checksum:t.slice(oe.ChecksumStart,oe.ChecksumEnd),xpubkey:e};return this._buildFromBuffers(r)};oe.prototype._buildFromBuffers=function(e){oe._validateBufferArguments(e),Ns.defineImmutable(this,{_buffers:e});var t=[e.version,e.depth,e.parentFingerPrint,e.childIndex,e.chainCode,e.publicKey],r=h.Buffer.concat(t),i=b6.checksum(r);if(!e.checksum||!e.checksum.length)e.checksum=i;else if(e.checksum.toString("hex")!==i.toString("hex"))throw new $0.InvalidB58Checksum(r,i);var n=yf.get(e.version.readUInt32BE(0)),o;o=b6.encode(h.Buffer.concat(t)),e.xpubkey=h.Buffer.from(o);var a=new AB(e.publicKey,{network:n}),s=oe.ParentFingerPrintSize,u=OB.sha256ripemd160(a.toBuffer()).slice(0,s);return Ns.defineImmutable(this,{xpubkey:o,network:n,depth:e.depth[0],publicKey:a,fingerPrint:u}),this};oe._validateBufferArguments=function(e){var t=function(r,i){var n=e[r];w6(h.Buffer.isBuffer(n),r+" argument is not a buffer, it's "+typeof n),w6(n.length===i,r+" has not the expected size: found "+n.length+", expected "+i)};t("version",oe.VersionSize),t("depth",oe.DepthSize),t("parentFingerPrint",oe.ParentFingerPrintSize),t("childIndex",oe.ChildIndexSize),t("chainCode",oe.ChainCodeSize),t("publicKey",oe.PublicKeySize),e.checksum&&e.checksum.length&&t("checksum",oe.CheckSumSize)};oe.fromString=function(e){return EB.checkArgument(Or.isString(e),"No valid string was provided"),new oe(e)};oe.fromObject=function(e){return EB.checkArgument(Or.isObject(e),"No valid argument was provided"),new oe(e)};oe.prototype.toString=function(){return this.xpubkey};oe.prototype.inspect=function(){return"<HDPublicKey: "+this.xpubkey+">"};oe.prototype.toObject=oe.prototype.toJSON=function(){return{network:yf.get(this._buffers.version.readUInt32BE(0)).name,depth:this._buffers.depth[0],fingerPrint:this.fingerPrint.readUInt32BE(0),parentFingerPrint:this._buffers.parentFingerPrint.readUInt32BE(0),childIndex:this._buffers.childIndex.readUInt32BE(0),chainCode:this._buffers.chainCode.toString("hex"),publicKey:this.publicKey.toString(),checksum:this._buffers.checksum.readUInt32BE(0),xpubkey:this.xpubkey}};oe.fromBuffer=function(e){return new oe(e)};oe.fromHex=function(e){return oe.fromBuffer(h.Buffer.from(e,"hex"))};oe.prototype.toBuffer=function(){return h.Buffer.from(this._buffers.xpubkey)};oe.prototype.toHex=function(){return this.toBuffer().toString("hex")};oe.Hardened=2147483648;oe.RootElementAlias=["m","M"];oe.VersionSize=4;oe.DepthSize=1;oe.ParentFingerPrintSize=4;oe.ChildIndexSize=4;oe.ChainCodeSize=32;oe.PublicKeySize=33;oe.CheckSumSize=4;oe.DataSize=78;oe.SerializedByteSize=82;oe.VersionStart=0;oe.VersionEnd=oe.VersionStart+oe.VersionSize;oe.DepthStart=oe.VersionEnd;oe.DepthEnd=oe.DepthStart+oe.DepthSize;oe.ParentFingerPrintStart=oe.DepthEnd;oe.ParentFingerPrintEnd=oe.ParentFingerPrintStart+oe.ParentFingerPrintSize;oe.ChildIndexStart=oe.ParentFingerPrintEnd;oe.ChildIndexEnd=oe.ChildIndexStart+oe.ChildIndexSize;oe.ChainCodeStart=oe.ChildIndexEnd;oe.ChainCodeEnd=oe.ChainCodeStart+oe.ChainCodeSize;oe.PublicKeyStart=oe.ChainCodeEnd;oe.PublicKeyEnd=oe.PublicKeyStart+oe.PublicKeySize;oe.ChecksumStart=oe.PublicKeyEnd;oe.ChecksumEnd=oe.ChecksumStart+oe.CheckSumSize;w6(oe.PublicKeyEnd===oe.DataSize);w6(oe.ChecksumEnd===oe.SerializedByteSize);TB.exports=oe});var U4=k((o5e,CB)=>{"use strict";v();var S6=Is(),J0=Kt(),mr=Et(),RB=Bt(),BB=fr(),Dre=S0(),X0=Qc(),F4=cr(),bf=xs(),Lre=vn(),MB=z0(),qre=ds(),hl=hn(),Ho=hl.HDPrivateKey,Fo=pi(),Ure=128,kB=1/8,Fre=512;function J(e){if(e instanceof J)return e;if(!(this instanceof J))return new J(e);if(!e)return this._generateRandomly();if(bf.get(e))return this._generateRandomly(e);if(mr.isString(e)||h.Buffer.isBuffer(e))if(J.isValidSerialized(e))this._buildFromSerialized(e);else if(Fo.isValidJSON(e))this._buildFromJSON(e);else if(h.Buffer.isBuffer(e)&&J.isValidSerialized(e.toString()))this._buildFromSerialized(e.toString());else throw J.getSerializedError(e);else if(mr.isObject(e))this._buildFromObject(e);else throw new Ho.UnrecognizedArgument(e)}J.fromRandom=function(e){return new J(e)};J.isValidPath=function(e,t){if(mr.isString(e)){var r=J._getDerivationIndexes(e);return r!==null&&mr.every(r,J.isValidPath)}return mr.isNumber(e)?(e<J.Hardened&&t===!0&&(e+=J.Hardened),e>=0&&e<J.MaxIndex):!1};J._getDerivationIndexes=function(e){var t=e.split("/");if(mr.includes(J.RootElementAlias,e))return[];if(!mr.includes(J.RootElementAlias,t[0]))return null;var r=t.slice(1).map(function(i){var n=i.slice(-1)==="'";if(n&&(i=i.slice(0,-1)),!i||i[0]==="-")return NaN;var o=+i;return n&&(o+=J.Hardened),o});return mr.some(r,isNaN)?null:r};J.prototype.derive=function(){throw new Error("derive has been deprecated. use deriveChild or, for the old way, deriveNonCompliantChild.")};J.prototype.deriveChild=function(e,t){if(mr.isNumber(e))return this._deriveWithNumber(e,t);if(mr.isString(e))return this._deriveFromString(e);throw new Ho.InvalidDerivationArgument(e)};J.prototype.deriveNonCompliantChild=function(e,t){if(mr.isNumber(e))return this._deriveWithNumber(e,t,!0);if(mr.isString(e))return this._deriveFromString(e,!0);throw new Ho.InvalidDerivationArgument(e)};J.prototype._deriveWithNumber=function(e,t,r){if(!J.isValidPath(e,t))throw new Ho.InvalidPath(e);t=e>=J.Hardened?!0:t,e<J.Hardened&&t===!0&&(e+=J.Hardened);var i=Fo.integerAsBuffer(e),n;if(t&&r){var o=this.privateKey.bn.toBuffer();n=h.Buffer.concat([J0.Buffer.from([0]),o,i])}else if(t){var a=this.privateKey.bn.toBuffer({size:32});S6(a.length===32,"length of private key buffer is expected to be 32 bytes"),n=h.Buffer.concat([J0.Buffer.from([0]),a,i])}else n=h.Buffer.concat([this.publicKey.toBuffer(),i]);var s=F4.sha512hmac(n,this._buffers.chainCode),u=BB.fromBuffer(s.slice(0,32),{size:32}),c=s.slice(32,64),l=u.add(this.privateKey.toBigNumber()).umod(Lre.getN()).toBuffer({size:32});if(!MB.isValid(l))return this._deriveWithNumber(e+1,null,r);var m=new J({network:this.network,depth:this.depth+1,parentFingerPrint:this.fingerPrint,childIndex:e,chainCode:c,privateKey:l});return m};J.prototype._deriveFromString=function(e,t){if(!J.isValidPath(e))throw new Ho.InvalidPath(e);var r=J._getDerivationIndexes(e),i=r.reduce(function(n,o){return n._deriveWithNumber(o,null,t)},this);return i};J.isValidSerialized=function(e,t){return!J.getSerializedError(e,t)};J.getSerializedError=function(e,t){if(!(mr.isString(e)||h.Buffer.isBuffer(e)))return new Ho.UnrecognizedArgument("Expected string or buffer");if(!Dre.validCharacters(e))return new hl.InvalidB58Char("(unknown)",e);try{e=X0.decode(e)}catch{return new hl.InvalidB58Checksum(e)}if(e.length!==J.DataLength)return new Ho.InvalidLength(e);if(!mr.isUndefined(t)){var r=J._validateNetwork(e,t);if(r)return r}return null};J._validateNetwork=function(e,t){var r=bf.get(t);if(!r)return new hl.InvalidNetworkArgument(t);var i=e.slice(0,4);return i.readUInt32BE(0)!==r.xprivkey?new hl.InvalidNetwork(i):null};J.fromString=function(e){return RB.checkArgument(mr.isString(e),"No valid string was provided"),new J(e)};J.fromObject=function(e){return RB.checkArgument(mr.isObject(e),"No valid argument was provided"),new J(e)};J.prototype._buildFromJSON=function(e){return this._buildFromObject(JSON.parse(e))};J.prototype._buildFromObject=function(e){var t={version:e.network?Fo.integerAsBuffer(bf.get(e.network).xprivkey):e.version,depth:mr.isNumber(e.depth)?h.Buffer.from([e.depth&255]):e.depth,parentFingerPrint:mr.isNumber(e.parentFingerPrint)?Fo.integerAsBuffer(e.parentFingerPrint):e.parentFingerPrint,childIndex:mr.isNumber(e.childIndex)?Fo.integerAsBuffer(e.childIndex):e.childIndex,chainCode:mr.isString(e.chainCode)?h.Buffer.from(e.chainCode,"hex"):e.chainCode,privateKey:mr.isString(e.privateKey)&&Fo.isHexa(e.privateKey)?h.Buffer.from(e.privateKey,"hex"):e.privateKey,checksum:e.checksum?e.checksum.length?e.checksum:Fo.integerAsBuffer(e.checksum):void 0};return this._buildFromBuffers(t)};J.prototype._buildFromSerialized=function(e){var t=X0.decode(e),r={version:t.slice(J.VersionStart,J.VersionEnd),depth:t.slice(J.DepthStart,J.DepthEnd),parentFingerPrint:t.slice(J.ParentFingerPrintStart,J.ParentFingerPrintEnd),childIndex:t.slice(J.ChildIndexStart,J.ChildIndexEnd),chainCode:t.slice(J.ChainCodeStart,J.ChainCodeEnd),privateKey:t.slice(J.PrivateKeyStart,J.PrivateKeyEnd),checksum:t.slice(J.ChecksumStart,J.ChecksumEnd),xprivkey:e};return this._buildFromBuffers(r)};J.prototype._generateRandomly=function(e){return J.fromSeed(qre.getRandomBuffer(64),e)};J.fromSeed=function(e,t){if(Fo.isHexaString(e)&&(e=h.Buffer.from(e,"hex")),!h.Buffer.isBuffer(e))throw new Ho.InvalidEntropyArgument(e);if(e.length<Ure*kB)throw new Ho.InvalidEntropyArgument.NotEnoughEntropy(e);if(e.length>Fre*kB)throw new Ho.InvalidEntropyArgument.TooMuchEntropy(e);var r=F4.sha512hmac(e,J0.Buffer.from("Bitcoin seed"));return new J({network:bf.get(t)||bf.defaultNetwork,depth:0,parentFingerPrint:0,childIndex:0,privateKey:r.slice(0,32),chainCode:r.slice(32,64)})};J.prototype._calcHDPublicKey=function(){if(!this._hdPublicKey){var e=q4();this._hdPublicKey=new e(this)}};J.prototype._buildFromBuffers=function(e){J._validateBufferArguments(e),Fo.defineImmutable(this,{_buffers:e});var t=[e.version,e.depth,e.parentFingerPrint,e.childIndex,e.chainCode,h.Buffer.alloc(1),e.privateKey],r=J0.Buffer.concat(t);if(!e.checksum||!e.checksum.length)e.checksum=X0.checksum(r);else if(e.checksum.toString()!==X0.checksum(r).toString())throw new hl.InvalidB58Checksum(r);var i=bf.get(e.version.readUInt32BE(0)),n;n=X0.encode(J0.Buffer.concat(t)),e.xprivkey=h.Buffer.from(n);var o=new MB(BB.fromBuffer(e.privateKey),i),a=o.toPublicKey(),s=J.ParentFingerPrintSize,u=F4.sha256ripemd160(a.toBuffer()).slice(0,s);return Fo.defineImmutable(this,{xprivkey:n,network:i,depth:e.depth[0],privateKey:o,publicKey:a,fingerPrint:u}),this._hdPublicKey=null,Object.defineProperty(this,"hdPublicKey",{configurable:!1,enumerable:!0,get:function(){return this._calcHDPublicKey(),this._hdPublicKey}}),Object.defineProperty(this,"xpubkey",{configurable:!1,enumerable:!0,get:function(){return this._calcHDPublicKey(),this._hdPublicKey.xpubkey}}),this};J._validateBufferArguments=function(e){var t=function(r,i){var n=e[r];S6(h.Buffer.isBuffer(n),r+" argument is not a buffer"),S6(n.length===i,r+" has not the expected size: found "+n.length+", expected "+i)};t("version",J.VersionSize),t("depth",J.DepthSize),t("parentFingerPrint",J.ParentFingerPrintSize),t("childIndex",J.ChildIndexSize),t("chainCode",J.ChainCodeSize),t("privateKey",J.PrivateKeySize),e.checksum&&e.checksum.length&&t("checksum",J.CheckSumSize)};J.prototype.toString=function(){return this.xprivkey};J.prototype.inspect=function(){return"<HDPrivateKey: "+this.xprivkey+">"};J.prototype.toObject=J.prototype.toJSON=function(){return{network:bf.get(this._buffers.version.readUInt32BE(0),"xprivkey").name,depth:this._buffers.depth[0],fingerPrint:this.fingerPrint.readUInt32BE(0),parentFingerPrint:this._buffers.parentFingerPrint.readUInt32BE(0),childIndex:this._buffers.childIndex.readUInt32BE(0),chainCode:this._buffers.chainCode.toString("hex"),privateKey:this.privateKey.toBuffer().toString("hex"),checksum:this._buffers.checksum.readUInt32BE(0),xprivkey:this.xprivkey}};J.fromBuffer=function(e){return new J(e.toString())};J.fromHex=function(e){return J.fromBuffer(h.Buffer.from(e,"hex"))};J.prototype.toBuffer=function(){return h.Buffer.from(this.toString())};J.prototype.toHex=function(){return this.toBuffer().toString("hex")};J.DefaultDepth=0;J.DefaultFingerprint=0;J.DefaultChildIndex=0;J.Hardened=2147483648;J.MaxIndex=2*J.Hardened;J.RootElementAlias=["m","M","m'","M'"];J.VersionSize=4;J.DepthSize=1;J.ParentFingerPrintSize=4;J.ChildIndexSize=4;J.ChainCodeSize=32;J.PrivateKeySize=32;J.CheckSumSize=4;J.DataLength=78;J.SerializedByteSize=82;J.VersionStart=0;J.VersionEnd=J.VersionStart+J.VersionSize;J.DepthStart=J.VersionEnd;J.DepthEnd=J.DepthStart+J.DepthSize;J.ParentFingerPrintStart=J.DepthEnd;J.ParentFingerPrintEnd=J.ParentFingerPrintStart+J.ParentFingerPrintSize;J.ChildIndexStart=J.ParentFingerPrintEnd;J.ChildIndexEnd=J.ChildIndexStart+J.ChildIndexSize;J.ChainCodeStart=J.ChildIndexEnd;J.ChainCodeEnd=J.ChainCodeStart+J.ChainCodeSize;J.PrivateKeyStart=J.ChainCodeEnd+1;J.PrivateKeyEnd=J.PrivateKeyStart+J.PrivateKeySize;J.ChecksumStart=J.PrivateKeyEnd;J.ChecksumEnd=J.ChecksumStart+J.CheckSumSize;S6(J.ChecksumEnd===J.SerializedByteSize);CB.exports=J});var UB=k((s5e,qB)=>{"use strict";v();var jo=ke(),x6=jo.deps._,Hre=jo.PrivateKey,jre=jo.PublicKey,NB=jo.Address,DB=jo.encoding.BufferWriter,H4=jo.crypto.ECDSA,LB=jo.crypto.Signature,zre=jo.crypto.Hash.sha256sha256,Kre=jo.util.js,dl=jo.util.preconditions,or=function e(t){return this instanceof e?(dl.checkArgument(x6.isString(t)||h.Buffer.isBuffer(t),"First argument should be a string or Buffer"),x6.isString(t)&&(this.messageBuffer=h.Buffer.from(t)),h.Buffer.isBuffer(t)&&(this.messageBuffer=t),this):new e(t)};or.sign=function(e,t){return new or(e).sign(t)};or.verify=function(e,t,r){return new or(e).verify(t,r)};or.MAGIC_BYTES=h.Buffer.from(`Bitcoin Signed Message:
|
|
75
|
+
`));var s=new Ps({actual:e,expected:t,message:r,operator:n,stackStartFn:i});throw s.generatedMessage=a,s}}Gt.match=function e(t,r,i){mk(t,r,i,e,"match")};Gt.doesNotMatch=function e(t,r,i){mk(t,r,i,e,"doesNotMatch")};function yk(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];ck.apply(void 0,[yk,t.length].concat(t))}Gt.strict=Bee(yk,Gt,{equal:Gt.strictEqual,deepEqual:Gt.deepStrictEqual,notEqual:Gt.notStrictEqual,notDeepEqual:Gt.notDeepStrictEqual});Gt.strict.strict=Gt.strict});var Wn=k((Dpe,wk)=>{"use strict";v();var _k=Is(),vr=function e(t){if(!(this instanceof e))return new e(t);this.bufLen=0,t?this.set(t):this.bufs=[]};vr.prototype.set=function(e){return this.bufs=e.bufs||this.bufs||[],this.bufLen=this.bufs.reduce(function(t,r){return t+r.length},0),this};vr.prototype.toBuffer=function(){return this.concat()};vr.prototype.concat=function(){return h.Buffer.concat(this.bufs,this.bufLen)};vr.prototype.write=function(e){return _k(h.Buffer.isBuffer(e)),this.bufs.push(e),this.bufLen+=e.length,this};vr.prototype.writeReverse=function(e){return _k(h.Buffer.isBuffer(e)),this.bufs.push(h.Buffer.from(e).reverse()),this.bufLen+=e.length,this};vr.prototype.writeUInt8=function(e){var t=h.Buffer.alloc(1);return t.writeUInt8(e,0),this.write(t),this};vr.prototype.writeUInt16BE=function(e){var t=h.Buffer.alloc(2);return t.writeUInt16BE(e,0),this.write(t),this};vr.prototype.writeUInt16LE=function(e){var t=h.Buffer.alloc(2);return t.writeUInt16LE(e,0),this.write(t),this};vr.prototype.writeUInt32BE=function(e){var t=h.Buffer.alloc(4);return t.writeUInt32BE(e,0),this.write(t),this};vr.prototype.writeInt32LE=function(e){var t=h.Buffer.alloc(4);return t.writeInt32LE(e,0),this.write(t),this};vr.prototype.writeUInt32LE=function(e){var t=h.Buffer.alloc(4);return t.writeUInt32LE(e,0),this.write(t),this};vr.prototype.writeUInt64BEBN=function(e){var t=e.toBuffer({size:8});return this.write(t),this};vr.prototype.writeUInt64LEBN=function(e){var t=e.toBuffer({size:8});return this.writeReverse(t),this};vr.prototype.writeVarintNum=function(e){var t=vr.varintBufNum(e);return this.write(t),this};vr.prototype.writeVarintBN=function(e){var t=vr.varintBufBN(e);return this.write(t),this};vr.varintBufNum=function(e){var t;return e<253?(t=h.Buffer.alloc(1),t.writeUInt8(e,0)):e<65536?(t=h.Buffer.alloc(3),t.writeUInt8(253,0),t.writeUInt16LE(e,1)):e<4294967296?(t=h.Buffer.alloc(5),t.writeUInt8(254,0),t.writeUInt32LE(e,1)):(t=h.Buffer.alloc(9),t.writeUInt8(255,0),t.writeInt32LE(e&-1,1),t.writeUInt32LE(Math.floor(e/4294967296),5)),t};vr.varintBufBN=function(e){var t,r=e.toNumber();if(r<253)t=h.Buffer.alloc(1),t.writeUInt8(r,0);else if(r<65536)t=h.Buffer.alloc(3),t.writeUInt8(253,0),t.writeUInt16LE(r,1);else if(r<4294967296)t=h.Buffer.alloc(5),t.writeUInt8(254,0),t.writeUInt32LE(r,1);else{var i=new vr;i.writeUInt8(255),i.writeUInt64LEBN(e),t=i.concat()}return t};wk.exports=vr});var Wp=k((qpe,Sk)=>{"use strict";v();var il=Et(),L0=Bt(),Cee=pi();function It(e){if(!(this instanceof It))return new It(e);var t;if(il.isNumber(e))t=e;else if(il.isString(e))t=It.map[e];else throw new TypeError('Unrecognized num type: "'+typeof e+'" for Opcode');return Cee.defineImmutable(this,{num:t}),this}It.fromBuffer=function(e){return L0.checkArgument(h.Buffer.isBuffer(e)),new It(+("0x"+e.toString("hex")))};It.fromNumber=function(e){return L0.checkArgument(il.isNumber(e)),new It(e)};It.fromString=function(e){L0.checkArgument(il.isString(e));var t=It.map[e];if(typeof t>"u")throw new TypeError("Invalid opcodestr");return new It(t)};It.prototype.toHex=function(){return this.num.toString(16)};It.prototype.toBuffer=function(){return h.Buffer.from(this.toHex(),"hex")};It.prototype.toNumber=function(){return this.num};It.prototype.toString=function(){var e=It.reverseMap[this.num];if(typeof e>"u")throw new Error("Opcode does not have a string representation");return e};It.smallInt=function(e){return L0.checkArgument(il.isNumber(e),"Invalid Argument: n should be number"),L0.checkArgument(e>=0&&e<=16,"Invalid Argument: n must be between 0 and 16"),e===0?It("OP_0"):new It(It.map.OP_1+e-1)};It.map={OP_FALSE:0,OP_0:0,OP_PUSHDATA1:76,OP_PUSHDATA2:77,OP_PUSHDATA4:78,OP_1NEGATE:79,OP_RESERVED:80,OP_TRUE:81,OP_1:81,OP_2:82,OP_3:83,OP_4:84,OP_5:85,OP_6:86,OP_7:87,OP_8:88,OP_9:89,OP_10:90,OP_11:91,OP_12:92,OP_13:93,OP_14:94,OP_15:95,OP_16:96,OP_NOP:97,OP_VER:98,OP_IF:99,OP_NOTIF:100,OP_VERIF:101,OP_VERNOTIF:102,OP_ELSE:103,OP_ENDIF:104,OP_VERIFY:105,OP_RETURN:106,OP_TOALTSTACK:107,OP_FROMALTSTACK:108,OP_2DROP:109,OP_2DUP:110,OP_3DUP:111,OP_2OVER:112,OP_2ROT:113,OP_2SWAP:114,OP_IFDUP:115,OP_DEPTH:116,OP_DROP:117,OP_DUP:118,OP_NIP:119,OP_OVER:120,OP_PICK:121,OP_ROLL:122,OP_ROT:123,OP_SWAP:124,OP_TUCK:125,OP_CAT:126,OP_SPLIT:127,OP_NUM2BIN:128,OP_BIN2NUM:129,OP_SIZE:130,OP_INVERT:131,OP_AND:132,OP_OR:133,OP_XOR:134,OP_EQUAL:135,OP_EQUALVERIFY:136,OP_RESERVED1:137,OP_RESERVED2:138,OP_1ADD:139,OP_1SUB:140,OP_2MUL:141,OP_2DIV:142,OP_NEGATE:143,OP_ABS:144,OP_NOT:145,OP_0NOTEQUAL:146,OP_ADD:147,OP_SUB:148,OP_MUL:149,OP_DIV:150,OP_MOD:151,OP_LSHIFT:152,OP_RSHIFT:153,OP_BOOLAND:154,OP_BOOLOR:155,OP_NUMEQUAL:156,OP_NUMEQUALVERIFY:157,OP_NUMNOTEQUAL:158,OP_LESSTHAN:159,OP_GREATERTHAN:160,OP_LESSTHANOREQUAL:161,OP_GREATERTHANOREQUAL:162,OP_MIN:163,OP_MAX:164,OP_WITHIN:165,OP_RIPEMD160:166,OP_SHA1:167,OP_SHA256:168,OP_HASH160:169,OP_HASH256:170,OP_CODESEPARATOR:171,OP_CHECKSIG:172,OP_CHECKSIGVERIFY:173,OP_CHECKMULTISIG:174,OP_CHECKMULTISIGVERIFY:175,OP_CHECKLOCKTIMEVERIFY:177,OP_CHECKSEQUENCEVERIFY:178,OP_NOP1:176,OP_NOP2:177,OP_NOP3:178,OP_SUBSTR:179,OP_LEFT:180,OP_RIGHT:181,OP_LSHIFTNUM:182,OP_RSHIFTNUM:183,OP_NOP9:184,OP_NOP10:185,OP_PUBKEYHASH:253,OP_PUBKEY:254,OP_INVALIDOPCODE:255};It.reverseMap=[];for(Zy in It.map)It.reverseMap[It.map[Zy]]=Zy;var Zy;il.extend(It,It.map);It.isSmallIntOp=function(e){return e instanceof It&&(e=e.toNumber()),e===It.map.OP_0||e>=It.map.OP_1&&e<=It.map.OP_16};It.prototype.inspect=function(){return"<Opcode: "+this.toString()+", hex: "+this.toHex()+", decimal: "+this.num+">"};Sk.exports=It});var $y=k((Fpe,Ik)=>{"use strict";v();var Yn=hf(),Nee=La(),Dee=Wn(),Wy=cr(),he=Wp(),lf=$n(),cf=Vr(),xk=xs(),er=Bt(),bt=Et(),Yy=hn(),Ek=Kt(),Lee=pi(),Q=function e(t){if(!(this instanceof e))return new e(t);if(this.chunks=[],h.Buffer.isBuffer(t))return e.fromBuffer(t);if(t instanceof Yn)return e.fromAddress(t);if(t instanceof e)return e.fromBuffer(t.toBuffer());if(bt.isString(t))return e.fromString(t);bt.isObject(t)&&bt.isArray(t.chunks)&&this.set(t)};Q.prototype.set=function(e){return er.checkArgument(bt.isObject(e)),er.checkArgument(bt.isArray(e.chunks)),this.chunks=e.chunks,this};Q.fromBuffer=function(e){var t=new Q;t.chunks=[];for(var r=new Nee(e);!r.finished();)try{var i=r.readUInt8(),n,o;i>0&&i<he.OP_PUSHDATA1?(n=i,t.chunks.push({buf:r.read(n),len:n,opcodenum:i})):i===he.OP_PUSHDATA1?(n=r.readUInt8(),o=r.read(n),t.chunks.push({buf:o,len:n,opcodenum:i})):i===he.OP_PUSHDATA2?(n=r.readUInt16LE(),o=r.read(n),t.chunks.push({buf:o,len:n,opcodenum:i})):i===he.OP_PUSHDATA4?(n=r.readUInt32LE(),o=r.read(n),t.chunks.push({buf:o,len:n,opcodenum:i})):t.chunks.push({opcodenum:i})}catch(a){throw a instanceof RangeError?new Yy.Script.InvalidBuffer(e.toString("hex")):a}return t};Q.prototype.toBuffer=function(){for(var e=new Dee,t=0;t<this.chunks.length;t++){var r=this.chunks[t],i=r.opcodenum;e.writeUInt8(r.opcodenum),r.buf&&(i<he.OP_PUSHDATA1?e.write(r.buf):i===he.OP_PUSHDATA1?(e.writeUInt8(r.len),e.write(r.buf)):i===he.OP_PUSHDATA2?(e.writeUInt16LE(r.len),e.write(r.buf)):i===he.OP_PUSHDATA4&&(e.writeUInt32LE(r.len),e.write(r.buf)))}return e.concat()};Q.fromASM=function(e){var t=new Q;t.chunks=[];for(var r=e.split(" "),i=0;i<r.length;){var n=r[i],o=he(n),a=o.toNumber();if(n==="0")a=0,t.chunks.push({opcodenum:a}),i=i+1;else if(n==="-1")a=he.OP_1NEGATE,t.chunks.push({opcodenum:a}),i=i+1;else if(bt.isUndefined(a)){var s=h.Buffer.from(r[i],"hex");if(s.toString("hex")!==r[i])throw new Error("invalid hex string in script");var u=s.length;u>=0&&u<he.OP_PUSHDATA1?a=u:u<Math.pow(2,8)?a=he.OP_PUSHDATA1:u<Math.pow(2,16)?a=he.OP_PUSHDATA2:u<Math.pow(2,32)&&(a=he.OP_PUSHDATA4),t.chunks.push({buf:s,len:s.length,opcodenum:a}),i=i+1}else t.chunks.push({opcodenum:a}),i=i+1}return t};Q.fromHex=function(e){return new Q(Ek.Buffer.from(e,"hex"))};Q.fromString=function(e){if(Lee.isHexa(e)||e.length===0)return new Q(Ek.Buffer.from(e,"hex"));var t=new Q;t.chunks=[];for(var r=e.split(" "),i=0;i<r.length;){var n=r[i],o=he(n),a=o.toNumber();if(bt.isUndefined(a))if(a=parseInt(n),a>0&&a<he.OP_PUSHDATA1)t.chunks.push({buf:h.Buffer.from(r[i+1].slice(2),"hex"),len:a,opcodenum:a}),i=i+2;else throw new Error("Invalid script: "+JSON.stringify(e));else if(a===he.OP_PUSHDATA1||a===he.OP_PUSHDATA2||a===he.OP_PUSHDATA4){if(r[i+2].slice(0,2)!=="0x")throw new Error("Pushdata data must start with 0x");t.chunks.push({buf:h.Buffer.from(r[i+2].slice(2),"hex"),len:parseInt(r[i+1]),opcodenum:a}),i=i+3}else t.chunks.push({opcodenum:a}),i=i+1}return t};Q.prototype._chunkToString=function(e,t){var r=e.opcodenum,i=t==="asm",n="";if(e.buf)!i&&(r===he.OP_PUSHDATA1||r===he.OP_PUSHDATA2||r===he.OP_PUSHDATA4)&&(n=n+" "+he(r).toString()),e.len>0&&(i?n=n+" "+e.buf.toString("hex"):n=n+" "+e.len+" 0x"+e.buf.toString("hex"));else if(typeof he.reverseMap[r]<"u")i?r===0?n=n+" 0":r===79?n=n+" -1":n=n+" "+he(r).toString():n=n+" "+he(r).toString();else{var o=r.toString(16);o.length%2!==0&&(o="0"+o),i?n=n+" "+o:n=n+" 0x"+o}return n};Q.prototype.toASM=function(){for(var e="",t=0;t<this.chunks.length;t++){var r=this.chunks[t];e+=this._chunkToString(r,"asm")}return e.substr(1)};Q.prototype.toString=function(){for(var e="",t=0;t<this.chunks.length;t++){var r=this.chunks[t];e+=this._chunkToString(r)}return e.substr(1)};Q.prototype.toHex=function(){return this.toBuffer().toString("hex")};Q.prototype.inspect=function(){return"<Script: "+this.toString()+">"};Q.prototype.isPublicKeyHashOut=function(){return!!(this.chunks.length===5&&this.chunks[0].opcodenum===he.OP_DUP&&this.chunks[1].opcodenum===he.OP_HASH160&&this.chunks[2].buf&&this.chunks[2].buf.length===20&&this.chunks[3].opcodenum===he.OP_EQUALVERIFY&&this.chunks[4].opcodenum===he.OP_CHECKSIG)};Q.prototype.isPublicKeyHashOutPrefix=function(){return!!(this.chunks.length>=5&&this.chunks[0].opcodenum===he.OP_DUP&&this.chunks[1].opcodenum===he.OP_HASH160&&this.chunks[2].buf&&this.chunks[2].buf.length===20&&this.chunks[3].opcodenum===he.OP_EQUALVERIFY&&this.chunks[4].opcodenum===he.OP_CHECKSIG)};Q.prototype.isPublicKeyHashIn=function(){if(this.chunks.length===2){var e=this.chunks[0].buf,t=this.chunks[1].buf;if(e&&e.length&&e[0]===48&&t&&t.length){var r=t[0];if((r===4||r===6||r===7)&&t.length===65)return!0;if((r===3||r===2)&&t.length===33)return!0}}return!1};Q.prototype.getPublicKey=function(){return er.checkState(this.isPublicKeyOut(),"Can't retrieve PublicKey from a non-PK output"),this.chunks[0].buf};Q.prototype.getPublicKeyHash=function(){return er.checkState(this.isPublicKeyHashOut(),"Can't retrieve PublicKeyHash from a non-PKH output"),this.chunks[2].buf};Q.prototype.isPublicKeyOut=function(){if(this.chunks.length===2&&this.chunks[0].buf&&this.chunks[0].buf.length&&this.chunks[1].opcodenum===he.OP_CHECKSIG){var e=this.chunks[0].buf,t=e[0],r=!1;if(((t===4||t===6||t===7)&&e.length===65||(t===3||t===2)&&e.length===33)&&(r=!0),r)return lf.isValid(e)}return!1};Q.prototype.isPublicKeyIn=function(){if(this.chunks.length===1){var e=this.chunks[0].buf;if(e&&e.length&&e[0]===48)return!0}return!1};Q.prototype.isScriptHashOut=function(){var e=this.toBuffer();return e.length===23&&e[0]===he.OP_HASH160&&e[1]===20&&e[e.length-1]===he.OP_EQUAL};Q.prototype.isScriptHashIn=function(){if(this.chunks.length<=1)return!1;var e=this.chunks[this.chunks.length-1],t=e.buf;if(!t)return!1;var r;try{r=Q.fromBuffer(t)}catch(n){if(n instanceof Yy.Script.InvalidBuffer)return!1;throw n}var i=r.classify();return i!==Q.types.UNKNOWN};Q.prototype.isMultisigOut=function(){return this.chunks.length>3&&he.isSmallIntOp(this.chunks[0].opcodenum)&&this.chunks.slice(1,this.chunks.length-2).every(function(e){return e.buf&&h.Buffer.isBuffer(e.buf)})&&he.isSmallIntOp(this.chunks[this.chunks.length-2].opcodenum)&&this.chunks[this.chunks.length-1].opcodenum===he.OP_CHECKMULTISIG};Q.prototype.isMultisigIn=function(){return this.chunks.length>=2&&this.chunks[0].opcodenum===0&&this.chunks.slice(1,this.chunks.length).every(function(e){return e.buf&&h.Buffer.isBuffer(e.buf)&&cf.isTxDER(e.buf)})};Q.prototype.isDataOut=function(){var e=this.chunks.length>=1&&this.chunks[0].opcodenum===he.OP_RETURN;if(!e)return!1;var t=this.chunks.slice(1),r=new Q({chunks:t});return r.isPushOnly()};Q.prototype.isSafeDataOut=function(){if(this.chunks.length<2||this.chunks[0].opcodenum!==he.OP_FALSE)return!1;var e=this.chunks.slice(1),t=new Q({chunks:e});return t.isDataOut()};Q.prototype.getData=function(){if(this.isSafeDataOut()){var e=this.chunks.slice(2),t=e.map(r=>r.buf);return t}if(this.isDataOut()||this.isScriptHashOut())return bt.isUndefined(this.chunks[1])?h.Buffer.alloc(0):h.Buffer.from(this.chunks[1].buf);if(this.isPublicKeyHashOut())return h.Buffer.from(this.chunks[2].buf);throw new Error("Unrecognized script type to get data from")};Q.prototype.isPushOnly=function(){return bt.every(this.chunks,function(e){return e.opcodenum<=he.OP_16||e.opcodenum===he.OP_PUSHDATA1||e.opcodenum===he.OP_PUSHDATA2||e.opcodenum===he.OP_PUSHDATA4})};Q.types={};Q.types.UNKNOWN="Unknown";Q.types.PUBKEY_OUT="Pay to public key";Q.types.PUBKEY_IN="Spend from public key";Q.types.PUBKEYHASH_OUT="Pay to public key hash";Q.types.PUBKEYHASH_IN="Spend from public key hash";Q.types.SCRIPTHASH_OUT="Pay to script hash";Q.types.SCRIPTHASH_IN="Spend from script hash";Q.types.MULTISIG_OUT="Pay to multisig";Q.types.MULTISIG_IN="Spend from multisig";Q.types.DATA_OUT="Data push";Q.types.SAFE_DATA_OUT="Safe data push";Q.OP_RETURN_STANDARD_SIZE=220;Q.prototype.classify=function(){if(this._isInput)return this.classifyInput();if(this._isOutput)return this.classifyOutput();var e=this.classifyOutput();return e!==Q.types.UNKNOWN?e:this.classifyInput()};Q.outputIdentifiers={};Q.outputIdentifiers.PUBKEY_OUT=Q.prototype.isPublicKeyOut;Q.outputIdentifiers.PUBKEYHASH_OUT=Q.prototype.isPublicKeyHashOut;Q.outputIdentifiers.MULTISIG_OUT=Q.prototype.isMultisigOut;Q.outputIdentifiers.SCRIPTHASH_OUT=Q.prototype.isScriptHashOut;Q.outputIdentifiers.DATA_OUT=Q.prototype.isDataOut;Q.outputIdentifiers.SAFE_DATA_OUT=Q.prototype.isSafeDataOut;Q.prototype.classifyOutput=function(){for(var e in Q.outputIdentifiers)if(Q.outputIdentifiers[e].bind(this)())return Q.types[e];return Q.types.UNKNOWN};Q.inputIdentifiers={};Q.inputIdentifiers.PUBKEY_IN=Q.prototype.isPublicKeyIn;Q.inputIdentifiers.PUBKEYHASH_IN=Q.prototype.isPublicKeyHashIn;Q.inputIdentifiers.MULTISIG_IN=Q.prototype.isMultisigIn;Q.inputIdentifiers.SCRIPTHASH_IN=Q.prototype.isScriptHashIn;Q.prototype.classifyInput=function(){for(var e in Q.inputIdentifiers)if(Q.inputIdentifiers[e].bind(this)())return Q.types[e];return Q.types.UNKNOWN};Q.prototype.isStandard=function(){return this.classify()!==Q.types.UNKNOWN};Q.prototype.prepend=function(e){return this._addByType(e,!0),this};Q.prototype.equals=function(e){if(er.checkState(e instanceof Q,"Must provide another script"),this.chunks.length!==e.chunks.length)return!1;var t;for(t=0;t<this.chunks.length;t++){if(h.Buffer.isBuffer(this.chunks[t].buf)&&!h.Buffer.isBuffer(e.chunks[t].buf)||h.Buffer.isBuffer(this.chunks[t].buf)&&!this.chunks[t].buf.equals(e.chunks[t].buf))return!1;if(this.chunks[t].opcodenum!==e.chunks[t].opcodenum)return!1}return!0};Q.prototype.add=function(e){return this._addByType(e,!1),this};Q.prototype._addByType=function(e,t){if(typeof e=="string")this._addOpcode(e,t);else if(typeof e=="number")this._addOpcode(e,t);else if(e instanceof he)this._addOpcode(e,t);else if(h.Buffer.isBuffer(e))this._addBuffer(e,t);else if(e instanceof Q)this.chunks=this.chunks.concat(e.chunks);else if(typeof e=="object")this._insertAtPosition(e,t);else throw new Error("Invalid script chunk")};Q.prototype._insertAtPosition=function(e,t){t?this.chunks.unshift(e):this.chunks.push(e)};Q.prototype._addOpcode=function(e,t){var r;return typeof e=="number"?r=e:e instanceof he?r=e.toNumber():r=he(e).toNumber(),this._insertAtPosition({opcodenum:r},t),this};Q.prototype._addBuffer=function(e,t){var r,i=e.length;if(i>=0&&i<he.OP_PUSHDATA1)r=i;else if(i<Math.pow(2,8))r=he.OP_PUSHDATA1;else if(i<Math.pow(2,16))r=he.OP_PUSHDATA2;else if(i<Math.pow(2,32))r=he.OP_PUSHDATA4;else throw new Error("You can't push that much data");return this._insertAtPosition({buf:e,len:i,opcodenum:r},t),this};Q.prototype.removeCodeseparators=function(){for(var e=[],t=0;t<this.chunks.length;t++)this.chunks[t].opcodenum!==he.OP_CODESEPARATOR&&e.push(this.chunks[t]);return this.chunks=e,this};Q.buildMultisigOut=function(e,t,r){er.checkArgument(t<=e.length,"Number of required signatures must be less than or equal to the number of public keys"),r=r||{};var i=new Q;i.add(he.smallInt(t)),e=bt.map(e,lf);var n=e;r.noSorting||(n=e.map(s=>s.toString("hex")).sort().map(s=>new lf(s)));for(var o=0;o<n.length;o++){var a=n[o];i.add(a.toBuffer())}return i.add(he.smallInt(e.length)),i.add(he.OP_CHECKMULTISIG),i};Q.buildMultisigIn=function(e,t,r,i){er.checkArgument(bt.isArray(e)),er.checkArgument(bt.isNumber(t)),er.checkArgument(bt.isArray(r)),i=i||{};var n=new Q;return n.add(he.OP_0),bt.each(r,function(o){er.checkArgument(h.Buffer.isBuffer(o),"Signatures must be an array of Buffers"),n.add(o)}),n};Q.buildP2SHMultisigIn=function(e,t,r,i){er.checkArgument(bt.isArray(e)),er.checkArgument(bt.isNumber(t)),er.checkArgument(bt.isArray(r)),i=i||{};var n=new Q;return n.add(he.OP_0),bt.each(r,function(o){er.checkArgument(h.Buffer.isBuffer(o),"Signatures must be an array of Buffers"),n.add(o)}),n.add((i.cachedMultisig||Q.buildMultisigOut(e,t,i)).toBuffer()),n};Q.buildPublicKeyHashOut=function(e){er.checkArgument(!bt.isUndefined(e)),er.checkArgument(e instanceof lf||e instanceof Yn||bt.isString(e)),e instanceof lf?e=e.toAddress():bt.isString(e)&&(e=new Yn(e));var t=new Q;return t.add(he.OP_DUP).add(he.OP_HASH160).add(e.hashBuffer).add(he.OP_EQUALVERIFY).add(he.OP_CHECKSIG),t._network=e.network,t};Q.buildPublicKeyOut=function(e){er.checkArgument(e instanceof lf);var t=new Q;return t.add(e.toBuffer()).add(he.OP_CHECKSIG),t};Q.buildDataOut=function(e,t){er.checkArgument(bt.isUndefined(e)||bt.isString(e)||bt.isArray(e)||h.Buffer.isBuffer(e));var r=e;bt.isArray(r)||(r=[e]);var i=new Q;i.add(he.OP_RETURN);for(let n of r)er.checkArgument(bt.isUndefined(n)||bt.isString(n)||h.Buffer.isBuffer(n)),bt.isString(n)&&(n=h.Buffer.from(n,t)),bt.isUndefined(n)||i.add(n);return i};Q.buildSafeDataOut=function(e,t){var r=Q.buildDataOut(e,t),i=new Q;return i.add(he.OP_FALSE),i.add(r),i};Q.buildScriptHashOut=function(e){er.checkArgument(e instanceof Q||e instanceof Yn&&e.isPayToScriptHash());var t=new Q;return t.add(he.OP_HASH160).add(e instanceof Yn?e.hashBuffer:Wy.sha256ripemd160(e.toBuffer())).add(he.OP_EQUAL),t._network=e._network||e.network,t};Q.buildPublicKeyIn=function(e,t){er.checkArgument(e instanceof cf||h.Buffer.isBuffer(e)),er.checkArgument(bt.isUndefined(t)||bt.isNumber(t)),e instanceof cf&&(e=e.toBuffer());var r=new Q;return r.add(h.Buffer.concat([e,h.Buffer.from([(t||cf.SIGHASH_ALL)&255])])),r};Q.buildPublicKeyHashIn=function(e,t,r){er.checkArgument(t instanceof cf||h.Buffer.isBuffer(t)),er.checkArgument(bt.isUndefined(r)||bt.isNumber(r)),t instanceof cf&&(t=t.toBuffer());var i=new Q().add(h.Buffer.concat([t,h.Buffer.from([(r||cf.SIGHASH_ALL)&255])])).add(new lf(e).toBuffer());return i};Q.empty=function(){return new Q};Q.prototype.toScriptHashOut=function(){return Q.buildScriptHashOut(this)};Q.fromAddress=function(e){if(e=Yn(e),e.isPayToScriptHash())return Q.buildScriptHashOut(e);if(e.isPayToPublicKeyHash())return Q.buildPublicKeyHashOut(e);throw new Yy.Script.UnrecognizedAddress(e)};Q.prototype.getAddressInfo=function(e){if(this._isInput)return this._getInputAddressInfo();if(this._isOutput)return this._getOutputAddressInfo();var t=this._getOutputAddressInfo();return t||this._getInputAddressInfo()};Q.prototype._getOutputAddressInfo=function(){var e={};if(this.isScriptHashOut())e.hashBuffer=this.getData(),e.type=Yn.PayToScriptHash;else if(this.isPublicKeyHashOut())e.hashBuffer=this.getData(),e.type=Yn.PayToPublicKeyHash;else return!1;return e};Q.prototype._getInputAddressInfo=function(){var e={};if(this.isPublicKeyHashIn())e.hashBuffer=Wy.sha256ripemd160(this.chunks[1].buf),e.type=Yn.PayToPublicKeyHash;else if(this.isScriptHashIn())e.hashBuffer=Wy.sha256ripemd160(this.chunks[this.chunks.length-1].buf),e.type=Yn.PayToScriptHash;else return!1;return e};Q.prototype.toAddress=function(e){var t=this.getAddressInfo();return t?(t.network=xk.get(e)||this._network||xk.defaultNetwork,new Yn(t)):!1};Q.prototype.findAndDelete=function(e){for(var t=e.toBuffer(),r=t.toString("hex"),i=0;i<this.chunks.length;i++){var n=Q({chunks:[this.chunks[i]]}),o=n.toBuffer(),a=o.toString("hex");r===a&&this.chunks.splice(i,1)}return this};Q.prototype.checkMinimalPush=function(e){var t=this.chunks[e],r=t.buf,i=t.opcodenum;return r?r.length===0?i===he.OP_0:r.length===1&&r[0]>=1&&r[0]<=16?i===he.OP_1+(r[0]-1):r.length===1&&r[0]===129?i===he.OP_1NEGATE:r.length<=75?i===r.length:r.length<=255?i===he.OP_PUSHDATA1:r.length<=65535?i===he.OP_PUSHDATA2:!0:!0};Q.prototype._decodeOP_N=function(e){if(e===he.OP_0)return 0;if(e>=he.OP_1&&e<=he.OP_16)return e-(he.OP_1-1);throw new Error("Invalid opcode: "+JSON.stringify(e))};Q.prototype.getSignatureOperationsCount=function(e){e=bt.isUndefined(e)?!0:e;var t=this,r=0,i=he.OP_INVALIDOPCODE;return bt.each(t.chunks,function(o){var a=o.opcodenum;a===he.OP_CHECKSIG||a===he.OP_CHECKSIGVERIFY?r++:(a===he.OP_CHECKMULTISIG||a===he.OP_CHECKMULTISIGVERIFY)&&(e&&i>=he.OP_1&&i<=he.OP_16?r+=t._decodeOP_N(i):r+=20),i=a}),r};Ik.exports=Q});var Xy=k((jpe,Ak)=>{v();var qee=Object.prototype.toString;Ak.exports=function(t){if(t===void 0)return"undefined";if(t===null)return"null";var r=typeof t;if(r==="boolean")return"boolean";if(r==="string")return"string";if(r==="number")return"number";if(r==="symbol")return"symbol";if(r==="function")return zee(t)?"generatorfunction":"function";if(Uee(t))return"array";if(Gee(t))return"buffer";if(Vee(t))return"arguments";if(Hee(t))return"date";if(Fee(t))return"error";if(jee(t))return"regexp";switch(Ok(t)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(Kee(t))return"generator";switch(r=qee.call(t),r){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return r.slice(8,-1).toLowerCase().replace(/\s/g,"")};function Ok(e){return typeof e.constructor=="function"?e.constructor.name:null}function Uee(e){return Array.isArray?Array.isArray(e):e instanceof Array}function Fee(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function Hee(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function jee(e){return e instanceof RegExp?!0:typeof e.flags=="string"&&typeof e.ignoreCase=="boolean"&&typeof e.multiline=="boolean"&&typeof e.global=="boolean"}function zee(e,t){return Ok(e)==="GeneratorFunction"}function Kee(e){return typeof e.throw=="function"&&typeof e.return=="function"&&typeof e.next=="function"}function Vee(e){try{if(typeof e.length=="number"&&typeof e.callee=="function")return!0}catch(t){if(t.message.indexOf("callee")!==-1)return!0}return!1}function Gee(e){return e.constructor&&typeof e.constructor.isBuffer=="function"?e.constructor.isBuffer(e):!1}});var kk=k((Kpe,Tk)=>{"use strict";v();var Pk=Symbol.prototype.valueOf,Zee=Xy();function Wee(e,t){switch(Zee(e)){case"array":return e.slice();case"object":return Object.assign({},e);case"date":return new e.constructor(Number(e));case"map":return new Map(e);case"set":return new Set(e);case"buffer":return Jee(e);case"symbol":return Qee(e);case"arraybuffer":return $ee(e);case"float32array":case"float64array":case"int16array":case"int32array":case"int8array":case"uint16array":case"uint32array":case"uint8clampedarray":case"uint8array":return Xee(e);case"regexp":return Yee(e);case"error":return Object.create(e);default:return e}}function Yee(e){let t=e.flags!==void 0?e.flags:/\w+$/.exec(e)||void 0,r=new e.constructor(e.source,t);return r.lastIndex=e.lastIndex,r}function $ee(e){let t=new e.constructor(e.byteLength);return new Uint8Array(t).set(new Uint8Array(e)),t}function Xee(e,t){return new e.constructor(e.buffer,e.byteOffset,e.length)}function Jee(e){let t=e.length,r=h.Buffer.allocUnsafe?h.Buffer.allocUnsafe(t):h.Buffer.from(t);return e.copy(r),r}function Qee(e){return Pk?Object(Pk.call(e)):{}}Tk.exports=Wee});var Bk=k((Gpe,Rk)=>{"use strict";v();Rk.exports=function(t){return t!=null&&typeof t=="object"&&Array.isArray(t)===!1}});var Nk=k((Wpe,Ck)=>{"use strict";v();var ete=Bk();function Mk(e){return ete(e)===!0&&Object.prototype.toString.call(e)==="[object Object]"}Ck.exports=function(t){var r,i;return!(Mk(t)===!1||(r=t.constructor,typeof r!="function")||(i=r.prototype,Mk(i)===!1)||i.hasOwnProperty("isPrototypeOf")===!1)}});var Lk=k(($pe,Dk)=>{"use strict";v();var tte=kk(),rte=Xy(),ite=Nk();function Jy(e,t){switch(rte(e)){case"object":return nte(e,t);case"array":return ote(e,t);default:return tte(e)}}function nte(e,t){if(typeof t=="function")return t(e);if(t||ite(e)){let r=new e.constructor;for(let i in e)r[i]=Jy(e[i],t);return r}return e}function ote(e,t){let r=new e.constructor(e.length);for(let i=0;i<e.length;i++)r[i]=Jy(e[i],t);return r}Dk.exports=Jy});var nl=k((Jpe,Fk)=>{"use strict";v();var qk=Wn(),Uk=La(),ate=fr(),Xn=function e(t){if(!(this instanceof e))return new e(t);if(h.Buffer.isBuffer(t))this.buf=t;else if(typeof t=="number"){var r=t;this.fromNumber(r)}else if(t instanceof ate){var i=t;this.fromBN(i)}else if(t){var n=t;this.set(n)}};Xn.prototype.set=function(e){return this.buf=e.buf||this.buf,this};Xn.prototype.fromString=function(e){return this.set({buf:h.Buffer.from(e,"hex")}),this};Xn.prototype.toString=function(){return this.buf.toString("hex")};Xn.prototype.fromBuffer=function(e){return this.buf=e,this};Xn.prototype.fromBufferReader=function(e){return this.buf=e.readVarintBuf(),this};Xn.prototype.fromBN=function(e){return this.buf=qk().writeVarintBN(e).concat(),this};Xn.prototype.fromNumber=function(e){return this.buf=qk().writeVarintNum(e).concat(),this};Xn.prototype.toBuffer=function(){return this.buf};Xn.prototype.toBN=function(){return Uk(this.buf).readVarintBN()};Xn.prototype.toNumber=function(){return Uk(this.buf).readVarintNum()};Fk.exports=Xn});var qa=k((e6e,jk)=>{"use strict";v();var Yp=Et(),Qy=fr(),Hk=Kt(),$p=pi(),ste=Wn(),ute=nl(),e4=bn(),t4=Bt(),fte=hn(),cte=9007199254740991;function Zr(e){if(!(this instanceof Zr))return new Zr(e);if(Yp.isObject(e))if(this.satoshis=e.satoshis,h.Buffer.isBuffer(e.script))this._scriptBuffer=e.script;else{var t;Yp.isString(e.script)&&$p.isHexa(e.script)?t=Hk.Buffer.from(e.script,"hex"):t=e.script,this.setScript(t)}else throw new TypeError("Unrecognized argument for Output")}Object.defineProperty(Zr.prototype,"script",{configurable:!1,enumerable:!0,get:function(){return this._script?this._script:(this.setScriptFromBuffer(this._scriptBuffer),this._script)}});Object.defineProperty(Zr.prototype,"satoshis",{configurable:!1,enumerable:!0,get:function(){return this._satoshis},set:function(e){e instanceof Qy?(this._satoshisBN=e,this._satoshis=e.toNumber()):Yp.isString(e)?(this._satoshis=parseInt(e),this._satoshisBN=Qy.fromNumber(this._satoshis)):(t4.checkArgument($p.isNaturalNumber(e),"Output satoshis is not a natural number"),this._satoshisBN=Qy.fromNumber(e),this._satoshis=e),t4.checkState($p.isNaturalNumber(this._satoshis),"Output satoshis is not a natural number")}});Zr.prototype.invalidSatoshis=function(){return this._satoshis>cte?"transaction txout satoshis greater than max safe integer":this._satoshis!==this._satoshisBN.toNumber()?"transaction txout satoshis has corrupted value":this._satoshis<0?"transaction txout negative":!1};Object.defineProperty(Zr.prototype,"satoshisBN",{configurable:!1,enumerable:!0,get:function(){return this._satoshisBN},set:function(e){this._satoshisBN=e,this._satoshis=e.toNumber(),t4.checkState($p.isNaturalNumber(this._satoshis),"Output satoshis is not a natural number")}});Zr.prototype.toObject=Zr.prototype.toJSON=function(){var t={satoshis:this.satoshis};return t.script=this._scriptBuffer.toString("hex"),t};Zr.fromObject=function(e){return new Zr(e)};Zr.prototype.setScriptFromBuffer=function(e){this._scriptBuffer=e;try{this._script=e4.fromBuffer(this._scriptBuffer),this._script._isOutput=!0}catch(t){if(t instanceof fte.Script.InvalidBuffer)this._script=null;else throw t}};Zr.prototype.setScript=function(e){if(e instanceof e4)this._scriptBuffer=e.toBuffer(),this._script=e,this._script._isOutput=!0;else if(Yp.isString(e))this._script=e4.fromString(e),this._scriptBuffer=this._script.toBuffer(),this._script._isOutput=!0;else if(h.Buffer.isBuffer(e))this.setScriptFromBuffer(e);else throw new TypeError("Invalid argument type: script");return this};Zr.prototype.inspect=function(){var e;return this.script?e=this.script.inspect():e=this._scriptBuffer.toString("hex"),"<Output ("+this.satoshis+" sats) "+e+">"};Zr.fromBufferReader=function(e){var t={};t.satoshis=e.readUInt64LEBN();var r=e.readVarintNum();return r!==0?t.script=e.read(r):t.script=Hk.Buffer.from([]),new Zr(t)};Zr.prototype.toBufferWriter=function(e){e||(e=new ste),e.writeUInt64LEBN(this._satoshisBN);var t=this._scriptBuffer;return e.writeVarintNum(t.length),e.write(t),e};Zr.prototype.getSize=function(){var e=this.script.toBuffer().length,t=ute(e).toBuffer().length;return 8+t+e};jk.exports=Zr});var ol=k((r6e,Gk)=>{"use strict";v();var Ts=Et(),lte=Bt(),q0=hn(),hte=Wn(),r4=Kt(),Kk=pi(),Xp=bn(),dte=Ua(),zk=qa(),Jp=4294967295,pte=Jp-2,Vk=Jp,gte=Jp-1;function jt(e){if(!(this instanceof jt))return new jt(e);if(e)return this._fromObject(e)}jt.MAXINT=Jp;jt.DEFAULT_SEQNUMBER=Vk;jt.DEFAULT_LOCKTIME_SEQNUMBER=gte;jt.DEFAULT_RBF_SEQNUMBER=pte;jt.BASE_SIZE=40;Object.defineProperty(jt.prototype,"script",{configurable:!1,enumerable:!0,get:function(){return this.isNull()?null:(this._script||(this._script=new Xp(this._scriptBuffer),this._script._isInput=!0),this._script)}});jt.fromObject=function(e){lte.checkArgument(Ts.isObject(e));var t=new jt;return t._fromObject(e)};jt.prototype._fromObject=function(e){var t;if(Ts.isString(e.prevTxId)&&Kk.isHexa(e.prevTxId)?t=r4.Buffer.from(e.prevTxId,"hex"):t=e.prevTxId,this.output=e.output?e.output instanceof zk?e.output:new zk(e.output):void 0,this.prevTxId=t||e.txidbuf,this.outputIndex=Ts.isUndefined(e.outputIndex)?e.txoutnum:e.outputIndex,this.sequenceNumber=Ts.isUndefined(e.sequenceNumber)?Ts.isUndefined(e.seqnum)?Vk:e.seqnum:e.sequenceNumber,Ts.isUndefined(e.script)&&Ts.isUndefined(e.scriptBuffer))throw new q0.Transaction.Input.MissingScript;return this.setScript(e.scriptBuffer||e.script),this};jt.prototype.toObject=jt.prototype.toJSON=function(){var t={prevTxId:this.prevTxId.toString("hex"),outputIndex:this.outputIndex,sequenceNumber:this.sequenceNumber,script:this._scriptBuffer.toString("hex")};return this.script&&(t.scriptString=this.script.toString()),this.output&&(t.output=this.output.toObject()),t};jt.fromBufferReader=function(e){var t=new jt;return t.prevTxId=e.readReverse(32),t.outputIndex=e.readUInt32LE(),t._scriptBuffer=e.readVarLengthBuffer(),t.sequenceNumber=e.readUInt32LE(),t};jt.prototype.toBufferWriter=function(e){e||(e=new hte),e.writeReverse(this.prevTxId),e.writeUInt32LE(this.outputIndex);var t=this._scriptBuffer;return e.writeVarintNum(t.length),e.write(t),e.writeUInt32LE(this.sequenceNumber),e};jt.prototype.setScript=function(e){if(this._script=null,e instanceof Xp)this._script=e,this._script._isInput=!0,this._scriptBuffer=e.toBuffer();else if(e===null)this._script=Xp.empty(),this._script._isInput=!0,this._scriptBuffer=this._script.toBuffer();else if(Kk.isHexa(e))this._scriptBuffer=r4.Buffer.from(e,"hex");else if(Ts.isString(e))this._script=new Xp(e),this._script._isInput=!0,this._scriptBuffer=this._script.toBuffer();else if(h.Buffer.isBuffer(e))this._scriptBuffer=r4.Buffer.from(e);else throw new TypeError("Invalid argument type: script");return this};jt.prototype.getSignatures=function(){throw new q0.AbstractMethodInvoked("Trying to sign unsupported output type (only P2PKH and P2SH multisig inputs are supported) for input: "+JSON.stringify(this))};jt.prototype.isFullySigned=function(){throw new q0.AbstractMethodInvoked("Input#isFullySigned")};jt.prototype.isFinal=function(){return this.sequenceNumber===jt.MAXINT};jt.prototype.addSignature=function(){throw new q0.AbstractMethodInvoked("Input#addSignature")};jt.prototype.clearSignatures=function(){throw new q0.AbstractMethodInvoked("Input#clearSignatures")};jt.prototype.isValidSignature=function(e,t){return t.signature.nhashtype=t.sigtype,dte.verify(e,t.signature,t.publicKey,t.inputIndex,this.output.script,this.output.satoshisBN)};jt.prototype.isNull=function(){return this.prevTxId.toString("hex")==="0000000000000000000000000000000000000000000000000000000000000000"&&this.outputIndex===4294967295};jt.prototype._estimateSize=function(){return this.toBufferWriter().toBuffer().length};Gk.exports=jt});var sl=k((n6e,Yk)=>{"use strict";v();var al=Et(),_n=Bt(),vte=Te(),Zk=pi(),Wk=$n(),mte=hn(),U0=Vr();function Jn(e){if(!(this instanceof Jn))return new Jn(e);if(e instanceof Jn)return e;if(al.isObject(e))return this._fromObject(e);throw new mte.InvalidArgument("TransactionSignatures must be instantiated from an object")}vte(Jn,U0);Jn.prototype._fromObject=function(e){return this._checkObjectArgs(e),this.publicKey=new Wk(e.publicKey),this.prevTxId=h.Buffer.isBuffer(e.prevTxId)?e.prevTxId:h.Buffer.from(e.prevTxId,"hex"),this.outputIndex=e.outputIndex,this.inputIndex=e.inputIndex,this.signature=e.signature instanceof U0?e.signature:h.Buffer.isBuffer(e.signature)?U0.fromBuffer(e.signature):U0.fromString(e.signature),this.sigtype=e.sigtype,this};Jn.prototype._checkObjectArgs=function(e){_n.checkArgument(Wk(e.publicKey),"publicKey"),_n.checkArgument(!al.isUndefined(e.inputIndex),"inputIndex"),_n.checkArgument(!al.isUndefined(e.outputIndex),"outputIndex"),_n.checkState(al.isNumber(e.inputIndex),"inputIndex must be a number"),_n.checkState(al.isNumber(e.outputIndex),"outputIndex must be a number"),_n.checkArgument(e.signature,"signature"),_n.checkArgument(e.prevTxId,"prevTxId"),_n.checkState(e.signature instanceof U0||h.Buffer.isBuffer(e.signature)||Zk.isHexa(e.signature),"signature must be a buffer or hexa value"),_n.checkState(h.Buffer.isBuffer(e.prevTxId)||Zk.isHexa(e.prevTxId),"prevTxId must be a buffer or hexa value"),_n.checkArgument(e.sigtype,"sigtype"),_n.checkState(al.isNumber(e.sigtype),"sigtype must be a number")};Jn.prototype.toObject=Jn.prototype.toJSON=function(){return{publicKey:this.publicKey.toString(),prevTxId:this.prevTxId.toString("hex"),outputIndex:this.outputIndex,inputIndex:this.inputIndex,signature:this.signature.toString(),sigtype:this.sigtype}};Jn.fromObject=function(e){return _n.checkArgument(e),new Jn(e)};Yk.exports=Jn});var eR=k((a6e,Qk)=>{"use strict";v();var yte=Te(),Xk=Bt(),i4=ol(),bte=qa(),_te=Ua(),Jk=bn(),$k=Vr(),wte=sl();function Fa(){i4.apply(this,arguments)}yte(Fa,i4);Fa.prototype.getSignatures=function(e,t,r,i){Xk.checkState(this.output instanceof bte),i=i||$k.SIGHASH_ALL|$k.SIGHASH_FORKID;var n=t.toPublicKey();return n.toString()===this.output.script.getPublicKey().toString("hex")?[new wte({publicKey:n,prevTxId:this.prevTxId,outputIndex:this.outputIndex,inputIndex:r,signature:_te.sign(e,t,i,r,this.output.script,this.output.satoshisBN),sigtype:i})]:[]};Fa.prototype.addSignature=function(e,t){return Xk.checkState(this.isValidSignature(e,t),"Signature is invalid"),this.setScript(Jk.buildPublicKeyIn(t.signature.toDER(),t.sigtype)),this};Fa.prototype.clearSignatures=function(){return this.setScript(Jk.empty()),this};Fa.prototype.isFullySigned=function(){return this.script.isPublicKeyIn()};Fa.SCRIPT_MAX_SIZE=74;Fa.prototype._estimateSize=function(){return i4.BASE_SIZE+Fa.SCRIPT_MAX_SIZE};Qk.exports=Fa});var oR=k((u6e,nR)=>{"use strict";v();var Ste=Te(),rR=Bt(),xte=cr(),n4=ol(),Ete=qa(),Ite=Ua(),iR=bn(),tR=Vr(),Ote=sl();function Ha(){n4.apply(this,arguments)}Ste(Ha,n4);Ha.prototype.getSignatures=function(e,t,r,i,n){rR.checkState(this.output instanceof Ete),n=n||xte.sha256ripemd160(t.publicKey.toBuffer()),i=i||tR.SIGHASH_ALL|tR.SIGHASH_FORKID;var o=this.output.script.chunks[2]&&this.output.script.chunks[2].buf;return o&&n.equals(o)?[new Ote({publicKey:t.publicKey,prevTxId:this.prevTxId,outputIndex:this.outputIndex,inputIndex:r,signature:Ite.sign(e,t,i,r,this.output.script,this.output.satoshisBN),sigtype:i})]:[]};Ha.prototype.addSignature=function(e,t){return rR.checkState(this.isValidSignature(e,t),"Signature is invalid"),this.setScript(iR.buildPublicKeyHashIn(t.publicKey,t.signature.toDER(),t.sigtype)),this};Ha.prototype.clearSignatures=function(){return this.setScript(iR.empty()),this};Ha.prototype.isFullySigned=function(){return this.script.isPublicKeyHashIn()};Ha.SCRIPT_MAX_SIZE=108;Ha.prototype._estimateSize=function(){return n4.BASE_SIZE+Ha.SCRIPT_MAX_SIZE};nR.exports=Ha});var uR=k((c6e,sR)=>{"use strict";v();var Qn=Et(),Ate=Te(),e6=ol(),Pte=qa(),F0=Bt(),aR=bn(),Qp=Vr(),o4=Ua(),a4=sl(),Tte=$n(),kte=nl();function Br(e,t,r,i){e6.apply(this,arguments);var n=this;t=t||e.publicKeys,r=r||e.threshold,i=i||e.signatures,this.publicKeys=t.map(o=>o.toString("hex")).sort().map(o=>new Tte(o)),F0.checkState(aR.buildMultisigOut(this.publicKeys,r).equals(this.output.script),"Provided public keys don't match to the provided output script"),this.publicKeyIndex={},Qn.each(this.publicKeys,function(o,a){n.publicKeyIndex[o.toString()]=a}),this.threshold=r,this.signatures=i?this._deserializeSignatures(i):new Array(this.publicKeys.length)}Ate(Br,e6);Br.prototype.toObject=function(){var e=e6.prototype.toObject.apply(this,arguments);return e.threshold=this.threshold,e.publicKeys=Qn.map(this.publicKeys,function(t){return t.toString()}),e.signatures=this._serializeSignatures(),e};Br.prototype._deserializeSignatures=function(e){return Qn.map(e,function(t){if(t)return new a4(t)})};Br.prototype._serializeSignatures=function(){return Qn.map(this.signatures,function(e){if(e)return e.toObject()})};Br.prototype.getSignatures=function(e,t,r,i){F0.checkState(this.output instanceof Pte),i=i||Qp.SIGHASH_ALL|Qp.SIGHASH_FORKID;var n=this,o=[];return Qn.each(this.publicKeys,function(a){a.toString()===t.publicKey.toString()&&o.push(new a4({publicKey:t.publicKey,prevTxId:n.prevTxId,outputIndex:n.outputIndex,inputIndex:r,signature:o4.sign(e,t,i,r,n.output.script,n.output.satoshisBN),sigtype:i}))}),o};Br.prototype.addSignature=function(e,t){return F0.checkState(!this.isFullySigned(),"All needed signatures have already been added"),F0.checkArgument(!Qn.isUndefined(this.publicKeyIndex[t.publicKey.toString()]),"Signature has no matching public key"),F0.checkState(this.isValidSignature(e,t)),this.signatures[this.publicKeyIndex[t.publicKey.toString()]]=t,this._updateScript(),this};Br.prototype._updateScript=function(){return this.setScript(aR.buildMultisigIn(this.publicKeys,this.threshold,this._createSignatures())),this};Br.prototype._createSignatures=function(){return Qn.map(Qn.filter(this.signatures,function(e){return!Qn.isUndefined(e)}),function(e){return h.Buffer.concat([e.signature.toDER(),h.Buffer.from([e.sigtype&255])])})};Br.prototype.clearSignatures=function(){this.signatures=new Array(this.publicKeys.length),this._updateScript()};Br.prototype.isFullySigned=function(){return this.countSignatures()===this.threshold};Br.prototype.countMissingSignatures=function(){return this.threshold-this.countSignatures()};Br.prototype.countSignatures=function(){return Qn.reduce(this.signatures,function(e,t){return e+!!t},0)};Br.prototype.publicKeysWithoutSignature=function(){var e=this;return Qn.filter(this.publicKeys,function(t){return!e.signatures[e.publicKeyIndex[t.toString()]]})};Br.prototype.isValidSignature=function(e,t){return t.signature.nhashtype=t.sigtype,o4.verify(e,t.signature,t.publicKey,t.inputIndex,this.output.script,this.output.satoshisBN)};Br.normalizeSignatures=function(e,t,r,i,n){return n.map(function(o){var a=null;return i=i.filter(function(s){if(a)return!0;var u=new a4({signature:Qp.fromTxFormat(s),publicKey:o,prevTxId:t.prevTxId,outputIndex:t.outputIndex,inputIndex:r,sigtype:Qp.SIGHASH_ALL});u.signature.nhashtype=u.sigtype;var c=o4.verify(e,u.signature,u.publicKey,u.inputIndex,t.output.script);return c?(a=u,!1):!0}),a||null})};Br.SIGNATURE_SIZE=73;Br.prototype._estimateSize=function(){var e=1+this.threshold*Br.SIGNATURE_SIZE;return e6.BASE_SIZE+kte(e).toBuffer().length+e};sR.exports=Br});var dR=k((h6e,hR)=>{"use strict";v();var eo=Et(),Rte=Te(),t6=ol(),Bte=qa(),H0=Bt(),s4=bn(),fR=Vr(),cR=Ua(),lR=sl(),Mte=$n(),Cte=nl();function Er(e,t,r,i){t6.apply(this,arguments);var n=this;t=t||e.publicKeys,r=r||e.threshold,i=i||e.signatures,this.publicKeys=t.map(o=>o.toString("hex")).sort().map(o=>new Mte(o)),this.redeemScript=s4.buildMultisigOut(this.publicKeys,r),H0.checkState(s4.buildScriptHashOut(this.redeemScript).equals(this.output.script),"Provided public keys don't hash to the provided output"),this.publicKeyIndex={},eo.each(this.publicKeys,function(o,a){n.publicKeyIndex[o.toString()]=a}),this.threshold=r,this.signatures=i?this._deserializeSignatures(i):new Array(this.publicKeys.length)}Rte(Er,t6);Er.prototype.toObject=function(){var e=t6.prototype.toObject.apply(this,arguments);return e.threshold=this.threshold,e.publicKeys=eo.map(this.publicKeys,function(t){return t.toString()}),e.signatures=this._serializeSignatures(),e};Er.prototype._deserializeSignatures=function(e){return eo.map(e,function(t){if(t)return new lR(t)})};Er.prototype._serializeSignatures=function(){return eo.map(this.signatures,function(e){if(e)return e.toObject()})};Er.prototype.getSignatures=function(e,t,r,i){H0.checkState(this.output instanceof Bte),i=i||fR.SIGHASH_ALL|fR.SIGHASH_FORKID;var n=this,o=[];return eo.each(this.publicKeys,function(a){a.toString()===t.publicKey.toString()&&o.push(new lR({publicKey:t.publicKey,prevTxId:n.prevTxId,outputIndex:n.outputIndex,inputIndex:r,signature:cR.sign(e,t,i,r,n.redeemScript,n.output.satoshisBN),sigtype:i}))}),o};Er.prototype.addSignature=function(e,t){return H0.checkState(!this.isFullySigned(),"All needed signatures have already been added"),H0.checkArgument(!eo.isUndefined(this.publicKeyIndex[t.publicKey.toString()]),"Signature has no matching public key"),H0.checkState(this.isValidSignature(e,t)),this.signatures[this.publicKeyIndex[t.publicKey.toString()]]=t,this._updateScript(),this};Er.prototype._updateScript=function(){return this.setScript(s4.buildP2SHMultisigIn(this.publicKeys,this.threshold,this._createSignatures(),{cachedMultisig:this.redeemScript})),this};Er.prototype._createSignatures=function(){return eo.map(eo.filter(this.signatures,function(e){return!eo.isUndefined(e)}),function(e){return h.Buffer.concat([e.signature.toDER(),h.Buffer.from([e.sigtype&255])])})};Er.prototype.clearSignatures=function(){this.signatures=new Array(this.publicKeys.length),this._updateScript()};Er.prototype.isFullySigned=function(){return this.countSignatures()===this.threshold};Er.prototype.countMissingSignatures=function(){return this.threshold-this.countSignatures()};Er.prototype.countSignatures=function(){return eo.reduce(this.signatures,function(e,t){return e+!!t},0)};Er.prototype.publicKeysWithoutSignature=function(){var e=this;return eo.filter(this.publicKeys,function(t){return!e.signatures[e.publicKeyIndex[t.toString()]]})};Er.prototype.isValidSignature=function(e,t){return t.signature.nhashtype=t.sigtype,cR.verify(e,t.signature,t.publicKey,t.inputIndex,this.redeemScript,this.output.satoshisBN)};Er.SIGNATURE_SIZE=73;Er.PUBKEY_SIZE=34;Er.prototype._estimateSize=function(){var e=this.publicKeys.length*Er.PUBKEY_SIZE,t=this.threshold*Er.SIGNATURE_SIZE,r=3+e,i=r<=75?1:r<=255?2:3,n=t+1+i+r;return t6.BASE_SIZE+Cte(n).toBuffer().length+n};hR.exports=Er});var r6=k((p6e,ul)=>{v();ul.exports=ol();ul.exports.PublicKey=eR();ul.exports.PublicKeyHash=oR();ul.exports.MultiSig=uR();ul.exports.MultiSigScriptHash=dR()});var Ua=k((v6e,yR)=>{"use strict";v();var Nte=Kt(),Hi=Vr(),u4=bn(),Dte=qa(),Lte=La(),j0=Wn(),pR=fr(),i6=cr(),gR=o6(),f4=Bt(),c4=n6(),ks=Et(),vR=h.Buffer.from("0000000000000000000000000000000000000000000000000000000000000001","hex"),qte="ffffffffffffffff",Ute=c4.SCRIPT_ENABLE_SIGHASH_FORKID,Fte=function(e,t,r,i,n){var o=e.inputs[r];f4.checkArgument(n instanceof pR,"For ForkId=0 signatures, satoshis or complete input must be provided");function a(M){var D=new j0;ks.each(M.inputs,function(K){D.writeReverse(K.prevTxId),D.writeUInt32LE(K.outputIndex)});var L=D.toBuffer(),U=i6.sha256sha256(L);return U}function s(M){var D=new j0;ks.each(M.inputs,function(K){D.writeUInt32LE(K.sequenceNumber)});var L=D.toBuffer(),U=i6.sha256sha256(L);return U}function u(M,D){var L=new j0;ks.isUndefined(D)?ks.each(M.outputs,function(C){C.toBufferWriter(L)}):M.outputs[D].toBufferWriter(L);var U=L.toBuffer(),K=i6.sha256sha256(U);return K}var c=h.Buffer.alloc(32),l=h.Buffer.alloc(32),m=h.Buffer.alloc(32);t&Hi.SIGHASH_ANYONECANPAY||(c=a(e)),!(t&Hi.SIGHASH_ANYONECANPAY)&&(t&31)!==Hi.SIGHASH_SINGLE&&(t&31)!==Hi.SIGHASH_NONE&&(l=s(e)),(t&31)!==Hi.SIGHASH_SINGLE&&(t&31)!==Hi.SIGHASH_NONE?m=u(e):(t&31)===Hi.SIGHASH_SINGLE&&r<e.outputs.length&&(m=u(e,r));var w=new j0;w.writeInt32LE(e.version),w.write(c),w.write(l),w.writeReverse(o.prevTxId),w.writeUInt32LE(o.outputIndex),w.writeVarintNum(i.toBuffer().length),w.write(i.toBuffer()),w.writeUInt64LEBN(n);var E=o.sequenceNumber;w.writeUInt32LE(E),w.write(m),w.writeUInt32LE(e.nLockTime),w.writeUInt32LE(t>>>0);var P=w.toBuffer();return P},mR=function(t,r,i,n,o,a){var s=h4(),u=r6();ks.isUndefined(a)&&(a=Ute);var c=s.shallowCopy(t);if(n=new u4(n),a&c4.SCRIPT_ENABLE_REPLAY_PROTECTION){var l=r>>8,m=16711680|l^57005;r=m<<8|r&255}if(r&Hi.SIGHASH_FORKID&&a&c4.SCRIPT_ENABLE_SIGHASH_FORKID)return Fte(c,r,i,n,o);n.removeCodeseparators();var w;for(w=0;w<c.inputs.length;w++)c.inputs[w]=new u(c.inputs[w]).setScript(u4.empty());if(c.inputs[i]=new u(c.inputs[i]).setScript(n),(r&31)===Hi.SIGHASH_NONE||(r&31)===Hi.SIGHASH_SINGLE)for(w=0;w<c.inputs.length;w++)w!==i&&(c.inputs[w].sequenceNumber=0);if((r&31)===Hi.SIGHASH_NONE)c.outputs=[];else if((r&31)===Hi.SIGHASH_SINGLE){if(i>=c.outputs.length)return vR;for(c.outputs.length=i+1,w=0;w<i;w++)c.outputs[w]=new Dte({satoshis:pR.fromBuffer(Nte.Buffer.from(qte,"hex")),script:u4.empty()})}r&Hi.SIGHASH_ANYONECANPAY&&(c.inputs=[c.inputs[i]]);var E=new j0().write(c.toBuffer()).writeInt32LE(r).toBuffer();return E},l4=function(t,r,i,n,o,a){var s=mR(t,r,i,n,o,a);if(s.compare(vR)===0)return s;var u=i6.sha256sha256(s);return u=new Lte(u).readReverse(),u};function Hte(e,t,r,i,n,o,a){var s=l4(e,r,i,n,o,a),u=gR.sign(s,t,"little").set({nhashtype:r});return u}function jte(e,t,r,i,n,o,a){f4.checkArgument(!ks.isUndefined(e)),f4.checkArgument(!ks.isUndefined(t)&&!ks.isUndefined(t.nhashtype));var s=l4(e,t.nhashtype,i,n,o,a);return gR.verify(s,t,r,"little")}yR.exports={sighashPreimage:mR,sighash:l4,sign:Hte,verify:jte}});var d4=k((y6e,_R)=>{"use strict";v();var ja=Et(),a6=Bt(),bR=pi(),zte=bn(),Kte=hf();function za(e){if(!(this instanceof za))return new za(e);a6.checkArgument(ja.isObject(e),"Must provide an object from where to extract data");var t=e.address?new Kte(e.address):void 0,r=e.txid?e.txid:e.txId;if(!r||!bR.isHexaString(r)||r.length>64)throw new Error("Invalid TXID in object",e);var i=ja.isUndefined(e.vout)?e.outputIndex:e.vout;if(!ja.isNumber(i))throw new Error("Invalid outputIndex, received "+i);a6.checkArgument(!ja.isUndefined(e.scriptPubKey)||!ja.isUndefined(e.script),"Must provide the scriptPubKey for that output!");var n=new zte(e.scriptPubKey||e.script);a6.checkArgument(!ja.isUndefined(e.amount)||!ja.isUndefined(e.satoshis),"Must provide an amount for the output");var o=ja.isUndefined(e.amount)?e.satoshis:Math.round(e.amount*1e8);a6.checkArgument(ja.isNumber(o),"Amount must be a number"),bR.defineImmutable(this,{address:t,txId:r,outputIndex:i,script:n,satoshis:o})}za.prototype.inspect=function(){return"<UnspentOutput: "+this.txId+":"+this.outputIndex+", satoshis: "+this.satoshis+", address: "+this.address+">"};za.prototype.toString=function(){return this.txId+":"+this.outputIndex};za.fromObject=function(e){return new za(e)};za.prototype.toObject=za.prototype.toJSON=function(){return{address:this.address?this.address.toString():void 0,txid:this.txId,vout:this.outputIndex,scriptPubKey:this.script.toBuffer().toString("hex"),amount:Number.parseFloat((this.satoshis/1e8).toFixed(8))}};_R.exports=za});var h4=k((_6e,PR)=>{"use strict";v();var Ee=Et(),Wr=Bt(),Vte=Kt(),Cr=hn(),SR=pi(),xR=La(),Gte=Wn(),wR=nl(),ER=cr(),u6=Vr(),IR=Ua(),Zte=hf(),OR=d4(),Mr=r6(),Wte=Mr.PublicKeyHash,Yte=Mr.PublicKey,$te=Mr.MultiSigScriptHash,Xte=Mr.MultiSig,to=qa(),Do=bn(),Jte=z0(),s6=fr(),Qte=n6(),ere=Qte.SCRIPT_ENABLE_SIGHASH_FORKID;function fe(e){if(!(this instanceof fe))return new fe(e);if(this.inputs=[],this.outputs=[],this._inputAmount=void 0,this._outputAmount=void 0,e){if(e instanceof fe)return fe.shallowCopy(e);if(SR.isHexa(e))this.fromString(e);else if(h.Buffer.isBuffer(e))this.fromBuffer(e);else if(Ee.isObject(e))this.fromObject(e);else throw new Cr.InvalidArgument("Must provide an object or string to deserialize a transaction")}else this._newTransaction()}var tre=1,rre=0,ire=1e6;fe.DUST_AMOUNT=546;fe.FEE_SECURITY_MARGIN=150;fe.MAX_MONEY=21e6*1e8;fe.NLOCKTIME_BLOCKHEIGHT_LIMIT=5e8;fe.NLOCKTIME_MAX_VALUE=4294967295;fe.FEE_PER_KB=500;fe.CHANGE_OUTPUT_MAX_SIZE=62;fe.shallowCopy=function(e){var t=new fe(e.toBuffer());return t};var AR={configurable:!1,enumerable:!0,get:function(){return this._hash=new xR(this._getHash()).readReverse().toString("hex"),this._hash}};Object.defineProperty(fe.prototype,"hash",AR);Object.defineProperty(fe.prototype,"id",AR);var p4={configurable:!1,enumerable:!0,get:function(){return this._getInputAmount()}};Object.defineProperty(fe.prototype,"inputAmount",p4);p4.get=function(){return this._getOutputAmount()};Object.defineProperty(fe.prototype,"outputAmount",p4);fe.prototype._getHash=function(){return ER.sha256sha256(this.toBuffer())};fe.prototype.serialize=function(e){return e===!0||e&&e.disableAll?this.uncheckedSerialize():this.checkedSerialize(e)};fe.prototype.uncheckedSerialize=fe.prototype.toString=function(){return this.toBuffer().toString("hex")};fe.prototype.checkedSerialize=function(e){var t=this.getSerializationError(e);if(t)throw t.message+=" - For more information please see: https://bsv.io/api/lib/transaction#serialization-checks",t;return this.uncheckedSerialize()};fe.prototype.invalidSatoshis=function(){for(var e=!1,t=0;t<this.outputs.length;t++)this.outputs[t].invalidSatoshis()&&(e=!0);return e};fe.prototype.getSerializationError=function(e){if(e=e||{},this.invalidSatoshis())return new Cr.Transaction.InvalidSatoshis;var t=this._getUnspentValue(),r;return t<0?e.disableMoreOutputThanInput||(r=new Cr.Transaction.InvalidOutputAmountSum):r=this._hasFeeError(e,t),r||this._hasDustOutputs(e)||this._isMissingSignatures(e)};fe.prototype._hasFeeError=function(e,t){if(!Ee.isUndefined(this._fee)&&this._fee!==t)return new Cr.Transaction.FeeError.Different("Unspent value is "+t+" but specified fee is "+this._fee);if(!e.disableLargeFees){var r=Math.floor(fe.FEE_SECURITY_MARGIN*this._estimateFee());if(t>r)return this._missingChange()?new Cr.Transaction.ChangeAddressMissing("Fee is too large and no change address was provided"):new Cr.Transaction.FeeError.TooLarge("expected less than "+r+" but got "+t)}};fe.prototype._missingChange=function(){return!this._changeScript};fe.prototype._hasDustOutputs=function(e){if(!e.disableDustOutputs){var t,r;for(t in this.outputs)if(r=this.outputs[t],r.satoshis<fe.DUST_AMOUNT&&!r.script.isDataOut()&&!r.script.isSafeDataOut())return new Cr.Transaction.DustOutputs}};fe.prototype._isMissingSignatures=function(e){if(!e.disableIsFullySigned&&!this.isFullySigned())return new Cr.Transaction.MissingSignatures};fe.prototype.inspect=function(){return"<Transaction: "+this.uncheckedSerialize()+">"};fe.prototype.toBuffer=function(){var e=new Gte;return this.toBufferWriter(e).toBuffer()};fe.prototype.toBufferWriter=function(e){return e.writeInt32LE(this.version),e.writeVarintNum(this.inputs.length),Ee.each(this.inputs,function(t){t.toBufferWriter(e)}),e.writeVarintNum(this.outputs.length),Ee.each(this.outputs,function(t){t.toBufferWriter(e)}),e.writeUInt32LE(this.nLockTime),e};fe.prototype.fromBuffer=function(e){var t=new xR(e);return this.fromBufferReader(t)};fe.prototype.fromBufferReader=function(e){Wr.checkArgument(!e.finished(),"No transaction data received");var t,r,i;for(this.version=e.readInt32LE(),r=e.readVarintNum(),t=0;t<r;t++){var n=Mr.fromBufferReader(e);this.inputs.push(n)}for(i=e.readVarintNum(),t=0;t<i;t++)this.outputs.push(to.fromBufferReader(e));return this.nLockTime=e.readUInt32LE(),this};fe.prototype.toObject=fe.prototype.toJSON=function(){var t=[];this.inputs.forEach(function(n){t.push(n.toObject())});var r=[];this.outputs.forEach(function(n){r.push(n.toObject())});var i={hash:this.hash,version:this.version,inputs:t,outputs:r,nLockTime:this.nLockTime};return this._changeScript&&(i.changeScript=this._changeScript.toString()),Ee.isUndefined(this._changeIndex)||(i.changeIndex=this._changeIndex),Ee.isUndefined(this._fee)||(i.fee=this._fee),i};fe.prototype.fromObject=function(t){Wr.checkArgument(Ee.isObject(t)||t instanceof fe);var r=this,i;return t instanceof fe?i=t.toObject():i=t,Ee.each(i.inputs,function(n){if(!n.output||!n.output.script){r.uncheckedAddInput(new Mr(n));return}var o=new Do(n.output.script),a;if(o.isPublicKeyHashOut())a=new Mr.PublicKeyHash(n);else if(o.isScriptHashOut()&&n.publicKeys&&n.threshold)a=new Mr.MultiSigScriptHash(n,n.publicKeys,n.threshold,n.signatures);else if(o.isPublicKeyOut())a=new Mr.PublicKey(n);else throw new Cr.Transaction.Input.UnsupportedScript(n.output.script);r.addInput(a)}),Ee.each(i.outputs,function(n){r.addOutput(new to(n))}),i.changeIndex&&(this._changeIndex=i.changeIndex),i.changeScript&&(this._changeScript=new Do(i.changeScript)),i.fee&&(this._fee=i.fee),this.nLockTime=i.nLockTime,this.version=i.version,this._checkConsistency(t),this};fe.prototype._checkConsistency=function(e){Ee.isUndefined(this._changeIndex)||(Wr.checkState(this._changeScript,"Change script is expected."),Wr.checkState(this.outputs[this._changeIndex],"Change index points to undefined output."),Wr.checkState(this.outputs[this._changeIndex].script.toString()===this._changeScript.toString(),"Change output has an unexpected script.")),e&&e.hash&&Wr.checkState(e.hash===this.hash,"Hash in object does not match transaction hash.")};fe.prototype.lockUntilDate=function(e){if(Wr.checkArgument(e),Ee.isNumber(e)&&e<fe.NLOCKTIME_BLOCKHEIGHT_LIMIT)throw new Cr.Transaction.LockTimeTooEarly;Ee.isDate(e)&&(e=e.getTime()/1e3);for(var t=0;t<this.inputs.length;t++)this.inputs[t].sequenceNumber===Mr.DEFAULT_SEQNUMBER&&(this.inputs[t].sequenceNumber=Mr.DEFAULT_LOCKTIME_SEQNUMBER);return this.nLockTime=e,this};fe.prototype.lockUntilBlockHeight=function(e){if(Wr.checkArgument(Ee.isNumber(e)),e>=fe.NLOCKTIME_BLOCKHEIGHT_LIMIT)throw new Cr.Transaction.BlockHeightTooHigh;if(e<0)throw new Cr.Transaction.NLockTimeOutOfRange;for(var t=0;t<this.inputs.length;t++)this.inputs[t].sequenceNumber===Mr.DEFAULT_SEQNUMBER&&(this.inputs[t].sequenceNumber=Mr.DEFAULT_LOCKTIME_SEQNUMBER);return this.nLockTime=e,this};fe.prototype.getLockTime=function(){return this.nLockTime?this.nLockTime<fe.NLOCKTIME_BLOCKHEIGHT_LIMIT?this.nLockTime:new Date(1e3*this.nLockTime):null};fe.prototype.fromString=function(e){this.fromBuffer(Vte.Buffer.from(e,"hex"))};fe.prototype._newTransaction=function(){this.version=tre,this.nLockTime=rre};fe.prototype.from=function(e,t,r){if(Ee.isArray(e)){var i=this;return Ee.each(e,function(o){i.from(o,t,r)}),this}var n=Ee.some(this.inputs,function(o){return o.prevTxId.toString("hex")===e.txId&&o.outputIndex===e.outputIndex});return n?this:(t&&r?this._fromMultisigUtxo(e,t,r):this._fromNonP2SH(e),this)};fe.prototype._fromNonP2SH=function(e){var t;e=new OR(e),e.script.isPublicKeyHashOutPrefix()?t=Wte:e.script.isPublicKeyOut()?t=Yte:t=Mr,this.addInput(new t({output:new to({script:e.script,satoshis:e.satoshis}),prevTxId:e.txId,outputIndex:e.outputIndex,script:Do.empty()}))};fe.prototype._fromMultisigUtxo=function(e,t,r){Wr.checkArgument(r<=t.length,"Number of required signatures must be greater than the number of public keys");var i;if(e=new OR(e),e.script.isMultisigOut())i=Xte;else if(e.script.isScriptHashOut())i=$te;else throw new Cr.Transaction.Input.UnsupportedScript(e.script.toString());this.addInput(new i({output:new to({script:e.script,satoshis:e.satoshis}),prevTxId:e.txId,outputIndex:e.outputIndex,script:Do.empty()},t,r))};fe.prototype.addInput=function(e,t,r){if(Wr.checkArgumentType(e,Mr,"input"),!e.output&&(Ee.isUndefined(t)||Ee.isUndefined(r)))throw new Cr.Transaction.NeedMoreInfo("Need information about the UTXO script and satoshis");return!e.output&&t&&!Ee.isUndefined(r)&&(t=t instanceof Do?t:new Do(t),Wr.checkArgumentType(r,"number","satoshis"),e.output=new to({script:t,satoshis:r})),this.uncheckedAddInput(e)};fe.prototype.uncheckedAddInput=function(e){return Wr.checkArgumentType(e,Mr,"input"),this.inputs.push(e),this._inputAmount=void 0,this._updateChangeOutput(),this};fe.prototype.hasAllUtxoInfo=function(){return Ee.every(this.inputs.map(function(e){return!!e.output}))};fe.prototype.fee=function(e){return Wr.checkArgument(Ee.isNumber(e),"amount must be a number"),this._fee=e,this._updateChangeOutput(),this};fe.prototype.feePerKb=function(e){return Wr.checkArgument(Ee.isNumber(e),"amount must be a number"),this._feePerKb=e,this._updateChangeOutput(),this};fe.prototype.change=function(e){return Wr.checkArgument(e,"address is required"),this._changeScript=Do.fromAddress(e),this._updateChangeOutput(),this};fe.prototype.getChangeOutput=function(){return Ee.isUndefined(this._changeIndex)?null:this.outputs[this._changeIndex]};fe.prototype.to=function(e,t){if(Ee.isArray(e)){var r=this;return Ee.each(e,function(i){r.to(i.address,i.satoshis)}),this}return Wr.checkArgument(SR.isNaturalNumber(t),"Amount is expected to be a positive integer"),this.addOutput(new to({script:Do(new Zte(e)),satoshis:t})),this};fe.prototype.addData=function(e){return this.addOutput(new to({script:Do.buildDataOut(e),satoshis:0})),this};fe.prototype.addSafeData=function(e){return this.addOutput(new to({script:Do.buildSafeDataOut(e),satoshis:0})),this};fe.prototype.addOutput=function(e){return Wr.checkArgumentType(e,to,"output"),this._addOutput(e),this._updateChangeOutput(),this};fe.prototype.clearOutputs=function(){return this.outputs=[],this._clearSignatures(),this._outputAmount=void 0,this._changeIndex=void 0,this._updateChangeOutput(),this};fe.prototype._addOutput=function(e){this.outputs.push(e),this._outputAmount=void 0};fe.prototype._getOutputAmount=function(){if(Ee.isUndefined(this._outputAmount)){var e=this;this._outputAmount=0,Ee.each(this.outputs,function(t){e._outputAmount+=t.satoshis})}return this._outputAmount};fe.prototype._getInputAmount=function(){if(Ee.isUndefined(this._inputAmount)){var e=this;this._inputAmount=0,Ee.each(this.inputs,function(t){if(Ee.isUndefined(t.output))throw new Cr.Transaction.Input.MissingPreviousOutput;e._inputAmount+=t.output.satoshis})}return this._inputAmount};fe.prototype._updateChangeOutput=function(){if(this._changeScript){this._clearSignatures(),Ee.isUndefined(this._changeIndex)||this._removeOutput(this._changeIndex),this._changeIndex=this.outputs.length,this._addOutput(new to({script:this._changeScript,satoshis:0}));var e=this._getUnspentValue(),t=this.getFee(),r=e-t;this._removeOutput(this._changeIndex),this._changeIndex=void 0,r>=fe.DUST_AMOUNT&&(this._changeIndex=this.outputs.length,this._addOutput(new to({script:this._changeScript,satoshis:r})))}};fe.prototype.getFee=function(){return this.isCoinbase()?0:Ee.isUndefined(this._fee)?this._changeScript?this._estimateFee():this._getUnspentValue():this._fee};fe.prototype._estimateFee=function(){var e=this._estimateSize();return Math.ceil(e/1e3*(this._feePerKb||fe.FEE_PER_KB))};fe.prototype._getUnspentValue=function(){return this._getInputAmount()-this._getOutputAmount()};fe.prototype._clearSignatures=function(){Ee.each(this.inputs,function(e){e.clearSignatures!==Mr.prototype.clearSignatures&&e.clearSignatures()})};fe.prototype._estimateSize=function(){var e=8;return e+=wR(this.inputs.length).toBuffer().length,e+=wR(this.outputs.length).toBuffer().length,Ee.each(this.inputs,function(t){e+=t._estimateSize()}),Ee.each(this.outputs,function(t){e+=t.getSize()}),e};fe.prototype._removeOutput=function(e){var t=this.outputs[e];this.outputs=Ee.without(this.outputs,t),this._outputAmount=void 0};fe.prototype.removeOutput=function(e){this._removeOutput(e),this._updateChangeOutput()};fe.prototype.sort=function(){return this.sortInputs(function(e){var t=Array.prototype.concat.apply([],e);return t.sort(function(r,i){return r.prevTxId.compare(i.prevTxId)||r.outputIndex-i.outputIndex}),t}),this.sortOutputs(function(e){var t=Array.prototype.concat.apply([],e);return t.sort(function(r,i){return r.satoshis-i.satoshis||r.script.toBuffer().compare(i.script.toBuffer())}),t}),this};fe.prototype.shuffleOutputs=function(){return this.sortOutputs(Ee.shuffle)};fe.prototype.sortOutputs=function(e){var t=e(this.outputs);return this._newOutputOrder(t)};fe.prototype.sortInputs=function(e){return this.inputs=e(this.inputs),this._clearSignatures(),this};fe.prototype._newOutputOrder=function(e){var t=this.outputs.length!==e.length||Ee.difference(this.outputs,e).length!==0;if(t)throw new Cr.Transaction.InvalidSorting;if(!Ee.isUndefined(this._changeIndex)){var r=this.outputs[this._changeIndex];this._changeIndex=e.indexOf(r)}return this.outputs=e,this};fe.prototype.removeInput=function(e,t){var r;if(!t&&Ee.isNumber(e)?r=e:r=Ee.findIndex(this.inputs,function(n){return n.prevTxId.toString("hex")===e&&n.outputIndex===t}),r<0||r>=this.inputs.length)throw new Cr.Transaction.InvalidIndex(r,this.inputs.length);var i=this.inputs[r];this.inputs=Ee.without(this.inputs,i),this._inputAmount=void 0,this._updateChangeOutput()};fe.prototype.sign=function(e,t){Wr.checkState(this.hasAllUtxoInfo(),"Not all utxo information is available to sign the transaction.");var r=this;return Ee.isArray(e)?(Ee.each(e,function(i){r.sign(i,t)}),this):(Ee.each(this.getSignatures(e,t),function(i){r.applySignature(i)}),this)};fe.prototype.getSignatures=function(e,t){e=new Jte(e),t=t||u6.SIGHASH_ALL|u6.SIGHASH_FORKID;var r=this,i=[],n=ER.sha256ripemd160(e.publicKey.toBuffer());return Ee.each(this.inputs,function(a,s){Ee.each(a.getSignatures(r,e,s,t,n),function(u){i.push(u)})}),i};fe.prototype.applySignature=function(e){return this.inputs[e.inputIndex].addSignature(this,e),this};fe.prototype.isFullySigned=function(){return Ee.each(this.inputs,function(e){if(e.isFullySigned===Mr.prototype.isFullySigned)throw new Cr.Transaction.UnableToVerifySignature("Unrecognized script kind, or not enough information to execute script.This usually happens when creating a transaction from a serialized transaction")}),Ee.every(Ee.map(this.inputs,function(e){return e.isFullySigned()}))};fe.prototype.isValidSignature=function(e){var t=this;if(this.inputs[e.inputIndex].isValidSignature===Mr.prototype.isValidSignature)throw new Cr.Transaction.UnableToVerifySignature("Unrecognized script kind, or not enough information to execute script.This usually happens when creating a transaction from a serialized transaction");return this.inputs[e.inputIndex].isValidSignature(t,e)};fe.prototype.verifySignature=function(e,t,r,i,n,o){return IR.verify(this,e,t,r,i,n,o)};fe.prototype.verify=function(){if(this.inputs.length===0)return"transaction txins empty";if(this.outputs.length===0)return"transaction txouts empty";for(var e=new s6(0),t=0;t<this.outputs.length;t++){var r=this.outputs[t];if(r.invalidSatoshis())return"transaction txout "+t+" satoshis is invalid";if(r._satoshisBN.gt(new s6(fe.MAX_MONEY,10)))return"transaction txout "+t+" greater than MAX_MONEY";if(e=e.add(r._satoshisBN),e.gt(new s6(fe.MAX_MONEY)))return"transaction txout "+t+" total output greater than MAX_MONEY"}if(this.toBuffer().length>ire)return"transaction over the maximum block size";var i={};for(t=0;t<this.inputs.length;t++){var n=this.inputs[t],o=n.prevTxId+":"+n.outputIndex;if(!Ee.isUndefined(i[o]))return"transaction input "+t+" duplicate input";i[o]=!0}var a=this.isCoinbase();if(a){var s=this.inputs[0]._scriptBuffer;if(s.length<2||s.length>100)return"coinbase transaction script size invalid"}else for(t=0;t<this.inputs.length;t++)if(this.inputs[t].isNull())return"transaction input "+t+" has null input";return!0};fe.prototype.isCoinbase=function(){return this.inputs.length===1&&this.inputs[0].isNull()};fe.prototype.sighash=function(e,t,r,i,n){t=t||u6.SIGHASH_ALL|u6.SIGHASH_FORKID;var o=this.inputs[e];if(!o)throw new Error("Input index "+e+" does not exist");return!r&&o.output&&(r=o.output.script),!i&&o.output&&(i=new s6(o.output.satoshis)),n=n||ere,IR.sighash(this,t,e,r,i,n)};PR.exports=fe});var Rs=k((S6e,df)=>{v();df.exports=h4();df.exports.Input=r6();df.exports.Output=qa();df.exports.UnspentOutput=d4();df.exports.Signature=sl();df.exports.Sighash=Ua()});var n6=k((E6e,kR)=>{"use strict";v();var f6=Et(),V0=$y(),G=Wp(),Ae=fr(),K0=cr(),pf=Vr(),g4=$n(),TR=Lk(),re=function e(t){if(!(this instanceof e))return new e(t);t?(this.initialize(),this.set(t)):this.initialize()};re.prototype.verify=function(e,t,r,i,n,o){var a=Rs();if(f6.isUndefined(r)&&(r=new a),f6.isUndefined(i)&&(i=0),f6.isUndefined(n)&&(n=0),n&re.SCRIPT_ENABLE_SIGHASH_FORKID&&(n|=re.SCRIPT_VERIFY_STRICTENC,!o))throw new Error("internal error - need satoshisBN to verify FORKID transactions");this.set({script:e,tx:r,nin:i,flags:n,satoshisBN:o});var s;if((n&re.SCRIPT_VERIFY_SIGPUSHONLY)!==0&&!e.isPushOnly())return this.errstr="SCRIPT_ERR_SIG_PUSHONLY",!1;if(!this.evaluate())return!1;n&re.SCRIPT_VERIFY_P2SH&&(s=this.stack.slice());var u=this.stack;if(this.initialize(),this.set({script:t,stack:u,tx:r,nin:i,flags:n,satoshisBN:o}),!this.evaluate())return!1;if(this.stack.length===0)return this.errstr="SCRIPT_ERR_EVAL_FALSE_NO_RESULT",!1;var c=this.stack[this.stack.length-1];if(!re.castToBool(c))return this.errstr="SCRIPT_ERR_EVAL_FALSE_IN_STACK",!1;if(n&re.SCRIPT_VERIFY_P2SH&&t.isScriptHashOut()){if(!e.isPushOnly())return this.errstr="SCRIPT_ERR_SIG_PUSHONLY",!1;if(s.length===0)throw new Error("internal error - stack copy empty");var l=s[s.length-1],m=V0.fromBuffer(l);if(s.pop(),this.initialize(),this.set({script:m,stack:s,tx:r,nin:i,flags:n,satoshisBN:o}),!this.evaluate())return!1;if(s.length===0)return this.errstr="SCRIPT_ERR_EVAL_FALSE_NO_P2SH_STACK",!1;if(!re.castToBool(s[s.length-1]))return this.errstr="SCRIPT_ERR_EVAL_FALSE_IN_P2SH_STACK",!1}if((n&re.SCRIPT_VERIFY_CLEANSTACK)!==0){if((n&re.SCRIPT_VERIFY_P2SH)===0)throw new Error("internal error - CLEANSTACK without P2SH");if(s.length!==1)return this.errstr="SCRIPT_ERR_CLEANSTACK",!1}return!0};kR.exports=re;re.prototype.initialize=function(e){this.stack=[],this.altstack=[],this.pc=0,this.pbegincodehash=0,this.nOpCount=0,this.vfExec=[],this.errstr="",this.flags=0};re.prototype.set=function(e){this.script=e.script||this.script,this.tx=e.tx||this.tx,this.nin=typeof e.nin<"u"?e.nin:this.nin,this.satoshisBN=e.satoshisBN||this.satoshisBN,this.stack=e.stack||this.stack,this.altstack=e.altstack||this.altstack,this.pc=typeof e.pc<"u"?e.pc:this.pc,this.pbegincodehash=typeof e.pbegincodehash<"u"?e.pbegincodehash:this.pbegincodehash,this.nOpCount=typeof e.nOpCount<"u"?e.nOpCount:this.nOpCount,this.vfExec=e.vfExec||this.vfExec,this.errstr=e.errstr||this.errstr,this.flags=typeof e.flags<"u"?e.flags:this.flags};re.true=h.Buffer.from([1]);re.false=h.Buffer.from([]);re.MAX_SCRIPT_ELEMENT_SIZE=520;re.MAXIMUM_ELEMENT_SIZE=4;re.MAX_OPS_PER_SCRIPT=201;re.MAX_SCRIPT_SIZE=1e4;re.LOCKTIME_THRESHOLD=5e8;re.LOCKTIME_THRESHOLD_BN=new Ae(re.LOCKTIME_THRESHOLD);re.useGenesisLimits=function(e){return e=e||2147483647,re.MAX_SCRIPT_ELEMENT_SIZE=e,re.MAXIMUM_ELEMENT_SIZE=e,re.MAX_OPS_PER_SCRIPT=e,re.MAX_SCRIPT_SIZE=e,re};re.getLimits=function(){return{maxScriptElementSize:re.MAX_SCRIPT_ELEMENT_SIZE,maximumElementSize:re.MAXIMUM_ELEMENT_SIZE,maxOpsPerScript:re.MAX_OPS_PER_SCRIPT,maxScriptSize:re.MAX_SCRIPT_SIZE}};re.setLimits=function(e){return e=e||{},e.maxScriptElementSize!=null&&(re.MAX_SCRIPT_ELEMENT_SIZE=e.maxScriptElementSize),e.maximumElementSize!=null&&(re.MAXIMUM_ELEMENT_SIZE=e.maximumElementSize),e.maxOpsPerScript!=null&&(re.MAX_OPS_PER_SCRIPT=e.maxOpsPerScript),e.maxScriptSize!=null&&(re.MAX_SCRIPT_SIZE=e.maxScriptSize),re};re.SCRIPT_VERIFY_NONE=0;re.SCRIPT_VERIFY_P2SH=1;re.SCRIPT_VERIFY_STRICTENC=2;re.SCRIPT_VERIFY_DERSIG=4;re.SCRIPT_VERIFY_LOW_S=8;re.SCRIPT_VERIFY_NULLDUMMY=16;re.SCRIPT_VERIFY_SIGPUSHONLY=32;re.SCRIPT_VERIFY_MINIMALDATA=64;re.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS=128;re.SCRIPT_VERIFY_CLEANSTACK=256;re.SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY=512;re.SCRIPT_VERIFY_CHECKSEQUENCEVERIFY=1024;re.SCRIPT_VERIFY_MINIMALIF=8192;re.SCRIPT_VERIFY_NULLFAIL=16384;re.SCRIPT_VERIFY_COMPRESSED_PUBKEYTYPE=32768;re.SCRIPT_ENABLE_SIGHASH_FORKID=65536;re.SCRIPT_ENABLE_REPLAY_PROTECTION=1<<17;re.SCRIPT_ENABLE_MONOLITH_OPCODES=1<<18;re.SCRIPT_ENABLE_MAGNETIC_OPCODES=1<<19;re.SEQUENCE_LOCKTIME_DISABLE_FLAG=1<<31;re.SEQUENCE_LOCKTIME_TYPE_FLAG=1<<22;re.SEQUENCE_LOCKTIME_MASK=65535;re.castToBool=function(e){for(var t=0;t<e.length;t++)if(e[t]!==0)return!(t===e.length-1&&e[t]===128);return!1};re.prototype.checkSignatureEncoding=function(e){var t;if(e.length===0)return!0;if((this.flags&(re.SCRIPT_VERIFY_DERSIG|re.SCRIPT_VERIFY_LOW_S|re.SCRIPT_VERIFY_STRICTENC))!==0&&!pf.isTxDER(e))return this.errstr="SCRIPT_ERR_SIG_DER_INVALID_FORMAT",!1;if((this.flags&re.SCRIPT_VERIFY_LOW_S)!==0){if(t=pf.fromTxFormat(e),!t.hasLowS())return this.errstr="SCRIPT_ERR_SIG_DER_HIGH_S",!1}else if((this.flags&re.SCRIPT_VERIFY_STRICTENC)!==0){if(t=pf.fromTxFormat(e),!t.hasDefinedHashtype())return this.errstr="SCRIPT_ERR_SIG_HASHTYPE",!1;if(!(this.flags&re.SCRIPT_ENABLE_SIGHASH_FORKID)&&t.nhashtype&pf.SIGHASH_FORKID)return this.errstr="SCRIPT_ERR_ILLEGAL_FORKID",!1;if(this.flags&re.SCRIPT_ENABLE_SIGHASH_FORKID&&!(t.nhashtype&pf.SIGHASH_FORKID))return this.errstr="SCRIPT_ERR_MUST_USE_FORKID",!1}return!0};re.prototype.checkPubkeyEncoding=function(e){return(this.flags&re.SCRIPT_VERIFY_STRICTENC)!==0&&!g4.isValid(e)?(this.errstr="SCRIPT_ERR_PUBKEYTYPE",!1):!0};re._isMinimallyEncoded=function(e,t){return t=t||re.MAXIMUM_ELEMENT_SIZE,!(e.length>t||e.length>0&&(e[e.length-1]&127)===0&&(e.length<=1||(e[e.length-2]&128)===0))};re._minimallyEncode=function(e){if(e.length===0)return e;var t=e[e.length-1];if(t&127)return e;if(e.length===1)return h.Buffer.from("");if(e[e.length-2]&128)return e;for(var r=e.length-1;r>0;r--)if(e[r-1]!==0)return e[r-1]&128?e[r++]=t:e[r-1]|=t,e.slice(0,r);return h.Buffer.from("")};re.prototype.evaluate=function(){if(this.script.toBuffer().length>re.MAX_SCRIPT_SIZE)return this.errstr="SCRIPT_ERR_SCRIPT_SIZE",!1;try{for(;this.pc<this.script.chunks.length;){let t={pc:this.pc,opcode:G.fromNumber(this.script.chunks[this.pc].opcodenum)};var e=this.step();if(!e)return!1;this._callbackStep(t)}if(this.stack.length+this.altstack.length>1e3)return this.errstr="SCRIPT_ERR_STACK_SIZE",!1}catch(t){return this.errstr="SCRIPT_ERR_UNKNOWN_ERROR: "+t,!1}return this.vfExec.length>0?(this.errstr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1):!0};re.prototype._callbackStep=function(e){if(typeof this.stepListener=="function")try{this.stepListener(e,TR(this.stack,!0),TR(this.altstack,!0))}catch(t){console.log(`Error in Step callback:${t}`)}};re.prototype.checkLockTime=function(e){return!(!(this.tx.nLockTime<re.LOCKTIME_THRESHOLD&&e.lt(re.LOCKTIME_THRESHOLD_BN)||this.tx.nLockTime>=re.LOCKTIME_THRESHOLD&&e.gte(re.LOCKTIME_THRESHOLD_BN))||e.gt(new Ae(this.tx.nLockTime))||this.tx.inputs[this.nin].isFinal())};re.prototype.checkSequence=function(e){var t=this.tx.inputs[this.nin].sequenceNumber;if(this.tx.version<2||t&re.SEQUENCE_LOCKTIME_DISABLE_FLAG)return!1;var r=re.SEQUENCE_LOCKTIME_TYPE_FLAG|re.SEQUENCE_LOCKTIME_MASK,i=new Ae(t&r),n=e.and(new Ae(r)),o=new Ae(re.SEQUENCE_LOCKTIME_TYPE_FLAG);return!(!(i.lt(o)&&n.lt(o)||i.gte(o)&&n.gte(o))||n.gt(i))};function nre(e,t){let r=e;for(;r.length<t;)r=h.Buffer.concat([h.Buffer.from([0]),r]);return r}re.prototype.step=function(){var e=this;function t(se){return e.stack[e.stack.length+se]}function r(se){switch(se){case G.OP_2MUL:case G.OP_2DIV:return!0;case G.OP_INVERT:case G.OP_MUL:case G.OP_LSHIFT:case G.OP_RSHIFT:if((e.flags&re.SCRIPT_ENABLE_MAGNETIC_OPCODES)===0)return!0;break;case G.OP_DIV:case G.OP_MOD:case G.OP_SPLIT:case G.OP_CAT:case G.OP_AND:case G.OP_OR:case G.OP_XOR:case G.OP_BIN2NUM:case G.OP_NUM2BIN:return!1;default:break}return!1}var i=(this.flags&re.SCRIPT_VERIFY_MINIMALDATA)!==0,n=this.vfExec.indexOf(!1)===-1,o,a,s,u,c,l,m,w,E,P,M,D,L,U,K,C,N,F=this.script.chunks[this.pc];this.pc++;var H=F.opcodenum;if(f6.isUndefined(H))return this.errstr="SCRIPT_ERR_UNDEFINED_OPCODE",!1;if(F.buf&&F.buf.length>re.MAX_SCRIPT_ELEMENT_SIZE)return this.errstr="SCRIPT_ERR_PUSH_SIZE",!1;if(H>G.OP_16&&++this.nOpCount>re.MAX_OPS_PER_SCRIPT)return this.errstr="SCRIPT_ERR_OP_COUNT",!1;if(r(H))return this.errstr="SCRIPT_ERR_DISABLED_OPCODE",!1;if(n&&H>=0&&H<=G.OP_PUSHDATA4){if(i&&!this.script.checkMinimalPush(this.pc-1))return this.errstr="SCRIPT_ERR_MINIMALDATA",!1;if(!F.buf)this.stack.push(re.false);else{if(F.len!==F.buf.length)throw new Error(`Length of push value not equal to length of data (${F.len},${F.buf.length})`);this.stack.push(F.buf)}}else if(n||G.OP_IF<=H&&H<=G.OP_ENDIF)switch(H){case G.OP_1NEGATE:case G.OP_1:case G.OP_2:case G.OP_3:case G.OP_4:case G.OP_5:case G.OP_6:case G.OP_7:case G.OP_8:case G.OP_9:case G.OP_10:case G.OP_11:case G.OP_12:case G.OP_13:case G.OP_14:case G.OP_15:case G.OP_16:c=H-(G.OP_1-1),o=new Ae(c).toScriptNumBuffer(),this.stack.push(o);break;case G.OP_NOP:break;case G.OP_NOP2:case G.OP_CHECKLOCKTIMEVERIFY:if(!(this.flags&re.SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY)){if(this.flags&re.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS)return this.errstr="SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS",!1;break}if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;var z=Ae.fromScriptNumBuffer(this.stack[this.stack.length-1],i,5);if(z.lt(new Ae(0)))return this.errstr="SCRIPT_ERR_NEGATIVE_LOCKTIME",!1;if(!this.checkLockTime(z))return this.errstr="SCRIPT_ERR_UNSATISFIED_LOCKTIME",!1;break;case G.OP_NOP3:case G.OP_CHECKSEQUENCEVERIFY:if(!(this.flags&re.SCRIPT_VERIFY_CHECKSEQUENCEVERIFY)){if(this.flags&re.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS)return this.errstr="SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS",!1;break}if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;var V=Ae.fromScriptNumBuffer(t(-1),i,5);if(V.lt(new Ae(0)))return this.errstr="SCRIPT_ERR_NEGATIVE_LOCKTIME",!1;if((V&re.SEQUENCE_LOCKTIME_DISABLE_FLAG)!==0)break;if(!this.checkSequence(V))return this.errstr="SCRIPT_ERR_UNSATISFIED_LOCKTIME",!1;break;case G.OP_NOP1:case G.OP_NOP9:case G.OP_NOP10:if(this.flags&re.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS)return this.errstr="SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS",!1;break;case G.OP_IF:case G.OP_NOTIF:if(C=!1,n){if(this.stack.length<1)return this.errstr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1;if(o=t(-1),this.flags&re.SCRIPT_VERIFY_MINIMALIF){if(o.length>1)return this.errstr="SCRIPT_ERR_MINIMALIF",!1;if(o.length===1&&o[0]!==1)return this.errstr="SCRIPT_ERR_MINIMALIF",!1}C=re.castToBool(o),H===G.OP_NOTIF&&(C=!C),this.stack.pop()}this.vfExec.push(C);break;case G.OP_ELSE:if(this.vfExec.length===0)return this.errstr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1;this.vfExec[this.vfExec.length-1]=!this.vfExec[this.vfExec.length-1];break;case G.OP_ENDIF:if(this.vfExec.length===0)return this.errstr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1;this.vfExec.pop();break;case G.OP_VERIFY:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(o=t(-1),C=re.castToBool(o),C)this.stack.pop();else return this.errstr="SCRIPT_ERR_VERIFY",!1;break;case G.OP_RETURN:return this.errstr="SCRIPT_ERR_OP_RETURN",!1;case G.OP_TOALTSTACK:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.altstack.push(this.stack.pop());break;case G.OP_FROMALTSTACK:if(this.altstack.length<1)return this.errstr="SCRIPT_ERR_INVALID_ALTSTACK_OPERATION",!1;this.stack.push(this.altstack.pop());break;case G.OP_2DROP:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.pop(),this.stack.pop();break;case G.OP_2DUP:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;a=t(-2),s=t(-1),this.stack.push(h.Buffer.from(a)),this.stack.push(h.Buffer.from(s));break;case G.OP_3DUP:if(this.stack.length<3)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;a=t(-3),s=t(-2);var B=t(-1);this.stack.push(h.Buffer.from(a)),this.stack.push(h.Buffer.from(s)),this.stack.push(h.Buffer.from(B));break;case G.OP_2OVER:if(this.stack.length<4)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;a=t(-4),s=t(-3),this.stack.push(h.Buffer.from(a)),this.stack.push(h.Buffer.from(s));break;case G.OP_2ROT:if(this.stack.length<6)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;u=this.stack.splice(this.stack.length-6,2),this.stack.push(u[0]),this.stack.push(u[1]);break;case G.OP_2SWAP:if(this.stack.length<4)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;u=this.stack.splice(this.stack.length-4,2),this.stack.push(u[0]),this.stack.push(u[1]);break;case G.OP_IFDUP:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;o=t(-1),C=re.castToBool(o),C&&this.stack.push(h.Buffer.from(o));break;case G.OP_DEPTH:o=new Ae(this.stack.length).toScriptNumBuffer(),this.stack.push(o);break;case G.OP_DROP:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.pop();break;case G.OP_DUP:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.push(h.Buffer.from(t(-1)));break;case G.OP_NIP:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.splice(this.stack.length-2,1);break;case G.OP_OVER:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.push(h.Buffer.from(t(-2)));break;case G.OP_PICK:case G.OP_ROLL:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(o=t(-1),w=Ae.fromScriptNumBuffer(o,i),c=w.toNumber(),this.stack.pop(),c<0||c>=this.stack.length)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;o=t(-c-1),H===G.OP_ROLL&&this.stack.splice(this.stack.length-c-1,1),this.stack.push(h.Buffer.from(o));break;case G.OP_ROT:if(this.stack.length<3)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;l=t(-3),m=t(-2);var g=t(-1);this.stack[this.stack.length-3]=m,this.stack[this.stack.length-2]=g,this.stack[this.stack.length-1]=l;break;case G.OP_SWAP:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;l=t(-2),m=t(-1),this.stack[this.stack.length-2]=m,this.stack[this.stack.length-1]=l;break;case G.OP_TUCK:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.splice(this.stack.length-2,0,h.Buffer.from(t(-1)));break;case G.OP_SIZE:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;w=new Ae(t(-1).length),this.stack.push(w.toScriptNumBuffer());break;case G.OP_AND:case G.OP_OR:case G.OP_XOR:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(a=t(-2),s=t(-1),a.length!==s.length)return this.errstr="SCRIPT_ERR_INVALID_OPERAND_SIZE",!1;switch(H){case G.OP_AND:for(let se=0;se<a.length;se++)a[se]&=s[se];break;case G.OP_OR:for(let se=0;se<a.length;se++)a[se]|=s[se];break;case G.OP_XOR:for(let se=0;se<a.length;se++)a[se]^=s[se];break;default:break}this.stack.pop();break;case G.OP_INVERT:this.stack.length<1&&(this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION"),o=t(-1);for(let se=0;se<o.length;se++)o[se]=~o[se];break;case G.OP_LSHIFT:case G.OP_RSHIFT:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(a=t(-2),a.length===0)this.stack.pop();else{if(E=new Ae(a),P=Ae.fromScriptNumBuffer(t(-1),i),c=P.toNumber(),c<0)return this.errstr="SCRIPT_ERR_INVALID_NUMBER_RANGE",!1;this.stack.pop(),this.stack.pop();let se;H===G.OP_LSHIFT&&(se=E.ushln(c)),H===G.OP_RSHIFT&&(se=E.ushrn(c));let ue=nre(h.Buffer.from(se.toArray().slice(a.length*-1)),a.length);this.stack.push(ue)}break;case G.OP_EQUAL:case G.OP_EQUALVERIFY:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;a=t(-2),s=t(-1);var I=a.toString("hex")===s.toString("hex");if(this.stack.pop(),this.stack.pop(),this.stack.push(I?re.true:re.false),H===G.OP_EQUALVERIFY)if(I)this.stack.pop();else return this.errstr="SCRIPT_ERR_EQUALVERIFY",!1;break;case G.OP_1ADD:case G.OP_1SUB:case G.OP_NEGATE:case G.OP_ABS:case G.OP_NOT:case G.OP_0NOTEQUAL:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;switch(o=t(-1),w=Ae.fromScriptNumBuffer(o,i),H){case G.OP_1ADD:w=w.add(Ae.One);break;case G.OP_1SUB:w=w.sub(Ae.One);break;case G.OP_NEGATE:w=w.neg();break;case G.OP_ABS:w.cmp(Ae.Zero)<0&&(w=w.neg());break;case G.OP_NOT:w=new Ae((w.cmp(Ae.Zero)===0)+0);break;case G.OP_0NOTEQUAL:w=new Ae((w.cmp(Ae.Zero)!==0)+0);break}this.stack.pop(),this.stack.push(w.toScriptNumBuffer());break;case G.OP_ADD:case G.OP_SUB:case G.OP_MUL:case G.OP_MOD:case G.OP_DIV:case G.OP_BOOLAND:case G.OP_BOOLOR:case G.OP_NUMEQUAL:case G.OP_NUMEQUALVERIFY:case G.OP_NUMNOTEQUAL:case G.OP_LESSTHAN:case G.OP_GREATERTHAN:case G.OP_LESSTHANOREQUAL:case G.OP_GREATERTHANOREQUAL:case G.OP_MIN:case G.OP_MAX:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;switch(E=Ae.fromScriptNumBuffer(t(-2),i,re.MAXIMUM_ELEMENT_SIZE),P=Ae.fromScriptNumBuffer(t(-1),i,re.MAXIMUM_ELEMENT_SIZE),w=new Ae(0),H){case G.OP_ADD:w=E.add(P);break;case G.OP_SUB:w=E.sub(P);break;case G.OP_MUL:w=E.mul(P);break;case G.OP_DIV:if(P===0)return this.errstr="SCRIPT_ERR_DIV_BY_ZERO",!1;w=E.div(P);break;case G.OP_MOD:if(P===0)return this.errstr="SCRIPT_ERR_DIV_BY_ZERO",!1;w=E.mod(P);break;case G.OP_BOOLAND:w=new Ae((E.cmp(Ae.Zero)!==0&&P.cmp(Ae.Zero)!==0)+0);break;case G.OP_BOOLOR:w=new Ae((E.cmp(Ae.Zero)!==0||P.cmp(Ae.Zero)!==0)+0);break;case G.OP_NUMEQUAL:w=new Ae((E.cmp(P)===0)+0);break;case G.OP_NUMEQUALVERIFY:w=new Ae((E.cmp(P)===0)+0);break;case G.OP_NUMNOTEQUAL:w=new Ae((E.cmp(P)!==0)+0);break;case G.OP_LESSTHAN:w=new Ae((E.cmp(P)<0)+0);break;case G.OP_GREATERTHAN:w=new Ae((E.cmp(P)>0)+0);break;case G.OP_LESSTHANOREQUAL:w=new Ae((E.cmp(P)<=0)+0);break;case G.OP_GREATERTHANOREQUAL:w=new Ae((E.cmp(P)>=0)+0);break;case G.OP_MIN:w=E.cmp(P)<0?E:P;break;case G.OP_MAX:w=E.cmp(P)>0?E:P;break}if(this.stack.pop(),this.stack.pop(),this.stack.push(w.toScriptNumBuffer()),H===G.OP_NUMEQUALVERIFY)if(re.castToBool(t(-1)))this.stack.pop();else return this.errstr="SCRIPT_ERR_NUMEQUALVERIFY",!1;break;case G.OP_WITHIN:if(this.stack.length<3)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;E=Ae.fromScriptNumBuffer(t(-3),i,re.MAXIMUM_ELEMENT_SIZE),P=Ae.fromScriptNumBuffer(t(-2),i,re.MAXIMUM_ELEMENT_SIZE);var y=Ae.fromScriptNumBuffer(t(-1),i,re.MAXIMUM_ELEMENT_SIZE);C=P.cmp(E)<=0&&E.cmp(y)<0,this.stack.pop(),this.stack.pop(),this.stack.pop(),this.stack.push(C?re.true:re.false);break;case G.OP_RIPEMD160:case G.OP_SHA1:case G.OP_SHA256:case G.OP_HASH160:case G.OP_HASH256:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;o=t(-1);var f;H===G.OP_RIPEMD160?f=K0.ripemd160(o):H===G.OP_SHA1?f=K0.sha1(o):H===G.OP_SHA256?f=K0.sha256(o):H===G.OP_HASH160?f=K0.sha256ripemd160(o):H===G.OP_HASH256&&(f=K0.sha256sha256(o)),this.stack.pop(),this.stack.push(f);break;case G.OP_CODESEPARATOR:this.pbegincodehash=this.pc;break;case G.OP_CHECKSIG:case G.OP_CHECKSIGVERIFY:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(M=t(-2),D=t(-1),!this.checkSignatureEncoding(M)||!this.checkPubkeyEncoding(D))return!1;L=new V0().set({chunks:this.script.chunks.slice(this.pbegincodehash)});var p=new V0().add(M);L.findAndDelete(p);try{U=pf.fromTxFormat(M),K=g4.fromBuffer(D,!1),N=this.tx.verifySignature(U,K,this.nin,L,this.satoshisBN,this.flags)}catch{N=!1}if(!N&&this.flags&re.SCRIPT_VERIFY_NULLFAIL&&M.length)return this.errstr="SCRIPT_ERR_NULLFAIL",!1;if(this.stack.pop(),this.stack.pop(),this.stack.push(N?re.true:re.false),H===G.OP_CHECKSIGVERIFY)if(N)this.stack.pop();else return this.errstr="SCRIPT_ERR_CHECKSIGVERIFY",!1;break;case G.OP_CHECKMULTISIG:case G.OP_CHECKMULTISIGVERIFY:var _=1;if(this.stack.length<_)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;var x=Ae.fromScriptNumBuffer(t(-_),i).toNumber();if(x<0||x>20)return this.errstr="SCRIPT_ERR_PUBKEY_COUNT",!1;if(this.nOpCount+=x,this.nOpCount>re.MAX_OPS_PER_SCRIPT)return this.errstr="SCRIPT_ERR_OP_COUNT",!1;var b=++_;_+=x;var d=x+2;if(this.stack.length<_)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;var O=Ae.fromScriptNumBuffer(t(-_),i).toNumber();if(O<0||O>x)return this.errstr="SCRIPT_ERR_SIG_COUNT",!1;var T=++_;if(_+=O,this.stack.length<_)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;L=new V0().set({chunks:this.script.chunks.slice(this.pbegincodehash)});for(var S=0;S<O;S++)M=t(-T-S),L.findAndDelete(new V0().add(M));for(N=!0;N&&O>0;){if(M=t(-T),D=t(-b),!this.checkSignatureEncoding(M)||!this.checkPubkeyEncoding(D))return!1;var R;try{U=pf.fromTxFormat(M),K=g4.fromBuffer(D,!1),R=this.tx.verifySignature(U,K,this.nin,L,this.satoshisBN,this.flags)}catch{R=!1}R&&(T++,O--),b++,x--,O>x&&(N=!1)}for(;_-- >1;){if(!N&&this.flags&re.SCRIPT_VERIFY_NULLFAIL&&!d&&t(-1).length)return this.errstr="SCRIPT_ERR_NULLFAIL",!1;d>0&&d--,this.stack.pop()}if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(this.flags&re.SCRIPT_VERIFY_NULLDUMMY&&t(-1).length)return this.errstr="SCRIPT_ERR_SIG_NULLDUMMY",!1;if(this.stack.pop(),this.stack.push(N?re.true:re.false),H===G.OP_CHECKMULTISIGVERIFY)if(N)this.stack.pop();else return this.errstr="SCRIPT_ERR_CHECKMULTISIGVERIFY",!1;break;case G.OP_CAT:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(a=t(-2),s=t(-1),a.length+s.length>re.MAX_SCRIPT_ELEMENT_SIZE)return this.errstr="SCRIPT_ERR_PUSH_SIZE",!1;this.stack[this.stack.length-2]=h.Buffer.concat([a,s]),this.stack.pop();break;case G.OP_SPLIT:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;a=t(-2);var Y=Ae.fromScriptNumBuffer(t(-1),i).toNumber();if(Y<0||Y>a.length)return this.errstr="SCRIPT_ERR_INVALID_SPLIT_RANGE",!1;var X=h.Buffer.from(a);this.stack[this.stack.length-2]=X.slice(0,Y),this.stack[this.stack.length-1]=X.slice(Y);break;case G.OP_LEFT:case G.OP_RIGHT:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(a=t(-2),c=Ae.fromScriptNumBuffer(t(-1),i).toNumber(),c<0)return this.errstr="SCRIPT_ERR_INVALID_NUMBER_RANGE",!1;c>a.length&&(c=a.length),this.stack.pop(),H===G.OP_LEFT?this.stack[this.stack.length-1]=h.Buffer.from(a).slice(0,c):this.stack[this.stack.length-1]=h.Buffer.from(a).slice(a.length-c);break;case G.OP_SUBSTR:if(this.stack.length<3)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;a=t(-3);var ne=Ae.fromScriptNumBuffer(t(-1),i).toNumber(),ce=Ae.fromScriptNumBuffer(t(-2),i).toNumber();if(ce<0||ne<0)return this.errstr="SCRIPT_ERR_INVALID_NUMBER_RANGE",!1;ce>a.length&&(ce=a.length),ce+ne>a.length&&(ne=a.length-ce),this.stack.pop(),this.stack.pop(),this.stack[this.stack.length-1]=h.Buffer.from(a).slice(ce,ce+ne);break;case G.OP_NUM2BIN:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;var pe=Ae.fromScriptNumBuffer(t(-1),i).toNumber();if(pe>re.MAX_SCRIPT_ELEMENT_SIZE)return this.errstr="SCRIPT_ERR_PUSH_SIZE",!1;this.stack.pop();var q=t(-1);if(q=re._minimallyEncode(q),q.length>pe)return this.errstr="SCRIPT_ERR_IMPOSSIBLE_ENCODING",!1;if(q.length===pe){this.stack[this.stack.length-1]=q;break}var W=0;q.length>0&&(W=q[q.length-1]&128,q[q.length-1]&=127);var $=h.Buffer.alloc(pe);q.copy($,0);for(var ee=q.length-1;ee++<pe-2;)$[ee]=0;$[ee]=W,this.stack[this.stack.length-1]=$;break;case G.OP_BIN2NUM:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(a=t(-1),s=re._minimallyEncode(a),this.stack[this.stack.length-1]=s,!re._isMinimallyEncoded(s))return this.errstr="SCRIPT_ERR_INVALID_NUMBER_RANGE",!1;break;default:return this.errstr="SCRIPT_ERR_BAD_OPCODE",!1}return!0}});var bn=k((O6e,v4)=>{v();v4.exports=$y();v4.exports.Interpreter=n6()});var hf=k((P6e,CR)=>{"use strict";v();var m4=Et(),Ka=Bt(),ore=hn(),RR=Qc(),wn=xs(),BR=cr(),MR=pi(),y4=$n();function me(e,t,r){if(!(this instanceof me))return new me(e,t,r);if(m4.isArray(e)&&m4.isNumber(t))return me.createMultisig(e,t,r);if(e instanceof me)return e;if(Ka.checkArgument(e,"First argument is required, please include address data.","guide/address.html"),t&&!wn.get(t))throw new TypeError('Second argument must be "livenet", "testnet", or "regtest".');if(r&&r!==me.PayToPublicKeyHash&&r!==me.PayToScriptHash)throw new TypeError('Third argument must be "pubkeyhash" or "scripthash".');var i=this._classifyArguments(e,t,r);return i.network=i.network||wn.get(t)||wn.defaultNetwork,i.type=i.type||r||me.PayToPublicKeyHash,MR.defineImmutable(this,{hashBuffer:i.hashBuffer,network:i.network,type:i.type}),this}me.prototype._classifyArguments=function(e,t,r){if((e instanceof h.Buffer||e instanceof Uint8Array)&&e.length===20)return me._transformHash(e);if((e instanceof h.Buffer||e instanceof Uint8Array)&&e.length===21)return me._transformBuffer(e,t,r);if(e instanceof y4)return me._transformPublicKey(e);if(e instanceof G0())return me._transformScript(e,t);if(typeof e=="string")return me._transformString(e,t,r);if(m4.isObject(e))return me._transformObject(e);throw new TypeError("First argument is an unrecognized data format.")};me.PayToPublicKeyHash="pubkeyhash";me.PayToScriptHash="scripthash";me._transformHash=function(e){var t={};if(!(e instanceof h.Buffer)&&!(e instanceof Uint8Array))throw new TypeError("Address supplied is not a buffer.");if(e.length!==20)throw new TypeError("Address hashbuffers must be exactly 20 bytes.");return t.hashBuffer=e,t};me._transformObject=function(e){return Ka.checkArgument(e.hash||e.hashBuffer,"Must provide a `hash` or `hashBuffer` property"),Ka.checkArgument(e.type,"Must provide a `type` property"),{hashBuffer:e.hash?h.Buffer.from(e.hash,"hex"):e.hashBuffer,network:wn.get(e.network)||wn.defaultNetwork,type:e.type}};me._classifyFromVersion=function(e){var t={},r=wn.get(e[0],"pubkeyhash"),i=wn.get(e[0],"scripthash");return r?(t.network=r,t.type=me.PayToPublicKeyHash):i&&(t.network=i,t.type=me.PayToScriptHash),t};me._transformBuffer=function(e,t,r){var i={};if(!(e instanceof h.Buffer)&&!(e instanceof Uint8Array))throw new TypeError("Address supplied is not a buffer.");if(e.length!==21)throw new TypeError("Address buffers must be exactly 21 bytes.");var n=wn.get(t),o=me._classifyFromVersion(e);if(t&&!n)throw new TypeError("Unknown network");if(!o.network||n&&n!==o.network)throw new TypeError("Address has mismatched network type.");if(!o.type||r&&r!==o.type)throw new TypeError("Address has mismatched type.");return i.hashBuffer=e.slice(1),i.network=o.network,i.type=o.type,i};me._transformPublicKey=function(e){var t={};if(!(e instanceof y4))throw new TypeError("Address must be an instance of PublicKey.");return t.hashBuffer=BR.sha256ripemd160(e.toBuffer()),t.type=me.PayToPublicKeyHash,t};me._transformScript=function(e,t){Ka.checkArgument(e instanceof G0(),"script must be a Script instance");var r=e.getAddressInfo(t);if(!r)throw new ore.Script.CantDeriveAddress(e);return r};me.createMultisig=function(e,t,r){return r=r||e[0].network||wn.defaultNetwork,me.payingTo(G0().buildMultisigOut(e,t),r)};me._transformString=function(e,t,r){if(typeof e!="string")throw new TypeError("data parameter supplied is not a string.");if(e.length<27)throw new Error("Invalid Address string provided");e=e.trim();var i=wn.get(t);if(t&&!i)throw new TypeError("Unknown network");var n=RR.decode(e);return me._transformBuffer(n,t,r)};me.fromPublicKey=function(e,t){var r=me._transformPublicKey(e);return t=t||wn.defaultNetwork,new me(r.hashBuffer,t,r.type)};me.fromPrivateKey=function(e,t){let r=y4.fromPrivateKey(e);return t=t||e.network||wn.defaultNetwork,me.fromPublicKey(r,t)};me.fromPublicKeyHash=function(e,t){var r=me._transformHash(e);return new me(r.hashBuffer,t,me.PayToPublicKeyHash)};me.fromScriptHash=function(e,t){Ka.checkArgument(e,"hash parameter is required");var r=me._transformHash(e);return new me(r.hashBuffer,t,me.PayToScriptHash)};me.payingTo=function(e,t){return Ka.checkArgument(e,"script is required"),Ka.checkArgument(e instanceof G0(),"script must be instance of Script"),me.fromScriptHash(BR.sha256ripemd160(e.toBuffer()),t)};me.fromScript=function(e,t){Ka.checkArgument(e instanceof G0(),"script must be a Script instance");var r=me._transformScript(e,t);return new me(r.hashBuffer,t,r.type)};me.fromBuffer=function(e,t,r){var i=me._transformBuffer(e,t,r);return new me(i.hashBuffer,i.network,i.type)};me.fromHex=function(e,t,r){return me.fromBuffer(h.Buffer.from(e,"hex"),t,r)};me.fromString=function(e,t,r){var i=me._transformString(e,t,r);return new me(i.hashBuffer,i.network,i.type)};me.fromObject=function(t){Ka.checkState(MR.isHexa(t.hash),'Unexpected hash property, "'+t.hash+'", expected to be hex.');var r=h.Buffer.from(t.hash,"hex");return new me(r,t.network,t.type)};me.getValidationError=function(e,t,r){var i;try{new me(e,t,r)}catch(n){i=n}return i};me.isValid=function(e,t,r){return!me.getValidationError(e,t,r)};me.prototype.isPayToPublicKeyHash=function(){return this.type===me.PayToPublicKeyHash};me.prototype.isPayToScriptHash=function(){return this.type===me.PayToScriptHash};me.prototype.toBuffer=function(){var e=h.Buffer.from([this.network[this.type]]),t=h.Buffer.concat([e,this.hashBuffer]);return t};me.prototype.toHex=function(){return this.toBuffer().toString("hex")};me.prototype.toObject=me.prototype.toJSON=function(){return{hash:this.hashBuffer.toString("hex"),type:this.type,network:this.network.toString()}};me.prototype.inspect=function(){return"<Address: "+this.toString()+", type: "+this.type+", network: "+this.network+">"};me.prototype.toString=function(){return RR.encode(this.toBuffer())};CR.exports=me;function G0(){return bn()}});var z0=k((k6e,qR)=>{"use strict";v();var c6=Et(),are=hf(),NR=Qc(),Bs=fr(),DR=pi(),Lo=xs(),_4=vn(),sre=$n(),ure=ds(),LR=Bt(),b4="[REDACTED]";function Me(e,t){if(!(this instanceof Me))return new Me(e,t);if(e instanceof Me)return e;var r=this._classifyArguments(e,t);if(!r.bn||r.bn.cmp(new Bs(0))===0)throw new TypeError("Number can not be equal to zero, undefined, null or false");if(!r.bn.lt(_4.getN()))throw new TypeError("Number must be less than N");if(typeof r.network>"u")throw new TypeError('Must specify the network ("livenet" or "testnet")');return DR.defineImmutable(this,{bn:r.bn,compressed:r.compressed,network:r.network}),Object.defineProperty(this,"publicKey",{configurable:!1,enumerable:!0,get:this.toPublicKey.bind(this)}),this}Me.prototype._classifyArguments=function(e,t){var r={compressed:!0,network:t?Lo.get(t):Lo.defaultNetwork};if(c6.isUndefined(e)||c6.isNull(e))r.bn=Me._getRandomBN();else if(e instanceof Bs)r.bn=e;else if(e instanceof h.Buffer||e instanceof Uint8Array)r=Me._transformBuffer(e,t);else if(e.bn&&e.network)r=Me._transformObject(e);else if(!t&&Lo.get(e))r.bn=Me._getRandomBN(),r.network=Lo.get(e);else if(typeof e=="string")DR.isHexa(e)?r.bn=new Bs(h.Buffer.from(e,"hex")):r=Me._transformWIF(e,t);else throw new TypeError("First argument is an unrecognized data type.");return r};Me._getRandomBN=function(){var e,t;do{var r=ure.getRandomBuffer(32);t=Bs.fromBuffer(r),e=t.lt(_4.getN())}while(!e);return t};Me._transformBuffer=function(e,t){var r={};if(e.length===32)return Me._transformBNBuffer(e,t);if(r.network=Lo.get(e[0],"privatekey"),!r.network)throw new Error("Invalid network");if(t&&r.network!==Lo.get(t))throw new TypeError("Private key network mismatch");if(e.length===34&&e[33]===1)r.compressed=!0;else if(e.length===33)r.compressed=!1;else throw new Error("Length of buffer must be 33 (uncompressed) or 34 (compressed)");return r.bn=Bs.fromBuffer(e.slice(1,33)),r};Me._transformBNBuffer=function(e,t,r){var i={};return i.network=Lo.get(t)||Lo.defaultNetwork,i.bn=Bs.fromBuffer(e),i.compressed=r===void 0?!0:!!r,i};Me._transformWIF=function(e,t){return Me._transformBuffer(NR.decode(e),t)};Me.fromBuffer=function(e,t,r){return r!==void 0&&e&&e.length===32?new Me(Me._transformBNBuffer(e,t,r)):new Me(e,t)};Me.fromHex=function(e,t,r){return Me.fromBuffer(h.Buffer.from(e,"hex"),t,r)};Me._transformObject=function(e){if(e.bn instanceof Bs)return{bn:e.bn,network:Lo.get(e.network),compressed:e.compressed};if(typeof e.bn!="string"||!e.bn.length)throw new TypeError("Invalid private key: `bn` must be a hex string");if(e.bn===b4)throw new TypeError('Invalid private key: `bn` is "'+b4+'". JSON.stringify() redacts the secret on purpose \u2014 use toObject() for a round-trippable export, or toWIF().');if(!/^[0-9a-fA-F]+$/.test(e.bn))throw new TypeError("Invalid private key: `bn` is not hexadecimal");var t=new Bs(e.bn,"hex");if(t.isZero()||t.gte(_4.getN()))throw new TypeError("Invalid private key: outside the range of valid keys");var r=Lo.get(e.network);return{bn:t,network:r,compressed:e.compressed}};Me.fromString=Me.fromWIF=function(e,t){return LR.checkArgument(c6.isString(e),"First argument is expected to be a string."),new Me(e,t)};Me.fromObject=Me.fromJSON=function(e){return LR.checkArgument(c6.isObject(e),"First argument is expected to be an object."),new Me(e)};Me.fromRandom=function(e){var t=Me._getRandomBN();return new Me(t,e)};Me.getValidationError=function(e,t){var r;try{new Me(e,t)}catch(i){r=i}return r};Me.isValid=function(e,t){return e?!Me.getValidationError(e,t):!1};Me.prototype.toString=function(){return this.toWIF()};Me.prototype.toWIF=function(){var e=this.network,t=this.compressed,r;return t?r=h.Buffer.concat([h.Buffer.from([e.privatekey]),this.bn.toBuffer({size:32}),h.Buffer.from([1])]):r=h.Buffer.concat([h.Buffer.from([e.privatekey]),this.bn.toBuffer({size:32})]),NR.encode(r)};Me.prototype.toBigNumber=function(){return this.bn};Me.prototype.toBuffer=function(){return this.bn.toBuffer({size:32})};Me.prototype.toHex=function(){return this.toBuffer().toString("hex")};Me.prototype.toPublicKey=function(){return this._pubkey||(this._pubkey=sre.fromPrivateKey(this)),this._pubkey};Me.prototype.toAddress=function(e){var t=this.toPublicKey();return are.fromPublicKey(t,e||this.network)};Me.prototype.toObject=function(){return{bn:this.bn.toString("hex"),compressed:this.compressed,network:this.network.toString()}};Me.prototype.toJSON=function(){return{bn:b4,compressed:this.compressed,network:this.network.toString()}};Me.prototype.inspect=function(){var e=this.compressed?"":", uncompressed";return"<PrivateKey: "+this.toHex()+", network: "+this.network+e+">"};qR.exports=Me});var $n=k((B6e,FR)=>{"use strict";v();var fl=fr(),cl=vn(),fre=cr(),cre=pi(),UR=xs(),w4=Et(),gf=Bt();function Se(e,t){if(!(this instanceof Se))return new Se(e,t);if(gf.checkArgument(e,"First argument is required, please include public key data."),e instanceof Se)return e;t=t||{};var r=this._classifyArgs(e,t);return r.point.validate(),cre.defineImmutable(this,{point:r.point,compressed:r.compressed,network:r.network||UR.defaultNetwork}),this}Se.prototype._classifyArgs=function(e,t){var r={compressed:w4.isUndefined(t.compressed)||t.compressed};if(e instanceof cl)r.point=e;else if(e.x&&e.y)r=Se._transformObject(e);else if(typeof e=="string")r=Se._transformDER(h.Buffer.from(e,"hex"));else if(Se._isBuffer(e))r=Se._transformDER(e);else if(Se._isPrivateKey(e))r=Se._transformPrivateKey(e);else throw new TypeError("First argument is an unrecognized data format.");return r.network||(r.network=w4.isUndefined(t.network)?void 0:UR.get(t.network)),r};Se._isPrivateKey=function(e){var t=z0();return e instanceof t};Se._isBuffer=function(e){return e instanceof h.Buffer||e instanceof Uint8Array};Se._transformPrivateKey=function(e){gf.checkArgument(Se._isPrivateKey(e),"Must be an instance of PrivateKey");var t={};return t.point=cl.getG().mul(e.bn),t.compressed=e.compressed,t.network=e.network,t};Se._transformDER=function(e,t){gf.checkArgument(Se._isBuffer(e),"Must be a buffer of DER encoded public key");var r={};t=w4.isUndefined(t)?!0:t;var i,n,o,a;if(e[0]===4||!t&&(e[0]===6||e[0]===7)){if(o=e.slice(1,33),a=e.slice(33,65),o.length!==32||a.length!==32||e.length!==65)throw new TypeError("Length of x and y must be 32 bytes");i=new fl(o),n=new fl(a),r.point=new cl(i,n),r.compressed=!1}else if(e[0]===3)o=e.slice(1),i=new fl(o),r=Se._transformX(!0,i),r.compressed=!0;else if(e[0]===2)o=e.slice(1),i=new fl(o),r=Se._transformX(!1,i),r.compressed=!0;else throw new TypeError("Invalid DER format public key");return r};Se._transformX=function(e,t){gf.checkArgument(typeof e=="boolean","Must specify whether y is odd or not (true or false)");var r={};return r.point=cl.fromX(e,t),r};Se._transformObject=function(e){var t=new fl(e.x,"hex"),r=new fl(e.y,"hex"),i=new cl(t,r);return new Se(i,{compressed:e.compressed})};Se.fromPrivateKey=function(e){gf.checkArgument(Se._isPrivateKey(e),"Must be an instance of PrivateKey");var t=Se._transformPrivateKey(e);return new Se(t.point,{compressed:t.compressed,network:t.network})};Se.fromDER=Se.fromBuffer=function(e,t){gf.checkArgument(Se._isBuffer(e),"Must be a buffer of DER encoded public key");var r=Se._transformDER(e,t);return new Se(r.point,{compressed:r.compressed})};Se.fromPoint=function(e,t){return gf.checkArgument(e instanceof cl,"First argument must be an instance of Point."),new Se(e,{compressed:t})};Se.fromHex=Se.fromString=function(e,t){var r=h.Buffer.from(e,t||"hex"),i=Se._transformDER(r);return new Se(i.point,{compressed:i.compressed})};Se.fromX=function(e,t){var r=Se._transformX(e,t);return new Se(r.point,{compressed:r.compressed})};Se.getValidationError=function(e){var t;try{new Se(e)}catch(r){t=r}return t};Se.isValid=function(e){return!Se.getValidationError(e)};Se.prototype.toObject=Se.prototype.toJSON=function(){return{x:this.point.getX().toString("hex",2),y:this.point.getY().toString("hex",2),compressed:this.compressed}};Se.prototype.toBuffer=Se.prototype.toDER=function(){var e=this.point.getX(),t=this.point.getY(),r=e.toBuffer({size:32}),i=t.toBuffer({size:32}),n;if(this.compressed){var o=i[i.length-1]%2;return o?n=h.Buffer.from([3]):n=h.Buffer.from([2]),h.Buffer.concat([n,r])}else return n=h.Buffer.from([4]),h.Buffer.concat([n,r,i])};Se.prototype._getID=function(){return fre.sha256ripemd160(this.toBuffer())};Se.prototype.toAddress=function(e){var t=hf();return t.fromPublicKey(this,e||this.network)};Se.prototype.toString=Se.prototype.toHex=function(){return this.toDER().toString("hex")};Se.prototype.inspect=function(){return"<PublicKey: "+this.toHex()+(this.compressed?"":", uncompressed")+">"};FR.exports=Se});var o6=k((C6e,HR)=>{"use strict";v();var ji=fr(),qo=vn(),lre=Vr(),hre=$n(),dre=ds(),Ms=cr(),pre=Et(),S4=Bt(),zt=function e(t){if(!(this instanceof e))return new e(t);t&&this.set(t)};Object.defineProperty(zt.prototype,"k",{get:function(){return this._k},set:function(e){this._k=e,this._kFresh=!0},enumerable:!0,configurable:!0});zt.prototype.set=function(e){if(this.hashbuf=e.hashbuf||this.hashbuf,this.endian=e.endian||this.endian,this.privkey=e.privkey||this.privkey,this.pubkey=e.pubkey||(this.privkey?this.privkey.publicKey:this.pubkey),e.sig)if(h.Buffer.isBuffer(e.sig)){var t=Vr();this.sig=t.fromDER(e.sig)}else this.sig=e.sig;else this.sig=this.sig;return e.k&&(this.k=e.k),this.verified=e.verified||this.verified,this};zt.prototype.privkey2pubkey=function(){this.pubkey=this.privkey.toPublicKey()};zt.prototype.calci=function(){for(var e=0;e<4;e++){this.sig.i=e;var t;try{t=this.toPublicKey()}catch(r){console.error(r);continue}if(t.point.eq(this.pubkey.point))return this.sig.compressed=this.pubkey.compressed,this}throw this.sig.i=void 0,new Error("Unable to find valid recovery factor")};zt.fromString=function(e){var t=JSON.parse(e);return new zt(t)};zt.prototype.randomK=function(){var e=qo.getN(),t;do t=ji.fromBuffer(dre.getRandomBuffer(32));while(!(t.lt(e)&&t.gt(ji.Zero)));return this.k=t,this};zt.prototype.deterministicK=function(e){pre.isUndefined(e)&&(e=0);var t=h.Buffer.alloc(32);t.fill(1);var r=h.Buffer.alloc(32);r.fill(0);var i=this.privkey.bn.toBuffer({size:32}),n=this.endian==="little"?h.Buffer.from(this.hashbuf).reverse():this.hashbuf;r=Ms.sha256hmac(h.Buffer.concat([t,h.Buffer.from([0]),i,n]),r),t=Ms.sha256hmac(t,r),r=Ms.sha256hmac(h.Buffer.concat([t,h.Buffer.from([1]),i,n]),r),t=Ms.sha256hmac(t,r),t=Ms.sha256hmac(t,r);for(var o=ji.fromBuffer(t),a=qo.getN(),s=0;s<e||!(o.lt(a)&&o.gt(ji.Zero));s++)r=Ms.sha256hmac(h.Buffer.concat([t,h.Buffer.from([0])]),r),t=Ms.sha256hmac(t,r),t=Ms.sha256hmac(t,r),o=ji.fromBuffer(t);return this.k=o,this};zt.prototype.toPublicKey=function(){var e=this.sig.i;S4.checkArgument(e===0||e===1||e===2||e===3,new Error("i must be equal to 0, 1, 2, or 3"));var t=ji.fromBuffer(this.hashbuf),r=this.sig.r,i=this.sig.s,n=e&1,o=e>>1,a=qo.getN(),s=qo.getG(),u=o?r.add(a):r,c=qo.fromX(n,u),l=c.mul(a);if(!l.isInfinity())throw new Error("nR is not a valid curve point");var m=t.neg().umod(a),w=r.invm(a),E=c.mul(i).add(s.mul(m)).mul(w),P=hre.fromPoint(E,this.sig.compressed);return P};zt.prototype.sigError=function(){if(!h.Buffer.isBuffer(this.hashbuf)||this.hashbuf.length!==32)return"hashbuf must be a 32 byte buffer";var e=this.sig.r,t=this.sig.s,r=qo.getN();try{if(e.lte(ji.Zero)||t.lte(ji.Zero)||e.gte(r)||t.gte(r))return"r and s not in range";var i=ji.fromBuffer(this.hashbuf,this.endian?{endian:this.endian}:void 0),n=t.invm(r),o=n.mul(i).umod(r),a=n.mul(e).umod(r),s=qo.getG().mulAdd(o,this.pubkey.point,a);return s.isInfinity()?"p is infinity":s.getX().umod(r).cmp(e)!==0?"Invalid signature":!1}catch(u){return"Signature security validation failed: "+u.message}};zt.toLowS=function(e){return e.gt(ji.fromBuffer(h.Buffer.from("7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0","hex")))&&(e=qo.getN().sub(e)),e};zt.prototype._findSignature=function(e,t){var r=qo.getN(),i=qo.getG(),n=0,o,a,s,u;do(!this.k||!this._kFresh||n>0)&&this.deterministicK(n),n++,o=this.k,a=i.mul(o),s=a.x.umod(r),u=o.invm(r).mul(t.add(e.mul(s))).umod(r);while(s.cmp(ji.Zero)<=0||u.cmp(ji.Zero)<=0);return this._kFresh=!1,u=zt.toLowS(u),{s:u,r:s}};zt.prototype.sign=function(){var e=this.hashbuf,t=this.privkey,r=t.bn;S4.checkState(e&&t&&r,new Error("invalid parameters")),S4.checkState(h.Buffer.isBuffer(e)&&e.length===32,new Error("hashbuf must be a 32 byte buffer"));var i=ji.fromBuffer(e,this.endian?{endian:this.endian}:void 0),n=this._findSignature(r,i);return n.compressed=this.pubkey.compressed,this.sig=new lre(n),this};zt.prototype.signRandomK=function(){return this.randomK(),this.sign()};zt.prototype.toString=function(){var e={};return this.hashbuf&&(e.hashbuf=this.hashbuf.toString("hex")),this.privkey&&(e.privkey=this.privkey.toString()),this.pubkey&&(e.pubkey=this.pubkey.toString()),this.sig&&(e.sig=this.sig.toString()),this.k&&(e.k=this.k.toString()),JSON.stringify(e)};zt.prototype.verify=function(){return this.verified=!this.sigError(),this.verified};zt.prototype.verifyBool=function(){return this.verify()===!0};zt.sign=function(e,t,r){return zt().set({hashbuf:e,endian:r,privkey:t}).sign().sig};zt.signWithCalcI=function(e,t,r){return zt().set({hashbuf:e,endian:r,privkey:t}).sign().calci().sig};zt.signRandomK=function(e,t,r){return zt().set({hashbuf:e,endian:r,privkey:t}).signRandomK().sig};zt.verify=function(e,t,r,i){return zt().set({hashbuf:e,endian:i,sig:t,pubkey:r}).verify()};HR.exports=zt});var zR=k((x4,jR)=>{v();(function(e,t){"use strict";typeof define=="function"&&define.amd?define([],function(){return e.secrets=t()}):typeof x4=="object"?jR.exports=t(_r()):e.secrets=t(e.crypto)})(x4,function(e){"use strict";var t,r,i,n,o;function a(){t={bits:8,radix:16,minBits:3,maxBits:20,bytesPerChar:2,maxBytesPerChar:6,primitivePolynomials:[null,null,1,3,3,5,3,3,29,17,9,5,83,27,43,3,45,9,39,39,9,5,3,33,27,9,71,39,9,5,83]},r={},i=new Array(1024).join("0"),n=!0,o=["nodeCryptoRandomBytes","browserCryptoGetRandomValues","testRandom"]}function s(){return!!(r&&r.rng&&typeof r.rng=="function")}function u(C,N){var F;if(N===0||N===1)return C;if(N&&N>1024)throw new Error("Padding must be multiples of no larger than 1024 bits.");return N=N||r.bits,C&&(F=C.length%N),F?(i+C).slice(-(N-F+C.length)):C}function c(C){var N="",F,H;for(H=C.length-1;H>=0;H--){if(F=parseInt(C[H],16),isNaN(F))throw new Error("Invalid hex character.");N=u(F.toString(2),4)+N}return N}function l(C){var N="",F,H;for(C=u(C,4),H=C.length;H>=4;H-=4){if(F=parseInt(C.slice(H-4,H),2),isNaN(F))throw new Error("Invalid binary character.");N=F.toString(16)+N}return N}function m(){return!!(e&&typeof e=="object"&&(typeof e.getRandomValues=="function"||typeof e.getRandomValues=="object")&&(typeof Uint32Array=="function"||typeof Uint32Array=="object"))}function w(){return typeof e=="object"&&typeof e.randomBytes=="function"}function E(C){function N(V,B,g,I){var y=0,f,p="",_;for(B&&(f=B.length-1);y<f||p.length<V;)_=Math.abs(parseInt(B[y],g)),p=p+u(_.toString(2),I),y++;return p=p.substr(-V),(p.match(/0/g)||[]).length===p.length?null:p}function F(V){var B,g,I,y,f=null;for(I=16,y=4,g=Math.ceil(V/8);f===null;)B=e.randomBytes(g),f=N(V,B.toString("hex"),I,y);return f}function H(V){var B,g,I,y=null;for(g=10,I=32,B=Math.ceil(V/32);y===null;)y=N(V,e.getRandomValues(new Uint32Array(B)),g,I);return y}function z(V){var B,g,I,y,f,p=null;y=10,f=32,g=Math.ceil(V/32),I=123456789,B=new Uint32Array(g);for(var _=0;_<B.length;_++)B[_]=I;for(;p===null;)p=N(V,B,y,f);return p}if(C&&C==="testRandom")return r.typeCSPRNG=C,z;if(C&&C==="nodeCryptoRandomBytes")return r.typeCSPRNG=C,F;if(C&&C==="browserCryptoGetRandomValues")return r.typeCSPRNG=C,H;if(w())return r.typeCSPRNG="nodeCryptoRandomBytes",F;if(m())return r.typeCSPRNG="browserCryptoGetRandomValues",H}function P(C,N){var F=[],H;for(N&&(C=u(C,N)),H=C.length;H>r.bits;H-=r.bits)F.push(parseInt(C.slice(H-r.bits,H),2));return F.push(parseInt(C.slice(0,H),2)),F}function M(C,N){var F=r.logs[C],H=0,z;for(z=N.length-1;z>=0;z--)H!==0?H=r.exps[(F+r.logs[H])%r.maxShares]^N[z]:H=N[z];return H}function D(C,N,F){var H=0,z,V,B,g;for(B=0,z=N.length;B<z;B++)if(F[B]){for(V=r.logs[F[B]],g=0;g<z;g++)if(B!==g){if(C===N[g]){V=-1;break}V=(V+r.logs[C^N[g]]-r.logs[N[B]^N[g]]+r.maxShares)%r.maxShares}H=V===-1?H:H^r.exps[V]}return H}function L(C,N,F){var H=[],z=[C],V,B;for(V=1;V<F;V++)z[V]=parseInt(r.rng(r.bits),2);for(V=1,B=N+1;V<B;V++)H[V-1]={x:V,y:M(V,z)};return H}function U(C,N,F){var H,z,V,B,g;if(N=parseInt(N,r.radix),C=parseInt(C,10)||r.bits,H=C.toString(36).toUpperCase(),V=Math.pow(2,C)-1,B=V.toString(r.radix).length,z=u(N.toString(r.radix),B),typeof N!="number"||N%1!==0||N<1||N>V)throw new Error("Share id must be an integer between 1 and "+V+", inclusive.");return g=H+z+F,g}var K={init:function(C,N){var F=[],H=[],z=1,V,B;if(a(),C&&(typeof C!="number"||C%1!==0||C<t.minBits||C>t.maxBits))throw new Error("Number of bits must be an integer between "+t.minBits+" and "+t.maxBits+", inclusive.");if(N&&o.indexOf(N)===-1)throw new Error("Invalid RNG type argument : '"+N+"'");for(r.radix=t.radix,r.bits=C||t.bits,r.size=Math.pow(2,r.bits),r.maxShares=r.size-1,V=t.primitivePolynomials[r.bits],B=0;B<r.size;B++)H[B]=z,F[z]=B,z=z<<1,z>=r.size&&(z=z^V,z=z&r.maxShares);if(r.logs=F,r.exps=H,N&&this.setRNG(N),s()||this.setRNG(),!s()||!r.bits||!r.size||!r.maxShares||!r.logs||!r.exps||r.logs.length!==r.size||r.exps.length!==r.size)throw new Error("Initialization failed.")},combine:function(C,N){var F,H,z,V,B="",g,I,y,f=[],p=[];for(N=N||0,F=0,z=C.length;F<z;F++){if(I=this.extractShareComponents(C[F]),g===void 0)g=I.bits;else if(I.bits!==g)throw new Error("Mismatched shares: Different bit settings.");if(r.bits!==g&&this.init(g),f.indexOf(I.id)===-1)for(f.push(I.id),y=P(c(I.data)),H=0,V=y.length;H<V;H++)p[H]=p[H]||[],p[H][f.length-1]=y[H]}for(F=0,z=p.length;F<z;F++)B=u(D(N,f,p[F]).toString(2))+B;return l(N>=1?B:B.slice(B.indexOf("1")+1))},getConfig:function(){var C={};return C.radix=r.radix,C.bits=r.bits,C.maxShares=r.maxShares,C.hasCSPRNG=s(),C.typeCSPRNG=r.typeCSPRNG,C},extractShareComponents:function(C){var N,F,H,z,V={},B,g;if(N=parseInt(C.substr(0,1),36),N&&(typeof N!="number"||N%1!==0||N<t.minBits||N>t.maxBits))throw new Error("Invalid share : Number of bits must be an integer between "+t.minBits+" and "+t.maxBits+", inclusive.");if(z=Math.pow(2,N)-1,H=(Math.pow(2,N)-1).toString(r.radix).length,B="^([a-kA-K3-9]{1})([a-fA-F0-9]{"+H+"})([a-fA-F0-9]+)$",g=new RegExp(B).exec(C),g&&(F=parseInt(g[2],r.radix)),typeof F!="number"||F%1!==0||F<1||F>z)throw new Error("Invalid share : Share id must be an integer between 1 and "+r.maxShares+", inclusive.");if(g&&g[3])return V.bits=N,V.id=F,V.data=g[3],V;throw new Error("The share data provided is invalid : "+C)},setRNG:function(C){var N="Random number generator is invalid ",F=" Supply an CSPRNG of the form function(bits){} that returns a string containing 'bits' number of random 1's and 0's.";if(C&&typeof C=="string"&&o.indexOf(C)===-1)throw new Error("Invalid RNG type argument : '"+C+"'");if(C||(C=E()),C&&typeof C=="string"&&(C=E(C)),n){if(C&&typeof C!="function")throw new Error(N+"(Not a function)."+F);if(C&&typeof C(r.bits)!="string")throw new Error(N+"(Output is not a string)."+F);if(C&&!parseInt(C(r.bits),2))throw new Error(N+"(Binary string output not parseable to an Integer)."+F);if(C&&C(r.bits).length>r.bits)throw new Error(N+"(Output length is greater than config.bits)."+F);if(C&&C(r.bits).length<r.bits)throw new Error(N+"(Output length is less than config.bits)."+F)}return r.rng=C,!0},str2hex:function(C,N){var F,H,z="",V,B,g,I;if(typeof C!="string")throw new Error("Input must be a character string.");if(N||(N=t.bytesPerChar),typeof N!="number"||N<1||N>t.maxBytesPerChar||N%1!==0)throw new Error("Bytes per character must be an integer between 1 and "+t.maxBytesPerChar+", inclusive.");for(F=2*N,H=Math.pow(16,F)-1,g=0,I=C.length;g<I;g++){if(B=C[g].charCodeAt(),isNaN(B))throw new Error("Invalid character: "+C[g]);if(B>H)throw V=Math.ceil(Math.log(B+1)/Math.log(256)),new Error("Invalid character code ("+B+"). Maximum allowable is 256^bytes-1 ("+H+"). To convert this character, use at least "+V+" bytes.");z=u(B.toString(16),F)+z}return z},hex2str:function(C,N){var F,H="",z,V;if(typeof C!="string")throw new Error("Input must be a hexadecimal string.");if(N=N||t.bytesPerChar,typeof N!="number"||N%1!==0||N<1||N>t.maxBytesPerChar)throw new Error("Bytes per character must be an integer between 1 and "+t.maxBytesPerChar+", inclusive.");for(F=2*N,C=u(C,F),z=0,V=C.length;z<V;z+=F)H=String.fromCharCode(parseInt(C.slice(z,z+F),16))+H;return H},random:function(C){if(typeof C!="number"||C%1!==0||C<2||C>65536)throw new Error("Number of bits must be an Integer between 1 and 65536.");return l(r.rng(C))},share:function(C,N,F,H){var z,V,B=new Array(N),g=new Array(N),I,y,f;if(H=H||128,typeof C!="string")throw new Error("Secret must be a string.");if(typeof N!="number"||N%1!==0||N<2)throw new Error("Number of shares must be an integer between 2 and 2^bits-1 ("+r.maxShares+"), inclusive.");if(N>r.maxShares)throw z=Math.ceil(Math.log(N+1)/Math.LN2),new Error("Number of shares must be an integer between 2 and 2^bits-1 ("+r.maxShares+"), inclusive. To create "+N+" shares, use at least "+z+" bits.");if(typeof F!="number"||F%1!==0||F<2)throw new Error("Threshold number of shares must be an integer between 2 and 2^bits-1 ("+r.maxShares+"), inclusive.");if(F>r.maxShares)throw z=Math.ceil(Math.log(F+1)/Math.LN2),new Error("Threshold number of shares must be an integer between 2 and 2^bits-1 ("+r.maxShares+"), inclusive. To use a threshold of "+F+", use at least "+z+" bits.");if(F>N)throw new Error("Threshold number of shares was "+F+" but must be less than or equal to the "+N+" shares specified as the total to generate.");if(typeof H!="number"||H%1!==0||H<0||H>1024)throw new Error("Zero-pad length must be an integer between 0 and 1024 inclusive.");for(C="1"+c(C),C=P(C,H),I=0,f=C.length;I<f;I++)for(V=L(C[I],N,F),y=0;y<N;y++)B[y]=B[y]||V[y].x.toString(r.radix),g[y]=u(V[y].y.toString(2))+(g[y]||"");for(I=0;I<N;I++)B[I]=U(r.bits,B[I],l(g[I]));return B},newShare:function(C,N){var F,H;if(C&&typeof C=="string"&&(C=parseInt(C,r.radix)),H=C.toString(r.radix),C&&H&&N&&N[0])return F=this.extractShareComponents(N[0]),U(F.bits,H,this.combine(N,C));throw new Error("Invalid 'id' or 'shares' Array argument to newShare().")},_reset:a,_padLeft:u,_hex2bin:c,_bin2hex:l,_hasCryptoGetRandomValues:m,_hasCryptoRandomBytes:w,_getRNG:E,_isSetRNG:s,_splitNumStringToIntArray:P,_horner:M,_lagrange:D,_getShares:L,_constructPublicShareString:U};return K.init(),K})});var I4=k((L6e,ZR)=>{"use strict";v();var gi=fr(),KR=ds(),VR=cr(),l6=null;function E4(){if(l6)return l6;var e=zR();return e.setRNG(function(t){for(var r=64,i=0;i<r;i++){for(var n=KR.getRandomBuffer(Math.ceil(t/8)),o="",a=0;a<n.length;a++)o+=("00000000"+n[a].toString(2)).slice(-8);if(o=o.slice(0,t),/1/.test(o))return o}throw new Error("shamir: CSPRNG returned all-zero draws "+r+" times in a row \u2014 refusing to hang on a degenerate/stubbed random source")}),l6=e,l6}var h6="ff",GR=2;function Ir(e){return this instanceof Ir?(this.options=e||{},this):new Ir(e)}Ir.split=function(e,t,r,i){if(i=i||{},e==null)throw new Error("Secret is required");if(t<2)throw new Error("Threshold must be at least 2");if(r<t)throw new Error("Number of shares must be at least threshold");if(t>255||r>255)throw new Error("Threshold and shares must be <= 255");for(var n=h.Buffer.isBuffer(e)?e:h.Buffer.from(e,"utf8"),o=h6+n.toString("hex"),a=E4().share(o,r,t),s=KR.getRandomBuffer(8).toString("hex"),u=i.checksum===!0,c=u?VR.sha256(n).slice(0,4).toString("hex"):null,l=[],m=0;m<a.length;m++)l.push({v:GR,id:m+1,threshold:t,shares:r,length:n.length,splitId:s,share:a[m],checksum:c});return l};Ir.combine=function(e){if(!e||e.length===0)throw new Error("Shares array is required");if(e[0]&&Array.isArray(e[0].bytes)&&e[0].share===void 0)return Ir._combineLegacy(e);var t=e[0].threshold,r=e[0].splitId;if(e.length<t)throw new Error("Insufficient shares: need "+t+", got "+e.length);for(var i=[],n=0;n<e.length;n++){var o=e[n];if(!o||typeof o.share!="string")throw new Error("Invalid share at index "+n);if(r!==void 0&&o.splitId!==r)throw new Error("Shares are from different splits (splitId mismatch)");if(o.threshold!==t)throw new Error("Shares have inconsistent threshold");i.push(o.share)}var a=E4().combine(i);if(a.slice(0,h6.length)!==h6)throw new Error("Reconstruction failed: invalid or insufficient shares");var s=h.Buffer.from(a.slice(h6.length),"hex"),u=e[0].checksum;if(u){var c=VR.sha256(s).slice(0,4).toString("hex");if(c!==u)throw new Error("Integrity check failed: shares are inconsistent or tampered")}return s};Ir.verifyShare=function(e){try{return!e||typeof e!="object"?!1:Array.isArray(e.bytes)&&e.share===void 0?Ir._verifyLegacyShare(e):e.v!==GR||typeof e.share!="string"||!/^[0-9a-fA-F]+$/.test(e.share)||typeof e.threshold!="number"||typeof e.shares!="number"||e.threshold<2||e.shares<e.threshold||e.shares>255||e.id<1||e.id>e.shares||e.checksum!==null&&e.checksum!==void 0&&!/^[0-9a-fA-F]{8}$/.test(e.checksum)?!1:(E4().extractShareComponents(e.share),!0)}catch{return!1}};Ir.generateTestVectors=function(){var e="Hello, Bitcoin SV!",t=3,r=5,i=Ir.split(e,t,r),n=Ir.combine(i.slice(0,t));return{secret:e,threshold:t,totalShares:r,shares:i,reconstructed:n.toString("utf8"),valid:n.toString("utf8")===e}};var Cs=new gi(2147483647);Ir._combineLegacy=function(e){var t=e[0].threshold,r=e[0].shares,i=e[0].length;if(e.length<t)throw new Error("Insufficient shares: need "+t+", got "+e.length);for(var n=0;n<e.length;n++){if(e[n].threshold!==t||e[n].shares!==r)throw new Error("Shares have inconsistent parameters");if(e[n].length!==i)throw new Error("Shares have different secret lengths")}for(var o=[],a=0;a<i;a++){for(var s=[],u=0;u<Math.min(e.length,t);u++)s.push(e[u].bytes[a]);o.push(Ir._combineByteLegacy(s))}return h.Buffer.from(o)};Ir._combineByteLegacy=function(e){for(var t=new gi(0),r=0;r<e.length;r++){for(var i=new gi(e[r].x),n=new gi(e[r].y,16),o=new gi(1),a=new gi(1),s=0;s<e.length;s++)if(r!==s){var u=new gi(e[s].x),c=new gi(0).sub(u);c.lt(new gi(0))&&(c=c.add(Cs)),o=o.mul(c).mod(Cs);var l=i.sub(u);l.lt(new gi(0))&&(l=l.add(Cs)),a=a.mul(l).mod(Cs)}var m=Ir._modInverseLegacy(a,Cs),w=o.mul(m).mod(Cs);t=t.add(n.mul(w)).mod(Cs)}return t.mod(Cs).mod(new gi(256)).toNumber()};Ir._modInverseLegacy=function(e,t){e.lt(new gi(0))&&(e=e.mod(t).add(t));var r=Ir._extendedGCDLegacy(e,t);if(!r.gcd.eq(new gi(1)))throw new Error("Modular inverse does not exist");return r.x.mod(t).add(t).mod(t)};Ir._extendedGCDLegacy=function(e,t){if(e.eq(new gi(0)))return{gcd:t,x:new gi(0),y:new gi(1)};var r=Ir._extendedGCDLegacy(t.mod(e),e);return{gcd:r.gcd,x:r.y.sub(t.div(e).mul(r.x)),y:r.x}};Ir._verifyLegacyShare=function(e){if(!e.id||!e.threshold||!e.shares||!e.bytes||typeof e.length!="number"||e.threshold<2||e.shares<e.threshold||!Array.isArray(e.bytes)||e.bytes.length!==e.length)return!1;for(var t=0;t<e.bytes.length;t++){var r=e.bytes[t];if(!r||!r.x||!r.y||r.x<1||r.x>e.shares||!/^[0-9a-fA-F]+$/.test(r.y))return!1}return!0};ZR.exports=Ir});var p6=k((U6e,WR)=>{"use strict";v();var Uo=fr(),gre=vn(),vre=o6(),Z0=gre.getN(),d6=Z0.shrn(1);function mre(e,t,r){if(!h.Buffer.isBuffer(e)||e.length!==32)throw new Error("Invalid message hash: must be 32-byte buffer");if(!t)return!1;let i=t;if(h.Buffer.isBuffer(t))try{i=Vr().fromDER(t)}catch{return!1}if(!i||!i.r||!i.s)return!1;let n=Uo.isBN(i.r)?i.r:new Uo(i.r),o=Uo.isBN(i.s)?i.s:new Uo(i.s);if(n.isZero()||o.isZero()||n.gte(Z0)||o.gte(Z0)||o.gt(d6))return!1;let a=Vr(),s=new a({r:n,s:o});return vre.verify(e,s,r)}function yre(e){if(!e)return!1;let t=e;if(h.Buffer.isBuffer(e))try{t=Vr().fromDER(e)}catch{return!1}return!t||!t.s?!1:(Uo.isBN(t.s)?t.s:new Uo(t.s)).lte(d6)}function bre(e){if(!e||!e.r||!e.s)throw new Error("Invalid signature object");let t=Uo.isBN(e.r)?e.r:new Uo(e.r),r=Uo.isBN(e.s)?e.s:new Uo(e.s),i=r;return r.gt(d6)&&(i=Z0.sub(r)),{r:t,s:i}}WR.exports={smartVerify:mre,isCanonical:yre,canonicalize:bre,constants:{n:Z0,nh:d6}}});var g6=k((H6e,XR)=>{"use strict";v();var _re=fr(),{secp256k1:ll}=(d0(),ho(h0)),YR=ll.Point,wre=YR.Fn.ORDER;function O4(e){var t=e.toString(16);return t.length%2&&(t="0"+t),new _re(t,16)}function A4(e){return h.Buffer.isBuffer(e)?Uint8Array.from(e):e instanceof Uint8Array?e:Uint8Array.from(h.Buffer.from(e,"hex"))}function P4(e){this._p=e}P4.prototype.eq=function(e){var t=e&&e._p?e._p:e;return this._p.equals(t)};var $R={curve:{n:O4(wre)},keyFromPrivate:function(e,t){var r;h.Buffer.isBuffer(e)?r=e:e instanceof Uint8Array?r=h.Buffer.from(e):r=h.Buffer.from(e,t||"hex");var i=Uint8Array.from(r);return{_priv:i,getPublic:function(){return new P4(YR.fromBytes(ll.getPublicKey(i,!0)))}}},sign:function(e,t){var r=ll.sign(A4(e),t._priv,{lowS:!0,prehash:!1,format:"recovered"}),i=r[0],n=O4(BigInt("0x"+h.Buffer.from(r.subarray(1,33)).toString("hex"))),o=O4(BigInt("0x"+h.Buffer.from(r.subarray(33,65)).toString("hex")));return{r:n,s:o,recoveryParam:i}},verify:function(e,t,r){try{if(!t||typeof t!="object")return!1;var i=t.r,n=t.s;if(!i||!n||typeof i.cmp!="function"||typeof n.cmp!="function"||i.isZero()||n.isZero())return!1;var o=$R.curve.n;if(i.cmp(o)>=0||n.cmp(o)>=0)return!1;var a=h.Buffer.concat([i.toBuffer({size:32}),n.toBuffer({size:32})]),s=r._priv?ll.getPublicKey(r._priv,!0):r._p?r._p.toBytes(!0):r;return ll.verify(Uint8Array.from(a),A4(e),Uint8Array.from(s),{lowS:!1,prehash:!1})}catch{return!1}},recoverPubKey:function(e,t,r){var i=h.Buffer.concat([t.r.toBuffer({size:32}),t.s.toBuffer({size:32})]),n=ll.Signature.fromBytes(Uint8Array.from(i),"compact").addRecoveryBit(r);return new P4(n.recoverPublicKey(A4(e)))}};XR.exports=$R});var Y0=k((z6e,eB)=>{"use strict";v();var v6=Et(),W0=fr(),m6=La(),Sre=Wn(),xre=cr(),JR=Bt(),Ere=486604799,vt=function e(t){if(!(this instanceof e))return new e(t);var r=e._from(t);return this.version=r.version,this.prevHash=r.prevHash,this.merkleRoot=r.merkleRoot,this.time=r.time,this.timestamp=r.time,this.bits=r.bits,this.nonce=r.nonce,r.hash&&JR.checkState(this.hash===r.hash,"Argument object hash property does not match block hash."),this};vt._from=function(t){var r={};if(h.Buffer.isBuffer(t))r=vt._fromBufferReader(m6(t));else if(v6.isObject(t))r=vt._fromObject(t);else throw new TypeError("Unrecognized argument for BlockHeader");return r};vt._fromObject=function(t){JR.checkArgument(t,"data is required");var r=t.prevHash,i=t.merkleRoot;v6.isString(t.prevHash)&&(r=h.Buffer.from(t.prevHash,"hex").reverse()),v6.isString(t.merkleRoot)&&(i=h.Buffer.from(t.merkleRoot,"hex").reverse());var n={hash:t.hash,version:t.version,prevHash:r,merkleRoot:i,time:t.time,timestamp:t.time,bits:t.bits,nonce:t.nonce};return n};vt.fromObject=function(t){var r=vt._fromObject(t);return new vt(r)};vt.fromRawBlock=function(t){h.Buffer.isBuffer(t)||(t=h.Buffer.from(t,"binary"));var r=m6(t);r.pos=vt.Constants.START_OF_HEADER;var i=vt._fromBufferReader(r);return new vt(i)};vt.fromBuffer=function(t){var r=vt._fromBufferReader(m6(t));return new vt(r)};vt.fromString=function(t){var r=h.Buffer.from(t,"hex");return vt.fromBuffer(r)};vt._fromBufferReader=function(t){var r={};return r.version=t.readInt32LE(),r.prevHash=t.read(32),r.merkleRoot=t.read(32),r.time=t.readUInt32LE(),r.bits=t.readUInt32LE(),r.nonce=t.readUInt32LE(),r};vt.fromBufferReader=function(t){var r=vt._fromBufferReader(t);return new vt(r)};vt.prototype.toObject=vt.prototype.toJSON=function(){return{hash:this.hash,version:this.version,prevHash:h.Buffer.from(this.prevHash).reverse().toString("hex"),merkleRoot:h.Buffer.from(this.merkleRoot).reverse().toString("hex"),time:this.time,bits:this.bits,nonce:this.nonce}};vt.prototype.toBuffer=function(){return this.toBufferWriter().concat()};vt.prototype.toString=function(){return this.toBuffer().toString("hex")};vt.prototype.toBufferWriter=function(t){return t||(t=new Sre),t.writeInt32LE(this.version),t.write(this.prevHash),t.write(this.merkleRoot),t.writeUInt32LE(this.time),t.writeUInt32LE(this.bits),t.writeUInt32LE(this.nonce),t};vt.prototype.getTargetDifficulty=function(t){t=t||this.bits;for(var r=new W0(t&16777215),i=8*((t>>>24)-3);i-- >0;)r=r.mul(new W0(2));return r};vt.prototype.getDifficulty=function(){var t=this.getTargetDifficulty(Ere).mul(new W0(Math.pow(10,8))),r=this.getTargetDifficulty(),i=t.div(r).toString(10),n=i.length-8;return i=i.slice(0,n)+"."+i.slice(n),parseFloat(i)};vt.prototype._getHash=function(){var t=this.toBuffer();return xre.sha256sha256(t)};var QR={configurable:!1,enumerable:!0,get:function(){return this._id||(this._id=m6(this._getHash()).readReverse().toString("hex")),this._id},set:v6.noop};Object.defineProperty(vt.prototype,"id",QR);Object.defineProperty(vt.prototype,"hash",QR);vt.prototype.validTimestamp=function(){var t=Math.round(new Date().getTime()/1e3);return!(this.time>t+vt.Constants.MAX_TIME_OFFSET)};vt.prototype.validProofOfWork=function(){var t=new W0(this.id,"hex"),r=this.getTargetDifficulty();return!(t.cmp(r)>0)};vt.prototype.inspect=function(){return"<BlockHeader "+this.id+">"};vt.Constants={START_OF_HEADER:8,MAX_TIME_OFFSET:7200,LARGEST_HASH:new W0("10000000000000000000000000000000000000000000000000000000000000000","hex")};eB.exports=vt});var aB=k((V6e,oB)=>{"use strict";v();var k4=Et(),rB=Y0(),tB=fr(),R4=La(),Ire=Wn(),Ore=cr(),T4=Rs(),iB=Bt();function st(e){return this instanceof st?(k4.extend(this,st._from(e)),this):new st(e)}st.MAX_BLOCK_SIZE=128e6;st._from=function(t){var r={};if(h.Buffer.isBuffer(t))r=st._fromBufferReader(R4(t));else if(k4.isObject(t))r=st._fromObject(t);else throw new TypeError("Unrecognized argument for Block");return r};st._fromObject=function(t){var r=[];t.transactions.forEach(function(n){n instanceof T4?r.push(n):r.push(T4().fromObject(n))});var i={header:rB.fromObject(t.header),transactions:r};return i};st.fromObject=function(t){var r=st._fromObject(t);return new st(r)};st._fromBufferReader=function(t){var r={};iB.checkState(!t.finished(),"No block data received"),r.header=rB.fromBufferReader(t);var i=t.readVarintNum();r.transactions=[];for(var n=0;n<i;n++)r.transactions.push(T4().fromBufferReader(t));return r};st.fromBufferReader=function(t){iB.checkArgument(t,"br is required");var r=st._fromBufferReader(t);return new st(r)};st.fromBuffer=function(t){return st.fromBufferReader(new R4(t))};st.fromString=function(t){var r=h.Buffer.from(t,"hex");return st.fromBuffer(r)};st.fromRawBlock=function(t){h.Buffer.isBuffer(t)||(t=h.Buffer.from(t,"binary"));var r=R4(t);r.pos=st.Values.START_OF_BLOCK;var i=st._fromBufferReader(r);return new st(i)};st.prototype.toObject=st.prototype.toJSON=function(){var t=[];return this.transactions.forEach(function(r){t.push(r.toObject())}),{header:this.header.toObject(),transactions:t}};st.prototype.toBuffer=function(){return this.toBufferWriter().concat()};st.prototype.toString=function(){return this.toBuffer().toString("hex")};st.prototype.toBufferWriter=function(t){t||(t=new Ire),t.write(this.header.toBuffer()),t.writeVarintNum(this.transactions.length);for(var r=0;r<this.transactions.length;r++)this.transactions[r].toBufferWriter(t);return t};st.prototype.getTransactionHashes=function(){var t=[];if(this.transactions.length===0)return[st.Values.NULL_HASH];for(var r=0;r<this.transactions.length;r++)t.push(this.transactions[r]._getHash());return t};st.prototype.getMerkleTree=function(){for(var t=this.getTransactionHashes(),r=0,i=this.transactions.length;i>1;i=Math.floor((i+1)/2)){for(var n=0;n<i;n+=2){var o=Math.min(n+1,i-1),a=h.Buffer.concat([t[r+n],t[r+o]]);t.push(Ore.sha256sha256(a))}r+=i}return t};st.prototype.getMerkleRoot=function(){var t=this.getMerkleTree();return t[t.length-1]};st.prototype.validMerkleRoot=function(){var t=new tB(this.header.merkleRoot.toString("hex"),"hex"),r=new tB(this.getMerkleRoot().toString("hex"),"hex");return t.cmp(r)===0};st.prototype._getHash=function(){return this.header._getHash()};var nB={configurable:!1,enumerable:!0,get:function(){return this._id||(this._id=this.header.id),this._id},set:k4.noop};Object.defineProperty(st.prototype,"id",nB);Object.defineProperty(st.prototype,"hash",nB);st.prototype.inspect=function(){return"<Block "+this.id+">"};st.Values={START_OF_BLOCK:8,NULL_HASH:h.Buffer.from("0000000000000000000000000000000000000000000000000000000000000000","hex")};oB.exports=st});var C4=k((Z6e,fB)=>{"use strict";v();var vf=Et(),M4=Y0(),uB=La(),Are=Wn(),Pre=cr(),sB=Rs(),B4=hn(),mf=Bt();function nr(e){if(!(this instanceof nr))return new nr(e);var t={};if(h.Buffer.isBuffer(e))t=nr._fromBufferReader(uB(e));else if(vf.isObject(e)){var r;e.header instanceof M4?r=e.header:r=M4.fromObject(e.header),t={header:r,numTransactions:e.numTransactions,hashes:e.hashes,flags:e.flags}}else throw new TypeError("Unrecognized argument for MerkleBlock");return vf.extend(this,t),this._flagBitsUsed=0,this._hashesUsed=0,this}nr.fromBuffer=function(t){return nr.fromBufferReader(uB(t))};nr.fromBufferReader=function(t){return new nr(nr._fromBufferReader(t))};nr.prototype.toBuffer=function(){return this.toBufferWriter().concat()};nr.prototype.toBufferWriter=function(t){t||(t=new Are),t.write(this.header.toBuffer()),t.writeUInt32LE(this.numTransactions),t.writeVarintNum(this.hashes.length);for(var r=0;r<this.hashes.length;r++)t.write(h.Buffer.from(this.hashes[r],"hex"));for(t.writeVarintNum(this.flags.length),r=0;r<this.flags.length;r++)t.writeUInt8(this.flags[r]);return t};nr.prototype.toObject=nr.prototype.toJSON=function(){return{header:this.header.toObject(),numTransactions:this.numTransactions,hashes:this.hashes,flags:this.flags}};nr.prototype.validMerkleTree=function(){if(mf.checkState(vf.isArray(this.flags),"MerkleBlock flags is not an array"),mf.checkState(vf.isArray(this.hashes),"MerkleBlock hashes is not an array"),this.hashes.length>this.numTransactions||this.flags.length*8<this.hashes.length)return!1;var t=this._calcTreeHeight(),r={hashesUsed:0,flagBitsUsed:0},i=this._traverseMerkleTree(t,0,r);return r.hashesUsed!==this.hashes.length?!1:i.equals(this.header.merkleRoot)};nr.prototype.filterdTxsHash=function(){throw new Error("filterdTxsHash has been deprecated. use filteredTxsHash.")};nr.prototype.filteredTxsHash=function(){if(mf.checkState(vf.isArray(this.flags),"MerkleBlock flags is not an array"),mf.checkState(vf.isArray(this.hashes),"MerkleBlock hashes is not an array"),this.hashes.length>this.numTransactions)throw new B4.MerkleBlock.InvalidMerkleTree;if(this.flags.length*8<this.hashes.length)throw new B4.MerkleBlock.InvalidMerkleTree;if(this.hashes.length===1)return[];var t=this._calcTreeHeight(),r={hashesUsed:0,flagBitsUsed:0},i=this._traverseMerkleTree(t,0,r,!0);if(r.hashesUsed!==this.hashes.length)throw new B4.MerkleBlock.InvalidMerkleTree;return i};nr.prototype._traverseMerkleTree=function(t,r,i,n){if(i=i||{},i.txs=i.txs||[],i.flagBitsUsed=i.flagBitsUsed||0,i.hashesUsed=i.hashesUsed||0,n=n||!1,i.flagBitsUsed>this.flags.length*8)return null;var o=this.flags[i.flagBitsUsed>>3]>>>(i.flagBitsUsed++&7)&1;if(t===0||!o){if(i.hashesUsed>=this.hashes.length)return null;var a=this.hashes[i.hashesUsed++];return t===0&&o&&i.txs.push(a),h.Buffer.from(a,"hex")}else{var s=this._traverseMerkleTree(t-1,r*2,i),u=s;return r*2+1<this._calcTreeWidth(t-1)&&(u=this._traverseMerkleTree(t-1,r*2+1,i)),n?i.txs:Pre.sha256sha256(h.Buffer.concat([s,u]))}};nr.prototype._calcTreeWidth=function(t){return this.numTransactions+(1<<t)-1>>t};nr.prototype._calcTreeHeight=function(){for(var t=0;this._calcTreeWidth(t)>1;)t++;return t};nr.prototype.hasTransaction=function(t){mf.checkArgument(!vf.isUndefined(t),"tx cannot be undefined"),mf.checkArgument(t instanceof sB||typeof t=="string",'Invalid tx given, tx must be a "string" or "Transaction"');var r=t;t instanceof sB&&(r=h.Buffer.from(t.id,"hex").reverse().toString("hex"));var i=[],n=this._calcTreeHeight();return this._traverseMerkleTree(n,0,{txs:i}),i.indexOf(r)!==-1};nr._fromBufferReader=function(t){mf.checkState(!t.finished(),"No merkleblock data received");var r={};r.header=M4.fromBufferReader(t),r.numTransactions=t.readUInt32LE();var i=t.readVarintNum();r.hashes=[];for(var n=0;n<i;n++)r.hashes.push(t.read(32).toString("hex"));var o=t.readVarintNum();for(r.flags=[],n=0;n<o;n++)r.flags.push(t.readUInt8());return r};nr.fromObject=function(t){return new nr(t)};fB.exports=nr});var cB=k((Y6e,y6)=>{v();y6.exports=aB();y6.exports.BlockHeader=Y0();y6.exports.MerkleBlock=C4()});var yB=k((X6e,mB)=>{"use strict";v();var pB=ke(),lB=pB.crypto.Hash,hB=/^[0-9a-fA-F]{64}$/;function gB(e){return h.Buffer.from(e).reverse()}function dB(e){return gB(h.Buffer.from(e,"hex"))}function vB(e){return gB(e).toString("hex")}function N4(e,t,r){if(!hB.test(String(e)))throw new Error("txid must be 32-byte hex");if(!Number.isInteger(t)||t<0)throw new Error("index must be a non-negative integer");r=r||[];for(var i=dB(e),n=t,o=0;o<r.length;o++){var a=r[o],s;if(a==="*"||a===""||a==null)s=i;else{if(!hB.test(String(a)))throw new Error("proof node "+o+' must be 32-byte hex or "*"');s=dB(a)}i=n&1?lB.sha256sha256(h.Buffer.concat([s,i])):lB.sha256sha256(h.Buffer.concat([i,s])),n=Math.floor(n/2)}return vB(i)}function Tre(e){if(!e||!e.merkleRoot)throw new Error("proof.merkleRoot is required");var t=N4(e.txid,e.index,e.nodes);return t.toLowerCase()===String(e.merkleRoot).toLowerCase()}function kre(e){var t=e.header;if((h.Buffer.isBuffer(t)||typeof t=="string")&&(t=pB.BlockHeader.fromBuffer(h.Buffer.isBuffer(t)?t:h.Buffer.from(t,"hex"))),!t||!t.merkleRoot)throw new Error("a valid block header is required");var r=vB(t.merkleRoot),i=N4(e.txid,e.index,e.nodes),n=i.toLowerCase()===r.toLowerCase(),o=e.requirePow!==!1,a=t.validProofOfWork();return{valid:n&&(!o||a),rootMatches:n,powValid:a,merkleRoot:i,blockHash:t.id}}mB.exports={merkleRootFromBranch:N4,verifyMerkleProof:Tre,verifyTxInclusion:kre}});var wB=k((Q6e,_B)=>{"use strict";v();var bB=ke();function Rre(e){return h.Buffer.from(e).reverse()}function Bre(e){if(e&&typeof e.validProofOfWork=="function")return e;if(h.Buffer.isBuffer(e))return bB.BlockHeader.fromBuffer(e);if(typeof e=="string")return bB.BlockHeader.fromBuffer(h.Buffer.from(e,"hex"));throw new Error("each header must be a BlockHeader, an 80-byte Buffer, or hex")}function Mre(e,t){if(t=t||{},!Array.isArray(e)||e.length===0)throw new Error("headers must be a non-empty array");for(var r=e.map(Bre),i=t.requirePow!==!1,n=0,o=0;o<r.length;o++){if(i&&!r[o].validProofOfWork())return{valid:!1,reason:"invalid proof-of-work at index "+o,count:r.length};if(n+=r[o].getDifficulty(),o>0){var a=Rre(r[o].prevHash).toString("hex").toLowerCase()===r[o-1].id.toLowerCase();if(!a)return{valid:!1,reason:"broken link at index "+o,count:r.length}}}var s=r[0].id,u=r[r.length-1].id;if(t.trustedHash){var c=String(t.trustedHash).toLowerCase();if(c!==u.toLowerCase()&&c!==s.toLowerCase())return{valid:!1,reason:"chain is not anchored at the trusted hash",count:r.length,anchorHash:s,tipHash:u}}return{valid:!0,count:r.length,anchorHash:s,tipHash:u,work:n}}_B.exports={verifyHeaderChain:Mre}});var xB=k((t5e,SB)=>{"use strict";v();var D4=yB(),Cre=wB();SB.exports={merkleRootFromBranch:D4.merkleRootFromBranch,verifyMerkleProof:D4.verifyMerkleProof,verifyTxInclusion:D4.verifyTxInclusion,verifyHeaderChain:Cre.verifyHeaderChain}});var q4=k((i5e,TB)=>{"use strict";v();var Or=Et(),EB=Bt(),IB=fr(),Nre=S0(),b6=Qc(),OB=cr(),_6=U4(),yf=xs(),L4=vn(),AB=$n(),PB=hn(),$0=PB,ro=PB.HDPublicKey,w6=Is(),Ns=pi();function oe(e){if(e instanceof oe)return e;if(!(this instanceof oe))return new oe(e);if(e)if(Or.isString(e)||h.Buffer.isBuffer(e)){var t=oe.getSerializedError(e);if(t){if(h.Buffer.isBuffer(e)&&!oe.getSerializedError(e.toString()))return this._buildFromSerialized(e.toString());if(t instanceof ro.ArgumentIsPrivateExtended)return new _6(e).hdPublicKey;throw t}else return this._buildFromSerialized(e)}else{if(Or.isObject(e))return e instanceof _6?this._buildFromPrivate(e):this._buildFromObject(e);throw new ro.UnrecognizedArgument(e)}else throw new ro.MustSupplyArgument}oe.fromHDPrivateKey=function(e){return new oe(e)};oe.isValidPath=function(e){if(Or.isString(e)){var t=_6._getDerivationIndexes(e);return t!==null&&Or.every(t,oe.isValidPath)}return Or.isNumber(e)?e>=0&&e<oe.Hardened:!1};oe.prototype.derive=function(){throw new Error("derive has been deprecated. use deriveChild or, for the old way, deriveNonCompliantChild.")};oe.prototype.deriveChild=function(e,t){if(Or.isNumber(e))return this._deriveWithNumber(e,t);if(Or.isString(e))return this._deriveFromString(e);throw new ro.InvalidDerivationArgument(e)};oe.prototype._deriveWithNumber=function(e,t){if(e>=oe.Hardened||t)throw new ro.InvalidIndexCantDeriveHardened;if(e<0)throw new ro.InvalidPath(e);var r=Ns.integerAsBuffer(e),i=h.Buffer.concat([this.publicKey.toBuffer(),r]),n=OB.sha512hmac(i,this._buffers.chainCode),o=IB.fromBuffer(n.slice(0,32),{size:32}),a=n.slice(32,64),s;try{s=AB.fromPoint(L4.getG().mul(o).add(this.publicKey.point))}catch{return this._deriveWithNumber(e+1)}var u=new oe({network:this.network,depth:this.depth+1,parentFingerPrint:this.fingerPrint,childIndex:e,chainCode:a,publicKey:s});return u};oe.prototype._deriveFromString=function(e){if(Or.includes(e,"'"))throw new ro.InvalidIndexCantDeriveHardened;if(!oe.isValidPath(e))throw new ro.InvalidPath(e);var t=_6._getDerivationIndexes(e),r=t.reduce(function(i,n){return i._deriveWithNumber(n)},this);return r};oe.isValidSerialized=function(e,t){return Or.isNull(oe.getSerializedError(e,t))};oe.getSerializedError=function(e,t){if(!(Or.isString(e)||h.Buffer.isBuffer(e)))return new ro.UnrecognizedArgument("expected buffer or string");if(!Nre.validCharacters(e))return new $0.InvalidB58Char("(unknown)",e);try{e=b6.decode(e)}catch{return new $0.InvalidB58Checksum(e)}if(e.length!==oe.DataSize)return new ro.InvalidLength(e);if(!Or.isUndefined(t)){var r=oe._validateNetwork(e,t);if(r)return r}var i=e.readUInt32BE(0);return i===yf.livenet.xprivkey||i===yf.testnet.xprivkey?new ro.ArgumentIsPrivateExtended:null};oe._validateNetwork=function(e,t){var r=yf.get(t);if(!r)return new $0.InvalidNetworkArgument(t);var i=e.slice(oe.VersionStart,oe.VersionEnd);return i.readUInt32BE(0)!==r.xpubkey?new $0.InvalidNetwork(i):null};oe.prototype._buildFromPrivate=function(e){var t=Or.clone(e._buffers),r=L4.getG().mul(IB.fromBuffer(t.privateKey));return t.publicKey=L4.pointToCompressed(r),t.version=Ns.integerAsBuffer(yf.get(t.version.readUInt32BE(0)).xpubkey),t.privateKey=void 0,t.checksum=void 0,t.xprivkey=void 0,this._buildFromBuffers(t)};oe.prototype._buildFromObject=function(e){var t={version:e.network?Ns.integerAsBuffer(yf.get(e.network).xpubkey):e.version,depth:Or.isNumber(e.depth)?h.Buffer.from([e.depth&255]):e.depth,parentFingerPrint:Or.isNumber(e.parentFingerPrint)?Ns.integerAsBuffer(e.parentFingerPrint):e.parentFingerPrint,childIndex:Or.isNumber(e.childIndex)?Ns.integerAsBuffer(e.childIndex):e.childIndex,chainCode:Or.isString(e.chainCode)?h.Buffer.from(e.chainCode,"hex"):e.chainCode,publicKey:Or.isString(e.publicKey)?h.Buffer.from(e.publicKey,"hex"):h.Buffer.isBuffer(e.publicKey)?e.publicKey:e.publicKey.toBuffer(),checksum:Or.isNumber(e.checksum)?Ns.integerAsBuffer(e.checksum):e.checksum};return this._buildFromBuffers(t)};oe.prototype._buildFromSerialized=function(e){var t=b6.decode(e),r={version:t.slice(oe.VersionStart,oe.VersionEnd),depth:t.slice(oe.DepthStart,oe.DepthEnd),parentFingerPrint:t.slice(oe.ParentFingerPrintStart,oe.ParentFingerPrintEnd),childIndex:t.slice(oe.ChildIndexStart,oe.ChildIndexEnd),chainCode:t.slice(oe.ChainCodeStart,oe.ChainCodeEnd),publicKey:t.slice(oe.PublicKeyStart,oe.PublicKeyEnd),checksum:t.slice(oe.ChecksumStart,oe.ChecksumEnd),xpubkey:e};return this._buildFromBuffers(r)};oe.prototype._buildFromBuffers=function(e){oe._validateBufferArguments(e),Ns.defineImmutable(this,{_buffers:e});var t=[e.version,e.depth,e.parentFingerPrint,e.childIndex,e.chainCode,e.publicKey],r=h.Buffer.concat(t),i=b6.checksum(r);if(!e.checksum||!e.checksum.length)e.checksum=i;else if(e.checksum.toString("hex")!==i.toString("hex"))throw new $0.InvalidB58Checksum(r,i);var n=yf.get(e.version.readUInt32BE(0)),o;o=b6.encode(h.Buffer.concat(t)),e.xpubkey=h.Buffer.from(o);var a=new AB(e.publicKey,{network:n}),s=oe.ParentFingerPrintSize,u=OB.sha256ripemd160(a.toBuffer()).slice(0,s);return Ns.defineImmutable(this,{xpubkey:o,network:n,depth:e.depth[0],publicKey:a,fingerPrint:u}),this};oe._validateBufferArguments=function(e){var t=function(r,i){var n=e[r];w6(h.Buffer.isBuffer(n),r+" argument is not a buffer, it's "+typeof n),w6(n.length===i,r+" has not the expected size: found "+n.length+", expected "+i)};t("version",oe.VersionSize),t("depth",oe.DepthSize),t("parentFingerPrint",oe.ParentFingerPrintSize),t("childIndex",oe.ChildIndexSize),t("chainCode",oe.ChainCodeSize),t("publicKey",oe.PublicKeySize),e.checksum&&e.checksum.length&&t("checksum",oe.CheckSumSize)};oe.fromString=function(e){return EB.checkArgument(Or.isString(e),"No valid string was provided"),new oe(e)};oe.fromObject=function(e){return EB.checkArgument(Or.isObject(e),"No valid argument was provided"),new oe(e)};oe.prototype.toString=function(){return this.xpubkey};oe.prototype.inspect=function(){return"<HDPublicKey: "+this.xpubkey+">"};oe.prototype.toObject=oe.prototype.toJSON=function(){return{network:yf.get(this._buffers.version.readUInt32BE(0)).name,depth:this._buffers.depth[0],fingerPrint:this.fingerPrint.readUInt32BE(0),parentFingerPrint:this._buffers.parentFingerPrint.readUInt32BE(0),childIndex:this._buffers.childIndex.readUInt32BE(0),chainCode:this._buffers.chainCode.toString("hex"),publicKey:this.publicKey.toString(),checksum:this._buffers.checksum.readUInt32BE(0),xpubkey:this.xpubkey}};oe.fromBuffer=function(e){return new oe(e)};oe.fromHex=function(e){return oe.fromBuffer(h.Buffer.from(e,"hex"))};oe.prototype.toBuffer=function(){return h.Buffer.from(this._buffers.xpubkey)};oe.prototype.toHex=function(){return this.toBuffer().toString("hex")};oe.Hardened=2147483648;oe.RootElementAlias=["m","M"];oe.VersionSize=4;oe.DepthSize=1;oe.ParentFingerPrintSize=4;oe.ChildIndexSize=4;oe.ChainCodeSize=32;oe.PublicKeySize=33;oe.CheckSumSize=4;oe.DataSize=78;oe.SerializedByteSize=82;oe.VersionStart=0;oe.VersionEnd=oe.VersionStart+oe.VersionSize;oe.DepthStart=oe.VersionEnd;oe.DepthEnd=oe.DepthStart+oe.DepthSize;oe.ParentFingerPrintStart=oe.DepthEnd;oe.ParentFingerPrintEnd=oe.ParentFingerPrintStart+oe.ParentFingerPrintSize;oe.ChildIndexStart=oe.ParentFingerPrintEnd;oe.ChildIndexEnd=oe.ChildIndexStart+oe.ChildIndexSize;oe.ChainCodeStart=oe.ChildIndexEnd;oe.ChainCodeEnd=oe.ChainCodeStart+oe.ChainCodeSize;oe.PublicKeyStart=oe.ChainCodeEnd;oe.PublicKeyEnd=oe.PublicKeyStart+oe.PublicKeySize;oe.ChecksumStart=oe.PublicKeyEnd;oe.ChecksumEnd=oe.ChecksumStart+oe.CheckSumSize;w6(oe.PublicKeyEnd===oe.DataSize);w6(oe.ChecksumEnd===oe.SerializedByteSize);TB.exports=oe});var U4=k((o5e,CB)=>{"use strict";v();var S6=Is(),J0=Kt(),mr=Et(),RB=Bt(),BB=fr(),Dre=S0(),X0=Qc(),F4=cr(),bf=xs(),Lre=vn(),MB=z0(),qre=ds(),hl=hn(),Ho=hl.HDPrivateKey,Fo=pi(),Ure=128,kB=1/8,Fre=512;function J(e){if(e instanceof J)return e;if(!(this instanceof J))return new J(e);if(!e)return this._generateRandomly();if(bf.get(e))return this._generateRandomly(e);if(mr.isString(e)||h.Buffer.isBuffer(e))if(J.isValidSerialized(e))this._buildFromSerialized(e);else if(Fo.isValidJSON(e))this._buildFromJSON(e);else if(h.Buffer.isBuffer(e)&&J.isValidSerialized(e.toString()))this._buildFromSerialized(e.toString());else throw J.getSerializedError(e);else if(mr.isObject(e))this._buildFromObject(e);else throw new Ho.UnrecognizedArgument(e)}J.fromRandom=function(e){return new J(e)};J.isValidPath=function(e,t){if(mr.isString(e)){var r=J._getDerivationIndexes(e);return r!==null&&mr.every(r,J.isValidPath)}return mr.isNumber(e)?(e<J.Hardened&&t===!0&&(e+=J.Hardened),e>=0&&e<J.MaxIndex):!1};J._getDerivationIndexes=function(e){var t=e.split("/");if(mr.includes(J.RootElementAlias,e))return[];if(!mr.includes(J.RootElementAlias,t[0]))return null;var r=t.slice(1).map(function(i){var n=i.slice(-1)==="'";if(n&&(i=i.slice(0,-1)),!i||i[0]==="-")return NaN;var o=+i;return n&&(o+=J.Hardened),o});return mr.some(r,isNaN)?null:r};J.prototype.derive=function(){throw new Error("derive has been deprecated. use deriveChild or, for the old way, deriveNonCompliantChild.")};J.prototype.deriveChild=function(e,t){if(mr.isNumber(e))return this._deriveWithNumber(e,t);if(mr.isString(e))return this._deriveFromString(e);throw new Ho.InvalidDerivationArgument(e)};J.prototype.deriveNonCompliantChild=function(e,t){if(mr.isNumber(e))return this._deriveWithNumber(e,t,!0);if(mr.isString(e))return this._deriveFromString(e,!0);throw new Ho.InvalidDerivationArgument(e)};J.prototype._deriveWithNumber=function(e,t,r){if(!J.isValidPath(e,t))throw new Ho.InvalidPath(e);t=e>=J.Hardened?!0:t,e<J.Hardened&&t===!0&&(e+=J.Hardened);var i=Fo.integerAsBuffer(e),n;if(t&&r){var o=this.privateKey.bn.toBuffer();n=h.Buffer.concat([J0.Buffer.from([0]),o,i])}else if(t){var a=this.privateKey.bn.toBuffer({size:32});S6(a.length===32,"length of private key buffer is expected to be 32 bytes"),n=h.Buffer.concat([J0.Buffer.from([0]),a,i])}else n=h.Buffer.concat([this.publicKey.toBuffer(),i]);var s=F4.sha512hmac(n,this._buffers.chainCode),u=BB.fromBuffer(s.slice(0,32),{size:32}),c=s.slice(32,64),l=u.add(this.privateKey.toBigNumber()).umod(Lre.getN()).toBuffer({size:32});if(!MB.isValid(l))return this._deriveWithNumber(e+1,null,r);var m=new J({network:this.network,depth:this.depth+1,parentFingerPrint:this.fingerPrint,childIndex:e,chainCode:c,privateKey:l});return m};J.prototype._deriveFromString=function(e,t){if(!J.isValidPath(e))throw new Ho.InvalidPath(e);var r=J._getDerivationIndexes(e),i=r.reduce(function(n,o){return n._deriveWithNumber(o,null,t)},this);return i};J.isValidSerialized=function(e,t){return!J.getSerializedError(e,t)};J.getSerializedError=function(e,t){if(!(mr.isString(e)||h.Buffer.isBuffer(e)))return new Ho.UnrecognizedArgument("Expected string or buffer");if(!Dre.validCharacters(e))return new hl.InvalidB58Char("(unknown)",e);try{e=X0.decode(e)}catch{return new hl.InvalidB58Checksum(e)}if(e.length!==J.DataLength)return new Ho.InvalidLength(e);if(!mr.isUndefined(t)){var r=J._validateNetwork(e,t);if(r)return r}return null};J._validateNetwork=function(e,t){var r=bf.get(t);if(!r)return new hl.InvalidNetworkArgument(t);var i=e.slice(0,4);return i.readUInt32BE(0)!==r.xprivkey?new hl.InvalidNetwork(i):null};J.fromString=function(e){return RB.checkArgument(mr.isString(e),"No valid string was provided"),new J(e)};J.fromObject=function(e){return RB.checkArgument(mr.isObject(e),"No valid argument was provided"),new J(e)};J.prototype._buildFromJSON=function(e){return this._buildFromObject(JSON.parse(e))};J.prototype._buildFromObject=function(e){var t={version:e.network?Fo.integerAsBuffer(bf.get(e.network).xprivkey):e.version,depth:mr.isNumber(e.depth)?h.Buffer.from([e.depth&255]):e.depth,parentFingerPrint:mr.isNumber(e.parentFingerPrint)?Fo.integerAsBuffer(e.parentFingerPrint):e.parentFingerPrint,childIndex:mr.isNumber(e.childIndex)?Fo.integerAsBuffer(e.childIndex):e.childIndex,chainCode:mr.isString(e.chainCode)?h.Buffer.from(e.chainCode,"hex"):e.chainCode,privateKey:mr.isString(e.privateKey)&&Fo.isHexa(e.privateKey)?h.Buffer.from(e.privateKey,"hex"):e.privateKey,checksum:e.checksum?e.checksum.length?e.checksum:Fo.integerAsBuffer(e.checksum):void 0};return this._buildFromBuffers(t)};J.prototype._buildFromSerialized=function(e){var t=X0.decode(e),r={version:t.slice(J.VersionStart,J.VersionEnd),depth:t.slice(J.DepthStart,J.DepthEnd),parentFingerPrint:t.slice(J.ParentFingerPrintStart,J.ParentFingerPrintEnd),childIndex:t.slice(J.ChildIndexStart,J.ChildIndexEnd),chainCode:t.slice(J.ChainCodeStart,J.ChainCodeEnd),privateKey:t.slice(J.PrivateKeyStart,J.PrivateKeyEnd),checksum:t.slice(J.ChecksumStart,J.ChecksumEnd),xprivkey:e};return this._buildFromBuffers(r)};J.prototype._generateRandomly=function(e){return J.fromSeed(qre.getRandomBuffer(64),e)};J.fromSeed=function(e,t){if(Fo.isHexaString(e)&&(e=h.Buffer.from(e,"hex")),!h.Buffer.isBuffer(e))throw new Ho.InvalidEntropyArgument(e);if(e.length<Ure*kB)throw new Ho.InvalidEntropyArgument.NotEnoughEntropy(e);if(e.length>Fre*kB)throw new Ho.InvalidEntropyArgument.TooMuchEntropy(e);var r=F4.sha512hmac(e,J0.Buffer.from("Bitcoin seed"));return new J({network:bf.get(t)||bf.defaultNetwork,depth:0,parentFingerPrint:0,childIndex:0,privateKey:r.slice(0,32),chainCode:r.slice(32,64)})};J.prototype._calcHDPublicKey=function(){if(!this._hdPublicKey){var e=q4();this._hdPublicKey=new e(this)}};J.prototype._buildFromBuffers=function(e){J._validateBufferArguments(e),Fo.defineImmutable(this,{_buffers:e});var t=[e.version,e.depth,e.parentFingerPrint,e.childIndex,e.chainCode,h.Buffer.alloc(1),e.privateKey],r=J0.Buffer.concat(t);if(!e.checksum||!e.checksum.length)e.checksum=X0.checksum(r);else if(e.checksum.toString()!==X0.checksum(r).toString())throw new hl.InvalidB58Checksum(r);var i=bf.get(e.version.readUInt32BE(0)),n;n=X0.encode(J0.Buffer.concat(t)),e.xprivkey=h.Buffer.from(n);var o=new MB(BB.fromBuffer(e.privateKey),i),a=o.toPublicKey(),s=J.ParentFingerPrintSize,u=F4.sha256ripemd160(a.toBuffer()).slice(0,s);return Fo.defineImmutable(this,{xprivkey:n,network:i,depth:e.depth[0],privateKey:o,publicKey:a,fingerPrint:u}),this._hdPublicKey=null,Object.defineProperty(this,"hdPublicKey",{configurable:!1,enumerable:!0,get:function(){return this._calcHDPublicKey(),this._hdPublicKey}}),Object.defineProperty(this,"xpubkey",{configurable:!1,enumerable:!0,get:function(){return this._calcHDPublicKey(),this._hdPublicKey.xpubkey}}),this};J._validateBufferArguments=function(e){var t=function(r,i){var n=e[r];S6(h.Buffer.isBuffer(n),r+" argument is not a buffer"),S6(n.length===i,r+" has not the expected size: found "+n.length+", expected "+i)};t("version",J.VersionSize),t("depth",J.DepthSize),t("parentFingerPrint",J.ParentFingerPrintSize),t("childIndex",J.ChildIndexSize),t("chainCode",J.ChainCodeSize),t("privateKey",J.PrivateKeySize),e.checksum&&e.checksum.length&&t("checksum",J.CheckSumSize)};J.prototype.toString=function(){return this.xprivkey};J.prototype.inspect=function(){return"<HDPrivateKey: "+this.xprivkey+">"};J.prototype.toObject=J.prototype.toJSON=function(){return{network:bf.get(this._buffers.version.readUInt32BE(0),"xprivkey").name,depth:this._buffers.depth[0],fingerPrint:this.fingerPrint.readUInt32BE(0),parentFingerPrint:this._buffers.parentFingerPrint.readUInt32BE(0),childIndex:this._buffers.childIndex.readUInt32BE(0),chainCode:this._buffers.chainCode.toString("hex"),privateKey:this.privateKey.toBuffer().toString("hex"),checksum:this._buffers.checksum.readUInt32BE(0),xprivkey:this.xprivkey}};J.fromBuffer=function(e){return new J(e.toString())};J.fromHex=function(e){return J.fromBuffer(h.Buffer.from(e,"hex"))};J.prototype.toBuffer=function(){return h.Buffer.from(this.toString())};J.prototype.toHex=function(){return this.toBuffer().toString("hex")};J.DefaultDepth=0;J.DefaultFingerprint=0;J.DefaultChildIndex=0;J.Hardened=2147483648;J.MaxIndex=2*J.Hardened;J.RootElementAlias=["m","M","m'","M'"];J.VersionSize=4;J.DepthSize=1;J.ParentFingerPrintSize=4;J.ChildIndexSize=4;J.ChainCodeSize=32;J.PrivateKeySize=32;J.CheckSumSize=4;J.DataLength=78;J.SerializedByteSize=82;J.VersionStart=0;J.VersionEnd=J.VersionStart+J.VersionSize;J.DepthStart=J.VersionEnd;J.DepthEnd=J.DepthStart+J.DepthSize;J.ParentFingerPrintStart=J.DepthEnd;J.ParentFingerPrintEnd=J.ParentFingerPrintStart+J.ParentFingerPrintSize;J.ChildIndexStart=J.ParentFingerPrintEnd;J.ChildIndexEnd=J.ChildIndexStart+J.ChildIndexSize;J.ChainCodeStart=J.ChildIndexEnd;J.ChainCodeEnd=J.ChainCodeStart+J.ChainCodeSize;J.PrivateKeyStart=J.ChainCodeEnd+1;J.PrivateKeyEnd=J.PrivateKeyStart+J.PrivateKeySize;J.ChecksumStart=J.PrivateKeyEnd;J.ChecksumEnd=J.ChecksumStart+J.CheckSumSize;S6(J.ChecksumEnd===J.SerializedByteSize);CB.exports=J});var UB=k((s5e,qB)=>{"use strict";v();var jo=ke(),x6=jo.deps._,Hre=jo.PrivateKey,jre=jo.PublicKey,NB=jo.Address,DB=jo.encoding.BufferWriter,H4=jo.crypto.ECDSA,LB=jo.crypto.Signature,zre=jo.crypto.Hash.sha256sha256,Kre=jo.util.js,dl=jo.util.preconditions,or=function e(t){return this instanceof e?(dl.checkArgument(x6.isString(t)||h.Buffer.isBuffer(t),"First argument should be a string or Buffer"),x6.isString(t)&&(this.messageBuffer=h.Buffer.from(t)),h.Buffer.isBuffer(t)&&(this.messageBuffer=t),this):new e(t)};or.sign=function(e,t){return new or(e).sign(t)};or.verify=function(e,t,r){return new or(e).verify(t,r)};or.MAGIC_BYTES=h.Buffer.from(`Bitcoin Signed Message:
|
|
76
76
|
`);or.prototype.magicHash=function(){var t=DB.varintBufNum(or.MAGIC_BYTES.length),r=DB.varintBufNum(this.messageBuffer.length),i=h.Buffer.concat([t,or.MAGIC_BYTES,r,this.messageBuffer]),n=zre(i);return n};or.prototype._sign=function(t){dl.checkArgument(t instanceof Hre,"First argument should be an instance of PrivateKey");var r=this.magicHash();return H4.signWithCalcI(r,t)};or.prototype.sign=function(t){var r=this._sign(t);return r.toCompact().toString("base64")};or.prototype._verify=function(t,r){dl.checkArgument(t instanceof jre,"First argument should be an instance of PublicKey"),dl.checkArgument(r instanceof LB,"Second argument should be an instance of Signature");var i=this.magicHash(),n=H4.verify(i,r,t);return n||(this.error="The signature was invalid"),n};or.prototype.verify=function(t,r){dl.checkArgument(t),dl.checkArgument(r&&x6.isString(r)),x6.isString(t)&&(t=NB.fromString(t));var i=LB.fromCompact(h.Buffer.from(r,"base64")),n=new H4;n.hashbuf=this.magicHash(),n.sig=i;var o=n.toPublicKey(),a=NB.fromPublicKey(o,t.network);return t.toString()!==a.toString()?(this.error="The signature did not match the message digest",!1):this._verify(o,i)};or.fromString=function(e){return new or(e)};or.fromJSON=function(t){return Kre.isValidJSON(t)&&(t=JSON.parse(t)),or.fromObject(t)};or.prototype.toObject=function(){return{messageHex:this.messageBuffer.toString("hex")}};or.fromObject=function(e){let t=h.Buffer.from(e.messageHex,"hex");return new or(t)};or.prototype.toJSON=function(){return JSON.stringify(this.toObject())};or.prototype.toString=function(){return this.messageBuffer.toString()};or.prototype.inspect=function(){return"<Message: "+this.toString()+">"};qB.exports=or});var jB=k((f5e,HB)=>{v();var FB=ke();FB.Message=UB();HB.exports=FB.Message});var KB=k((zB,j4)=>{v();(function(e){"use strict";for(var t=[null,0,{}],r=10,i=44032,n=4352,o=4449,a=4519,s=19,u=21,c=28,l=u*c,m=s*l,w=function(x,b){this.codepoint=x,this.feature=b},E={},P=[],M=0;M<=255;++M)P[M]=0;function D(x,b,d){var O=E[b];return O||(O=x(b,d),O.feature&&++P[b>>8&255]>r&&(E[b]=O)),O}function L(x,b,d){var O=b&65280,T=w.udata[O]||{},S=T[b];return S?new w(b,S):new w(b,t)}function U(x,b,d){return d?x(b,d):new w(b,null)}function K(x,b,d){var O;if(b<n||n+s<=b&&b<i||i+m<b)return x(b,d);if(n<=b&&b<n+s){var T={},S=(b-n)*u;for(O=0;O<u;++O)T[o+O]=i+c*(O+S);return new w(b,[,,T])}var R=b-i,Y=R%c,X=[];if(Y!==0)X[0]=[i+R-Y,a+Y];else for(X[0]=[n+Math.floor(R/l),o+Math.floor(R%l/c)],X[2]={},O=1;O<c;++O)X[2][a+O]=b+O;return new w(b,X)}function C(x,b,d){return b<60||13311<b&&b<42607?new w(b,t):x(b,d)}var N=[C,D,U,K,L];w.fromCharCode=N.reduceRight(function(x,b){return function(d,O){return b(x,d,O)}},null),w.isHighSurrogate=function(x){return x>=55296&&x<=56319},w.isLowSurrogate=function(x){return x>=56320&&x<=57343},w.prototype.prepFeature=function(){this.feature||(this.feature=w.fromCharCode(this.codepoint,!0).feature)},w.prototype.toString=function(){if(this.codepoint<65536)return String.fromCharCode(this.codepoint);var x=this.codepoint-65536;return String.fromCharCode(Math.floor(x/1024)+55296,x%1024+56320)},w.prototype.getDecomp=function(){return this.prepFeature(),this.feature[0]||null},w.prototype.isCompatibility=function(){return this.prepFeature(),!!this.feature[1]&&this.feature[1]&256},w.prototype.isExclude=function(){return this.prepFeature(),!!this.feature[1]&&this.feature[1]&512},w.prototype.getCanonicalClass=function(){return this.prepFeature(),this.feature[1]?this.feature[1]&255:0},w.prototype.getComposite=function(x){if(this.prepFeature(),!this.feature[2])return null;var b=this.feature[2][x.codepoint];return b?w.fromCharCode(b):null};var F=function(x){this.str=x,this.cursor=0};F.prototype.next=function(){if(this.str&&this.cursor<this.str.length){var x=this.str.charCodeAt(this.cursor++),b;return w.isHighSurrogate(x)&&this.cursor<this.str.length&&w.isLowSurrogate(b=this.str.charCodeAt(this.cursor))&&(x=(x-55296)*1024+(b-56320)+65536,++this.cursor),w.fromCharCode(x)}else return this.str=null,null};var H=function(x,b){this.it=x,this.canonical=b,this.resBuf=[]};H.prototype.next=function(){function x(d,O){var T=O.getDecomp();if(T&&!(d&&O.isCompatibility())){for(var S=[],R=0;R<T.length;++R){var Y=x(d,w.fromCharCode(T[R]));S=S.concat(Y)}return S}else return[O]}if(this.resBuf.length===0){var b=this.it.next();if(!b)return null;this.resBuf=x(this.canonical,b)}return this.resBuf.shift()};var z=function(x){this.it=x,this.resBuf=[]};z.prototype.next=function(){var x;if(this.resBuf.length===0)do{var b=this.it.next();if(!b)break;x=b.getCanonicalClass();var d=this.resBuf.length;if(x!==0)for(;d>0;--d){var O=this.resBuf[d-1],T=O.getCanonicalClass();if(T<=x)break}this.resBuf.splice(d,0,b)}while(x!==0);return this.resBuf.shift()};var V=function(x){this.it=x,this.procBuf=[],this.resBuf=[],this.lastClass=null};V.prototype.next=function(){for(;this.resBuf.length===0;){var x=this.it.next();if(!x){this.resBuf=this.procBuf,this.procBuf=[];break}if(this.procBuf.length===0)this.lastClass=x.getCanonicalClass(),this.procBuf.push(x);else{var b=this.procBuf[0],d=b.getComposite(x),O=x.getCanonicalClass();d&&(this.lastClass<O||this.lastClass===0)?this.procBuf[0]=d:(O===0&&(this.resBuf=this.procBuf,this.procBuf=[]),this.lastClass=O,this.procBuf.push(x))}}return this.resBuf.shift()};var B=function(x,b){switch(x){case"NFD":return new z(new H(new F(b),!0));case"NFKD":return new z(new H(new F(b),!1));case"NFC":return new V(new z(new H(new F(b),!0)));case"NFKC":return new V(new z(new H(new F(b),!1)))}throw x+" is invalid"},g=function(x,b){for(var d=B(x,b),O="",T;T=d.next();)O+=T.toString();return O};function I(x){return g("NFD",x)}function y(x){return g("NFKD",x)}function f(x){return g("NFC",x)}function p(x){return g("NFKC",x)}w.udata={0:{60:[,,{824:8814}],61:[,,{824:8800}],62:[,,{824:8815}],65:[,,{768:192,769:193,770:194,771:195,772:256,774:258,775:550,776:196,777:7842,778:197,780:461,783:512,785:514,803:7840,805:7680,808:260}],66:[,,{775:7682,803:7684,817:7686}],67:[,,{769:262,770:264,775:266,780:268,807:199}],68:[,,{775:7690,780:270,803:7692,807:7696,813:7698,817:7694}],69:[,,{768:200,769:201,770:202,771:7868,772:274,774:276,775:278,776:203,777:7866,780:282,783:516,785:518,803:7864,807:552,808:280,813:7704,816:7706}],70:[,,{775:7710}],71:[,,{769:500,770:284,772:7712,774:286,775:288,780:486,807:290}],72:[,,{770:292,775:7714,776:7718,780:542,803:7716,807:7720,814:7722}],73:[,,{768:204,769:205,770:206,771:296,772:298,774:300,775:304,776:207,777:7880,780:463,783:520,785:522,803:7882,808:302,816:7724}],74:[,,{770:308}],75:[,,{769:7728,780:488,803:7730,807:310,817:7732}],76:[,,{769:313,780:317,803:7734,807:315,813:7740,817:7738}],77:[,,{769:7742,775:7744,803:7746}],78:[,,{768:504,769:323,771:209,775:7748,780:327,803:7750,807:325,813:7754,817:7752}],79:[,,{768:210,769:211,770:212,771:213,772:332,774:334,775:558,776:214,777:7886,779:336,780:465,783:524,785:526,795:416,803:7884,808:490}],80:[,,{769:7764,775:7766}],82:[,,{769:340,775:7768,780:344,783:528,785:530,803:7770,807:342,817:7774}],83:[,,{769:346,770:348,775:7776,780:352,803:7778,806:536,807:350}],84:[,,{775:7786,780:356,803:7788,806:538,807:354,813:7792,817:7790}],85:[,,{768:217,769:218,770:219,771:360,772:362,774:364,776:220,777:7910,778:366,779:368,780:467,783:532,785:534,795:431,803:7908,804:7794,808:370,813:7798,816:7796}],86:[,,{771:7804,803:7806}],87:[,,{768:7808,769:7810,770:372,775:7814,776:7812,803:7816}],88:[,,{775:7818,776:7820}],89:[,,{768:7922,769:221,770:374,771:7928,772:562,775:7822,776:376,777:7926,803:7924}],90:[,,{769:377,770:7824,775:379,780:381,803:7826,817:7828}],97:[,,{768:224,769:225,770:226,771:227,772:257,774:259,775:551,776:228,777:7843,778:229,780:462,783:513,785:515,803:7841,805:7681,808:261}],98:[,,{775:7683,803:7685,817:7687}],99:[,,{769:263,770:265,775:267,780:269,807:231}],100:[,,{775:7691,780:271,803:7693,807:7697,813:7699,817:7695}],101:[,,{768:232,769:233,770:234,771:7869,772:275,774:277,775:279,776:235,777:7867,780:283,783:517,785:519,803:7865,807:553,808:281,813:7705,816:7707}],102:[,,{775:7711}],103:[,,{769:501,770:285,772:7713,774:287,775:289,780:487,807:291}],104:[,,{770:293,775:7715,776:7719,780:543,803:7717,807:7721,814:7723,817:7830}],105:[,,{768:236,769:237,770:238,771:297,772:299,774:301,776:239,777:7881,780:464,783:521,785:523,803:7883,808:303,816:7725}],106:[,,{770:309,780:496}],107:[,,{769:7729,780:489,803:7731,807:311,817:7733}],108:[,,{769:314,780:318,803:7735,807:316,813:7741,817:7739}],109:[,,{769:7743,775:7745,803:7747}],110:[,,{768:505,769:324,771:241,775:7749,780:328,803:7751,807:326,813:7755,817:7753}],111:[,,{768:242,769:243,770:244,771:245,772:333,774:335,775:559,776:246,777:7887,779:337,780:466,783:525,785:527,795:417,803:7885,808:491}],112:[,,{769:7765,775:7767}],114:[,,{769:341,775:7769,780:345,783:529,785:531,803:7771,807:343,817:7775}],115:[,,{769:347,770:349,775:7777,780:353,803:7779,806:537,807:351}],116:[,,{775:7787,776:7831,780:357,803:7789,806:539,807:355,813:7793,817:7791}],117:[,,{768:249,769:250,770:251,771:361,772:363,774:365,776:252,777:7911,778:367,779:369,780:468,783:533,785:535,795:432,803:7909,804:7795,808:371,813:7799,816:7797}],118:[,,{771:7805,803:7807}],119:[,,{768:7809,769:7811,770:373,775:7815,776:7813,778:7832,803:7817}],120:[,,{775:7819,776:7821}],121:[,,{768:7923,769:253,770:375,771:7929,772:563,775:7823,776:255,777:7927,778:7833,803:7925}],122:[,,{769:378,770:7825,775:380,780:382,803:7827,817:7829}],160:[[32],256],168:[[32,776],256,{768:8173,769:901,834:8129}],170:[[97],256],175:[[32,772],256],178:[[50],256],179:[[51],256],180:[[32,769],256],181:[[956],256],184:[[32,807],256],185:[[49],256],186:[[111],256],188:[[49,8260,52],256],189:[[49,8260,50],256],190:[[51,8260,52],256],192:[[65,768]],193:[[65,769]],194:[[65,770],,{768:7846,769:7844,771:7850,777:7848}],195:[[65,771]],196:[[65,776],,{772:478}],197:[[65,778],,{769:506}],198:[,,{769:508,772:482}],199:[[67,807],,{769:7688}],200:[[69,768]],201:[[69,769]],202:[[69,770],,{768:7872,769:7870,771:7876,777:7874}],203:[[69,776]],204:[[73,768]],205:[[73,769]],206:[[73,770]],207:[[73,776],,{769:7726}],209:[[78,771]],210:[[79,768]],211:[[79,769]],212:[[79,770],,{768:7890,769:7888,771:7894,777:7892}],213:[[79,771],,{769:7756,772:556,776:7758}],214:[[79,776],,{772:554}],216:[,,{769:510}],217:[[85,768]],218:[[85,769]],219:[[85,770]],220:[[85,776],,{768:475,769:471,772:469,780:473}],221:[[89,769]],224:[[97,768]],225:[[97,769]],226:[[97,770],,{768:7847,769:7845,771:7851,777:7849}],227:[[97,771]],228:[[97,776],,{772:479}],229:[[97,778],,{769:507}],230:[,,{769:509,772:483}],231:[[99,807],,{769:7689}],232:[[101,768]],233:[[101,769]],234:[[101,770],,{768:7873,769:7871,771:7877,777:7875}],235:[[101,776]],236:[[105,768]],237:[[105,769]],238:[[105,770]],239:[[105,776],,{769:7727}],241:[[110,771]],242:[[111,768]],243:[[111,769]],244:[[111,770],,{768:7891,769:7889,771:7895,777:7893}],245:[[111,771],,{769:7757,772:557,776:7759}],246:[[111,776],,{772:555}],248:[,,{769:511}],249:[[117,768]],250:[[117,769]],251:[[117,770]],252:[[117,776],,{768:476,769:472,772:470,780:474}],253:[[121,769]],255:[[121,776]]},256:{256:[[65,772]],257:[[97,772]],258:[[65,774],,{768:7856,769:7854,771:7860,777:7858}],259:[[97,774],,{768:7857,769:7855,771:7861,777:7859}],260:[[65,808]],261:[[97,808]],262:[[67,769]],263:[[99,769]],264:[[67,770]],265:[[99,770]],266:[[67,775]],267:[[99,775]],268:[[67,780]],269:[[99,780]],270:[[68,780]],271:[[100,780]],274:[[69,772],,{768:7700,769:7702}],275:[[101,772],,{768:7701,769:7703}],276:[[69,774]],277:[[101,774]],278:[[69,775]],279:[[101,775]],280:[[69,808]],281:[[101,808]],282:[[69,780]],283:[[101,780]],284:[[71,770]],285:[[103,770]],286:[[71,774]],287:[[103,774]],288:[[71,775]],289:[[103,775]],290:[[71,807]],291:[[103,807]],292:[[72,770]],293:[[104,770]],296:[[73,771]],297:[[105,771]],298:[[73,772]],299:[[105,772]],300:[[73,774]],301:[[105,774]],302:[[73,808]],303:[[105,808]],304:[[73,775]],306:[[73,74],256],307:[[105,106],256],308:[[74,770]],309:[[106,770]],310:[[75,807]],311:[[107,807]],313:[[76,769]],314:[[108,769]],315:[[76,807]],316:[[108,807]],317:[[76,780]],318:[[108,780]],319:[[76,183],256],320:[[108,183],256],323:[[78,769]],324:[[110,769]],325:[[78,807]],326:[[110,807]],327:[[78,780]],328:[[110,780]],329:[[700,110],256],332:[[79,772],,{768:7760,769:7762}],333:[[111,772],,{768:7761,769:7763}],334:[[79,774]],335:[[111,774]],336:[[79,779]],337:[[111,779]],340:[[82,769]],341:[[114,769]],342:[[82,807]],343:[[114,807]],344:[[82,780]],345:[[114,780]],346:[[83,769],,{775:7780}],347:[[115,769],,{775:7781}],348:[[83,770]],349:[[115,770]],350:[[83,807]],351:[[115,807]],352:[[83,780],,{775:7782}],353:[[115,780],,{775:7783}],354:[[84,807]],355:[[116,807]],356:[[84,780]],357:[[116,780]],360:[[85,771],,{769:7800}],361:[[117,771],,{769:7801}],362:[[85,772],,{776:7802}],363:[[117,772],,{776:7803}],364:[[85,774]],365:[[117,774]],366:[[85,778]],367:[[117,778]],368:[[85,779]],369:[[117,779]],370:[[85,808]],371:[[117,808]],372:[[87,770]],373:[[119,770]],374:[[89,770]],375:[[121,770]],376:[[89,776]],377:[[90,769]],378:[[122,769]],379:[[90,775]],380:[[122,775]],381:[[90,780]],382:[[122,780]],383:[[115],256,{775:7835}],416:[[79,795],,{768:7900,769:7898,771:7904,777:7902,803:7906}],417:[[111,795],,{768:7901,769:7899,771:7905,777:7903,803:7907}],431:[[85,795],,{768:7914,769:7912,771:7918,777:7916,803:7920}],432:[[117,795],,{768:7915,769:7913,771:7919,777:7917,803:7921}],439:[,,{780:494}],452:[[68,381],256],453:[[68,382],256],454:[[100,382],256],455:[[76,74],256],456:[[76,106],256],457:[[108,106],256],458:[[78,74],256],459:[[78,106],256],460:[[110,106],256],461:[[65,780]],462:[[97,780]],463:[[73,780]],464:[[105,780]],465:[[79,780]],466:[[111,780]],467:[[85,780]],468:[[117,780]],469:[[220,772]],470:[[252,772]],471:[[220,769]],472:[[252,769]],473:[[220,780]],474:[[252,780]],475:[[220,768]],476:[[252,768]],478:[[196,772]],479:[[228,772]],480:[[550,772]],481:[[551,772]],482:[[198,772]],483:[[230,772]],486:[[71,780]],487:[[103,780]],488:[[75,780]],489:[[107,780]],490:[[79,808],,{772:492}],491:[[111,808],,{772:493}],492:[[490,772]],493:[[491,772]],494:[[439,780]],495:[[658,780]],496:[[106,780]],497:[[68,90],256],498:[[68,122],256],499:[[100,122],256],500:[[71,769]],501:[[103,769]],504:[[78,768]],505:[[110,768]],506:[[197,769]],507:[[229,769]],508:[[198,769]],509:[[230,769]],510:[[216,769]],511:[[248,769]],66045:[,220]},512:{512:[[65,783]],513:[[97,783]],514:[[65,785]],515:[[97,785]],516:[[69,783]],517:[[101,783]],518:[[69,785]],519:[[101,785]],520:[[73,783]],521:[[105,783]],522:[[73,785]],523:[[105,785]],524:[[79,783]],525:[[111,783]],526:[[79,785]],527:[[111,785]],528:[[82,783]],529:[[114,783]],530:[[82,785]],531:[[114,785]],532:[[85,783]],533:[[117,783]],534:[[85,785]],535:[[117,785]],536:[[83,806]],537:[[115,806]],538:[[84,806]],539:[[116,806]],542:[[72,780]],543:[[104,780]],550:[[65,775],,{772:480}],551:[[97,775],,{772:481}],552:[[69,807],,{774:7708}],553:[[101,807],,{774:7709}],554:[[214,772]],555:[[246,772]],556:[[213,772]],557:[[245,772]],558:[[79,775],,{772:560}],559:[[111,775],,{772:561}],560:[[558,772]],561:[[559,772]],562:[[89,772]],563:[[121,772]],658:[,,{780:495}],688:[[104],256],689:[[614],256],690:[[106],256],691:[[114],256],692:[[633],256],693:[[635],256],694:[[641],256],695:[[119],256],696:[[121],256],728:[[32,774],256],729:[[32,775],256],730:[[32,778],256],731:[[32,808],256],732:[[32,771],256],733:[[32,779],256],736:[[611],256],737:[[108],256],738:[[115],256],739:[[120],256],740:[[661],256],66272:[,220]},768:{768:[,230],769:[,230],770:[,230],771:[,230],772:[,230],773:[,230],774:[,230],775:[,230],776:[,230,{769:836}],777:[,230],778:[,230],779:[,230],780:[,230],781:[,230],782:[,230],783:[,230],784:[,230],785:[,230],786:[,230],787:[,230],788:[,230],789:[,232],790:[,220],791:[,220],792:[,220],793:[,220],794:[,232],795:[,216],796:[,220],797:[,220],798:[,220],799:[,220],800:[,220],801:[,202],802:[,202],803:[,220],804:[,220],805:[,220],806:[,220],807:[,202],808:[,202],809:[,220],810:[,220],811:[,220],812:[,220],813:[,220],814:[,220],815:[,220],816:[,220],817:[,220],818:[,220],819:[,220],820:[,1],821:[,1],822:[,1],823:[,1],824:[,1],825:[,220],826:[,220],827:[,220],828:[,220],829:[,230],830:[,230],831:[,230],832:[[768],230],833:[[769],230],834:[,230],835:[[787],230],836:[[776,769],230],837:[,240],838:[,230],839:[,220],840:[,220],841:[,220],842:[,230],843:[,230],844:[,230],845:[,220],846:[,220],848:[,230],849:[,230],850:[,230],851:[,220],852:[,220],853:[,220],854:[,220],855:[,230],856:[,232],857:[,220],858:[,220],859:[,230],860:[,233],861:[,234],862:[,234],863:[,233],864:[,234],865:[,234],866:[,233],867:[,230],868:[,230],869:[,230],870:[,230],871:[,230],872:[,230],873:[,230],874:[,230],875:[,230],876:[,230],877:[,230],878:[,230],879:[,230],884:[[697]],890:[[32,837],256],894:[[59]],900:[[32,769],256],901:[[168,769]],902:[[913,769]],903:[[183]],904:[[917,769]],905:[[919,769]],906:[[921,769]],908:[[927,769]],910:[[933,769]],911:[[937,769]],912:[[970,769]],913:[,,{768:8122,769:902,772:8121,774:8120,787:7944,788:7945,837:8124}],917:[,,{768:8136,769:904,787:7960,788:7961}],919:[,,{768:8138,769:905,787:7976,788:7977,837:8140}],921:[,,{768:8154,769:906,772:8153,774:8152,776:938,787:7992,788:7993}],927:[,,{768:8184,769:908,787:8008,788:8009}],929:[,,{788:8172}],933:[,,{768:8170,769:910,772:8169,774:8168,776:939,788:8025}],937:[,,{768:8186,769:911,787:8040,788:8041,837:8188}],938:[[921,776]],939:[[933,776]],940:[[945,769],,{837:8116}],941:[[949,769]],942:[[951,769],,{837:8132}],943:[[953,769]],944:[[971,769]],945:[,,{768:8048,769:940,772:8113,774:8112,787:7936,788:7937,834:8118,837:8115}],949:[,,{768:8050,769:941,787:7952,788:7953}],951:[,,{768:8052,769:942,787:7968,788:7969,834:8134,837:8131}],953:[,,{768:8054,769:943,772:8145,774:8144,776:970,787:7984,788:7985,834:8150}],959:[,,{768:8056,769:972,787:8e3,788:8001}],961:[,,{787:8164,788:8165}],965:[,,{768:8058,769:973,772:8161,774:8160,776:971,787:8016,788:8017,834:8166}],969:[,,{768:8060,769:974,787:8032,788:8033,834:8182,837:8179}],970:[[953,776],,{768:8146,769:912,834:8151}],971:[[965,776],,{768:8162,769:944,834:8167}],972:[[959,769]],973:[[965,769]],974:[[969,769],,{837:8180}],976:[[946],256],977:[[952],256],978:[[933],256,{769:979,776:980}],979:[[978,769]],980:[[978,776]],981:[[966],256],982:[[960],256],1008:[[954],256],1009:[[961],256],1010:[[962],256],1012:[[920],256],1013:[[949],256],1017:[[931],256],66422:[,230],66423:[,230],66424:[,230],66425:[,230],66426:[,230]},1024:{1024:[[1045,768]],1025:[[1045,776]],1027:[[1043,769]],1030:[,,{776:1031}],1031:[[1030,776]],1036:[[1050,769]],1037:[[1048,768]],1038:[[1059,774]],1040:[,,{774:1232,776:1234}],1043:[,,{769:1027}],1045:[,,{768:1024,774:1238,776:1025}],1046:[,,{774:1217,776:1244}],1047:[,,{776:1246}],1048:[,,{768:1037,772:1250,774:1049,776:1252}],1049:[[1048,774]],1050:[,,{769:1036}],1054:[,,{776:1254}],1059:[,,{772:1262,774:1038,776:1264,779:1266}],1063:[,,{776:1268}],1067:[,,{776:1272}],1069:[,,{776:1260}],1072:[,,{774:1233,776:1235}],1075:[,,{769:1107}],1077:[,,{768:1104,774:1239,776:1105}],1078:[,,{774:1218,776:1245}],1079:[,,{776:1247}],1080:[,,{768:1117,772:1251,774:1081,776:1253}],1081:[[1080,774]],1082:[,,{769:1116}],1086:[,,{776:1255}],1091:[,,{772:1263,774:1118,776:1265,779:1267}],1095:[,,{776:1269}],1099:[,,{776:1273}],1101:[,,{776:1261}],1104:[[1077,768]],1105:[[1077,776]],1107:[[1075,769]],1110:[,,{776:1111}],1111:[[1110,776]],1116:[[1082,769]],1117:[[1080,768]],1118:[[1091,774]],1140:[,,{783:1142}],1141:[,,{783:1143}],1142:[[1140,783]],1143:[[1141,783]],1155:[,230],1156:[,230],1157:[,230],1158:[,230],1159:[,230],1217:[[1046,774]],1218:[[1078,774]],1232:[[1040,774]],1233:[[1072,774]],1234:[[1040,776]],1235:[[1072,776]],1238:[[1045,774]],1239:[[1077,774]],1240:[,,{776:1242}],1241:[,,{776:1243}],1242:[[1240,776]],1243:[[1241,776]],1244:[[1046,776]],1245:[[1078,776]],1246:[[1047,776]],1247:[[1079,776]],1250:[[1048,772]],1251:[[1080,772]],1252:[[1048,776]],1253:[[1080,776]],1254:[[1054,776]],1255:[[1086,776]],1256:[,,{776:1258}],1257:[,,{776:1259}],1258:[[1256,776]],1259:[[1257,776]],1260:[[1069,776]],1261:[[1101,776]],1262:[[1059,772]],1263:[[1091,772]],1264:[[1059,776]],1265:[[1091,776]],1266:[[1059,779]],1267:[[1091,779]],1268:[[1063,776]],1269:[[1095,776]],1272:[[1067,776]],1273:[[1099,776]]},1280:{1415:[[1381,1410],256],1425:[,220],1426:[,230],1427:[,230],1428:[,230],1429:[,230],1430:[,220],1431:[,230],1432:[,230],1433:[,230],1434:[,222],1435:[,220],1436:[,230],1437:[,230],1438:[,230],1439:[,230],1440:[,230],1441:[,230],1442:[,220],1443:[,220],1444:[,220],1445:[,220],1446:[,220],1447:[,220],1448:[,230],1449:[,230],1450:[,220],1451:[,230],1452:[,230],1453:[,222],1454:[,228],1455:[,230],1456:[,10],1457:[,11],1458:[,12],1459:[,13],1460:[,14],1461:[,15],1462:[,16],1463:[,17],1464:[,18],1465:[,19],1466:[,19],1467:[,20],1468:[,21],1469:[,22],1471:[,23],1473:[,24],1474:[,25],1476:[,230],1477:[,220],1479:[,18]},1536:{1552:[,230],1553:[,230],1554:[,230],1555:[,230],1556:[,230],1557:[,230],1558:[,230],1559:[,230],1560:[,30],1561:[,31],1562:[,32],1570:[[1575,1619]],1571:[[1575,1620]],1572:[[1608,1620]],1573:[[1575,1621]],1574:[[1610,1620]],1575:[,,{1619:1570,1620:1571,1621:1573}],1608:[,,{1620:1572}],1610:[,,{1620:1574}],1611:[,27],1612:[,28],1613:[,29],1614:[,30],1615:[,31],1616:[,32],1617:[,33],1618:[,34],1619:[,230],1620:[,230],1621:[,220],1622:[,220],1623:[,230],1624:[,230],1625:[,230],1626:[,230],1627:[,230],1628:[,220],1629:[,230],1630:[,230],1631:[,220],1648:[,35],1653:[[1575,1652],256],1654:[[1608,1652],256],1655:[[1735,1652],256],1656:[[1610,1652],256],1728:[[1749,1620]],1729:[,,{1620:1730}],1730:[[1729,1620]],1746:[,,{1620:1747}],1747:[[1746,1620]],1749:[,,{1620:1728}],1750:[,230],1751:[,230],1752:[,230],1753:[,230],1754:[,230],1755:[,230],1756:[,230],1759:[,230],1760:[,230],1761:[,230],1762:[,230],1763:[,220],1764:[,230],1767:[,230],1768:[,230],1770:[,220],1771:[,230],1772:[,230],1773:[,220]},1792:{1809:[,36],1840:[,230],1841:[,220],1842:[,230],1843:[,230],1844:[,220],1845:[,230],1846:[,230],1847:[,220],1848:[,220],1849:[,220],1850:[,230],1851:[,220],1852:[,220],1853:[,230],1854:[,220],1855:[,230],1856:[,230],1857:[,230],1858:[,220],1859:[,230],1860:[,220],1861:[,230],1862:[,220],1863:[,230],1864:[,220],1865:[,230],1866:[,230],2027:[,230],2028:[,230],2029:[,230],2030:[,230],2031:[,230],2032:[,230],2033:[,230],2034:[,220],2035:[,230]},2048:{2070:[,230],2071:[,230],2072:[,230],2073:[,230],2075:[,230],2076:[,230],2077:[,230],2078:[,230],2079:[,230],2080:[,230],2081:[,230],2082:[,230],2083:[,230],2085:[,230],2086:[,230],2087:[,230],2089:[,230],2090:[,230],2091:[,230],2092:[,230],2093:[,230],2137:[,220],2138:[,220],2139:[,220],2276:[,230],2277:[,230],2278:[,220],2279:[,230],2280:[,230],2281:[,220],2282:[,230],2283:[,230],2284:[,230],2285:[,220],2286:[,220],2287:[,220],2288:[,27],2289:[,28],2290:[,29],2291:[,230],2292:[,230],2293:[,230],2294:[,220],2295:[,230],2296:[,230],2297:[,220],2298:[,220],2299:[,230],2300:[,230],2301:[,230],2302:[,230],2303:[,230]},2304:{2344:[,,{2364:2345}],2345:[[2344,2364]],2352:[,,{2364:2353}],2353:[[2352,2364]],2355:[,,{2364:2356}],2356:[[2355,2364]],2364:[,7],2381:[,9],2385:[,230],2386:[,220],2387:[,230],2388:[,230],2392:[[2325,2364],512],2393:[[2326,2364],512],2394:[[2327,2364],512],2395:[[2332,2364],512],2396:[[2337,2364],512],2397:[[2338,2364],512],2398:[[2347,2364],512],2399:[[2351,2364],512],2492:[,7],2503:[,,{2494:2507,2519:2508}],2507:[[2503,2494]],2508:[[2503,2519]],2509:[,9],2524:[[2465,2492],512],2525:[[2466,2492],512],2527:[[2479,2492],512]},2560:{2611:[[2610,2620],512],2614:[[2616,2620],512],2620:[,7],2637:[,9],2649:[[2582,2620],512],2650:[[2583,2620],512],2651:[[2588,2620],512],2654:[[2603,2620],512],2748:[,7],2765:[,9],68109:[,220],68111:[,230],68152:[,230],68153:[,1],68154:[,220],68159:[,9],68325:[,230],68326:[,220]},2816:{2876:[,7],2887:[,,{2878:2891,2902:2888,2903:2892}],2888:[[2887,2902]],2891:[[2887,2878]],2892:[[2887,2903]],2893:[,9],2908:[[2849,2876],512],2909:[[2850,2876],512],2962:[,,{3031:2964}],2964:[[2962,3031]],3014:[,,{3006:3018,3031:3020}],3015:[,,{3006:3019}],3018:[[3014,3006]],3019:[[3015,3006]],3020:[[3014,3031]],3021:[,9]},3072:{3142:[,,{3158:3144}],3144:[[3142,3158]],3149:[,9],3157:[,84],3158:[,91],3260:[,7],3263:[,,{3285:3264}],3264:[[3263,3285]],3270:[,,{3266:3274,3285:3271,3286:3272}],3271:[[3270,3285]],3272:[[3270,3286]],3274:[[3270,3266],,{3285:3275}],3275:[[3274,3285]],3277:[,9]},3328:{3398:[,,{3390:3402,3415:3404}],3399:[,,{3390:3403}],3402:[[3398,3390]],3403:[[3399,3390]],3404:[[3398,3415]],3405:[,9],3530:[,9],3545:[,,{3530:3546,3535:3548,3551:3550}],3546:[[3545,3530]],3548:[[3545,3535],,{3530:3549}],3549:[[3548,3530]],3550:[[3545,3551]]},3584:{3635:[[3661,3634],256],3640:[,103],3641:[,103],3642:[,9],3656:[,107],3657:[,107],3658:[,107],3659:[,107],3763:[[3789,3762],256],3768:[,118],3769:[,118],3784:[,122],3785:[,122],3786:[,122],3787:[,122],3804:[[3755,3737],256],3805:[[3755,3745],256]},3840:{3852:[[3851],256],3864:[,220],3865:[,220],3893:[,220],3895:[,220],3897:[,216],3907:[[3906,4023],512],3917:[[3916,4023],512],3922:[[3921,4023],512],3927:[[3926,4023],512],3932:[[3931,4023],512],3945:[[3904,4021],512],3953:[,129],3954:[,130],3955:[[3953,3954],512],3956:[,132],3957:[[3953,3956],512],3958:[[4018,3968],512],3959:[[4018,3969],256],3960:[[4019,3968],512],3961:[[4019,3969],256],3962:[,130],3963:[,130],3964:[,130],3965:[,130],3968:[,130],3969:[[3953,3968],512],3970:[,230],3971:[,230],3972:[,9],3974:[,230],3975:[,230],3987:[[3986,4023],512],3997:[[3996,4023],512],4002:[[4001,4023],512],4007:[[4006,4023],512],4012:[[4011,4023],512],4025:[[3984,4021],512],4038:[,220]},4096:{4133:[,,{4142:4134}],4134:[[4133,4142]],4151:[,7],4153:[,9],4154:[,9],4237:[,220],4348:[[4316],256],69702:[,9],69759:[,9],69785:[,,{69818:69786}],69786:[[69785,69818]],69787:[,,{69818:69788}],69788:[[69787,69818]],69797:[,,{69818:69803}],69803:[[69797,69818]],69817:[,9],69818:[,7]},4352:{69888:[,230],69889:[,230],69890:[,230],69934:[[69937,69927]],69935:[[69938,69927]],69937:[,,{69927:69934}],69938:[,,{69927:69935}],69939:[,9],69940:[,9],70003:[,7],70080:[,9]},4608:{70197:[,9],70198:[,7],70377:[,7],70378:[,9]},4864:{4957:[,230],4958:[,230],4959:[,230],70460:[,7],70471:[,,{70462:70475,70487:70476}],70475:[[70471,70462]],70476:[[70471,70487]],70477:[,9],70502:[,230],70503:[,230],70504:[,230],70505:[,230],70506:[,230],70507:[,230],70508:[,230],70512:[,230],70513:[,230],70514:[,230],70515:[,230],70516:[,230]},5120:{70841:[,,{70832:70844,70842:70843,70845:70846}],70843:[[70841,70842]],70844:[[70841,70832]],70846:[[70841,70845]],70850:[,9],70851:[,7]},5376:{71096:[,,{71087:71098}],71097:[,,{71087:71099}],71098:[[71096,71087]],71099:[[71097,71087]],71103:[,9],71104:[,7]},5632:{71231:[,9],71350:[,9],71351:[,7]},5888:{5908:[,9],5940:[,9],6098:[,9],6109:[,230]},6144:{6313:[,228]},6400:{6457:[,222],6458:[,230],6459:[,220]},6656:{6679:[,230],6680:[,220],6752:[,9],6773:[,230],6774:[,230],6775:[,230],6776:[,230],6777:[,230],6778:[,230],6779:[,230],6780:[,230],6783:[,220],6832:[,230],6833:[,230],6834:[,230],6835:[,230],6836:[,230],6837:[,220],6838:[,220],6839:[,220],6840:[,220],6841:[,220],6842:[,220],6843:[,230],6844:[,230],6845:[,220]},6912:{6917:[,,{6965:6918}],6918:[[6917,6965]],6919:[,,{6965:6920}],6920:[[6919,6965]],6921:[,,{6965:6922}],6922:[[6921,6965]],6923:[,,{6965:6924}],6924:[[6923,6965]],6925:[,,{6965:6926}],6926:[[6925,6965]],6929:[,,{6965:6930}],6930:[[6929,6965]],6964:[,7],6970:[,,{6965:6971}],6971:[[6970,6965]],6972:[,,{6965:6973}],6973:[[6972,6965]],6974:[,,{6965:6976}],6975:[,,{6965:6977}],6976:[[6974,6965]],6977:[[6975,6965]],6978:[,,{6965:6979}],6979:[[6978,6965]],6980:[,9],7019:[,230],7020:[,220],7021:[,230],7022:[,230],7023:[,230],7024:[,230],7025:[,230],7026:[,230],7027:[,230],7082:[,9],7083:[,9],7142:[,7],7154:[,9],7155:[,9]},7168:{7223:[,7],7376:[,230],7377:[,230],7378:[,230],7380:[,1],7381:[,220],7382:[,220],7383:[,220],7384:[,220],7385:[,220],7386:[,230],7387:[,230],7388:[,220],7389:[,220],7390:[,220],7391:[,220],7392:[,230],7394:[,1],7395:[,1],7396:[,1],7397:[,1],7398:[,1],7399:[,1],7400:[,1],7405:[,220],7412:[,230],7416:[,230],7417:[,230]},7424:{7468:[[65],256],7469:[[198],256],7470:[[66],256],7472:[[68],256],7473:[[69],256],7474:[[398],256],7475:[[71],256],7476:[[72],256],7477:[[73],256],7478:[[74],256],7479:[[75],256],7480:[[76],256],7481:[[77],256],7482:[[78],256],7484:[[79],256],7485:[[546],256],7486:[[80],256],7487:[[82],256],7488:[[84],256],7489:[[85],256],7490:[[87],256],7491:[[97],256],7492:[[592],256],7493:[[593],256],7494:[[7426],256],7495:[[98],256],7496:[[100],256],7497:[[101],256],7498:[[601],256],7499:[[603],256],7500:[[604],256],7501:[[103],256],7503:[[107],256],7504:[[109],256],7505:[[331],256],7506:[[111],256],7507:[[596],256],7508:[[7446],256],7509:[[7447],256],7510:[[112],256],7511:[[116],256],7512:[[117],256],7513:[[7453],256],7514:[[623],256],7515:[[118],256],7516:[[7461],256],7517:[[946],256],7518:[[947],256],7519:[[948],256],7520:[[966],256],7521:[[967],256],7522:[[105],256],7523:[[114],256],7524:[[117],256],7525:[[118],256],7526:[[946],256],7527:[[947],256],7528:[[961],256],7529:[[966],256],7530:[[967],256],7544:[[1085],256],7579:[[594],256],7580:[[99],256],7581:[[597],256],7582:[[240],256],7583:[[604],256],7584:[[102],256],7585:[[607],256],7586:[[609],256],7587:[[613],256],7588:[[616],256],7589:[[617],256],7590:[[618],256],7591:[[7547],256],7592:[[669],256],7593:[[621],256],7594:[[7557],256],7595:[[671],256],7596:[[625],256],7597:[[624],256],7598:[[626],256],7599:[[627],256],7600:[[628],256],7601:[[629],256],7602:[[632],256],7603:[[642],256],7604:[[643],256],7605:[[427],256],7606:[[649],256],7607:[[650],256],7608:[[7452],256],7609:[[651],256],7610:[[652],256],7611:[[122],256],7612:[[656],256],7613:[[657],256],7614:[[658],256],7615:[[952],256],7616:[,230],7617:[,230],7618:[,220],7619:[,230],7620:[,230],7621:[,230],7622:[,230],7623:[,230],7624:[,230],7625:[,230],7626:[,220],7627:[,230],7628:[,230],7629:[,234],7630:[,214],7631:[,220],7632:[,202],7633:[,230],7634:[,230],7635:[,230],7636:[,230],7637:[,230],7638:[,230],7639:[,230],7640:[,230],7641:[,230],7642:[,230],7643:[,230],7644:[,230],7645:[,230],7646:[,230],7647:[,230],7648:[,230],7649:[,230],7650:[,230],7651:[,230],7652:[,230],7653:[,230],7654:[,230],7655:[,230],7656:[,230],7657:[,230],7658:[,230],7659:[,230],7660:[,230],7661:[,230],7662:[,230],7663:[,230],7664:[,230],7665:[,230],7666:[,230],7667:[,230],7668:[,230],7669:[,230],7676:[,233],7677:[,220],7678:[,230],7679:[,220]},7680:{7680:[[65,805]],7681:[[97,805]],7682:[[66,775]],7683:[[98,775]],7684:[[66,803]],7685:[[98,803]],7686:[[66,817]],7687:[[98,817]],7688:[[199,769]],7689:[[231,769]],7690:[[68,775]],7691:[[100,775]],7692:[[68,803]],7693:[[100,803]],7694:[[68,817]],7695:[[100,817]],7696:[[68,807]],7697:[[100,807]],7698:[[68,813]],7699:[[100,813]],7700:[[274,768]],7701:[[275,768]],7702:[[274,769]],7703:[[275,769]],7704:[[69,813]],7705:[[101,813]],7706:[[69,816]],7707:[[101,816]],7708:[[552,774]],7709:[[553,774]],7710:[[70,775]],7711:[[102,775]],7712:[[71,772]],7713:[[103,772]],7714:[[72,775]],7715:[[104,775]],7716:[[72,803]],7717:[[104,803]],7718:[[72,776]],7719:[[104,776]],7720:[[72,807]],7721:[[104,807]],7722:[[72,814]],7723:[[104,814]],7724:[[73,816]],7725:[[105,816]],7726:[[207,769]],7727:[[239,769]],7728:[[75,769]],7729:[[107,769]],7730:[[75,803]],7731:[[107,803]],7732:[[75,817]],7733:[[107,817]],7734:[[76,803],,{772:7736}],7735:[[108,803],,{772:7737}],7736:[[7734,772]],7737:[[7735,772]],7738:[[76,817]],7739:[[108,817]],7740:[[76,813]],7741:[[108,813]],7742:[[77,769]],7743:[[109,769]],7744:[[77,775]],7745:[[109,775]],7746:[[77,803]],7747:[[109,803]],7748:[[78,775]],7749:[[110,775]],7750:[[78,803]],7751:[[110,803]],7752:[[78,817]],7753:[[110,817]],7754:[[78,813]],7755:[[110,813]],7756:[[213,769]],7757:[[245,769]],7758:[[213,776]],7759:[[245,776]],7760:[[332,768]],7761:[[333,768]],7762:[[332,769]],7763:[[333,769]],7764:[[80,769]],7765:[[112,769]],7766:[[80,775]],7767:[[112,775]],7768:[[82,775]],7769:[[114,775]],7770:[[82,803],,{772:7772}],7771:[[114,803],,{772:7773}],7772:[[7770,772]],7773:[[7771,772]],7774:[[82,817]],7775:[[114,817]],7776:[[83,775]],7777:[[115,775]],7778:[[83,803],,{775:7784}],7779:[[115,803],,{775:7785}],7780:[[346,775]],7781:[[347,775]],7782:[[352,775]],7783:[[353,775]],7784:[[7778,775]],7785:[[7779,775]],7786:[[84,775]],7787:[[116,775]],7788:[[84,803]],7789:[[116,803]],7790:[[84,817]],7791:[[116,817]],7792:[[84,813]],7793:[[116,813]],7794:[[85,804]],7795:[[117,804]],7796:[[85,816]],7797:[[117,816]],7798:[[85,813]],7799:[[117,813]],7800:[[360,769]],7801:[[361,769]],7802:[[362,776]],7803:[[363,776]],7804:[[86,771]],7805:[[118,771]],7806:[[86,803]],7807:[[118,803]],7808:[[87,768]],7809:[[119,768]],7810:[[87,769]],7811:[[119,769]],7812:[[87,776]],7813:[[119,776]],7814:[[87,775]],7815:[[119,775]],7816:[[87,803]],7817:[[119,803]],7818:[[88,775]],7819:[[120,775]],7820:[[88,776]],7821:[[120,776]],7822:[[89,775]],7823:[[121,775]],7824:[[90,770]],7825:[[122,770]],7826:[[90,803]],7827:[[122,803]],7828:[[90,817]],7829:[[122,817]],7830:[[104,817]],7831:[[116,776]],7832:[[119,778]],7833:[[121,778]],7834:[[97,702],256],7835:[[383,775]],7840:[[65,803],,{770:7852,774:7862}],7841:[[97,803],,{770:7853,774:7863}],7842:[[65,777]],7843:[[97,777]],7844:[[194,769]],7845:[[226,769]],7846:[[194,768]],7847:[[226,768]],7848:[[194,777]],7849:[[226,777]],7850:[[194,771]],7851:[[226,771]],7852:[[7840,770]],7853:[[7841,770]],7854:[[258,769]],7855:[[259,769]],7856:[[258,768]],7857:[[259,768]],7858:[[258,777]],7859:[[259,777]],7860:[[258,771]],7861:[[259,771]],7862:[[7840,774]],7863:[[7841,774]],7864:[[69,803],,{770:7878}],7865:[[101,803],,{770:7879}],7866:[[69,777]],7867:[[101,777]],7868:[[69,771]],7869:[[101,771]],7870:[[202,769]],7871:[[234,769]],7872:[[202,768]],7873:[[234,768]],7874:[[202,777]],7875:[[234,777]],7876:[[202,771]],7877:[[234,771]],7878:[[7864,770]],7879:[[7865,770]],7880:[[73,777]],7881:[[105,777]],7882:[[73,803]],7883:[[105,803]],7884:[[79,803],,{770:7896}],7885:[[111,803],,{770:7897}],7886:[[79,777]],7887:[[111,777]],7888:[[212,769]],7889:[[244,769]],7890:[[212,768]],7891:[[244,768]],7892:[[212,777]],7893:[[244,777]],7894:[[212,771]],7895:[[244,771]],7896:[[7884,770]],7897:[[7885,770]],7898:[[416,769]],7899:[[417,769]],7900:[[416,768]],7901:[[417,768]],7902:[[416,777]],7903:[[417,777]],7904:[[416,771]],7905:[[417,771]],7906:[[416,803]],7907:[[417,803]],7908:[[85,803]],7909:[[117,803]],7910:[[85,777]],7911:[[117,777]],7912:[[431,769]],7913:[[432,769]],7914:[[431,768]],7915:[[432,768]],7916:[[431,777]],7917:[[432,777]],7918:[[431,771]],7919:[[432,771]],7920:[[431,803]],7921:[[432,803]],7922:[[89,768]],7923:[[121,768]],7924:[[89,803]],7925:[[121,803]],7926:[[89,777]],7927:[[121,777]],7928:[[89,771]],7929:[[121,771]]},7936:{7936:[[945,787],,{768:7938,769:7940,834:7942,837:8064}],7937:[[945,788],,{768:7939,769:7941,834:7943,837:8065}],7938:[[7936,768],,{837:8066}],7939:[[7937,768],,{837:8067}],7940:[[7936,769],,{837:8068}],7941:[[7937,769],,{837:8069}],7942:[[7936,834],,{837:8070}],7943:[[7937,834],,{837:8071}],7944:[[913,787],,{768:7946,769:7948,834:7950,837:8072}],7945:[[913,788],,{768:7947,769:7949,834:7951,837:8073}],7946:[[7944,768],,{837:8074}],7947:[[7945,768],,{837:8075}],7948:[[7944,769],,{837:8076}],7949:[[7945,769],,{837:8077}],7950:[[7944,834],,{837:8078}],7951:[[7945,834],,{837:8079}],7952:[[949,787],,{768:7954,769:7956}],7953:[[949,788],,{768:7955,769:7957}],7954:[[7952,768]],7955:[[7953,768]],7956:[[7952,769]],7957:[[7953,769]],7960:[[917,787],,{768:7962,769:7964}],7961:[[917,788],,{768:7963,769:7965}],7962:[[7960,768]],7963:[[7961,768]],7964:[[7960,769]],7965:[[7961,769]],7968:[[951,787],,{768:7970,769:7972,834:7974,837:8080}],7969:[[951,788],,{768:7971,769:7973,834:7975,837:8081}],7970:[[7968,768],,{837:8082}],7971:[[7969,768],,{837:8083}],7972:[[7968,769],,{837:8084}],7973:[[7969,769],,{837:8085}],7974:[[7968,834],,{837:8086}],7975:[[7969,834],,{837:8087}],7976:[[919,787],,{768:7978,769:7980,834:7982,837:8088}],7977:[[919,788],,{768:7979,769:7981,834:7983,837:8089}],7978:[[7976,768],,{837:8090}],7979:[[7977,768],,{837:8091}],7980:[[7976,769],,{837:8092}],7981:[[7977,769],,{837:8093}],7982:[[7976,834],,{837:8094}],7983:[[7977,834],,{837:8095}],7984:[[953,787],,{768:7986,769:7988,834:7990}],7985:[[953,788],,{768:7987,769:7989,834:7991}],7986:[[7984,768]],7987:[[7985,768]],7988:[[7984,769]],7989:[[7985,769]],7990:[[7984,834]],7991:[[7985,834]],7992:[[921,787],,{768:7994,769:7996,834:7998}],7993:[[921,788],,{768:7995,769:7997,834:7999}],7994:[[7992,768]],7995:[[7993,768]],7996:[[7992,769]],7997:[[7993,769]],7998:[[7992,834]],7999:[[7993,834]],8e3:[[959,787],,{768:8002,769:8004}],8001:[[959,788],,{768:8003,769:8005}],8002:[[8e3,768]],8003:[[8001,768]],8004:[[8e3,769]],8005:[[8001,769]],8008:[[927,787],,{768:8010,769:8012}],8009:[[927,788],,{768:8011,769:8013}],8010:[[8008,768]],8011:[[8009,768]],8012:[[8008,769]],8013:[[8009,769]],8016:[[965,787],,{768:8018,769:8020,834:8022}],8017:[[965,788],,{768:8019,769:8021,834:8023}],8018:[[8016,768]],8019:[[8017,768]],8020:[[8016,769]],8021:[[8017,769]],8022:[[8016,834]],8023:[[8017,834]],8025:[[933,788],,{768:8027,769:8029,834:8031}],8027:[[8025,768]],8029:[[8025,769]],8031:[[8025,834]],8032:[[969,787],,{768:8034,769:8036,834:8038,837:8096}],8033:[[969,788],,{768:8035,769:8037,834:8039,837:8097}],8034:[[8032,768],,{837:8098}],8035:[[8033,768],,{837:8099}],8036:[[8032,769],,{837:8100}],8037:[[8033,769],,{837:8101}],8038:[[8032,834],,{837:8102}],8039:[[8033,834],,{837:8103}],8040:[[937,787],,{768:8042,769:8044,834:8046,837:8104}],8041:[[937,788],,{768:8043,769:8045,834:8047,837:8105}],8042:[[8040,768],,{837:8106}],8043:[[8041,768],,{837:8107}],8044:[[8040,769],,{837:8108}],8045:[[8041,769],,{837:8109}],8046:[[8040,834],,{837:8110}],8047:[[8041,834],,{837:8111}],8048:[[945,768],,{837:8114}],8049:[[940]],8050:[[949,768]],8051:[[941]],8052:[[951,768],,{837:8130}],8053:[[942]],8054:[[953,768]],8055:[[943]],8056:[[959,768]],8057:[[972]],8058:[[965,768]],8059:[[973]],8060:[[969,768],,{837:8178}],8061:[[974]],8064:[[7936,837]],8065:[[7937,837]],8066:[[7938,837]],8067:[[7939,837]],8068:[[7940,837]],8069:[[7941,837]],8070:[[7942,837]],8071:[[7943,837]],8072:[[7944,837]],8073:[[7945,837]],8074:[[7946,837]],8075:[[7947,837]],8076:[[7948,837]],8077:[[7949,837]],8078:[[7950,837]],8079:[[7951,837]],8080:[[7968,837]],8081:[[7969,837]],8082:[[7970,837]],8083:[[7971,837]],8084:[[7972,837]],8085:[[7973,837]],8086:[[7974,837]],8087:[[7975,837]],8088:[[7976,837]],8089:[[7977,837]],8090:[[7978,837]],8091:[[7979,837]],8092:[[7980,837]],8093:[[7981,837]],8094:[[7982,837]],8095:[[7983,837]],8096:[[8032,837]],8097:[[8033,837]],8098:[[8034,837]],8099:[[8035,837]],8100:[[8036,837]],8101:[[8037,837]],8102:[[8038,837]],8103:[[8039,837]],8104:[[8040,837]],8105:[[8041,837]],8106:[[8042,837]],8107:[[8043,837]],8108:[[8044,837]],8109:[[8045,837]],8110:[[8046,837]],8111:[[8047,837]],8112:[[945,774]],8113:[[945,772]],8114:[[8048,837]],8115:[[945,837]],8116:[[940,837]],8118:[[945,834],,{837:8119}],8119:[[8118,837]],8120:[[913,774]],8121:[[913,772]],8122:[[913,768]],8123:[[902]],8124:[[913,837]],8125:[[32,787],256],8126:[[953]],8127:[[32,787],256,{768:8141,769:8142,834:8143}],8128:[[32,834],256],8129:[[168,834]],8130:[[8052,837]],8131:[[951,837]],8132:[[942,837]],8134:[[951,834],,{837:8135}],8135:[[8134,837]],8136:[[917,768]],8137:[[904]],8138:[[919,768]],8139:[[905]],8140:[[919,837]],8141:[[8127,768]],8142:[[8127,769]],8143:[[8127,834]],8144:[[953,774]],8145:[[953,772]],8146:[[970,768]],8147:[[912]],8150:[[953,834]],8151:[[970,834]],8152:[[921,774]],8153:[[921,772]],8154:[[921,768]],8155:[[906]],8157:[[8190,768]],8158:[[8190,769]],8159:[[8190,834]],8160:[[965,774]],8161:[[965,772]],8162:[[971,768]],8163:[[944]],8164:[[961,787]],8165:[[961,788]],8166:[[965,834]],8167:[[971,834]],8168:[[933,774]],8169:[[933,772]],8170:[[933,768]],8171:[[910]],8172:[[929,788]],8173:[[168,768]],8174:[[901]],8175:[[96]],8178:[[8060,837]],8179:[[969,837]],8180:[[974,837]],8182:[[969,834],,{837:8183}],8183:[[8182,837]],8184:[[927,768]],8185:[[908]],8186:[[937,768]],8187:[[911]],8188:[[937,837]],8189:[[180]],8190:[[32,788],256,{768:8157,769:8158,834:8159}]},8192:{8192:[[8194]],8193:[[8195]],8194:[[32],256],8195:[[32],256],8196:[[32],256],8197:[[32],256],8198:[[32],256],8199:[[32],256],8200:[[32],256],8201:[[32],256],8202:[[32],256],8209:[[8208],256],8215:[[32,819],256],8228:[[46],256],8229:[[46,46],256],8230:[[46,46,46],256],8239:[[32],256],8243:[[8242,8242],256],8244:[[8242,8242,8242],256],8246:[[8245,8245],256],8247:[[8245,8245,8245],256],8252:[[33,33],256],8254:[[32,773],256],8263:[[63,63],256],8264:[[63,33],256],8265:[[33,63],256],8279:[[8242,8242,8242,8242],256],8287:[[32],256],8304:[[48],256],8305:[[105],256],8308:[[52],256],8309:[[53],256],8310:[[54],256],8311:[[55],256],8312:[[56],256],8313:[[57],256],8314:[[43],256],8315:[[8722],256],8316:[[61],256],8317:[[40],256],8318:[[41],256],8319:[[110],256],8320:[[48],256],8321:[[49],256],8322:[[50],256],8323:[[51],256],8324:[[52],256],8325:[[53],256],8326:[[54],256],8327:[[55],256],8328:[[56],256],8329:[[57],256],8330:[[43],256],8331:[[8722],256],8332:[[61],256],8333:[[40],256],8334:[[41],256],8336:[[97],256],8337:[[101],256],8338:[[111],256],8339:[[120],256],8340:[[601],256],8341:[[104],256],8342:[[107],256],8343:[[108],256],8344:[[109],256],8345:[[110],256],8346:[[112],256],8347:[[115],256],8348:[[116],256],8360:[[82,115],256],8400:[,230],8401:[,230],8402:[,1],8403:[,1],8404:[,230],8405:[,230],8406:[,230],8407:[,230],8408:[,1],8409:[,1],8410:[,1],8411:[,230],8412:[,230],8417:[,230],8421:[,1],8422:[,1],8423:[,230],8424:[,220],8425:[,230],8426:[,1],8427:[,1],8428:[,220],8429:[,220],8430:[,220],8431:[,220],8432:[,230]},8448:{8448:[[97,47,99],256],8449:[[97,47,115],256],8450:[[67],256],8451:[[176,67],256],8453:[[99,47,111],256],8454:[[99,47,117],256],8455:[[400],256],8457:[[176,70],256],8458:[[103],256],8459:[[72],256],8460:[[72],256],8461:[[72],256],8462:[[104],256],8463:[[295],256],8464:[[73],256],8465:[[73],256],8466:[[76],256],8467:[[108],256],8469:[[78],256],8470:[[78,111],256],8473:[[80],256],8474:[[81],256],8475:[[82],256],8476:[[82],256],8477:[[82],256],8480:[[83,77],256],8481:[[84,69,76],256],8482:[[84,77],256],8484:[[90],256],8486:[[937]],8488:[[90],256],8490:[[75]],8491:[[197]],8492:[[66],256],8493:[[67],256],8495:[[101],256],8496:[[69],256],8497:[[70],256],8499:[[77],256],8500:[[111],256],8501:[[1488],256],8502:[[1489],256],8503:[[1490],256],8504:[[1491],256],8505:[[105],256],8507:[[70,65,88],256],8508:[[960],256],8509:[[947],256],8510:[[915],256],8511:[[928],256],8512:[[8721],256],8517:[[68],256],8518:[[100],256],8519:[[101],256],8520:[[105],256],8521:[[106],256],8528:[[49,8260,55],256],8529:[[49,8260,57],256],8530:[[49,8260,49,48],256],8531:[[49,8260,51],256],8532:[[50,8260,51],256],8533:[[49,8260,53],256],8534:[[50,8260,53],256],8535:[[51,8260,53],256],8536:[[52,8260,53],256],8537:[[49,8260,54],256],8538:[[53,8260,54],256],8539:[[49,8260,56],256],8540:[[51,8260,56],256],8541:[[53,8260,56],256],8542:[[55,8260,56],256],8543:[[49,8260],256],8544:[[73],256],8545:[[73,73],256],8546:[[73,73,73],256],8547:[[73,86],256],8548:[[86],256],8549:[[86,73],256],8550:[[86,73,73],256],8551:[[86,73,73,73],256],8552:[[73,88],256],8553:[[88],256],8554:[[88,73],256],8555:[[88,73,73],256],8556:[[76],256],8557:[[67],256],8558:[[68],256],8559:[[77],256],8560:[[105],256],8561:[[105,105],256],8562:[[105,105,105],256],8563:[[105,118],256],8564:[[118],256],8565:[[118,105],256],8566:[[118,105,105],256],8567:[[118,105,105,105],256],8568:[[105,120],256],8569:[[120],256],8570:[[120,105],256],8571:[[120,105,105],256],8572:[[108],256],8573:[[99],256],8574:[[100],256],8575:[[109],256],8585:[[48,8260,51],256],8592:[,,{824:8602}],8594:[,,{824:8603}],8596:[,,{824:8622}],8602:[[8592,824]],8603:[[8594,824]],8622:[[8596,824]],8653:[[8656,824]],8654:[[8660,824]],8655:[[8658,824]],8656:[,,{824:8653}],8658:[,,{824:8655}],8660:[,,{824:8654}]},8704:{8707:[,,{824:8708}],8708:[[8707,824]],8712:[,,{824:8713}],8713:[[8712,824]],8715:[,,{824:8716}],8716:[[8715,824]],8739:[,,{824:8740}],8740:[[8739,824]],8741:[,,{824:8742}],8742:[[8741,824]],8748:[[8747,8747],256],8749:[[8747,8747,8747],256],8751:[[8750,8750],256],8752:[[8750,8750,8750],256],8764:[,,{824:8769}],8769:[[8764,824]],8771:[,,{824:8772}],8772:[[8771,824]],8773:[,,{824:8775}],8775:[[8773,824]],8776:[,,{824:8777}],8777:[[8776,824]],8781:[,,{824:8813}],8800:[[61,824]],8801:[,,{824:8802}],8802:[[8801,824]],8804:[,,{824:8816}],8805:[,,{824:8817}],8813:[[8781,824]],8814:[[60,824]],8815:[[62,824]],8816:[[8804,824]],8817:[[8805,824]],8818:[,,{824:8820}],8819:[,,{824:8821}],8820:[[8818,824]],8821:[[8819,824]],8822:[,,{824:8824}],8823:[,,{824:8825}],8824:[[8822,824]],8825:[[8823,824]],8826:[,,{824:8832}],8827:[,,{824:8833}],8828:[,,{824:8928}],8829:[,,{824:8929}],8832:[[8826,824]],8833:[[8827,824]],8834:[,,{824:8836}],8835:[,,{824:8837}],8836:[[8834,824]],8837:[[8835,824]],8838:[,,{824:8840}],8839:[,,{824:8841}],8840:[[8838,824]],8841:[[8839,824]],8849:[,,{824:8930}],8850:[,,{824:8931}],8866:[,,{824:8876}],8872:[,,{824:8877}],8873:[,,{824:8878}],8875:[,,{824:8879}],8876:[[8866,824]],8877:[[8872,824]],8878:[[8873,824]],8879:[[8875,824]],8882:[,,{824:8938}],8883:[,,{824:8939}],8884:[,,{824:8940}],8885:[,,{824:8941}],8928:[[8828,824]],8929:[[8829,824]],8930:[[8849,824]],8931:[[8850,824]],8938:[[8882,824]],8939:[[8883,824]],8940:[[8884,824]],8941:[[8885,824]]},8960:{9001:[[12296]],9002:[[12297]]},9216:{9312:[[49],256],9313:[[50],256],9314:[[51],256],9315:[[52],256],9316:[[53],256],9317:[[54],256],9318:[[55],256],9319:[[56],256],9320:[[57],256],9321:[[49,48],256],9322:[[49,49],256],9323:[[49,50],256],9324:[[49,51],256],9325:[[49,52],256],9326:[[49,53],256],9327:[[49,54],256],9328:[[49,55],256],9329:[[49,56],256],9330:[[49,57],256],9331:[[50,48],256],9332:[[40,49,41],256],9333:[[40,50,41],256],9334:[[40,51,41],256],9335:[[40,52,41],256],9336:[[40,53,41],256],9337:[[40,54,41],256],9338:[[40,55,41],256],9339:[[40,56,41],256],9340:[[40,57,41],256],9341:[[40,49,48,41],256],9342:[[40,49,49,41],256],9343:[[40,49,50,41],256],9344:[[40,49,51,41],256],9345:[[40,49,52,41],256],9346:[[40,49,53,41],256],9347:[[40,49,54,41],256],9348:[[40,49,55,41],256],9349:[[40,49,56,41],256],9350:[[40,49,57,41],256],9351:[[40,50,48,41],256],9352:[[49,46],256],9353:[[50,46],256],9354:[[51,46],256],9355:[[52,46],256],9356:[[53,46],256],9357:[[54,46],256],9358:[[55,46],256],9359:[[56,46],256],9360:[[57,46],256],9361:[[49,48,46],256],9362:[[49,49,46],256],9363:[[49,50,46],256],9364:[[49,51,46],256],9365:[[49,52,46],256],9366:[[49,53,46],256],9367:[[49,54,46],256],9368:[[49,55,46],256],9369:[[49,56,46],256],9370:[[49,57,46],256],9371:[[50,48,46],256],9372:[[40,97,41],256],9373:[[40,98,41],256],9374:[[40,99,41],256],9375:[[40,100,41],256],9376:[[40,101,41],256],9377:[[40,102,41],256],9378:[[40,103,41],256],9379:[[40,104,41],256],9380:[[40,105,41],256],9381:[[40,106,41],256],9382:[[40,107,41],256],9383:[[40,108,41],256],9384:[[40,109,41],256],9385:[[40,110,41],256],9386:[[40,111,41],256],9387:[[40,112,41],256],9388:[[40,113,41],256],9389:[[40,114,41],256],9390:[[40,115,41],256],9391:[[40,116,41],256],9392:[[40,117,41],256],9393:[[40,118,41],256],9394:[[40,119,41],256],9395:[[40,120,41],256],9396:[[40,121,41],256],9397:[[40,122,41],256],9398:[[65],256],9399:[[66],256],9400:[[67],256],9401:[[68],256],9402:[[69],256],9403:[[70],256],9404:[[71],256],9405:[[72],256],9406:[[73],256],9407:[[74],256],9408:[[75],256],9409:[[76],256],9410:[[77],256],9411:[[78],256],9412:[[79],256],9413:[[80],256],9414:[[81],256],9415:[[82],256],9416:[[83],256],9417:[[84],256],9418:[[85],256],9419:[[86],256],9420:[[87],256],9421:[[88],256],9422:[[89],256],9423:[[90],256],9424:[[97],256],9425:[[98],256],9426:[[99],256],9427:[[100],256],9428:[[101],256],9429:[[102],256],9430:[[103],256],9431:[[104],256],9432:[[105],256],9433:[[106],256],9434:[[107],256],9435:[[108],256],9436:[[109],256],9437:[[110],256],9438:[[111],256],9439:[[112],256],9440:[[113],256],9441:[[114],256],9442:[[115],256],9443:[[116],256],9444:[[117],256],9445:[[118],256],9446:[[119],256],9447:[[120],256],9448:[[121],256],9449:[[122],256],9450:[[48],256]},10752:{10764:[[8747,8747,8747,8747],256],10868:[[58,58,61],256],10869:[[61,61],256],10870:[[61,61,61],256],10972:[[10973,824],512]},11264:{11388:[[106],256],11389:[[86],256],11503:[,230],11504:[,230],11505:[,230]},11520:{11631:[[11617],256],11647:[,9],11744:[,230],11745:[,230],11746:[,230],11747:[,230],11748:[,230],11749:[,230],11750:[,230],11751:[,230],11752:[,230],11753:[,230],11754:[,230],11755:[,230],11756:[,230],11757:[,230],11758:[,230],11759:[,230],11760:[,230],11761:[,230],11762:[,230],11763:[,230],11764:[,230],11765:[,230],11766:[,230],11767:[,230],11768:[,230],11769:[,230],11770:[,230],11771:[,230],11772:[,230],11773:[,230],11774:[,230],11775:[,230]},11776:{11935:[[27597],256],12019:[[40863],256]},12032:{12032:[[19968],256],12033:[[20008],256],12034:[[20022],256],12035:[[20031],256],12036:[[20057],256],12037:[[20101],256],12038:[[20108],256],12039:[[20128],256],12040:[[20154],256],12041:[[20799],256],12042:[[20837],256],12043:[[20843],256],12044:[[20866],256],12045:[[20886],256],12046:[[20907],256],12047:[[20960],256],12048:[[20981],256],12049:[[20992],256],12050:[[21147],256],12051:[[21241],256],12052:[[21269],256],12053:[[21274],256],12054:[[21304],256],12055:[[21313],256],12056:[[21340],256],12057:[[21353],256],12058:[[21378],256],12059:[[21430],256],12060:[[21448],256],12061:[[21475],256],12062:[[22231],256],12063:[[22303],256],12064:[[22763],256],12065:[[22786],256],12066:[[22794],256],12067:[[22805],256],12068:[[22823],256],12069:[[22899],256],12070:[[23376],256],12071:[[23424],256],12072:[[23544],256],12073:[[23567],256],12074:[[23586],256],12075:[[23608],256],12076:[[23662],256],12077:[[23665],256],12078:[[24027],256],12079:[[24037],256],12080:[[24049],256],12081:[[24062],256],12082:[[24178],256],12083:[[24186],256],12084:[[24191],256],12085:[[24308],256],12086:[[24318],256],12087:[[24331],256],12088:[[24339],256],12089:[[24400],256],12090:[[24417],256],12091:[[24435],256],12092:[[24515],256],12093:[[25096],256],12094:[[25142],256],12095:[[25163],256],12096:[[25903],256],12097:[[25908],256],12098:[[25991],256],12099:[[26007],256],12100:[[26020],256],12101:[[26041],256],12102:[[26080],256],12103:[[26085],256],12104:[[26352],256],12105:[[26376],256],12106:[[26408],256],12107:[[27424],256],12108:[[27490],256],12109:[[27513],256],12110:[[27571],256],12111:[[27595],256],12112:[[27604],256],12113:[[27611],256],12114:[[27663],256],12115:[[27668],256],12116:[[27700],256],12117:[[28779],256],12118:[[29226],256],12119:[[29238],256],12120:[[29243],256],12121:[[29247],256],12122:[[29255],256],12123:[[29273],256],12124:[[29275],256],12125:[[29356],256],12126:[[29572],256],12127:[[29577],256],12128:[[29916],256],12129:[[29926],256],12130:[[29976],256],12131:[[29983],256],12132:[[29992],256],12133:[[3e4],256],12134:[[30091],256],12135:[[30098],256],12136:[[30326],256],12137:[[30333],256],12138:[[30382],256],12139:[[30399],256],12140:[[30446],256],12141:[[30683],256],12142:[[30690],256],12143:[[30707],256],12144:[[31034],256],12145:[[31160],256],12146:[[31166],256],12147:[[31348],256],12148:[[31435],256],12149:[[31481],256],12150:[[31859],256],12151:[[31992],256],12152:[[32566],256],12153:[[32593],256],12154:[[32650],256],12155:[[32701],256],12156:[[32769],256],12157:[[32780],256],12158:[[32786],256],12159:[[32819],256],12160:[[32895],256],12161:[[32905],256],12162:[[33251],256],12163:[[33258],256],12164:[[33267],256],12165:[[33276],256],12166:[[33292],256],12167:[[33307],256],12168:[[33311],256],12169:[[33390],256],12170:[[33394],256],12171:[[33400],256],12172:[[34381],256],12173:[[34411],256],12174:[[34880],256],12175:[[34892],256],12176:[[34915],256],12177:[[35198],256],12178:[[35211],256],12179:[[35282],256],12180:[[35328],256],12181:[[35895],256],12182:[[35910],256],12183:[[35925],256],12184:[[35960],256],12185:[[35997],256],12186:[[36196],256],12187:[[36208],256],12188:[[36275],256],12189:[[36523],256],12190:[[36554],256],12191:[[36763],256],12192:[[36784],256],12193:[[36789],256],12194:[[37009],256],12195:[[37193],256],12196:[[37318],256],12197:[[37324],256],12198:[[37329],256],12199:[[38263],256],12200:[[38272],256],12201:[[38428],256],12202:[[38582],256],12203:[[38585],256],12204:[[38632],256],12205:[[38737],256],12206:[[38750],256],12207:[[38754],256],12208:[[38761],256],12209:[[38859],256],12210:[[38893],256],12211:[[38899],256],12212:[[38913],256],12213:[[39080],256],12214:[[39131],256],12215:[[39135],256],12216:[[39318],256],12217:[[39321],256],12218:[[39340],256],12219:[[39592],256],12220:[[39640],256],12221:[[39647],256],12222:[[39717],256],12223:[[39727],256],12224:[[39730],256],12225:[[39740],256],12226:[[39770],256],12227:[[40165],256],12228:[[40565],256],12229:[[40575],256],12230:[[40613],256],12231:[[40635],256],12232:[[40643],256],12233:[[40653],256],12234:[[40657],256],12235:[[40697],256],12236:[[40701],256],12237:[[40718],256],12238:[[40723],256],12239:[[40736],256],12240:[[40763],256],12241:[[40778],256],12242:[[40786],256],12243:[[40845],256],12244:[[40860],256],12245:[[40864],256]},12288:{12288:[[32],256],12330:[,218],12331:[,228],12332:[,232],12333:[,222],12334:[,224],12335:[,224],12342:[[12306],256],12344:[[21313],256],12345:[[21316],256],12346:[[21317],256],12358:[,,{12441:12436}],12363:[,,{12441:12364}],12364:[[12363,12441]],12365:[,,{12441:12366}],12366:[[12365,12441]],12367:[,,{12441:12368}],12368:[[12367,12441]],12369:[,,{12441:12370}],12370:[[12369,12441]],12371:[,,{12441:12372}],12372:[[12371,12441]],12373:[,,{12441:12374}],12374:[[12373,12441]],12375:[,,{12441:12376}],12376:[[12375,12441]],12377:[,,{12441:12378}],12378:[[12377,12441]],12379:[,,{12441:12380}],12380:[[12379,12441]],12381:[,,{12441:12382}],12382:[[12381,12441]],12383:[,,{12441:12384}],12384:[[12383,12441]],12385:[,,{12441:12386}],12386:[[12385,12441]],12388:[,,{12441:12389}],12389:[[12388,12441]],12390:[,,{12441:12391}],12391:[[12390,12441]],12392:[,,{12441:12393}],12393:[[12392,12441]],12399:[,,{12441:12400,12442:12401}],12400:[[12399,12441]],12401:[[12399,12442]],12402:[,,{12441:12403,12442:12404}],12403:[[12402,12441]],12404:[[12402,12442]],12405:[,,{12441:12406,12442:12407}],12406:[[12405,12441]],12407:[[12405,12442]],12408:[,,{12441:12409,12442:12410}],12409:[[12408,12441]],12410:[[12408,12442]],12411:[,,{12441:12412,12442:12413}],12412:[[12411,12441]],12413:[[12411,12442]],12436:[[12358,12441]],12441:[,8],12442:[,8],12443:[[32,12441],256],12444:[[32,12442],256],12445:[,,{12441:12446}],12446:[[12445,12441]],12447:[[12424,12426],256],12454:[,,{12441:12532}],12459:[,,{12441:12460}],12460:[[12459,12441]],12461:[,,{12441:12462}],12462:[[12461,12441]],12463:[,,{12441:12464}],12464:[[12463,12441]],12465:[,,{12441:12466}],12466:[[12465,12441]],12467:[,,{12441:12468}],12468:[[12467,12441]],12469:[,,{12441:12470}],12470:[[12469,12441]],12471:[,,{12441:12472}],12472:[[12471,12441]],12473:[,,{12441:12474}],12474:[[12473,12441]],12475:[,,{12441:12476}],12476:[[12475,12441]],12477:[,,{12441:12478}],12478:[[12477,12441]],12479:[,,{12441:12480}],12480:[[12479,12441]],12481:[,,{12441:12482}],12482:[[12481,12441]],12484:[,,{12441:12485}],12485:[[12484,12441]],12486:[,,{12441:12487}],12487:[[12486,12441]],12488:[,,{12441:12489}],12489:[[12488,12441]],12495:[,,{12441:12496,12442:12497}],12496:[[12495,12441]],12497:[[12495,12442]],12498:[,,{12441:12499,12442:12500}],12499:[[12498,12441]],12500:[[12498,12442]],12501:[,,{12441:12502,12442:12503}],12502:[[12501,12441]],12503:[[12501,12442]],12504:[,,{12441:12505,12442:12506}],12505:[[12504,12441]],12506:[[12504,12442]],12507:[,,{12441:12508,12442:12509}],12508:[[12507,12441]],12509:[[12507,12442]],12527:[,,{12441:12535}],12528:[,,{12441:12536}],12529:[,,{12441:12537}],12530:[,,{12441:12538}],12532:[[12454,12441]],12535:[[12527,12441]],12536:[[12528,12441]],12537:[[12529,12441]],12538:[[12530,12441]],12541:[,,{12441:12542}],12542:[[12541,12441]],12543:[[12467,12488],256]},12544:{12593:[[4352],256],12594:[[4353],256],12595:[[4522],256],12596:[[4354],256],12597:[[4524],256],12598:[[4525],256],12599:[[4355],256],12600:[[4356],256],12601:[[4357],256],12602:[[4528],256],12603:[[4529],256],12604:[[4530],256],12605:[[4531],256],12606:[[4532],256],12607:[[4533],256],12608:[[4378],256],12609:[[4358],256],12610:[[4359],256],12611:[[4360],256],12612:[[4385],256],12613:[[4361],256],12614:[[4362],256],12615:[[4363],256],12616:[[4364],256],12617:[[4365],256],12618:[[4366],256],12619:[[4367],256],12620:[[4368],256],12621:[[4369],256],12622:[[4370],256],12623:[[4449],256],12624:[[4450],256],12625:[[4451],256],12626:[[4452],256],12627:[[4453],256],12628:[[4454],256],12629:[[4455],256],12630:[[4456],256],12631:[[4457],256],12632:[[4458],256],12633:[[4459],256],12634:[[4460],256],12635:[[4461],256],12636:[[4462],256],12637:[[4463],256],12638:[[4464],256],12639:[[4465],256],12640:[[4466],256],12641:[[4467],256],12642:[[4468],256],12643:[[4469],256],12644:[[4448],256],12645:[[4372],256],12646:[[4373],256],12647:[[4551],256],12648:[[4552],256],12649:[[4556],256],12650:[[4558],256],12651:[[4563],256],12652:[[4567],256],12653:[[4569],256],12654:[[4380],256],12655:[[4573],256],12656:[[4575],256],12657:[[4381],256],12658:[[4382],256],12659:[[4384],256],12660:[[4386],256],12661:[[4387],256],12662:[[4391],256],12663:[[4393],256],12664:[[4395],256],12665:[[4396],256],12666:[[4397],256],12667:[[4398],256],12668:[[4399],256],12669:[[4402],256],12670:[[4406],256],12671:[[4416],256],12672:[[4423],256],12673:[[4428],256],12674:[[4593],256],12675:[[4594],256],12676:[[4439],256],12677:[[4440],256],12678:[[4441],256],12679:[[4484],256],12680:[[4485],256],12681:[[4488],256],12682:[[4497],256],12683:[[4498],256],12684:[[4500],256],12685:[[4510],256],12686:[[4513],256],12690:[[19968],256],12691:[[20108],256],12692:[[19977],256],12693:[[22235],256],12694:[[19978],256],12695:[[20013],256],12696:[[19979],256],12697:[[30002],256],12698:[[20057],256],12699:[[19993],256],12700:[[19969],256],12701:[[22825],256],12702:[[22320],256],12703:[[20154],256]},12800:{12800:[[40,4352,41],256],12801:[[40,4354,41],256],12802:[[40,4355,41],256],12803:[[40,4357,41],256],12804:[[40,4358,41],256],12805:[[40,4359,41],256],12806:[[40,4361,41],256],12807:[[40,4363,41],256],12808:[[40,4364,41],256],12809:[[40,4366,41],256],12810:[[40,4367,41],256],12811:[[40,4368,41],256],12812:[[40,4369,41],256],12813:[[40,4370,41],256],12814:[[40,4352,4449,41],256],12815:[[40,4354,4449,41],256],12816:[[40,4355,4449,41],256],12817:[[40,4357,4449,41],256],12818:[[40,4358,4449,41],256],12819:[[40,4359,4449,41],256],12820:[[40,4361,4449,41],256],12821:[[40,4363,4449,41],256],12822:[[40,4364,4449,41],256],12823:[[40,4366,4449,41],256],12824:[[40,4367,4449,41],256],12825:[[40,4368,4449,41],256],12826:[[40,4369,4449,41],256],12827:[[40,4370,4449,41],256],12828:[[40,4364,4462,41],256],12829:[[40,4363,4457,4364,4453,4523,41],256],12830:[[40,4363,4457,4370,4462,41],256],12832:[[40,19968,41],256],12833:[[40,20108,41],256],12834:[[40,19977,41],256],12835:[[40,22235,41],256],12836:[[40,20116,41],256],12837:[[40,20845,41],256],12838:[[40,19971,41],256],12839:[[40,20843,41],256],12840:[[40,20061,41],256],12841:[[40,21313,41],256],12842:[[40,26376,41],256],12843:[[40,28779,41],256],12844:[[40,27700,41],256],12845:[[40,26408,41],256],12846:[[40,37329,41],256],12847:[[40,22303,41],256],12848:[[40,26085,41],256],12849:[[40,26666,41],256],12850:[[40,26377,41],256],12851:[[40,31038,41],256],12852:[[40,21517,41],256],12853:[[40,29305,41],256],12854:[[40,36001,41],256],12855:[[40,31069,41],256],12856:[[40,21172,41],256],12857:[[40,20195,41],256],12858:[[40,21628,41],256],12859:[[40,23398,41],256],12860:[[40,30435,41],256],12861:[[40,20225,41],256],12862:[[40,36039,41],256],12863:[[40,21332,41],256],12864:[[40,31085,41],256],12865:[[40,20241,41],256],12866:[[40,33258,41],256],12867:[[40,33267,41],256],12868:[[21839],256],12869:[[24188],256],12870:[[25991],256],12871:[[31631],256],12880:[[80,84,69],256],12881:[[50,49],256],12882:[[50,50],256],12883:[[50,51],256],12884:[[50,52],256],12885:[[50,53],256],12886:[[50,54],256],12887:[[50,55],256],12888:[[50,56],256],12889:[[50,57],256],12890:[[51,48],256],12891:[[51,49],256],12892:[[51,50],256],12893:[[51,51],256],12894:[[51,52],256],12895:[[51,53],256],12896:[[4352],256],12897:[[4354],256],12898:[[4355],256],12899:[[4357],256],12900:[[4358],256],12901:[[4359],256],12902:[[4361],256],12903:[[4363],256],12904:[[4364],256],12905:[[4366],256],12906:[[4367],256],12907:[[4368],256],12908:[[4369],256],12909:[[4370],256],12910:[[4352,4449],256],12911:[[4354,4449],256],12912:[[4355,4449],256],12913:[[4357,4449],256],12914:[[4358,4449],256],12915:[[4359,4449],256],12916:[[4361,4449],256],12917:[[4363,4449],256],12918:[[4364,4449],256],12919:[[4366,4449],256],12920:[[4367,4449],256],12921:[[4368,4449],256],12922:[[4369,4449],256],12923:[[4370,4449],256],12924:[[4366,4449,4535,4352,4457],256],12925:[[4364,4462,4363,4468],256],12926:[[4363,4462],256],12928:[[19968],256],12929:[[20108],256],12930:[[19977],256],12931:[[22235],256],12932:[[20116],256],12933:[[20845],256],12934:[[19971],256],12935:[[20843],256],12936:[[20061],256],12937:[[21313],256],12938:[[26376],256],12939:[[28779],256],12940:[[27700],256],12941:[[26408],256],12942:[[37329],256],12943:[[22303],256],12944:[[26085],256],12945:[[26666],256],12946:[[26377],256],12947:[[31038],256],12948:[[21517],256],12949:[[29305],256],12950:[[36001],256],12951:[[31069],256],12952:[[21172],256],12953:[[31192],256],12954:[[30007],256],12955:[[22899],256],12956:[[36969],256],12957:[[20778],256],12958:[[21360],256],12959:[[27880],256],12960:[[38917],256],12961:[[20241],256],12962:[[20889],256],12963:[[27491],256],12964:[[19978],256],12965:[[20013],256],12966:[[19979],256],12967:[[24038],256],12968:[[21491],256],12969:[[21307],256],12970:[[23447],256],12971:[[23398],256],12972:[[30435],256],12973:[[20225],256],12974:[[36039],256],12975:[[21332],256],12976:[[22812],256],12977:[[51,54],256],12978:[[51,55],256],12979:[[51,56],256],12980:[[51,57],256],12981:[[52,48],256],12982:[[52,49],256],12983:[[52,50],256],12984:[[52,51],256],12985:[[52,52],256],12986:[[52,53],256],12987:[[52,54],256],12988:[[52,55],256],12989:[[52,56],256],12990:[[52,57],256],12991:[[53,48],256],12992:[[49,26376],256],12993:[[50,26376],256],12994:[[51,26376],256],12995:[[52,26376],256],12996:[[53,26376],256],12997:[[54,26376],256],12998:[[55,26376],256],12999:[[56,26376],256],13e3:[[57,26376],256],13001:[[49,48,26376],256],13002:[[49,49,26376],256],13003:[[49,50,26376],256],13004:[[72,103],256],13005:[[101,114,103],256],13006:[[101,86],256],13007:[[76,84,68],256],13008:[[12450],256],13009:[[12452],256],13010:[[12454],256],13011:[[12456],256],13012:[[12458],256],13013:[[12459],256],13014:[[12461],256],13015:[[12463],256],13016:[[12465],256],13017:[[12467],256],13018:[[12469],256],13019:[[12471],256],13020:[[12473],256],13021:[[12475],256],13022:[[12477],256],13023:[[12479],256],13024:[[12481],256],13025:[[12484],256],13026:[[12486],256],13027:[[12488],256],13028:[[12490],256],13029:[[12491],256],13030:[[12492],256],13031:[[12493],256],13032:[[12494],256],13033:[[12495],256],13034:[[12498],256],13035:[[12501],256],13036:[[12504],256],13037:[[12507],256],13038:[[12510],256],13039:[[12511],256],13040:[[12512],256],13041:[[12513],256],13042:[[12514],256],13043:[[12516],256],13044:[[12518],256],13045:[[12520],256],13046:[[12521],256],13047:[[12522],256],13048:[[12523],256],13049:[[12524],256],13050:[[12525],256],13051:[[12527],256],13052:[[12528],256],13053:[[12529],256],13054:[[12530],256]},13056:{13056:[[12450,12497,12540,12488],256],13057:[[12450,12523,12501,12449],256],13058:[[12450,12531,12506,12450],256],13059:[[12450,12540,12523],256],13060:[[12452,12491,12531,12464],256],13061:[[12452,12531,12481],256],13062:[[12454,12457,12531],256],13063:[[12456,12473,12463,12540,12489],256],13064:[[12456,12540,12459,12540],256],13065:[[12458,12531,12473],256],13066:[[12458,12540,12512],256],13067:[[12459,12452,12522],256],13068:[[12459,12521,12483,12488],256],13069:[[12459,12525,12522,12540],256],13070:[[12460,12525,12531],256],13071:[[12460,12531,12510],256],13072:[[12462,12460],256],13073:[[12462,12491,12540],256],13074:[[12461,12517,12522,12540],256],13075:[[12462,12523,12480,12540],256],13076:[[12461,12525],256],13077:[[12461,12525,12464,12521,12512],256],13078:[[12461,12525,12513,12540,12488,12523],256],13079:[[12461,12525,12527,12483,12488],256],13080:[[12464,12521,12512],256],13081:[[12464,12521,12512,12488,12531],256],13082:[[12463,12523,12476,12452,12525],256],13083:[[12463,12525,12540,12493],256],13084:[[12465,12540,12473],256],13085:[[12467,12523,12490],256],13086:[[12467,12540,12509],256],13087:[[12469,12452,12463,12523],256],13088:[[12469,12531,12481,12540,12512],256],13089:[[12471,12522,12531,12464],256],13090:[[12475,12531,12481],256],13091:[[12475,12531,12488],256],13092:[[12480,12540,12473],256],13093:[[12487,12471],256],13094:[[12489,12523],256],13095:[[12488,12531],256],13096:[[12490,12494],256],13097:[[12494,12483,12488],256],13098:[[12495,12452,12484],256],13099:[[12497,12540,12475,12531,12488],256],13100:[[12497,12540,12484],256],13101:[[12496,12540,12524,12523],256],13102:[[12500,12450,12473,12488,12523],256],13103:[[12500,12463,12523],256],13104:[[12500,12467],256],13105:[[12499,12523],256],13106:[[12501,12449,12521,12483,12489],256],13107:[[12501,12451,12540,12488],256],13108:[[12502,12483,12471,12455,12523],256],13109:[[12501,12521,12531],256],13110:[[12504,12463,12479,12540,12523],256],13111:[[12506,12477],256],13112:[[12506,12491,12498],256],13113:[[12504,12523,12484],256],13114:[[12506,12531,12473],256],13115:[[12506,12540,12472],256],13116:[[12505,12540,12479],256],13117:[[12509,12452,12531,12488],256],13118:[[12508,12523,12488],256],13119:[[12507,12531],256],13120:[[12509,12531,12489],256],13121:[[12507,12540,12523],256],13122:[[12507,12540,12531],256],13123:[[12510,12452,12463,12525],256],13124:[[12510,12452,12523],256],13125:[[12510,12483,12495],256],13126:[[12510,12523,12463],256],13127:[[12510,12531,12471,12519,12531],256],13128:[[12511,12463,12525,12531],256],13129:[[12511,12522],256],13130:[[12511,12522,12496,12540,12523],256],13131:[[12513,12460],256],13132:[[12513,12460,12488,12531],256],13133:[[12513,12540,12488,12523],256],13134:[[12516,12540,12489],256],13135:[[12516,12540,12523],256],13136:[[12518,12450,12531],256],13137:[[12522,12483,12488,12523],256],13138:[[12522,12521],256],13139:[[12523,12500,12540],256],13140:[[12523,12540,12502,12523],256],13141:[[12524,12512],256],13142:[[12524,12531,12488,12466,12531],256],13143:[[12527,12483,12488],256],13144:[[48,28857],256],13145:[[49,28857],256],13146:[[50,28857],256],13147:[[51,28857],256],13148:[[52,28857],256],13149:[[53,28857],256],13150:[[54,28857],256],13151:[[55,28857],256],13152:[[56,28857],256],13153:[[57,28857],256],13154:[[49,48,28857],256],13155:[[49,49,28857],256],13156:[[49,50,28857],256],13157:[[49,51,28857],256],13158:[[49,52,28857],256],13159:[[49,53,28857],256],13160:[[49,54,28857],256],13161:[[49,55,28857],256],13162:[[49,56,28857],256],13163:[[49,57,28857],256],13164:[[50,48,28857],256],13165:[[50,49,28857],256],13166:[[50,50,28857],256],13167:[[50,51,28857],256],13168:[[50,52,28857],256],13169:[[104,80,97],256],13170:[[100,97],256],13171:[[65,85],256],13172:[[98,97,114],256],13173:[[111,86],256],13174:[[112,99],256],13175:[[100,109],256],13176:[[100,109,178],256],13177:[[100,109,179],256],13178:[[73,85],256],13179:[[24179,25104],256],13180:[[26157,21644],256],13181:[[22823,27491],256],13182:[[26126,27835],256],13183:[[26666,24335,20250,31038],256],13184:[[112,65],256],13185:[[110,65],256],13186:[[956,65],256],13187:[[109,65],256],13188:[[107,65],256],13189:[[75,66],256],13190:[[77,66],256],13191:[[71,66],256],13192:[[99,97,108],256],13193:[[107,99,97,108],256],13194:[[112,70],256],13195:[[110,70],256],13196:[[956,70],256],13197:[[956,103],256],13198:[[109,103],256],13199:[[107,103],256],13200:[[72,122],256],13201:[[107,72,122],256],13202:[[77,72,122],256],13203:[[71,72,122],256],13204:[[84,72,122],256],13205:[[956,8467],256],13206:[[109,8467],256],13207:[[100,8467],256],13208:[[107,8467],256],13209:[[102,109],256],13210:[[110,109],256],13211:[[956,109],256],13212:[[109,109],256],13213:[[99,109],256],13214:[[107,109],256],13215:[[109,109,178],256],13216:[[99,109,178],256],13217:[[109,178],256],13218:[[107,109,178],256],13219:[[109,109,179],256],13220:[[99,109,179],256],13221:[[109,179],256],13222:[[107,109,179],256],13223:[[109,8725,115],256],13224:[[109,8725,115,178],256],13225:[[80,97],256],13226:[[107,80,97],256],13227:[[77,80,97],256],13228:[[71,80,97],256],13229:[[114,97,100],256],13230:[[114,97,100,8725,115],256],13231:[[114,97,100,8725,115,178],256],13232:[[112,115],256],13233:[[110,115],256],13234:[[956,115],256],13235:[[109,115],256],13236:[[112,86],256],13237:[[110,86],256],13238:[[956,86],256],13239:[[109,86],256],13240:[[107,86],256],13241:[[77,86],256],13242:[[112,87],256],13243:[[110,87],256],13244:[[956,87],256],13245:[[109,87],256],13246:[[107,87],256],13247:[[77,87],256],13248:[[107,937],256],13249:[[77,937],256],13250:[[97,46,109,46],256],13251:[[66,113],256],13252:[[99,99],256],13253:[[99,100],256],13254:[[67,8725,107,103],256],13255:[[67,111,46],256],13256:[[100,66],256],13257:[[71,121],256],13258:[[104,97],256],13259:[[72,80],256],13260:[[105,110],256],13261:[[75,75],256],13262:[[75,77],256],13263:[[107,116],256],13264:[[108,109],256],13265:[[108,110],256],13266:[[108,111,103],256],13267:[[108,120],256],13268:[[109,98],256],13269:[[109,105,108],256],13270:[[109,111,108],256],13271:[[80,72],256],13272:[[112,46,109,46],256],13273:[[80,80,77],256],13274:[[80,82],256],13275:[[115,114],256],13276:[[83,118],256],13277:[[87,98],256],13278:[[86,8725,109],256],13279:[[65,8725,109],256],13280:[[49,26085],256],13281:[[50,26085],256],13282:[[51,26085],256],13283:[[52,26085],256],13284:[[53,26085],256],13285:[[54,26085],256],13286:[[55,26085],256],13287:[[56,26085],256],13288:[[57,26085],256],13289:[[49,48,26085],256],13290:[[49,49,26085],256],13291:[[49,50,26085],256],13292:[[49,51,26085],256],13293:[[49,52,26085],256],13294:[[49,53,26085],256],13295:[[49,54,26085],256],13296:[[49,55,26085],256],13297:[[49,56,26085],256],13298:[[49,57,26085],256],13299:[[50,48,26085],256],13300:[[50,49,26085],256],13301:[[50,50,26085],256],13302:[[50,51,26085],256],13303:[[50,52,26085],256],13304:[[50,53,26085],256],13305:[[50,54,26085],256],13306:[[50,55,26085],256],13307:[[50,56,26085],256],13308:[[50,57,26085],256],13309:[[51,48,26085],256],13310:[[51,49,26085],256],13311:[[103,97,108],256]},27136:{92912:[,1],92913:[,1],92914:[,1],92915:[,1],92916:[,1]},27392:{92976:[,230],92977:[,230],92978:[,230],92979:[,230],92980:[,230],92981:[,230],92982:[,230]},42496:{42607:[,230],42612:[,230],42613:[,230],42614:[,230],42615:[,230],42616:[,230],42617:[,230],42618:[,230],42619:[,230],42620:[,230],42621:[,230],42652:[[1098],256],42653:[[1100],256],42655:[,230],42736:[,230],42737:[,230]},42752:{42864:[[42863],256],43e3:[[294],256],43001:[[339],256]},43008:{43014:[,9],43204:[,9],43232:[,230],43233:[,230],43234:[,230],43235:[,230],43236:[,230],43237:[,230],43238:[,230],43239:[,230],43240:[,230],43241:[,230],43242:[,230],43243:[,230],43244:[,230],43245:[,230],43246:[,230],43247:[,230],43248:[,230],43249:[,230]},43264:{43307:[,220],43308:[,220],43309:[,220],43347:[,9],43443:[,7],43456:[,9]},43520:{43696:[,230],43698:[,230],43699:[,230],43700:[,220],43703:[,230],43704:[,230],43710:[,230],43711:[,230],43713:[,230],43766:[,9]},43776:{43868:[[42791],256],43869:[[43831],256],43870:[[619],256],43871:[[43858],256],44013:[,9]},48128:{113822:[,1]},53504:{119134:[[119127,119141],512],119135:[[119128,119141],512],119136:[[119135,119150],512],119137:[[119135,119151],512],119138:[[119135,119152],512],119139:[[119135,119153],512],119140:[[119135,119154],512],119141:[,216],119142:[,216],119143:[,1],119144:[,1],119145:[,1],119149:[,226],119150:[,216],119151:[,216],119152:[,216],119153:[,216],119154:[,216],119163:[,220],119164:[,220],119165:[,220],119166:[,220],119167:[,220],119168:[,220],119169:[,220],119170:[,220],119173:[,230],119174:[,230],119175:[,230],119176:[,230],119177:[,230],119178:[,220],119179:[,220],119210:[,230],119211:[,230],119212:[,230],119213:[,230],119227:[[119225,119141],512],119228:[[119226,119141],512],119229:[[119227,119150],512],119230:[[119228,119150],512],119231:[[119227,119151],512],119232:[[119228,119151],512]},53760:{119362:[,230],119363:[,230],119364:[,230]},54272:{119808:[[65],256],119809:[[66],256],119810:[[67],256],119811:[[68],256],119812:[[69],256],119813:[[70],256],119814:[[71],256],119815:[[72],256],119816:[[73],256],119817:[[74],256],119818:[[75],256],119819:[[76],256],119820:[[77],256],119821:[[78],256],119822:[[79],256],119823:[[80],256],119824:[[81],256],119825:[[82],256],119826:[[83],256],119827:[[84],256],119828:[[85],256],119829:[[86],256],119830:[[87],256],119831:[[88],256],119832:[[89],256],119833:[[90],256],119834:[[97],256],119835:[[98],256],119836:[[99],256],119837:[[100],256],119838:[[101],256],119839:[[102],256],119840:[[103],256],119841:[[104],256],119842:[[105],256],119843:[[106],256],119844:[[107],256],119845:[[108],256],119846:[[109],256],119847:[[110],256],119848:[[111],256],119849:[[112],256],119850:[[113],256],119851:[[114],256],119852:[[115],256],119853:[[116],256],119854:[[117],256],119855:[[118],256],119856:[[119],256],119857:[[120],256],119858:[[121],256],119859:[[122],256],119860:[[65],256],119861:[[66],256],119862:[[67],256],119863:[[68],256],119864:[[69],256],119865:[[70],256],119866:[[71],256],119867:[[72],256],119868:[[73],256],119869:[[74],256],119870:[[75],256],119871:[[76],256],119872:[[77],256],119873:[[78],256],119874:[[79],256],119875:[[80],256],119876:[[81],256],119877:[[82],256],119878:[[83],256],119879:[[84],256],119880:[[85],256],119881:[[86],256],119882:[[87],256],119883:[[88],256],119884:[[89],256],119885:[[90],256],119886:[[97],256],119887:[[98],256],119888:[[99],256],119889:[[100],256],119890:[[101],256],119891:[[102],256],119892:[[103],256],119894:[[105],256],119895:[[106],256],119896:[[107],256],119897:[[108],256],119898:[[109],256],119899:[[110],256],119900:[[111],256],119901:[[112],256],119902:[[113],256],119903:[[114],256],119904:[[115],256],119905:[[116],256],119906:[[117],256],119907:[[118],256],119908:[[119],256],119909:[[120],256],119910:[[121],256],119911:[[122],256],119912:[[65],256],119913:[[66],256],119914:[[67],256],119915:[[68],256],119916:[[69],256],119917:[[70],256],119918:[[71],256],119919:[[72],256],119920:[[73],256],119921:[[74],256],119922:[[75],256],119923:[[76],256],119924:[[77],256],119925:[[78],256],119926:[[79],256],119927:[[80],256],119928:[[81],256],119929:[[82],256],119930:[[83],256],119931:[[84],256],119932:[[85],256],119933:[[86],256],119934:[[87],256],119935:[[88],256],119936:[[89],256],119937:[[90],256],119938:[[97],256],119939:[[98],256],119940:[[99],256],119941:[[100],256],119942:[[101],256],119943:[[102],256],119944:[[103],256],119945:[[104],256],119946:[[105],256],119947:[[106],256],119948:[[107],256],119949:[[108],256],119950:[[109],256],119951:[[110],256],119952:[[111],256],119953:[[112],256],119954:[[113],256],119955:[[114],256],119956:[[115],256],119957:[[116],256],119958:[[117],256],119959:[[118],256],119960:[[119],256],119961:[[120],256],119962:[[121],256],119963:[[122],256],119964:[[65],256],119966:[[67],256],119967:[[68],256],119970:[[71],256],119973:[[74],256],119974:[[75],256],119977:[[78],256],119978:[[79],256],119979:[[80],256],119980:[[81],256],119982:[[83],256],119983:[[84],256],119984:[[85],256],119985:[[86],256],119986:[[87],256],119987:[[88],256],119988:[[89],256],119989:[[90],256],119990:[[97],256],119991:[[98],256],119992:[[99],256],119993:[[100],256],119995:[[102],256],119997:[[104],256],119998:[[105],256],119999:[[106],256],12e4:[[107],256],120001:[[108],256],120002:[[109],256],120003:[[110],256],120005:[[112],256],120006:[[113],256],120007:[[114],256],120008:[[115],256],120009:[[116],256],120010:[[117],256],120011:[[118],256],120012:[[119],256],120013:[[120],256],120014:[[121],256],120015:[[122],256],120016:[[65],256],120017:[[66],256],120018:[[67],256],120019:[[68],256],120020:[[69],256],120021:[[70],256],120022:[[71],256],120023:[[72],256],120024:[[73],256],120025:[[74],256],120026:[[75],256],120027:[[76],256],120028:[[77],256],120029:[[78],256],120030:[[79],256],120031:[[80],256],120032:[[81],256],120033:[[82],256],120034:[[83],256],120035:[[84],256],120036:[[85],256],120037:[[86],256],120038:[[87],256],120039:[[88],256],120040:[[89],256],120041:[[90],256],120042:[[97],256],120043:[[98],256],120044:[[99],256],120045:[[100],256],120046:[[101],256],120047:[[102],256],120048:[[103],256],120049:[[104],256],120050:[[105],256],120051:[[106],256],120052:[[107],256],120053:[[108],256],120054:[[109],256],120055:[[110],256],120056:[[111],256],120057:[[112],256],120058:[[113],256],120059:[[114],256],120060:[[115],256],120061:[[116],256],120062:[[117],256],120063:[[118],256]},54528:{120064:[[119],256],120065:[[120],256],120066:[[121],256],120067:[[122],256],120068:[[65],256],120069:[[66],256],120071:[[68],256],120072:[[69],256],120073:[[70],256],120074:[[71],256],120077:[[74],256],120078:[[75],256],120079:[[76],256],120080:[[77],256],120081:[[78],256],120082:[[79],256],120083:[[80],256],120084:[[81],256],120086:[[83],256],120087:[[84],256],120088:[[85],256],120089:[[86],256],120090:[[87],256],120091:[[88],256],120092:[[89],256],120094:[[97],256],120095:[[98],256],120096:[[99],256],120097:[[100],256],120098:[[101],256],120099:[[102],256],120100:[[103],256],120101:[[104],256],120102:[[105],256],120103:[[106],256],120104:[[107],256],120105:[[108],256],120106:[[109],256],120107:[[110],256],120108:[[111],256],120109:[[112],256],120110:[[113],256],120111:[[114],256],120112:[[115],256],120113:[[116],256],120114:[[117],256],120115:[[118],256],120116:[[119],256],120117:[[120],256],120118:[[121],256],120119:[[122],256],120120:[[65],256],120121:[[66],256],120123:[[68],256],120124:[[69],256],120125:[[70],256],120126:[[71],256],120128:[[73],256],120129:[[74],256],120130:[[75],256],120131:[[76],256],120132:[[77],256],120134:[[79],256],120138:[[83],256],120139:[[84],256],120140:[[85],256],120141:[[86],256],120142:[[87],256],120143:[[88],256],120144:[[89],256],120146:[[97],256],120147:[[98],256],120148:[[99],256],120149:[[100],256],120150:[[101],256],120151:[[102],256],120152:[[103],256],120153:[[104],256],120154:[[105],256],120155:[[106],256],120156:[[107],256],120157:[[108],256],120158:[[109],256],120159:[[110],256],120160:[[111],256],120161:[[112],256],120162:[[113],256],120163:[[114],256],120164:[[115],256],120165:[[116],256],120166:[[117],256],120167:[[118],256],120168:[[119],256],120169:[[120],256],120170:[[121],256],120171:[[122],256],120172:[[65],256],120173:[[66],256],120174:[[67],256],120175:[[68],256],120176:[[69],256],120177:[[70],256],120178:[[71],256],120179:[[72],256],120180:[[73],256],120181:[[74],256],120182:[[75],256],120183:[[76],256],120184:[[77],256],120185:[[78],256],120186:[[79],256],120187:[[80],256],120188:[[81],256],120189:[[82],256],120190:[[83],256],120191:[[84],256],120192:[[85],256],120193:[[86],256],120194:[[87],256],120195:[[88],256],120196:[[89],256],120197:[[90],256],120198:[[97],256],120199:[[98],256],120200:[[99],256],120201:[[100],256],120202:[[101],256],120203:[[102],256],120204:[[103],256],120205:[[104],256],120206:[[105],256],120207:[[106],256],120208:[[107],256],120209:[[108],256],120210:[[109],256],120211:[[110],256],120212:[[111],256],120213:[[112],256],120214:[[113],256],120215:[[114],256],120216:[[115],256],120217:[[116],256],120218:[[117],256],120219:[[118],256],120220:[[119],256],120221:[[120],256],120222:[[121],256],120223:[[122],256],120224:[[65],256],120225:[[66],256],120226:[[67],256],120227:[[68],256],120228:[[69],256],120229:[[70],256],120230:[[71],256],120231:[[72],256],120232:[[73],256],120233:[[74],256],120234:[[75],256],120235:[[76],256],120236:[[77],256],120237:[[78],256],120238:[[79],256],120239:[[80],256],120240:[[81],256],120241:[[82],256],120242:[[83],256],120243:[[84],256],120244:[[85],256],120245:[[86],256],120246:[[87],256],120247:[[88],256],120248:[[89],256],120249:[[90],256],120250:[[97],256],120251:[[98],256],120252:[[99],256],120253:[[100],256],120254:[[101],256],120255:[[102],256],120256:[[103],256],120257:[[104],256],120258:[[105],256],120259:[[106],256],120260:[[107],256],120261:[[108],256],120262:[[109],256],120263:[[110],256],120264:[[111],256],120265:[[112],256],120266:[[113],256],120267:[[114],256],120268:[[115],256],120269:[[116],256],120270:[[117],256],120271:[[118],256],120272:[[119],256],120273:[[120],256],120274:[[121],256],120275:[[122],256],120276:[[65],256],120277:[[66],256],120278:[[67],256],120279:[[68],256],120280:[[69],256],120281:[[70],256],120282:[[71],256],120283:[[72],256],120284:[[73],256],120285:[[74],256],120286:[[75],256],120287:[[76],256],120288:[[77],256],120289:[[78],256],120290:[[79],256],120291:[[80],256],120292:[[81],256],120293:[[82],256],120294:[[83],256],120295:[[84],256],120296:[[85],256],120297:[[86],256],120298:[[87],256],120299:[[88],256],120300:[[89],256],120301:[[90],256],120302:[[97],256],120303:[[98],256],120304:[[99],256],120305:[[100],256],120306:[[101],256],120307:[[102],256],120308:[[103],256],120309:[[104],256],120310:[[105],256],120311:[[106],256],120312:[[107],256],120313:[[108],256],120314:[[109],256],120315:[[110],256],120316:[[111],256],120317:[[112],256],120318:[[113],256],120319:[[114],256]},54784:{120320:[[115],256],120321:[[116],256],120322:[[117],256],120323:[[118],256],120324:[[119],256],120325:[[120],256],120326:[[121],256],120327:[[122],256],120328:[[65],256],120329:[[66],256],120330:[[67],256],120331:[[68],256],120332:[[69],256],120333:[[70],256],120334:[[71],256],120335:[[72],256],120336:[[73],256],120337:[[74],256],120338:[[75],256],120339:[[76],256],120340:[[77],256],120341:[[78],256],120342:[[79],256],120343:[[80],256],120344:[[81],256],120345:[[82],256],120346:[[83],256],120347:[[84],256],120348:[[85],256],120349:[[86],256],120350:[[87],256],120351:[[88],256],120352:[[89],256],120353:[[90],256],120354:[[97],256],120355:[[98],256],120356:[[99],256],120357:[[100],256],120358:[[101],256],120359:[[102],256],120360:[[103],256],120361:[[104],256],120362:[[105],256],120363:[[106],256],120364:[[107],256],120365:[[108],256],120366:[[109],256],120367:[[110],256],120368:[[111],256],120369:[[112],256],120370:[[113],256],120371:[[114],256],120372:[[115],256],120373:[[116],256],120374:[[117],256],120375:[[118],256],120376:[[119],256],120377:[[120],256],120378:[[121],256],120379:[[122],256],120380:[[65],256],120381:[[66],256],120382:[[67],256],120383:[[68],256],120384:[[69],256],120385:[[70],256],120386:[[71],256],120387:[[72],256],120388:[[73],256],120389:[[74],256],120390:[[75],256],120391:[[76],256],120392:[[77],256],120393:[[78],256],120394:[[79],256],120395:[[80],256],120396:[[81],256],120397:[[82],256],120398:[[83],256],120399:[[84],256],120400:[[85],256],120401:[[86],256],120402:[[87],256],120403:[[88],256],120404:[[89],256],120405:[[90],256],120406:[[97],256],120407:[[98],256],120408:[[99],256],120409:[[100],256],120410:[[101],256],120411:[[102],256],120412:[[103],256],120413:[[104],256],120414:[[105],256],120415:[[106],256],120416:[[107],256],120417:[[108],256],120418:[[109],256],120419:[[110],256],120420:[[111],256],120421:[[112],256],120422:[[113],256],120423:[[114],256],120424:[[115],256],120425:[[116],256],120426:[[117],256],120427:[[118],256],120428:[[119],256],120429:[[120],256],120430:[[121],256],120431:[[122],256],120432:[[65],256],120433:[[66],256],120434:[[67],256],120435:[[68],256],120436:[[69],256],120437:[[70],256],120438:[[71],256],120439:[[72],256],120440:[[73],256],120441:[[74],256],120442:[[75],256],120443:[[76],256],120444:[[77],256],120445:[[78],256],120446:[[79],256],120447:[[80],256],120448:[[81],256],120449:[[82],256],120450:[[83],256],120451:[[84],256],120452:[[85],256],120453:[[86],256],120454:[[87],256],120455:[[88],256],120456:[[89],256],120457:[[90],256],120458:[[97],256],120459:[[98],256],120460:[[99],256],120461:[[100],256],120462:[[101],256],120463:[[102],256],120464:[[103],256],120465:[[104],256],120466:[[105],256],120467:[[106],256],120468:[[107],256],120469:[[108],256],120470:[[109],256],120471:[[110],256],120472:[[111],256],120473:[[112],256],120474:[[113],256],120475:[[114],256],120476:[[115],256],120477:[[116],256],120478:[[117],256],120479:[[118],256],120480:[[119],256],120481:[[120],256],120482:[[121],256],120483:[[122],256],120484:[[305],256],120485:[[567],256],120488:[[913],256],120489:[[914],256],120490:[[915],256],120491:[[916],256],120492:[[917],256],120493:[[918],256],120494:[[919],256],120495:[[920],256],120496:[[921],256],120497:[[922],256],120498:[[923],256],120499:[[924],256],120500:[[925],256],120501:[[926],256],120502:[[927],256],120503:[[928],256],120504:[[929],256],120505:[[1012],256],120506:[[931],256],120507:[[932],256],120508:[[933],256],120509:[[934],256],120510:[[935],256],120511:[[936],256],120512:[[937],256],120513:[[8711],256],120514:[[945],256],120515:[[946],256],120516:[[947],256],120517:[[948],256],120518:[[949],256],120519:[[950],256],120520:[[951],256],120521:[[952],256],120522:[[953],256],120523:[[954],256],120524:[[955],256],120525:[[956],256],120526:[[957],256],120527:[[958],256],120528:[[959],256],120529:[[960],256],120530:[[961],256],120531:[[962],256],120532:[[963],256],120533:[[964],256],120534:[[965],256],120535:[[966],256],120536:[[967],256],120537:[[968],256],120538:[[969],256],120539:[[8706],256],120540:[[1013],256],120541:[[977],256],120542:[[1008],256],120543:[[981],256],120544:[[1009],256],120545:[[982],256],120546:[[913],256],120547:[[914],256],120548:[[915],256],120549:[[916],256],120550:[[917],256],120551:[[918],256],120552:[[919],256],120553:[[920],256],120554:[[921],256],120555:[[922],256],120556:[[923],256],120557:[[924],256],120558:[[925],256],120559:[[926],256],120560:[[927],256],120561:[[928],256],120562:[[929],256],120563:[[1012],256],120564:[[931],256],120565:[[932],256],120566:[[933],256],120567:[[934],256],120568:[[935],256],120569:[[936],256],120570:[[937],256],120571:[[8711],256],120572:[[945],256],120573:[[946],256],120574:[[947],256],120575:[[948],256]},55040:{120576:[[949],256],120577:[[950],256],120578:[[951],256],120579:[[952],256],120580:[[953],256],120581:[[954],256],120582:[[955],256],120583:[[956],256],120584:[[957],256],120585:[[958],256],120586:[[959],256],120587:[[960],256],120588:[[961],256],120589:[[962],256],120590:[[963],256],120591:[[964],256],120592:[[965],256],120593:[[966],256],120594:[[967],256],120595:[[968],256],120596:[[969],256],120597:[[8706],256],120598:[[1013],256],120599:[[977],256],120600:[[1008],256],120601:[[981],256],120602:[[1009],256],120603:[[982],256],120604:[[913],256],120605:[[914],256],120606:[[915],256],120607:[[916],256],120608:[[917],256],120609:[[918],256],120610:[[919],256],120611:[[920],256],120612:[[921],256],120613:[[922],256],120614:[[923],256],120615:[[924],256],120616:[[925],256],120617:[[926],256],120618:[[927],256],120619:[[928],256],120620:[[929],256],120621:[[1012],256],120622:[[931],256],120623:[[932],256],120624:[[933],256],120625:[[934],256],120626:[[935],256],120627:[[936],256],120628:[[937],256],120629:[[8711],256],120630:[[945],256],120631:[[946],256],120632:[[947],256],120633:[[948],256],120634:[[949],256],120635:[[950],256],120636:[[951],256],120637:[[952],256],120638:[[953],256],120639:[[954],256],120640:[[955],256],120641:[[956],256],120642:[[957],256],120643:[[958],256],120644:[[959],256],120645:[[960],256],120646:[[961],256],120647:[[962],256],120648:[[963],256],120649:[[964],256],120650:[[965],256],120651:[[966],256],120652:[[967],256],120653:[[968],256],120654:[[969],256],120655:[[8706],256],120656:[[1013],256],120657:[[977],256],120658:[[1008],256],120659:[[981],256],120660:[[1009],256],120661:[[982],256],120662:[[913],256],120663:[[914],256],120664:[[915],256],120665:[[916],256],120666:[[917],256],120667:[[918],256],120668:[[919],256],120669:[[920],256],120670:[[921],256],120671:[[922],256],120672:[[923],256],120673:[[924],256],120674:[[925],256],120675:[[926],256],120676:[[927],256],120677:[[928],256],120678:[[929],256],120679:[[1012],256],120680:[[931],256],120681:[[932],256],120682:[[933],256],120683:[[934],256],120684:[[935],256],120685:[[936],256],120686:[[937],256],120687:[[8711],256],120688:[[945],256],120689:[[946],256],120690:[[947],256],120691:[[948],256],120692:[[949],256],120693:[[950],256],120694:[[951],256],120695:[[952],256],120696:[[953],256],120697:[[954],256],120698:[[955],256],120699:[[956],256],120700:[[957],256],120701:[[958],256],120702:[[959],256],120703:[[960],256],120704:[[961],256],120705:[[962],256],120706:[[963],256],120707:[[964],256],120708:[[965],256],120709:[[966],256],120710:[[967],256],120711:[[968],256],120712:[[969],256],120713:[[8706],256],120714:[[1013],256],120715:[[977],256],120716:[[1008],256],120717:[[981],256],120718:[[1009],256],120719:[[982],256],120720:[[913],256],120721:[[914],256],120722:[[915],256],120723:[[916],256],120724:[[917],256],120725:[[918],256],120726:[[919],256],120727:[[920],256],120728:[[921],256],120729:[[922],256],120730:[[923],256],120731:[[924],256],120732:[[925],256],120733:[[926],256],120734:[[927],256],120735:[[928],256],120736:[[929],256],120737:[[1012],256],120738:[[931],256],120739:[[932],256],120740:[[933],256],120741:[[934],256],120742:[[935],256],120743:[[936],256],120744:[[937],256],120745:[[8711],256],120746:[[945],256],120747:[[946],256],120748:[[947],256],120749:[[948],256],120750:[[949],256],120751:[[950],256],120752:[[951],256],120753:[[952],256],120754:[[953],256],120755:[[954],256],120756:[[955],256],120757:[[956],256],120758:[[957],256],120759:[[958],256],120760:[[959],256],120761:[[960],256],120762:[[961],256],120763:[[962],256],120764:[[963],256],120765:[[964],256],120766:[[965],256],120767:[[966],256],120768:[[967],256],120769:[[968],256],120770:[[969],256],120771:[[8706],256],120772:[[1013],256],120773:[[977],256],120774:[[1008],256],120775:[[981],256],120776:[[1009],256],120777:[[982],256],120778:[[988],256],120779:[[989],256],120782:[[48],256],120783:[[49],256],120784:[[50],256],120785:[[51],256],120786:[[52],256],120787:[[53],256],120788:[[54],256],120789:[[55],256],120790:[[56],256],120791:[[57],256],120792:[[48],256],120793:[[49],256],120794:[[50],256],120795:[[51],256],120796:[[52],256],120797:[[53],256],120798:[[54],256],120799:[[55],256],120800:[[56],256],120801:[[57],256],120802:[[48],256],120803:[[49],256],120804:[[50],256],120805:[[51],256],120806:[[52],256],120807:[[53],256],120808:[[54],256],120809:[[55],256],120810:[[56],256],120811:[[57],256],120812:[[48],256],120813:[[49],256],120814:[[50],256],120815:[[51],256],120816:[[52],256],120817:[[53],256],120818:[[54],256],120819:[[55],256],120820:[[56],256],120821:[[57],256],120822:[[48],256],120823:[[49],256],120824:[[50],256],120825:[[51],256],120826:[[52],256],120827:[[53],256],120828:[[54],256],120829:[[55],256],120830:[[56],256],120831:[[57],256]},59392:{125136:[,220],125137:[,220],125138:[,220],125139:[,220],125140:[,220],125141:[,220],125142:[,220]},60928:{126464:[[1575],256],126465:[[1576],256],126466:[[1580],256],126467:[[1583],256],126469:[[1608],256],126470:[[1586],256],126471:[[1581],256],126472:[[1591],256],126473:[[1610],256],126474:[[1603],256],126475:[[1604],256],126476:[[1605],256],126477:[[1606],256],126478:[[1587],256],126479:[[1593],256],126480:[[1601],256],126481:[[1589],256],126482:[[1602],256],126483:[[1585],256],126484:[[1588],256],126485:[[1578],256],126486:[[1579],256],126487:[[1582],256],126488:[[1584],256],126489:[[1590],256],126490:[[1592],256],126491:[[1594],256],126492:[[1646],256],126493:[[1722],256],126494:[[1697],256],126495:[[1647],256],126497:[[1576],256],126498:[[1580],256],126500:[[1607],256],126503:[[1581],256],126505:[[1610],256],126506:[[1603],256],126507:[[1604],256],126508:[[1605],256],126509:[[1606],256],126510:[[1587],256],126511:[[1593],256],126512:[[1601],256],126513:[[1589],256],126514:[[1602],256],126516:[[1588],256],126517:[[1578],256],126518:[[1579],256],126519:[[1582],256],126521:[[1590],256],126523:[[1594],256],126530:[[1580],256],126535:[[1581],256],126537:[[1610],256],126539:[[1604],256],126541:[[1606],256],126542:[[1587],256],126543:[[1593],256],126545:[[1589],256],126546:[[1602],256],126548:[[1588],256],126551:[[1582],256],126553:[[1590],256],126555:[[1594],256],126557:[[1722],256],126559:[[1647],256],126561:[[1576],256],126562:[[1580],256],126564:[[1607],256],126567:[[1581],256],126568:[[1591],256],126569:[[1610],256],126570:[[1603],256],126572:[[1605],256],126573:[[1606],256],126574:[[1587],256],126575:[[1593],256],126576:[[1601],256],126577:[[1589],256],126578:[[1602],256],126580:[[1588],256],126581:[[1578],256],126582:[[1579],256],126583:[[1582],256],126585:[[1590],256],126586:[[1592],256],126587:[[1594],256],126588:[[1646],256],126590:[[1697],256],126592:[[1575],256],126593:[[1576],256],126594:[[1580],256],126595:[[1583],256],126596:[[1607],256],126597:[[1608],256],126598:[[1586],256],126599:[[1581],256],126600:[[1591],256],126601:[[1610],256],126603:[[1604],256],126604:[[1605],256],126605:[[1606],256],126606:[[1587],256],126607:[[1593],256],126608:[[1601],256],126609:[[1589],256],126610:[[1602],256],126611:[[1585],256],126612:[[1588],256],126613:[[1578],256],126614:[[1579],256],126615:[[1582],256],126616:[[1584],256],126617:[[1590],256],126618:[[1592],256],126619:[[1594],256],126625:[[1576],256],126626:[[1580],256],126627:[[1583],256],126629:[[1608],256],126630:[[1586],256],126631:[[1581],256],126632:[[1591],256],126633:[[1610],256],126635:[[1604],256],126636:[[1605],256],126637:[[1606],256],126638:[[1587],256],126639:[[1593],256],126640:[[1601],256],126641:[[1589],256],126642:[[1602],256],126643:[[1585],256],126644:[[1588],256],126645:[[1578],256],126646:[[1579],256],126647:[[1582],256],126648:[[1584],256],126649:[[1590],256],126650:[[1592],256],126651:[[1594],256]},61696:{127232:[[48,46],256],127233:[[48,44],256],127234:[[49,44],256],127235:[[50,44],256],127236:[[51,44],256],127237:[[52,44],256],127238:[[53,44],256],127239:[[54,44],256],127240:[[55,44],256],127241:[[56,44],256],127242:[[57,44],256],127248:[[40,65,41],256],127249:[[40,66,41],256],127250:[[40,67,41],256],127251:[[40,68,41],256],127252:[[40,69,41],256],127253:[[40,70,41],256],127254:[[40,71,41],256],127255:[[40,72,41],256],127256:[[40,73,41],256],127257:[[40,74,41],256],127258:[[40,75,41],256],127259:[[40,76,41],256],127260:[[40,77,41],256],127261:[[40,78,41],256],127262:[[40,79,41],256],127263:[[40,80,41],256],127264:[[40,81,41],256],127265:[[40,82,41],256],127266:[[40,83,41],256],127267:[[40,84,41],256],127268:[[40,85,41],256],127269:[[40,86,41],256],127270:[[40,87,41],256],127271:[[40,88,41],256],127272:[[40,89,41],256],127273:[[40,90,41],256],127274:[[12308,83,12309],256],127275:[[67],256],127276:[[82],256],127277:[[67,68],256],127278:[[87,90],256],127280:[[65],256],127281:[[66],256],127282:[[67],256],127283:[[68],256],127284:[[69],256],127285:[[70],256],127286:[[71],256],127287:[[72],256],127288:[[73],256],127289:[[74],256],127290:[[75],256],127291:[[76],256],127292:[[77],256],127293:[[78],256],127294:[[79],256],127295:[[80],256],127296:[[81],256],127297:[[82],256],127298:[[83],256],127299:[[84],256],127300:[[85],256],127301:[[86],256],127302:[[87],256],127303:[[88],256],127304:[[89],256],127305:[[90],256],127306:[[72,86],256],127307:[[77,86],256],127308:[[83,68],256],127309:[[83,83],256],127310:[[80,80,86],256],127311:[[87,67],256],127338:[[77,67],256],127339:[[77,68],256],127376:[[68,74],256]},61952:{127488:[[12411,12363],256],127489:[[12467,12467],256],127490:[[12469],256],127504:[[25163],256],127505:[[23383],256],127506:[[21452],256],127507:[[12487],256],127508:[[20108],256],127509:[[22810],256],127510:[[35299],256],127511:[[22825],256],127512:[[20132],256],127513:[[26144],256],127514:[[28961],256],127515:[[26009],256],127516:[[21069],256],127517:[[24460],256],127518:[[20877],256],127519:[[26032],256],127520:[[21021],256],127521:[[32066],256],127522:[[29983],256],127523:[[36009],256],127524:[[22768],256],127525:[[21561],256],127526:[[28436],256],127527:[[25237],256],127528:[[25429],256],127529:[[19968],256],127530:[[19977],256],127531:[[36938],256],127532:[[24038],256],127533:[[20013],256],127534:[[21491],256],127535:[[25351],256],127536:[[36208],256],127537:[[25171],256],127538:[[31105],256],127539:[[31354],256],127540:[[21512],256],127541:[[28288],256],127542:[[26377],256],127543:[[26376],256],127544:[[30003],256],127545:[[21106],256],127546:[[21942],256],127552:[[12308,26412,12309],256],127553:[[12308,19977,12309],256],127554:[[12308,20108,12309],256],127555:[[12308,23433,12309],256],127556:[[12308,28857,12309],256],127557:[[12308,25171,12309],256],127558:[[12308,30423,12309],256],127559:[[12308,21213,12309],256],127560:[[12308,25943,12309],256],127568:[[24471],256],127569:[[21487],256]},63488:{194560:[[20029]],194561:[[20024]],194562:[[20033]],194563:[[131362]],194564:[[20320]],194565:[[20398]],194566:[[20411]],194567:[[20482]],194568:[[20602]],194569:[[20633]],194570:[[20711]],194571:[[20687]],194572:[[13470]],194573:[[132666]],194574:[[20813]],194575:[[20820]],194576:[[20836]],194577:[[20855]],194578:[[132380]],194579:[[13497]],194580:[[20839]],194581:[[20877]],194582:[[132427]],194583:[[20887]],194584:[[20900]],194585:[[20172]],194586:[[20908]],194587:[[20917]],194588:[[168415]],194589:[[20981]],194590:[[20995]],194591:[[13535]],194592:[[21051]],194593:[[21062]],194594:[[21106]],194595:[[21111]],194596:[[13589]],194597:[[21191]],194598:[[21193]],194599:[[21220]],194600:[[21242]],194601:[[21253]],194602:[[21254]],194603:[[21271]],194604:[[21321]],194605:[[21329]],194606:[[21338]],194607:[[21363]],194608:[[21373]],194609:[[21375]],194610:[[21375]],194611:[[21375]],194612:[[133676]],194613:[[28784]],194614:[[21450]],194615:[[21471]],194616:[[133987]],194617:[[21483]],194618:[[21489]],194619:[[21510]],194620:[[21662]],194621:[[21560]],194622:[[21576]],194623:[[21608]],194624:[[21666]],194625:[[21750]],194626:[[21776]],194627:[[21843]],194628:[[21859]],194629:[[21892]],194630:[[21892]],194631:[[21913]],194632:[[21931]],194633:[[21939]],194634:[[21954]],194635:[[22294]],194636:[[22022]],194637:[[22295]],194638:[[22097]],194639:[[22132]],194640:[[20999]],194641:[[22766]],194642:[[22478]],194643:[[22516]],194644:[[22541]],194645:[[22411]],194646:[[22578]],194647:[[22577]],194648:[[22700]],194649:[[136420]],194650:[[22770]],194651:[[22775]],194652:[[22790]],194653:[[22810]],194654:[[22818]],194655:[[22882]],194656:[[136872]],194657:[[136938]],194658:[[23020]],194659:[[23067]],194660:[[23079]],194661:[[23e3]],194662:[[23142]],194663:[[14062]],194664:[[14076]],194665:[[23304]],194666:[[23358]],194667:[[23358]],194668:[[137672]],194669:[[23491]],194670:[[23512]],194671:[[23527]],194672:[[23539]],194673:[[138008]],194674:[[23551]],194675:[[23558]],194676:[[24403]],194677:[[23586]],194678:[[14209]],194679:[[23648]],194680:[[23662]],194681:[[23744]],194682:[[23693]],194683:[[138724]],194684:[[23875]],194685:[[138726]],194686:[[23918]],194687:[[23915]],194688:[[23932]],194689:[[24033]],194690:[[24034]],194691:[[14383]],194692:[[24061]],194693:[[24104]],194694:[[24125]],194695:[[24169]],194696:[[14434]],194697:[[139651]],194698:[[14460]],194699:[[24240]],194700:[[24243]],194701:[[24246]],194702:[[24266]],194703:[[172946]],194704:[[24318]],194705:[[140081]],194706:[[140081]],194707:[[33281]],194708:[[24354]],194709:[[24354]],194710:[[14535]],194711:[[144056]],194712:[[156122]],194713:[[24418]],194714:[[24427]],194715:[[14563]],194716:[[24474]],194717:[[24525]],194718:[[24535]],194719:[[24569]],194720:[[24705]],194721:[[14650]],194722:[[14620]],194723:[[24724]],194724:[[141012]],194725:[[24775]],194726:[[24904]],194727:[[24908]],194728:[[24910]],194729:[[24908]],194730:[[24954]],194731:[[24974]],194732:[[25010]],194733:[[24996]],194734:[[25007]],194735:[[25054]],194736:[[25074]],194737:[[25078]],194738:[[25104]],194739:[[25115]],194740:[[25181]],194741:[[25265]],194742:[[25300]],194743:[[25424]],194744:[[142092]],194745:[[25405]],194746:[[25340]],194747:[[25448]],194748:[[25475]],194749:[[25572]],194750:[[142321]],194751:[[25634]],194752:[[25541]],194753:[[25513]],194754:[[14894]],194755:[[25705]],194756:[[25726]],194757:[[25757]],194758:[[25719]],194759:[[14956]],194760:[[25935]],194761:[[25964]],194762:[[143370]],194763:[[26083]],194764:[[26360]],194765:[[26185]],194766:[[15129]],194767:[[26257]],194768:[[15112]],194769:[[15076]],194770:[[20882]],194771:[[20885]],194772:[[26368]],194773:[[26268]],194774:[[32941]],194775:[[17369]],194776:[[26391]],194777:[[26395]],194778:[[26401]],194779:[[26462]],194780:[[26451]],194781:[[144323]],194782:[[15177]],194783:[[26618]],194784:[[26501]],194785:[[26706]],194786:[[26757]],194787:[[144493]],194788:[[26766]],194789:[[26655]],194790:[[26900]],194791:[[15261]],194792:[[26946]],194793:[[27043]],194794:[[27114]],194795:[[27304]],194796:[[145059]],194797:[[27355]],194798:[[15384]],194799:[[27425]],194800:[[145575]],194801:[[27476]],194802:[[15438]],194803:[[27506]],194804:[[27551]],194805:[[27578]],194806:[[27579]],194807:[[146061]],194808:[[138507]],194809:[[146170]],194810:[[27726]],194811:[[146620]],194812:[[27839]],194813:[[27853]],194814:[[27751]],194815:[[27926]]},63744:{63744:[[35912]],63745:[[26356]],63746:[[36554]],63747:[[36040]],63748:[[28369]],63749:[[20018]],63750:[[21477]],63751:[[40860]],63752:[[40860]],63753:[[22865]],63754:[[37329]],63755:[[21895]],63756:[[22856]],63757:[[25078]],63758:[[30313]],63759:[[32645]],63760:[[34367]],63761:[[34746]],63762:[[35064]],63763:[[37007]],63764:[[27138]],63765:[[27931]],63766:[[28889]],63767:[[29662]],63768:[[33853]],63769:[[37226]],63770:[[39409]],63771:[[20098]],63772:[[21365]],63773:[[27396]],63774:[[29211]],63775:[[34349]],63776:[[40478]],63777:[[23888]],63778:[[28651]],63779:[[34253]],63780:[[35172]],63781:[[25289]],63782:[[33240]],63783:[[34847]],63784:[[24266]],63785:[[26391]],63786:[[28010]],63787:[[29436]],63788:[[37070]],63789:[[20358]],63790:[[20919]],63791:[[21214]],63792:[[25796]],63793:[[27347]],63794:[[29200]],63795:[[30439]],63796:[[32769]],63797:[[34310]],63798:[[34396]],63799:[[36335]],63800:[[38706]],63801:[[39791]],63802:[[40442]],63803:[[30860]],63804:[[31103]],63805:[[32160]],63806:[[33737]],63807:[[37636]],63808:[[40575]],63809:[[35542]],63810:[[22751]],63811:[[24324]],63812:[[31840]],63813:[[32894]],63814:[[29282]],63815:[[30922]],63816:[[36034]],63817:[[38647]],63818:[[22744]],63819:[[23650]],63820:[[27155]],63821:[[28122]],63822:[[28431]],63823:[[32047]],63824:[[32311]],63825:[[38475]],63826:[[21202]],63827:[[32907]],63828:[[20956]],63829:[[20940]],63830:[[31260]],63831:[[32190]],63832:[[33777]],63833:[[38517]],63834:[[35712]],63835:[[25295]],63836:[[27138]],63837:[[35582]],63838:[[20025]],63839:[[23527]],63840:[[24594]],63841:[[29575]],63842:[[30064]],63843:[[21271]],63844:[[30971]],63845:[[20415]],63846:[[24489]],63847:[[19981]],63848:[[27852]],63849:[[25976]],63850:[[32034]],63851:[[21443]],63852:[[22622]],63853:[[30465]],63854:[[33865]],63855:[[35498]],63856:[[27578]],63857:[[36784]],63858:[[27784]],63859:[[25342]],63860:[[33509]],63861:[[25504]],63862:[[30053]],63863:[[20142]],63864:[[20841]],63865:[[20937]],63866:[[26753]],63867:[[31975]],63868:[[33391]],63869:[[35538]],63870:[[37327]],63871:[[21237]],63872:[[21570]],63873:[[22899]],63874:[[24300]],63875:[[26053]],63876:[[28670]],63877:[[31018]],63878:[[38317]],63879:[[39530]],63880:[[40599]],63881:[[40654]],63882:[[21147]],63883:[[26310]],63884:[[27511]],63885:[[36706]],63886:[[24180]],63887:[[24976]],63888:[[25088]],63889:[[25754]],63890:[[28451]],63891:[[29001]],63892:[[29833]],63893:[[31178]],63894:[[32244]],63895:[[32879]],63896:[[36646]],63897:[[34030]],63898:[[36899]],63899:[[37706]],63900:[[21015]],63901:[[21155]],63902:[[21693]],63903:[[28872]],63904:[[35010]],63905:[[35498]],63906:[[24265]],63907:[[24565]],63908:[[25467]],63909:[[27566]],63910:[[31806]],63911:[[29557]],63912:[[20196]],63913:[[22265]],63914:[[23527]],63915:[[23994]],63916:[[24604]],63917:[[29618]],63918:[[29801]],63919:[[32666]],63920:[[32838]],63921:[[37428]],63922:[[38646]],63923:[[38728]],63924:[[38936]],63925:[[20363]],63926:[[31150]],63927:[[37300]],63928:[[38584]],63929:[[24801]],63930:[[20102]],63931:[[20698]],63932:[[23534]],63933:[[23615]],63934:[[26009]],63935:[[27138]],63936:[[29134]],63937:[[30274]],63938:[[34044]],63939:[[36988]],63940:[[40845]],63941:[[26248]],63942:[[38446]],63943:[[21129]],63944:[[26491]],63945:[[26611]],63946:[[27969]],63947:[[28316]],63948:[[29705]],63949:[[30041]],63950:[[30827]],63951:[[32016]],63952:[[39006]],63953:[[20845]],63954:[[25134]],63955:[[38520]],63956:[[20523]],63957:[[23833]],63958:[[28138]],63959:[[36650]],63960:[[24459]],63961:[[24900]],63962:[[26647]],63963:[[29575]],63964:[[38534]],63965:[[21033]],63966:[[21519]],63967:[[23653]],63968:[[26131]],63969:[[26446]],63970:[[26792]],63971:[[27877]],63972:[[29702]],63973:[[30178]],63974:[[32633]],63975:[[35023]],63976:[[35041]],63977:[[37324]],63978:[[38626]],63979:[[21311]],63980:[[28346]],63981:[[21533]],63982:[[29136]],63983:[[29848]],63984:[[34298]],63985:[[38563]],63986:[[40023]],63987:[[40607]],63988:[[26519]],63989:[[28107]],63990:[[33256]],63991:[[31435]],63992:[[31520]],63993:[[31890]],63994:[[29376]],63995:[[28825]],63996:[[35672]],63997:[[20160]],63998:[[33590]],63999:[[21050]],194816:[[27966]],194817:[[28023]],194818:[[27969]],194819:[[28009]],194820:[[28024]],194821:[[28037]],194822:[[146718]],194823:[[27956]],194824:[[28207]],194825:[[28270]],194826:[[15667]],194827:[[28363]],194828:[[28359]],194829:[[147153]],194830:[[28153]],194831:[[28526]],194832:[[147294]],194833:[[147342]],194834:[[28614]],194835:[[28729]],194836:[[28702]],194837:[[28699]],194838:[[15766]],194839:[[28746]],194840:[[28797]],194841:[[28791]],194842:[[28845]],194843:[[132389]],194844:[[28997]],194845:[[148067]],194846:[[29084]],194847:[[148395]],194848:[[29224]],194849:[[29237]],194850:[[29264]],194851:[[149e3]],194852:[[29312]],194853:[[29333]],194854:[[149301]],194855:[[149524]],194856:[[29562]],194857:[[29579]],194858:[[16044]],194859:[[29605]],194860:[[16056]],194861:[[16056]],194862:[[29767]],194863:[[29788]],194864:[[29809]],194865:[[29829]],194866:[[29898]],194867:[[16155]],194868:[[29988]],194869:[[150582]],194870:[[30014]],194871:[[150674]],194872:[[30064]],194873:[[139679]],194874:[[30224]],194875:[[151457]],194876:[[151480]],194877:[[151620]],194878:[[16380]],194879:[[16392]],194880:[[30452]],194881:[[151795]],194882:[[151794]],194883:[[151833]],194884:[[151859]],194885:[[30494]],194886:[[30495]],194887:[[30495]],194888:[[30538]],194889:[[16441]],194890:[[30603]],194891:[[16454]],194892:[[16534]],194893:[[152605]],194894:[[30798]],194895:[[30860]],194896:[[30924]],194897:[[16611]],194898:[[153126]],194899:[[31062]],194900:[[153242]],194901:[[153285]],194902:[[31119]],194903:[[31211]],194904:[[16687]],194905:[[31296]],194906:[[31306]],194907:[[31311]],194908:[[153980]],194909:[[154279]],194910:[[154279]],194911:[[31470]],194912:[[16898]],194913:[[154539]],194914:[[31686]],194915:[[31689]],194916:[[16935]],194917:[[154752]],194918:[[31954]],194919:[[17056]],194920:[[31976]],194921:[[31971]],194922:[[32e3]],194923:[[155526]],194924:[[32099]],194925:[[17153]],194926:[[32199]],194927:[[32258]],194928:[[32325]],194929:[[17204]],194930:[[156200]],194931:[[156231]],194932:[[17241]],194933:[[156377]],194934:[[32634]],194935:[[156478]],194936:[[32661]],194937:[[32762]],194938:[[32773]],194939:[[156890]],194940:[[156963]],194941:[[32864]],194942:[[157096]],194943:[[32880]],194944:[[144223]],194945:[[17365]],194946:[[32946]],194947:[[33027]],194948:[[17419]],194949:[[33086]],194950:[[23221]],194951:[[157607]],194952:[[157621]],194953:[[144275]],194954:[[144284]],194955:[[33281]],194956:[[33284]],194957:[[36766]],194958:[[17515]],194959:[[33425]],194960:[[33419]],194961:[[33437]],194962:[[21171]],194963:[[33457]],194964:[[33459]],194965:[[33469]],194966:[[33510]],194967:[[158524]],194968:[[33509]],194969:[[33565]],194970:[[33635]],194971:[[33709]],194972:[[33571]],194973:[[33725]],194974:[[33767]],194975:[[33879]],194976:[[33619]],194977:[[33738]],194978:[[33740]],194979:[[33756]],194980:[[158774]],194981:[[159083]],194982:[[158933]],194983:[[17707]],194984:[[34033]],194985:[[34035]],194986:[[34070]],194987:[[160714]],194988:[[34148]],194989:[[159532]],194990:[[17757]],194991:[[17761]],194992:[[159665]],194993:[[159954]],194994:[[17771]],194995:[[34384]],194996:[[34396]],194997:[[34407]],194998:[[34409]],194999:[[34473]],195e3:[[34440]],195001:[[34574]],195002:[[34530]],195003:[[34681]],195004:[[34600]],195005:[[34667]],195006:[[34694]],195007:[[17879]],195008:[[34785]],195009:[[34817]],195010:[[17913]],195011:[[34912]],195012:[[34915]],195013:[[161383]],195014:[[35031]],195015:[[35038]],195016:[[17973]],195017:[[35066]],195018:[[13499]],195019:[[161966]],195020:[[162150]],195021:[[18110]],195022:[[18119]],195023:[[35488]],195024:[[35565]],195025:[[35722]],195026:[[35925]],195027:[[162984]],195028:[[36011]],195029:[[36033]],195030:[[36123]],195031:[[36215]],195032:[[163631]],195033:[[133124]],195034:[[36299]],195035:[[36284]],195036:[[36336]],195037:[[133342]],195038:[[36564]],195039:[[36664]],195040:[[165330]],195041:[[165357]],195042:[[37012]],195043:[[37105]],195044:[[37137]],195045:[[165678]],195046:[[37147]],195047:[[37432]],195048:[[37591]],195049:[[37592]],195050:[[37500]],195051:[[37881]],195052:[[37909]],195053:[[166906]],195054:[[38283]],195055:[[18837]],195056:[[38327]],195057:[[167287]],195058:[[18918]],195059:[[38595]],195060:[[23986]],195061:[[38691]],195062:[[168261]],195063:[[168474]],195064:[[19054]],195065:[[19062]],195066:[[38880]],195067:[[168970]],195068:[[19122]],195069:[[169110]],195070:[[38923]],195071:[[38923]]},64e3:{64e3:[[20999]],64001:[[24230]],64002:[[25299]],64003:[[31958]],64004:[[23429]],64005:[[27934]],64006:[[26292]],64007:[[36667]],64008:[[34892]],64009:[[38477]],64010:[[35211]],64011:[[24275]],64012:[[20800]],64013:[[21952]],64016:[[22618]],64018:[[26228]],64021:[[20958]],64022:[[29482]],64023:[[30410]],64024:[[31036]],64025:[[31070]],64026:[[31077]],64027:[[31119]],64028:[[38742]],64029:[[31934]],64030:[[32701]],64032:[[34322]],64034:[[35576]],64037:[[36920]],64038:[[37117]],64042:[[39151]],64043:[[39164]],64044:[[39208]],64045:[[40372]],64046:[[37086]],64047:[[38583]],64048:[[20398]],64049:[[20711]],64050:[[20813]],64051:[[21193]],64052:[[21220]],64053:[[21329]],64054:[[21917]],64055:[[22022]],64056:[[22120]],64057:[[22592]],64058:[[22696]],64059:[[23652]],64060:[[23662]],64061:[[24724]],64062:[[24936]],64063:[[24974]],64064:[[25074]],64065:[[25935]],64066:[[26082]],64067:[[26257]],64068:[[26757]],64069:[[28023]],64070:[[28186]],64071:[[28450]],64072:[[29038]],64073:[[29227]],64074:[[29730]],64075:[[30865]],64076:[[31038]],64077:[[31049]],64078:[[31048]],64079:[[31056]],64080:[[31062]],64081:[[31069]],64082:[[31117]],64083:[[31118]],64084:[[31296]],64085:[[31361]],64086:[[31680]],64087:[[32244]],64088:[[32265]],64089:[[32321]],64090:[[32626]],64091:[[32773]],64092:[[33261]],64093:[[33401]],64094:[[33401]],64095:[[33879]],64096:[[35088]],64097:[[35222]],64098:[[35585]],64099:[[35641]],64100:[[36051]],64101:[[36104]],64102:[[36790]],64103:[[36920]],64104:[[38627]],64105:[[38911]],64106:[[38971]],64107:[[24693]],64108:[[148206]],64109:[[33304]],64112:[[20006]],64113:[[20917]],64114:[[20840]],64115:[[20352]],64116:[[20805]],64117:[[20864]],64118:[[21191]],64119:[[21242]],64120:[[21917]],64121:[[21845]],64122:[[21913]],64123:[[21986]],64124:[[22618]],64125:[[22707]],64126:[[22852]],64127:[[22868]],64128:[[23138]],64129:[[23336]],64130:[[24274]],64131:[[24281]],64132:[[24425]],64133:[[24493]],64134:[[24792]],64135:[[24910]],64136:[[24840]],64137:[[24974]],64138:[[24928]],64139:[[25074]],64140:[[25140]],64141:[[25540]],64142:[[25628]],64143:[[25682]],64144:[[25942]],64145:[[26228]],64146:[[26391]],64147:[[26395]],64148:[[26454]],64149:[[27513]],64150:[[27578]],64151:[[27969]],64152:[[28379]],64153:[[28363]],64154:[[28450]],64155:[[28702]],64156:[[29038]],64157:[[30631]],64158:[[29237]],64159:[[29359]],64160:[[29482]],64161:[[29809]],64162:[[29958]],64163:[[30011]],64164:[[30237]],64165:[[30239]],64166:[[30410]],64167:[[30427]],64168:[[30452]],64169:[[30538]],64170:[[30528]],64171:[[30924]],64172:[[31409]],64173:[[31680]],64174:[[31867]],64175:[[32091]],64176:[[32244]],64177:[[32574]],64178:[[32773]],64179:[[33618]],64180:[[33775]],64181:[[34681]],64182:[[35137]],64183:[[35206]],64184:[[35222]],64185:[[35519]],64186:[[35576]],64187:[[35531]],64188:[[35585]],64189:[[35582]],64190:[[35565]],64191:[[35641]],64192:[[35722]],64193:[[36104]],64194:[[36664]],64195:[[36978]],64196:[[37273]],64197:[[37494]],64198:[[38524]],64199:[[38627]],64200:[[38742]],64201:[[38875]],64202:[[38911]],64203:[[38923]],64204:[[38971]],64205:[[39698]],64206:[[40860]],64207:[[141386]],64208:[[141380]],64209:[[144341]],64210:[[15261]],64211:[[16408]],64212:[[16441]],64213:[[152137]],64214:[[154832]],64215:[[163539]],64216:[[40771]],64217:[[40846]],195072:[[38953]],195073:[[169398]],195074:[[39138]],195075:[[19251]],195076:[[39209]],195077:[[39335]],195078:[[39362]],195079:[[39422]],195080:[[19406]],195081:[[170800]],195082:[[39698]],195083:[[4e4]],195084:[[40189]],195085:[[19662]],195086:[[19693]],195087:[[40295]],195088:[[172238]],195089:[[19704]],195090:[[172293]],195091:[[172558]],195092:[[172689]],195093:[[40635]],195094:[[19798]],195095:[[40697]],195096:[[40702]],195097:[[40709]],195098:[[40719]],195099:[[40726]],195100:[[40763]],195101:[[173568]]},64256:{64256:[[102,102],256],64257:[[102,105],256],64258:[[102,108],256],64259:[[102,102,105],256],64260:[[102,102,108],256],64261:[[383,116],256],64262:[[115,116],256],64275:[[1396,1398],256],64276:[[1396,1381],256],64277:[[1396,1387],256],64278:[[1406,1398],256],64279:[[1396,1389],256],64285:[[1497,1460],512],64286:[,26],64287:[[1522,1463],512],64288:[[1506],256],64289:[[1488],256],64290:[[1491],256],64291:[[1492],256],64292:[[1499],256],64293:[[1500],256],64294:[[1501],256],64295:[[1512],256],64296:[[1514],256],64297:[[43],256],64298:[[1513,1473],512],64299:[[1513,1474],512],64300:[[64329,1473],512],64301:[[64329,1474],512],64302:[[1488,1463],512],64303:[[1488,1464],512],64304:[[1488,1468],512],64305:[[1489,1468],512],64306:[[1490,1468],512],64307:[[1491,1468],512],64308:[[1492,1468],512],64309:[[1493,1468],512],64310:[[1494,1468],512],64312:[[1496,1468],512],64313:[[1497,1468],512],64314:[[1498,1468],512],64315:[[1499,1468],512],64316:[[1500,1468],512],64318:[[1502,1468],512],64320:[[1504,1468],512],64321:[[1505,1468],512],64323:[[1507,1468],512],64324:[[1508,1468],512],64326:[[1510,1468],512],64327:[[1511,1468],512],64328:[[1512,1468],512],64329:[[1513,1468],512],64330:[[1514,1468],512],64331:[[1493,1465],512],64332:[[1489,1471],512],64333:[[1499,1471],512],64334:[[1508,1471],512],64335:[[1488,1500],256],64336:[[1649],256],64337:[[1649],256],64338:[[1659],256],64339:[[1659],256],64340:[[1659],256],64341:[[1659],256],64342:[[1662],256],64343:[[1662],256],64344:[[1662],256],64345:[[1662],256],64346:[[1664],256],64347:[[1664],256],64348:[[1664],256],64349:[[1664],256],64350:[[1658],256],64351:[[1658],256],64352:[[1658],256],64353:[[1658],256],64354:[[1663],256],64355:[[1663],256],64356:[[1663],256],64357:[[1663],256],64358:[[1657],256],64359:[[1657],256],64360:[[1657],256],64361:[[1657],256],64362:[[1700],256],64363:[[1700],256],64364:[[1700],256],64365:[[1700],256],64366:[[1702],256],64367:[[1702],256],64368:[[1702],256],64369:[[1702],256],64370:[[1668],256],64371:[[1668],256],64372:[[1668],256],64373:[[1668],256],64374:[[1667],256],64375:[[1667],256],64376:[[1667],256],64377:[[1667],256],64378:[[1670],256],64379:[[1670],256],64380:[[1670],256],64381:[[1670],256],64382:[[1671],256],64383:[[1671],256],64384:[[1671],256],64385:[[1671],256],64386:[[1677],256],64387:[[1677],256],64388:[[1676],256],64389:[[1676],256],64390:[[1678],256],64391:[[1678],256],64392:[[1672],256],64393:[[1672],256],64394:[[1688],256],64395:[[1688],256],64396:[[1681],256],64397:[[1681],256],64398:[[1705],256],64399:[[1705],256],64400:[[1705],256],64401:[[1705],256],64402:[[1711],256],64403:[[1711],256],64404:[[1711],256],64405:[[1711],256],64406:[[1715],256],64407:[[1715],256],64408:[[1715],256],64409:[[1715],256],64410:[[1713],256],64411:[[1713],256],64412:[[1713],256],64413:[[1713],256],64414:[[1722],256],64415:[[1722],256],64416:[[1723],256],64417:[[1723],256],64418:[[1723],256],64419:[[1723],256],64420:[[1728],256],64421:[[1728],256],64422:[[1729],256],64423:[[1729],256],64424:[[1729],256],64425:[[1729],256],64426:[[1726],256],64427:[[1726],256],64428:[[1726],256],64429:[[1726],256],64430:[[1746],256],64431:[[1746],256],64432:[[1747],256],64433:[[1747],256],64467:[[1709],256],64468:[[1709],256],64469:[[1709],256],64470:[[1709],256],64471:[[1735],256],64472:[[1735],256],64473:[[1734],256],64474:[[1734],256],64475:[[1736],256],64476:[[1736],256],64477:[[1655],256],64478:[[1739],256],64479:[[1739],256],64480:[[1733],256],64481:[[1733],256],64482:[[1737],256],64483:[[1737],256],64484:[[1744],256],64485:[[1744],256],64486:[[1744],256],64487:[[1744],256],64488:[[1609],256],64489:[[1609],256],64490:[[1574,1575],256],64491:[[1574,1575],256],64492:[[1574,1749],256],64493:[[1574,1749],256],64494:[[1574,1608],256],64495:[[1574,1608],256],64496:[[1574,1735],256],64497:[[1574,1735],256],64498:[[1574,1734],256],64499:[[1574,1734],256],64500:[[1574,1736],256],64501:[[1574,1736],256],64502:[[1574,1744],256],64503:[[1574,1744],256],64504:[[1574,1744],256],64505:[[1574,1609],256],64506:[[1574,1609],256],64507:[[1574,1609],256],64508:[[1740],256],64509:[[1740],256],64510:[[1740],256],64511:[[1740],256]},64512:{64512:[[1574,1580],256],64513:[[1574,1581],256],64514:[[1574,1605],256],64515:[[1574,1609],256],64516:[[1574,1610],256],64517:[[1576,1580],256],64518:[[1576,1581],256],64519:[[1576,1582],256],64520:[[1576,1605],256],64521:[[1576,1609],256],64522:[[1576,1610],256],64523:[[1578,1580],256],64524:[[1578,1581],256],64525:[[1578,1582],256],64526:[[1578,1605],256],64527:[[1578,1609],256],64528:[[1578,1610],256],64529:[[1579,1580],256],64530:[[1579,1605],256],64531:[[1579,1609],256],64532:[[1579,1610],256],64533:[[1580,1581],256],64534:[[1580,1605],256],64535:[[1581,1580],256],64536:[[1581,1605],256],64537:[[1582,1580],256],64538:[[1582,1581],256],64539:[[1582,1605],256],64540:[[1587,1580],256],64541:[[1587,1581],256],64542:[[1587,1582],256],64543:[[1587,1605],256],64544:[[1589,1581],256],64545:[[1589,1605],256],64546:[[1590,1580],256],64547:[[1590,1581],256],64548:[[1590,1582],256],64549:[[1590,1605],256],64550:[[1591,1581],256],64551:[[1591,1605],256],64552:[[1592,1605],256],64553:[[1593,1580],256],64554:[[1593,1605],256],64555:[[1594,1580],256],64556:[[1594,1605],256],64557:[[1601,1580],256],64558:[[1601,1581],256],64559:[[1601,1582],256],64560:[[1601,1605],256],64561:[[1601,1609],256],64562:[[1601,1610],256],64563:[[1602,1581],256],64564:[[1602,1605],256],64565:[[1602,1609],256],64566:[[1602,1610],256],64567:[[1603,1575],256],64568:[[1603,1580],256],64569:[[1603,1581],256],64570:[[1603,1582],256],64571:[[1603,1604],256],64572:[[1603,1605],256],64573:[[1603,1609],256],64574:[[1603,1610],256],64575:[[1604,1580],256],64576:[[1604,1581],256],64577:[[1604,1582],256],64578:[[1604,1605],256],64579:[[1604,1609],256],64580:[[1604,1610],256],64581:[[1605,1580],256],64582:[[1605,1581],256],64583:[[1605,1582],256],64584:[[1605,1605],256],64585:[[1605,1609],256],64586:[[1605,1610],256],64587:[[1606,1580],256],64588:[[1606,1581],256],64589:[[1606,1582],256],64590:[[1606,1605],256],64591:[[1606,1609],256],64592:[[1606,1610],256],64593:[[1607,1580],256],64594:[[1607,1605],256],64595:[[1607,1609],256],64596:[[1607,1610],256],64597:[[1610,1580],256],64598:[[1610,1581],256],64599:[[1610,1582],256],64600:[[1610,1605],256],64601:[[1610,1609],256],64602:[[1610,1610],256],64603:[[1584,1648],256],64604:[[1585,1648],256],64605:[[1609,1648],256],64606:[[32,1612,1617],256],64607:[[32,1613,1617],256],64608:[[32,1614,1617],256],64609:[[32,1615,1617],256],64610:[[32,1616,1617],256],64611:[[32,1617,1648],256],64612:[[1574,1585],256],64613:[[1574,1586],256],64614:[[1574,1605],256],64615:[[1574,1606],256],64616:[[1574,1609],256],64617:[[1574,1610],256],64618:[[1576,1585],256],64619:[[1576,1586],256],64620:[[1576,1605],256],64621:[[1576,1606],256],64622:[[1576,1609],256],64623:[[1576,1610],256],64624:[[1578,1585],256],64625:[[1578,1586],256],64626:[[1578,1605],256],64627:[[1578,1606],256],64628:[[1578,1609],256],64629:[[1578,1610],256],64630:[[1579,1585],256],64631:[[1579,1586],256],64632:[[1579,1605],256],64633:[[1579,1606],256],64634:[[1579,1609],256],64635:[[1579,1610],256],64636:[[1601,1609],256],64637:[[1601,1610],256],64638:[[1602,1609],256],64639:[[1602,1610],256],64640:[[1603,1575],256],64641:[[1603,1604],256],64642:[[1603,1605],256],64643:[[1603,1609],256],64644:[[1603,1610],256],64645:[[1604,1605],256],64646:[[1604,1609],256],64647:[[1604,1610],256],64648:[[1605,1575],256],64649:[[1605,1605],256],64650:[[1606,1585],256],64651:[[1606,1586],256],64652:[[1606,1605],256],64653:[[1606,1606],256],64654:[[1606,1609],256],64655:[[1606,1610],256],64656:[[1609,1648],256],64657:[[1610,1585],256],64658:[[1610,1586],256],64659:[[1610,1605],256],64660:[[1610,1606],256],64661:[[1610,1609],256],64662:[[1610,1610],256],64663:[[1574,1580],256],64664:[[1574,1581],256],64665:[[1574,1582],256],64666:[[1574,1605],256],64667:[[1574,1607],256],64668:[[1576,1580],256],64669:[[1576,1581],256],64670:[[1576,1582],256],64671:[[1576,1605],256],64672:[[1576,1607],256],64673:[[1578,1580],256],64674:[[1578,1581],256],64675:[[1578,1582],256],64676:[[1578,1605],256],64677:[[1578,1607],256],64678:[[1579,1605],256],64679:[[1580,1581],256],64680:[[1580,1605],256],64681:[[1581,1580],256],64682:[[1581,1605],256],64683:[[1582,1580],256],64684:[[1582,1605],256],64685:[[1587,1580],256],64686:[[1587,1581],256],64687:[[1587,1582],256],64688:[[1587,1605],256],64689:[[1589,1581],256],64690:[[1589,1582],256],64691:[[1589,1605],256],64692:[[1590,1580],256],64693:[[1590,1581],256],64694:[[1590,1582],256],64695:[[1590,1605],256],64696:[[1591,1581],256],64697:[[1592,1605],256],64698:[[1593,1580],256],64699:[[1593,1605],256],64700:[[1594,1580],256],64701:[[1594,1605],256],64702:[[1601,1580],256],64703:[[1601,1581],256],64704:[[1601,1582],256],64705:[[1601,1605],256],64706:[[1602,1581],256],64707:[[1602,1605],256],64708:[[1603,1580],256],64709:[[1603,1581],256],64710:[[1603,1582],256],64711:[[1603,1604],256],64712:[[1603,1605],256],64713:[[1604,1580],256],64714:[[1604,1581],256],64715:[[1604,1582],256],64716:[[1604,1605],256],64717:[[1604,1607],256],64718:[[1605,1580],256],64719:[[1605,1581],256],64720:[[1605,1582],256],64721:[[1605,1605],256],64722:[[1606,1580],256],64723:[[1606,1581],256],64724:[[1606,1582],256],64725:[[1606,1605],256],64726:[[1606,1607],256],64727:[[1607,1580],256],64728:[[1607,1605],256],64729:[[1607,1648],256],64730:[[1610,1580],256],64731:[[1610,1581],256],64732:[[1610,1582],256],64733:[[1610,1605],256],64734:[[1610,1607],256],64735:[[1574,1605],256],64736:[[1574,1607],256],64737:[[1576,1605],256],64738:[[1576,1607],256],64739:[[1578,1605],256],64740:[[1578,1607],256],64741:[[1579,1605],256],64742:[[1579,1607],256],64743:[[1587,1605],256],64744:[[1587,1607],256],64745:[[1588,1605],256],64746:[[1588,1607],256],64747:[[1603,1604],256],64748:[[1603,1605],256],64749:[[1604,1605],256],64750:[[1606,1605],256],64751:[[1606,1607],256],64752:[[1610,1605],256],64753:[[1610,1607],256],64754:[[1600,1614,1617],256],64755:[[1600,1615,1617],256],64756:[[1600,1616,1617],256],64757:[[1591,1609],256],64758:[[1591,1610],256],64759:[[1593,1609],256],64760:[[1593,1610],256],64761:[[1594,1609],256],64762:[[1594,1610],256],64763:[[1587,1609],256],64764:[[1587,1610],256],64765:[[1588,1609],256],64766:[[1588,1610],256],64767:[[1581,1609],256]},64768:{64768:[[1581,1610],256],64769:[[1580,1609],256],64770:[[1580,1610],256],64771:[[1582,1609],256],64772:[[1582,1610],256],64773:[[1589,1609],256],64774:[[1589,1610],256],64775:[[1590,1609],256],64776:[[1590,1610],256],64777:[[1588,1580],256],64778:[[1588,1581],256],64779:[[1588,1582],256],64780:[[1588,1605],256],64781:[[1588,1585],256],64782:[[1587,1585],256],64783:[[1589,1585],256],64784:[[1590,1585],256],64785:[[1591,1609],256],64786:[[1591,1610],256],64787:[[1593,1609],256],64788:[[1593,1610],256],64789:[[1594,1609],256],64790:[[1594,1610],256],64791:[[1587,1609],256],64792:[[1587,1610],256],64793:[[1588,1609],256],64794:[[1588,1610],256],64795:[[1581,1609],256],64796:[[1581,1610],256],64797:[[1580,1609],256],64798:[[1580,1610],256],64799:[[1582,1609],256],64800:[[1582,1610],256],64801:[[1589,1609],256],64802:[[1589,1610],256],64803:[[1590,1609],256],64804:[[1590,1610],256],64805:[[1588,1580],256],64806:[[1588,1581],256],64807:[[1588,1582],256],64808:[[1588,1605],256],64809:[[1588,1585],256],64810:[[1587,1585],256],64811:[[1589,1585],256],64812:[[1590,1585],256],64813:[[1588,1580],256],64814:[[1588,1581],256],64815:[[1588,1582],256],64816:[[1588,1605],256],64817:[[1587,1607],256],64818:[[1588,1607],256],64819:[[1591,1605],256],64820:[[1587,1580],256],64821:[[1587,1581],256],64822:[[1587,1582],256],64823:[[1588,1580],256],64824:[[1588,1581],256],64825:[[1588,1582],256],64826:[[1591,1605],256],64827:[[1592,1605],256],64828:[[1575,1611],256],64829:[[1575,1611],256],64848:[[1578,1580,1605],256],64849:[[1578,1581,1580],256],64850:[[1578,1581,1580],256],64851:[[1578,1581,1605],256],64852:[[1578,1582,1605],256],64853:[[1578,1605,1580],256],64854:[[1578,1605,1581],256],64855:[[1578,1605,1582],256],64856:[[1580,1605,1581],256],64857:[[1580,1605,1581],256],64858:[[1581,1605,1610],256],64859:[[1581,1605,1609],256],64860:[[1587,1581,1580],256],64861:[[1587,1580,1581],256],64862:[[1587,1580,1609],256],64863:[[1587,1605,1581],256],64864:[[1587,1605,1581],256],64865:[[1587,1605,1580],256],64866:[[1587,1605,1605],256],64867:[[1587,1605,1605],256],64868:[[1589,1581,1581],256],64869:[[1589,1581,1581],256],64870:[[1589,1605,1605],256],64871:[[1588,1581,1605],256],64872:[[1588,1581,1605],256],64873:[[1588,1580,1610],256],64874:[[1588,1605,1582],256],64875:[[1588,1605,1582],256],64876:[[1588,1605,1605],256],64877:[[1588,1605,1605],256],64878:[[1590,1581,1609],256],64879:[[1590,1582,1605],256],64880:[[1590,1582,1605],256],64881:[[1591,1605,1581],256],64882:[[1591,1605,1581],256],64883:[[1591,1605,1605],256],64884:[[1591,1605,1610],256],64885:[[1593,1580,1605],256],64886:[[1593,1605,1605],256],64887:[[1593,1605,1605],256],64888:[[1593,1605,1609],256],64889:[[1594,1605,1605],256],64890:[[1594,1605,1610],256],64891:[[1594,1605,1609],256],64892:[[1601,1582,1605],256],64893:[[1601,1582,1605],256],64894:[[1602,1605,1581],256],64895:[[1602,1605,1605],256],64896:[[1604,1581,1605],256],64897:[[1604,1581,1610],256],64898:[[1604,1581,1609],256],64899:[[1604,1580,1580],256],64900:[[1604,1580,1580],256],64901:[[1604,1582,1605],256],64902:[[1604,1582,1605],256],64903:[[1604,1605,1581],256],64904:[[1604,1605,1581],256],64905:[[1605,1581,1580],256],64906:[[1605,1581,1605],256],64907:[[1605,1581,1610],256],64908:[[1605,1580,1581],256],64909:[[1605,1580,1605],256],64910:[[1605,1582,1580],256],64911:[[1605,1582,1605],256],64914:[[1605,1580,1582],256],64915:[[1607,1605,1580],256],64916:[[1607,1605,1605],256],64917:[[1606,1581,1605],256],64918:[[1606,1581,1609],256],64919:[[1606,1580,1605],256],64920:[[1606,1580,1605],256],64921:[[1606,1580,1609],256],64922:[[1606,1605,1610],256],64923:[[1606,1605,1609],256],64924:[[1610,1605,1605],256],64925:[[1610,1605,1605],256],64926:[[1576,1582,1610],256],64927:[[1578,1580,1610],256],64928:[[1578,1580,1609],256],64929:[[1578,1582,1610],256],64930:[[1578,1582,1609],256],64931:[[1578,1605,1610],256],64932:[[1578,1605,1609],256],64933:[[1580,1605,1610],256],64934:[[1580,1581,1609],256],64935:[[1580,1605,1609],256],64936:[[1587,1582,1609],256],64937:[[1589,1581,1610],256],64938:[[1588,1581,1610],256],64939:[[1590,1581,1610],256],64940:[[1604,1580,1610],256],64941:[[1604,1605,1610],256],64942:[[1610,1581,1610],256],64943:[[1610,1580,1610],256],64944:[[1610,1605,1610],256],64945:[[1605,1605,1610],256],64946:[[1602,1605,1610],256],64947:[[1606,1581,1610],256],64948:[[1602,1605,1581],256],64949:[[1604,1581,1605],256],64950:[[1593,1605,1610],256],64951:[[1603,1605,1610],256],64952:[[1606,1580,1581],256],64953:[[1605,1582,1610],256],64954:[[1604,1580,1605],256],64955:[[1603,1605,1605],256],64956:[[1604,1580,1605],256],64957:[[1606,1580,1581],256],64958:[[1580,1581,1610],256],64959:[[1581,1580,1610],256],64960:[[1605,1580,1610],256],64961:[[1601,1605,1610],256],64962:[[1576,1581,1610],256],64963:[[1603,1605,1605],256],64964:[[1593,1580,1605],256],64965:[[1589,1605,1605],256],64966:[[1587,1582,1610],256],64967:[[1606,1580,1610],256],65008:[[1589,1604,1746],256],65009:[[1602,1604,1746],256],65010:[[1575,1604,1604,1607],256],65011:[[1575,1603,1576,1585],256],65012:[[1605,1581,1605,1583],256],65013:[[1589,1604,1593,1605],256],65014:[[1585,1587,1608,1604],256],65015:[[1593,1604,1610,1607],256],65016:[[1608,1587,1604,1605],256],65017:[[1589,1604,1609],256],65018:[[1589,1604,1609,32,1575,1604,1604,1607,32,1593,1604,1610,1607,32,1608,1587,1604,1605],256],65019:[[1580,1604,32,1580,1604,1575,1604,1607],256],65020:[[1585,1740,1575,1604],256]},65024:{65040:[[44],256],65041:[[12289],256],65042:[[12290],256],65043:[[58],256],65044:[[59],256],65045:[[33],256],65046:[[63],256],65047:[[12310],256],65048:[[12311],256],65049:[[8230],256],65056:[,230],65057:[,230],65058:[,230],65059:[,230],65060:[,230],65061:[,230],65062:[,230],65063:[,220],65064:[,220],65065:[,220],65066:[,220],65067:[,220],65068:[,220],65069:[,220],65072:[[8229],256],65073:[[8212],256],65074:[[8211],256],65075:[[95],256],65076:[[95],256],65077:[[40],256],65078:[[41],256],65079:[[123],256],65080:[[125],256],65081:[[12308],256],65082:[[12309],256],65083:[[12304],256],65084:[[12305],256],65085:[[12298],256],65086:[[12299],256],65087:[[12296],256],65088:[[12297],256],65089:[[12300],256],65090:[[12301],256],65091:[[12302],256],65092:[[12303],256],65095:[[91],256],65096:[[93],256],65097:[[8254],256],65098:[[8254],256],65099:[[8254],256],65100:[[8254],256],65101:[[95],256],65102:[[95],256],65103:[[95],256],65104:[[44],256],65105:[[12289],256],65106:[[46],256],65108:[[59],256],65109:[[58],256],65110:[[63],256],65111:[[33],256],65112:[[8212],256],65113:[[40],256],65114:[[41],256],65115:[[123],256],65116:[[125],256],65117:[[12308],256],65118:[[12309],256],65119:[[35],256],65120:[[38],256],65121:[[42],256],65122:[[43],256],65123:[[45],256],65124:[[60],256],65125:[[62],256],65126:[[61],256],65128:[[92],256],65129:[[36],256],65130:[[37],256],65131:[[64],256],65136:[[32,1611],256],65137:[[1600,1611],256],65138:[[32,1612],256],65140:[[32,1613],256],65142:[[32,1614],256],65143:[[1600,1614],256],65144:[[32,1615],256],65145:[[1600,1615],256],65146:[[32,1616],256],65147:[[1600,1616],256],65148:[[32,1617],256],65149:[[1600,1617],256],65150:[[32,1618],256],65151:[[1600,1618],256],65152:[[1569],256],65153:[[1570],256],65154:[[1570],256],65155:[[1571],256],65156:[[1571],256],65157:[[1572],256],65158:[[1572],256],65159:[[1573],256],65160:[[1573],256],65161:[[1574],256],65162:[[1574],256],65163:[[1574],256],65164:[[1574],256],65165:[[1575],256],65166:[[1575],256],65167:[[1576],256],65168:[[1576],256],65169:[[1576],256],65170:[[1576],256],65171:[[1577],256],65172:[[1577],256],65173:[[1578],256],65174:[[1578],256],65175:[[1578],256],65176:[[1578],256],65177:[[1579],256],65178:[[1579],256],65179:[[1579],256],65180:[[1579],256],65181:[[1580],256],65182:[[1580],256],65183:[[1580],256],65184:[[1580],256],65185:[[1581],256],65186:[[1581],256],65187:[[1581],256],65188:[[1581],256],65189:[[1582],256],65190:[[1582],256],65191:[[1582],256],65192:[[1582],256],65193:[[1583],256],65194:[[1583],256],65195:[[1584],256],65196:[[1584],256],65197:[[1585],256],65198:[[1585],256],65199:[[1586],256],65200:[[1586],256],65201:[[1587],256],65202:[[1587],256],65203:[[1587],256],65204:[[1587],256],65205:[[1588],256],65206:[[1588],256],65207:[[1588],256],65208:[[1588],256],65209:[[1589],256],65210:[[1589],256],65211:[[1589],256],65212:[[1589],256],65213:[[1590],256],65214:[[1590],256],65215:[[1590],256],65216:[[1590],256],65217:[[1591],256],65218:[[1591],256],65219:[[1591],256],65220:[[1591],256],65221:[[1592],256],65222:[[1592],256],65223:[[1592],256],65224:[[1592],256],65225:[[1593],256],65226:[[1593],256],65227:[[1593],256],65228:[[1593],256],65229:[[1594],256],65230:[[1594],256],65231:[[1594],256],65232:[[1594],256],65233:[[1601],256],65234:[[1601],256],65235:[[1601],256],65236:[[1601],256],65237:[[1602],256],65238:[[1602],256],65239:[[1602],256],65240:[[1602],256],65241:[[1603],256],65242:[[1603],256],65243:[[1603],256],65244:[[1603],256],65245:[[1604],256],65246:[[1604],256],65247:[[1604],256],65248:[[1604],256],65249:[[1605],256],65250:[[1605],256],65251:[[1605],256],65252:[[1605],256],65253:[[1606],256],65254:[[1606],256],65255:[[1606],256],65256:[[1606],256],65257:[[1607],256],65258:[[1607],256],65259:[[1607],256],65260:[[1607],256],65261:[[1608],256],65262:[[1608],256],65263:[[1609],256],65264:[[1609],256],65265:[[1610],256],65266:[[1610],256],65267:[[1610],256],65268:[[1610],256],65269:[[1604,1570],256],65270:[[1604,1570],256],65271:[[1604,1571],256],65272:[[1604,1571],256],65273:[[1604,1573],256],65274:[[1604,1573],256],65275:[[1604,1575],256],65276:[[1604,1575],256]},65280:{65281:[[33],256],65282:[[34],256],65283:[[35],256],65284:[[36],256],65285:[[37],256],65286:[[38],256],65287:[[39],256],65288:[[40],256],65289:[[41],256],65290:[[42],256],65291:[[43],256],65292:[[44],256],65293:[[45],256],65294:[[46],256],65295:[[47],256],65296:[[48],256],65297:[[49],256],65298:[[50],256],65299:[[51],256],65300:[[52],256],65301:[[53],256],65302:[[54],256],65303:[[55],256],65304:[[56],256],65305:[[57],256],65306:[[58],256],65307:[[59],256],65308:[[60],256],65309:[[61],256],65310:[[62],256],65311:[[63],256],65312:[[64],256],65313:[[65],256],65314:[[66],256],65315:[[67],256],65316:[[68],256],65317:[[69],256],65318:[[70],256],65319:[[71],256],65320:[[72],256],65321:[[73],256],65322:[[74],256],65323:[[75],256],65324:[[76],256],65325:[[77],256],65326:[[78],256],65327:[[79],256],65328:[[80],256],65329:[[81],256],65330:[[82],256],65331:[[83],256],65332:[[84],256],65333:[[85],256],65334:[[86],256],65335:[[87],256],65336:[[88],256],65337:[[89],256],65338:[[90],256],65339:[[91],256],65340:[[92],256],65341:[[93],256],65342:[[94],256],65343:[[95],256],65344:[[96],256],65345:[[97],256],65346:[[98],256],65347:[[99],256],65348:[[100],256],65349:[[101],256],65350:[[102],256],65351:[[103],256],65352:[[104],256],65353:[[105],256],65354:[[106],256],65355:[[107],256],65356:[[108],256],65357:[[109],256],65358:[[110],256],65359:[[111],256],65360:[[112],256],65361:[[113],256],65362:[[114],256],65363:[[115],256],65364:[[116],256],65365:[[117],256],65366:[[118],256],65367:[[119],256],65368:[[120],256],65369:[[121],256],65370:[[122],256],65371:[[123],256],65372:[[124],256],65373:[[125],256],65374:[[126],256],65375:[[10629],256],65376:[[10630],256],65377:[[12290],256],65378:[[12300],256],65379:[[12301],256],65380:[[12289],256],65381:[[12539],256],65382:[[12530],256],65383:[[12449],256],65384:[[12451],256],65385:[[12453],256],65386:[[12455],256],65387:[[12457],256],65388:[[12515],256],65389:[[12517],256],65390:[[12519],256],65391:[[12483],256],65392:[[12540],256],65393:[[12450],256],65394:[[12452],256],65395:[[12454],256],65396:[[12456],256],65397:[[12458],256],65398:[[12459],256],65399:[[12461],256],65400:[[12463],256],65401:[[12465],256],65402:[[12467],256],65403:[[12469],256],65404:[[12471],256],65405:[[12473],256],65406:[[12475],256],65407:[[12477],256],65408:[[12479],256],65409:[[12481],256],65410:[[12484],256],65411:[[12486],256],65412:[[12488],256],65413:[[12490],256],65414:[[12491],256],65415:[[12492],256],65416:[[12493],256],65417:[[12494],256],65418:[[12495],256],65419:[[12498],256],65420:[[12501],256],65421:[[12504],256],65422:[[12507],256],65423:[[12510],256],65424:[[12511],256],65425:[[12512],256],65426:[[12513],256],65427:[[12514],256],65428:[[12516],256],65429:[[12518],256],65430:[[12520],256],65431:[[12521],256],65432:[[12522],256],65433:[[12523],256],65434:[[12524],256],65435:[[12525],256],65436:[[12527],256],65437:[[12531],256],65438:[[12441],256],65439:[[12442],256],65440:[[12644],256],65441:[[12593],256],65442:[[12594],256],65443:[[12595],256],65444:[[12596],256],65445:[[12597],256],65446:[[12598],256],65447:[[12599],256],65448:[[12600],256],65449:[[12601],256],65450:[[12602],256],65451:[[12603],256],65452:[[12604],256],65453:[[12605],256],65454:[[12606],256],65455:[[12607],256],65456:[[12608],256],65457:[[12609],256],65458:[[12610],256],65459:[[12611],256],65460:[[12612],256],65461:[[12613],256],65462:[[12614],256],65463:[[12615],256],65464:[[12616],256],65465:[[12617],256],65466:[[12618],256],65467:[[12619],256],65468:[[12620],256],65469:[[12621],256],65470:[[12622],256],65474:[[12623],256],65475:[[12624],256],65476:[[12625],256],65477:[[12626],256],65478:[[12627],256],65479:[[12628],256],65482:[[12629],256],65483:[[12630],256],65484:[[12631],256],65485:[[12632],256],65486:[[12633],256],65487:[[12634],256],65490:[[12635],256],65491:[[12636],256],65492:[[12637],256],65493:[[12638],256],65494:[[12639],256],65495:[[12640],256],65498:[[12641],256],65499:[[12642],256],65500:[[12643],256],65504:[[162],256],65505:[[163],256],65506:[[172],256],65507:[[175],256],65508:[[166],256],65509:[[165],256],65510:[[8361],256],65512:[[9474],256],65513:[[8592],256],65514:[[8593],256],65515:[[8594],256],65516:[[8595],256],65517:[[9632],256],65518:[[9675],256]}};var _={nfc:f,nfd:I,nfkc:p,nfkd:y};typeof j4=="object"?j4.exports=_:typeof define=="function"&&define.amd?define("unorm",function(){return _}):e.unorm=_,_.shimApplied=!1,String.prototype.normalize||(Object.defineProperty(String.prototype,"normalize",{enumerable:!1,configurable:!0,writable:!0,value:function(){var b=""+this,d=arguments[0]===void 0?"NFC":arguments[0];if(this===null||this===void 0)throw new TypeError("Cannot call method on "+Object.prototype.toString.call(this));if(d==="NFC")return _.nfc(b);if(d==="NFD")return _.nfd(b);if(d==="NFKC")return _.nfkc(b);if(d==="NFKD")return _.nfkd(b);throw new RangeError("Invalid normalization form: "+d)}}),_.shimApplied=!0)})(zB)});var ZB=k((h5e,GB)=>{"use strict";v();var VB=cr();function Vre(e,t,r,i){var n=64;if(i>(Math.pow(2,32)-1)*n)throw Error("Requested key length too long");if(typeof e!="string"&&!h.Buffer.isBuffer(e))throw new TypeError("key must a string or Buffer");if(typeof t!="string"&&!h.Buffer.isBuffer(t))throw new TypeError("salt must a string or Buffer");typeof e=="string"&&(e=h.Buffer.from(e)),typeof t=="string"&&(t=h.Buffer.from(t));var o=h.Buffer.alloc(i),a=h.Buffer.alloc(n),s=h.Buffer.alloc(n),u=h.Buffer.alloc(t.length+4),c=Math.ceil(i/n),l=i-(c-1)*n;t.copy(u,0,0,t.length);for(var m=1;m<=c;m++){u[t.length+0]=m>>24&255,u[t.length+1]=m>>16&255,u[t.length+2]=m>>8&255,u[t.length+3]=m>>0&255,a=VB.sha512hmac(u,e),a.copy(s,0,0,n);for(var w=1;w<r;w++){a=VB.sha512hmac(a,e);for(var E=0;E<n;E++)s[E]^=a[E]}var P=(m-1)*n,M=m===c?l:n;s.copy(o,P,0,M)}return o}GB.exports=Vre});var $B=k((p5e,YB)=>{"use strict";v();var WB=_r();function Gre(e,t,r,i){var n=64;if(i>(Math.pow(2,32)-1)*n)throw Error("Requested key length too long");if(typeof e!="string"&&!h.Buffer.isBuffer(e))throw new TypeError("key must a string or Buffer");if(typeof t!="string"&&!h.Buffer.isBuffer(t))throw new TypeError("salt must a string or Buffer");typeof e=="string"&&(e=h.Buffer.from(e)),typeof t=="string"&&(t=h.Buffer.from(t));var o=h.Buffer.alloc(i),a=h.Buffer.alloc(n),s=h.Buffer.alloc(n),u=h.Buffer.alloc(t.length+4),c=Math.ceil(i/n),l=i-(c-1)*n;t.copy(u,0,0,t.length);for(var m=1;m<=c;m++){u[t.length+0]=m>>24&255,u[t.length+1]=m>>16&255,u[t.length+2]=m>>8&255,u[t.length+3]=m>>0&255,a=WB.createHmac("sha512",e).update(u).digest(),a.copy(s,0,0,n);for(var w=1;w<r;w++){a=WB.createHmac("sha512",e).update(a).digest();for(var E=0;E<n;E++)s[E]^=a[E]}var P=(m-1)*n,M=m===c?l:n;s.copy(o,P,0,M)}return o}YB.exports=Gre});var XB=k((v5e,z4)=>{v();A.default.browser?z4.exports=ZB():z4.exports=$B()});var QB=k((y5e,JB)=>{"use strict";v();var Zre={name:"Mnemonic",message:"Internal Error on bsv-mnemonic module {0}",errors:[{name:"InvalidEntropy",message:"Entropy length must be an even multiple of 11 bits: {0}"},{name:"UnknownWordlist",message:"Could not detect the used word list: {0}"},{name:"InvalidMnemonic",message:"Mnemonic string is invalid: {0}"}]};JB.exports=ke().errors.extend(Zre)});var tM=k((_5e,eM)=>{"use strict";v();var Wre=["\u7684","\u4E00","\u662F","\u5728","\u4E0D","\u4E86","\u6709","\u548C","\u4EBA","\u8FD9","\u4E2D","\u5927","\u4E3A","\u4E0A","\u4E2A","\u56FD","\u6211","\u4EE5","\u8981","\u4ED6","\u65F6","\u6765","\u7528","\u4EEC","\u751F","\u5230","\u4F5C","\u5730","\u4E8E","\u51FA","\u5C31","\u5206","\u5BF9","\u6210","\u4F1A","\u53EF","\u4E3B","\u53D1","\u5E74","\u52A8","\u540C","\u5DE5","\u4E5F","\u80FD","\u4E0B","\u8FC7","\u5B50","\u8BF4","\u4EA7","\u79CD","\u9762","\u800C","\u65B9","\u540E","\u591A","\u5B9A","\u884C","\u5B66","\u6CD5","\u6240","\u6C11","\u5F97","\u7ECF","\u5341","\u4E09","\u4E4B","\u8FDB","\u7740","\u7B49","\u90E8","\u5EA6","\u5BB6","\u7535","\u529B","\u91CC","\u5982","\u6C34","\u5316","\u9AD8","\u81EA","\u4E8C","\u7406","\u8D77","\u5C0F","\u7269","\u73B0","\u5B9E","\u52A0","\u91CF","\u90FD","\u4E24","\u4F53","\u5236","\u673A","\u5F53","\u4F7F","\u70B9","\u4ECE","\u4E1A","\u672C","\u53BB","\u628A","\u6027","\u597D","\u5E94","\u5F00","\u5B83","\u5408","\u8FD8","\u56E0","\u7531","\u5176","\u4E9B","\u7136","\u524D","\u5916","\u5929","\u653F","\u56DB","\u65E5","\u90A3","\u793E","\u4E49","\u4E8B","\u5E73","\u5F62","\u76F8","\u5168","\u8868","\u95F4","\u6837","\u4E0E","\u5173","\u5404","\u91CD","\u65B0","\u7EBF","\u5185","\u6570","\u6B63","\u5FC3","\u53CD","\u4F60","\u660E","\u770B","\u539F","\u53C8","\u4E48","\u5229","\u6BD4","\u6216","\u4F46","\u8D28","\u6C14","\u7B2C","\u5411","\u9053","\u547D","\u6B64","\u53D8","\u6761","\u53EA","\u6CA1","\u7ED3","\u89E3","\u95EE","\u610F","\u5EFA","\u6708","\u516C","\u65E0","\u7CFB","\u519B","\u5F88","\u60C5","\u8005","\u6700","\u7ACB","\u4EE3","\u60F3","\u5DF2","\u901A","\u5E76","\u63D0","\u76F4","\u9898","\u515A","\u7A0B","\u5C55","\u4E94","\u679C","\u6599","\u8C61","\u5458","\u9769","\u4F4D","\u5165","\u5E38","\u6587","\u603B","\u6B21","\u54C1","\u5F0F","\u6D3B","\u8BBE","\u53CA","\u7BA1","\u7279","\u4EF6","\u957F","\u6C42","\u8001","\u5934","\u57FA","\u8D44","\u8FB9","\u6D41","\u8DEF","\u7EA7","\u5C11","\u56FE","\u5C71","\u7EDF","\u63A5","\u77E5","\u8F83","\u5C06","\u7EC4","\u89C1","\u8BA1","\u522B","\u5979","\u624B","\u89D2","\u671F","\u6839","\u8BBA","\u8FD0","\u519C","\u6307","\u51E0","\u4E5D","\u533A","\u5F3A","\u653E","\u51B3","\u897F","\u88AB","\u5E72","\u505A","\u5FC5","\u6218","\u5148","\u56DE","\u5219","\u4EFB","\u53D6","\u636E","\u5904","\u961F","\u5357","\u7ED9","\u8272","\u5149","\u95E8","\u5373","\u4FDD","\u6CBB","\u5317","\u9020","\u767E","\u89C4","\u70ED","\u9886","\u4E03","\u6D77","\u53E3","\u4E1C","\u5BFC","\u5668","\u538B","\u5FD7","\u4E16","\u91D1","\u589E","\u4E89","\u6D4E","\u9636","\u6CB9","\u601D","\u672F","\u6781","\u4EA4","\u53D7","\u8054","\u4EC0","\u8BA4","\u516D","\u5171","\u6743","\u6536","\u8BC1","\u6539","\u6E05","\u7F8E","\u518D","\u91C7","\u8F6C","\u66F4","\u5355","\u98CE","\u5207","\u6253","\u767D","\u6559","\u901F","\u82B1","\u5E26","\u5B89","\u573A","\u8EAB","\u8F66","\u4F8B","\u771F","\u52A1","\u5177","\u4E07","\u6BCF","\u76EE","\u81F3","\u8FBE","\u8D70","\u79EF","\u793A","\u8BAE","\u58F0","\u62A5","\u6597","\u5B8C","\u7C7B","\u516B","\u79BB","\u534E","\u540D","\u786E","\u624D","\u79D1","\u5F20","\u4FE1","\u9A6C","\u8282","\u8BDD","\u7C73","\u6574","\u7A7A","\u5143","\u51B5","\u4ECA","\u96C6","\u6E29","\u4F20","\u571F","\u8BB8","\u6B65","\u7FA4","\u5E7F","\u77F3","\u8BB0","\u9700","\u6BB5","\u7814","\u754C","\u62C9","\u6797","\u5F8B","\u53EB","\u4E14","\u7A76","\u89C2","\u8D8A","\u7EC7","\u88C5","\u5F71","\u7B97","\u4F4E","\u6301","\u97F3","\u4F17","\u4E66","\u5E03","\u590D","\u5BB9","\u513F","\u987B","\u9645","\u5546","\u975E","\u9A8C","\u8FDE","\u65AD","\u6DF1","\u96BE","\u8FD1","\u77FF","\u5343","\u5468","\u59D4","\u7D20","\u6280","\u5907","\u534A","\u529E","\u9752","\u7701","\u5217","\u4E60","\u54CD","\u7EA6","\u652F","\u822C","\u53F2","\u611F","\u52B3","\u4FBF","\u56E2","\u5F80","\u9178","\u5386","\u5E02","\u514B","\u4F55","\u9664","\u6D88","\u6784","\u5E9C","\u79F0","\u592A","\u51C6","\u7CBE","\u503C","\u53F7","\u7387","\u65CF","\u7EF4","\u5212","\u9009","\u6807","\u5199","\u5B58","\u5019","\u6BDB","\u4EB2","\u5FEB","\u6548","\u65AF","\u9662","\u67E5","\u6C5F","\u578B","\u773C","\u738B","\u6309","\u683C","\u517B","\u6613","\u7F6E","\u6D3E","\u5C42","\u7247","\u59CB","\u5374","\u4E13","\u72B6","\u80B2","\u5382","\u4EAC","\u8BC6","\u9002","\u5C5E","\u5706","\u5305","\u706B","\u4F4F","\u8C03","\u6EE1","\u53BF","\u5C40","\u7167","\u53C2","\u7EA2","\u7EC6","\u5F15","\u542C","\u8BE5","\u94C1","\u4EF7","\u4E25","\u9996","\u5E95","\u6DB2","\u5B98","\u5FB7","\u968F","\u75C5","\u82CF","\u5931","\u5C14","\u6B7B","\u8BB2","\u914D","\u5973","\u9EC4","\u63A8","\u663E","\u8C08","\u7F6A","\u795E","\u827A","\u5462","\u5E2D","\u542B","\u4F01","\u671B","\u5BC6","\u6279","\u8425","\u9879","\u9632","\u4E3E","\u7403","\u82F1","\u6C27","\u52BF","\u544A","\u674E","\u53F0","\u843D","\u6728","\u5E2E","\u8F6E","\u7834","\u4E9A","\u5E08","\u56F4","\u6CE8","\u8FDC","\u5B57","\u6750","\u6392","\u4F9B","\u6CB3","\u6001","\u5C01","\u53E6","\u65BD","\u51CF","\u6811","\u6EB6","\u600E","\u6B62","\u6848","\u8A00","\u58EB","\u5747","\u6B66","\u56FA","\u53F6","\u9C7C","\u6CE2","\u89C6","\u4EC5","\u8D39","\u7D27","\u7231","\u5DE6","\u7AE0","\u65E9","\u671D","\u5BB3","\u7EED","\u8F7B","\u670D","\u8BD5","\u98DF","\u5145","\u5175","\u6E90","\u5224","\u62A4","\u53F8","\u8DB3","\u67D0","\u7EC3","\u5DEE","\u81F4","\u677F","\u7530","\u964D","\u9ED1","\u72AF","\u8D1F","\u51FB","\u8303","\u7EE7","\u5174","\u4F3C","\u4F59","\u575A","\u66F2","\u8F93","\u4FEE","\u6545","\u57CE","\u592B","\u591F","\u9001","\u7B14","\u8239","\u5360","\u53F3","\u8D22","\u5403","\u5BCC","\u6625","\u804C","\u89C9","\u6C49","\u753B","\u529F","\u5DF4","\u8DDF","\u867D","\u6742","\u98DE","\u68C0","\u5438","\u52A9","\u5347","\u9633","\u4E92","\u521D","\u521B","\u6297","\u8003","\u6295","\u574F","\u7B56","\u53E4","\u5F84","\u6362","\u672A","\u8DD1","\u7559","\u94A2","\u66FE","\u7AEF","\u8D23","\u7AD9","\u7B80","\u8FF0","\u94B1","\u526F","\u5C3D","\u5E1D","\u5C04","\u8349","\u51B2","\u627F","\u72EC","\u4EE4","\u9650","\u963F","\u5BA3","\u73AF","\u53CC","\u8BF7","\u8D85","\u5FAE","\u8BA9","\u63A7","\u5DDE","\u826F","\u8F74","\u627E","\u5426","\u7EAA","\u76CA","\u4F9D","\u4F18","\u9876","\u7840","\u8F7D","\u5012","\u623F","\u7A81","\u5750","\u7C89","\u654C","\u7565","\u5BA2","\u8881","\u51B7","\u80DC","\u7EDD","\u6790","\u5757","\u5242","\u6D4B","\u4E1D","\u534F","\u8BC9","\u5FF5","\u9648","\u4ECD","\u7F57","\u76D0","\u53CB","\u6D0B","\u9519","\u82E6","\u591C","\u5211","\u79FB","\u9891","\u9010","\u9760","\u6DF7","\u6BCD","\u77ED","\u76AE","\u7EC8","\u805A","\u6C7D","\u6751","\u4E91","\u54EA","\u65E2","\u8DDD","\u536B","\u505C","\u70C8","\u592E","\u5BDF","\u70E7","\u8FC5","\u5883","\u82E5","\u5370","\u6D32","\u523B","\u62EC","\u6FC0","\u5B54","\u641E","\u751A","\u5BA4","\u5F85","\u6838","\u6821","\u6563","\u4FB5","\u5427","\u7532","\u6E38","\u4E45","\u83DC","\u5473","\u65E7","\u6A21","\u6E56","\u8D27","\u635F","\u9884","\u963B","\u6BEB","\u666E","\u7A33","\u4E59","\u5988","\u690D","\u606F","\u6269","\u94F6","\u8BED","\u6325","\u9152","\u5B88","\u62FF","\u5E8F","\u7EB8","\u533B","\u7F3A","\u96E8","\u5417","\u9488","\u5218","\u554A","\u6025","\u5531","\u8BEF","\u8BAD","\u613F","\u5BA1","\u9644","\u83B7","\u8336","\u9C9C","\u7CAE","\u65A4","\u5B69","\u8131","\u786B","\u80A5","\u5584","\u9F99","\u6F14","\u7236","\u6E10","\u8840","\u6B22","\u68B0","\u638C","\u6B4C","\u6C99","\u521A","\u653B","\u8C13","\u76FE","\u8BA8","\u665A","\u7C92","\u4E71","\u71C3","\u77DB","\u4E4E","\u6740","\u836F","\u5B81","\u9C81","\u8D35","\u949F","\u7164","\u8BFB","\u73ED","\u4F2F","\u9999","\u4ECB","\u8FEB","\u53E5","\u4E30","\u57F9","\u63E1","\u5170","\u62C5","\u5F26","\u86CB","\u6C89","\u5047","\u7A7F","\u6267","\u7B54","\u4E50","\u8C01","\u987A","\u70DF","\u7F29","\u5F81","\u8138","\u559C","\u677E","\u811A","\u56F0","\u5F02","\u514D","\u80CC","\u661F","\u798F","\u4E70","\u67D3","\u4E95","\u6982","\u6162","\u6015","\u78C1","\u500D","\u7956","\u7687","\u4FC3","\u9759","\u8865","\u8BC4","\u7FFB","\u8089","\u8DF5","\u5C3C","\u8863","\u5BBD","\u626C","\u68C9","\u5E0C","\u4F24","\u64CD","\u5782","\u79CB","\u5B9C","\u6C22","\u5957","\u7763","\u632F","\u67B6","\u4EAE","\u672B","\u5BAA","\u5E86","\u7F16","\u725B","\u89E6","\u6620","\u96F7","\u9500","\u8BD7","\u5EA7","\u5C45","\u6293","\u88C2","\u80DE","\u547C","\u5A18","\u666F","\u5A01","\u7EFF","\u6676","\u539A","\u76DF","\u8861","\u9E21","\u5B59","\u5EF6","\u5371","\u80F6","\u5C4B","\u4E61","\u4E34","\u9646","\u987E","\u6389","\u5440","\u706F","\u5C81","\u63AA","\u675F","\u8010","\u5267","\u7389","\u8D75","\u8DF3","\u54E5","\u5B63","\u8BFE","\u51EF","\u80E1","\u989D","\u6B3E","\u7ECD","\u5377","\u9F50","\u4F1F","\u84B8","\u6B96","\u6C38","\u5B97","\u82D7","\u5DDD","\u7089","\u5CA9","\u5F31","\u96F6","\u6768","\u594F","\u6CBF","\u9732","\u6746","\u63A2","\u6ED1","\u9547","\u996D","\u6D53","\u822A","\u6000","\u8D76","\u5E93","\u593A","\u4F0A","\u7075","\u7A0E","\u9014","\u706D","\u8D5B","\u5F52","\u53EC","\u9F13","\u64AD","\u76D8","\u88C1","\u9669","\u5EB7","\u552F","\u5F55","\u83CC","\u7EAF","\u501F","\u7CD6","\u76D6","\u6A2A","\u7B26","\u79C1","\u52AA","\u5802","\u57DF","\u67AA","\u6DA6","\u5E45","\u54C8","\u7ADF","\u719F","\u866B","\u6CFD","\u8111","\u58E4","\u78B3","\u6B27","\u904D","\u4FA7","\u5BE8","\u6562","\u5F7B","\u8651","\u659C","\u8584","\u5EAD","\u7EB3","\u5F39","\u9972","\u4F38","\u6298","\u9EA6","\u6E7F","\u6697","\u8377","\u74E6","\u585E","\u5E8A","\u7B51","\u6076","\u6237","\u8BBF","\u5854","\u5947","\u900F","\u6881","\u5200","\u65CB","\u8FF9","\u5361","\u6C2F","\u9047","\u4EFD","\u6BD2","\u6CE5","\u9000","\u6D17","\u6446","\u7070","\u5F69","\u5356","\u8017","\u590F","\u62E9","\u5FD9","\u94DC","\u732E","\u786C","\u4E88","\u7E41","\u5708","\u96EA","\u51FD","\u4EA6","\u62BD","\u7BC7","\u9635","\u9634","\u4E01","\u5C3A","\u8FFD","\u5806","\u96C4","\u8FCE","\u6CDB","\u7238","\u697C","\u907F","\u8C0B","\u5428","\u91CE","\u732A","\u65D7","\u7D2F","\u504F","\u5178","\u9986","\u7D22","\u79E6","\u8102","\u6F6E","\u7237","\u8C46","\u5FFD","\u6258","\u60CA","\u5851","\u9057","\u6108","\u6731","\u66FF","\u7EA4","\u7C97","\u503E","\u5C1A","\u75DB","\u695A","\u8C22","\u594B","\u8D2D","\u78E8","\u541B","\u6C60","\u65C1","\u788E","\u9AA8","\u76D1","\u6355","\u5F1F","\u66B4","\u5272","\u8D2F","\u6B8A","\u91CA","\u8BCD","\u4EA1","\u58C1","\u987F","\u5B9D","\u5348","\u5C18","\u95FB","\u63ED","\u70AE","\u6B8B","\u51AC","\u6865","\u5987","\u8B66","\u7EFC","\u62DB","\u5434","\u4ED8","\u6D6E","\u906D","\u5F90","\u60A8","\u6447","\u8C37","\u8D5E","\u7BB1","\u9694","\u8BA2","\u7537","\u5439","\u56ED","\u7EB7","\u5510","\u8D25","\u5B8B","\u73BB","\u5DE8","\u8015","\u5766","\u8363","\u95ED","\u6E7E","\u952E","\u51E1","\u9A7B","\u9505","\u6551","\u6069","\u5265","\u51DD","\u78B1","\u9F7F","\u622A","\u70BC","\u9EBB","\u7EBA","\u7981","\u5E9F","\u76DB","\u7248","\u7F13","\u51C0","\u775B","\u660C","\u5A5A","\u6D89","\u7B52","\u5634","\u63D2","\u5CB8","\u6717","\u5E84","\u8857","\u85CF","\u59D1","\u8D38","\u8150","\u5974","\u5566","\u60EF","\u4E58","\u4F19","\u6062","\u5300","\u7EB1","\u624E","\u8FA9","\u8033","\u5F6A","\u81E3","\u4EBF","\u7483","\u62B5","\u8109","\u79C0","\u8428","\u4FC4","\u7F51","\u821E","\u5E97","\u55B7","\u7EB5","\u5BF8","\u6C57","\u6302","\u6D2A","\u8D3A","\u95EA","\u67EC","\u7206","\u70EF","\u6D25","\u7A3B","\u5899","\u8F6F","\u52C7","\u50CF","\u6EDA","\u5398","\u8499","\u82B3","\u80AF","\u5761","\u67F1","\u8361","\u817F","\u4EEA","\u65C5","\u5C3E","\u8F67","\u51B0","\u8D21","\u767B","\u9ECE","\u524A","\u94BB","\u52D2","\u9003","\u969C","\u6C28","\u90ED","\u5CF0","\u5E01","\u6E2F","\u4F0F","\u8F68","\u4EA9","\u6BD5","\u64E6","\u83AB","\u523A","\u6D6A","\u79D8","\u63F4","\u682A","\u5065","\u552E","\u80A1","\u5C9B","\u7518","\u6CE1","\u7761","\u7AE5","\u94F8","\u6C64","\u9600","\u4F11","\u6C47","\u820D","\u7267","\u7ED5","\u70B8","\u54F2","\u78F7","\u7EE9","\u670B","\u6DE1","\u5C16","\u542F","\u9677","\u67F4","\u5448","\u5F92","\u989C","\u6CEA","\u7A0D","\u5FD8","\u6CF5","\u84DD","\u62D6","\u6D1E","\u6388","\u955C","\u8F9B","\u58EE","\u950B","\u8D2B","\u865A","\u5F2F","\u6469","\u6CF0","\u5E7C","\u5EF7","\u5C0A","\u7A97","\u7EB2","\u5F04","\u96B6","\u7591","\u6C0F","\u5BAB","\u59D0","\u9707","\u745E","\u602A","\u5C24","\u7434","\u5FAA","\u63CF","\u819C","\u8FDD","\u5939","\u8170","\u7F18","\u73E0","\u7A77","\u68EE","\u679D","\u7AF9","\u6C9F","\u50AC","\u7EF3","\u5FC6","\u90A6","\u5269","\u5E78","\u6D46","\u680F","\u62E5","\u7259","\u8D2E","\u793C","\u6EE4","\u94A0","\u7EB9","\u7F62","\u62CD","\u54B1","\u558A","\u8896","\u57C3","\u52E4","\u7F5A","\u7126","\u6F5C","\u4F0D","\u58A8","\u6B32","\u7F1D","\u59D3","\u520A","\u9971","\u4EFF","\u5956","\u94DD","\u9B3C","\u4E3D","\u8DE8","\u9ED8","\u6316","\u94FE","\u626B","\u559D","\u888B","\u70AD","\u6C61","\u5E55","\u8BF8","\u5F27","\u52B1","\u6885","\u5976","\u6D01","\u707E","\u821F","\u9274","\u82EF","\u8BBC","\u62B1","\u6BC1","\u61C2","\u5BD2","\u667A","\u57D4","\u5BC4","\u5C4A","\u8DC3","\u6E21","\u6311","\u4E39","\u8270","\u8D1D","\u78B0","\u62D4","\u7239","\u6234","\u7801","\u68A6","\u82BD","\u7194","\u8D64","\u6E14","\u54ED","\u656C","\u9897","\u5954","\u94C5","\u4EF2","\u864E","\u7A00","\u59B9","\u4E4F","\u73CD","\u7533","\u684C","\u9075","\u5141","\u9686","\u87BA","\u4ED3","\u9B4F","\u9510","\u6653","\u6C2E","\u517C","\u9690","\u788D","\u8D6B","\u62E8","\u5FE0","\u8083","\u7F38","\u7275","\u62A2","\u535A","\u5DE7","\u58F3","\u5144","\u675C","\u8BAF","\u8BDA","\u78A7","\u7965","\u67EF","\u9875","\u5DE1","\u77E9","\u60B2","\u704C","\u9F84","\u4F26","\u7968","\u5BFB","\u6842","\u94FA","\u5723","\u6050","\u6070","\u90D1","\u8DA3","\u62AC","\u8352","\u817E","\u8D34","\u67D4","\u6EF4","\u731B","\u9614","\u8F86","\u59BB","\u586B","\u64A4","\u50A8","\u7B7E","\u95F9","\u6270","\u7D2B","\u7802","\u9012","\u620F","\u540A","\u9676","\u4F10","\u5582","\u7597","\u74F6","\u5A46","\u629A","\u81C2","\u6478","\u5FCD","\u867E","\u8721","\u90BB","\u80F8","\u5DE9","\u6324","\u5076","\u5F03","\u69FD","\u52B2","\u4E73","\u9093","\u5409","\u4EC1","\u70C2","\u7816","\u79DF","\u4E4C","\u8230","\u4F34","\u74DC","\u6D45","\u4E19","\u6682","\u71E5","\u6A61","\u67F3","\u8FF7","\u6696","\u724C","\u79E7","\u80C6","\u8BE6","\u7C27","\u8E0F","\u74F7","\u8C31","\u5446","\u5BBE","\u7CCA","\u6D1B","\u8F89","\u6124","\u7ADE","\u9699","\u6012","\u7C98","\u4E43","\u7EEA","\u80A9","\u7C4D","\u654F","\u6D82","\u7199","\u7686","\u4FA6","\u60AC","\u6398","\u4EAB","\u7EA0","\u9192","\u72C2","\u9501","\u6DC0","\u6068","\u7272","\u9738","\u722C","\u8D4F","\u9006","\u73A9","\u9675","\u795D","\u79D2","\u6D59","\u8C8C","\u5F79","\u5F7C","\u6089","\u9E2D","\u8D8B","\u51E4","\u6668","\u755C","\u8F88","\u79E9","\u5375","\u7F72","\u68AF","\u708E","\u6EE9","\u68CB","\u9A71","\u7B5B","\u5CE1","\u5192","\u5565","\u5BFF","\u8BD1","\u6D78","\u6CC9","\u5E3D","\u8FDF","\u7845","\u7586","\u8D37","\u6F0F","\u7A3F","\u51A0","\u5AE9","\u80C1","\u82AF","\u7262","\u53DB","\u8680","\u5965","\u9E23","\u5CAD","\u7F8A","\u51ED","\u4E32","\u5858","\u7ED8","\u9175","\u878D","\u76C6","\u9521","\u5E99","\u7B79","\u51BB","\u8F85","\u6444","\u88AD","\u7B4B","\u62D2","\u50DA","\u65F1","\u94BE","\u9E1F","\u6F06","\u6C88","\u7709","\u758F","\u6DFB","\u68D2","\u7A57","\u785D","\u97E9","\u903C","\u626D","\u4FA8","\u51C9","\u633A","\u7897","\u683D","\u7092","\u676F","\u60A3","\u998F","\u529D","\u8C6A","\u8FBD","\u52C3","\u9E3F","\u65E6","\u540F","\u62DC","\u72D7","\u57CB","\u8F8A","\u63A9","\u996E","\u642C","\u9A82","\u8F9E","\u52FE","\u6263","\u4F30","\u848B","\u7ED2","\u96FE","\u4E08","\u6735","\u59C6","\u62DF","\u5B87","\u8F91","\u9655","\u96D5","\u507F","\u84C4","\u5D07","\u526A","\u5021","\u5385","\u54AC","\u9A76","\u85AF","\u5237","\u65A5","\u756A","\u8D4B","\u5949","\u4F5B","\u6D47","\u6F2B","\u66FC","\u6247","\u9499","\u6843","\u6276","\u4ED4","\u8FD4","\u4FD7","\u4E8F","\u8154","\u978B","\u68F1","\u8986","\u6846","\u6084","\u53D4","\u649E","\u9A97","\u52D8","\u65FA","\u6CB8","\u5B64","\u5410","\u5B5F","\u6E20","\u5C48","\u75BE","\u5999","\u60DC","\u4EF0","\u72E0","\u80C0","\u8C10","\u629B","\u9709","\u6851","\u5C97","\u561B","\u8870","\u76D7","\u6E17","\u810F","\u8D56","\u6D8C","\u751C","\u66F9","\u9605","\u808C","\u54E9","\u5389","\u70C3","\u7EAC","\u6BC5","\u6628","\u4F2A","\u75C7","\u716E","\u53F9","\u9489","\u642D","\u830E","\u7B3C","\u9177","\u5077","\u5F13","\u9525","\u6052","\u6770","\u5751","\u9F3B","\u7FFC","\u7EB6","\u53D9","\u72F1","\u902E","\u7F50","\u7EDC","\u68DA","\u6291","\u81A8","\u852C","\u5BFA","\u9AA4","\u7A46","\u51B6","\u67AF","\u518C","\u5C38","\u51F8","\u7EC5","\u576F","\u727A","\u7130","\u8F70","\u6B23","\u664B","\u7626","\u5FA1","\u952D","\u9526","\u4E27","\u65EC","\u953B","\u5784","\u641C","\u6251","\u9080","\u4EAD","\u916F","\u8FC8","\u8212","\u8106","\u9176","\u95F2","\u5FE7","\u915A","\u987D","\u7FBD","\u6DA8","\u5378","\u4ED7","\u966A","\u8F9F","\u60E9","\u676D","\u59DA","\u809A","\u6349","\u98D8","\u6F02","\u6606","\u6B3A","\u543E","\u90CE","\u70F7","\u6C41","\u5475","\u9970","\u8427","\u96C5","\u90AE","\u8FC1","\u71D5","\u6492","\u59FB","\u8D74","\u5BB4","\u70E6","\u503A","\u5E10","\u6591","\u94C3","\u65E8","\u9187","\u8463","\u997C","\u96CF","\u59FF","\u62CC","\u5085","\u8179","\u59A5","\u63C9","\u8D24","\u62C6","\u6B6A","\u8461","\u80FA","\u4E22","\u6D69","\u5FBD","\u6602","\u57AB","\u6321","\u89C8","\u8D2A","\u6170","\u7F34","\u6C6A","\u614C","\u51AF","\u8BFA","\u59DC","\u8C0A","\u51F6","\u52A3","\u8BEC","\u8000","\u660F","\u8EBA","\u76C8","\u9A91","\u4E54","\u6EAA","\u4E1B","\u5362","\u62B9","\u95F7","\u54A8","\u522E","\u9A7E","\u7F06","\u609F","\u6458","\u94D2","\u63B7","\u9887","\u5E7B","\u67C4","\u60E0","\u60E8","\u4F73","\u4EC7","\u814A","\u7A9D","\u6DA4","\u5251","\u77A7","\u5821","\u6CFC","\u8471","\u7F69","\u970D","\u635E","\u80CE","\u82CD","\u6EE8","\u4FE9","\u6345","\u6E58","\u780D","\u971E","\u90B5","\u8404","\u75AF","\u6DEE","\u9042","\u718A","\u7CAA","\u70D8","\u5BBF","\u6863","\u6208","\u9A73","\u5AC2","\u88D5","\u5F99","\u7BAD","\u6350","\u80A0","\u6491","\u6652","\u8FA8","\u6BBF","\u83B2","\u644A","\u6405","\u9171","\u5C4F","\u75AB","\u54C0","\u8521","\u5835","\u6CAB","\u76B1","\u7545","\u53E0","\u9601","\u83B1","\u6572","\u8F96","\u94A9","\u75D5","\u575D","\u5DF7","\u997F","\u7978","\u4E18","\u7384","\u6E9C","\u66F0","\u903B","\u5F6D","\u5C1D","\u537F","\u59A8","\u8247","\u541E","\u97E6","\u6028","\u77EE","\u6B47"];eM.exports=Wre});var iM=k((S5e,rM)=>{"use strict";v();var Yre=["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"];rM.exports=Yre});var oM=k((E5e,nM)=>{"use string";v();var $re=["abaisser","abandon","abdiquer","abeille","abolir","aborder","aboutir","aboyer","abrasif","abreuver","abriter","abroger","abrupt","absence","absolu","absurde","abusif","abyssal","acade\u0301mie","acajou","acarien","accabler","accepter","acclamer","accolade","accroche","accuser","acerbe","achat","acheter","aciduler","acier","acompte","acque\u0301rir","acronyme","acteur","actif","actuel","adepte","ade\u0301quat","adhe\u0301sif","adjectif","adjuger","admettre","admirer","adopter","adorer","adoucir","adresse","adroit","adulte","adverbe","ae\u0301rer","ae\u0301ronef","affaire","affecter","affiche","affreux","affubler","agacer","agencer","agile","agiter","agrafer","agre\u0301able","agrume","aider","aiguille","ailier","aimable","aisance","ajouter","ajuster","alarmer","alchimie","alerte","alge\u0300bre","algue","alie\u0301ner","aliment","alle\u0301ger","alliage","allouer","allumer","alourdir","alpaga","altesse","alve\u0301ole","amateur","ambigu","ambre","ame\u0301nager","amertume","amidon","amiral","amorcer","amour","amovible","amphibie","ampleur","amusant","analyse","anaphore","anarchie","anatomie","ancien","ane\u0301antir","angle","angoisse","anguleux","animal","annexer","annonce","annuel","anodin","anomalie","anonyme","anormal","antenne","antidote","anxieux","apaiser","ape\u0301ritif","aplanir","apologie","appareil","appeler","apporter","appuyer","aquarium","aqueduc","arbitre","arbuste","ardeur","ardoise","argent","arlequin","armature","armement","armoire","armure","arpenter","arracher","arriver","arroser","arsenic","arte\u0301riel","article","aspect","asphalte","aspirer","assaut","asservir","assiette","associer","assurer","asticot","astre","astuce","atelier","atome","atrium","atroce","attaque","attentif","attirer","attraper","aubaine","auberge","audace","audible","augurer","aurore","automne","autruche","avaler","avancer","avarice","avenir","averse","aveugle","aviateur","avide","avion","aviser","avoine","avouer","avril","axial","axiome","badge","bafouer","bagage","baguette","baignade","balancer","balcon","baleine","balisage","bambin","bancaire","bandage","banlieue","bannie\u0300re","banquier","barbier","baril","baron","barque","barrage","bassin","bastion","bataille","bateau","batterie","baudrier","bavarder","belette","be\u0301lier","belote","be\u0301ne\u0301fice","berceau","berger","berline","bermuda","besace","besogne","be\u0301tail","beurre","biberon","bicycle","bidule","bijou","bilan","bilingue","billard","binaire","biologie","biopsie","biotype","biscuit","bison","bistouri","bitume","bizarre","blafard","blague","blanchir","blessant","blinder","blond","bloquer","blouson","bobard","bobine","boire","boiser","bolide","bonbon","bondir","bonheur","bonifier","bonus","bordure","borne","botte","boucle","boueux","bougie","boulon","bouquin","bourse","boussole","boutique","boxeur","branche","brasier","brave","brebis","bre\u0300che","breuvage","bricoler","brigade","brillant","brioche","brique","brochure","broder","bronzer","brousse","broyeur","brume","brusque","brutal","bruyant","buffle","buisson","bulletin","bureau","burin","bustier","butiner","butoir","buvable","buvette","cabanon","cabine","cachette","cadeau","cadre","cafe\u0301ine","caillou","caisson","calculer","calepin","calibre","calmer","calomnie","calvaire","camarade","came\u0301ra","camion","campagne","canal","caneton","canon","cantine","canular","capable","caporal","caprice","capsule","capter","capuche","carabine","carbone","caresser","caribou","carnage","carotte","carreau","carton","cascade","casier","casque","cassure","causer","caution","cavalier","caverne","caviar","ce\u0301dille","ceinture","ce\u0301leste","cellule","cendrier","censurer","central","cercle","ce\u0301re\u0301bral","cerise","cerner","cerveau","cesser","chagrin","chaise","chaleur","chambre","chance","chapitre","charbon","chasseur","chaton","chausson","chavirer","chemise","chenille","che\u0301quier","chercher","cheval","chien","chiffre","chignon","chime\u0300re","chiot","chlorure","chocolat","choisir","chose","chouette","chrome","chute","cigare","cigogne","cimenter","cine\u0301ma","cintrer","circuler","cirer","cirque","citerne","citoyen","citron","civil","clairon","clameur","claquer","classe","clavier","client","cligner","climat","clivage","cloche","clonage","cloporte","cobalt","cobra","cocasse","cocotier","coder","codifier","coffre","cogner","cohe\u0301sion","coiffer","coincer","cole\u0300re","colibri","colline","colmater","colonel","combat","come\u0301die","commande","compact","concert","conduire","confier","congeler","connoter","consonne","contact","convexe","copain","copie","corail","corbeau","cordage","corniche","corpus","correct","corte\u0300ge","cosmique","costume","coton","coude","coupure","courage","couteau","couvrir","coyote","crabe","crainte","cravate","crayon","cre\u0301ature","cre\u0301diter","cre\u0301meux","creuser","crevette","cribler","crier","cristal","crite\u0300re","croire","croquer","crotale","crucial","cruel","crypter","cubique","cueillir","cuille\u0300re","cuisine","cuivre","culminer","cultiver","cumuler","cupide","curatif","curseur","cyanure","cycle","cylindre","cynique","daigner","damier","danger","danseur","dauphin","de\u0301battre","de\u0301biter","de\u0301border","de\u0301brider","de\u0301butant","de\u0301caler","de\u0301cembre","de\u0301chirer","de\u0301cider","de\u0301clarer","de\u0301corer","de\u0301crire","de\u0301cupler","de\u0301dale","de\u0301ductif","de\u0301esse","de\u0301fensif","de\u0301filer","de\u0301frayer","de\u0301gager","de\u0301givrer","de\u0301glutir","de\u0301grafer","de\u0301jeuner","de\u0301lice","de\u0301loger","demander","demeurer","de\u0301molir","de\u0301nicher","de\u0301nouer","dentelle","de\u0301nuder","de\u0301part","de\u0301penser","de\u0301phaser","de\u0301placer","de\u0301poser","de\u0301ranger","de\u0301rober","de\u0301sastre","descente","de\u0301sert","de\u0301signer","de\u0301sobe\u0301ir","dessiner","destrier","de\u0301tacher","de\u0301tester","de\u0301tourer","de\u0301tresse","devancer","devenir","deviner","devoir","diable","dialogue","diamant","dicter","diffe\u0301rer","dige\u0301rer","digital","digne","diluer","dimanche","diminuer","dioxyde","directif","diriger","discuter","disposer","dissiper","distance","divertir","diviser","docile","docteur","dogme","doigt","domaine","domicile","dompter","donateur","donjon","donner","dopamine","dortoir","dorure","dosage","doseur","dossier","dotation","douanier","double","douceur","douter","doyen","dragon","draper","dresser","dribbler","droiture","duperie","duplexe","durable","durcir","dynastie","e\u0301blouir","e\u0301carter","e\u0301charpe","e\u0301chelle","e\u0301clairer","e\u0301clipse","e\u0301clore","e\u0301cluse","e\u0301cole","e\u0301conomie","e\u0301corce","e\u0301couter","e\u0301craser","e\u0301cre\u0301mer","e\u0301crivain","e\u0301crou","e\u0301cume","e\u0301cureuil","e\u0301difier","e\u0301duquer","effacer","effectif","effigie","effort","effrayer","effusion","e\u0301galiser","e\u0301garer","e\u0301jecter","e\u0301laborer","e\u0301largir","e\u0301lectron","e\u0301le\u0301gant","e\u0301le\u0301phant","e\u0301le\u0300ve","e\u0301ligible","e\u0301litisme","e\u0301loge","e\u0301lucider","e\u0301luder","emballer","embellir","embryon","e\u0301meraude","e\u0301mission","emmener","e\u0301motion","e\u0301mouvoir","empereur","employer","emporter","emprise","e\u0301mulsion","encadrer","enche\u0300re","enclave","encoche","endiguer","endosser","endroit","enduire","e\u0301nergie","enfance","enfermer","enfouir","engager","engin","englober","e\u0301nigme","enjamber","enjeu","enlever","ennemi","ennuyeux","enrichir","enrobage","enseigne","entasser","entendre","entier","entourer","entraver","e\u0301nume\u0301rer","envahir","enviable","envoyer","enzyme","e\u0301olien","e\u0301paissir","e\u0301pargne","e\u0301patant","e\u0301paule","e\u0301picerie","e\u0301pide\u0301mie","e\u0301pier","e\u0301pilogue","e\u0301pine","e\u0301pisode","e\u0301pitaphe","e\u0301poque","e\u0301preuve","e\u0301prouver","e\u0301puisant","e\u0301querre","e\u0301quipe","e\u0301riger","e\u0301rosion","erreur","e\u0301ruption","escalier","espadon","espe\u0300ce","espie\u0300gle","espoir","esprit","esquiver","essayer","essence","essieu","essorer","estime","estomac","estrade","e\u0301tage\u0300re","e\u0301taler","e\u0301tanche","e\u0301tatique","e\u0301teindre","e\u0301tendoir","e\u0301ternel","e\u0301thanol","e\u0301thique","ethnie","e\u0301tirer","e\u0301toffer","e\u0301toile","e\u0301tonnant","e\u0301tourdir","e\u0301trange","e\u0301troit","e\u0301tude","euphorie","e\u0301valuer","e\u0301vasion","e\u0301ventail","e\u0301vidence","e\u0301viter","e\u0301volutif","e\u0301voquer","exact","exage\u0301rer","exaucer","exceller","excitant","exclusif","excuse","exe\u0301cuter","exemple","exercer","exhaler","exhorter","exigence","exiler","exister","exotique","expe\u0301dier","explorer","exposer","exprimer","exquis","extensif","extraire","exulter","fable","fabuleux","facette","facile","facture","faiblir","falaise","fameux","famille","farceur","farfelu","farine","farouche","fasciner","fatal","fatigue","faucon","fautif","faveur","favori","fe\u0301brile","fe\u0301conder","fe\u0301de\u0301rer","fe\u0301lin","femme","fe\u0301mur","fendoir","fe\u0301odal","fermer","fe\u0301roce","ferveur","festival","feuille","feutre","fe\u0301vrier","fiasco","ficeler","fictif","fide\u0300le","figure","filature","filetage","filie\u0300re","filleul","filmer","filou","filtrer","financer","finir","fiole","firme","fissure","fixer","flairer","flamme","flasque","flatteur","fle\u0301au","fle\u0300che","fleur","flexion","flocon","flore","fluctuer","fluide","fluvial","folie","fonderie","fongible","fontaine","forcer","forgeron","formuler","fortune","fossile","foudre","fouge\u0300re","fouiller","foulure","fourmi","fragile","fraise","franchir","frapper","frayeur","fre\u0301gate","freiner","frelon","fre\u0301mir","fre\u0301ne\u0301sie","fre\u0300re","friable","friction","frisson","frivole","froid","fromage","frontal","frotter","fruit","fugitif","fuite","fureur","furieux","furtif","fusion","futur","gagner","galaxie","galerie","gambader","garantir","gardien","garnir","garrigue","gazelle","gazon","ge\u0301ant","ge\u0301latine","ge\u0301lule","gendarme","ge\u0301ne\u0301ral","ge\u0301nie","genou","gentil","ge\u0301ologie","ge\u0301ome\u0300tre","ge\u0301ranium","germe","gestuel","geyser","gibier","gicler","girafe","givre","glace","glaive","glisser","globe","gloire","glorieux","golfeur","gomme","gonfler","gorge","gorille","goudron","gouffre","goulot","goupille","gourmand","goutte","graduel","graffiti","graine","grand","grappin","gratuit","gravir","grenat","griffure","griller","grimper","grogner","gronder","grotte","groupe","gruger","grutier","gruye\u0300re","gue\u0301pard","guerrier","guide","guimauve","guitare","gustatif","gymnaste","gyrostat","habitude","hachoir","halte","hameau","hangar","hanneton","haricot","harmonie","harpon","hasard","he\u0301lium","he\u0301matome","herbe","he\u0301risson","hermine","he\u0301ron","he\u0301siter","heureux","hiberner","hibou","hilarant","histoire","hiver","homard","hommage","homoge\u0300ne","honneur","honorer","honteux","horde","horizon","horloge","hormone","horrible","houleux","housse","hublot","huileux","humain","humble","humide","humour","hurler","hydromel","hygie\u0300ne","hymne","hypnose","idylle","ignorer","iguane","illicite","illusion","image","imbiber","imiter","immense","immobile","immuable","impact","impe\u0301rial","implorer","imposer","imprimer","imputer","incarner","incendie","incident","incliner","incolore","indexer","indice","inductif","ine\u0301dit","ineptie","inexact","infini","infliger","informer","infusion","inge\u0301rer","inhaler","inhiber","injecter","injure","innocent","inoculer","inonder","inscrire","insecte","insigne","insolite","inspirer","instinct","insulter","intact","intense","intime","intrigue","intuitif","inutile","invasion","inventer","inviter","invoquer","ironique","irradier","irre\u0301el","irriter","isoler","ivoire","ivresse","jaguar","jaillir","jambe","janvier","jardin","jauger","jaune","javelot","jetable","jeton","jeudi","jeunesse","joindre","joncher","jongler","joueur","jouissif","journal","jovial","joyau","joyeux","jubiler","jugement","junior","jupon","juriste","justice","juteux","juve\u0301nile","kayak","kimono","kiosque","label","labial","labourer","lace\u0301rer","lactose","lagune","laine","laisser","laitier","lambeau","lamelle","lampe","lanceur","langage","lanterne","lapin","largeur","larme","laurier","lavabo","lavoir","lecture","le\u0301gal","le\u0301ger","le\u0301gume","lessive","lettre","levier","lexique","le\u0301zard","liasse","libe\u0301rer","libre","licence","licorne","lie\u0300ge","lie\u0300vre","ligature","ligoter","ligue","limer","limite","limonade","limpide","line\u0301aire","lingot","lionceau","liquide","lisie\u0300re","lister","lithium","litige","littoral","livreur","logique","lointain","loisir","lombric","loterie","louer","lourd","loutre","louve","loyal","lubie","lucide","lucratif","lueur","lugubre","luisant","lumie\u0300re","lunaire","lundi","luron","lutter","luxueux","machine","magasin","magenta","magique","maigre","maillon","maintien","mairie","maison","majorer","malaxer","male\u0301fice","malheur","malice","mallette","mammouth","mandater","maniable","manquant","manteau","manuel","marathon","marbre","marchand","mardi","maritime","marqueur","marron","marteler","mascotte","massif","mate\u0301riel","matie\u0300re","matraque","maudire","maussade","mauve","maximal","me\u0301chant","me\u0301connu","me\u0301daille","me\u0301decin","me\u0301diter","me\u0301duse","meilleur","me\u0301lange","me\u0301lodie","membre","me\u0301moire","menacer","mener","menhir","mensonge","mentor","mercredi","me\u0301rite","merle","messager","mesure","me\u0301tal","me\u0301te\u0301ore","me\u0301thode","me\u0301tier","meuble","miauler","microbe","miette","mignon","migrer","milieu","million","mimique","mince","mine\u0301ral","minimal","minorer","minute","miracle","miroiter","missile","mixte","mobile","moderne","moelleux","mondial","moniteur","monnaie","monotone","monstre","montagne","monument","moqueur","morceau","morsure","mortier","moteur","motif","mouche","moufle","moulin","mousson","mouton","mouvant","multiple","munition","muraille","mure\u0300ne","murmure","muscle","muse\u0301um","musicien","mutation","muter","mutuel","myriade","myrtille","myste\u0300re","mythique","nageur","nappe","narquois","narrer","natation","nation","nature","naufrage","nautique","navire","ne\u0301buleux","nectar","ne\u0301faste","ne\u0301gation","ne\u0301gliger","ne\u0301gocier","neige","nerveux","nettoyer","neurone","neutron","neveu","niche","nickel","nitrate","niveau","noble","nocif","nocturne","noirceur","noisette","nomade","nombreux","nommer","normatif","notable","notifier","notoire","nourrir","nouveau","novateur","novembre","novice","nuage","nuancer","nuire","nuisible","nume\u0301ro","nuptial","nuque","nutritif","obe\u0301ir","objectif","obliger","obscur","observer","obstacle","obtenir","obturer","occasion","occuper","oce\u0301an","octobre","octroyer","octupler","oculaire","odeur","odorant","offenser","officier","offrir","ogive","oiseau","oisillon","olfactif","olivier","ombrage","omettre","onctueux","onduler","one\u0301reux","onirique","opale","opaque","ope\u0301rer","opinion","opportun","opprimer","opter","optique","orageux","orange","orbite","ordonner","oreille","organe","orgueil","orifice","ornement","orque","ortie","osciller","osmose","ossature","otarie","ouragan","ourson","outil","outrager","ouvrage","ovation","oxyde","oxyge\u0300ne","ozone","paisible","palace","palmare\u0300s","palourde","palper","panache","panda","pangolin","paniquer","panneau","panorama","pantalon","papaye","papier","papoter","papyrus","paradoxe","parcelle","paresse","parfumer","parler","parole","parrain","parsemer","partager","parure","parvenir","passion","paste\u0300que","paternel","patience","patron","pavillon","pavoiser","payer","paysage","peigne","peintre","pelage","pe\u0301lican","pelle","pelouse","peluche","pendule","pe\u0301ne\u0301trer","pe\u0301nible","pensif","pe\u0301nurie","pe\u0301pite","pe\u0301plum","perdrix","perforer","pe\u0301riode","permuter","perplexe","persil","perte","peser","pe\u0301tale","petit","pe\u0301trir","peuple","pharaon","phobie","phoque","photon","phrase","physique","piano","pictural","pie\u0300ce","pierre","pieuvre","pilote","pinceau","pipette","piquer","pirogue","piscine","piston","pivoter","pixel","pizza","placard","plafond","plaisir","planer","plaque","plastron","plateau","pleurer","plexus","pliage","plomb","plonger","pluie","plumage","pochette","poe\u0301sie","poe\u0300te","pointe","poirier","poisson","poivre","polaire","policier","pollen","polygone","pommade","pompier","ponctuel","ponde\u0301rer","poney","portique","position","posse\u0301der","posture","potager","poteau","potion","pouce","poulain","poumon","pourpre","poussin","pouvoir","prairie","pratique","pre\u0301cieux","pre\u0301dire","pre\u0301fixe","pre\u0301lude","pre\u0301nom","pre\u0301sence","pre\u0301texte","pre\u0301voir","primitif","prince","prison","priver","proble\u0300me","proce\u0301der","prodige","profond","progre\u0300s","proie","projeter","prologue","promener","propre","prospe\u0300re","prote\u0301ger","prouesse","proverbe","prudence","pruneau","psychose","public","puceron","puiser","pulpe","pulsar","punaise","punitif","pupitre","purifier","puzzle","pyramide","quasar","querelle","question","quie\u0301tude","quitter","quotient","racine","raconter","radieux","ragondin","raideur","raisin","ralentir","rallonge","ramasser","rapide","rasage","ratisser","ravager","ravin","rayonner","re\u0301actif","re\u0301agir","re\u0301aliser","re\u0301animer","recevoir","re\u0301citer","re\u0301clamer","re\u0301colter","recruter","reculer","recycler","re\u0301diger","redouter","refaire","re\u0301flexe","re\u0301former","refrain","refuge","re\u0301galien","re\u0301gion","re\u0301glage","re\u0301gulier","re\u0301ite\u0301rer","rejeter","rejouer","relatif","relever","relief","remarque","reme\u0300de","remise","remonter","remplir","remuer","renard","renfort","renifler","renoncer","rentrer","renvoi","replier","reporter","reprise","reptile","requin","re\u0301serve","re\u0301sineux","re\u0301soudre","respect","rester","re\u0301sultat","re\u0301tablir","retenir","re\u0301ticule","retomber","retracer","re\u0301union","re\u0301ussir","revanche","revivre","re\u0301volte","re\u0301vulsif","richesse","rideau","rieur","rigide","rigoler","rincer","riposter","risible","risque","rituel","rival","rivie\u0300re","rocheux","romance","rompre","ronce","rondin","roseau","rosier","rotatif","rotor","rotule","rouge","rouille","rouleau","routine","royaume","ruban","rubis","ruche","ruelle","rugueux","ruiner","ruisseau","ruser","rustique","rythme","sabler","saboter","sabre","sacoche","safari","sagesse","saisir","salade","salive","salon","saluer","samedi","sanction","sanglier","sarcasme","sardine","saturer","saugrenu","saumon","sauter","sauvage","savant","savonner","scalpel","scandale","sce\u0301le\u0301rat","sce\u0301nario","sceptre","sche\u0301ma","science","scinder","score","scrutin","sculpter","se\u0301ance","se\u0301cable","se\u0301cher","secouer","se\u0301cre\u0301ter","se\u0301datif","se\u0301duire","seigneur","se\u0301jour","se\u0301lectif","semaine","sembler","semence","se\u0301minal","se\u0301nateur","sensible","sentence","se\u0301parer","se\u0301quence","serein","sergent","se\u0301rieux","serrure","se\u0301rum","service","se\u0301same","se\u0301vir","sevrage","sextuple","side\u0301ral","sie\u0300cle","sie\u0301ger","siffler","sigle","signal","silence","silicium","simple","since\u0300re","sinistre","siphon","sirop","sismique","situer","skier","social","socle","sodium","soigneux","soldat","soleil","solitude","soluble","sombre","sommeil","somnoler","sonde","songeur","sonnette","sonore","sorcier","sortir","sosie","sottise","soucieux","soudure","souffle","soulever","soupape","source","soutirer","souvenir","spacieux","spatial","spe\u0301cial","sphe\u0300re","spiral","stable","station","sternum","stimulus","stipuler","strict","studieux","stupeur","styliste","sublime","substrat","subtil","subvenir","succe\u0300s","sucre","suffixe","sugge\u0301rer","suiveur","sulfate","superbe","supplier","surface","suricate","surmener","surprise","sursaut","survie","suspect","syllabe","symbole","syme\u0301trie","synapse","syntaxe","syste\u0300me","tabac","tablier","tactile","tailler","talent","talisman","talonner","tambour","tamiser","tangible","tapis","taquiner","tarder","tarif","tartine","tasse","tatami","tatouage","taupe","taureau","taxer","te\u0301moin","temporel","tenaille","tendre","teneur","tenir","tension","terminer","terne","terrible","te\u0301tine","texte","the\u0300me","the\u0301orie","the\u0301rapie","thorax","tibia","tie\u0300de","timide","tirelire","tiroir","tissu","titane","titre","tituber","toboggan","tole\u0301rant","tomate","tonique","tonneau","toponyme","torche","tordre","tornade","torpille","torrent","torse","tortue","totem","toucher","tournage","tousser","toxine","traction","trafic","tragique","trahir","train","trancher","travail","tre\u0300fle","tremper","tre\u0301sor","treuil","triage","tribunal","tricoter","trilogie","triomphe","tripler","triturer","trivial","trombone","tronc","tropical","troupeau","tuile","tulipe","tumulte","tunnel","turbine","tuteur","tutoyer","tuyau","tympan","typhon","typique","tyran","ubuesque","ultime","ultrason","unanime","unifier","union","unique","unitaire","univers","uranium","urbain","urticant","usage","usine","usuel","usure","utile","utopie","vacarme","vaccin","vagabond","vague","vaillant","vaincre","vaisseau","valable","valise","vallon","valve","vampire","vanille","vapeur","varier","vaseux","vassal","vaste","vecteur","vedette","ve\u0301ge\u0301tal","ve\u0301hicule","veinard","ve\u0301loce","vendredi","ve\u0301ne\u0301rer","venger","venimeux","ventouse","verdure","ve\u0301rin","vernir","verrou","verser","vertu","veston","ve\u0301te\u0301ran","ve\u0301tuste","vexant","vexer","viaduc","viande","victoire","vidange","vide\u0301o","vignette","vigueur","vilain","village","vinaigre","violon","vipe\u0300re","virement","virtuose","virus","visage","viseur","vision","visqueux","visuel","vital","vitesse","viticole","vitrine","vivace","vivipare","vocation","voguer","voile","voisin","voiture","volaille","volcan","voltiger","volume","vorace","vortex","voter","vouloir","voyage","voyelle","wagon","xe\u0301non","yacht","ze\u0300bre","ze\u0301nith","zeste","zoologie"];nM.exports=$re});var sM=k((O5e,aM)=>{"use strict";v();var Xre=["abaco","abbaglio","abbinato","abete","abisso","abolire","abrasivo","abrogato","accadere","accenno","accusato","acetone","achille","acido","acqua","acre","acrilico","acrobata","acuto","adagio","addebito","addome","adeguato","aderire","adipe","adottare","adulare","affabile","affetto","affisso","affranto","aforisma","afoso","africano","agave","agente","agevole","aggancio","agire","agitare","agonismo","agricolo","agrumeto","aguzzo","alabarda","alato","albatro","alberato","albo","albume","alce","alcolico","alettone","alfa","algebra","aliante","alibi","alimento","allagato","allegro","allievo","allodola","allusivo","almeno","alogeno","alpaca","alpestre","altalena","alterno","alticcio","altrove","alunno","alveolo","alzare","amalgama","amanita","amarena","ambito","ambrato","ameba","america","ametista","amico","ammasso","ammenda","ammirare","ammonito","amore","ampio","ampliare","amuleto","anacardo","anagrafe","analista","anarchia","anatra","anca","ancella","ancora","andare","andrea","anello","angelo","angolare","angusto","anima","annegare","annidato","anno","annuncio","anonimo","anticipo","anzi","apatico","apertura","apode","apparire","appetito","appoggio","approdo","appunto","aprile","arabica","arachide","aragosta","araldica","arancio","aratura","arazzo","arbitro","archivio","ardito","arenile","argento","argine","arguto","aria","armonia","arnese","arredato","arringa","arrosto","arsenico","arso","artefice","arzillo","asciutto","ascolto","asepsi","asettico","asfalto","asino","asola","aspirato","aspro","assaggio","asse","assoluto","assurdo","asta","astenuto","astice","astratto","atavico","ateismo","atomico","atono","attesa","attivare","attorno","attrito","attuale","ausilio","austria","autista","autonomo","autunno","avanzato","avere","avvenire","avviso","avvolgere","azione","azoto","azzimo","azzurro","babele","baccano","bacino","baco","badessa","badilata","bagnato","baita","balcone","baldo","balena","ballata","balzano","bambino","bandire","baraonda","barbaro","barca","baritono","barlume","barocco","basilico","basso","batosta","battuto","baule","bava","bavosa","becco","beffa","belgio","belva","benda","benevole","benigno","benzina","bere","berlina","beta","bibita","bici","bidone","bifido","biga","bilancia","bimbo","binocolo","biologo","bipede","bipolare","birbante","birra","biscotto","bisesto","bisnonno","bisonte","bisturi","bizzarro","blando","blatta","bollito","bonifico","bordo","bosco","botanico","bottino","bozzolo","braccio","bradipo","brama","branca","bravura","bretella","brevetto","brezza","briglia","brillante","brindare","broccolo","brodo","bronzina","brullo","bruno","bubbone","buca","budino","buffone","buio","bulbo","buono","burlone","burrasca","bussola","busta","cadetto","caduco","calamaro","calcolo","calesse","calibro","calmo","caloria","cambusa","camerata","camicia","cammino","camola","campale","canapa","candela","cane","canino","canotto","cantina","capace","capello","capitolo","capogiro","cappero","capra","capsula","carapace","carcassa","cardo","carisma","carovana","carretto","cartolina","casaccio","cascata","caserma","caso","cassone","castello","casuale","catasta","catena","catrame","cauto","cavillo","cedibile","cedrata","cefalo","celebre","cellulare","cena","cenone","centesimo","ceramica","cercare","certo","cerume","cervello","cesoia","cespo","ceto","chela","chiaro","chicca","chiedere","chimera","china","chirurgo","chitarra","ciao","ciclismo","cifrare","cigno","cilindro","ciottolo","circa","cirrosi","citrico","cittadino","ciuffo","civetta","civile","classico","clinica","cloro","cocco","codardo","codice","coerente","cognome","collare","colmato","colore","colposo","coltivato","colza","coma","cometa","commando","comodo","computer","comune","conciso","condurre","conferma","congelare","coniuge","connesso","conoscere","consumo","continuo","convegno","coperto","copione","coppia","copricapo","corazza","cordata","coricato","cornice","corolla","corpo","corredo","corsia","cortese","cosmico","costante","cottura","covato","cratere","cravatta","creato","credere","cremoso","crescita","creta","criceto","crinale","crisi","critico","croce","cronaca","crostata","cruciale","crusca","cucire","cuculo","cugino","cullato","cupola","curatore","cursore","curvo","cuscino","custode","dado","daino","dalmata","damerino","daniela","dannoso","danzare","datato","davanti","davvero","debutto","decennio","deciso","declino","decollo","decreto","dedicato","definito","deforme","degno","delegare","delfino","delirio","delta","demenza","denotato","dentro","deposito","derapata","derivare","deroga","descritto","deserto","desiderio","desumere","detersivo","devoto","diametro","dicembre","diedro","difeso","diffuso","digerire","digitale","diluvio","dinamico","dinnanzi","dipinto","diploma","dipolo","diradare","dire","dirotto","dirupo","disagio","discreto","disfare","disgelo","disposto","distanza","disumano","dito","divano","divelto","dividere","divorato","doblone","docente","doganale","dogma","dolce","domato","domenica","dominare","dondolo","dono","dormire","dote","dottore","dovuto","dozzina","drago","druido","dubbio","dubitare","ducale","duna","duomo","duplice","duraturo","ebano","eccesso","ecco","eclissi","economia","edera","edicola","edile","editoria","educare","egemonia","egli","egoismo","egregio","elaborato","elargire","elegante","elencato","eletto","elevare","elfico","elica","elmo","elsa","eluso","emanato","emblema","emesso","emiro","emotivo","emozione","empirico","emulo","endemico","enduro","energia","enfasi","enoteca","entrare","enzima","epatite","epilogo","episodio","epocale","eppure","equatore","erario","erba","erboso","erede","eremita","erigere","ermetico","eroe","erosivo","errante","esagono","esame","esanime","esaudire","esca","esempio","esercito","esibito","esigente","esistere","esito","esofago","esortato","esoso","espanso","espresso","essenza","esso","esteso","estimare","estonia","estroso","esultare","etilico","etnico","etrusco","etto","euclideo","europa","evaso","evidenza","evitato","evoluto","evviva","fabbrica","faccenda","fachiro","falco","famiglia","fanale","fanfara","fango","fantasma","fare","farfalla","farinoso","farmaco","fascia","fastoso","fasullo","faticare","fato","favoloso","febbre","fecola","fede","fegato","felpa","feltro","femmina","fendere","fenomeno","fermento","ferro","fertile","fessura","festivo","fetta","feudo","fiaba","fiducia","fifa","figurato","filo","finanza","finestra","finire","fiore","fiscale","fisico","fiume","flacone","flamenco","flebo","flemma","florido","fluente","fluoro","fobico","focaccia","focoso","foderato","foglio","folata","folclore","folgore","fondente","fonetico","fonia","fontana","forbito","forchetta","foresta","formica","fornaio","foro","fortezza","forzare","fosfato","fosso","fracasso","frana","frassino","fratello","freccetta","frenata","fresco","frigo","frollino","fronde","frugale","frutta","fucilata","fucsia","fuggente","fulmine","fulvo","fumante","fumetto","fumoso","fune","funzione","fuoco","furbo","furgone","furore","fuso","futile","gabbiano","gaffe","galateo","gallina","galoppo","gambero","gamma","garanzia","garbo","garofano","garzone","gasdotto","gasolio","gastrico","gatto","gaudio","gazebo","gazzella","geco","gelatina","gelso","gemello","gemmato","gene","genitore","gennaio","genotipo","gergo","ghepardo","ghiaccio","ghisa","giallo","gilda","ginepro","giocare","gioiello","giorno","giove","girato","girone","gittata","giudizio","giurato","giusto","globulo","glutine","gnomo","gobba","golf","gomito","gommone","gonfio","gonna","governo","gracile","grado","grafico","grammo","grande","grattare","gravoso","grazia","greca","gregge","grifone","grigio","grinza","grotta","gruppo","guadagno","guaio","guanto","guardare","gufo","guidare","ibernato","icona","identico","idillio","idolo","idra","idrico","idrogeno","igiene","ignaro","ignorato","ilare","illeso","illogico","illudere","imballo","imbevuto","imbocco","imbuto","immane","immerso","immolato","impacco","impeto","impiego","importo","impronta","inalare","inarcare","inattivo","incanto","incendio","inchino","incisivo","incluso","incontro","incrocio","incubo","indagine","india","indole","inedito","infatti","infilare","inflitto","ingaggio","ingegno","inglese","ingordo","ingrosso","innesco","inodore","inoltrare","inondato","insano","insetto","insieme","insonnia","insulina","intasato","intero","intonaco","intuito","inumidire","invalido","invece","invito","iperbole","ipnotico","ipotesi","ippica","iride","irlanda","ironico","irrigato","irrorare","isolato","isotopo","isterico","istituto","istrice","italia","iterare","labbro","labirinto","lacca","lacerato","lacrima","lacuna","laddove","lago","lampo","lancetta","lanterna","lardoso","larga","laringe","lastra","latenza","latino","lattuga","lavagna","lavoro","legale","leggero","lembo","lentezza","lenza","leone","lepre","lesivo","lessato","lesto","letterale","leva","levigato","libero","lido","lievito","lilla","limatura","limitare","limpido","lineare","lingua","liquido","lira","lirica","lisca","lite","litigio","livrea","locanda","lode","logica","lombare","londra","longevo","loquace","lorenzo","loto","lotteria","luce","lucidato","lumaca","luminoso","lungo","lupo","luppolo","lusinga","lusso","lutto","macabro","macchina","macero","macinato","madama","magico","maglia","magnete","magro","maiolica","malafede","malgrado","malinteso","malsano","malto","malumore","mana","mancia","mandorla","mangiare","manifesto","mannaro","manovra","mansarda","mantide","manubrio","mappa","maratona","marcire","maretta","marmo","marsupio","maschera","massaia","mastino","materasso","matricola","mattone","maturo","mazurca","meandro","meccanico","mecenate","medesimo","meditare","mega","melassa","melis","melodia","meninge","meno","mensola","mercurio","merenda","merlo","meschino","mese","messere","mestolo","metallo","metodo","mettere","miagolare","mica","micelio","michele","microbo","midollo","miele","migliore","milano","milite","mimosa","minerale","mini","minore","mirino","mirtillo","miscela","missiva","misto","misurare","mitezza","mitigare","mitra","mittente","mnemonico","modello","modifica","modulo","mogano","mogio","mole","molosso","monastero","monco","mondina","monetario","monile","monotono","monsone","montato","monviso","mora","mordere","morsicato","mostro","motivato","motosega","motto","movenza","movimento","mozzo","mucca","mucosa","muffa","mughetto","mugnaio","mulatto","mulinello","multiplo","mummia","munto","muovere","murale","musa","muscolo","musica","mutevole","muto","nababbo","nafta","nanometro","narciso","narice","narrato","nascere","nastrare","naturale","nautica","naviglio","nebulosa","necrosi","negativo","negozio","nemmeno","neofita","neretto","nervo","nessuno","nettuno","neutrale","neve","nevrotico","nicchia","ninfa","nitido","nobile","nocivo","nodo","nome","nomina","nordico","normale","norvegese","nostrano","notare","notizia","notturno","novella","nucleo","nulla","numero","nuovo","nutrire","nuvola","nuziale","oasi","obbedire","obbligo","obelisco","oblio","obolo","obsoleto","occasione","occhio","occidente","occorrere","occultare","ocra","oculato","odierno","odorare","offerta","offrire","offuscato","oggetto","oggi","ognuno","olandese","olfatto","oliato","oliva","ologramma","oltre","omaggio","ombelico","ombra","omega","omissione","ondoso","onere","onice","onnivoro","onorevole","onta","operato","opinione","opposto","oracolo","orafo","ordine","orecchino","orefice","orfano","organico","origine","orizzonte","orma","ormeggio","ornativo","orologio","orrendo","orribile","ortensia","ortica","orzata","orzo","osare","oscurare","osmosi","ospedale","ospite","ossa","ossidare","ostacolo","oste","otite","otre","ottagono","ottimo","ottobre","ovale","ovest","ovino","oviparo","ovocito","ovunque","ovviare","ozio","pacchetto","pace","pacifico","padella","padrone","paese","paga","pagina","palazzina","palesare","pallido","palo","palude","pandoro","pannello","paolo","paonazzo","paprica","parabola","parcella","parere","pargolo","pari","parlato","parola","partire","parvenza","parziale","passivo","pasticca","patacca","patologia","pattume","pavone","peccato","pedalare","pedonale","peggio","peloso","penare","pendice","penisola","pennuto","penombra","pensare","pentola","pepe","pepita","perbene","percorso","perdonato","perforare","pergamena","periodo","permesso","perno","perplesso","persuaso","pertugio","pervaso","pesatore","pesista","peso","pestifero","petalo","pettine","petulante","pezzo","piacere","pianta","piattino","piccino","picozza","piega","pietra","piffero","pigiama","pigolio","pigro","pila","pilifero","pillola","pilota","pimpante","pineta","pinna","pinolo","pioggia","piombo","piramide","piretico","pirite","pirolisi","pitone","pizzico","placebo","planare","plasma","platano","plenario","pochezza","poderoso","podismo","poesia","poggiare","polenta","poligono","pollice","polmonite","polpetta","polso","poltrona","polvere","pomice","pomodoro","ponte","popoloso","porfido","poroso","porpora","porre","portata","posa","positivo","possesso","postulato","potassio","potere","pranzo","prassi","pratica","precluso","predica","prefisso","pregiato","prelievo","premere","prenotare","preparato","presenza","pretesto","prevalso","prima","principe","privato","problema","procura","produrre","profumo","progetto","prolunga","promessa","pronome","proposta","proroga","proteso","prova","prudente","prugna","prurito","psiche","pubblico","pudica","pugilato","pugno","pulce","pulito","pulsante","puntare","pupazzo","pupilla","puro","quadro","qualcosa","quasi","querela","quota","raccolto","raddoppio","radicale","radunato","raffica","ragazzo","ragione","ragno","ramarro","ramingo","ramo","randagio","rantolare","rapato","rapina","rappreso","rasatura","raschiato","rasente","rassegna","rastrello","rata","ravveduto","reale","recepire","recinto","recluta","recondito","recupero","reddito","redimere","regalato","registro","regola","regresso","relazione","remare","remoto","renna","replica","reprimere","reputare","resa","residente","responso","restauro","rete","retina","retorica","rettifica","revocato","riassunto","ribadire","ribelle","ribrezzo","ricarica","ricco","ricevere","riciclato","ricordo","ricreduto","ridicolo","ridurre","rifasare","riflesso","riforma","rifugio","rigare","rigettato","righello","rilassato","rilevato","rimanere","rimbalzo","rimedio","rimorchio","rinascita","rincaro","rinforzo","rinnovo","rinomato","rinsavito","rintocco","rinuncia","rinvenire","riparato","ripetuto","ripieno","riportare","ripresa","ripulire","risata","rischio","riserva","risibile","riso","rispetto","ristoro","risultato","risvolto","ritardo","ritegno","ritmico","ritrovo","riunione","riva","riverso","rivincita","rivolto","rizoma","roba","robotico","robusto","roccia","roco","rodaggio","rodere","roditore","rogito","rollio","romantico","rompere","ronzio","rosolare","rospo","rotante","rotondo","rotula","rovescio","rubizzo","rubrica","ruga","rullino","rumine","rumoroso","ruolo","rupe","russare","rustico","sabato","sabbiare","sabotato","sagoma","salasso","saldatura","salgemma","salivare","salmone","salone","saltare","saluto","salvo","sapere","sapido","saporito","saraceno","sarcasmo","sarto","sassoso","satellite","satira","satollo","saturno","savana","savio","saziato","sbadiglio","sbalzo","sbancato","sbarra","sbattere","sbavare","sbendare","sbirciare","sbloccato","sbocciato","sbrinare","sbruffone","sbuffare","scabroso","scadenza","scala","scambiare","scandalo","scapola","scarso","scatenare","scavato","scelto","scenico","scettro","scheda","schiena","sciarpa","scienza","scindere","scippo","sciroppo","scivolo","sclerare","scodella","scolpito","scomparto","sconforto","scoprire","scorta","scossone","scozzese","scriba","scrollare","scrutinio","scuderia","scultore","scuola","scuro","scusare","sdebitare","sdoganare","seccatura","secondo","sedano","seggiola","segnalato","segregato","seguito","selciato","selettivo","sella","selvaggio","semaforo","sembrare","seme","seminato","sempre","senso","sentire","sepolto","sequenza","serata","serbato","sereno","serio","serpente","serraglio","servire","sestina","setola","settimana","sfacelo","sfaldare","sfamato","sfarzoso","sfaticato","sfera","sfida","sfilato","sfinge","sfocato","sfoderare","sfogo","sfoltire","sforzato","sfratto","sfruttato","sfuggito","sfumare","sfuso","sgabello","sgarbato","sgonfiare","sgorbio","sgrassato","sguardo","sibilo","siccome","sierra","sigla","signore","silenzio","sillaba","simbolo","simpatico","simulato","sinfonia","singolo","sinistro","sino","sintesi","sinusoide","sipario","sisma","sistole","situato","slitta","slogatura","sloveno","smarrito","smemorato","smentito","smeraldo","smilzo","smontare","smottato","smussato","snellire","snervato","snodo","sobbalzo","sobrio","soccorso","sociale","sodale","soffitto","sogno","soldato","solenne","solido","sollazzo","solo","solubile","solvente","somatico","somma","sonda","sonetto","sonnifero","sopire","soppeso","sopra","sorgere","sorpasso","sorriso","sorso","sorteggio","sorvolato","sospiro","sosta","sottile","spada","spalla","spargere","spatola","spavento","spazzola","specie","spedire","spegnere","spelatura","speranza","spessore","spettrale","spezzato","spia","spigoloso","spillato","spinoso","spirale","splendido","sportivo","sposo","spranga","sprecare","spronato","spruzzo","spuntino","squillo","sradicare","srotolato","stabile","stacco","staffa","stagnare","stampato","stantio","starnuto","stasera","statuto","stelo","steppa","sterzo","stiletto","stima","stirpe","stivale","stizzoso","stonato","storico","strappo","stregato","stridulo","strozzare","strutto","stuccare","stufo","stupendo","subentro","succoso","sudore","suggerito","sugo","sultano","suonare","superbo","supporto","surgelato","surrogato","sussurro","sutura","svagare","svedese","sveglio","svelare","svenuto","svezia","sviluppo","svista","svizzera","svolta","svuotare","tabacco","tabulato","tacciare","taciturno","tale","talismano","tampone","tannino","tara","tardivo","targato","tariffa","tarpare","tartaruga","tasto","tattico","taverna","tavolata","tazza","teca","tecnico","telefono","temerario","tempo","temuto","tendone","tenero","tensione","tentacolo","teorema","terme","terrazzo","terzetto","tesi","tesserato","testato","tetro","tettoia","tifare","tigella","timbro","tinto","tipico","tipografo","tiraggio","tiro","titanio","titolo","titubante","tizio","tizzone","toccare","tollerare","tolto","tombola","tomo","tonfo","tonsilla","topazio","topologia","toppa","torba","tornare","torrone","tortora","toscano","tossire","tostatura","totano","trabocco","trachea","trafila","tragedia","tralcio","tramonto","transito","trapano","trarre","trasloco","trattato","trave","treccia","tremolio","trespolo","tributo","tricheco","trifoglio","trillo","trincea","trio","tristezza","triturato","trivella","tromba","trono","troppo","trottola","trovare","truccato","tubatura","tuffato","tulipano","tumulto","tunisia","turbare","turchino","tuta","tutela","ubicato","uccello","uccisore","udire","uditivo","uffa","ufficio","uguale","ulisse","ultimato","umano","umile","umorismo","uncinetto","ungere","ungherese","unicorno","unificato","unisono","unitario","unte","uovo","upupa","uragano","urgenza","urlo","usanza","usato","uscito","usignolo","usuraio","utensile","utilizzo","utopia","vacante","vaccinato","vagabondo","vagliato","valanga","valgo","valico","valletta","valoroso","valutare","valvola","vampata","vangare","vanitoso","vano","vantaggio","vanvera","vapore","varano","varcato","variante","vasca","vedetta","vedova","veduto","vegetale","veicolo","velcro","velina","velluto","veloce","venato","vendemmia","vento","verace","verbale","vergogna","verifica","vero","verruca","verticale","vescica","vessillo","vestale","veterano","vetrina","vetusto","viandante","vibrante","vicenda","vichingo","vicinanza","vidimare","vigilia","vigneto","vigore","vile","villano","vimini","vincitore","viola","vipera","virgola","virologo","virulento","viscoso","visione","vispo","vissuto","visura","vita","vitello","vittima","vivanda","vivido","viziare","voce","voga","volatile","volere","volpe","voragine","vulcano","zampogna","zanna","zappato","zattera","zavorra","zefiro","zelante","zelo","zenzero","zerbino","zibetto","zinco","zircone","zitto","zolla","zotico","zucchero","zufolo","zulu","zuppa"];aM.exports=Xre});var fM=k((P5e,uM)=>{"use strict";v();var Jre=["\u3042\u3044\u3053\u304F\u3057\u3093","\u3042\u3044\u3055\u3064","\u3042\u3044\u305F\u3099","\u3042\u304A\u305D\u3099\u3089","\u3042\u304B\u3061\u3083\u3093","\u3042\u304D\u308B","\u3042\u3051\u304B\u3099\u305F","\u3042\u3051\u308B","\u3042\u3053\u304B\u3099\u308C\u308B","\u3042\u3055\u3044","\u3042\u3055\u3072","\u3042\u3057\u3042\u3068","\u3042\u3057\u3099\u308F\u3046","\u3042\u3059\u3099\u304B\u308B","\u3042\u3059\u3099\u304D","\u3042\u305D\u3075\u3099","\u3042\u305F\u3048\u308B","\u3042\u305F\u305F\u3081\u308B","\u3042\u305F\u308A\u307E\u3048","\u3042\u305F\u308B","\u3042\u3064\u3044","\u3042\u3064\u304B\u3046","\u3042\u3063\u3057\u3085\u304F","\u3042\u3064\u307E\u308A","\u3042\u3064\u3081\u308B","\u3042\u3066\u306A","\u3042\u3066\u306F\u307E\u308B","\u3042\u3072\u308B","\u3042\u3075\u3099\u3089","\u3042\u3075\u3099\u308B","\u3042\u3075\u308C\u308B","\u3042\u307E\u3044","\u3042\u307E\u3068\u3099","\u3042\u307E\u3084\u304B\u3059","\u3042\u307E\u308A","\u3042\u307F\u3082\u306E","\u3042\u3081\u308A\u304B","\u3042\u3084\u307E\u308B","\u3042\u3086\u3080","\u3042\u3089\u3044\u304F\u3099\u307E","\u3042\u3089\u3057","\u3042\u3089\u3059\u3057\u3099","\u3042\u3089\u305F\u3081\u308B","\u3042\u3089\u3086\u308B","\u3042\u3089\u308F\u3059","\u3042\u308A\u304B\u3099\u3068\u3046","\u3042\u308F\u305B\u308B","\u3042\u308F\u3066\u308B","\u3042\u3093\u3044","\u3042\u3093\u304B\u3099\u3044","\u3042\u3093\u3053","\u3042\u3093\u305B\u3099\u3093","\u3042\u3093\u3066\u3044","\u3042\u3093\u306A\u3044","\u3042\u3093\u307E\u308A","\u3044\u3044\u305F\u3099\u3059","\u3044\u304A\u3093","\u3044\u304B\u3099\u3044","\u3044\u304B\u3099\u304F","\u3044\u304D\u304A\u3044","\u3044\u304D\u306A\u308A","\u3044\u304D\u3082\u306E","\u3044\u304D\u308B","\u3044\u304F\u3057\u3099","\u3044\u304F\u3075\u3099\u3093","\u3044\u3051\u306F\u3099\u306A","\u3044\u3051\u3093","\u3044\u3053\u3046","\u3044\u3053\u304F","\u3044\u3053\u3064","\u3044\u3055\u307E\u3057\u3044","\u3044\u3055\u3093","\u3044\u3057\u304D","\u3044\u3057\u3099\u3085\u3046","\u3044\u3057\u3099\u3087\u3046","\u3044\u3057\u3099\u308F\u308B","\u3044\u3059\u3099\u307F","\u3044\u3059\u3099\u308C","\u3044\u305B\u3044","\u3044\u305B\u3048\u3072\u3099","\u3044\u305B\u304B\u3044","\u3044\u305B\u304D","\u3044\u305B\u3099\u3093","\u3044\u305D\u3046\u308D\u3046","\u3044\u305D\u304B\u3099\u3057\u3044","\u3044\u305F\u3099\u3044","\u3044\u305F\u3099\u304F","\u3044\u305F\u3059\u3099\u3089","\u3044\u305F\u307F","\u3044\u305F\u308A\u3042","\u3044\u3061\u304A\u3046","\u3044\u3061\u3057\u3099","\u3044\u3061\u3068\u3099","\u3044\u3061\u306F\u3099","\u3044\u3061\u3075\u3099","\u3044\u3061\u308A\u3085\u3046","\u3044\u3064\u304B","\u3044\u3063\u3057\u3085\u3093","\u3044\u3063\u305B\u3044","\u3044\u3063\u305D\u3046","\u3044\u3063\u305F\u3093","\u3044\u3063\u3061","\u3044\u3063\u3066\u3044","\u3044\u3063\u307B\u309A\u3046","\u3044\u3066\u3055\u3099","\u3044\u3066\u3093","\u3044\u3068\u3099\u3046","\u3044\u3068\u3053","\u3044\u306A\u3044","\u3044\u306A\u304B","\u3044\u306D\u3080\u308A","\u3044\u306E\u3061","\u3044\u306E\u308B","\u3044\u306F\u3064","\u3044\u306F\u3099\u308B","\u3044\u306F\u3093","\u3044\u3072\u3099\u304D","\u3044\u3072\u3093","\u3044\u3075\u304F","\u3044\u3078\u3093","\u3044\u307B\u3046","\u3044\u307F\u3093","\u3044\u3082\u3046\u3068","\u3044\u3082\u305F\u308C","\u3044\u3082\u308A","\u3044\u3084\u304B\u3099\u308B","\u3044\u3084\u3059","\u3044\u3088\u304B\u3093","\u3044\u3088\u304F","\u3044\u3089\u3044","\u3044\u3089\u3059\u3068","\u3044\u308A\u304F\u3099\u3061","\u3044\u308A\u3087\u3046","\u3044\u308C\u3044","\u3044\u308C\u3082\u306E","\u3044\u308C\u308B","\u3044\u308D\u3048\u3093\u3072\u309A\u3064","\u3044\u308F\u3044","\u3044\u308F\u3046","\u3044\u308F\u304B\u3093","\u3044\u308F\u306F\u3099","\u3044\u308F\u3086\u308B","\u3044\u3093\u3051\u3099\u3093\u307E\u3081","\u3044\u3093\u3055\u3064","\u3044\u3093\u3057\u3087\u3046","\u3044\u3093\u3088\u3046","\u3046\u3048\u304D","\u3046\u3048\u308B","\u3046\u304A\u3055\u3099","\u3046\u304B\u3099\u3044","\u3046\u304B\u3075\u3099","\u3046\u304B\u3078\u3099\u308B","\u3046\u304D\u308F","\u3046\u304F\u3089\u3044\u306A","\u3046\u304F\u308C\u308C","\u3046\u3051\u305F\u307E\u308F\u308B","\u3046\u3051\u3064\u3051","\u3046\u3051\u3068\u308B","\u3046\u3051\u3082\u3064","\u3046\u3051\u308B","\u3046\u3053\u3099\u304B\u3059","\u3046\u3053\u3099\u304F","\u3046\u3053\u3093","\u3046\u3055\u304D\u3099","\u3046\u3057\u306A\u3046","\u3046\u3057\u308D\u304B\u3099\u307F","\u3046\u3059\u3044","\u3046\u3059\u304D\u3099","\u3046\u3059\u304F\u3099\u3089\u3044","\u3046\u3059\u3081\u308B","\u3046\u305B\u3064","\u3046\u3061\u3042\u308F\u305B","\u3046\u3061\u304B\u3099\u308F","\u3046\u3061\u304D","\u3046\u3061\u3085\u3046","\u3046\u3063\u304B\u308A","\u3046\u3064\u304F\u3057\u3044","\u3046\u3063\u305F\u3048\u308B","\u3046\u3064\u308B","\u3046\u3068\u3099\u3093","\u3046\u306A\u304D\u3099","\u3046\u306A\u3057\u3099","\u3046\u306A\u3059\u3099\u304F","\u3046\u306A\u308B","\u3046\u306D\u308B","\u3046\u306E\u3046","\u3046\u3075\u3099\u3051\u3099","\u3046\u3075\u3099\u3053\u3099\u3048","\u3046\u307E\u308C\u308B","\u3046\u3081\u308B","\u3046\u3082\u3046","\u3046\u3084\u307E\u3046","\u3046\u3088\u304F","\u3046\u3089\u304B\u3099\u3048\u3059","\u3046\u3089\u304F\u3099\u3061","\u3046\u3089\u306A\u3044","\u3046\u308A\u3042\u3051\u3099","\u3046\u308A\u304D\u308C","\u3046\u308B\u3055\u3044","\u3046\u308C\u3057\u3044","\u3046\u308C\u3086\u304D","\u3046\u308C\u308B","\u3046\u308D\u3053","\u3046\u308F\u304D","\u3046\u308F\u3055","\u3046\u3093\u3053\u3046","\u3046\u3093\u3061\u3093","\u3046\u3093\u3066\u3093","\u3046\u3093\u3068\u3099\u3046","\u3048\u3044\u3048\u3093","\u3048\u3044\u304B\u3099","\u3048\u3044\u304D\u3087\u3046","\u3048\u3044\u3053\u3099","\u3048\u3044\u305B\u3044","\u3048\u3044\u3075\u3099\u3093","\u3048\u3044\u3088\u3046","\u3048\u3044\u308F","\u3048\u304A\u308A","\u3048\u304B\u3099\u304A","\u3048\u304B\u3099\u304F","\u3048\u304D\u305F\u3044","\u3048\u304F\u305B\u308B","\u3048\u3057\u3083\u304F","\u3048\u3059\u3066","\u3048\u3064\u3089\u3093","\u3048\u306E\u304F\u3099","\u3048\u307B\u3046\u307E\u304D","\u3048\u307B\u3093","\u3048\u307E\u304D","\u3048\u3082\u3057\u3099","\u3048\u3082\u306E","\u3048\u3089\u3044","\u3048\u3089\u3075\u3099","\u3048\u308A\u3042","\u3048\u3093\u3048\u3093","\u3048\u3093\u304B\u3044","\u3048\u3093\u304D\u3099","\u3048\u3093\u3051\u3099\u304D","\u3048\u3093\u3057\u3085\u3046","\u3048\u3093\u305B\u3099\u3064","\u3048\u3093\u305D\u304F","\u3048\u3093\u3061\u3087\u3046","\u3048\u3093\u3068\u3064","\u304A\u3044\u304B\u3051\u308B","\u304A\u3044\u3053\u3059","\u304A\u3044\u3057\u3044","\u304A\u3044\u3064\u304F","\u304A\u3046\u3048\u3093","\u304A\u3046\u3055\u307E","\u304A\u3046\u3057\u3099","\u304A\u3046\u305B\u3064","\u304A\u3046\u305F\u3044","\u304A\u3046\u3075\u304F","\u304A\u3046\u3078\u3099\u3044","\u304A\u3046\u3088\u3046","\u304A\u3048\u308B","\u304A\u304A\u3044","\u304A\u304A\u3046","\u304A\u304A\u3068\u3099\u304A\u308A","\u304A\u304A\u3084","\u304A\u304A\u3088\u305D","\u304A\u304B\u3048\u308A","\u304A\u304B\u3059\u3099","\u304A\u304B\u3099\u3080","\u304A\u304B\u308F\u308A","\u304A\u304D\u3099\u306A\u3046","\u304A\u304D\u308B","\u304A\u304F\u3055\u307E","\u304A\u304F\u3057\u3099\u3087\u3046","\u304A\u304F\u308A\u304B\u3099\u306A","\u304A\u304F\u308B","\u304A\u304F\u308C\u308B","\u304A\u3053\u3059","\u304A\u3053\u306A\u3046","\u304A\u3053\u308B","\u304A\u3055\u3048\u308B","\u304A\u3055\u306A\u3044","\u304A\u3055\u3081\u308B","\u304A\u3057\u3044\u308C","\u304A\u3057\u3048\u308B","\u304A\u3057\u3099\u304D\u3099","\u304A\u3057\u3099\u3055\u3093","\u304A\u3057\u3083\u308C","\u304A\u305D\u3089\u304F","\u304A\u305D\u308F\u308B","\u304A\u305F\u304B\u3099\u3044","\u304A\u305F\u304F","\u304A\u305F\u3099\u3084\u304B","\u304A\u3061\u3064\u304F","\u304A\u3063\u3068","\u304A\u3064\u308A","\u304A\u3066\u3099\u304B\u3051","\u304A\u3068\u3057\u3082\u306E","\u304A\u3068\u306A\u3057\u3044","\u304A\u3068\u3099\u308A","\u304A\u3068\u3099\u308D\u304B\u3059","\u304A\u306F\u3099\u3055\u3093","\u304A\u307E\u3044\u308A","\u304A\u3081\u3066\u3099\u3068\u3046","\u304A\u3082\u3044\u3066\u3099","\u304A\u3082\u3046","\u304A\u3082\u305F\u3044","\u304A\u3082\u3061\u3083","\u304A\u3084\u3064","\u304A\u3084\u3086\u3072\u3099","\u304A\u3088\u307B\u3099\u3059","\u304A\u3089\u3093\u305F\u3099","\u304A\u308D\u3059","\u304A\u3093\u304B\u3099\u304F","\u304A\u3093\u3051\u3044","\u304A\u3093\u3057\u3083","\u304A\u3093\u305B\u3093","\u304A\u3093\u305F\u3099\u3093","\u304A\u3093\u3061\u3085\u3046","\u304A\u3093\u3068\u3099\u3051\u3044","\u304B\u3042\u3064","\u304B\u3044\u304B\u3099","\u304B\u3099\u3044\u304D","\u304B\u3099\u3044\u3051\u3093","\u304B\u3099\u3044\u3053\u3046","\u304B\u3044\u3055\u3064","\u304B\u3044\u3057\u3083","\u304B\u3044\u3059\u3044\u3088\u304F","\u304B\u3044\u305B\u3099\u3093","\u304B\u3044\u305D\u3099\u3046\u3068\u3099","\u304B\u3044\u3064\u3046","\u304B\u3044\u3066\u3093","\u304B\u3044\u3068\u3046","\u304B\u3044\u3075\u304F","\u304B\u3099\u3044\u3078\u304D","\u304B\u3044\u307B\u3046","\u304B\u3044\u3088\u3046","\u304B\u3099\u3044\u3089\u3044","\u304B\u3044\u308F","\u304B\u3048\u308B","\u304B\u304A\u308A","\u304B\u304B\u3048\u308B","\u304B\u304B\u3099\u304F","\u304B\u304B\u3099\u3057","\u304B\u304B\u3099\u307F","\u304B\u304F\u3053\u3099","\u304B\u304F\u3068\u304F","\u304B\u3055\u3099\u308B","\u304B\u3099\u305D\u3099\u3046","\u304B\u305F\u3044","\u304B\u305F\u3061","\u304B\u3099\u3061\u3087\u3046","\u304B\u3099\u3063\u304D\u3085\u3046","\u304B\u3099\u3063\u3053\u3046","\u304B\u3099\u3063\u3055\u3093","\u304B\u3099\u3063\u3057\u3087\u3046","\u304B\u306A\u3055\u3099\u308F\u3057","\u304B\u306E\u3046","\u304B\u3099\u306F\u304F","\u304B\u3075\u3099\u304B","\u304B\u307B\u3046","\u304B\u307B\u3053\u3099","\u304B\u307E\u3046","\u304B\u307E\u307B\u3099\u3053","\u304B\u3081\u308C\u304A\u3093","\u304B\u3086\u3044","\u304B\u3088\u3046\u3072\u3099","\u304B\u3089\u3044","\u304B\u308B\u3044","\u304B\u308D\u3046","\u304B\u308F\u304F","\u304B\u308F\u3089","\u304B\u3099\u3093\u304B","\u304B\u3093\u3051\u3044","\u304B\u3093\u3053\u3046","\u304B\u3093\u3057\u3083","\u304B\u3093\u305D\u3046","\u304B\u3093\u305F\u3093","\u304B\u3093\u3061","\u304B\u3099\u3093\u306F\u3099\u308B","\u304D\u3042\u3044","\u304D\u3042\u3064","\u304D\u3044\u308D","\u304D\u3099\u3044\u3093","\u304D\u3046\u3044","\u304D\u3046\u3093","\u304D\u3048\u308B","\u304D\u304A\u3046","\u304D\u304A\u304F","\u304D\u304A\u3061","\u304D\u304A\u3093","\u304D\u304B\u3044","\u304D\u304B\u304F","\u304D\u304B\u3093\u3057\u3083","\u304D\u304D\u3066","\u304D\u304F\u306F\u3099\u308A","\u304D\u304F\u3089\u3051\u3099","\u304D\u3051\u3093\u305B\u3044","\u304D\u3053\u3046","\u304D\u3053\u3048\u308B","\u304D\u3053\u304F","\u304D\u3055\u3044","\u304D\u3055\u304F","\u304D\u3055\u307E","\u304D\u3055\u3089\u304D\u3099","\u304D\u3099\u3057\u3099\u304B\u304B\u3099\u304F","\u304D\u3099\u3057\u304D","\u304D\u3099\u3057\u3099\u305F\u3044\u3051\u3093","\u304D\u3099\u3057\u3099\u306B\u3063\u3066\u3044","\u304D\u3099\u3057\u3099\u3085\u3064\u3057\u3083","\u304D\u3059\u3046","\u304D\u305B\u3044","\u304D\u305B\u304D","\u304D\u305B\u3064","\u304D\u305D\u3046","\u304D\u305D\u3099\u304F","\u304D\u305D\u3099\u3093","\u304D\u305F\u3048\u308B","\u304D\u3061\u3087\u3046","\u304D\u3064\u3048\u3093","\u304D\u3099\u3063\u3061\u308A","\u304D\u3064\u3064\u304D","\u304D\u3064\u306D","\u304D\u3066\u3044","\u304D\u3068\u3099\u3046","\u304D\u3068\u3099\u304F","\u304D\u306A\u3044","\u304D\u306A\u304B\u3099","\u304D\u306A\u3053","\u304D\u306C\u3053\u3099\u3057","\u304D\u306D\u3093","\u304D\u306E\u3046","\u304D\u306E\u3057\u305F","\u304D\u306F\u304F","\u304D\u3072\u3099\u3057\u3044","\u304D\u3072\u3093","\u304D\u3075\u304F","\u304D\u3075\u3099\u3093","\u304D\u307B\u3099\u3046","\u304D\u307B\u3093","\u304D\u307E\u308B","\u304D\u307F\u3064","\u304D\u3080\u3059\u3099\u304B\u3057\u3044","\u304D\u3081\u308B","\u304D\u3082\u305F\u3099\u3081\u3057","\u304D\u3082\u3061","\u304D\u3082\u306E","\u304D\u3083\u304F","\u304D\u3084\u304F","\u304D\u3099\u3085\u3046\u306B\u304F","\u304D\u3088\u3046","\u304D\u3087\u3046\u308A\u3085\u3046","\u304D\u3089\u3044","\u304D\u3089\u304F","\u304D\u308A\u3093","\u304D\u308C\u3044","\u304D\u308C\u3064","\u304D\u308D\u304F","\u304D\u3099\u308D\u3093","\u304D\u308F\u3081\u308B","\u304D\u3099\u3093\u3044\u308D","\u304D\u3093\u304B\u304F\u3057\u3099","\u304D\u3093\u3057\u3099\u3087","\u304D\u3093\u3088\u3046\u3072\u3099","\u304F\u3099\u3042\u3044","\u304F\u3044\u3059\u3099","\u304F\u3046\u304B\u3093","\u304F\u3046\u304D","\u304F\u3046\u304F\u3099\u3093","\u304F\u3046\u3053\u3046","\u304F\u3099\u3046\u305B\u3044","\u304F\u3046\u305D\u3046","\u304F\u3099\u3046\u305F\u3089","\u304F\u3046\u3075\u304F","\u304F\u3046\u307B\u3099","\u304F\u304B\u3093","\u304F\u304D\u3087\u3046","\u304F\u3051\u3099\u3093","\u304F\u3099\u3053\u3046","\u304F\u3055\u3044","\u304F\u3055\u304D","\u304F\u3055\u306F\u3099\u306A","\u304F\u3055\u308B","\u304F\u3057\u3083\u307F","\u304F\u3057\u3087\u3046","\u304F\u3059\u306E\u304D","\u304F\u3059\u308A\u3086\u3072\u3099","\u304F\u305B\u3051\u3099","\u304F\u305B\u3093","\u304F\u3099\u305F\u3044\u3066\u304D","\u304F\u305F\u3099\u3055\u308B","\u304F\u305F\u3072\u3099\u308C\u308B","\u304F\u3061\u3053\u307F","\u304F\u3061\u3055\u304D","\u304F\u3064\u3057\u305F","\u304F\u3099\u3063\u3059\u308A","\u304F\u3064\u308D\u304F\u3099","\u304F\u3068\u3046\u3066\u3093","\u304F\u3068\u3099\u304F","\u304F\u306A\u3093","\u304F\u306D\u304F\u306D","\u304F\u306E\u3046","\u304F\u3075\u3046","\u304F\u307F\u3042\u308F\u305B","\u304F\u307F\u305F\u3066\u308B","\u304F\u3081\u308B","\u304F\u3084\u304F\u3057\u3087","\u304F\u3089\u3059","\u304F\u3089\u3078\u3099\u308B","\u304F\u308B\u307E","\u304F\u308C\u308B","\u304F\u308D\u3046","\u304F\u308F\u3057\u3044","\u304F\u3099\u3093\u304B\u3093","\u304F\u3099\u3093\u3057\u3087\u304F","\u304F\u3099\u3093\u305F\u3044","\u304F\u3099\u3093\u3066","\u3051\u3042\u306A","\u3051\u3044\u304B\u304F","\u3051\u3044\u3051\u3093","\u3051\u3044\u3053","\u3051\u3044\u3055\u3064","\u3051\u3099\u3044\u3057\u3099\u3085\u3064","\u3051\u3044\u305F\u3044","\u3051\u3099\u3044\u306E\u3046\u3057\u3099\u3093","\u3051\u3044\u308C\u304D","\u3051\u3044\u308D","\u3051\u304A\u3068\u3059","\u3051\u304A\u308A\u3082\u306E","\u3051\u3099\u304D\u304B","\u3051\u3099\u304D\u3051\u3099\u3093","\u3051\u3099\u304D\u305F\u3099\u3093","\u3051\u3099\u304D\u3061\u3093","\u3051\u3099\u304D\u3068\u3064","\u3051\u3099\u304D\u306F","\u3051\u3099\u304D\u3084\u304F","\u3051\u3099\u3053\u3046","\u3051\u3099\u3053\u304F\u3057\u3099\u3087\u3046","\u3051\u3099\u3055\u3099\u3044","\u3051\u3055\u304D","\u3051\u3099\u3055\u3099\u3093","\u3051\u3057\u304D","\u3051\u3057\u3053\u3099\u3080","\u3051\u3057\u3087\u3046","\u3051\u3099\u3059\u3068","\u3051\u305F\u306F\u3099","\u3051\u3061\u3083\u3063\u3075\u309A","\u3051\u3061\u3089\u3059","\u3051\u3064\u3042\u3064","\u3051\u3064\u3044","\u3051\u3064\u3048\u304D","\u3051\u3063\u3053\u3093","\u3051\u3064\u3057\u3099\u3087","\u3051\u3063\u305B\u304D","\u3051\u3063\u3066\u3044","\u3051\u3064\u307E\u3064","\u3051\u3099\u3064\u3088\u3046\u3072\u3099","\u3051\u3099\u3064\u308C\u3044","\u3051\u3064\u308D\u3093","\u3051\u3099\u3068\u3099\u304F","\u3051\u3068\u306F\u3099\u3059","\u3051\u3068\u308B","\u3051\u306A\u3051\u3099","\u3051\u306A\u3059","\u3051\u306A\u307F","\u3051\u306C\u304D","\u3051\u3099\u306D\u3064","\u3051\u306D\u3093","\u3051\u306F\u3044","\u3051\u3099\u3072\u3093","\u3051\u3075\u3099\u304B\u3044","\u3051\u3099\u307B\u3099\u304F","\u3051\u307E\u308A","\u3051\u307F\u304B\u308B","\u3051\u3080\u3057","\u3051\u3080\u308A","\u3051\u3082\u306E","\u3051\u3089\u3044","\u3051\u308D\u3051\u308D","\u3051\u308F\u3057\u3044","\u3051\u3093\u3044","\u3051\u3093\u3048\u3064","\u3051\u3093\u304A","\u3051\u3093\u304B","\u3051\u3099\u3093\u304D","\u3051\u3093\u3051\u3099\u3093","\u3051\u3093\u3053\u3046","\u3051\u3093\u3055\u304F","\u3051\u3093\u3057\u3085\u3046","\u3051\u3093\u3059\u3046","\u3051\u3099\u3093\u305D\u3046","\u3051\u3093\u3061\u304F","\u3051\u3093\u3066\u3044","\u3051\u3093\u3068\u3046","\u3051\u3093\u306A\u3044","\u3051\u3093\u306B\u3093","\u3051\u3099\u3093\u3075\u3099\u3064","\u3051\u3093\u307E","\u3051\u3093\u307F\u3093","\u3051\u3093\u3081\u3044","\u3051\u3093\u3089\u3093","\u3051\u3093\u308A","\u3053\u3042\u304F\u307E","\u3053\u3044\u306C","\u3053\u3044\u3072\u3099\u3068","\u3053\u3099\u3046\u3044","\u3053\u3046\u3048\u3093","\u3053\u3046\u304A\u3093","\u3053\u3046\u304B\u3093","\u3053\u3099\u3046\u304D\u3085\u3046","\u3053\u3099\u3046\u3051\u3044","\u3053\u3046\u3053\u3046","\u3053\u3046\u3055\u3044","\u3053\u3046\u3057\u3099","\u3053\u3046\u3059\u3044","\u3053\u3099\u3046\u305B\u3044","\u3053\u3046\u305D\u304F","\u3053\u3046\u305F\u3044","\u3053\u3046\u3061\u3083","\u3053\u3046\u3064\u3046","\u3053\u3046\u3066\u3044","\u3053\u3046\u3068\u3099\u3046","\u3053\u3046\u306A\u3044","\u3053\u3046\u306F\u3044","\u3053\u3099\u3046\u307B\u3046","\u3053\u3099\u3046\u307E\u3093","\u3053\u3046\u3082\u304F","\u3053\u3046\u308A\u3064","\u3053\u3048\u308B","\u3053\u304A\u308A","\u3053\u3099\u304B\u3044","\u3053\u3099\u304B\u3099\u3064","\u3053\u3099\u304B\u3093","\u3053\u304F\u3053\u3099","\u3053\u304F\u3055\u3044","\u3053\u304F\u3068\u3046","\u3053\u304F\u306A\u3044","\u3053\u304F\u306F\u304F","\u3053\u304F\u3099\u307E","\u3053\u3051\u3044","\u3053\u3051\u308B","\u3053\u3053\u306E\u304B","\u3053\u3053\u308D","\u3053\u3055\u3081","\u3053\u3057\u3064","\u3053\u3059\u3046","\u3053\u305B\u3044","\u3053\u305B\u304D","\u3053\u305B\u3099\u3093","\u3053\u305D\u305F\u3099\u3066","\u3053\u305F\u3044","\u3053\u305F\u3048\u308B","\u3053\u305F\u3064","\u3053\u3061\u3087\u3046","\u3053\u3063\u304B","\u3053\u3064\u3053\u3064","\u3053\u3064\u306F\u3099\u3093","\u3053\u3064\u3075\u3099","\u3053\u3066\u3044","\u3053\u3066\u3093","\u3053\u3068\u304B\u3099\u3089","\u3053\u3068\u3057","\u3053\u3068\u306F\u3099","\u3053\u3068\u308A","\u3053\u306A\u3053\u3099\u306A","\u3053\u306D\u3053\u306D","\u3053\u306E\u307E\u307E","\u3053\u306E\u307F","\u3053\u306E\u3088","\u3053\u3099\u306F\u3093","\u3053\u3072\u3064\u3057\u3099","\u3053\u3075\u3046","\u3053\u3075\u3093","\u3053\u307B\u3099\u308C\u308B","\u3053\u3099\u307E\u3042\u3075\u3099\u3089","\u3053\u307E\u304B\u3044","\u3053\u3099\u307E\u3059\u308A","\u3053\u307E\u3064\u306A","\u3053\u307E\u308B","\u3053\u3080\u304D\u3099\u3053","\u3053\u3082\u3057\u3099","\u3053\u3082\u3061","\u3053\u3082\u306E","\u3053\u3082\u3093","\u3053\u3084\u304F","\u3053\u3084\u307E","\u3053\u3086\u3046","\u3053\u3086\u3072\u3099","\u3053\u3088\u3044","\u3053\u3088\u3046","\u3053\u308A\u308B","\u3053\u308C\u304F\u3057\u3087\u3093","\u3053\u308D\u3063\u3051","\u3053\u308F\u3082\u3066","\u3053\u308F\u308C\u308B","\u3053\u3093\u3044\u3093","\u3053\u3093\u304B\u3044","\u3053\u3093\u304D","\u3053\u3093\u3057\u3085\u3046","\u3053\u3093\u3059\u3044","\u3053\u3093\u305F\u3099\u3066","\u3053\u3093\u3068\u3093","\u3053\u3093\u306A\u3093","\u3053\u3093\u3072\u3099\u306B","\u3053\u3093\u307B\u309A\u3093","\u3053\u3093\u307E\u3051","\u3053\u3093\u3084","\u3053\u3093\u308C\u3044","\u3053\u3093\u308F\u304F","\u3055\u3099\u3044\u3048\u304D","\u3055\u3044\u304B\u3044","\u3055\u3044\u304D\u3093","\u3055\u3099\u3044\u3051\u3099\u3093","\u3055\u3099\u3044\u3053","\u3055\u3044\u3057\u3087","\u3055\u3044\u305B\u3044","\u3055\u3099\u3044\u305F\u304F","\u3055\u3099\u3044\u3061\u3085\u3046","\u3055\u3044\u3066\u304D","\u3055\u3099\u3044\u308A\u3087\u3046","\u3055\u3046\u306A","\u3055\u304B\u3044\u3057","\u3055\u304B\u3099\u3059","\u3055\u304B\u306A","\u3055\u304B\u307F\u3061","\u3055\u304B\u3099\u308B","\u3055\u304D\u3099\u3087\u3046","\u3055\u304F\u3057","\u3055\u304F\u3072\u3093","\u3055\u304F\u3089","\u3055\u3053\u304F","\u3055\u3053\u3064","\u3055\u3059\u3099\u304B\u308B","\u3055\u3099\u305B\u304D","\u3055\u305F\u3093","\u3055\u3064\u3048\u3044","\u3055\u3099\u3064\u304A\u3093","\u3055\u3099\u3063\u304B","\u3055\u3099\u3064\u304B\u3099\u304F","\u3055\u3063\u304D\u3087\u304F","\u3055\u3099\u3063\u3057","\u3055\u3064\u3057\u3099\u3093","\u3055\u3099\u3063\u305D\u3046","\u3055\u3064\u305F\u306F\u3099","\u3055\u3064\u307E\u3044\u3082","\u3055\u3066\u3044","\u3055\u3068\u3044\u3082","\u3055\u3068\u3046","\u3055\u3068\u304A\u3084","\u3055\u3068\u3057","\u3055\u3068\u308B","\u3055\u306E\u3046","\u3055\u306F\u3099\u304F","\u3055\u3072\u3099\u3057\u3044","\u3055\u3078\u3099\u3064","\u3055\u307B\u3046","\u3055\u307B\u3068\u3099","\u3055\u307E\u3059","\u3055\u307F\u3057\u3044","\u3055\u307F\u305F\u3099\u308C","\u3055\u3080\u3051","\u3055\u3081\u308B","\u3055\u3084\u3048\u3093\u3068\u3099\u3046","\u3055\u3086\u3046","\u3055\u3088\u3046","\u3055\u3088\u304F","\u3055\u3089\u305F\u3099","\u3055\u3099\u308B\u305D\u306F\u3099","\u3055\u308F\u3084\u304B","\u3055\u308F\u308B","\u3055\u3093\u3044\u3093","\u3055\u3093\u304B","\u3055\u3093\u304D\u3083\u304F","\u3055\u3093\u3053\u3046","\u3055\u3093\u3055\u3044","\u3055\u3099\u3093\u3057\u3087","\u3055\u3093\u3059\u3046","\u3055\u3093\u305B\u3044","\u3055\u3093\u305D","\u3055\u3093\u3061","\u3055\u3093\u307E","\u3055\u3093\u307F","\u3055\u3093\u3089\u3093","\u3057\u3042\u3044","\u3057\u3042\u3051\u3099","\u3057\u3042\u3055\u3063\u3066","\u3057\u3042\u308F\u305B","\u3057\u3044\u304F","\u3057\u3044\u3093","\u3057\u3046\u3061","\u3057\u3048\u3044","\u3057\u304A\u3051","\u3057\u304B\u3044","\u3057\u304B\u304F","\u3057\u3099\u304B\u3093","\u3057\u3053\u3099\u3068","\u3057\u3059\u3046","\u3057\u3099\u305F\u3099\u3044","\u3057\u305F\u3046\u3051","\u3057\u305F\u304D\u3099","\u3057\u305F\u3066","\u3057\u305F\u307F","\u3057\u3061\u3087\u3046","\u3057\u3061\u308A\u3093","\u3057\u3063\u304B\u308A","\u3057\u3064\u3057\u3099","\u3057\u3064\u3082\u3093","\u3057\u3066\u3044","\u3057\u3066\u304D","\u3057\u3066\u3064","\u3057\u3099\u3066\u3093","\u3057\u3099\u3068\u3099\u3046","\u3057\u306A\u304D\u3099\u308C","\u3057\u306A\u3082\u306E","\u3057\u306A\u3093","\u3057\u306D\u307E","\u3057\u306D\u3093","\u3057\u306E\u304F\u3099","\u3057\u306E\u3075\u3099","\u3057\u306F\u3044","\u3057\u306F\u3099\u304B\u308A","\u3057\u306F\u3064","\u3057\u306F\u3089\u3044","\u3057\u306F\u3093","\u3057\u3072\u3087\u3046","\u3057\u3075\u304F","\u3057\u3099\u3075\u3099\u3093","\u3057\u3078\u3044","\u3057\u307B\u3046","\u3057\u307B\u3093","\u3057\u307E\u3046","\u3057\u307E\u308B","\u3057\u307F\u3093","\u3057\u3080\u3051\u308B","\u3057\u3099\u3080\u3057\u3087","\u3057\u3081\u3044","\u3057\u3081\u308B","\u3057\u3082\u3093","\u3057\u3083\u3044\u3093","\u3057\u3083\u3046\u3093","\u3057\u3083\u304A\u3093","\u3057\u3099\u3083\u304B\u3099\u3044\u3082","\u3057\u3084\u304F\u3057\u3087","\u3057\u3083\u304F\u307B\u3046","\u3057\u3083\u3051\u3093","\u3057\u3083\u3053","\u3057\u3083\u3055\u3099\u3044","\u3057\u3083\u3057\u3093","\u3057\u3083\u305B\u3093","\u3057\u3083\u305D\u3046","\u3057\u3083\u305F\u3044","\u3057\u3083\u3061\u3087\u3046","\u3057\u3083\u3063\u304D\u3093","\u3057\u3099\u3083\u307E","\u3057\u3083\u308A\u3093","\u3057\u3083\u308C\u3044","\u3057\u3099\u3086\u3046","\u3057\u3099\u3085\u3046\u3057\u3087","\u3057\u3085\u304F\u306F\u304F","\u3057\u3099\u3085\u3057\u3093","\u3057\u3085\u3063\u305B\u304D","\u3057\u3085\u307F","\u3057\u3085\u3089\u306F\u3099","\u3057\u3099\u3085\u3093\u306F\u3099\u3093","\u3057\u3087\u3046\u304B\u3044","\u3057\u3087\u304F\u305F\u304F","\u3057\u3087\u3063\u3051\u3093","\u3057\u3087\u3068\u3099\u3046","\u3057\u3087\u3082\u3064","\u3057\u3089\u305B\u308B","\u3057\u3089\u3078\u3099\u308B","\u3057\u3093\u304B","\u3057\u3093\u3053\u3046","\u3057\u3099\u3093\u3057\u3099\u3083","\u3057\u3093\u305B\u3044\u3057\u3099","\u3057\u3093\u3061\u304F","\u3057\u3093\u308A\u3093","\u3059\u3042\u3051\u3099","\u3059\u3042\u3057","\u3059\u3042\u306A","\u3059\u3099\u3042\u3093","\u3059\u3044\u3048\u3044","\u3059\u3044\u304B","\u3059\u3044\u3068\u3046","\u3059\u3099\u3044\u3075\u3099\u3093","\u3059\u3044\u3088\u3046\u3072\u3099","\u3059\u3046\u304B\u3099\u304F","\u3059\u3046\u3057\u3099\u3064","\u3059\u3046\u305B\u3093","\u3059\u304A\u3068\u3099\u308A","\u3059\u304D\u307E","\u3059\u304F\u3046","\u3059\u304F\u306A\u3044","\u3059\u3051\u308B","\u3059\u3053\u3099\u3044","\u3059\u3053\u3057","\u3059\u3099\u3055\u3093","\u3059\u3059\u3099\u3057\u3044","\u3059\u3059\u3080","\u3059\u3059\u3081\u308B","\u3059\u3063\u304B\u308A","\u3059\u3099\u3063\u3057\u308A","\u3059\u3099\u3063\u3068","\u3059\u3066\u304D","\u3059\u3066\u308B","\u3059\u306D\u308B","\u3059\u306E\u3053","\u3059\u306F\u305F\u3099","\u3059\u306F\u3099\u3089\u3057\u3044","\u3059\u3099\u3072\u3087\u3046","\u3059\u3099\u3075\u3099\u306C\u308C","\u3059\u3075\u3099\u308A","\u3059\u3075\u308C","\u3059\u3078\u3099\u3066","\u3059\u3078\u3099\u308B","\u3059\u3099\u307B\u3046","\u3059\u307B\u3099\u3093","\u3059\u307E\u3044","\u3059\u3081\u3057","\u3059\u3082\u3046","\u3059\u3084\u304D","\u3059\u3089\u3059\u3089","\u3059\u308B\u3081","\u3059\u308C\u3061\u304B\u3099\u3046","\u3059\u308D\u3063\u3068","\u3059\u308F\u308B","\u3059\u3093\u305B\u3099\u3093","\u3059\u3093\u307B\u309A\u3046","\u305B\u3042\u3075\u3099\u3089","\u305B\u3044\u304B\u3064","\u305B\u3044\u3051\u3099\u3093","\u305B\u3044\u3057\u3099","\u305B\u3044\u3088\u3046","\u305B\u304A\u3046","\u305B\u304B\u3044\u304B\u3093","\u305B\u304D\u306B\u3093","\u305B\u304D\u3080","\u305B\u304D\u3086","\u305B\u304D\u3089\u3093\u3046\u3093","\u305B\u3051\u3093","\u305B\u3053\u3046","\u305B\u3059\u3057\u3099","\u305B\u305F\u3044","\u305B\u305F\u3051","\u305B\u3063\u304B\u304F","\u305B\u3063\u304D\u3083\u304F","\u305B\u3099\u3063\u304F","\u305B\u3063\u3051\u3093","\u305B\u3063\u3053\u3064","\u305B\u3063\u3055\u305F\u304F\u307E","\u305B\u3064\u305D\u3099\u304F","\u305B\u3064\u305F\u3099\u3093","\u305B\u3064\u3066\u3099\u3093","\u305B\u3063\u306F\u309A\u3093","\u305B\u3064\u3072\u3099","\u305B\u3064\u3075\u3099\u3093","\u305B\u3064\u3081\u3044","\u305B\u3064\u308A\u3064","\u305B\u306A\u304B","\u305B\u306E\u3072\u3099","\u305B\u306F\u306F\u3099","\u305B\u3072\u3099\u308D","\u305B\u307B\u3099\u306D","\u305B\u307E\u3044","\u305B\u307E\u308B","\u305B\u3081\u308B","\u305B\u3082\u305F\u308C","\u305B\u308A\u3075","\u305B\u3099\u3093\u3042\u304F","\u305B\u3093\u3044","\u305B\u3093\u3048\u3044","\u305B\u3093\u304B","\u305B\u3093\u304D\u3087","\u305B\u3093\u304F","\u305B\u3093\u3051\u3099\u3093","\u305B\u3099\u3093\u3053\u3099","\u305B\u3093\u3055\u3044","\u305B\u3093\u3057\u3085","\u305B\u3093\u3059\u3044","\u305B\u3093\u305B\u3044","\u305B\u3093\u305D\u3099","\u305B\u3093\u305F\u304F","\u305B\u3093\u3061\u3087\u3046","\u305B\u3093\u3066\u3044","\u305B\u3093\u3068\u3046","\u305B\u3093\u306C\u304D","\u305B\u3093\u306D\u3093","\u305B\u3093\u306F\u309A\u3044","\u305B\u3099\u3093\u3075\u3099","\u305B\u3099\u3093\u307B\u309A\u3046","\u305B\u3093\u3080","\u305B\u3093\u3081\u3093\u3057\u3099\u3087","\u305B\u3093\u3082\u3093","\u305B\u3093\u3084\u304F","\u305B\u3093\u3086\u3046","\u305B\u3093\u3088\u3046","\u305B\u3099\u3093\u3089","\u305B\u3099\u3093\u308A\u3083\u304F","\u305B\u3093\u308C\u3044","\u305B\u3093\u308D","\u305D\u3042\u304F","\u305D\u3044\u3068\u3051\u3099\u308B","\u305D\u3044\u306D","\u305D\u3046\u304B\u3099\u3093\u304D\u3087\u3046","\u305D\u3046\u304D","\u305D\u3046\u3053\u3099","\u305D\u3046\u3057\u3093","\u305D\u3046\u305F\u3099\u3093","\u305D\u3046\u306A\u3093","\u305D\u3046\u3072\u3099","\u305D\u3046\u3081\u3093","\u305D\u3046\u308A","\u305D\u3048\u3082\u306E","\u305D\u3048\u3093","\u305D\u304B\u3099\u3044","\u305D\u3051\u3099\u304D","\u305D\u3053\u3046","\u305D\u3053\u305D\u3053","\u305D\u3055\u3099\u3044","\u305D\u3057\u306A","\u305D\u305B\u3044","\u305D\u305B\u3093","\u305D\u305D\u304F\u3099","\u305D\u305F\u3099\u3066\u308B","\u305D\u3064\u3046","\u305D\u3064\u3048\u3093","\u305D\u3063\u304B\u3093","\u305D\u3064\u304D\u3099\u3087\u3046","\u305D\u3063\u3051\u3064","\u305D\u3063\u3053\u3046","\u305D\u3063\u305B\u3093","\u305D\u3063\u3068","\u305D\u3068\u304B\u3099\u308F","\u305D\u3068\u3064\u3099\u3089","\u305D\u306A\u3048\u308B","\u305D\u306A\u305F","\u305D\u3075\u307B\u3099","\u305D\u307B\u3099\u304F","\u305D\u307B\u3099\u308D","\u305D\u307E\u3064","\u305D\u307E\u308B","\u305D\u3080\u304F","\u305D\u3080\u308A\u3048","\u305D\u3081\u308B","\u305D\u3082\u305D\u3082","\u305D\u3088\u304B\u305B\u3099","\u305D\u3089\u307E\u3081","\u305D\u308D\u3046","\u305D\u3093\u304B\u3044","\u305D\u3093\u3051\u3044","\u305D\u3093\u3055\u3099\u3044","\u305D\u3093\u3057\u3064","\u305D\u3093\u305D\u3099\u304F","\u305D\u3093\u3061\u3087\u3046","\u305D\u3099\u3093\u3072\u3099","\u305D\u3099\u3093\u3075\u3099\u3093","\u305D\u3093\u307F\u3093","\u305F\u3042\u3044","\u305F\u3044\u3044\u3093","\u305F\u3044\u3046\u3093","\u305F\u3044\u3048\u304D","\u305F\u3044\u304A\u3046","\u305F\u3099\u3044\u304B\u3099\u304F","\u305F\u3044\u304D","\u305F\u3044\u304F\u3099\u3046","\u305F\u3044\u3051\u3093","\u305F\u3044\u3053","\u305F\u3044\u3055\u3099\u3044","\u305F\u3099\u3044\u3057\u3099\u3087\u3046\u3075\u3099","\u305F\u3099\u3044\u3059\u304D","\u305F\u3044\u305B\u3064","\u305F\u3044\u305D\u3046","\u305F\u3099\u3044\u305F\u3044","\u305F\u3044\u3061\u3087\u3046","\u305F\u3044\u3066\u3044","\u305F\u3099\u3044\u3068\u3099\u3053\u308D","\u305F\u3044\u306A\u3044","\u305F\u3044\u306D\u3064","\u305F\u3044\u306E\u3046","\u305F\u3044\u306F\u3093","\u305F\u3099\u3044\u3072\u3087\u3046","\u305F\u3044\u3075\u3046","\u305F\u3044\u3078\u3093","\u305F\u3044\u307B","\u305F\u3044\u307E\u3064\u306F\u3099\u306A","\u305F\u3044\u307F\u3093\u304F\u3099","\u305F\u3044\u3080","\u305F\u3044\u3081\u3093","\u305F\u3044\u3084\u304D","\u305F\u3044\u3088\u3046","\u305F\u3044\u3089","\u305F\u3044\u308A\u3087\u304F","\u305F\u3044\u308B","\u305F\u3044\u308F\u3093","\u305F\u3046\u3048","\u305F\u3048\u308B","\u305F\u304A\u3059","\u305F\u304A\u308B","\u305F\u304A\u308C\u308B","\u305F\u304B\u3044","\u305F\u304B\u306D","\u305F\u304D\u3072\u3099","\u305F\u304F\u3055\u3093","\u305F\u3053\u304F","\u305F\u3053\u3084\u304D","\u305F\u3055\u3044","\u305F\u3057\u3055\u3099\u3093","\u305F\u3099\u3057\u3099\u3083\u308C","\u305F\u3059\u3051\u308B","\u305F\u3059\u3099\u3055\u308F\u308B","\u305F\u305D\u304B\u3099\u308C","\u305F\u305F\u304B\u3046","\u305F\u305F\u304F","\u305F\u305F\u3099\u3057\u3044","\u305F\u305F\u307F","\u305F\u3061\u306F\u3099\u306A","\u305F\u3099\u3063\u304B\u3044","\u305F\u3099\u3063\u304D\u3083\u304F","\u305F\u3099\u3063\u3053","\u305F\u3099\u3063\u3057\u3085\u3064","\u305F\u3099\u3063\u305F\u3044","\u305F\u3066\u308B","\u305F\u3068\u3048\u308B","\u305F\u306A\u306F\u3099\u305F","\u305F\u306B\u3093","\u305F\u306C\u304D","\u305F\u306E\u3057\u307F","\u305F\u306F\u3064","\u305F\u3075\u3099\u3093","\u305F\u3078\u3099\u308B","\u305F\u307B\u3099\u3046","\u305F\u307E\u3053\u3099","\u305F\u307E\u308B","\u305F\u3099\u3080\u308B","\u305F\u3081\u3044\u304D","\u305F\u3081\u3059","\u305F\u3081\u308B","\u305F\u3082\u3064","\u305F\u3084\u3059\u3044","\u305F\u3088\u308B","\u305F\u3089\u3059","\u305F\u308A\u304D\u307B\u3093\u304B\u3099\u3093","\u305F\u308A\u3087\u3046","\u305F\u308A\u308B","\u305F\u308B\u3068","\u305F\u308C\u308B","\u305F\u308C\u3093\u3068","\u305F\u308D\u3063\u3068","\u305F\u308F\u3080\u308C\u308B","\u305F\u3099\u3093\u3042\u3064","\u305F\u3093\u3044","\u305F\u3093\u304A\u3093","\u305F\u3093\u304B","\u305F\u3093\u304D","\u305F\u3093\u3051\u3093","\u305F\u3093\u3053\u3099","\u305F\u3093\u3055\u3093","\u305F\u3093\u3057\u3099\u3087\u3046\u3072\u3099","\u305F\u3099\u3093\u305B\u3044","\u305F\u3093\u305D\u304F","\u305F\u3093\u305F\u3044","\u305F\u3099\u3093\u3061","\u305F\u3093\u3066\u3044","\u305F\u3093\u3068\u3046","\u305F\u3099\u3093\u306A","\u305F\u3093\u306B\u3093","\u305F\u3099\u3093\u306D\u3064","\u305F\u3093\u306E\u3046","\u305F\u3093\u3072\u309A\u3093","\u305F\u3099\u3093\u307B\u3099\u3046","\u305F\u3093\u307E\u3064","\u305F\u3093\u3081\u3044","\u305F\u3099\u3093\u308C\u3064","\u305F\u3099\u3093\u308D","\u305F\u3099\u3093\u308F","\u3061\u3042\u3044","\u3061\u3042\u3093","\u3061\u3044\u304D","\u3061\u3044\u3055\u3044","\u3061\u3048\u3093","\u3061\u304B\u3044","\u3061\u304B\u3089","\u3061\u304D\u3085\u3046","\u3061\u304D\u3093","\u3061\u3051\u3044\u3059\u3099","\u3061\u3051\u3093","\u3061\u3053\u304F","\u3061\u3055\u3044","\u3061\u3057\u304D","\u3061\u3057\u308A\u3087\u3046","\u3061\u305B\u3044","\u3061\u305D\u3046","\u3061\u305F\u3044","\u3061\u305F\u3093","\u3061\u3061\u304A\u3084","\u3061\u3064\u3057\u3099\u3087","\u3061\u3066\u304D","\u3061\u3066\u3093","\u3061\u306C\u304D","\u3061\u306C\u308A","\u3061\u306E\u3046","\u3061\u3072\u3087\u3046","\u3061\u3078\u3044\u305B\u3093","\u3061\u307B\u3046","\u3061\u307E\u305F","\u3061\u307F\u3064","\u3061\u307F\u3068\u3099\u308D","\u3061\u3081\u3044\u3068\u3099","\u3061\u3083\u3093\u3053\u306A\u3078\u3099","\u3061\u3085\u3046\u3044","\u3061\u3086\u308A\u3087\u304F","\u3061\u3087\u3046\u3057","\u3061\u3087\u3055\u304F\u3051\u3093","\u3061\u3089\u3057","\u3061\u3089\u307F","\u3061\u308A\u304B\u3099\u307F","\u3061\u308A\u3087\u3046","\u3061\u308B\u3068\u3099","\u3061\u308F\u308F","\u3061\u3093\u305F\u3044","\u3061\u3093\u3082\u304F","\u3064\u3044\u304B","\u3064\u3044\u305F\u3061","\u3064\u3046\u304B","\u3064\u3046\u3057\u3099\u3087\u3046","\u3064\u3046\u306F\u3093","\u3064\u3046\u308F","\u3064\u304B\u3046","\u3064\u304B\u308C\u308B","\u3064\u304F\u306D","\u3064\u304F\u308B","\u3064\u3051\u306D","\u3064\u3051\u308B","\u3064\u3053\u3099\u3046","\u3064\u305F\u3048\u308B","\u3064\u3064\u3099\u304F","\u3064\u3064\u3057\u3099","\u3064\u3064\u3080","\u3064\u3068\u3081\u308B","\u3064\u306A\u304B\u3099\u308B","\u3064\u306A\u307F","\u3064\u306D\u3064\u3099\u306D","\u3064\u306E\u308B","\u3064\u3075\u3099\u3059","\u3064\u307E\u3089\u306A\u3044","\u3064\u307E\u308B","\u3064\u307F\u304D","\u3064\u3081\u305F\u3044","\u3064\u3082\u308A","\u3064\u3082\u308B","\u3064\u3088\u3044","\u3064\u308B\u307B\u3099","\u3064\u308B\u307F\u304F","\u3064\u308F\u3082\u306E","\u3064\u308F\u308A","\u3066\u3042\u3057","\u3066\u3042\u3066","\u3066\u3042\u307F","\u3066\u3044\u304A\u3093","\u3066\u3044\u304B","\u3066\u3044\u304D","\u3066\u3044\u3051\u3044","\u3066\u3044\u3053\u304F","\u3066\u3044\u3055\u3064","\u3066\u3044\u3057","\u3066\u3044\u305B\u3044","\u3066\u3044\u305F\u3044","\u3066\u3044\u3068\u3099","\u3066\u3044\u306D\u3044","\u3066\u3044\u3072\u3087\u3046","\u3066\u3044\u3078\u3093","\u3066\u3044\u307B\u3099\u3046","\u3066\u3046\u3061","\u3066\u304A\u304F\u308C","\u3066\u304D\u3068\u3046","\u3066\u304F\u3072\u3099","\u3066\u3099\u3053\u307B\u3099\u3053","\u3066\u3055\u304D\u3099\u3087\u3046","\u3066\u3055\u3051\u3099","\u3066\u3059\u308A","\u3066\u305D\u3046","\u3066\u3061\u304B\u3099\u3044","\u3066\u3061\u3087\u3046","\u3066\u3064\u304B\u3099\u304F","\u3066\u3064\u3064\u3099\u304D","\u3066\u3099\u3063\u306F\u309A","\u3066\u3064\u307B\u3099\u3046","\u3066\u3064\u3084","\u3066\u3099\u306C\u304B\u3048","\u3066\u306C\u304D","\u3066\u306C\u304F\u3099\u3044","\u3066\u306E\u3072\u3089","\u3066\u306F\u3044","\u3066\u3075\u3099\u304F\u308D","\u3066\u3075\u305F\u3099","\u3066\u307B\u3068\u3099\u304D","\u3066\u307B\u3093","\u3066\u307E\u3048","\u3066\u307E\u304D\u3059\u3099\u3057","\u3066\u307F\u3057\u3099\u304B","\u3066\u307F\u3084\u3051\u3099","\u3066\u3089\u3059","\u3066\u308C\u3072\u3099","\u3066\u308F\u3051","\u3066\u308F\u305F\u3057","\u3066\u3099\u3093\u3042\u3064","\u3066\u3093\u3044\u3093","\u3066\u3093\u304B\u3044","\u3066\u3093\u304D","\u3066\u3093\u304F\u3099","\u3066\u3093\u3051\u3093","\u3066\u3093\u3053\u3099\u304F","\u3066\u3093\u3055\u3044","\u3066\u3093\u3057","\u3066\u3093\u3059\u3046","\u3066\u3099\u3093\u3061","\u3066\u3093\u3066\u304D","\u3066\u3093\u3068\u3046","\u3066\u3093\u306A\u3044","\u3066\u3093\u3075\u309A\u3089","\u3066\u3093\u307B\u3099\u3046\u305F\u3099\u3044","\u3066\u3093\u3081\u3064","\u3066\u3093\u3089\u3093\u304B\u3044","\u3066\u3099\u3093\u308A\u3087\u304F","\u3066\u3099\u3093\u308F","\u3068\u3099\u3042\u3044","\u3068\u3044\u308C","\u3068\u3099\u3046\u304B\u3093","\u3068\u3046\u304D\u3085\u3046","\u3068\u3099\u3046\u304F\u3099","\u3068\u3046\u3057","\u3068\u3046\u3080\u304D\u3099","\u3068\u304A\u3044","\u3068\u304A\u304B","\u3068\u304A\u304F","\u3068\u304A\u3059","\u3068\u304A\u308B","\u3068\u304B\u3044","\u3068\u304B\u3059","\u3068\u304D\u304A\u308A","\u3068\u304D\u3068\u3099\u304D","\u3068\u304F\u3044","\u3068\u304F\u3057\u3085\u3046","\u3068\u304F\u3066\u3093","\u3068\u304F\u306B","\u3068\u304F\u3078\u3099\u3064","\u3068\u3051\u3044","\u3068\u3051\u308B","\u3068\u3053\u3084","\u3068\u3055\u304B","\u3068\u3057\u3087\u304B\u3093","\u3068\u305D\u3046","\u3068\u305F\u3093","\u3068\u3061\u3085\u3046","\u3068\u3063\u304D\u3085\u3046","\u3068\u3063\u304F\u3093","\u3068\u3064\u305B\u3099\u3093","\u3068\u3064\u306B\u3085\u3046","\u3068\u3068\u3099\u3051\u308B","\u3068\u3068\u306E\u3048\u308B","\u3068\u306A\u3044","\u3068\u306A\u3048\u308B","\u3068\u306A\u308A","\u3068\u306E\u3055\u307E","\u3068\u306F\u3099\u3059","\u3068\u3099\u3075\u3099\u304B\u3099\u308F","\u3068\u307B\u3046","\u3068\u307E\u308B","\u3068\u3081\u308B","\u3068\u3082\u305F\u3099\u3061","\u3068\u3082\u308B","\u3068\u3099\u3088\u3046\u3072\u3099","\u3068\u3089\u3048\u308B","\u3068\u3093\u304B\u3064","\u3068\u3099\u3093\u3075\u3099\u308A","\u306A\u3044\u304B\u304F","\u306A\u3044\u3053\u3046","\u306A\u3044\u3057\u3087","\u306A\u3044\u3059","\u306A\u3044\u305B\u3093","\u306A\u3044\u305D\u3046","\u306A\u304A\u3059","\u306A\u304B\u3099\u3044","\u306A\u304F\u3059","\u306A\u3051\u3099\u308B","\u306A\u3053\u3046\u3068\u3099","\u306A\u3055\u3051","\u306A\u305F\u3066\u3099\u3053\u3053","\u306A\u3063\u3068\u3046","\u306A\u3064\u3084\u3059\u307F","\u306A\u306A\u304A\u3057","\u306A\u306B\u3053\u3099\u3068","\u306A\u306B\u3082\u306E","\u306A\u306B\u308F","\u306A\u306E\u304B","\u306A\u3075\u305F\u3099","\u306A\u307E\u3044\u304D","\u306A\u307E\u3048","\u306A\u307E\u307F","\u306A\u307F\u305F\u3099","\u306A\u3081\u3089\u304B","\u306A\u3081\u308B","\u306A\u3084\u3080","\u306A\u3089\u3046","\u306A\u3089\u3072\u3099","\u306A\u3089\u3075\u3099","\u306A\u308C\u308B","\u306A\u308F\u3068\u3072\u3099","\u306A\u308F\u306F\u3099\u308A","\u306B\u3042\u3046","\u306B\u3044\u304B\u3099\u305F","\u306B\u3046\u3051","\u306B\u304A\u3044","\u306B\u304B\u3044","\u306B\u304B\u3099\u3066","\u306B\u304D\u3072\u3099","\u306B\u304F\u3057\u307F","\u306B\u304F\u307E\u3093","\u306B\u3051\u3099\u308B","\u306B\u3055\u3093\u304B\u305F\u3093\u305D","\u306B\u3057\u304D","\u306B\u305B\u3082\u306E","\u306B\u3061\u3057\u3099\u3087\u3046","\u306B\u3061\u3088\u3046\u3072\u3099","\u306B\u3063\u304B","\u306B\u3063\u304D","\u306B\u3063\u3051\u3044","\u306B\u3063\u3053\u3046","\u306B\u3063\u3055\u3093","\u306B\u3063\u3057\u3087\u304F","\u306B\u3063\u3059\u3046","\u306B\u3063\u305B\u304D","\u306B\u3063\u3066\u3044","\u306B\u306A\u3046","\u306B\u307B\u3093","\u306B\u307E\u3081","\u306B\u3082\u3064","\u306B\u3084\u308A","\u306B\u3085\u3046\u3044\u3093","\u306B\u308A\u3093\u3057\u3083","\u306B\u308F\u3068\u308A","\u306B\u3093\u3044","\u306B\u3093\u304B","\u306B\u3093\u304D","\u306B\u3093\u3051\u3099\u3093","\u306B\u3093\u3057\u304D","\u306B\u3093\u3059\u3099\u3046","\u306B\u3093\u305D\u3046","\u306B\u3093\u305F\u3044","\u306B\u3093\u3061","\u306B\u3093\u3066\u3044","\u306B\u3093\u306B\u304F","\u306B\u3093\u3075\u309A","\u306B\u3093\u307E\u308A","\u306B\u3093\u3080","\u306B\u3093\u3081\u3044","\u306B\u3093\u3088\u3046","\u306C\u3044\u304F\u304D\u3099","\u306C\u304B\u3059","\u306C\u304F\u3099\u3044\u3068\u308B","\u306C\u304F\u3099\u3046","\u306C\u304F\u3082\u308A","\u306C\u3059\u3080","\u306C\u307E\u3048\u3072\u3099","\u306C\u3081\u308A","\u306C\u3089\u3059","\u306C\u3093\u3061\u3083\u304F","\u306D\u3042\u3051\u3099","\u306D\u3044\u304D","\u306D\u3044\u308B","\u306D\u3044\u308D","\u306D\u304F\u3099\u305B","\u306D\u304F\u305F\u3044","\u306D\u304F\u3089","\u306D\u3053\u305B\u3099","\u306D\u3053\u3080","\u306D\u3055\u3051\u3099","\u306D\u3059\u3053\u3099\u3059","\u306D\u305D\u3078\u3099\u308B","\u306D\u305F\u3099\u3093","\u306D\u3064\u3044","\u306D\u3063\u3057\u3093","\u306D\u3064\u305D\u3099\u3046","\u306D\u3063\u305F\u3044\u304D\u3099\u3087","\u306D\u3075\u3099\u305D\u304F","\u306D\u3075\u305F\u3099","\u306D\u307B\u3099\u3046","\u306D\u307B\u308A\u306F\u307B\u308A","\u306D\u307E\u304D","\u306D\u307E\u308F\u3057","\u306D\u307F\u307F","\u306D\u3080\u3044","\u306D\u3080\u305F\u3044","\u306D\u3082\u3068","\u306D\u3089\u3046","\u306D\u308F\u3055\u3099","\u306D\u3093\u3044\u308A","\u306D\u3093\u304A\u3057","\u306D\u3093\u304B\u3093","\u306D\u3093\u304D\u3093","\u306D\u3093\u304F\u3099","\u306D\u3093\u3055\u3099","\u306D\u3093\u3057","\u306D\u3093\u3061\u3083\u304F","\u306D\u3093\u3068\u3099","\u306D\u3093\u3072\u309A","\u306D\u3093\u3075\u3099\u3064","\u306D\u3093\u307E\u3064","\u306D\u3093\u308A\u3087\u3046","\u306D\u3093\u308C\u3044","\u306E\u3044\u3059\u3099","\u306E\u304A\u3064\u3099\u307E","\u306E\u304B\u3099\u3059","\u306E\u304D\u306A\u307F","\u306E\u3053\u304D\u3099\u308A","\u306E\u3053\u3059","\u306E\u3053\u308B","\u306E\u305B\u308B","\u306E\u305D\u3099\u304F","\u306E\u305D\u3099\u3080","\u306E\u305F\u307E\u3046","\u306E\u3061\u307B\u3068\u3099","\u306E\u3063\u304F","\u306E\u306F\u3099\u3059","\u306E\u306F\u3089","\u306E\u3078\u3099\u308B","\u306E\u307B\u3099\u308B","\u306E\u307F\u3082\u306E","\u306E\u3084\u307E","\u306E\u3089\u3044\u306C","\u306E\u3089\u306D\u3053","\u306E\u308A\u3082\u306E","\u306E\u308A\u3086\u304D","\u306E\u308C\u3093","\u306E\u3093\u304D","\u306F\u3099\u3042\u3044","\u306F\u3042\u304F","\u306F\u3099\u3042\u3055\u3093","\u306F\u3099\u3044\u304B","\u306F\u3099\u3044\u304F","\u306F\u3044\u3051\u3093","\u306F\u3044\u3053\u3099","\u306F\u3044\u3057\u3093","\u306F\u3044\u3059\u3044","\u306F\u3044\u305B\u3093","\u306F\u3044\u305D\u3046","\u306F\u3044\u3061","\u306F\u3099\u3044\u306F\u3099\u3044","\u306F\u3044\u308C\u3064","\u306F\u3048\u308B","\u306F\u304A\u308B","\u306F\u304B\u3044","\u306F\u3099\u304B\u308A","\u306F\u304B\u308B","\u306F\u304F\u3057\u3085","\u306F\u3051\u3093","\u306F\u3053\u3075\u3099","\u306F\u3055\u307F","\u306F\u3055\u3093","\u306F\u3057\u3053\u3099","\u306F\u3099\u3057\u3087","\u306F\u3057\u308B","\u306F\u305B\u308B","\u306F\u309A\u305D\u3053\u3093","\u306F\u305D\u3093","\u306F\u305F\u3093","\u306F\u3061\u307F\u3064","\u306F\u3064\u304A\u3093","\u306F\u3063\u304B\u304F","\u306F\u3064\u3099\u304D","\u306F\u3063\u304D\u308A","\u306F\u3063\u304F\u3064","\u306F\u3063\u3051\u3093","\u306F\u3063\u3053\u3046","\u306F\u3063\u3055\u3093","\u306F\u3063\u3057\u3093","\u306F\u3063\u305F\u3064","\u306F\u3063\u3061\u3085\u3046","\u306F\u3063\u3066\u3093","\u306F\u3063\u3072\u309A\u3087\u3046","\u306F\u3063\u307B\u309A\u3046","\u306F\u306A\u3059","\u306F\u306A\u3072\u3099","\u306F\u306B\u304B\u3080","\u306F\u3075\u3099\u3089\u3057","\u306F\u307F\u304B\u3099\u304D","\u306F\u3080\u304B\u3046","\u306F\u3081\u3064","\u306F\u3084\u3044","\u306F\u3084\u3057","\u306F\u3089\u3046","\u306F\u308D\u3046\u3043\u3093","\u306F\u308F\u3044","\u306F\u3093\u3044","\u306F\u3093\u3048\u3044","\u306F\u3093\u304A\u3093","\u306F\u3093\u304B\u304F","\u306F\u3093\u304D\u3087\u3046","\u306F\u3099\u3093\u304F\u3099\u307F","\u306F\u3093\u3053","\u306F\u3093\u3057\u3083","\u306F\u3093\u3059\u3046","\u306F\u3093\u305F\u3099\u3093","\u306F\u309A\u3093\u3061","\u306F\u309A\u3093\u3064","\u306F\u3093\u3066\u3044","\u306F\u3093\u3068\u3057","\u306F\u3093\u306E\u3046","\u306F\u3093\u306F\u309A","\u306F\u3093\u3075\u3099\u3093","\u306F\u3093\u3078\u309A\u3093","\u306F\u3093\u307B\u3099\u3046\u304D","\u306F\u3093\u3081\u3044","\u306F\u3093\u3089\u3093","\u306F\u3093\u308D\u3093","\u3072\u3044\u304D","\u3072\u3046\u3093","\u3072\u3048\u308B","\u3072\u304B\u304F","\u3072\u304B\u308A","\u3072\u304B\u308B","\u3072\u304B\u3093","\u3072\u304F\u3044","\u3072\u3051\u3064","\u3072\u3053\u3046\u304D","\u3072\u3053\u304F","\u3072\u3055\u3044","\u3072\u3055\u3057\u3075\u3099\u308A","\u3072\u3055\u3093","\u3072\u3099\u3057\u3099\u3085\u3064\u304B\u3093","\u3072\u3057\u3087","\u3072\u305D\u304B","\u3072\u305D\u3080","\u3072\u305F\u3080\u304D","\u3072\u305F\u3099\u308A","\u3072\u305F\u308B","\u3072\u3064\u304D\u3099","\u3072\u3063\u3053\u3057","\u3072\u3063\u3057","\u3072\u3064\u3057\u3099\u3085\u3072\u3093","\u3072\u3063\u3059","\u3072\u3064\u305B\u3099\u3093","\u3072\u309A\u3063\u305F\u308A","\u3072\u309A\u3063\u3061\u308A","\u3072\u3064\u3088\u3046","\u3072\u3066\u3044","\u3072\u3068\u3053\u3099\u307F","\u3072\u306A\u307E\u3064\u308A","\u3072\u306A\u3093","\u3072\u306D\u308B","\u3072\u306F\u3093","\u3072\u3072\u3099\u304F","\u3072\u3072\u3087\u3046","\u3072\u307B\u3046","\u3072\u307E\u308F\u308A","\u3072\u307E\u3093","\u3072\u307F\u3064","\u3072\u3081\u3044","\u3072\u3081\u3057\u3099\u3057","\u3072\u3084\u3051","\u3072\u3084\u3059","\u3072\u3088\u3046","\u3072\u3099\u3087\u3046\u304D","\u3072\u3089\u304B\u3099\u306A","\u3072\u3089\u304F","\u3072\u308A\u3064","\u3072\u308A\u3087\u3046","\u3072\u308B\u307E","\u3072\u308B\u3084\u3059\u307F","\u3072\u308C\u3044","\u3072\u308D\u3044","\u3072\u308D\u3046","\u3072\u308D\u304D","\u3072\u308D\u3086\u304D","\u3072\u3093\u304B\u304F","\u3072\u3093\u3051\u3064","\u3072\u3093\u3053\u3093","\u3072\u3093\u3057\u3085","\u3072\u3093\u305D\u3046","\u3072\u309A\u3093\u3061","\u3072\u3093\u306F\u309A\u3093","\u3072\u3099\u3093\u307B\u3099\u3046","\u3075\u3042\u3093","\u3075\u3044\u3046\u3061","\u3075\u3046\u3051\u3044","\u3075\u3046\u305B\u3093","\u3075\u309A\u3046\u305F\u308D\u3046","\u3075\u3046\u3068\u3046","\u3075\u3046\u3075","\u3075\u3048\u308B","\u3075\u304A\u3093","\u3075\u304B\u3044","\u3075\u304D\u3093","\u3075\u304F\u3055\u3099\u3064","\u3075\u304F\u3075\u3099\u304F\u308D","\u3075\u3053\u3046","\u3075\u3055\u3044","\u3075\u3057\u304D\u3099","\u3075\u3057\u3099\u307F","\u3075\u3059\u307E","\u3075\u305B\u3044","\u3075\u305B\u304F\u3099","\u3075\u305D\u304F","\u3075\u3099\u305F\u306B\u304F","\u3075\u305F\u3093","\u3075\u3061\u3087\u3046","\u3075\u3064\u3046","\u3075\u3064\u304B","\u3075\u3063\u304B\u3064","\u3075\u3063\u304D","\u3075\u3063\u3053\u304F","\u3075\u3099\u3068\u3099\u3046","\u3075\u3068\u308B","\u3075\u3068\u3093","\u3075\u306E\u3046","\u3075\u306F\u3044","\u3075\u3072\u3087\u3046","\u3075\u3078\u3093","\u3075\u307E\u3093","\u3075\u307F\u3093","\u3075\u3081\u3064","\u3075\u3081\u3093","\u3075\u3088\u3046","\u3075\u308A\u3053","\u3075\u308A\u308B","\u3075\u308B\u3044","\u3075\u3093\u3044\u304D","\u3075\u3099\u3093\u304B\u3099\u304F","\u3075\u3099\u3093\u304F\u3099","\u3075\u3093\u3057\u3064","\u3075\u3099\u3093\u305B\u304D","\u3075\u3093\u305D\u3046","\u3075\u3099\u3093\u307B\u309A\u3046","\u3078\u3044\u3042\u3093","\u3078\u3044\u304A\u3093","\u3078\u3044\u304B\u3099\u3044","\u3078\u3044\u304D","\u3078\u3044\u3051\u3099\u3093","\u3078\u3044\u3053\u3046","\u3078\u3044\u3055","\u3078\u3044\u3057\u3083","\u3078\u3044\u305B\u3064","\u3078\u3044\u305D","\u3078\u3044\u305F\u304F","\u3078\u3044\u3066\u3093","\u3078\u3044\u306D\u3064","\u3078\u3044\u308F","\u3078\u304D\u304B\u3099","\u3078\u3053\u3080","\u3078\u3099\u306B\u3044\u308D","\u3078\u3099\u306B\u3057\u3087\u3046\u304B\u3099","\u3078\u3089\u3059","\u3078\u3093\u304B\u3093","\u3078\u3099\u3093\u304D\u3087\u3046","\u3078\u3099\u3093\u3053\u3099\u3057","\u3078\u3093\u3055\u3044","\u3078\u3093\u305F\u3044","\u3078\u3099\u3093\u308A","\u307B\u3042\u3093","\u307B\u3044\u304F","\u307B\u3099\u3046\u304D\u3099\u3087","\u307B\u3046\u3053\u304F","\u307B\u3046\u305D\u3046","\u307B\u3046\u307B\u3046","\u307B\u3046\u3082\u3093","\u307B\u3046\u308A\u3064","\u307B\u3048\u308B","\u307B\u304A\u3093","\u307B\u304B\u3093","\u307B\u304D\u3087\u3046","\u307B\u3099\u304D\u3093","\u307B\u304F\u308D","\u307B\u3051\u3064","\u307B\u3051\u3093","\u307B\u3053\u3046","\u307B\u3053\u308B","\u307B\u3057\u3044","\u307B\u3057\u3064","\u307B\u3057\u3085","\u307B\u3057\u3087\u3046","\u307B\u305B\u3044","\u307B\u305D\u3044","\u307B\u305D\u304F","\u307B\u305F\u3066","\u307B\u305F\u308B","\u307B\u309A\u3061\u3075\u3099\u304F\u308D","\u307B\u3063\u304D\u3087\u304F","\u307B\u3063\u3055","\u307B\u3063\u305F\u3093","\u307B\u3068\u3093\u3068\u3099","\u307B\u3081\u308B","\u307B\u3093\u3044","\u307B\u3093\u304D","\u307B\u3093\u3051","\u307B\u3093\u3057\u3064","\u307B\u3093\u3084\u304F","\u307E\u3044\u306B\u3061","\u307E\u304B\u3044","\u307E\u304B\u305B\u308B","\u307E\u304B\u3099\u308B","\u307E\u3051\u308B","\u307E\u3053\u3068","\u307E\u3055\u3064","\u307E\u3057\u3099\u3081","\u307E\u3059\u304F","\u307E\u305B\u3099\u308B","\u307E\u3064\u308A","\u307E\u3068\u3081","\u307E\u306A\u3075\u3099","\u307E\u306C\u3051","\u307E\u306D\u304F","\u307E\u307B\u3046","\u307E\u3082\u308B","\u307E\u3086\u3051\u3099","\u307E\u3088\u3046","\u307E\u308D\u3084\u304B","\u307E\u308F\u3059","\u307E\u308F\u308A","\u307E\u308F\u308B","\u307E\u3093\u304B\u3099","\u307E\u3093\u304D\u3064","\u307E\u3093\u305D\u3099\u304F","\u307E\u3093\u306A\u304B","\u307F\u3044\u3089","\u307F\u3046\u3061","\u307F\u3048\u308B","\u307F\u304B\u3099\u304F","\u307F\u304B\u305F","\u307F\u304B\u3093","\u307F\u3051\u3093","\u307F\u3053\u3093","\u307F\u3057\u3099\u304B\u3044","\u307F\u3059\u3044","\u307F\u3059\u3048\u308B","\u307F\u305B\u308B","\u307F\u3063\u304B","\u307F\u3064\u304B\u308B","\u307F\u3064\u3051\u308B","\u307F\u3066\u3044","\u307F\u3068\u3081\u308B","\u307F\u306A\u3068","\u307F\u306A\u307F\u304B\u3055\u3044","\u307F\u306D\u3089\u308B","\u307F\u306E\u3046","\u307F\u306E\u304B\u3099\u3059","\u307F\u307B\u3093","\u307F\u3082\u3068","\u307F\u3084\u3051\u3099","\u307F\u3089\u3044","\u307F\u308A\u3087\u304F","\u307F\u308F\u304F","\u307F\u3093\u304B","\u307F\u3093\u305D\u3099\u304F","\u3080\u3044\u304B","\u3080\u3048\u304D","\u3080\u3048\u3093","\u3080\u304B\u3044","\u3080\u304B\u3046","\u3080\u304B\u3048","\u3080\u304B\u3057","\u3080\u304D\u3099\u3061\u3083","\u3080\u3051\u308B","\u3080\u3051\u3099\u3093","\u3080\u3055\u307B\u3099\u308B","\u3080\u3057\u3042\u3064\u3044","\u3080\u3057\u306F\u3099","\u3080\u3057\u3099\u3085\u3093","\u3080\u3057\u308D","\u3080\u3059\u3046","\u3080\u3059\u3053","\u3080\u3059\u3075\u3099","\u3080\u3059\u3081","\u3080\u305B\u308B","\u3080\u305B\u3093","\u3080\u3061\u3085\u3046","\u3080\u306A\u3057\u3044","\u3080\u306E\u3046","\u3080\u3084\u307F","\u3080\u3088\u3046","\u3080\u3089\u3055\u304D","\u3080\u308A\u3087\u3046","\u3080\u308D\u3093","\u3081\u3044\u3042\u3093","\u3081\u3044\u3046\u3093","\u3081\u3044\u3048\u3093","\u3081\u3044\u304B\u304F","\u3081\u3044\u304D\u3087\u304F","\u3081\u3044\u3055\u3044","\u3081\u3044\u3057","\u3081\u3044\u305D\u3046","\u3081\u3044\u3075\u3099\u3064","\u3081\u3044\u308C\u3044","\u3081\u3044\u308F\u304F","\u3081\u304F\u3099\u307E\u308C\u308B","\u3081\u3055\u3099\u3059","\u3081\u3057\u305F","\u3081\u3059\u3099\u3089\u3057\u3044","\u3081\u305F\u3099\u3064","\u3081\u307E\u3044","\u3081\u3084\u3059","\u3081\u3093\u304D\u3087","\u3081\u3093\u305B\u304D","\u3081\u3093\u3068\u3099\u3046","\u3082\u3046\u3057\u3042\u3051\u3099\u308B","\u3082\u3046\u3068\u3099\u3046\u3051\u3093","\u3082\u3048\u308B","\u3082\u304F\u3057","\u3082\u304F\u3066\u304D","\u3082\u304F\u3088\u3046\u3072\u3099","\u3082\u3061\u308D\u3093","\u3082\u3068\u3099\u308B","\u3082\u3089\u3046","\u3082\u3093\u304F","\u3082\u3093\u305F\u3099\u3044","\u3084\u304A\u3084","\u3084\u3051\u308B","\u3084\u3055\u3044","\u3084\u3055\u3057\u3044","\u3084\u3059\u3044","\u3084\u3059\u305F\u308D\u3046","\u3084\u3059\u307F","\u3084\u305B\u308B","\u3084\u305D\u3046","\u3084\u305F\u3044","\u3084\u3061\u3093","\u3084\u3063\u3068","\u3084\u3063\u306F\u309A\u308A","\u3084\u3075\u3099\u308B","\u3084\u3081\u308B","\u3084\u3084\u3053\u3057\u3044","\u3084\u3088\u3044","\u3084\u308F\u3089\u304B\u3044","\u3086\u3046\u304D","\u3086\u3046\u3072\u3099\u3093\u304D\u3087\u304F","\u3086\u3046\u3078\u3099","\u3086\u3046\u3081\u3044","\u3086\u3051\u3064","\u3086\u3057\u3085\u3064","\u3086\u305B\u3093","\u3086\u305D\u3046","\u3086\u305F\u304B","\u3086\u3061\u3083\u304F","\u3086\u3066\u3099\u308B","\u3086\u306B\u3085\u3046","\u3086\u3072\u3099\u308F","\u3086\u3089\u3044","\u3086\u308C\u308B","\u3088\u3046\u3044","\u3088\u3046\u304B","\u3088\u3046\u304D\u3085\u3046","\u3088\u3046\u3057\u3099","\u3088\u3046\u3059","\u3088\u3046\u3061\u3048\u3093","\u3088\u304B\u305B\u3099","\u3088\u304B\u3093","\u3088\u304D\u3093","\u3088\u304F\u305B\u3044","\u3088\u304F\u307B\u3099\u3046","\u3088\u3051\u3044","\u3088\u3053\u3099\u308C\u308B","\u3088\u3055\u3093","\u3088\u3057\u3085\u3046","\u3088\u305D\u3046","\u3088\u305D\u304F","\u3088\u3063\u304B","\u3088\u3066\u3044","\u3088\u3068\u3099\u304B\u3099\u308F\u304F","\u3088\u306D\u3064","\u3088\u3084\u304F","\u3088\u3086\u3046","\u3088\u308D\u3053\u3075\u3099","\u3088\u308D\u3057\u3044","\u3089\u3044\u3046","\u3089\u304F\u304B\u3099\u304D","\u3089\u304F\u3053\u3099","\u3089\u304F\u3055\u3064","\u3089\u304F\u305F\u3099","\u3089\u3057\u3093\u306F\u3099\u3093","\u3089\u305B\u3093","\u3089\u305D\u3099\u304F","\u3089\u305F\u3044","\u3089\u3063\u304B","\u3089\u308C\u3064","\u308A\u3048\u304D","\u308A\u304B\u3044","\u308A\u304D\u3055\u304F","\u308A\u304D\u305B\u3064","\u308A\u304F\u304F\u3099\u3093","\u308A\u304F\u3064","\u308A\u3051\u3093","\u308A\u3053\u3046","\u308A\u305B\u3044","\u308A\u305D\u3046","\u308A\u305D\u304F","\u308A\u3066\u3093","\u308A\u306D\u3093","\u308A\u3086\u3046","\u308A\u3085\u3046\u304B\u3099\u304F","\u308A\u3088\u3046","\u308A\u3087\u3046\u308A","\u308A\u3087\u304B\u3093","\u308A\u3087\u304F\u3061\u3083","\u308A\u3087\u3053\u3046","\u308A\u308A\u304F","\u308A\u308C\u304D","\u308A\u308D\u3093","\u308A\u3093\u3053\u3099","\u308B\u3044\u3051\u3044","\u308B\u3044\u3055\u3044","\u308B\u3044\u3057\u3099","\u308B\u3044\u305B\u304D","\u308B\u3059\u306F\u3099\u3093","\u308B\u308A\u304B\u3099\u308F\u3089","\u308C\u3044\u304B\u3093","\u308C\u3044\u304D\u3099","\u308C\u3044\u305B\u3044","\u308C\u3044\u305D\u3099\u3046\u3053","\u308C\u3044\u3068\u3046","\u308C\u3044\u307B\u3099\u3046","\u308C\u304D\u3057","\u308C\u304D\u305F\u3099\u3044","\u308C\u3093\u3042\u3044","\u308C\u3093\u3051\u3044","\u308C\u3093\u3053\u3093","\u308C\u3093\u3055\u3044","\u308C\u3093\u3057\u3085\u3046","\u308C\u3093\u305D\u3099\u304F","\u308C\u3093\u3089\u304F","\u308D\u3046\u304B","\u308D\u3046\u3053\u3099","\u308D\u3046\u3057\u3099\u3093","\u308D\u3046\u305D\u304F","\u308D\u304F\u304B\u3099","\u308D\u3053\u3064","\u308D\u3057\u3099\u3046\u3089","\u308D\u3057\u3085\u3064","\u308D\u305B\u3093","\u308D\u3066\u3093","\u308D\u3081\u3093","\u308D\u308C\u3064","\u308D\u3093\u304D\u3099","\u308D\u3093\u306F\u309A","\u308D\u3093\u3075\u3099\u3093","\u308D\u3093\u308A","\u308F\u304B\u3059","\u308F\u304B\u3081","\u308F\u304B\u3084\u307E","\u308F\u304B\u308C\u308B","\u308F\u3057\u3064","\u308F\u3057\u3099\u307E\u3057","\u308F\u3059\u308C\u3082\u306E","\u308F\u3089\u3046","\u308F\u308C\u308B"];uM.exports=Jre});var lM=k((k5e,cM)=>{"use strict";v();var Qre=["a\u0301baco","abdomen","abeja","abierto","abogado","abono","aborto","abrazo","abrir","abuelo","abuso","acabar","academia","acceso","accio\u0301n","aceite","acelga","acento","aceptar","a\u0301cido","aclarar","acne\u0301","acoger","acoso","activo","acto","actriz","actuar","acudir","acuerdo","acusar","adicto","admitir","adoptar","adorno","aduana","adulto","ae\u0301reo","afectar","aficio\u0301n","afinar","afirmar","a\u0301gil","agitar","agoni\u0301a","agosto","agotar","agregar","agrio","agua","agudo","a\u0301guila","aguja","ahogo","ahorro","aire","aislar","ajedrez","ajeno","ajuste","alacra\u0301n","alambre","alarma","alba","a\u0301lbum","alcalde","aldea","alegre","alejar","alerta","aleta","alfiler","alga","algodo\u0301n","aliado","aliento","alivio","alma","almeja","almi\u0301bar","altar","alteza","altivo","alto","altura","alumno","alzar","amable","amante","amapola","amargo","amasar","a\u0301mbar","a\u0301mbito","ameno","amigo","amistad","amor","amparo","amplio","ancho","anciano","ancla","andar","ande\u0301n","anemia","a\u0301ngulo","anillo","a\u0301nimo","ani\u0301s","anotar","antena","antiguo","antojo","anual","anular","anuncio","an\u0303adir","an\u0303ejo","an\u0303o","apagar","aparato","apetito","apio","aplicar","apodo","aporte","apoyo","aprender","aprobar","apuesta","apuro","arado","aran\u0303a","arar","a\u0301rbitro","a\u0301rbol","arbusto","archivo","arco","arder","ardilla","arduo","a\u0301rea","a\u0301rido","aries","armoni\u0301a","arne\u0301s","aroma","arpa","arpo\u0301n","arreglo","arroz","arruga","arte","artista","asa","asado","asalto","ascenso","asegurar","aseo","asesor","asiento","asilo","asistir","asno","asombro","a\u0301spero","astilla","astro","astuto","asumir","asunto","atajo","ataque","atar","atento","ateo","a\u0301tico","atleta","a\u0301tomo","atraer","atroz","atu\u0301n","audaz","audio","auge","aula","aumento","ausente","autor","aval","avance","avaro","ave","avellana","avena","avestruz","avio\u0301n","aviso","ayer","ayuda","ayuno","azafra\u0301n","azar","azote","azu\u0301car","azufre","azul","baba","babor","bache","bahi\u0301a","baile","bajar","balanza","balco\u0301n","balde","bambu\u0301","banco","banda","ban\u0303o","barba","barco","barniz","barro","ba\u0301scula","basto\u0301n","basura","batalla","bateri\u0301a","batir","batuta","bau\u0301l","bazar","bebe\u0301","bebida","bello","besar","beso","bestia","bicho","bien","bingo","blanco","bloque","blusa","boa","bobina","bobo","boca","bocina","boda","bodega","boina","bola","bolero","bolsa","bomba","bondad","bonito","bono","bonsa\u0301i","borde","borrar","bosque","bote","boti\u0301n","bo\u0301veda","bozal","bravo","brazo","brecha","breve","brillo","brinco","brisa","broca","broma","bronce","brote","bruja","brusco","bruto","buceo","bucle","bueno","buey","bufanda","bufo\u0301n","bu\u0301ho","buitre","bulto","burbuja","burla","burro","buscar","butaca","buzo\u0301n","caballo","cabeza","cabina","cabra","cacao","cada\u0301ver","cadena","caer","cafe\u0301","cai\u0301da","caima\u0301n","caja","cajo\u0301n","cal","calamar","calcio","caldo","calidad","calle","calma","calor","calvo","cama","cambio","camello","camino","campo","ca\u0301ncer","candil","canela","canguro","canica","canto","can\u0303a","can\u0303o\u0301n","caoba","caos","capaz","capita\u0301n","capote","captar","capucha","cara","carbo\u0301n","ca\u0301rcel","careta","carga","carin\u0303o","carne","carpeta","carro","carta","casa","casco","casero","caspa","castor","catorce","catre","caudal","causa","cazo","cebolla","ceder","cedro","celda","ce\u0301lebre","celoso","ce\u0301lula","cemento","ceniza","centro","cerca","cerdo","cereza","cero","cerrar","certeza","ce\u0301sped","cetro","chacal","chaleco","champu\u0301","chancla","chapa","charla","chico","chiste","chivo","choque","choza","chuleta","chupar","ciclo\u0301n","ciego","cielo","cien","cierto","cifra","cigarro","cima","cinco","cine","cinta","cipre\u0301s","circo","ciruela","cisne","cita","ciudad","clamor","clan","claro","clase","clave","cliente","clima","cli\u0301nica","cobre","coccio\u0301n","cochino","cocina","coco","co\u0301digo","codo","cofre","coger","cohete","coji\u0301n","cojo","cola","colcha","colegio","colgar","colina","collar","colmo","columna","combate","comer","comida","co\u0301modo","compra","conde","conejo","conga","conocer","consejo","contar","copa","copia","corazo\u0301n","corbata","corcho","cordo\u0301n","corona","correr","coser","cosmos","costa","cra\u0301neo","cra\u0301ter","crear","crecer","crei\u0301do","crema","cri\u0301a","crimen","cripta","crisis","cromo","cro\u0301nica","croqueta","crudo","cruz","cuadro","cuarto","cuatro","cubo","cubrir","cuchara","cuello","cuento","cuerda","cuesta","cueva","cuidar","culebra","culpa","culto","cumbre","cumplir","cuna","cuneta","cuota","cupo\u0301n","cu\u0301pula","curar","curioso","curso","curva","cutis","dama","danza","dar","dardo","da\u0301til","deber","de\u0301bil","de\u0301cada","decir","dedo","defensa","definir","dejar","delfi\u0301n","delgado","delito","demora","denso","dental","deporte","derecho","derrota","desayuno","deseo","desfile","desnudo","destino","desvi\u0301o","detalle","detener","deuda","di\u0301a","diablo","diadema","diamante","diana","diario","dibujo","dictar","diente","dieta","diez","difi\u0301cil","digno","dilema","diluir","dinero","directo","dirigir","disco","disen\u0303o","disfraz","diva","divino","doble","doce","dolor","domingo","don","donar","dorado","dormir","dorso","dos","dosis","drago\u0301n","droga","ducha","duda","duelo","duen\u0303o","dulce","du\u0301o","duque","durar","dureza","duro","e\u0301bano","ebrio","echar","eco","ecuador","edad","edicio\u0301n","edificio","editor","educar","efecto","eficaz","eje","ejemplo","elefante","elegir","elemento","elevar","elipse","e\u0301lite","elixir","elogio","eludir","embudo","emitir","emocio\u0301n","empate","empen\u0303o","empleo","empresa","enano","encargo","enchufe","enci\u0301a","enemigo","enero","enfado","enfermo","engan\u0303o","enigma","enlace","enorme","enredo","ensayo","ensen\u0303ar","entero","entrar","envase","envi\u0301o","e\u0301poca","equipo","erizo","escala","escena","escolar","escribir","escudo","esencia","esfera","esfuerzo","espada","espejo","espi\u0301a","esposa","espuma","esqui\u0301","estar","este","estilo","estufa","etapa","eterno","e\u0301tica","etnia","evadir","evaluar","evento","evitar","exacto","examen","exceso","excusa","exento","exigir","exilio","existir","e\u0301xito","experto","explicar","exponer","extremo","fa\u0301brica","fa\u0301bula","fachada","fa\u0301cil","factor","faena","faja","falda","fallo","falso","faltar","fama","familia","famoso","farao\u0301n","farmacia","farol","farsa","fase","fatiga","fauna","favor","fax","febrero","fecha","feliz","feo","feria","feroz","fe\u0301rtil","fervor","festi\u0301n","fiable","fianza","fiar","fibra","ficcio\u0301n","ficha","fideo","fiebre","fiel","fiera","fiesta","figura","fijar","fijo","fila","filete","filial","filtro","fin","finca","fingir","finito","firma","flaco","flauta","flecha","flor","flota","fluir","flujo","flu\u0301or","fobia","foca","fogata","fogo\u0301n","folio","folleto","fondo","forma","forro","fortuna","forzar","fosa","foto","fracaso","fra\u0301gil","franja","frase","fraude","frei\u0301r","freno","fresa","fri\u0301o","frito","fruta","fuego","fuente","fuerza","fuga","fumar","funcio\u0301n","funda","furgo\u0301n","furia","fusil","fu\u0301tbol","futuro","gacela","gafas","gaita","gajo","gala","galeri\u0301a","gallo","gamba","ganar","gancho","ganga","ganso","garaje","garza","gasolina","gastar","gato","gavila\u0301n","gemelo","gemir","gen","ge\u0301nero","genio","gente","geranio","gerente","germen","gesto","gigante","gimnasio","girar","giro","glaciar","globo","gloria","gol","golfo","goloso","golpe","goma","gordo","gorila","gorra","gota","goteo","gozar","grada","gra\u0301fico","grano","grasa","gratis","grave","grieta","grillo","gripe","gris","grito","grosor","gru\u0301a","grueso","grumo","grupo","guante","guapo","guardia","guerra","gui\u0301a","guin\u0303o","guion","guiso","guitarra","gusano","gustar","haber","ha\u0301bil","hablar","hacer","hacha","hada","hallar","hamaca","harina","haz","hazan\u0303a","hebilla","hebra","hecho","helado","helio","hembra","herir","hermano","he\u0301roe","hervir","hielo","hierro","hi\u0301gado","higiene","hijo","himno","historia","hocico","hogar","hoguera","hoja","hombre","hongo","honor","honra","hora","hormiga","horno","hostil","hoyo","hueco","huelga","huerta","hueso","huevo","huida","huir","humano","hu\u0301medo","humilde","humo","hundir","huraca\u0301n","hurto","icono","ideal","idioma","i\u0301dolo","iglesia","iglu\u0301","igual","ilegal","ilusio\u0301n","imagen","ima\u0301n","imitar","impar","imperio","imponer","impulso","incapaz","i\u0301ndice","inerte","infiel","informe","ingenio","inicio","inmenso","inmune","innato","insecto","instante","intere\u0301s","i\u0301ntimo","intuir","inu\u0301til","invierno","ira","iris","ironi\u0301a","isla","islote","jabali\u0301","jabo\u0301n","jamo\u0301n","jarabe","jardi\u0301n","jarra","jaula","jazmi\u0301n","jefe","jeringa","jinete","jornada","joroba","joven","joya","juerga","jueves","juez","jugador","jugo","juguete","juicio","junco","jungla","junio","juntar","ju\u0301piter","jurar","justo","juvenil","juzgar","kilo","koala","labio","lacio","lacra","lado","ladro\u0301n","lagarto","la\u0301grima","laguna","laico","lamer","la\u0301mina","la\u0301mpara","lana","lancha","langosta","lanza","la\u0301piz","largo","larva","la\u0301stima","lata","la\u0301tex","latir","laurel","lavar","lazo","leal","leccio\u0301n","leche","lector","leer","legio\u0301n","legumbre","lejano","lengua","lento","len\u0303a","leo\u0301n","leopardo","lesio\u0301n","letal","letra","leve","leyenda","libertad","libro","licor","li\u0301der","lidiar","lienzo","liga","ligero","lima","li\u0301mite","limo\u0301n","limpio","lince","lindo","li\u0301nea","lingote","lino","linterna","li\u0301quido","liso","lista","litera","litio","litro","llaga","llama","llanto","llave","llegar","llenar","llevar","llorar","llover","lluvia","lobo","locio\u0301n","loco","locura","lo\u0301gica","logro","lombriz","lomo","lonja","lote","lucha","lucir","lugar","lujo","luna","lunes","lupa","lustro","luto","luz","maceta","macho","madera","madre","maduro","maestro","mafia","magia","mago","mai\u0301z","maldad","maleta","malla","malo","mama\u0301","mambo","mamut","manco","mando","manejar","manga","maniqui\u0301","manjar","mano","manso","manta","man\u0303ana","mapa","ma\u0301quina","mar","marco","marea","marfil","margen","marido","ma\u0301rmol","marro\u0301n","martes","marzo","masa","ma\u0301scara","masivo","matar","materia","matiz","matriz","ma\u0301ximo","mayor","mazorca","mecha","medalla","medio","me\u0301dula","mejilla","mejor","melena","melo\u0301n","memoria","menor","mensaje","mente","menu\u0301","mercado","merengue","me\u0301rito","mes","meso\u0301n","meta","meter","me\u0301todo","metro","mezcla","miedo","miel","miembro","miga","mil","milagro","militar","millo\u0301n","mimo","mina","minero","mi\u0301nimo","minuto","miope","mirar","misa","miseria","misil","mismo","mitad","mito","mochila","mocio\u0301n","moda","modelo","moho","mojar","molde","moler","molino","momento","momia","monarca","moneda","monja","monto","mon\u0303o","morada","morder","moreno","morir","morro","morsa","mortal","mosca","mostrar","motivo","mover","mo\u0301vil","mozo","mucho","mudar","mueble","muela","muerte","muestra","mugre","mujer","mula","muleta","multa","mundo","mun\u0303eca","mural","muro","mu\u0301sculo","museo","musgo","mu\u0301sica","muslo","na\u0301car","nacio\u0301n","nadar","naipe","naranja","nariz","narrar","nasal","natal","nativo","natural","na\u0301usea","naval","nave","navidad","necio","ne\u0301ctar","negar","negocio","negro","neo\u0301n","nervio","neto","neutro","nevar","nevera","nicho","nido","niebla","nieto","nin\u0303ez","nin\u0303o","ni\u0301tido","nivel","nobleza","noche","no\u0301mina","noria","norma","norte","nota","noticia","novato","novela","novio","nube","nuca","nu\u0301cleo","nudillo","nudo","nuera","nueve","nuez","nulo","nu\u0301mero","nutria","oasis","obeso","obispo","objeto","obra","obrero","observar","obtener","obvio","oca","ocaso","oce\u0301ano","ochenta","ocho","ocio","ocre","octavo","octubre","oculto","ocupar","ocurrir","odiar","odio","odisea","oeste","ofensa","oferta","oficio","ofrecer","ogro","oi\u0301do","oi\u0301r","ojo","ola","oleada","olfato","olivo","olla","olmo","olor","olvido","ombligo","onda","onza","opaco","opcio\u0301n","o\u0301pera","opinar","oponer","optar","o\u0301ptica","opuesto","oracio\u0301n","orador","oral","o\u0301rbita","orca","orden","oreja","o\u0301rgano","orgi\u0301a","orgullo","oriente","origen","orilla","oro","orquesta","oruga","osadi\u0301a","oscuro","osezno","oso","ostra","oton\u0303o","otro","oveja","o\u0301vulo","o\u0301xido","oxi\u0301geno","oyente","ozono","pacto","padre","paella","pa\u0301gina","pago","pai\u0301s","pa\u0301jaro","palabra","palco","paleta","pa\u0301lido","palma","paloma","palpar","pan","panal","pa\u0301nico","pantera","pan\u0303uelo","papa\u0301","papel","papilla","paquete","parar","parcela","pared","parir","paro","pa\u0301rpado","parque","pa\u0301rrafo","parte","pasar","paseo","pasio\u0301n","paso","pasta","pata","patio","patria","pausa","pauta","pavo","payaso","peato\u0301n","pecado","pecera","pecho","pedal","pedir","pegar","peine","pelar","peldan\u0303o","pelea","peligro","pellejo","pelo","peluca","pena","pensar","pen\u0303o\u0301n","peo\u0301n","peor","pepino","pequen\u0303o","pera","percha","perder","pereza","perfil","perico","perla","permiso","perro","persona","pesa","pesca","pe\u0301simo","pestan\u0303a","pe\u0301talo","petro\u0301leo","pez","pezun\u0303a","picar","picho\u0301n","pie","piedra","pierna","pieza","pijama","pilar","piloto","pimienta","pino","pintor","pinza","pin\u0303a","piojo","pipa","pirata","pisar","piscina","piso","pista","pito\u0301n","pizca","placa","plan","plata","playa","plaza","pleito","pleno","plomo","pluma","plural","pobre","poco","poder","podio","poema","poesi\u0301a","poeta","polen","polici\u0301a","pollo","polvo","pomada","pomelo","pomo","pompa","poner","porcio\u0301n","portal","posada","poseer","posible","poste","potencia","potro","pozo","prado","precoz","pregunta","premio","prensa","preso","previo","primo","pri\u0301ncipe","prisio\u0301n","privar","proa","probar","proceso","producto","proeza","profesor","programa","prole","promesa","pronto","propio","pro\u0301ximo","prueba","pu\u0301blico","puchero","pudor","pueblo","puerta","puesto","pulga","pulir","pulmo\u0301n","pulpo","pulso","puma","punto","pun\u0303al","pun\u0303o","pupa","pupila","pure\u0301","quedar","queja","quemar","querer","queso","quieto","qui\u0301mica","quince","quitar","ra\u0301bano","rabia","rabo","racio\u0301n","radical","rai\u0301z","rama","rampa","rancho","rango","rapaz","ra\u0301pido","rapto","rasgo","raspa","rato","rayo","raza","razo\u0301n","reaccio\u0301n","realidad","reban\u0303o","rebote","recaer","receta","rechazo","recoger","recreo","recto","recurso","red","redondo","reducir","reflejo","reforma","refra\u0301n","refugio","regalo","regir","regla","regreso","rehe\u0301n","reino","rei\u0301r","reja","relato","relevo","relieve","relleno","reloj","remar","remedio","remo","rencor","rendir","renta","reparto","repetir","reposo","reptil","res","rescate","resina","respeto","resto","resumen","retiro","retorno","retrato","reunir","reve\u0301s","revista","rey","rezar","rico","riego","rienda","riesgo","rifa","ri\u0301gido","rigor","rinco\u0301n","rin\u0303o\u0301n","ri\u0301o","riqueza","risa","ritmo","rito","rizo","roble","roce","rociar","rodar","rodeo","rodilla","roer","rojizo","rojo","romero","romper","ron","ronco","ronda","ropa","ropero","rosa","rosca","rostro","rotar","rubi\u0301","rubor","rudo","rueda","rugir","ruido","ruina","ruleta","rulo","rumbo","rumor","ruptura","ruta","rutina","sa\u0301bado","saber","sabio","sable","sacar","sagaz","sagrado","sala","saldo","salero","salir","salmo\u0301n","salo\u0301n","salsa","salto","salud","salvar","samba","sancio\u0301n","sandi\u0301a","sanear","sangre","sanidad","sano","santo","sapo","saque","sardina","sarte\u0301n","sastre","sata\u0301n","sauna","saxofo\u0301n","seccio\u0301n","seco","secreto","secta","sed","seguir","seis","sello","selva","semana","semilla","senda","sensor","sen\u0303al","sen\u0303or","separar","sepia","sequi\u0301a","ser","serie","sermo\u0301n","servir","sesenta","sesio\u0301n","seta","setenta","severo","sexo","sexto","sidra","siesta","siete","siglo","signo","si\u0301laba","silbar","silencio","silla","si\u0301mbolo","simio","sirena","sistema","sitio","situar","sobre","socio","sodio","sol","solapa","soldado","soledad","so\u0301lido","soltar","solucio\u0301n","sombra","sondeo","sonido","sonoro","sonrisa","sopa","soplar","soporte","sordo","sorpresa","sorteo","soste\u0301n","so\u0301tano","suave","subir","suceso","sudor","suegra","suelo","suen\u0303o","suerte","sufrir","sujeto","sulta\u0301n","sumar","superar","suplir","suponer","supremo","sur","surco","suren\u0303o","surgir","susto","sutil","tabaco","tabique","tabla","tabu\u0301","taco","tacto","tajo","talar","talco","talento","talla","talo\u0301n","taman\u0303o","tambor","tango","tanque","tapa","tapete","tapia","tapo\u0301n","taquilla","tarde","tarea","tarifa","tarjeta","tarot","tarro","tarta","tatuaje","tauro","taza","tazo\u0301n","teatro","techo","tecla","te\u0301cnica","tejado","tejer","tejido","tela","tele\u0301fono","tema","temor","templo","tenaz","tender","tener","tenis","tenso","teori\u0301a","terapia","terco","te\u0301rmino","ternura","terror","tesis","tesoro","testigo","tetera","texto","tez","tibio","tiburo\u0301n","tiempo","tienda","tierra","tieso","tigre","tijera","tilde","timbre","ti\u0301mido","timo","tinta","ti\u0301o","ti\u0301pico","tipo","tira","tiro\u0301n","tita\u0301n","ti\u0301tere","ti\u0301tulo","tiza","toalla","tobillo","tocar","tocino","todo","toga","toldo","tomar","tono","tonto","topar","tope","toque","to\u0301rax","torero","tormenta","torneo","toro","torpedo","torre","torso","tortuga","tos","tosco","toser","to\u0301xico","trabajo","tractor","traer","tra\u0301fico","trago","traje","tramo","trance","trato","trauma","trazar","tre\u0301bol","tregua","treinta","tren","trepar","tres","tribu","trigo","tripa","triste","triunfo","trofeo","trompa","tronco","tropa","trote","trozo","truco","trueno","trufa","tuberi\u0301a","tubo","tuerto","tumba","tumor","tu\u0301nel","tu\u0301nica","turbina","turismo","turno","tutor","ubicar","u\u0301lcera","umbral","unidad","unir","universo","uno","untar","un\u0303a","urbano","urbe","urgente","urna","usar","usuario","u\u0301til","utopi\u0301a","uva","vaca","vaci\u0301o","vacuna","vagar","vago","vaina","vajilla","vale","va\u0301lido","valle","valor","va\u0301lvula","vampiro","vara","variar","varo\u0301n","vaso","vecino","vector","vehi\u0301culo","veinte","vejez","vela","velero","veloz","vena","vencer","venda","veneno","vengar","venir","venta","venus","ver","verano","verbo","verde","vereda","verja","verso","verter","vi\u0301a","viaje","vibrar","vicio","vi\u0301ctima","vida","vi\u0301deo","vidrio","viejo","viernes","vigor","vil","villa","vinagre","vino","vin\u0303edo","violi\u0301n","viral","virgo","virtud","visor","vi\u0301spera","vista","vitamina","viudo","vivaz","vivero","vivir","vivo","volca\u0301n","volumen","volver","voraz","votar","voto","voz","vuelo","vulgar","yacer","yate","yegua","yema","yerno","yeso","yodo","yoga","yogur","zafiro","zanja","zapato","zarza","zona","zorro","zumo","zurdo"];cM.exports=Qre});var dM=k((B5e,hM)=>{v();hM.exports={CHINESE:tM(),ENGLISH:iM(),FRENCH:oM(),ITALIAN:sM(),JAPANESE:fM(),SPANISH:lM()}});var vM=k((C5e,gM)=>{"use strict";v();var Va=ke(),eie=Va.crypto.BN,Q0=KB(),pl=Va.deps._,tie=XB(),K4=QB(),rie=Va.crypto.Hash,iie=Va.crypto.Random,pM=Va.util.preconditions,pt=function(e,t){if(!(this instanceof pt))return new pt(e,t);pl.isArray(e)&&(t=e,e=null);var r,i,n;if(h.Buffer.isBuffer(e))n=e;else if(pl.isString(e))i=Q0.nfkd(e);else if(pl.isNumber(e))r=e;else if(e)throw new Va.errors.InvalidArgument("data","Must be a Buffer, a string or an integer");if(r=r||128,t=t||pt._getDictionary(i),i&&!t)throw new K4.UnknownWordlist(i);if(t=t||pt.Words.ENGLISH,n&&(i=pt._entropy2mnemonic(n,t)),i&&!pt.isValid(i,t))throw new K4.InvalidMnemonic(i);if(r%32!==0||r<128)throw new Va.errors.InvalidArgument("ENT","Values must be ENT > 128 and ENT % 32 == 0");i=i||pt._mnemonic(r,t),Object.defineProperty(this,"wordlist",{configurable:!1,value:t}),Object.defineProperty(this,"phrase",{configurable:!1,value:i})};pt.fromRandom=function(e,t){if(pl.isNumber(e)){var r=t;t=e,e=r}return e=e||pt.Words.ENGLISH,t=t||128,new pt(t,e)};pt.fromString=function(e,t=pt.Words.ENGLISH){return new pt(e,t)};pt.Words=dM();pt.isValid=function(e,t){if(e=Q0.nfkd(e),t=t||pt._getDictionary(e),!t)return!1;for(var r=e.split(" "),i="",n=0;n<r.length;n++){var o=t.indexOf(r[n]);if(o<0)return!1;i=i+("00000000000"+o.toString(2)).slice(-11)}var a=i.length/33,s=i.slice(-a),u=i.slice(0,i.length-a),c=h.Buffer.alloc(u.length/8);for(n=0;n<u.length/8;n++)c.writeUInt8(parseInt(i.slice(n*8,(n+1)*8),2),n);var l=pt._entropyChecksum(c);return l===s};pt._belongsToWordlist=function(e,t){for(var r=Q0.nfkd(e).split(" "),i=0;i<r.length;i++){var n=t.indexOf(r[i]);if(n<0)return!1}return!0};pt._getDictionary=function(e){if(!e)return null;for(var t=Object.keys(pt.Words),r=0;r<t.length;r++){var i=t[r];if(pt._belongsToWordlist(e,pt.Words[i]))return pt.Words[i]}return null};pt.prototype.toSeed=function(e){return e=e||"",tie(Q0.nfkd(this.phrase),Q0.nfkd("mnemonic"+e),2048,64)};pt.fromSeed=function(e,t){return pM.checkArgument(h.Buffer.isBuffer(e),"seed must be a Buffer."),pM.checkArgument(pl.isArray(t)||pl.isString(t),"wordlist must be a string or an array."),new pt(e,t)};pt.prototype.toHDPrivateKey=function(e,t){var r=this.toSeed(e);return Va.HDPrivateKey.fromSeed(r,t)};pt.prototype.toString=function(){return this.phrase};pt.prototype.inspect=function(){return"<Mnemonic: "+this.toString()+" >"};pt._mnemonic=function(e,t){var r=iie.getRandomBuffer(e/8);return pt._entropy2mnemonic(r,t)};pt._entropy2mnemonic=function(e,t){for(var r="",i=0;i<e.length;i++)r=r+("00000000"+e[i].toString(2)).slice(-8);if(r=r+pt._entropyChecksum(e),r.length%11!==0)throw new K4.InvalidEntropy(r);var n=[];for(i=0;i<r.length/11;i++){var o=parseInt(r.slice(i*11,(i+1)*11),2);n.push(t[o])}var a;return t===pt.Words.JAPANESE?a=n.join("\u3000"):a=n.join(" "),a};pt._entropyChecksum=function(e){for(var t=rie.sha256(e),r=e.length*8,i=r/32,n=new eie(t.toString("hex"),16).toString(2);n.length%256!==0;)n="0"+n;var o=n.slice(0,i);return o};pt.bsv=Va;gM.exports=pt});var bM=k((D5e,yM)=>{v();var mM=ke();mM.Mnemonic=vM();yM.exports=mM.Mnemonic});function nie(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in e&&e.BYTES_PER_ELEMENT===1}function oie(e){if(typeof e!="boolean")throw new TypeError(`boolean expected, not ${e}`)}function E6(e){if(typeof e!="number")throw new TypeError("number expected, got "+typeof e);if(!Number.isSafeInteger(e)||e<0)throw new RangeError("positive integer expected, got "+e)}function ut(e,t,r=""){let i=nie(e),n=e?.length,o=t!==void 0;if(!i||o&&n!==t){let a=r&&`"${r}" `,s=o?` of length ${t}`:"",u=i?`length=${n}`:`type=${typeof e}`,c=a+"expected Uint8Array"+s+", got "+u;throw i?new RangeError(c):new TypeError(c)}return e}function e1(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 t1(e,t,r=!1){ut(e,void 0,"output");let i=t.outputLen;if(e.length<i)throw new RangeError("digestInto() expects output buffer of length at least "+i);if(r&&!Yr(e))throw new Error("invalid output, must be aligned")}function I6(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}function mt(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Rt(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function gl(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function V4(e,t){return!e.byteLength||!t.byteLength?!1:e.buffer===t.buffer&&e.byteOffset<t.byteOffset+t.byteLength&&t.byteOffset<e.byteOffset+e.byteLength}function r1(e,t){if(V4(e,t)&&e.byteOffset<t.byteOffset)throw new Error("complex overlap of input and output is not supported")}function G4(...e){let t=0;for(let i=0;i<e.length;i++){let n=e[i];ut(n),t+=n.length}let r=new Uint8Array(t);for(let i=0,n=0;i<e.length;i++){let o=e[i];r.set(o,n),n+=o.length}return r}function i1(e,t){if(e.length!==t.length)return!1;let r=0;for(let i=0;i<e.length;i++)r|=e[i]^t[i];return r===0}function n1(e,t,r){let i=t,n=r||(()=>[]),o=(s,u)=>i(u,...n(s)).update(s).digest(),a=i(new Uint8Array(e),...n(new Uint8Array(0)));return o.outputLen=a.outputLen,o.blockLen=a.blockLen,o.create=(s,...u)=>i(s,...u),o}function wf(e,t,r=!0){if(t===void 0)return new Uint8Array(e);if(ut(t,void 0,"output"),t.length!==e)throw new Error('"output" expected Uint8Array of length '+e+", got: "+t.length);if(r&&!Yr(t))throw new Error("invalid output, must be aligned");return t}function _M(e,t,r){E6(e),E6(t),oie(r);let i=new Uint8Array(16),n=gl(i);return n.setBigUint64(0,BigInt(t),r),n.setBigUint64(8,BigInt(e),r),i}function Yr(e){return e.byteOffset%4===0}function tr(e){return Uint8Array.from(ut(e))}var Sn,_f,ft,aie,wt,zo,Z4=Xr(()=>{v();Sn=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68,_f=e=>e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255,ft=Sn?e=>e:e=>_f(e)>>>0,aie=e=>{for(let t=0;t<e.length;t++)e[t]=_f(e[t]);return e},wt=Sn?e=>e:aie;zo=(e,t)=>{function r(i,...n){if(ut(i,void 0,"key"),e.nonceLength!==void 0){let l=n[0];ut(l,e.varSizeNonce?void 0:e.nonceLength,"nonce")}let o=e.tagLength;o&&n[1]!==void 0&&ut(n[1],void 0,"AAD");let a=t(i,...n),s=(l,m)=>{if(m!==void 0){if(l!==2)throw new Error("cipher output not supported");ut(m,void 0,"output")}},u=!1;return{encrypt(l,m){if(u)throw new Error("cannot encrypt() twice with same key + nonce");return u=!0,ut(l),s(a.encrypt.length,m),a.encrypt(l,m)},decrypt(l,m){if(ut(l),o&&l.length<o)throw new Error('"ciphertext" expected length bigger than tagLength='+o);return s(a.decrypt.length,m),a.decrypt(l,m)}}}return Object.assign(r,e),r}});function fie(e){e.reverse();let t=e[15]&1,r=0;for(let i=0;i<e.length;i++){let n=e[i];e[i]=n>>>1|r,r=(n&1)<<7}return e[0]^=-t&225,e}var Ga,Y4,Ko,sie,uie,o1,Ds,cie,O6,W4,$4,wM,SM=Xr(()=>{v();Z4();Ga=16,Y4=new Uint8Array(16),Ko=mt(Y4),sie=225,uie=(e,t,r,i)=>{let n=i&1;return{s3:r<<31|i>>>1,s2:t<<31|r>>>1,s1:e<<31|t>>>1,s0:e>>>1^sie<<24&-(n&1)}},o1=e=>(e>>>0&255)<<24|(e>>>8&255)<<16|(e>>>16&255)<<8|e>>>24&255|0,Ds=e=>ft(o1(e));cie=e=>e>64*1024?8:e>1024?4:2,O6=class{constructor(t,r){Z(this,"blockLen",Ga);Z(this,"outputLen",Ga);Z(this,"s0",0);Z(this,"s1",0);Z(this,"s2",0);Z(this,"s3",0);Z(this,"finished",!1);Z(this,"destroyed",!1);Z(this,"t");Z(this,"W");Z(this,"windowSize");ut(t,16,"key"),t=tr(t);let i=gl(t),n=i.getUint32(0,!1),o=i.getUint32(4,!1),a=i.getUint32(8,!1),s=i.getUint32(12,!1),u=[];for(let P=0;P<128;P++)u.push({s0:o1(n),s1:o1(o),s2:o1(a),s3:o1(s)}),{s0:n,s1:o,s2:a,s3:s}=uie(n,o,a,s);let c=cie(r||1024);if(![1,2,4,8].includes(c))throw new Error("ghash: invalid window size, expected 2, 4 or 8");this.W=c;let m=128/c,w=this.windowSize=2**c,E=[];for(let P=0;P<m;P++)for(let M=0;M<w;M++){let D=0,L=0,U=0,K=0;for(let C=0;C<c;C++){if(!(M>>>c-C-1&1))continue;let{s0:F,s1:H,s2:z,s3:V}=u[c*P+C];D^=F,L^=H,U^=z,K^=V}E.push({s0:D,s1:L,s2:U,s3:K})}this.t=E}_updateBlock(t,r,i,n){t^=this.s0,r^=this.s1,i^=this.s2,n^=this.s3;let{W:o,t:a,windowSize:s}=this,u=0,c=0,l=0,m=0,w=(1<<o)-1,E=0;for(let P of[t,r,i,n])for(let M=0;M<4;M++){let D=P>>>8*M&255;for(let L=8/o-1;L>=0;L--){let U=D>>>o*L&w,{s0:K,s1:C,s2:N,s3:F}=a[E*s+U];u^=K,c^=C,l^=N,m^=F,E+=1}}this.s0=u,this.s1=c,this.s2=l,this.s3=m}update(t){e1(this),ut(t),t=tr(t);let r=mt(t),i=Math.floor(t.length/Ga),n=t.length%Ga;for(let o=0;o<i;o++)this._updateBlock(ft(r[o*4+0]),ft(r[o*4+1]),ft(r[o*4+2]),ft(r[o*4+3]));return n&&(Y4.set(t.subarray(i*Ga)),this._updateBlock(ft(Ko[0]),ft(Ko[1]),ft(Ko[2]),ft(Ko[3])),Rt(Ko)),this}destroy(){this.destroyed=!0;let{t}=this;for(let r of t)r.s0=0,r.s1=0,r.s2=0,r.s3=0}digestInto(t){e1(this),t1(t,this,!0),this.finished=!0;let{s0:r,s1:i,s2:n,s3:o}=this,a=mt(t);a[0]=r,a[1]=i,a[2]=n,a[3]=o,wt(a)}digest(){let t=new Uint8Array(Ga);return this.digestInto(t),this.destroy(),t}},W4=class extends O6{constructor(t,r){ut(t);let i=fie(tr(t));super(i,r),Rt(i)}update(t){e1(this),ut(t),t=tr(t);let r=mt(t),i=t.length%Ga,n=Math.floor(t.length/Ga);for(let o=0;o<n;o++)this._updateBlock(Ds(r[o*4+3]),Ds(r[o*4+2]),Ds(r[o*4+1]),Ds(r[o*4+0]));return i&&(Y4.set(t.subarray(n*Ga)),this._updateBlock(Ds(Ko[3]),Ds(Ko[2]),Ds(Ko[1]),Ds(Ko[0])),Rt(Ko)),this}digestInto(t){e1(this),t1(t,this,!0),this.finished=!0;let r=t.subarray(0,this.outputLen),{s0:i,s1:n,s2:o,s3:a}=this,s=mt(r);s[0]=i,s[1]=n,s[2]=o,s[3]=a,wt(s),r.reverse()}},$4=n1(16,(e,t)=>new O6(e,t),e=>[e.length]),wM=n1(16,(e,t)=>new W4(e,t),e=>[e.length])});var o8={};X1(o8,{__TESTS:()=>Pie,aeskw:()=>wie,aeskwp:()=>Sie,aessiv:()=>Oie,cbc:()=>mie,cfb:()=>yie,cmac:()=>s1,ctr:()=>bl,ecb:()=>vie,gcm:()=>bie,gcmsiv:()=>_ie,rngAesCtrDrbg128:()=>xie,rngAesCtrDrbg256:()=>Eie,siv:()=>Iie,unsafe:()=>Aie});function P6(e){if(![16,24,32].includes(e.length))throw new Error('"aes key" expected Uint8Array of length 16/24/32, got length='+e.length)}function i8(e){return e<<1^hie&-(e>>7)}function vl(e,t){let r=0;for(;t>0;t>>=1)r^=e&-(t&1),e=i8(e);return r}function IM(e,t){if(e.length!==256)throw new Error("Wrong sbox length");let r=new Uint32Array(256).map((c,l)=>t(e[l])),i=r.map(X4),n=i.map(X4),o=n.map(X4),a=new Uint32Array(256*256),s=new Uint32Array(256*256),u=new Uint16Array(256*256);for(let c=0;c<256;c++)for(let l=0;l<256;l++){let m=c*256+l;a[m]=r[c]^i[l],s[m]=n[c]^o[l],u[m]=e[c]<<8|e[l]}return{sbox:e,sbox2:u,T0:r,T1:i,T2:n,T3:o,T01:a,T23:s}}function io(e){ut(e);let t=e.length;P6(e);let{sbox2:r}=n8,i=[];(!Sn||!Yr(e))&&i.push(e=tr(e));let n=wt(mt(e)),o=n.length,a=u=>Vo(r,u,u,u,u),s=new Uint32Array(t+28);s.set(n);for(let u=o;u<s.length;u++){let c=s[u-1];u%o===0?c=a(pie(c))^gie[u/o-1]:o>6&&u%o===4&&(c=a(c)),s[u]=s[u-o]^c}return Rt(...i),s}function T6(e){let t=io(e),r=t.slice(),i=t.length,{sbox2:n}=n8,{T0:o,T1:a,T2:s,T3:u}=OM;for(let c=0;c<i;c+=4)for(let l=0;l<4;l++)r[c+l]=t[i-c-4+l];Rt(t);for(let c=4;c<i-4;c++){let l=r[c],m=Vo(n,l,l,l,l);r[c]=o[m&255]^a[m>>>8&255]^s[m>>>16&255]^u[m>>>24]}return r}function Ls(e,t,r,i,n,o){return e[r<<8&65280|i>>>8&255]^t[n>>>8&65280|o>>>24&255]}function Vo(e,t,r,i,n){return e[t&255|r&65280]|e[i>>>16&255|n>>>16&65280]<<16}function Si(e,t,r,i,n){let{sbox2:o,T01:a,T23:s}=n8,u=0;t^=e[u++],r^=e[u++],i^=e[u++],n^=e[u++];let c=e.length/4-2;for(let P=0;P<c;P++){let M=e[u++]^Ls(a,s,t,r,i,n),D=e[u++]^Ls(a,s,r,i,n,t),L=e[u++]^Ls(a,s,i,n,t,r),U=e[u++]^Ls(a,s,n,t,r,i);t=M,r=D,i=L,n=U}let l=e[u++]^Vo(o,t,r,i,n),m=e[u++]^Vo(o,r,i,n,t),w=e[u++]^Vo(o,i,n,t,r),E=e[u++]^Vo(o,n,t,r,i);return{s0:l,s1:m,s2:w,s3:E}}function l1(e,t,r,i,n){let{sbox2:o,T01:a,T23:s}=OM,u=0;t^=e[u++],r^=e[u++],i^=e[u++],n^=e[u++];let c=e.length/4-2;for(let P=0;P<c;P++){let M=e[u++]^Ls(a,s,t,n,i,r),D=e[u++]^Ls(a,s,r,t,n,i),L=e[u++]^Ls(a,s,i,r,t,n),U=e[u++]^Ls(a,s,n,i,r,t);t=M,r=D,i=L,n=U}let l=e[u++]^Vo(o,t,n,i,r),m=e[u++]^Vo(o,r,t,n,i),w=e[u++]^Vo(o,i,r,t,n),E=e[u++]^Vo(o,n,i,r,t);return{s0:l,s1:m,s2:w,s3:E}}function AM(e,t,r,i){ut(t,At,"nonce"),ut(r);let n=r.length;i=wf(n,i),r1(r,i);let o=t,a=mt(o),s=mt(r),u=mt(i),{s0:c,s1:l,s2:m,s3:w}=Si(e,ft(a[0]),ft(a[1]),ft(a[2]),ft(a[3]));for(let P=0;P+4<=s.length;P+=4)u[P+0]=s[P+0]^ft(c),u[P+1]=s[P+1]^ft(l),u[P+2]=s[P+2]^ft(m),u[P+3]=s[P+3]^ft(w),u1(o,!1,1),{s0:c,s1:l,s2:m,s3:w}=Si(e,ft(a[0]),ft(a[1]),ft(a[2]),ft(a[3]));let E=At*Math.floor(s.length/r8);if(E<n){let P=new Uint32Array([c,l,m,w]);wt(P);let M=I6(P);for(let D=E,L=0;D<n;D++,L++)i[D]=r[D]^M[L];Rt(P)}return i}function ml(e,t,r,i,n){ut(r,At,"nonce"),ut(i),n=wf(i.length,n);let o=r,a=mt(o),s=gl(o),u=mt(i),c=mt(n),l=t?0:12,m=i.length,w=s.getUint32(l,t),{s0:E,s1:P,s2:M,s3:D}=Si(e,ft(a[0]),ft(a[1]),ft(a[2]),ft(a[3]));for(let U=0;U+4<=u.length;U+=4)c[U+0]=u[U+0]^ft(E),c[U+1]=u[U+1]^ft(P),c[U+2]=u[U+2]^ft(M),c[U+3]=u[U+3]^ft(D),w=w+1>>>0,s.setUint32(l,w,t),{s0:E,s1:P,s2:M,s3:D}=Si(e,ft(a[0]),ft(a[1]),ft(a[2]),ft(a[3]));let L=At*Math.floor(u.length/r8);if(L<m){let U=new Uint32Array([E,P,M,D]);wt(U);let K=I6(U);for(let C=L,N=0;C<m;C++,N++)n[C]=i[C]^K[N];Rt(U)}return n}function PM(e){if(ut(e),e.length%At!==0)throw new Error("aes-(cbc/ecb).decrypt ciphertext should consist of blocks with size "+At)}function TM(e,t,r){ut(e);let i=e.length,n=i%At;if(!t&&n!==0)throw new Error("aec/(cbc-ecb): unpadded plaintext with disabled padding");if(t){let s=At-n;s||(s=At),i=i+s}r=wf(i,r),r1(e,r),(!Sn||!Yr(e))&&(e=tr(e));let o=mt(e);wt(o);let a=mt(r);return{b:o,o:a,out:r}}function kM(e,t){if(!t)return e;let r=e.length;if(r===0)throw new Error("aes/pkcs7: empty ciphertext not allowed");let i=e[r-1],n=1;n&=i-1>>>31^1,n&=16-i>>>31^1;for(let o=0;o<16;o++){let a=o-i>>>31,s=(e[r-1-o]^i)===0?1:0;n&=s|a^1}if(!n)throw new Error("aes/pkcs7: wrong padding");return e.subarray(0,r-i)}function RM(e){let t=new Uint8Array(16),r=mt(t);t.set(e);let i=At-e.length;for(let n=At-i;n<At;n++)t[n]=i;return r}function BM(e,t,r,i,n){let o=n?n.length:0,a=e.create(r,i.length+o);n&&a.update(n);let s=_M(8*i.length,8*o,t);a.update(i),a.update(s);let u=a.digest();return Rt(s),u}function MM(e){return e instanceof Uint32Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint32Array"}function f1(e,t){if(ut(t,16,"block"),!MM(e))throw new Error("_encryptBlock accepts result of expandKeyLE");let r=mt(t);wt(r);let{s0:i,s1:n,s2:o,s3:a}=Si(e,r[0],r[1],r[2],r[3]);return r[0]=i,r[1]=n,r[2]=o,r[3]=a,wt(r),t}function CM(e,t){if(ut(t,16,"block"),!MM(e))throw new Error("_decryptBlock accepts result of expandKeyLE");let r=mt(t);wt(r);let{s0:i,s1:n,s2:o,s3:a}=l1(e,r[0],r[1],r[2],r[3]);return r[0]=i,r[1]=n,r[2]=o,r[3]=a,wt(r),t}function c1(e){let t=0;for(let r=At-1;r>=0;r--){let i=(e[r]&128)>>>7;e[r]=e[r]<<1|t,t=i}return t&&(e[At-1]^=135),e}function Sf(e,t){if(e.length!==t.length)throw new Error("xorBlock: blocks must have same length");for(let r=0;r<e.length;r++)e[r]=e[r]^t[r];return e}function DM(e,t){if(t.length>e.length)throw new Error("xorend: len(B) must be less than or equal to len(A)");let r=e.length-t.length;for(let i=0;i<t.length;i++)e[r+i]=e[r+i]^t[i];return e}function t8(e,t){P6(e);let r=t.length;if(r>127)throw new Error("s2v: number of input strings must be less than or equal to 127");if(r===0)return s1(lie,e);let i=s1(a1,e);for(let s=0;s<r-1;s++){c1(i);let u=s1(t[s],e);Sf(i,u),Rt(u)}let n=t[r-1];ut(n);let o;if(n.byteLength>=At)o=DM(Uint8Array.from(n),i);else{let s=new Uint8Array(At);s.set(n),s[n.length]=128,o=Sf(c1(i),s),Rt(s)}let a=s1(o,e);return Rt(i,o),a}var At,r8,a1,lie,hie,u1,J4,die,pie,X4,n8,OM,gie,bl,vie,mie,yie,bie,yl,_ie,A6,xM,wie,EM,Sie,Q4,NM,xie,Eie,e8,s1,Iie,Oie,Aie,Pie,a8=Xr(()=>{v();SM();Z4();At=16,r8=4,a1=new Uint8Array(At),lie=Uint8Array.from([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1]),hie=283;u1=(e,t,r=1)=>{if(!Number.isSafeInteger(r)||r>4294967040)throw new Error("incBytes: wrong carry "+r);ut(e);for(let i=0;i<e.length;i++){let n=t?i:e.length-1-i;r=r+(e[n]&255)|0,e[n]=r&255,r>>>=8}},J4=(()=>{let e=new Uint8Array(256);for(let r=0,i=1;r<256;r++,i^=i8(i))e[r]=i;let t=new Uint8Array(256);t[0]=99;for(let r=0;r<255;r++){let i=e[255-r];i|=i<<8,t[e[r]]=(i^i>>4^i>>5^i>>6^i>>7^99)&255}return Rt(e),t})(),die=J4.map((e,t)=>J4.indexOf(t)),pie=e=>e<<24|e>>>8,X4=e=>e<<8|e>>>24;n8=IM(J4,e=>vl(e,3)<<24|e<<16|e<<8|vl(e,2)),OM=IM(die,e=>vl(e,11)<<24|vl(e,13)<<16|vl(e,9)<<8|vl(e,14)),gie=(()=>{let e=new Uint8Array(16);for(let t=0,r=1;t<16;t++,r=i8(r))e[t]=r;return e})();bl=zo({blockSize:16,nonceLength:16},function(t,r){function i(n,o){if(ut(n),o!==void 0&&(ut(o),!Yr(o)))throw new Error("unaligned destination");let a=io(t),s=tr(r),u=[a,s];Yr(n)||u.push(n=tr(n));let c=AM(a,s,n,o);return Rt(...u),c}return{encrypt:(n,o)=>i(n,o),decrypt:(n,o)=>i(n,o)}});vie=zo({blockSize:16},function(t,r={}){let i=!r.disablePadding;return{encrypt(n,o){let{b:a,o:s,out:u}=TM(n,i,o),c=io(t),l=0;for(;l+4<=a.length;){let{s0:m,s1:w,s2:E,s3:P}=Si(c,a[l+0],a[l+1],a[l+2],a[l+3]);s[l++]=m,s[l++]=w,s[l++]=E,s[l++]=P}if(i){let m=RM(n.subarray(l*4));wt(m);let{s0:w,s1:E,s2:P,s3:M}=Si(c,m[0],m[1],m[2],m[3]);s[l++]=w,s[l++]=E,s[l++]=P,s[l++]=M}return wt(s),Rt(c),u},decrypt(n,o){PM(n);let a=T6(t);o=wf(n.length,o);let s=[a];r1(n,o),(!Sn||!Yr(n))&&s.push(n=tr(n));let u=mt(n),c=mt(o);wt(u);for(let l=0;l+4<=u.length;){let{s0:m,s1:w,s2:E,s3:P}=l1(a,u[l+0],u[l+1],u[l+2],u[l+3]);c[l++]=m,c[l++]=w,c[l++]=E,c[l++]=P}return wt(c),Rt(...s),kM(o,i)}}}),mie=zo({blockSize:16,nonceLength:16},function(t,r,i={}){let n=!i.disablePadding;return{encrypt(o,a){let s=io(t),{b:u,o:c,out:l}=TM(o,n,a),m=r,w=[s];(!Sn||!Yr(m))&&w.push(m=tr(m));let E=mt(m);wt(E);let P=E[0],M=E[1],D=E[2],L=E[3],U=0;for(;U+4<=u.length;)P^=u[U+0],M^=u[U+1],D^=u[U+2],L^=u[U+3],{s0:P,s1:M,s2:D,s3:L}=Si(s,P,M,D,L),c[U++]=P,c[U++]=M,c[U++]=D,c[U++]=L;if(n){let K=RM(o.subarray(U*4));wt(K),P^=K[0],M^=K[1],D^=K[2],L^=K[3],{s0:P,s1:M,s2:D,s3:L}=Si(s,P,M,D,L),c[U++]=P,c[U++]=M,c[U++]=D,c[U++]=L}return wt(c),Rt(...w),l},decrypt(o,a){PM(o);let s=T6(t),u=r,c=[s];(!Sn||!Yr(u))&&c.push(u=tr(u));let l=mt(u);wt(l),a=wf(o.length,a),r1(o,a),(!Sn||!Yr(o))&&c.push(o=tr(o));let m=mt(o),w=mt(a);wt(m);let E=l[0],P=l[1],M=l[2],D=l[3];for(let L=0;L+4<=m.length;){let U=E,K=P,C=M,N=D;E=m[L+0],P=m[L+1],M=m[L+2],D=m[L+3];let{s0:F,s1:H,s2:z,s3:V}=l1(s,E,P,M,D);w[L++]=F^U,w[L++]=H^K,w[L++]=z^C,w[L++]=V^N}return wt(w),Rt(...c),kM(a,n)}}}),yie=zo({blockSize:16,nonceLength:16},function(t,r){function i(n,o,a){ut(n);let s=n.length;if(a=wf(s,a),V4(n,a))throw new Error("overlapping src and dst not supported.");let u=io(t),c=r,l=[u];(!Sn||!Yr(c))&&l.push(c=tr(c)),(!Sn||!Yr(n))&&l.push(n=tr(n));let m=mt(n),w=mt(a),E=o?w:m,P=mt(c);wt(m),wt(P);let M=P[0],D=P[1],L=P[2],U=P[3];for(let C=0;C+4<=m.length;){let{s0:N,s1:F,s2:H,s3:z}=Si(u,M,D,L,U);w[C+0]=m[C+0]^N,w[C+1]=m[C+1]^F,w[C+2]=m[C+2]^H,w[C+3]=m[C+3]^z,M=E[C++],D=E[C++],L=E[C++],U=E[C++]}let K=At*Math.floor(m.length/r8);if(K<s){({s0:M,s1:D,s2:L,s3:U}=Si(u,M,D,L,U));let C=new Uint32Array([M,D,L,U]);wt(C);let N=I6(C);for(let F=K,H=0;F<s;F++,H++)a[F]=n[F]^N[H];Rt(N)}return wt(w),Rt(...l),a}return{encrypt:(n,o)=>i(n,!0,o),decrypt:(n,o)=>i(n,!1,o)}});bie=zo({blockSize:16,nonceLength:12,tagLength:16,varSizeNonce:!0},function(t,r,i){if(r.length<8)throw new Error("aes/gcm: invalid nonce length");let n=16;function o(s,u,c){let l=BM($4,!1,s,c,i);for(let m=0;m<u.length;m++)l[m]^=u[m];return l}function a(){let s=io(t),u=a1.slice(),c=a1.slice();if(ml(s,!1,c,c,u),r.length===12)c.set(r);else{let m=a1.slice();gl(m).setBigUint64(8,BigInt(r.length*8),!1);let E=$4.create(u).update(r).update(m);E.digestInto(c),E.destroy()}let l=ml(s,!1,c,a1);return{xk:s,authKey:u,counter:c,tagMask:l}}return{encrypt(s){let{xk:u,authKey:c,counter:l,tagMask:m}=a(),w=new Uint8Array(s.length+n),E=[u,c,l,m];Yr(s)||E.push(s=tr(s)),ml(u,!1,l,s,w.subarray(0,s.length));let P=o(c,m,w.subarray(0,w.length-n));return E.push(P),w.set(P,s.length),Rt(...E),w},decrypt(s){let{xk:u,authKey:c,counter:l,tagMask:m}=a(),w=[u,c,m,l];Yr(s)||w.push(s=tr(s));let E=s.subarray(0,-n),P=s.subarray(-n),M=o(c,m,E);if(w.push(M),!i1(M,P))throw Rt(...w),new Error("aes/gcm: invalid ghash tag");let D=ml(u,!1,l,E);return Rt(...w),D}}}),yl=(e,t,r)=>i=>{if(!Number.isSafeInteger(i)||t>i||i>r){let n="["+t+".."+r+"]";throw new Error(""+e+": expected value in range "+n+", got "+i)}},_ie=zo({blockSize:16,nonceLength:12,tagLength:16,varSizeNonce:!0},function(t,r,i){let o=yl("AAD",0,68719476736),a=yl("plaintext",0,2**36),s=yl("nonce",12,12),u=yl("ciphertext",16,2**36+16);ut(t),P6(t),s(r.length),i!==void 0&&o(i.length);function c(){let w=io(t),E=new Uint8Array(t.length),P=new Uint8Array(16),M=[w,E],D=r;(!Sn||!Yr(D))&&M.push(D=tr(D));let L=mt(D);wt(L);let U=0,K=L[0],C=L[1],N=L[2],F=0;for(let z of[P,E].map(mt)){let V=mt(z);for(let B=0;B<V.length;B+=2){let{s0:g,s1:I}=Si(w,U,K,C,N);V[B+0]=g,V[B+1]=I,U=++F}wt(V)}let H={authKey:P,encKey:io(E)};return Rt(...M),H}function l(w,E,P){let M=BM(wM,!0,E,P,i);for(let N=0;N<12;N++)M[N]^=r[N];M[15]&=127;let D=mt(M);wt(D);let L=D[0],U=D[1],K=D[2],C=D[3];return{s0:L,s1:U,s2:K,s3:C}=Si(w,L,U,K,C),D[0]=L,D[1]=U,D[2]=K,D[3]=C,wt(D),M}function m(w,E,P){let M=tr(E);M[15]|=128;let D=ml(w,!0,M,P);return Rt(M),D}return{encrypt(w){a(w.length);let{encKey:E,authKey:P}=c(),M=l(E,P,w),D=[E,P,M];Yr(w)||D.push(w=tr(w));let L=new Uint8Array(w.length+16);return L.set(M,w.length),L.set(m(E,M,w)),Rt(...D),L},decrypt(w){u(w.length);let E=w.subarray(-16),{encKey:P,authKey:M}=c(),D=[P,M];Yr(w)||D.push(w=tr(w));let L=m(P,E,w.subarray(0,-16)),U=l(P,M,L);if(D.push(U),!i1(E,U))throw Rt(...D),new Error("invalid polyval tag");return Rt(...D),L}}});A6={encrypt(e,t){if(t.length>=2**32)throw new Error("plaintext should be less than 4gb");let r=io(e);if(t.length===16)f1(r,t);else{let i=mt(t);wt(i);let n=i[0],o=i[1];for(let a=0,s=1;a<6;a++)for(let u=2;u<i.length;u+=2,s++){let{s0:c,s1:l,s2:m,s3:w}=Si(r,n,o,i[u],i[u+1]);n=c,o=l^_f(s),i[u]=m,i[u+1]=w}i[0]=n,i[1]=o,wt(i)}r.fill(0)},decrypt(e,t){if(t.length-8>=2**32)throw new Error("ciphertext should be less than 4gb");let r=T6(e),i=t.length/8-1;if(i===1)CM(r,t);else{let n=mt(t);wt(n);let o=n[0],a=n[1];for(let s=0,u=i*6;s<6;s++)for(let c=i*2;c>=1;c-=2,u--){a^=_f(u);let{s0:l,s1:m,s2:w,s3:E}=l1(r,o,a,n[c],n[c+1]);o=l,a=m,n[c]=w,n[c+1]=E}n[0]=o,n[1]=a,wt(n)}r.fill(0)}},xM=new Uint8Array(8).fill(166),wie=zo({blockSize:8},e=>({encrypt(t){if(!t.length||t.length%8!==0)throw new Error("invalid plaintext length");if(t.length===8)throw new Error("8-byte keys not allowed in AESKW, use AESKWP instead");let r=G4(xM,t);return A6.encrypt(e,r),r},decrypt(t){if(t.length%8!==0||t.length<24)throw new Error("invalid ciphertext length");let r=tr(t);if(A6.decrypt(e,r),!i1(r.subarray(0,8),xM))throw new Error("integrity check failed");return r.subarray(0,8).fill(0),r.subarray(8)}})),EM=2790873510,Sie=zo({blockSize:8},e=>({encrypt(t){if(!t.length)throw new Error("invalid plaintext length");let r=Math.ceil(t.length/8)*8,i=new Uint8Array(8+r);i.set(t,8);let n=mt(i);return n[0]=ft(EM),n[1]=ft(_f(t.length)),A6.encrypt(e,i),i},decrypt(t){if(t.length<16)throw new Error("invalid ciphertext length");let r=tr(t),i=mt(r);A6.decrypt(e,r);let n=_f(ft(i[1]))>>>0,o=Math.ceil(n/8)*8;if(ft(i[0])!==EM||r.length-8!==o)throw new Error("integrity check failed");for(let a=n;a<o;a++)if(r[8+a]!==0)throw new Error("integrity check failed");return r.subarray(0,8).fill(0),r.subarray(8,8+n)}})),Q4=class{constructor(t,r,i){Z(this,"blockLen");Z(this,"key");Z(this,"nonce");Z(this,"state");Z(this,"reseedCnt");this.blockLen=bl.blockSize;let n=t/8,o=16;this.state=new Uint8Array(n+o),this.key=this.state.subarray(0,n),this.nonce=this.state.subarray(n,n+o),this.reseedCnt=1,u1(this.nonce,!1,1),this.addEntropy(r,i)}update(t){if(bl(this.key,this.nonce).encrypt(new Uint8Array(this.state.length),this.state),t){ut(t);for(let r=0;r<t.length;r++)this.state[r]^=t[r]}u1(this.nonce,!1,1)}addEntropy(t,r){ut(t,this.state.length,"seed");let i=t.slice();if(r){if(ut(r),r.length>i.length)throw new Error("info length is too big");for(let n=0;n<r.length;n++)i[n]^=r[n]}this.update(i),i.fill(0),this.reseedCnt=1}randomBytes(t,r){if(E6(t),t>2**16)throw new Error("requested output is too big");if(this.reseedCnt>2**48)throw new Error("entropy exhausted");if(r){if(ut(r),r.length>this.state.length)throw new Error("info length is too big");this.update(r)}let i=new Uint8Array(t);return bl(this.key,this.nonce).encrypt(i,i),u1(this.nonce,!1,Math.ceil(t/this.blockLen)),this.update(r),this.reseedCnt++,i}clean(){this.state.fill(0),this.reseedCnt=0}},NM=e=>(t,r=void 0)=>new Q4(e,t,r),xie=NM(128),Eie=NM(256);e8=class{constructor(t){Z(this,"blockLen",At);Z(this,"outputLen",At);Z(this,"buffer");Z(this,"pos");Z(this,"finished");Z(this,"destroyed");Z(this,"k1");Z(this,"k2");Z(this,"x");Z(this,"xk");ut(t),P6(t),this.xk=io(t),this.buffer=new Uint8Array(At),this.pos=0,this.finished=!1,this.destroyed=!1,this.x=new Uint8Array(At);let r=new Uint8Array(At);f1(this.xk,r),this.k1=c1(r),this.k2=c1(new Uint8Array(this.k1))}process(t){Sf(this.x,t),f1(this.xk,this.x)}update(t){if(this.destroyed)throw new Error("Hash instance has been destroyed");if(this.finished)throw new Error("Hash#digest() has already been called");ut(t);let r=0;if(this.pos){let i=Math.min(At-this.pos,t.length);this.buffer.set(t.subarray(0,i),this.pos),this.pos+=i,r=i,this.pos===At&&r<t.length&&(this.process(this.buffer),this.pos=0)}for(;r+At<t.length;)this.process(t.subarray(r,r+At)),r+=At;return r<t.length&&(this.buffer.set(t.subarray(r),0),this.pos=t.length-r),this}digestInto(t){if(this.destroyed)throw new Error("Hash instance has been destroyed");if(this.finished)throw new Error("Hash#digest() has already been called");t1(t,this,!0),this.finished=!0;let r=t.subarray(0,this.outputLen),i=new Uint8Array(At);this.pos===At?(i.set(this.buffer),Sf(i,this.k1)):(i.set(this.buffer.subarray(0,this.pos)),i[this.pos]=128,Sf(i,this.k2)),r.set(this.x),Sf(r,i),f1(this.xk,r),Rt(i)}digest(){let{buffer:t,outputLen:r}=this;this.digestInto(t);let i=t.slice(0,r);return this.destroy(),i}destroy(){let{buffer:t,destroyed:r,x:i,xk:n,k1:o,k2:a}=this;r||(this.destroyed=!0,Rt(t,i,n,o,a))}},s1=n1(16,e=>new e8(e));Iie=()=>{throw new Error('"siv" from v1 is now "gcmsiv"')},Oie=zo({blockSize:16,tagLength:16},function(t,...r){let i=yl("plaintext",0,5444517870735016e24),n=yl("ciphertext",16,2**132+16);if(r.length>126)throw new Error('"AAD" number of elements must be less than or equal to 126');if(r.forEach(s=>ut(s)),ut(t),![32,48,64].includes(t.length))throw new Error('"aes key" expected Uint8Array of length 32/48/64, got length='+t.length);let o=t.subarray(0,t.length/2),a=t.subarray(t.length/2);return{encrypt(s){i(s.length);let u=t8(o,[...r,s]),c=Uint8Array.from(u);c[8]&=127,c[12]&=127;let l=bl(a,c).encrypt(s);return G4(u,l)},decrypt(s){n(s.length);let u=s.subarray(0,At),c=s.subarray(At),l=Uint8Array.from(u);l[8]&=127,l[12]&=127;let m=bl(a,l).decrypt(c),w=t8(o,[...r,m]);if(i1(w,u))return m;throw new Error("invalid siv tag")}}}),Aie=Object.freeze({expandKeyLE:io,expandKeyDecLE:T6,encrypt:Si,decrypt:l1,encryptBlock:f1,decryptBlock:CM,ctrCounter:AM,ctr32:ml,dbl:c1,xorBlock:Sf,xorend:DM,s2v:t8}),Pie=Object.freeze({incBytes:u1})});var FM=k((W5e,UM)=>{"use strict";v();var{secp256k1:LM}=(d0(),ho(h0)),{sha512:Tie,sha256:kie}=(sp(),ho(Vm)),{hmac:Rie}=(yp(),ho(sy)),{cbc:qM}=(a8(),ho(o8)),u8=ke(),Bie=u8.PublicKey,qs=u8.util.preconditions,Mie=u8.crypto.Random;function h1(e){return h.Buffer.from(e.buffer,e.byteOffset,e.byteLength)}function s8(e,t){return h1(Rie(kie,e,t))}function Cie(e,t){if(e.length!==t.length)return!1;for(var r=0,i=0;i<e.length;i++)r|=e[i]^t[i];return r===0}var k6=function(){};k6.encrypt=function(e,t,r){qs.checkArgument(e),qs.checkArgument(t),qs.checkArgument(r),r=r||Mie.getRandomBuffer(128/8);var i=qM(Uint8Array.from(t),Uint8Array.from(r)).encrypt(Uint8Array.from(e));return h.Buffer.concat([h.Buffer.from(r),h1(i)])};k6.decrypt=function(e,t){qs.checkArgument(e),qs.checkArgument(t);var r=e.slice(0,128/8),i=e.slice(128/8),n=qM(Uint8Array.from(t),Uint8Array.from(r)).decrypt(Uint8Array.from(i));return h1(n)};var _l=function e(t){if(!(this instanceof e))return new e(t);this.opts=t||{}};_l.prototype.privateKey=function(e){return qs.checkArgument(e,"no private key provided"),this._privateKey=e||null,this};_l.prototype.publicKey=function(e){return qs.checkArgument(e,"no public key provided"),this._publicKey=e||null,this};var R6=function(e,t){var r="_"+e;Object.defineProperty(_l.prototype,e,{configurable:!1,enumerable:!0,get:function(){var i=this[r];return i||(i=this[r]=t.apply(this)),i}})};R6("Rbuf",function(){var e=this._privateKey.bn.toBuffer({size:32});return h1(LM.getPublicKey(Uint8Array.from(e),!0))});R6("kEkM",function(){var e=this._privateKey.bn.toBuffer({size:32}),t=this._publicKey.toDER(),r=LM.getSharedSecret(Uint8Array.from(e),Uint8Array.from(t),!0),i=r.slice(1);return h1(Tie(i))});R6("kE",function(){return this.kEkM.slice(0,32)});R6("kM",function(){return this.kEkM.slice(32,64)});_l.prototype.encrypt=function(e,t){h.Buffer.isBuffer(e)||(e=h.Buffer.from(e)),t===void 0&&(t=s8(this._privateKey.toBuffer(),e).slice(0,16));var r=k6.encrypt(e,this.kE,t),i=s8(this.kM,r);return this.opts.shortTag&&(i=i.slice(0,4)),this.opts.noKey?h.Buffer.concat([r,i]):h.Buffer.concat([this.Rbuf,r,i])};_l.prototype.decrypt=function(e){qs.checkArgument(e);var t=0,r=this.opts.shortTag?4:32;if(!this.opts.noKey){var i;switch(e[0]){case 4:i=e.slice(0,65);break;case 3:case 2:i=e.slice(0,33);break;default:throw new Error("Invalid type: "+e[0])}this._publicKey=Bie.fromDER(i),t+=i.length}var n=e.slice(t,e.length-r),o=e.slice(e.length-r,e.length),a=s8(this.kM,n);if(this.opts.shortTag&&(a=a.slice(0,4)),!Cie(o,a))throw new Error("Invalid checksum");return k6.decrypt(n,this.kE)};UM.exports=_l});var jM=k(($5e,HM)=>{"use strict";v();var Nie={name:"ECIES",message:"Internal Error on bsv-ecies Module {0}",errors:[{name:"DecryptionError",message:"Invalid Message: {0}"},{name:"UnsupportAlgorithm",message:"Unsupport Algorithm: {0}"}]};HM.exports=ke().errors.extend(Nie)});var WM=k((J5e,ZM)=>{"use strict";v();var M6=ke(),f8=M6.PublicKey,zM=M6.PrivateKey,zi=M6.util.preconditions,Die=FM(),B6=jM(),{secp256k1:KM}=(d0(),ho(h0)),{sha512:Lie,sha256:qie}=(sp(),ho(Vm)),{hmac:Uie}=(yp(),ho(sy)),{cbc:VM}=(a8(),ho(o8));function d1(e){return h.Buffer.from(e.buffer,e.byteOffset,e.byteLength)}function GM(e,t){return d1(Uie(qie,t,e))}var C6=function(){};C6.encrypt=function(e,t,r){return zi.checkArgument(e),zi.checkArgument(t),zi.checkArgument(r),zi.checkArgument(t.length===16,"keybuf length must be 16"),zi.checkArgument(r.length===16,"ivbuf length must be 16"),d1(VM(Uint8Array.from(t),Uint8Array.from(r)).encrypt(Uint8Array.from(e)))};C6.decrypt=function(e,t,r){return zi.checkArgument(e),zi.checkArgument(t),zi.checkArgument(r),zi.checkArgument(t.length===16,"keybuf length must be 16"),zi.checkArgument(r.length===16,"ivbuf length must be 16"),d1(VM(Uint8Array.from(t),Uint8Array.from(r)).decrypt(Uint8Array.from(e)))};var xf=function e(t,r="BIE1"){if(r!=="BIE1")throw new B6.UnsupportAlgorithm(r);if(!(this instanceof e))return new e(t,r);this._privateKey=new M6.PrivateKey,this.opts=t||{},this.opts.ephemeralKey=!0};xf.prototype.privateKey=function(e){return zi.checkArgument(zM.isValid(e),"no private key provided"),this._privateKey=zM(e.toHex())||null,this.opts.ephemeralKey=!1,this};xf.prototype.publicKey=function(e){return zi.checkArgument(f8.isValid(e),"no public key provided"),this._publicKey=f8(e.toString())||null,this._publicKey!=null&&(this.opts.fixedPublicKey=!0),this};var p1=function(e,t){var r="_"+e;Object.defineProperty(xf.prototype,e,{configurable:!1,enumerable:!0,get:function(){var i=this[r];return i=this[r]=t.apply(this),i}})};p1("Rbuf",function(){var e=this._privateKey.bn.toBuffer({size:32});return d1(KM.getPublicKey(Uint8Array.from(e),!0))});p1("ivkEkM",function(){var e=this._privateKey.bn.toBuffer({size:32}),t=this._publicKey.toDER(),r=KM.getSharedSecret(Uint8Array.from(e),Uint8Array.from(t),!0);return d1(Lie(r))});p1("iv",function(){return this.ivkEkM.slice(0,16)});p1("kE",function(){return this.ivkEkM.slice(16,32)});p1("kM",function(){return this.ivkEkM.slice(32,64)});xf.prototype.encrypt=function(e){h.Buffer.isBuffer(e)||(e=h.Buffer.from(e));var t=C6.encrypt(e,this.kE,this.iv),r,i=h.Buffer.from("BIE1");this.opts.noKey&&!this.opts.ephemeralKey?r=h.Buffer.concat([i,t]):r=h.Buffer.concat([i,this.Rbuf,t]);var n=GM(r,this.kM);return this.opts.shortTag&&(n=n.slice(0,4)),h.Buffer.concat([r,n])};xf.prototype.decrypt=function(e){zi.checkArgument(h.Buffer.isBuffer(e),"ciphetext must be a buffer");var t=this.opts.shortTag?4:32,r=4,i=e.slice(0,4);if(!i.equals(h.Buffer.from("BIE1")))throw new B6.DecryptionError("Invalid Magic");if(!this.opts.noKey){var n=e.slice(4,37);this.opts.fixedPublicKey?console.log('Notice: Overriding PublicKey in message. Consider use "noKey" option if you are not sending message to electrum and do not want to use ephemeral key'):this._publicKey=f8.fromDER(n),r=37}var o=e.slice(r,e.length-t),a=e.slice(e.length-t,e.length),s=GM(e.slice(0,e.length-t),this.kM);if(this.opts.shortTag&&(s=s.slice(0,4)),a.length!==s.length)throw new B6.DecryptionError("Invalid checksum");for(var u=0,c=0;c<s.length;c++)u|=a[c]^s[c];if(u!==0)throw new B6.DecryptionError("Invalid checksum");return C6.decrypt(o,this.kE,this.iv)};xf.bitcoreECIES=Die;ZM.exports=xf});var $M=k((ege,YM)=>{v();YM.exports=WM()});var N6=k((rge,JM)=>{"use strict";v();function Go(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function XM(e,t){for(var r="",i=0,n=-1,o=0,a,s=0;s<=e.length;++s){if(s<e.length)a=e.charCodeAt(s);else{if(a===47)break;a=47}if(a===47){if(!(n===s-1||o===1))if(n!==s-1&&o===2){if(r.length<2||i!==2||r.charCodeAt(r.length-1)!==46||r.charCodeAt(r.length-2)!==46){if(r.length>2){var u=r.lastIndexOf("/");if(u!==r.length-1){u===-1?(r="",i=0):(r=r.slice(0,u),i=r.length-1-r.lastIndexOf("/")),n=s,o=0;continue}}else if(r.length===2||r.length===1){r="",i=0,n=s,o=0;continue}}t&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+e.slice(n+1,s):r=e.slice(n+1,s),i=s-n-1;n=s,o=0}else a===46&&o!==-1?++o:o=-1}return r}function Fie(e,t){var r=t.dir||t.root,i=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+i:r+e+i:i}var wl={resolve:function(){for(var t="",r=!1,i,n=arguments.length-1;n>=-1&&!r;n--){var o;n>=0?o=arguments[n]:(i===void 0&&(i=A.default.cwd()),o=i),Go(o),o.length!==0&&(t=o+"/"+t,r=o.charCodeAt(0)===47)}return t=XM(t,!r),r?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(t){if(Go(t),t.length===0)return".";var r=t.charCodeAt(0)===47,i=t.charCodeAt(t.length-1)===47;return t=XM(t,!r),t.length===0&&!r&&(t="."),t.length>0&&i&&(t+="/"),r?"/"+t:t},isAbsolute:function(t){return Go(t),t.length>0&&t.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var t,r=0;r<arguments.length;++r){var i=arguments[r];Go(i),i.length>0&&(t===void 0?t=i:t+="/"+i)}return t===void 0?".":wl.normalize(t)},relative:function(t,r){if(Go(t),Go(r),t===r||(t=wl.resolve(t),r=wl.resolve(r),t===r))return"";for(var i=1;i<t.length&&t.charCodeAt(i)===47;++i);for(var n=t.length,o=n-i,a=1;a<r.length&&r.charCodeAt(a)===47;++a);for(var s=r.length,u=s-a,c=o<u?o:u,l=-1,m=0;m<=c;++m){if(m===c){if(u>c){if(r.charCodeAt(a+m)===47)return r.slice(a+m+1);if(m===0)return r.slice(a+m)}else o>c&&(t.charCodeAt(i+m)===47?l=m:m===0&&(l=0));break}var w=t.charCodeAt(i+m),E=r.charCodeAt(a+m);if(w!==E)break;w===47&&(l=m)}var P="";for(m=i+l+1;m<=n;++m)(m===n||t.charCodeAt(m)===47)&&(P.length===0?P+="..":P+="/..");return P.length>0?P+r.slice(a+l):(a+=l,r.charCodeAt(a)===47&&++a,r.slice(a))},_makeLong:function(t){return t},dirname:function(t){if(Go(t),t.length===0)return".";for(var r=t.charCodeAt(0),i=r===47,n=-1,o=!0,a=t.length-1;a>=1;--a)if(r=t.charCodeAt(a),r===47){if(!o){n=a;break}}else o=!1;return n===-1?i?"/":".":i&&n===1?"//":t.slice(0,n)},basename:function(t,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');Go(t);var i=0,n=-1,o=!0,a;if(r!==void 0&&r.length>0&&r.length<=t.length){if(r.length===t.length&&r===t)return"";var s=r.length-1,u=-1;for(a=t.length-1;a>=0;--a){var c=t.charCodeAt(a);if(c===47){if(!o){i=a+1;break}}else u===-1&&(o=!1,u=a+1),s>=0&&(c===r.charCodeAt(s)?--s===-1&&(n=a):(s=-1,n=u))}return i===n?n=u:n===-1&&(n=t.length),t.slice(i,n)}else{for(a=t.length-1;a>=0;--a)if(t.charCodeAt(a)===47){if(!o){i=a+1;break}}else n===-1&&(o=!1,n=a+1);return n===-1?"":t.slice(i,n)}},extname:function(t){Go(t);for(var r=-1,i=0,n=-1,o=!0,a=0,s=t.length-1;s>=0;--s){var u=t.charCodeAt(s);if(u===47){if(!o){i=s+1;break}continue}n===-1&&(o=!1,n=s+1),u===46?r===-1?r=s:a!==1&&(a=1):r!==-1&&(a=-1)}return r===-1||n===-1||a===0||a===1&&r===n-1&&r===i+1?"":t.slice(r,n)},format:function(t){if(t===null||typeof t!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return Fie("/",t)},parse:function(t){Go(t);var r={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return r;var i=t.charCodeAt(0),n=i===47,o;n?(r.root="/",o=1):o=0;for(var a=-1,s=0,u=-1,c=!0,l=t.length-1,m=0;l>=o;--l){if(i=t.charCodeAt(l),i===47){if(!c){s=l+1;break}continue}u===-1&&(c=!1,u=l+1),i===46?a===-1?a=l:m!==1&&(m=1):a!==-1&&(m=-1)}return a===-1||u===-1||m===0||m===1&&a===u-1&&a===s+1?u!==-1&&(s===0&&n?r.base=r.name=t.slice(1,u):r.base=r.name=t.slice(s,u)):(s===0&&n?(r.name=t.slice(1,a),r.base=t.slice(1,u)):(r.name=t.slice(s,a),r.base=t.slice(s,u)),r.ext=t.slice(a,u)),s>0?r.dir=t.slice(0,s-1):n&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};wl.posix=wl;JM.exports=wl});var tC=k((nge,eC)=>{"use strict";v();var Yt=ke(),QM=N6(),Za;try{Za=fs()}catch{Za=null}var Hie=function(){var e=typeof A.default<"u"&&A.default.env&&A.default.env.BSV_DEBUG||typeof window<"u"&&window.BSV_DEBUG;e&&console.log.apply(console,arguments)};function Mi(e,t){if(!(this instanceof Mi))return new Mi(e,t);this.privateKey=e,this.publicKey=e.publicKey,this.address=e.toAddress(),t=t||{},this.storageDir=t.storageDir||(typeof A.default<"u"?QM.join(A.default.cwd(),".bsv-covenants"):".bsv-covenants"),this.covenantUtxoPath=QM.join(this.storageDir,"covenant_utxos.json"),this.sighashType=Yt.crypto.Signature.SIGHASH_ALL|Yt.crypto.Signature.SIGHASH_FORKID,this.allowNonEnforcing=t.allowNonEnforcing===!0,Za&&this._ensureStorageDir()}Mi.prototype.createFromP2PKH=function(e){if(!this.allowNonEnforcing)throw new Error("SmartContract.Covenant builds a NON-ENFORCING script that reduces to plain P2PK \u2014 it does not constrain the spend. Use SmartContract.PushTx.valueCovenant (output binding) or SmartContract.Token / perpetualCovenant (stateful covenants) for real covenants. To use this demo anyway, construct with { allowNonEnforcing: true }.");e.script||(e.script=Mi.reconstructP2pkhScript(this.address));var t=new Yt.Transaction().from({txId:e.txid,outputIndex:e.vout,script:e.script,satoshis:e.satoshis}).to(this.address,e.satoshis-1e3),r=Yt.Script.fromHex(e.script),i=Yt.Transaction.sighash.sighashPreimage(t,this.sighashType,0,r,new Yt.crypto.BN(e.satoshis)),n=Yt.crypto.Hash.sha256sha256(i),o=new Yt.Script().add("OP_DUP").add("OP_HASH256").add(n).add("OP_EQUALVERIFY").add("OP_DROP").add(this.publicKey.toBuffer()).add("OP_CHECKSIG");t.outputs[0].setScript(o),t.sign(this.privateKey);var a={txid:t.id,vout:0,satoshis:e.satoshis-1e3,script:o.toHex(),scriptPubKey:o.toHex(),preimageHash:n.toString("hex"),originalPreimage:i.toString("hex"),status:"local",createdAt:new Date().toISOString(),type:"preimage_covenant"};return{transaction:t,covenantUtxo:a}};Mi.prototype.createSpendingTx=function(e,t,r){var i=t||this.address,n=r||e.satoshis-500,o=new Yt.Transaction;o.addInput(new Yt.Transaction.Input({prevTxId:e.txid,outputIndex:e.vout,script:Yt.Script.empty()}),Yt.Script.fromHex(e.script),e.satoshis),o.to(i,n);var a=Yt.Script.fromHex(e.script),s=Yt.Transaction.sighash.sign(o,this.privateKey,this.sighashType,0,a,new Yt.crypto.BN(e.satoshis)),u=h.Buffer.concat([s.toDER(),h.Buffer.from([this.sighashType])]),c=h.Buffer.from(e.originalPreimage,"hex"),l=new Yt.Script().add(u).add(c);return o.inputs[0].setScript(l),o};Mi.prototype.validate=function(e,t){var r=new Yt.Script.Interpreter,i=Yt.Script.Interpreter.SCRIPT_VERIFY_P2SH|Yt.Script.Interpreter.SCRIPT_VERIFY_STRICTENC|Yt.Script.Interpreter.SCRIPT_VERIFY_DERSIG|Yt.Script.Interpreter.SCRIPT_VERIFY_LOW_S|Yt.Script.Interpreter.SCRIPT_ENABLE_SIGHASH_FORKID,n=e.inputs[0].script,o=Yt.Script.fromHex(t.script),a=r.verify(n,o,e,0,i,new Yt.crypto.BN(t.satoshis));return{valid:a,error:a?null:r.errstr}};Mi.prototype.save=function(e){if(!Za)return Hie("File system operations not available in browser environment"),e;var t=this.list();return t.push(e),Za.writeFileSync(this.covenantUtxoPath,JSON.stringify(t,null,2)),e};Mi.prototype.load=function(e){var t=this.list();if(e){var r=t.find(function(i){return i.txid===e});if(!r)throw new Error("Covenant UTXO with TXID "+e+" not found");return r}else{var r=t.find(function(n){return n.type==="preimage_covenant"});if(!r)throw new Error("No preimage covenant UTXO found");return r}};Mi.prototype.list=function(){return Za.existsSync(this.covenantUtxoPath)?JSON.parse(Za.readFileSync(this.covenantUtxoPath,"utf8")):[]};Mi.prototype.getPortfolio=function(){var e=this.list(),t={total:e.length,totalValue:e.reduce(function(r,i){return r+i.satoshis},0),byStatus:{},recent:e.slice(-5)};return e.forEach(function(r){var i=r.status||"local";t.byStatus[i]||(t.byStatus[i]={count:0,value:0}),t.byStatus[i].count++,t.byStatus[i].value+=r.satoshis}),t};Mi.prototype.completeFlow=function(e,t){var r=this.createFromP2PKH(e),i=this.save(r.covenantUtxo);t&&t(r.transaction,"creation");var n=this.createSpendingTx(i),o=this.validate(n,i);return t&&o.valid&&t(n,"spending"),{creationTx:r.transaction,spendingTx:n,covenantUtxo:i,validation:o,success:o.valid}};Mi.prototype._ensureStorageDir=function(){Za.existsSync(this.storageDir)||Za.mkdirSync(this.storageDir,{recursive:!0})};Mi.reconstructP2pkhScript=function(e){return Yt.Script.buildPublicKeyHashOut(e).toHex()};eC.exports=Mi});var Zo=k((sge,rC)=>{"use strict";v();var Sl=ke(),age=_r();function Ie(e,t){if(!(this instanceof Ie))return new Ie(e,t);this.preimage=h.Buffer.isBuffer(e)?e:h.Buffer.from(e,"hex"),this.options=t||{},this.strategy=this.options.strategy||"DYNAMIC",this.fields=null,this.sighashInfo=null,this.options.deferExtraction||this._extractFields()}Ie.LEFT_FIXED_LENGTH=104;Ie.RIGHT_FIXED_LENGTH=52;Ie.MIN_PREIMAGE_LENGTH=Ie.LEFT_FIXED_LENGTH+1+Ie.RIGHT_FIXED_LENGTH;Ie.prototype.extract=function(e){return this.strategy=e||this.strategy,this._extractFields(),this.fields};Ie.prototype.getSighashInfo=function(){return this.fields||this._extractFields(),this.sighashInfo};Ie.prototype.getField=function(e){return this.fields||this._extractFields(),this.fields[e]};Ie.prototype.extractField=function(e,t){t=t||{},this.fields||this._extractFields();var r=this._parsePreimageStructure(),i=this._generateBidirectionalASM(e,r,t.includeComments),n=this._extractSpecificField(e,r),o=this._interpretField(e,n,r);return{field:e,value:n?n.toString("hex"):null,buffer:n,asm:i,interpretation:o,strategy:this._getExtractionStrategy(e),structure:r._structure}};Ie.prototype.generateASM=function(e,t){var r=this._parsePreimageStructure();return this._generateBidirectionalASM(e,r,t)};Ie.prototype.extractFields=function(e){var t={};return e.forEach(function(r){t[r]=this.extractField(r)}.bind(this)),t};Ie.prototype.validate=function(){var e=[],t=[];if(this.preimage.length<Ie.MIN_PREIMAGE_LENGTH)return e.push("Preimage too short: "+this.preimage.length+" bytes (BIP-143 preimage requires at least "+Ie.MIN_PREIMAGE_LENGTH+")"),{valid:!1,errors:e,warnings:t,sighashInfo:this.sighashInfo};this.fields||this._extractFields();var r=["version","hashPrevouts","hashSequence","outpoint","scriptCode","amount","sequence","hashOutputs","locktime","sighash"];return r.forEach(function(i){this.fields[i]||e.push("Missing required field: "+i)}.bind(this)),this.sighashInfo.hasZeroHashes&&t.push("Zero hashes detected - check SIGHASH flags: "+this.sighashInfo.zeroFields.join(", ")),{valid:e.length===0,errors:e,warnings:t,sighashInfo:this.sighashInfo}};Ie.prototype.toObject=function(){return this.fields||this._extractFields(),{preimage:this.preimage.toString("hex"),length:this.preimage.length,strategy:this.strategy,fields:{version:this.fields.version?this.fields.version.toString("hex"):null,hashPrevouts:this.fields.hashPrevouts?this.fields.hashPrevouts.toString("hex"):null,hashSequence:this.fields.hashSequence?this.fields.hashSequence.toString("hex"):null,outpoint:this.fields.outpoint?this.fields.outpoint.toString("hex"):null,scriptCode:this.fields.scriptCode?this.fields.scriptCode.toString("hex"):null,scriptCodeLength:this.fields.scriptCodeLength,amount:this.fields.amount?this.fields.amount.toString("hex"):null,sequence:this.fields.sequence?this.fields.sequence.toString("hex"):null,hashOutputs:this.fields.hashOutputs?this.fields.hashOutputs.toString("hex"):null,locktime:this.fields.locktime?this.fields.locktime.toString("hex"):null,sighash:this.fields.sighash?this.fields.sighash.toString("hex"):null},sighashInfo:this.sighashInfo,validation:this.validate()}};Ie.prototype._extractFields=function(){if(this.fields={},this.sighashInfo={flag:null,hasZeroHashes:!1,zeroFields:[],warnings:[]},this.preimage.length<Ie.MIN_PREIMAGE_LENGTH)throw new Error("Preimage too short: "+this.preimage.length+" bytes (BIP-143 preimage requires at least "+Ie.MIN_PREIMAGE_LENGTH+")");try{this.strategy==="LEFT"||this.strategy==="DYNAMIC"?this._extractFromLeft():this.strategy==="RIGHT"&&this._extractFromRight(),this._analyzeSighash()}catch(e){if(this.strategy==="DYNAMIC")try{this.strategy="RIGHT",this._extractFromRight(),this._analyzeSighash()}catch{throw new Error("Failed to extract preimage fields with any strategy: "+e.message)}else throw e}};Ie.prototype._extractFromLeft=function(){var e=0;this.fields.version=this.preimage.slice(e,e+4),e+=4,this.fields.hashPrevouts=this.preimage.slice(e,e+32),e+=32,this.fields.hashSequence=this.preimage.slice(e,e+32),e+=32,this.fields.outpoint=this.preimage.slice(e,e+36),e+=36;var t=Ie.decodeCompactSize(this.preimage,e);this.fields.scriptCodeLength=t.value,e=t.nextOffset,this.fields.scriptCode=this.preimage.slice(e,e+this.fields.scriptCodeLength),e+=this.fields.scriptCodeLength,this.fields.amount=this.preimage.slice(e,e+8),e+=8,this.fields.sequence=this.preimage.slice(e,e+4),e+=4,this.fields.hashOutputs=this.preimage.slice(e,e+32),e+=32,this.fields.locktime=this.preimage.slice(e,e+4),e+=4,this.fields.sighash=this.preimage.slice(e,e+4)};Ie.prototype._extractFromRight=function(){var e=this.preimage.length,t=e;t-=4,this.fields.sighash=this.preimage.slice(t,t+4),t-=4,this.fields.locktime=this.preimage.slice(t,t+4),t-=32,this.fields.hashOutputs=this.preimage.slice(t,t+32),t-=4,this.fields.sequence=this.preimage.slice(t,t+4),t-=8,this.fields.amount=this.preimage.slice(t,t+8);var r=104,i=Ie.decodeCompactSize(this.preimage,r);this.fields.scriptCodeLength=i.value,this.fields.scriptCode=this.preimage.slice(i.nextOffset,i.nextOffset+this.fields.scriptCodeLength),this.fields.version=this.preimage.slice(0,4),this.fields.hashPrevouts=this.preimage.slice(4,36),this.fields.hashSequence=this.preimage.slice(36,68),this.fields.outpoint=this.preimage.slice(68,104)};Ie.prototype._analyzeSighash=function(){if(this.fields.sighash){var e=this.fields.sighash.readUInt32LE(0);this.sighashInfo.flag=e;var t=e&31,r=(e&128)!==0,i=(e&64)!==0,n=h.Buffer.alloc(32);r&&this.fields.hashPrevouts.equals(n)&&(this.sighashInfo.hasZeroHashes=!0,this.sighashInfo.zeroFields.push("hashPrevouts"),this.sighashInfo.warnings.push("ANYONECANPAY flag detected - hashPrevouts is zero")),t===2&&this.fields.hashSequence.equals(n)&&(this.sighashInfo.hasZeroHashes=!0,this.sighashInfo.zeroFields.push("hashSequence"),this.sighashInfo.warnings.push("SIGHASH_NONE flag detected - hashSequence is zero")),(t===2||t===3)&&this.fields.hashOutputs.equals(n)&&(this.sighashInfo.hasZeroHashes=!0,this.sighashInfo.zeroFields.push("hashOutputs"),this.sighashInfo.warnings.push("SIGHASH_NONE/SINGLE flag detected - hashOutputs is zero"));var o=[];t===1?o.push("ALL"):t===2?o.push("NONE"):t===3&&o.push("SINGLE"),r&&o.push("ANYONECANPAY"),i&&o.push("FORKID"),this.sighashInfo.flagName=o.join(" | ")}};Ie.prototype._parsePreimageStructure=function(){for(var e=this.preimage,t=0,r={},i=[{name:"nVersion",len:4},{name:"hashPrevouts",len:32},{name:"hashSequence",len:32},{name:"outpoint_txid",len:32},{name:"outpoint_vout",len:4}],n=[{name:"value",len:8},{name:"nSequence",len:4},{name:"hashOutputs",len:32},{name:"nLocktime",len:4},{name:"sighashType",len:4}],o=0;o<i.length;o++){var a=i[o];r[a.name]=e.slice(t,t+a.len).toString("hex"),t+=a.len}var s=Ie.decodeCompactSize(e,t);r.scriptLen=s.value,r.scriptLenSize=s.bytes,r.scriptLenRaw=e.slice(t,t+s.bytes).toString("hex"),t+=s.bytes,r.scriptCode=e.slice(t,t+r.scriptLen).toString("hex"),t+=r.scriptLen;for(var u=0;u<n.length;u++){var c=n[u];r[c.name]=e.slice(t,t+c.len).toString("hex"),t+=c.len}var l=i.reduce(function(w,E){return w+E.len},0),m=n.reduce(function(w,E){return w+E.len},0);return r._structure={leftFixed:l,scriptLenVarint:s.bytes,scriptCode:r.scriptLen,rightFixed:m,totalCalculated:l+s.bytes+r.scriptLen+m,totalActual:e.length},r};Ie.prototype._generateBidirectionalASM=function(e,t,r){var i=["value","nSequence","hashOutputs","nLocktime","sighashType"],n=["nVersion","hashPrevouts","hashSequence","outpoint_txid","outpoint_vout"];if(i.includes(e))return this._generateRightExtractionASM(e,r);if(n.includes(e))return this._generateLeftExtractionASM(e,r);if(e==="scriptCode")return this._generateDynamicExtractionASM(t,r);if(e==="scriptLen")return this._generateScriptLenExtractionASM(t,r);throw new Error("Unknown field: "+e)};Ie.prototype._generateRightExtractionASM=function(e,t){for(var r=[{name:"value",len:8},{name:"nSequence",len:4},{name:"hashOutputs",len:32},{name:"nLocktime",len:4},{name:"sighashType",len:4}],i=0,n=0,o=!1,a=0;a<r.length;a++){var s=r[a];if(s.name===e){n=s.len,o=!0;break}i+=s.len}if(!o)throw new Error("Field not found in RIGHT fields: "+e);var u=52,c=u-i,l=[];return t?(l.push("# \u{1F504} Extract "+e+" from RIGHT side (bidirectional strategy)"),l.push("OP_SIZE # Push preimage size: [preimage, size]")):l.push("OP_SIZE"),t?l=l.concat([c+" OP_SUB # Calculate split point: [preimage, split_point]","OP_SPLIT # Split: [left_part, right_part]","OP_NIP # Drop left (OP_SPLIT leaves right on top): [right_part]",n+" OP_SPLIT # Extract field: ["+e+", remaining]","OP_DROP # Clean up: ["+e+"]","# \u2705 Result: "+e+" is now on top of stack"]):l=l.concat([c+" OP_SUB","OP_SPLIT","OP_NIP",n+" OP_SPLIT","OP_DROP"]),l.join(`
|
|
77
77
|
`)};Ie.prototype._generateLeftExtractionASM=function(e,t){var r=[{name:"nVersion",len:4,offset:0},{name:"hashPrevouts",len:32,offset:4},{name:"hashSequence",len:32,offset:36},{name:"outpoint_txid",len:32,offset:68},{name:"outpoint_vout",len:4,offset:100}],i=r.find(function(o){return o.name===e});if(!i)throw new Error("Field not found in LEFT fields: "+e);var n=[];return t?n=["# \u{1F504} Extract "+e+" from LEFT side (bidirectional strategy)",i.offset+" OP_SPLIT # Skip to field: [prefix, remainder]","OP_NIP # Drop prefix (OP_SPLIT leaves remainder on top): [remainder]",i.len+" OP_SPLIT # Extract field: ["+e+", suffix]","OP_DROP # Clean up: ["+e+"]","# \u2705 Result: "+e+" is now on top of stack"]:n=[i.offset+" OP_SPLIT","OP_NIP",i.len+" OP_SPLIT","OP_DROP"],n.join(`
|
|
78
78
|
`)};Ie.prototype._generateDynamicExtractionASM=function(e,t){var r=104+e.scriptLenSize;return["# \u{1F3AF} Extract scriptCode DYNAMICALLY with CompactSize varint support",r+" OP_SPLIT # Skip left zone + scriptLen varint: [left_zone, remainder]","OP_NIP # Drop left (OP_SPLIT leaves remainder on top): [remainder]",e.scriptLen+" OP_SPLIT # Extract scriptCode: [scriptCode, right_zone]","OP_DROP # Clean up: [scriptCode]","# \u2705 Result: scriptCode extracted with "+e.scriptLenSize+"-byte varint awareness"].join(`
|
|
@@ -94,7 +94,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
94
94
|
[${a+1}/${n.length}] Step (${u}) \u2014 press Enter to execute...`,c)):r&&console.log(`
|
|
95
95
|
[${a+1}/${n.length}] Step (${u})`);try{if(typeof i.step=="function")i.step();else{console.log("\u26A0\uFE0F Step-by-step execution not supported in this BSV version"),console.log("\u{1F4A1} Consider using runFullEvaluation instead");break}console.log(`\u{1F9E9} Executed: ${u}`),I8(i.stack,i.altstack)}catch(c){console.log(`\u26A0\uFE0F Error executing ${u}: ${c.message}`);break}}o&&o.close(),console.log(`
|
|
96
96
|
===========================================`),console.log("\u2705 Final Stack State:"),I8(i.stack||[],i.altstack||[]),console.log("===========================================")}function PC(e,t,r){console.log("==========================================="),console.log("\u{1F50D} SCRIPT INTERPRETER DEBUGGER (FULL RUN)"),console.log(`===========================================
|
|
97
|
-
`);let i=new Lr.Script.Interpreter,n=new Lr.crypto.BN(1e5),o=i.verify(e,t,r,0,Lr.Script.Interpreter.SCRIPT_ENABLE_SIGHASH_FORKID,n);console.log("\u{1F510} Locking Script:",t.toASM()),console.log("\u{1F513} Unlocking Script:",e.toASM()),console.log("-------------------------------------------"),console.log("\u2705 Result:",o?"TRUE (Success)":"\u274C FALSE (Failure)"),console.log("Final Stack:",i.stack.map(a=>a.toString("hex"))),console.log("AltStack:",i.altstack.map(a=>a.toString("hex"))),console.log("===========================================")}async function TC(){if(typeof A.default>"u"||!A.default.argv){console.log("\u2699\uFE0F CLI mode not available in browser environment");return}let e=A.default.argv.slice(2),t=w=>{let E=e.indexOf(w);return E!==-1&&e[E+1]?e[E+1]:null},r=t("--unlocking"),i=t("--locking"),n=t("--combined"),o=e.includes("--step"),a=e.includes("--truth"),s,u,c;if(n)c=L6(n);else{s=L6(r),u=L6(i);let w=h.Buffer.concat([s.toBuffer(),u.toBuffer()]);c=Lr.Script.fromBuffer(w)}let l=new Lr.Transaction,m=new Lr.Transaction.Input({prevTxId:"0".repeat(64),outputIndex:0,script:Lr.Script.empty(),satoshis:1e5,output:new Lr.Transaction.Output({satoshis:1e5,script:Lr.Script.empty()})});l.addInput(m),l.addOutput(new Lr.Transaction.Output({satoshis:1e5,script:Lr.Script.empty()})),o?await AC(c,l,!0):a?PC(s||Lr.Script.empty(),u||Lr.Script.empty(),l):console.log("\u2699\uFE0F No mode specified. Use --step or --truth")}O8.exports={parseScript:L6,printStack:I8,stepThroughScript:AC,runFullEvaluation:PC,main:TC};typeof Fr<"u"&&Fr.main===O8&&TC()});var Wo=k((qge,CC)=>{"use strict";v();var vi=ke(),U6=fr(),one=cr(),RC=Vr(),A8=RC.SIGHASH_ALL|RC.SIGHASH_FORKID;function BC(){var e=vi.Script.Interpreter;return e.SCRIPT_VERIFY_P2SH|e.SCRIPT_VERIFY_STRICTENC|e.SCRIPT_VERIFY_DERSIG|e.SCRIPT_VERIFY_LOW_S|e.SCRIPT_VERIFY_MINIMALDATA|e.SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY|e.SCRIPT_VERIFY_CHECKSEQUENCEVERIFY|e.SCRIPT_ENABLE_SIGHASH_FORKID|e.SCRIPT_ENABLE_MAGNETIC_OPCODES|e.SCRIPT_ENABLE_MONOLITH_OPCODES}function ane(e){return vi.Script.Interpreter.useGenesisLimits(e)}function sne(e,t,r){r=r||{};var i=new vi.Script.Interpreter,n=i.verify(e,t,r.tx||new vi.Transaction,r.inputIndex||0,r.flags||BC(),new U6(r.satoshis||0));return{ok:n,err:i.errstr||""}}function MC(e,t,r,i,n){return vi.Transaction.sighash.sighashPreimage(e,n||A8,t,r,new U6(i))}function une(e,t,r,i,n){return one.sha256sha256(MC(e,t,r,i,n))}function fne(e,t,r,i,n,o){o=o||A8;var a=vi.Transaction.sighash.sign(e,t,o,r,i,new U6(n));return h.Buffer.concat([a.toDER(),h.Buffer.from([o])])}function cne(e,t,r){r=r||{};var i=new vi.Transaction().addOutput(new vi.Transaction.Output({script:e,satoshis:t})),n=new vi.Transaction;return n.addInput(new vi.Transaction.Input({prevTxId:i.hash,outputIndex:0,script:vi.Script.empty()}),e,t),r.outputs&&r.outputs.forEach(function(o){n.addOutput(o)}),{funding:i,spend:n}}function lne(e,t){var r=e.toAddress?e.toAddress():e;return new vi.Transaction.Output({script:vi.Script.buildPublicKeyHashOut(r),satoshis:t})}function hne(e){return e===0?vi.Opcode.OP_0:e===-1?vi.Opcode.OP_1NEGATE:e>=1&&e<=16?vi.Opcode["OP_"+e]:new U6(e).toScriptNumBuffer()}CC.exports={SIGHASH:A8,flags:BC,enableGenesis:ane,verify:sne,rawPreimage:MC,sighashDigest:une,signInput:fne,fundAndSpend:cne,p2pkhOutput:lne,scriptNum:hne}});var FC=k((Fge,UC)=>{"use strict";v();var NC=ke(),DC=cr(),LC=Wo(),ao=NC.Script,Ar=NC.Opcode,m1=LC.signInput,qC=LC.scriptNum;function dne(e){var t=DC.sha256(e),r=new ao().add(Ar.OP_SHA256).add(t).add(Ar.OP_EQUAL);return{lock:r,meta:{name:"hash-lock",digest:t.toString("hex")},unlock:function(i,n,o){return new ao().add(o||e)}}}function pne(e){var t=e.toPublicKey(),r=ao.buildPublicKeyHashOut(t.toAddress());return{lock:r,meta:{name:"p2pkh",address:t.toAddress().toString()},unlock:function(i,n){return new ao().add(m1(i,e,0,r,n)).add(t.toBuffer())}}}function gne(e,t){var r=e.toPublicKey(),i=new ao().add(qC(t)).add(Ar.OP_CHECKLOCKTIMEVERIFY).add(Ar.OP_DROP).add(r.toBuffer()).add(Ar.OP_CHECKSIG);return{lock:i,meta:{name:"cltv-timelock",locktime:t},unlock:function(n,o){return new ao().add(m1(n,e,0,i,o))}}}function vne(e,t){var r=t.map(function(n){return n.toPublicKey()}),i=new ao().add(Ar["OP_"+e]);return r.forEach(function(n){i.add(n.toBuffer())}),i.add(Ar["OP_"+r.length]).add(Ar.OP_CHECKMULTISIG),{lock:i,meta:{name:e+"-of-"+r.length+"-multisig"},unlock:function(n,o,a){a=a||t.slice(0,e);var s=new ao().add(Ar.OP_0);return a.forEach(function(u){s.add(m1(n,u,0,i,o))}),s}}}function mne(e){var t=DC.sha256(e.secret),r=new ao().add(Ar.OP_IF).add(Ar.OP_SHA256).add(t).add(Ar.OP_EQUALVERIFY).add(e.receiver.toPublicKey().toBuffer()).add(Ar.OP_CHECKSIG).add(Ar.OP_ELSE).add(qC(e.timeout)).add(Ar.OP_CHECKLOCKTIMEVERIFY).add(Ar.OP_DROP).add(e.sender.toPublicKey().toBuffer()).add(Ar.OP_CHECKSIG).add(Ar.OP_ENDIF);return{lock:r,meta:{name:"htlc",digest:t.toString("hex"),timeout:e.timeout},unlockClaim:function(i,n){return new ao().add(m1(i,e.receiver,0,r,n)).add(e.secret).add(Ar.OP_1)},unlockRefund:function(i,n){return new ao().add(m1(i,e.sender,0,r,n)).add(Ar.OP_0)}}}UC.exports={hashLock:dne,p2pkh:pne,timeLockCLTV:gne,multisig:vne,htlc:mne}});var Al=k((jge,WC)=>{"use strict";v();var T8=ke(),F6=fr(),HC=cr(),k8=Wo(),jC=T8.Script,Ct=T8.Opcode,R8=k8.SIGHASH,H6=k8.scriptNum,Ol=h.Buffer.from("79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","hex"),B8=new F6("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16),yne=h.Buffer.concat([h.Buffer.from([2]),Ol]),zC=h.Buffer.from(Ol).reverse(),KC=h.Buffer.concat([h.Buffer.from(B8.toBuffer()).reverse(),h.Buffer.from([0])]),bne=h.Buffer.concat([h.Buffer.from([48,68,2,32]),Ol,h.Buffer.from([2,32])]);function P8(e,t){var r;for(r=0;r<t-1;r++)e.add(Ct.OP_1).add(Ct.OP_SPLIT);for(r=0;r<t-1;r++)e.add(Ct.OP_SWAP).add(Ct.OP_CAT);return e}var Yo=T8.crypto.Signature,_ne=Yo.SIGHASH_ALL|Yo.SIGHASH_FORKID,wne=Yo.SIGHASH_SINGLE|Yo.SIGHASH_FORKID,Sne=Yo.SIGHASH_SINGLE|Yo.SIGHASH_ANYONECANPAY|Yo.SIGHASH_FORKID,xne=Yo.SIGHASH_ALL|Yo.SIGHASH_ANYONECANPAY|Yo.SIGHASH_FORKID;function M8(e,t){var r=t&&t.sighashType||R8;return e.add(Ct.OP_HASH256),P8(e,32),e.add(zC).add(Ct.OP_ADD),e.add(KC).add(Ct.OP_MOD),e.add(H6(32)).add(Ct.OP_NUM2BIN),P8(e,32),e.add(Ol).add(Ct.OP_DUP),e.add(Ct.OP_2).add(Ct.OP_SWAP).add(Ct.OP_CAT),e.add(Ct.OP_TOALTSTACK),e.add(h.Buffer.from([48,68,2,32])).add(Ct.OP_SWAP).add(Ct.OP_CAT),e.add(h.Buffer.from([2,32])).add(Ct.OP_CAT),e.add(Ct.OP_SWAP).add(Ct.OP_CAT),e.add(h.Buffer.from([r])).add(Ct.OP_CAT),e.add(Ct.OP_FROMALTSTACK).add(Ct.OP_CHECKSIG),e}function Ene(){return M8(new jC)}function VC(e){return e.add(H6(40)).add(Ct.OP_RIGHT).add(H6(32)).add(Ct.OP_LEFT),e}function Ine(e){return GC(e,R8)}function GC(e,t){var r=h.Buffer.from([t&255,0,0,0]);return e.add(Ct.OP_DUP).add(H6(4)).add(Ct.OP_RIGHT).add(r).add(Ct.OP_EQUALVERIFY),e}function One(e){var t=h.Buffer.concat(e.map(function(r){return r.toBufferWriter().toBuffer()}));return HC.sha256sha256(t)}function Ane(e){var t=new jC().add(Ct.OP_DUP);return M8(t),t.add(Ct.OP_VERIFY),VC(t),t.add(h.Buffer.from(e)).add(Ct.OP_EQUAL),t}var Pne=new F6("7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0","hex");function ZC(e){var t=HC.sha256sha256(e);if(t[0]<1||t[0]>127)return null;var r=new F6(t).add(new F6(Ol)).mod(B8);if(r.gt(Pne))return null;var i=r.toBuffer("be",32);return i[0]>=1?i:null}function Tne(e,t,r,i,n){typeof n=="number"&&(n={maxTries:n}),n=n||{};var o=n.maxTries||5e3,a=n.start||0,s=n.field||"nLockTime",u=n.sighashType||R8;if(s!=="nLockTime"&&s!=="sequence")throw new Error("grind field must be 'nLockTime' or 'sequence'");for(var c=e.inputs[t],l=0;l<o;l++){var m=a+l;s==="nLockTime"?e.nLockTime=m:c.sequenceNumber=4294967294-m;var w=k8.rawPreimage(e,t,r,i,u);if(ZC(w))return{preimage:w,tries:l+1,field:s,nonce:m}}throw new Error("OP_PUSH_TX grind failed after "+o+" tries")}WC.exports={Gx:Ol,N:B8,PUBKEY:yne,gxLe:zC,N_LE:KC,DER_PREFIX:bne,reverseBytes:P8,pushTxCore:M8,authenticator:Ene,extractHashOutputs:VC,assertSighashAll:Ine,assertSighashType:GC,SIGHASH_ALL_FORKID:_ne,SIGHASH_SINGLE_FORKID:wne,SIGHASH_SINGLE_ANYONECANPAY_FORKID:Sne,SIGHASH_ALL_ANYONECANPAY_FORKID:xne,hashOutputs:One,valueCovenant:Ane,sFromPreimage:ZC,grind:Tne}});var N8=k((Kge,$C)=>{"use strict";v();var YC=ke(),C8=Al(),kne=Wo(),Rne=YC.Script,Pr=YC.Opcode,Pl=kne.scriptNum;function Bne(e){var t=new Rne;return t.add(Pr.OP_DUP),C8.pushTxCore(t),t.add(Pr.OP_VERIFY),C8.assertSighashAll(t),t.add(Pr.OP_DUP),t.add(Pl(104)).add(Pr.OP_SPLIT).add(Pr.OP_NIP),t.add(Pr.OP_SIZE).add(Pl(52)).add(Pr.OP_SUB).add(Pr.OP_SPLIT).add(Pr.OP_DROP),t.add(Pr.OP_OVER),t.add(Pl(52)).add(Pr.OP_RIGHT).add(Pl(8)).add(Pr.OP_LEFT),t.add(Pr.OP_BIN2NUM).add(Pl(e)).add(Pr.OP_SUB),t.add(Pl(8)).add(Pr.OP_NUM2BIN),t.add(Pr.OP_SWAP).add(Pr.OP_CAT),t.add(Pr.OP_HASH256),t.add(Pr.OP_SWAP),C8.extractHashOutputs(t),t.add(Pr.OP_EQUAL),t}$C.exports={pelsCovenant:Bne}});var q8=k((Gge,JC)=>{"use strict";v();var z6=ke(),XC=cr(),L8=Wo(),$t=z6.Opcode,Tl=L8.scriptNum;function j6(e){return e instanceof z6.PrivateKey?e.toPublicKey().toBuffer():e instanceof z6.PublicKey?e.toBuffer():e}function Mne(){return{name:"single-key",commit:function(e){return XC.sha256ripemd160(j6(e))},emit:function(e){return e.add($t.OP_OVER).add($t.OP_HASH160).add($t.OP_EQUALVERIFY),e.add($t.OP_CHECKSIGVERIFY),e},unlockArgs:function(e,t,r,i,n){var o=L8.signInput(e,n,t,r,i);return[o,n.toPublicKey().toBuffer()]}}}function D8(e,t){var r=t.length;if(e<1||e>r||r<1||r>16)throw new Error("multisig requires 1 <= m <= n <= 16");var i=new z6.Script().add($t["OP_"+e]);return t.forEach(function(n){i.add(h.Buffer.from(n))}),i.add($t["OP_"+r]).add($t.OP_CHECKMULTISIG),i.toBuffer()}function Cne(e,t){if(typeof t!="number"||!Number.isInteger(t))throw new Error("multisig(m, nKeys): nKeys is the NUMBER of keys, not the keys themselves"+(Array.isArray(t)?" \u2014 pass "+t.length+" instead of the array":""));if(typeof e!="number"||!Number.isInteger(e))throw new Error("multisig(m, nKeys): m must be an integer");if(e<1||e>t||t<1||t>16)throw new Error("multisig requires 1 <= m <= n <= 16");return{name:e+"-of-"+t+"-multisig",m:e,n:t,commit:function(r){if(r.length!==t)throw new Error("expected "+t+" public keys");return XC.sha256ripemd160(D8(e,r.map(j6)))},emit:function(r){r.add($t.OP_OVER).add($t.OP_HASH160).add($t.OP_EQUALVERIFY),r.add(Tl(1)).add($t.OP_SPLIT).add($t.OP_NIP),r.add($t.OP_SIZE).add(Tl(2)).add($t.OP_SUB).add($t.OP_SPLIT).add($t.OP_DROP);for(var i=0;i<this.n;i++)r.add(Tl(34)).add($t.OP_SPLIT),r.add($t.OP_SWAP).add(Tl(1)).add($t.OP_SPLIT).add($t.OP_NIP),r.add($t.OP_TOALTSTACK);for(r.add($t.OP_DROP),r.add(Tl(this.m)),i=0;i<this.n;i++)r.add($t.OP_FROMALTSTACK);return r.add(Tl(this.n)),r.add($t.OP_CHECKMULTISIGVERIFY),r},unlockArgs:function(r,i,n,o,a){var s=a.keys;if(s.length!==t)throw new Error("expected "+t+" public keys in signer.keys");var u=D8(e,s.map(j6)),c=s.map(j6).map(function(w){return w.toString("hex")}),l=a.signWith.map(function(w){var E=c.indexOf(w.toPublicKey().toBuffer().toString("hex"));if(E<0)throw new Error("signWith key is not in the committed key set");return{idx:E,priv:w}}).sort(function(w,E){return E.idx-w.idx}).slice(0,e);if(l.length<e)throw new Error("need at least "+e+" signing keys");var m=l.map(function(w){return L8.signInput(r,w.priv,i,n,o)});return[$t.OP_0].concat(m).concat([u])}}}function Nne(e){if(!e||typeof e.emit!="function"||typeof e.unlockArgs!="function"||typeof e.commit!="function")throw new Error("predicate authorizer needs { commit, emit, unlockArgs } functions");return{name:e.name||"predicate",commit:e.commit,emit:e.emit,unlockArgs:e.unlockArgs}}JC.exports={singleKey:Mne,multisig:Cne,predicate:Nne,redeemScript:D8}});var H8=k((Wge,aN)=>{"use strict";v();var U8=ke(),y1=Al(),F8=Wo(),b1=q8(),K6=U8.Script,Oe=U8.Opcode,$o=F8.scriptNum;function eN(e,t){var r=h.Buffer.isBuffer(e)?e:t.commit(e);if(r.length!==20)throw new Error("owner commitment must be 20 bytes (HASH160)");return r}function QC(e,t){return t.length?e.add(h.Buffer.from(t)):e.add(Oe.OP_0)}function tN(e,t){return e.add(Oe.OP_DUP),y1.pushTxCore(e),e.add(Oe.OP_VERIFY),y1.assertSighashAll(e),e.add(Oe.OP_DUP).add($o(52)).add(Oe.OP_RIGHT).add($o(8)).add(Oe.OP_LEFT).add(Oe.OP_TOALTSTACK),e.add(Oe.OP_DUP),y1.extractHashOutputs(e),e.add(Oe.OP_TOALTSTACK),e.add($o(104)).add(Oe.OP_SPLIT).add(Oe.OP_NIP).add(Oe.OP_SIZE).add($o(52)).add(Oe.OP_SUB).add(Oe.OP_SPLIT).add(Oe.OP_DROP),e.add(Oe.OP_DUP).add($o(4)).add($o(20)).add(Oe.OP_SUBSTR),e.add(Oe.OP_SWAP).add(Oe.OP_TOALTSTACK),t.emit(e),e.add(Oe.OP_FROMALTSTACK),e}function rN(e){return e.add($o(4)).add(Oe.OP_SPLIT).add($o(20)).add(Oe.OP_SPLIT).add(Oe.OP_NIP),e.add(Oe.OP_TOALTSTACK),e.add(Oe.OP_SWAP).add(Oe.OP_CAT),e.add(Oe.OP_FROMALTSTACK).add(Oe.OP_CAT),e}function iN(e){var t=e.toBuffer().length;if(t<=252||t>65535)throw new Error("token script length must use a 3-byte varint (253..65535); got "+t);return e}function Dne(e,t,r){r=r||b1.singleKey();var i=new K6;return i.add(eN(t,r)),i.add(Oe.OP_DROP),tN(i,r),rN(i),i.add(Oe.OP_FROMALTSTACK),i.add(Oe.OP_SWAP),i.add(Oe.OP_FROMALTSTACK),i.add(Oe.OP_BIN2NUM).add($o(e)).add(Oe.OP_SUB).add($o(8)).add(Oe.OP_NUM2BIN),i.add(Oe.OP_SWAP).add(Oe.OP_CAT),i.add(Oe.OP_HASH256),i.add(Oe.OP_EQUAL),iN(i)}function nN(e,t){t=t||b1.singleKey();var r=new K6;return r.add(eN(e,t)),r.add(Oe.OP_DROP),tN(r,t),rN(r),r.add(Oe.OP_CAT),r.add(Oe.OP_SWAP).add(Oe.OP_CAT),r.add(Oe.OP_CAT),r.add(Oe.OP_FROMALTSTACK),r.add(Oe.OP_FROMALTSTACK).add(Oe.OP_DROP),r.add(Oe.OP_SWAP).add(Oe.OP_HASH256).add(Oe.OP_EQUAL),iN(r)}function Lne(e){return b1.singleKey().commit(e)}function qne(e,t,r,i,n,o){o=o||{};var a=o.auth||b1.singleKey(),s=o.inputIndex||0;if(t.length!==20)throw new Error("newOwnerHash must be 20 bytes (HASH160)");if(i<=1&&!o.allowLowValue)throw new Error("unlockTransfer: single-output token sets output = input - fee, which burns a "+i+"-sat UTXO (e.g. a 1-sat ordinal). Use Token.transferOrdinal / ownershipTokenMulti to preserve the satoshi.");y1.grind(r,s,n,i,o.grind);var u=F8.rawPreimage(r,s,n,i),c=a.unlockArgs(r,s,n,i,e),l=new K6().add(h.Buffer.from(t));return c.forEach(function(m){l.add(m)}),l.add(h.Buffer.from(u)),l}function oN(e,t,r,i,n,o,a){a=a||{};var s=a.auth||b1.singleKey(),u=a.inputIndex||0;if(t.length!==20)throw new Error("newOwnerHash must be 20 bytes (HASH160)");if(!o||o.tokenValue==null||o.tokenValue.length!==8)throw new Error("layout.tokenValue must be the 8-byte LE value of the token output");y1.grind(r,u,n,i,a.grind);var c=F8.rawPreimage(r,u,n,i),l=s.unlockArgs(r,u,n,i,e),m=new K6;return QC(m,o.before||h.Buffer.alloc(0)),QC(m,o.after||h.Buffer.alloc(0)),m.add(h.Buffer.from(o.tokenValue)),m.add(h.Buffer.from(t)),l.forEach(function(w){m.add(w)}),m.add(h.Buffer.from(c)),m}function Une(e,t){return nN(e,t)}function Fne(e,t,r,i,n,o){o=o||{},i==null&&(i=1);var a=o.tokenIndex||0,s=r.outputs||[],u=s[a];if(!u)throw new Error("transferOrdinal: spend has no output at tokenIndex "+a);if(u.satoshis!==i)throw new Error("transferOrdinal: token output value ("+u.satoshis+" sat) must equal the ordinal value ("+i+" sat) to avoid burning the inscription");function c(E){return E.toBufferWriter().toBuffer()}var l=h.Buffer.concat(s.slice(0,a).map(c)),m=h.Buffer.concat(s.slice(a+1).map(c)),w=new U8.crypto.BN(i).toBuffer({endian:"little",size:8});return oN(e,t,r,i,n,{before:l,after:m,tokenValue:w},o)}aN.exports={ownershipToken:Dne,ownershipTokenMulti:nN,ordinalLock:Une,ownerId:Lne,unlockTransfer:qne,unlockTransferMulti:oN,transferOrdinal:Fne}});var W8=k(($ge,sN)=>{"use strict";v();var V8=ke(),V6=Al(),Hne=N8(),jne=H8(),G8=Wo(),z8=V8.Script,xn=V8.Opcode,K8=V8.Transaction,j8=G8.scriptNum;function zne(e,t){return e instanceof K8.Output?e:e instanceof z8?new K8.Output({script:e,satoshis:t}):G8.p2pkhOutput(e,t)}function Kne(e,t,r,i,n,o){o=o||5e4;for(var a=0;a<o;a++){e.nLockTime=n+a;var s=G8.rawPreimage(e,t,r,i);if(V6.sFromPreimage(s))return s}throw new Error("covenant grind failed after "+o+" tries")}function $a(){if(!(this instanceof $a))return new $a;this._outputs=[],this._minLockTime=null}$a.prototype.payTo=function(e,t){return this._outputs.push(zne(e,t)),this};$a.prototype.lockUntil=function(e){return this._minLockTime=e,this};$a.prototype.outputs=function(){return this._outputs.map(function(e){return new K8.Output(e.toObject())})};$a.prototype.describe=function(){var e=[];return this._outputs.forEach(function(t,r){e.push("output["+r+"] = "+t.satoshis+" sat to "+t.script.toASM().slice(0,24)+"...")}),this._minLockTime!==null&&e.push("nLockTime >= "+this._minLockTime),"spend allowed iff: "+e.join(" AND ")};$a.prototype.compile=function(){if(this._outputs.length===0&&this._minLockTime===null)throw new Error("empty policy: add at least one constraint (payTo / lockUntil)");var e=this,t=new z8().add(xn.OP_DUP);if(V6.pushTxCore(t),t.add(xn.OP_VERIFY),this._outputs.length){var r=V6.hashOutputs(this._outputs);t.add(xn.OP_DUP),V6.extractHashOutputs(t),t.add(h.Buffer.from(r)).add(xn.OP_EQUALVERIFY)}return this._minLockTime!==null&&(t.add(xn.OP_DUP),t.add(j8(8)).add(xn.OP_RIGHT).add(j8(4)).add(xn.OP_LEFT),t.add(xn.OP_BIN2NUM).add(j8(this._minLockTime)).add(xn.OP_GREATERTHANOREQUAL).add(xn.OP_VERIFY)),t.add(xn.OP_DROP).add(xn.OP_1),{lock:t,outputs:e.outputs(),describe:function(){return e.describe()},unlock:function(i,n,o){o=o||0;var a=e._minLockTime===null?0:e._minLockTime;return e._minLockTime!==null&&(i.inputs[o].sequenceNumber=4294967294),new z8().add(Kne(i,o,t,n,a))}}};function Z8(){return new $a}Z8.perpetual=function(e){return Hne.pelsCovenant(e)};Z8.token=function(e,t){return jne.ownershipToken(e,t)};sN.exports={policy:Z8,Policy:$a}});var hN=k((Jge,lN)=>{"use strict";v();var G6=ke(),Vne=Wo();function fN(e){if(e===0)return"OP_0";if(e>=1&&e<=75)return"PUSH("+e+")";if(e===76)return"OP_PUSHDATA1";if(e===77)return"OP_PUSHDATA2";if(e===78)return"OP_PUSHDATA4";try{return G6.Opcode.fromNumber(e).toString()}catch{return"0x"+e.toString(16)}}function uN(e,t){t=t||16;var r=h.Buffer.from(e).toString("hex");return r.length<=t*2?r||"0":r.slice(0,t*2)+"...("+e.length+"B)"}function Gne(e,t,r){r=r||{};var i=new G6.Script.Interpreter,n=[];i.stepListener=function(a,s,u){n.push({phase:i.script===t?"lock":"unlock",op:fN(a.opcode&&typeof a.opcode.toNumber=="function"?a.opcode.toNumber():a.opcode.num),stack:s.map(function(c){return uN(c)}),altstack:u.map(function(c){return uN(c)})})};var o=i.verify(e,t,r.tx||new G6.Transaction,r.inputIndex||0,typeof r.flags=="number"?r.flags:Vne.flags(),new G6.crypto.BN(r.satoshis||0));return{ok:o,err:i.errstr||"",steps:n}}function cN(e){var t=[],r=null;return e.steps.forEach(function(i,n){i.phase!==r&&(t.push("-- "+i.phase+" script --"),r=i.phase);var o=i.stack.length?i.stack.join(" | "):"(empty)",a=i.altstack.length?" alt:["+i.altstack.join(" | ")+"]":"";t.push(String(n).padStart(3)+" "+i.op.padEnd(16)+" -> ["+o+"]"+a)}),t.push((e.ok?"VALID":"INVALID")+(e.err?" ("+e.err+")":"")),t.join(`
|
|
97
|
+
`);let i=new Lr.Script.Interpreter,n=new Lr.crypto.BN(1e5),o=i.verify(e,t,r,0,Lr.Script.Interpreter.SCRIPT_ENABLE_SIGHASH_FORKID,n);console.log("\u{1F510} Locking Script:",t.toASM()),console.log("\u{1F513} Unlocking Script:",e.toASM()),console.log("-------------------------------------------"),console.log("\u2705 Result:",o?"TRUE (Success)":"\u274C FALSE (Failure)"),console.log("Final Stack:",i.stack.map(a=>a.toString("hex"))),console.log("AltStack:",i.altstack.map(a=>a.toString("hex"))),console.log("===========================================")}async function TC(){if(typeof A.default>"u"||!A.default.argv){console.log("\u2699\uFE0F CLI mode not available in browser environment");return}let e=A.default.argv.slice(2),t=w=>{let E=e.indexOf(w);return E!==-1&&e[E+1]?e[E+1]:null},r=t("--unlocking"),i=t("--locking"),n=t("--combined"),o=e.includes("--step"),a=e.includes("--truth"),s,u,c;if(n)c=L6(n);else{s=L6(r),u=L6(i);let w=h.Buffer.concat([s.toBuffer(),u.toBuffer()]);c=Lr.Script.fromBuffer(w)}let l=new Lr.Transaction,m=new Lr.Transaction.Input({prevTxId:"0".repeat(64),outputIndex:0,script:Lr.Script.empty(),satoshis:1e5,output:new Lr.Transaction.Output({satoshis:1e5,script:Lr.Script.empty()})});l.addInput(m),l.addOutput(new Lr.Transaction.Output({satoshis:1e5,script:Lr.Script.empty()})),o?await AC(c,l,!0):a?PC(s||Lr.Script.empty(),u||Lr.Script.empty(),l):console.log("\u2699\uFE0F No mode specified. Use --step or --truth")}O8.exports={parseScript:L6,printStack:I8,stepThroughScript:AC,runFullEvaluation:PC,main:TC};typeof Fr<"u"&&Fr.main===O8&&TC()});var Wo=k((qge,CC)=>{"use strict";v();var vi=ke(),U6=fr(),one=cr(),RC=Vr(),A8=RC.SIGHASH_ALL|RC.SIGHASH_FORKID;function BC(){var e=vi.Script.Interpreter;return e.SCRIPT_VERIFY_P2SH|e.SCRIPT_VERIFY_STRICTENC|e.SCRIPT_VERIFY_DERSIG|e.SCRIPT_VERIFY_LOW_S|e.SCRIPT_VERIFY_MINIMALDATA|e.SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY|e.SCRIPT_VERIFY_CHECKSEQUENCEVERIFY|e.SCRIPT_ENABLE_SIGHASH_FORKID|e.SCRIPT_ENABLE_MAGNETIC_OPCODES|e.SCRIPT_ENABLE_MONOLITH_OPCODES}function ane(e){return vi.Script.Interpreter.useGenesisLimits(e)}function sne(e,t,r){r=r||{};var i=new vi.Script.Interpreter,n=i.verify(e,t,r.tx||new vi.Transaction,r.inputIndex||0,r.flags||BC(),new U6(r.satoshis||0));return{ok:n,err:i.errstr||""}}function MC(e,t,r,i,n){return vi.Transaction.sighash.sighashPreimage(e,n||A8,t,r,new U6(i))}function une(e,t,r,i,n){return one.sha256sha256(MC(e,t,r,i,n))}function fne(e,t,r,i,n,o){o=o||A8;var a=vi.Transaction.sighash.sign(e,t,o,r,i,new U6(n));return h.Buffer.concat([a.toDER(),h.Buffer.from([o])])}function cne(e,t,r){r=r||{};var i=new vi.Transaction().addOutput(new vi.Transaction.Output({script:e,satoshis:t})),n=new vi.Transaction;return n.addInput(new vi.Transaction.Input({prevTxId:i.hash,outputIndex:0,script:vi.Script.empty()}),e,t),r.outputs&&r.outputs.forEach(function(o){n.addOutput(o)}),{funding:i,spend:n}}function lne(e,t){var r=e.toAddress?e.toAddress():e;return new vi.Transaction.Output({script:vi.Script.buildPublicKeyHashOut(r),satoshis:t})}function hne(e){return e===0?vi.Opcode.OP_0:e===-1?vi.Opcode.OP_1NEGATE:e>=1&&e<=16?vi.Opcode["OP_"+e]:new U6(e).toScriptNumBuffer()}CC.exports={SIGHASH:A8,flags:BC,enableGenesis:ane,verify:sne,rawPreimage:MC,sighashDigest:une,signInput:fne,fundAndSpend:cne,p2pkhOutput:lne,scriptNum:hne}});var FC=k((Fge,UC)=>{"use strict";v();var NC=ke(),DC=cr(),LC=Wo(),ao=NC.Script,Ar=NC.Opcode,m1=LC.signInput,qC=LC.scriptNum;function dne(e){var t=DC.sha256(e),r=new ao().add(Ar.OP_SHA256).add(t).add(Ar.OP_EQUAL);return{lock:r,meta:{name:"hash-lock",digest:t.toString("hex")},unlock:function(i,n,o){return new ao().add(o||e)}}}function pne(e){var t=e.toPublicKey(),r=ao.buildPublicKeyHashOut(t.toAddress());return{lock:r,meta:{name:"p2pkh",address:t.toAddress().toString()},unlock:function(i,n){return new ao().add(m1(i,e,0,r,n)).add(t.toBuffer())}}}function gne(e,t){var r=e.toPublicKey(),i=new ao().add(qC(t)).add(Ar.OP_CHECKLOCKTIMEVERIFY).add(Ar.OP_DROP).add(r.toBuffer()).add(Ar.OP_CHECKSIG);return{lock:i,meta:{name:"cltv-timelock",locktime:t},unlock:function(n,o){return new ao().add(m1(n,e,0,i,o))}}}function vne(e,t){var r=t.map(function(n){return n.toPublicKey()}),i=new ao().add(Ar["OP_"+e]);return r.forEach(function(n){i.add(n.toBuffer())}),i.add(Ar["OP_"+r.length]).add(Ar.OP_CHECKMULTISIG),{lock:i,meta:{name:e+"-of-"+r.length+"-multisig"},unlock:function(n,o,a){a=a||t.slice(0,e);var s=new ao().add(Ar.OP_0);return a.forEach(function(u){s.add(m1(n,u,0,i,o))}),s}}}function mne(e){var t=DC.sha256(e.secret),r=new ao().add(Ar.OP_IF).add(Ar.OP_SHA256).add(t).add(Ar.OP_EQUALVERIFY).add(e.receiver.toPublicKey().toBuffer()).add(Ar.OP_CHECKSIG).add(Ar.OP_ELSE).add(qC(e.timeout)).add(Ar.OP_CHECKLOCKTIMEVERIFY).add(Ar.OP_DROP).add(e.sender.toPublicKey().toBuffer()).add(Ar.OP_CHECKSIG).add(Ar.OP_ENDIF);return{lock:r,meta:{name:"htlc",digest:t.toString("hex"),timeout:e.timeout},unlockClaim:function(i,n){return new ao().add(m1(i,e.receiver,0,r,n)).add(e.secret).add(Ar.OP_1)},unlockRefund:function(i,n){return new ao().add(m1(i,e.sender,0,r,n)).add(Ar.OP_0)}}}UC.exports={hashLock:dne,p2pkh:pne,timeLockCLTV:gne,multisig:vne,htlc:mne}});var Al=k((jge,WC)=>{"use strict";v();var T8=ke(),F6=fr(),HC=cr(),k8=Wo(),jC=T8.Script,Ct=T8.Opcode,R8=k8.SIGHASH,H6=k8.scriptNum,Ol=h.Buffer.from("79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","hex"),B8=new F6("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16),yne=h.Buffer.concat([h.Buffer.from([2]),Ol]),zC=h.Buffer.from(Ol).reverse(),KC=h.Buffer.concat([h.Buffer.from(B8.toBuffer()).reverse(),h.Buffer.from([0])]),bne=h.Buffer.concat([h.Buffer.from([48,68,2,32]),Ol,h.Buffer.from([2,32])]);function P8(e,t){var r;for(r=0;r<t-1;r++)e.add(Ct.OP_1).add(Ct.OP_SPLIT);for(r=0;r<t-1;r++)e.add(Ct.OP_SWAP).add(Ct.OP_CAT);return e}var Yo=T8.crypto.Signature,_ne=Yo.SIGHASH_ALL|Yo.SIGHASH_FORKID,wne=Yo.SIGHASH_SINGLE|Yo.SIGHASH_FORKID,Sne=Yo.SIGHASH_SINGLE|Yo.SIGHASH_ANYONECANPAY|Yo.SIGHASH_FORKID,xne=Yo.SIGHASH_ALL|Yo.SIGHASH_ANYONECANPAY|Yo.SIGHASH_FORKID;function M8(e,t){var r=t&&t.sighashType||R8;return e.add(Ct.OP_HASH256),P8(e,32),e.add(zC).add(Ct.OP_ADD),e.add(KC).add(Ct.OP_MOD),e.add(H6(32)).add(Ct.OP_NUM2BIN),P8(e,32),e.add(Ol).add(Ct.OP_DUP),e.add(Ct.OP_2).add(Ct.OP_SWAP).add(Ct.OP_CAT),e.add(Ct.OP_TOALTSTACK),e.add(h.Buffer.from([48,68,2,32])).add(Ct.OP_SWAP).add(Ct.OP_CAT),e.add(h.Buffer.from([2,32])).add(Ct.OP_CAT),e.add(Ct.OP_SWAP).add(Ct.OP_CAT),e.add(h.Buffer.from([r])).add(Ct.OP_CAT),e.add(Ct.OP_FROMALTSTACK).add(Ct.OP_CHECKSIG),e}function Ene(){return M8(new jC)}function VC(e){return e.add(H6(40)).add(Ct.OP_RIGHT).add(H6(32)).add(Ct.OP_LEFT),e}function Ine(e){return GC(e,R8)}function GC(e,t){var r=h.Buffer.from([t&255,0,0,0]);return e.add(Ct.OP_DUP).add(H6(4)).add(Ct.OP_RIGHT).add(r).add(Ct.OP_EQUALVERIFY),e}function One(e){var t=h.Buffer.concat(e.map(function(r){return r.toBufferWriter().toBuffer()}));return HC.sha256sha256(t)}function Ane(e){var t=new jC().add(Ct.OP_DUP);return M8(t),t.add(Ct.OP_VERIFY),VC(t),t.add(h.Buffer.from(e)).add(Ct.OP_EQUAL),t}var Pne=new F6("7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0","hex");function ZC(e){var t=HC.sha256sha256(e);if(t[0]<1||t[0]>127)return null;var r=new F6(t).add(new F6(Ol)).mod(B8);if(r.gt(Pne))return null;var i=r.toBuffer({size:32});return i[0]>=1?i:null}function Tne(e,t,r,i,n){typeof n=="number"&&(n={maxTries:n}),n=n||{};var o=n.maxTries||5e3,a=n.start||0,s=n.field||"nLockTime",u=n.sighashType||R8;if(s!=="nLockTime"&&s!=="sequence")throw new Error("grind field must be 'nLockTime' or 'sequence'");for(var c=e.inputs[t],l=0;l<o;l++){var m=a+l;s==="nLockTime"?e.nLockTime=m:c.sequenceNumber=4294967294-m;var w=k8.rawPreimage(e,t,r,i,u),E=ZC(w);if(E&&E.length===32)return{preimage:w,tries:l+1,field:s,nonce:m}}throw new Error("OP_PUSH_TX grind failed after "+o+" tries")}WC.exports={Gx:Ol,N:B8,PUBKEY:yne,gxLe:zC,N_LE:KC,DER_PREFIX:bne,reverseBytes:P8,pushTxCore:M8,authenticator:Ene,extractHashOutputs:VC,assertSighashAll:Ine,assertSighashType:GC,SIGHASH_ALL_FORKID:_ne,SIGHASH_SINGLE_FORKID:wne,SIGHASH_SINGLE_ANYONECANPAY_FORKID:Sne,SIGHASH_ALL_ANYONECANPAY_FORKID:xne,hashOutputs:One,valueCovenant:Ane,sFromPreimage:ZC,grind:Tne}});var N8=k((Kge,$C)=>{"use strict";v();var YC=ke(),C8=Al(),kne=Wo(),Rne=YC.Script,Pr=YC.Opcode,Pl=kne.scriptNum;function Bne(e){var t=new Rne;return t.add(Pr.OP_DUP),C8.pushTxCore(t),t.add(Pr.OP_VERIFY),C8.assertSighashAll(t),t.add(Pr.OP_DUP),t.add(Pl(104)).add(Pr.OP_SPLIT).add(Pr.OP_NIP),t.add(Pr.OP_SIZE).add(Pl(52)).add(Pr.OP_SUB).add(Pr.OP_SPLIT).add(Pr.OP_DROP),t.add(Pr.OP_OVER),t.add(Pl(52)).add(Pr.OP_RIGHT).add(Pl(8)).add(Pr.OP_LEFT),t.add(Pr.OP_BIN2NUM).add(Pl(e)).add(Pr.OP_SUB),t.add(Pl(8)).add(Pr.OP_NUM2BIN),t.add(Pr.OP_SWAP).add(Pr.OP_CAT),t.add(Pr.OP_HASH256),t.add(Pr.OP_SWAP),C8.extractHashOutputs(t),t.add(Pr.OP_EQUAL),t}$C.exports={pelsCovenant:Bne}});var q8=k((Gge,JC)=>{"use strict";v();var z6=ke(),XC=cr(),L8=Wo(),$t=z6.Opcode,Tl=L8.scriptNum;function j6(e){return e instanceof z6.PrivateKey?e.toPublicKey().toBuffer():e instanceof z6.PublicKey?e.toBuffer():e}function Mne(){return{name:"single-key",commit:function(e){return XC.sha256ripemd160(j6(e))},emit:function(e){return e.add($t.OP_OVER).add($t.OP_HASH160).add($t.OP_EQUALVERIFY),e.add($t.OP_CHECKSIGVERIFY),e},unlockArgs:function(e,t,r,i,n){var o=L8.signInput(e,n,t,r,i);return[o,n.toPublicKey().toBuffer()]}}}function D8(e,t){var r=t.length;if(e<1||e>r||r<1||r>16)throw new Error("multisig requires 1 <= m <= n <= 16");var i=new z6.Script().add($t["OP_"+e]);return t.forEach(function(n){i.add(h.Buffer.from(n))}),i.add($t["OP_"+r]).add($t.OP_CHECKMULTISIG),i.toBuffer()}function Cne(e,t){if(typeof t!="number"||!Number.isInteger(t))throw new Error("multisig(m, nKeys): nKeys is the NUMBER of keys, not the keys themselves"+(Array.isArray(t)?" \u2014 pass "+t.length+" instead of the array":""));if(typeof e!="number"||!Number.isInteger(e))throw new Error("multisig(m, nKeys): m must be an integer");if(e<1||e>t||t<1||t>16)throw new Error("multisig requires 1 <= m <= n <= 16");return{name:e+"-of-"+t+"-multisig",m:e,n:t,commit:function(r){if(r.length!==t)throw new Error("expected "+t+" public keys");return XC.sha256ripemd160(D8(e,r.map(j6)))},emit:function(r){r.add($t.OP_OVER).add($t.OP_HASH160).add($t.OP_EQUALVERIFY),r.add(Tl(1)).add($t.OP_SPLIT).add($t.OP_NIP),r.add($t.OP_SIZE).add(Tl(2)).add($t.OP_SUB).add($t.OP_SPLIT).add($t.OP_DROP);for(var i=0;i<this.n;i++)r.add(Tl(34)).add($t.OP_SPLIT),r.add($t.OP_SWAP).add(Tl(1)).add($t.OP_SPLIT).add($t.OP_NIP),r.add($t.OP_TOALTSTACK);for(r.add($t.OP_DROP),r.add(Tl(this.m)),i=0;i<this.n;i++)r.add($t.OP_FROMALTSTACK);return r.add(Tl(this.n)),r.add($t.OP_CHECKMULTISIGVERIFY),r},unlockArgs:function(r,i,n,o,a){var s=a.keys;if(s.length!==t)throw new Error("expected "+t+" public keys in signer.keys");var u=D8(e,s.map(j6)),c=s.map(j6).map(function(w){return w.toString("hex")}),l=a.signWith.map(function(w){var E=c.indexOf(w.toPublicKey().toBuffer().toString("hex"));if(E<0)throw new Error("signWith key is not in the committed key set");return{idx:E,priv:w}}).sort(function(w,E){return E.idx-w.idx}).slice(0,e);if(l.length<e)throw new Error("need at least "+e+" signing keys");var m=l.map(function(w){return L8.signInput(r,w.priv,i,n,o)});return[$t.OP_0].concat(m).concat([u])}}}function Nne(e){if(!e||typeof e.emit!="function"||typeof e.unlockArgs!="function"||typeof e.commit!="function")throw new Error("predicate authorizer needs { commit, emit, unlockArgs } functions");return{name:e.name||"predicate",commit:e.commit,emit:e.emit,unlockArgs:e.unlockArgs}}JC.exports={singleKey:Mne,multisig:Cne,predicate:Nne,redeemScript:D8}});var H8=k((Wge,aN)=>{"use strict";v();var U8=ke(),y1=Al(),F8=Wo(),b1=q8(),K6=U8.Script,Oe=U8.Opcode,$o=F8.scriptNum;function eN(e,t){var r=h.Buffer.isBuffer(e)?e:t.commit(e);if(r.length!==20)throw new Error("owner commitment must be 20 bytes (HASH160)");return r}function QC(e,t){return t.length?e.add(h.Buffer.from(t)):e.add(Oe.OP_0)}function tN(e,t){return e.add(Oe.OP_DUP),y1.pushTxCore(e),e.add(Oe.OP_VERIFY),y1.assertSighashAll(e),e.add(Oe.OP_DUP).add($o(52)).add(Oe.OP_RIGHT).add($o(8)).add(Oe.OP_LEFT).add(Oe.OP_TOALTSTACK),e.add(Oe.OP_DUP),y1.extractHashOutputs(e),e.add(Oe.OP_TOALTSTACK),e.add($o(104)).add(Oe.OP_SPLIT).add(Oe.OP_NIP).add(Oe.OP_SIZE).add($o(52)).add(Oe.OP_SUB).add(Oe.OP_SPLIT).add(Oe.OP_DROP),e.add(Oe.OP_DUP).add($o(4)).add($o(20)).add(Oe.OP_SUBSTR),e.add(Oe.OP_SWAP).add(Oe.OP_TOALTSTACK),t.emit(e),e.add(Oe.OP_FROMALTSTACK),e}function rN(e){return e.add($o(4)).add(Oe.OP_SPLIT).add($o(20)).add(Oe.OP_SPLIT).add(Oe.OP_NIP),e.add(Oe.OP_TOALTSTACK),e.add(Oe.OP_SWAP).add(Oe.OP_CAT),e.add(Oe.OP_FROMALTSTACK).add(Oe.OP_CAT),e}function iN(e){var t=e.toBuffer().length;if(t<=252||t>65535)throw new Error("token script length must use a 3-byte varint (253..65535); got "+t);return e}function Dne(e,t,r){r=r||b1.singleKey();var i=new K6;return i.add(eN(t,r)),i.add(Oe.OP_DROP),tN(i,r),rN(i),i.add(Oe.OP_FROMALTSTACK),i.add(Oe.OP_SWAP),i.add(Oe.OP_FROMALTSTACK),i.add(Oe.OP_BIN2NUM).add($o(e)).add(Oe.OP_SUB).add($o(8)).add(Oe.OP_NUM2BIN),i.add(Oe.OP_SWAP).add(Oe.OP_CAT),i.add(Oe.OP_HASH256),i.add(Oe.OP_EQUAL),iN(i)}function nN(e,t){t=t||b1.singleKey();var r=new K6;return r.add(eN(e,t)),r.add(Oe.OP_DROP),tN(r,t),rN(r),r.add(Oe.OP_CAT),r.add(Oe.OP_SWAP).add(Oe.OP_CAT),r.add(Oe.OP_CAT),r.add(Oe.OP_FROMALTSTACK),r.add(Oe.OP_FROMALTSTACK).add(Oe.OP_DROP),r.add(Oe.OP_SWAP).add(Oe.OP_HASH256).add(Oe.OP_EQUAL),iN(r)}function Lne(e){return b1.singleKey().commit(e)}function qne(e,t,r,i,n,o){o=o||{};var a=o.auth||b1.singleKey(),s=o.inputIndex||0;if(t.length!==20)throw new Error("newOwnerHash must be 20 bytes (HASH160)");if(i<=1&&!o.allowLowValue)throw new Error("unlockTransfer: single-output token sets output = input - fee, which burns a "+i+"-sat UTXO (e.g. a 1-sat ordinal). Use Token.transferOrdinal / ownershipTokenMulti to preserve the satoshi.");y1.grind(r,s,n,i,o.grind);var u=F8.rawPreimage(r,s,n,i),c=a.unlockArgs(r,s,n,i,e),l=new K6().add(h.Buffer.from(t));return c.forEach(function(m){l.add(m)}),l.add(h.Buffer.from(u)),l}function oN(e,t,r,i,n,o,a){a=a||{};var s=a.auth||b1.singleKey(),u=a.inputIndex||0;if(t.length!==20)throw new Error("newOwnerHash must be 20 bytes (HASH160)");if(!o||o.tokenValue==null||o.tokenValue.length!==8)throw new Error("layout.tokenValue must be the 8-byte LE value of the token output");y1.grind(r,u,n,i,a.grind);var c=F8.rawPreimage(r,u,n,i),l=s.unlockArgs(r,u,n,i,e),m=new K6;return QC(m,o.before||h.Buffer.alloc(0)),QC(m,o.after||h.Buffer.alloc(0)),m.add(h.Buffer.from(o.tokenValue)),m.add(h.Buffer.from(t)),l.forEach(function(w){m.add(w)}),m.add(h.Buffer.from(c)),m}function Une(e,t){return nN(e,t)}function Fne(e,t,r,i,n,o){o=o||{},i==null&&(i=1);var a=o.tokenIndex||0,s=r.outputs||[],u=s[a];if(!u)throw new Error("transferOrdinal: spend has no output at tokenIndex "+a);if(u.satoshis!==i)throw new Error("transferOrdinal: token output value ("+u.satoshis+" sat) must equal the ordinal value ("+i+" sat) to avoid burning the inscription");function c(E){return E.toBufferWriter().toBuffer()}var l=h.Buffer.concat(s.slice(0,a).map(c)),m=h.Buffer.concat(s.slice(a+1).map(c)),w=new U8.crypto.BN(i).toBuffer({endian:"little",size:8});return oN(e,t,r,i,n,{before:l,after:m,tokenValue:w},o)}aN.exports={ownershipToken:Dne,ownershipTokenMulti:nN,ordinalLock:Une,ownerId:Lne,unlockTransfer:qne,unlockTransferMulti:oN,transferOrdinal:Fne}});var W8=k(($ge,sN)=>{"use strict";v();var V8=ke(),V6=Al(),Hne=N8(),jne=H8(),G8=Wo(),z8=V8.Script,xn=V8.Opcode,K8=V8.Transaction,j8=G8.scriptNum;function zne(e,t){return e instanceof K8.Output?e:e instanceof z8?new K8.Output({script:e,satoshis:t}):G8.p2pkhOutput(e,t)}function Kne(e,t,r,i,n,o){o=o||5e4;for(var a=0;a<o;a++){e.nLockTime=n+a;var s=G8.rawPreimage(e,t,r,i);if(V6.sFromPreimage(s))return s}throw new Error("covenant grind failed after "+o+" tries")}function $a(){if(!(this instanceof $a))return new $a;this._outputs=[],this._minLockTime=null}$a.prototype.payTo=function(e,t){return this._outputs.push(zne(e,t)),this};$a.prototype.lockUntil=function(e){return this._minLockTime=e,this};$a.prototype.outputs=function(){return this._outputs.map(function(e){return new K8.Output(e.toObject())})};$a.prototype.describe=function(){var e=[];return this._outputs.forEach(function(t,r){e.push("output["+r+"] = "+t.satoshis+" sat to "+t.script.toASM().slice(0,24)+"...")}),this._minLockTime!==null&&e.push("nLockTime >= "+this._minLockTime),"spend allowed iff: "+e.join(" AND ")};$a.prototype.compile=function(){if(this._outputs.length===0&&this._minLockTime===null)throw new Error("empty policy: add at least one constraint (payTo / lockUntil)");var e=this,t=new z8().add(xn.OP_DUP);if(V6.pushTxCore(t),t.add(xn.OP_VERIFY),this._outputs.length){var r=V6.hashOutputs(this._outputs);t.add(xn.OP_DUP),V6.extractHashOutputs(t),t.add(h.Buffer.from(r)).add(xn.OP_EQUALVERIFY)}return this._minLockTime!==null&&(t.add(xn.OP_DUP),t.add(j8(8)).add(xn.OP_RIGHT).add(j8(4)).add(xn.OP_LEFT),t.add(xn.OP_BIN2NUM).add(j8(this._minLockTime)).add(xn.OP_GREATERTHANOREQUAL).add(xn.OP_VERIFY)),t.add(xn.OP_DROP).add(xn.OP_1),{lock:t,outputs:e.outputs(),describe:function(){return e.describe()},unlock:function(i,n,o){o=o||0;var a=e._minLockTime===null?0:e._minLockTime;return e._minLockTime!==null&&(i.inputs[o].sequenceNumber=4294967294),new z8().add(Kne(i,o,t,n,a))}}};function Z8(){return new $a}Z8.perpetual=function(e){return Hne.pelsCovenant(e)};Z8.token=function(e,t){return jne.ownershipToken(e,t)};sN.exports={policy:Z8,Policy:$a}});var hN=k((Jge,lN)=>{"use strict";v();var G6=ke(),Vne=Wo();function fN(e){if(e===0)return"OP_0";if(e>=1&&e<=75)return"PUSH("+e+")";if(e===76)return"OP_PUSHDATA1";if(e===77)return"OP_PUSHDATA2";if(e===78)return"OP_PUSHDATA4";try{return G6.Opcode.fromNumber(e).toString()}catch{return"0x"+e.toString(16)}}function uN(e,t){t=t||16;var r=h.Buffer.from(e).toString("hex");return r.length<=t*2?r||"0":r.slice(0,t*2)+"...("+e.length+"B)"}function Gne(e,t,r){r=r||{};var i=new G6.Script.Interpreter,n=[];i.stepListener=function(a,s,u){n.push({phase:i.script===t?"lock":"unlock",op:fN(a.opcode&&typeof a.opcode.toNumber=="function"?a.opcode.toNumber():a.opcode.num),stack:s.map(function(c){return uN(c)}),altstack:u.map(function(c){return uN(c)})})};var o=i.verify(e,t,r.tx||new G6.Transaction,r.inputIndex||0,typeof r.flags=="number"?r.flags:Vne.flags(),new G6.crypto.BN(r.satoshis||0));return{ok:o,err:i.errstr||"",steps:n}}function cN(e){var t=[],r=null;return e.steps.forEach(function(i,n){i.phase!==r&&(t.push("-- "+i.phase+" script --"),r=i.phase);var o=i.stack.length?i.stack.join(" | "):"(empty)",a=i.altstack.length?" alt:["+i.altstack.join(" | ")+"]":"";t.push(String(n).padStart(3)+" "+i.op.padEnd(16)+" -> ["+o+"]"+a)}),t.push((e.ok?"VALID":"INVALID")+(e.err?" ("+e.err+")":"")),t.join(`
|
|
98
98
|
`)}function Zne(e){return console.log(cN(e)),e}lN.exports={trace:Gne,format:cN,print:Zne,opLabel:fN}});var pN=k((eve,dN)=>{"use strict";v();var _1=ke(),ie={Covenant:tC(),Preimage:Zo(),SIGHASH:nC(),Builder:aC(),UTXOGenerator:gC(),ScriptTester:mC(),CovenantBuilder:_8().CovenantBuilder,CovenantTemplates:_8().CovenantTemplates,OpcodeMap:m8(),ScriptUtils:EC(),StackExaminer:OC(),ScriptInterpreter:kC(),CovenantHelpers:Wo(),Locks:FC(),PushTx:Al(),PELS:N8(),Token:H8(),Authorizers:q8(),DSL:W8(),Policy:W8().Policy,Debugger:hN()};ie.policy=ie.DSL.policy;ie.trace=function(e,t,r){return ie.Debugger.trace(e,t,r)};ie.enableGenesis=function(e){return ie.CovenantHelpers.enableGenesis(e)};ie.verifyScript=function(e,t,r){return ie.CovenantHelpers.verify(e,t,r)};ie.perpetualCovenant=function(e){return ie.PELS.pelsCovenant(e)};ie.ownershipToken=function(e,t,r){return ie.Token.ownershipToken(e,t,r)};ie.valueCovenant=function(e){return ie.PushTx.valueCovenant(e)};ie.ordinalLock=function(e,t){return ie.Token.ordinalLock(e,t)};ie.transferOrdinal=function(e,t,r,i,n,o){return ie.Token.transferOrdinal(e,t,r,i,n,o)};ie.createCovenant=function(e,t){return new ie.Covenant(e,t)};ie.extractPreimage=function(e,t){return new ie.Preimage(e,t)};ie.analyzeSIGHASH=function(e){return new ie.SIGHASH(e)};ie.buildCovenant=function(e,t){return new ie.Builder(e,t)};ie.createUTXOGenerator=function(e){return new ie.UTXOGenerator(e)};ie.createTestEnvironment=function(e){return ie.UTXOGenerator.createTestEnvironment(e)};ie.testScript=function(e,t,r){return ie.ScriptTester.test(e,t,r)};ie.testCovenant=function(e,t,r){return ie.ScriptTester.testCovenant(e,t,r)};ie.testFieldExtraction=function(e,t,r){return ie.ScriptTester.testFieldExtraction(e,t,r)};ie.debugScript=function(e,t){var r=new ie.ScriptTester(t);return r.debug(e)};ie.explainZeroHashes=function(){return ie.SIGHASH.explainZeroMystery()};ie.getAllSIGHASHTypes=function(){return ie.SIGHASH.getAllTypes()};ie.demonstrateAllSIGHASH=function(){return ie.SIGHASH.generateAllDemonstrations()};ie.createCovenantBuilder=function(){return new ie.CovenantBuilder};ie.createValueLockCovenant=function(e){return ie.CovenantTemplates.valueLock(e)};ie.createHashLockCovenant=function(e){return ie.CovenantTemplates.hashLock(e)};ie.createComplexValidationCovenant=function(e){return ie.CovenantTemplates.complexValidation(e)};ie.getOpcodeMap=function(){return ie.OpcodeMap.opcodeMap};ie.simulateScript=function(e,t){return ie.OpcodeMap.utils.simulate(e,t)};ie.createASMFromJS=function(e){return ie.OpcodeMap.utils.createASM(e)};ie.scriptToASM=function(e){return ie.ScriptUtils.scriptToASM(e)};ie.asmToScript=function(e){return ie.ScriptUtils.asmToScript(e)};ie.asmToHex=function(e){return ie.ScriptUtils.asmToHex(e)};ie.hexToASM=function(e){return ie.ScriptUtils.hexToASM(e)};ie.scriptToHex=function(e){return ie.ScriptUtils.scriptToHex(e)};ie.validateASM=function(e){return ie.ScriptUtils.validateASM(e)};ie.validateScript=function(e){return ie.ScriptUtils.validateScript(e)};ie.estimateScriptSize=function(e){return ie.ScriptUtils.estimateScriptSize(e)};ie.optimizeScript=function(e){return ie.ScriptUtils.optimizeScript(e)};ie.compareScripts=function(e,t){return ie.ScriptUtils.compareScripts(e,t)};ie.explainScript=function(e){return ie.ScriptUtils.explainScript(e)};ie.scriptMetrics=function(e){return ie.ScriptUtils.scriptMetrics(e)};ie.analyzeComplexity=function(e){return ie.ScriptUtils.analyzeComplexity(e)};ie.findOptimizations=function(e){return ie.ScriptUtils.findOptimizations(e)};ie.covenantToEnglish=function(e){return ie.ScriptUtils.covenantToEnglish(e)};ie.batchTestScripts=function(e,t){return ie.ScriptUtils.batchTestScripts(e,t)};ie.examineStack=function(e,t){return ie.StackExaminer.runScript(e,t)};ie.debugScriptExecution=function(e,t,r){return r=r||{},r.stepMode?ie.ScriptInterpreter.stepThroughScript(ie.ScriptInterpreter.parseScript(e+" "+t),new _1.Transaction,!0):ie.ScriptInterpreter.runFullEvaluation(ie.ScriptInterpreter.parseScript(e),ie.ScriptInterpreter.parseScript(t),new _1.Transaction)};ie.parseScript=function(e){return ie.ScriptInterpreter.parseScript(e)};ie.printStack=function(e,t){return ie.ScriptInterpreter.printStack(e,t)};ie.createQuickCovenant=function(e,t){let r=ie.createCovenantBuilder();switch(e){case"value_lock":return r.comment(`Value lock: minimum ${t.value} satoshis`).extractField("value").push(t.value).greaterThanOrEqual().verify().build();case"hash_lock":return r.comment(`Hash lock: requires preimage of ${t.hash}`).push("secret_placeholder").sha256().push(t.hash).equalVerify().build();case"time_lock":return r.comment(`Time lock: requires nLockTime > ${t.timestamp}`).extractField("nLockTime").push(t.timestamp).greaterThan().verify().build();case"multi_condition":let i=r.comment("Multi-condition covenant");return t.conditions.forEach(n=>{switch(n.type){case"value":i=i.extractField("value").push(n.value).greaterThanOrEqual().verify();break;case"hash":i=i.push("secret_placeholder").sha256().push(n.hash).equalVerify();break;case"time":i=i.extractField("nLockTime").push(n.timestamp).greaterThan().verify();break}}),i.build();default:throw new Error(`Unknown covenant type: ${e}`)}};ie.completeCovenantFlow=function(e,t,r){var i=new ie.Covenant(e);return i.completeFlow(t,r)};ie.getEducationalResources=function(){return{zeroHashMystery:ie.SIGHASH.explainZeroMystery(),sighashTypes:ie.SIGHASH.getAllTypes(),exampleDemonstrations:ie.SIGHASH.generateAllDemonstrations()}};ie.utils={};ie.utils.reconstructP2pkhScript=function(e){return _1.Script.buildPublicKeyHashOut(e).toHex()};ie.utils.createCovenantAddress=function(e){var t=_1.crypto.Hash.sha256ripemd160(e.toBuffer());return _1.Address.fromScriptHash(t)};ie.utils.decodeCompactSize=function(e,t){return ie.Preimage.decodeCompactSize(e,t)};ie.version=Lm();ie.description="Smart Contract Framework for Bitcoin SV";ie.features={BIP143_PREIMAGE:!0,COMPACT_SIZE_VARINT:!0,BIDIRECTIONAL_EXTRACTION:!0,SIGHASH_DETECTION:!0,ZERO_HASH_WARNINGS:!0,MULTI_FIELD_VALIDATION:!0,REAL_UTXO_GENERATION:!0,SCRIPT_TESTING:!0,LOCAL_VERIFICATION:!0,JAVASCRIPT_TO_SCRIPT:!0,OPCODE_MAPPING:!0,COVENANT_BUILDER:!0,SCRIPT_ANALYSIS:!0,SCRIPT_OPTIMIZATION:!0,SCRIPT_CONVERSION:!0,BATCH_TESTING:!0,QUICK_COVENANTS:!0,SCRIPT_EXPLANATIONS:!0,STACK_EXAMINATION:!0,SCRIPT_DEBUGGING:!0,STEP_BY_STEP_EXECUTION:!0,INTERACTIVE_DEBUGGING:!0};ie.interpretScript=ie.debugScriptExecution;ie.getScriptMetrics=ie.scriptMetrics;dN.exports=ie});var gN=k((rve,w1)=>{"use strict";v();var Z6=function(){var e=typeof A.default<"u"&&A.default.env&&A.default.env.BSV_DEBUG||typeof window<"u"&&window.BSV_DEBUG;e&&console.log.apply(console,arguments)},Xa={MEMORY:"memory",SESSION:"session",LOCAL:"local"};function xi(e){e=e||{},this.options={storage:e.storage||Xa.MEMORY,storageKey:e.storageKey||"smartledger-utxos",autoSave:e.autoSave!==!1,maxUTXOs:e.maxUTXOs||1e3};var t=[Xa.MEMORY,Xa.SESSION,Xa.LOCAL];if(t.indexOf(this.options.storage)===-1)throw new Error("Invalid storage type: "+this.options.storage);this.utxos=new Map,this.addressIndex=new Map,this.spentUTXOs=new Map,this.metadata={totalUTXOs:0,totalValue:0,createdAt:new Date().toISOString(),lastModified:new Date().toISOString()},this.loadFromStorage()}xi.prototype.getStorage=function(){return this.options.storage===Xa.SESSION?typeof sessionStorage<"u"?sessionStorage:null:this.options.storage===Xa.LOCAL&&typeof localStorage<"u"?localStorage:null};xi.prototype.loadFromStorage=function(){var e=this.getStorage();if(e)try{var t=e.getItem(this.options.storageKey);if(!t)return;var r=JSON.parse(t);if(!r.utxos)return;var i=this;r.utxos.forEach(function(n){var o=n.txid+":"+n.vout;i.utxos.set(o,n),i.addressIndex.has(n.address)||i.addressIndex.set(n.address,new Set),i.addressIndex.get(n.address).add(o)}),r.metadata&&(this.metadata=r.metadata),Z6("\u2705 BrowserUTXOManager: Loaded "+this.utxos.size+" UTXOs from "+this.options.storage+" storage")}catch(n){console.error("Failed to load UTXOs from storage:",n)}};xi.prototype.saveToStorage=function(){if(this.options.storage!==Xa.MEMORY){var e=this.getStorage();if(e)try{var t={utxos:Array.from(this.utxos.values()),metadata:this.metadata,version:"1.0.0",timestamp:new Date().toISOString()};e.setItem(this.options.storageKey,JSON.stringify(t)),Z6("\u{1F4BE} BrowserUTXOManager: Saved "+this.utxos.size+" UTXOs to "+this.options.storage+" storage")}catch(r){console.error("Failed to save UTXOs to storage:",r)}}};xi.prototype.addUTXO=function(e){if(!e||!e.txid||typeof e.vout!="number")throw new Error("Invalid UTXO: missing txid or vout");var t=e.txid+":"+e.vout;if(this.utxos.has(t))return Z6("\u26A0\uFE0F UTXO already exists: "+t),!1;var r={txid:e.txid,vout:e.vout,address:e.address||"",satoshis:e.satoshis||0,script:e.script||"",status:"available",addedAt:new Date().toISOString()};return this.utxos.set(t,r),r.address&&(this.addressIndex.has(r.address)||this.addressIndex.set(r.address,new Set),this.addressIndex.get(r.address).add(t)),this.updateMetadata(),this.options.autoSave&&this.saveToStorage(),!0};xi.prototype.getUTXOsForAddress=function(e){var t=this.addressIndex.get(e);if(!t)return[];var r=[],i=this;return t.forEach(function(n){var o=i.utxos.get(n);o&&o.status==="available"&&r.push(o)}),r};xi.prototype.getBalance=function(e){var t=this.getUTXOsForAddress(e);return t.reduce(function(r,i){return r+(i.satoshis||0)},0)};xi.prototype.spendUTXOs=function(e,t){t=t||"browser-spend";for(var r=[],i=0;i<e.length;i++){var n=e[i],o=n.txid+":"+n.vout,a=this.utxos.get(o);a&&a.status==="available"&&(a.status="spent",a.spentAt=new Date().toISOString(),a.spentInTx=t,this.spentUTXOs.set(o,{txid:a.txid,vout:a.vout,spentInTx:t,spentAt:a.spentAt}),r.push(a))}return this.updateMetadata(),this.options.autoSave&&this.saveToStorage(),r};xi.prototype.getUTXO=function(e,t){var r=e+":"+t,i=this.utxos.get(r);return{exists:!!i,utxo:i,status:i?i.status:"not-found"}};xi.prototype.createMockUTXOs=function(e,t,r){t=t||5,r=r||1e5;for(var i=[],n=0;n<t;n++){for(var o="",a=0;a<64;a++)o+=Math.floor(Math.random()*16).toString(16);var s={txid:o,vout:n,address:e,satoshis:r+Math.floor(Math.random()*1e4),script:"",status:"available"};this.addUTXO(s),i.push(s)}return i};xi.prototype.getStats=function(){var e=0,t=0,r=0;return this.utxos.forEach(function(i){e+=i.satoshis||0,i.status==="available"?t++:i.status==="spent"&&r++}),{totalUTXOs:this.utxos.size,totalAvailable:t,totalSpent:r,totalValue:e,totalAddresses:this.addressIndex.size,storageType:this.options.storage,metadata:this.metadata}};xi.prototype.updateMetadata=function(){var e=this.getStats();this.metadata.totalUTXOs=e.totalUTXOs,this.metadata.totalValue=e.totalValue,this.metadata.lastModified=new Date().toISOString()};xi.prototype.exportData=function(){return JSON.stringify({utxos:Array.from(this.utxos.values()),metadata:this.metadata,version:"1.0.0",exportedAt:new Date().toISOString()})};xi.prototype.importData=function(e,t){t=t||!1;try{var r=JSON.parse(e);if(t||(this.utxos.clear(),this.addressIndex.clear(),this.spentUTXOs.clear()),r.utxos&&Array.isArray(r.utxos)){var i=this;r.utxos.forEach(function(n){i.addUTXO(n)})}return Z6("\u2705 BrowserUTXOManager: Imported "+(r.utxos&&r.utxos.length||0)+" UTXOs"),!0}catch(n){return console.error("Failed to import UTXO data:",n),!1}};typeof w1<"u"&&w1.exports?(w1.exports=xi,w1.exports.STORAGE_TYPES=Xa):typeof window<"u"&&(window.BrowserUTXOManager=xi,window.BrowserUTXOManager.STORAGE_TYPES=Xa)});var mN=k((nve,vN)=>{"use strict";v();var Y8=class{constructor(t,r={}){this.bsv=t,this.options={difficulty:r.difficulty||1,blockTime:r.blockTime||1e4,validateScripts:r.validateScripts!==!1,logLevel:r.logLevel||"info",...r},this.currentBlock={height:0,transactions:[],timestamp:Date.now()},this.mempool=[]}acceptTransaction(t){try{return this.options.validateScripts&&!this.validateTransactionSignatures(t)?(this.log("warn","\u274C Transaction rejected: Invalid signatures"),!1):(this.mempool.push(t),this.log("info",`\u2705 Transaction accepted into mempool: ${t.id||"unknown"}`),!0)}catch(r){return this.log("error",`\u274C Transaction rejected: ${r.message}`),!1}}validateTransactionSignatures(t){try{let r=t.verify();return this.log("debug",`\u{1F4CA} Transaction verification result: ${r}`),r===!0}catch(r){return this.log("warn",`\u26A0\uFE0F Signature validation error: ${r.message}`),!1}}mineBlock(t=10){let r=this.mempool.splice(0,t),i={height:this.currentBlock.height+1,timestamp:Date.now(),transactions:r,transactionCount:r.length,previousBlockHash:this.currentBlock.hash||"0000000000000000000000000000000000000000000000000000000000000000"},n=JSON.stringify({height:i.height,timestamp:i.timestamp,previousBlockHash:i.previousBlockHash,transactions:r.map(o=>o.id||o.toString())});return i.hash=this.bsv.crypto.Hash.sha256(h.Buffer.from(n)).toString("hex"),this.currentBlock=i,this.log("info",`\u26CF\uFE0F Mined block ${i.height} with ${r.length} transactions`),this.log("debug",`\u{1F4E6} Block hash: ${i.hash}`),i}getMempoolStats(){return{transactionCount:this.mempool.length,transactions:this.mempool.map(t=>({id:t.id||"unknown",size:t.toBuffer?t.toBuffer().length:0,inputs:t.inputs?t.inputs.length:0,outputs:t.outputs?t.outputs.length:0}))}}getBlockchainStats(){return{currentHeight:this.currentBlock.height,currentBlockHash:this.currentBlock.hash,currentBlockTimestamp:this.currentBlock.timestamp,mempoolSize:this.mempool.length,difficulty:this.options.difficulty,blockTime:this.options.blockTime}}reset(){this.currentBlock={height:0,transactions:[],timestamp:Date.now()},this.mempool=[],this.log("info","\u{1F504} Miner reset to genesis state")}log(t,r){let i={error:0,warn:1,info:2,debug:3},n=i[this.options.logLevel]||2;if(i[t]<=n){let o=new Date().toISOString();console.log(`[${o}] [${t.toUpperCase()}] ${r}`)}}};vN.exports=Y8});var bN=k((ave,yN)=>{v();var Ne=ke(),kl=class{static createSignature(t,r,i,n,o,a=null){a=a||Ne.crypto.Signature.SIGHASH_ALL|Ne.crypto.Signature.SIGHASH_FORKID;let s=Ne.Transaction.sighash.sign(t,r,a,i,n,new Ne.crypto.BN(o));return h.Buffer.concat([s.toDER(),h.Buffer.from([a])])}static createMultisigScript(t,r){let i=new Ne.Script().add(Ne.Opcode[`OP_${t}`]);for(let n of r)i=i.add(n.toBuffer());return i.add(Ne.Opcode[`OP_${r.length}`]).add(Ne.Opcode.OP_CHECKMULTISIG)}static createMultisigUnlocking(t){let r=new Ne.Script().add(Ne.Opcode.OP_0);for(let i of t)r=r.add(i);return r}static createTimelockScript(t,r){let i=h.Buffer.from(t.toString(16).padStart(8,"0"),"hex").reverse();return new Ne.Script().add(i).add(Ne.Opcode.OP_CHECKLOCKTIMEVERIFY).add(Ne.Opcode.OP_DROP).add(r.toBuffer())}static createConditionalScript(t,r=null){let i=new Ne.Script().add(Ne.Opcode.OP_IF).add(t.toBuffer());return r&&(i=i.add(Ne.Opcode.OP_ELSE).add(r.toBuffer())),i.add(Ne.Opcode.OP_ENDIF)}static createP2PKHScript(t){return new Ne.Script().add(Ne.Opcode.OP_DUP).add(Ne.Opcode.OP_HASH160).add(t.toAddress().hashBuffer).add(Ne.Opcode.OP_EQUALVERIFY).add(Ne.Opcode.OP_CHECKSIG)}static createP2PKHUnlocking(t,r){return new Ne.Script().add(t).add(r.toBuffer())}static getPreimage(t,r,i,n,o=null){return o=o||Ne.crypto.Signature.SIGHASH_ALL|Ne.crypto.Signature.SIGHASH_FORKID,Ne.Transaction.sighash.sighash(t,o,r,i,new Ne.crypto.BN(n))}static createDataScript(t){return typeof t=="string"&&(t=h.Buffer.from(t,"utf8")),new Ne.Script().add(t)}static createOpReturnScript(t){return typeof t=="string"&&(t=h.Buffer.from(t,"utf8")),new Ne.Script().add(Ne.Opcode.OP_FALSE).add(Ne.Opcode.OP_RETURN).add(t)}static validateTransaction(t){try{return t.verify()}catch(r){return console.error("Transaction validation error:",r.message),!1}}static validateScript(t,r,i,n){try{return new Ne.Script.Interpreter().verify(t,r,i,n,Ne.Script.Interpreter.SCRIPT_VERIFY_P2SH|Ne.Script.Interpreter.SCRIPT_VERIFY_STRICTENC|Ne.Script.Interpreter.SCRIPT_ENABLE_SIGHASH_FORKID|Ne.Script.Interpreter.SCRIPT_ENABLE_MAGNETIC_OPCODES|Ne.Script.Interpreter.SCRIPT_ENABLE_MONOLITH_OPCODES)}catch(o){return console.error("Script validation error:",o.message),!1}}static createLowFeeTransaction(t,r,i=10){let n=new Ne.Transaction().feePerKb(i);for(let o of t)n=n.from(o);for(let o of r)n=n.to(o.address,o.satoshis);return n}};kl.SIGHASH_ALL=Ne.crypto.Signature.SIGHASH_ALL|Ne.crypto.Signature.SIGHASH_FORKID;kl.SIGHASH_NONE=Ne.crypto.Signature.SIGHASH_NONE|Ne.crypto.Signature.SIGHASH_FORKID;kl.SIGHASH_SINGLE=Ne.crypto.Signature.SIGHASH_SINGLE|Ne.crypto.Signature.SIGHASH_FORKID;yN.exports=kl});var W6=k((uve,ON)=>{"use strict";v();var x1=ke(),wN=h.Buffer.from("ord","utf8");function $8(){return x1.Script}function SN(){return x1.Opcode}function xN(e){if(e===null)return"null";if(e===void 0)return"undefined";if(Array.isArray(e))return"an array";var t=typeof e;return(t==="object"?"an ":"a ")+t}function _N(e,t){if(h.Buffer.isBuffer(e))return e;if(typeof e=="string")return h.Buffer.from(e,"utf8");throw new Error(t+" must be a string or Buffer, got "+xN(e))}var Wne=["data","body","payload","text","message"];function Yne(e){var t=$8(),r=e.lock!=null,i=e.address!=null;if(r&&i)throw new Error("buildInscription accepts `lock` or `address`, not both \u2014 they name different owners and one would be silently ignored");if(r){var n;if(e.lock instanceof t)n=e.lock;else if(h.Buffer.isBuffer(e.lock))n=t.fromBuffer(e.lock);else if(typeof e.lock=="string")n=t.fromHex(e.lock);else throw new Error("lock must be a Script, Buffer, or hex string, got "+xN(e.lock));if(!n.chunks.length&&!e.allowEmptyLock)throw new Error("lock is empty: the inscription would carry no locking script at all and the ordinal would be spendable by anyone. Pass a real lock, or { allowEmptyLock: true } if you are appending this envelope to your own script");return n}if(i){var o=e.address instanceof x1.Address?e.address:x1.Address.fromString(String(e.address));return t.buildPublicKeyHashOut(o)}throw new Error("buildInscription requires an address or a lock script")}function EN(e){e=e||{};var t=SN(),r=Yne(e);if(e.content==null){var i=Wne.filter(function(s){return e[s]!=null})[0];throw new Error("buildInscription requires `content`"+(i?" \u2014 received `"+i+"`, which is not read":"")+". Omitting it would inscribe an empty payload; pass content: '' if that is intended")}var n=_N(e.content,"content"),o;if(e.contentType==null){if(h.Buffer.isBuffer(e.content))throw new Error("contentType is required when content is a Buffer (e.g. 'image/png', 'application/octet-stream') \u2014 it cannot be inferred from bytes");o=h.Buffer.from("text/plain","utf8")}else if(o=_N(e.contentType,"contentType"),!o.length)throw new Error("contentType must not be empty");var a=$8().fromBuffer(r.toBuffer());return a.add(t.OP_FALSE),a.add(t.OP_IF),a.add(wN),a.add(t.OP_1),a.add(o),a.add(t.OP_0),a.add(n),a.add(t.OP_ENDIF),a}function S1(e,t){return e&&e.opcodenum===t&&e.buf==null}function IN(e){for(var t=$8(),r=SN(),i=e instanceof t?e:h.Buffer.isBuffer(e)?t.fromBuffer(e):t.fromHex(e),n=i.chunks,o=-1,a=0;a+2<n.length;a++)if(S1(n[a],r.OP_FALSE)&&S1(n[a+1],r.OP_IF)&&n[a+2].buf&&n[a+2].buf.equals(wN)){o=a;break}if(o===-1)return null;for(var s=h.Buffer.alloc(0),u=h.Buffer.alloc(0),c=n.length,l=o+3;l<n.length;l++){var m=n[l];if(S1(m,r.OP_ENDIF)){c=l;break}S1(m,r.OP_1)&&n[l+1]&&n[l+1].buf?(s=n[l+1].buf,l++):S1(m,r.OP_0)&&n[l+1]&&n[l+1].buf&&(u=n[l+1].buf,l++)}for(var w=new t,E=0;E<o;E++)w.chunks.push(n[E]);for(var P=c+1;P<n.length;P++)w.chunks.push(n[P]);return{contentType:s.toString("utf8"),content:u,contentText:u.toString("utf8"),lock:w}}function $ne(e){try{return IN(e)!==null}catch{return!1}}function Xne(e){e=e||{};var t=e.satoshis!=null?e.satoshis:1;if(typeof t!="number"||!Number.isInteger(t)||t<1)throw new Error("satoshis must be a positive integer (1 for a standard 1Sat ordinal)");return new x1.Transaction.Output({script:EN(e),satoshis:t})}ON.exports={buildInscription:EN,parseInscription:IN,isInscription:$ne,createInscriptionOutput:Xne}});var CN=k((cve,MN)=>{"use strict";v();var qr=ke(),Bl=Al(),X8=Wo(),TN=W6(),Xo=qr.Script,Xt=qr.Opcode,kN=qr.encoding.BufferReader,X6=Bl.SIGHASH_ALL_ANYONECANPAY_FORKID;function AN(e,t){return t&&t.length?e.add(h.Buffer.from(t)):e.add(Xt.OP_0)}function Y6(e){return e.toBufferWriter().toBuffer()}function Ml(e,t){if(typeof e!="number"||!isFinite(e)||e<0||Math.floor(e)!==e)throw new Error(t+" must be a non-negative integer number of satoshis (got "+e+")");return e}function Q6(e){return e instanceof Xo?e:h.Buffer.isBuffer(e)?Xo.fromBuffer(e):Xo.fromHex(e)}function RN(e){return e instanceof qr.Address?e:e&&typeof e.toAddress=="function"?e.toAddress():qr.Address.fromString(String(e))}function Jne(e){if(h.Buffer.isBuffer(e)){if(e.length!==20)throw new Error("seller pubkeyhash buffer must be 20 bytes (HASH160)");return e}return e instanceof qr.PublicKey?qr.crypto.Hash.sha256ripemd160(e.toBuffer()):RN(e).hashBuffer}function Cl(e,t){return Ml(t,"payment price"),new qr.Transaction.Output({script:Xo.buildPublicKeyHashOut(RN(e)),satoshis:t})}function $6(e){if(e instanceof qr.Transaction.Output)return e;if(h.Buffer.isBuffer(e))return qr.Transaction.Output.fromBufferReader(new kN(e));var t=e.payTo!=null?e.payTo:e.address,r=e.satoshis!=null?e.satoshis:e.price;if(t==null||r==null)throw new Error("payment spec needs {address|payTo, satoshis|price}");return Cl(t,r)}function Qne(e){if(e.payOutputs){if(!e.payOutputs.length)throw new Error("payOutputs must be a non-empty array");return e.payOutputs.map($6)}if(e.payOutput!=null)return[$6(e.payOutput)];if(e.price!=null){var t=e.payTo!=null?e.payTo:e.seller,r=t instanceof qr.Transaction.Output?t:Cl(t,e.price),i=[r];return e.royalties&&e.royalties.forEach(function(n){i.push($6(n))}),i}throw new Error("buildOrdLock requires a price, a payOutput, or payOutputs")}function eoe(e){return h.Buffer.concat(e.map(Y6))}function e5(e){if(e=e||{},e.seller==null)throw new Error("buildOrdLock requires a seller");var t=Jne(e.seller),r=eoe(Qne(e)),i=new Xo;if(i.add(Xt.OP_IF),i.add(Xt.OP_DUP).add(Xt.OP_HASH160),i.add(h.Buffer.from(t)).add(Xt.OP_EQUALVERIFY).add(Xt.OP_CHECKSIG),i.add(Xt.OP_ELSE),i.add(Xt.OP_DUP),Bl.pushTxCore(i,{sighashType:X6}),i.add(Xt.OP_VERIFY),Bl.assertSighashType(i,X6),Bl.extractHashOutputs(i),i.add(Xt.OP_TOALTSTACK),i.add(h.Buffer.from(r)).add(Xt.OP_CAT),i.add(Xt.OP_SWAP).add(Xt.OP_CAT),i.add(Xt.OP_HASH256),i.add(Xt.OP_FROMALTSTACK).add(Xt.OP_EQUAL),i.add(Xt.OP_ENDIF),e.inscription){var n=TN.buildInscription({lock:new Xo,allowEmptyLock:!0,contentType:e.inscription.contentType,content:e.inscription.content});n.chunks.forEach(function(o){i.chunks.push(o)})}return i}function Rl(e,t){return e&&e.opcodenum===t&&e.buf==null}function PN(e){for(var t=new kN(e),r=[];!t.eof();)r.push(qr.Transaction.Output.fromBufferReader(t));return r}function t5(e,t){var r=t&&t.network;try{for(var i=Q6(e),n=i.chunks,o=0,a=-1,s=-1,u=-1,c=0;c<n.length;c++)if(Rl(n[c],Xt.OP_IF))o===0&&(a=c),o++;else if(Rl(n[c],Xt.OP_ELSE)&&o===1)s=c;else if(Rl(n[c],Xt.OP_ENDIF)&&(o--,o===0)){u=c;break}if(a===-1||s===-1||u===-1)return null;for(var l=null,m=a+1;m<s;m++)if(n[m].buf&&n[m].buf.length===20){l=n[m].buf;break}if(!l)return null;for(var w=null,E=s+1;E<u;E++)Rl(n[E],Xt.OP_TOALTSTACK)&&n[E+1]&&n[E+1].buf&&Rl(n[E+2],Xt.OP_CAT)&&Rl(n[E+3],Xt.OP_SWAP)&&(w=n[E+1].buf);if(!w)return null;var P=PN(w).map(function(K){var C=null;try{K.script.isPublicKeyHashOut()&&(C=K.script.toAddress(r).toString())}catch{}return{satoshis:K.satoshis,script:K.script,address:C}}),M=P.reduce(function(K,C){return K+C.satoshis},0),D=null,L=TN.parseInscription(i);L&&(D={contentType:L.contentType,content:L.content,contentText:L.contentText});var U=e5({seller:l,payOutputs:PN(w),inscription:L?{contentType:L.contentType,content:L.content}:void 0});return U.toHex()!==i.toHex()?null:{seller:{pubKeyHash:l,address:qr.Address.fromPublicKeyHash(l,r).toString()},payOutputs:P,payBlob:w,totalPrice:M,inscription:D}}catch{return null}}function toe(e,t){return t5(e,t)!==null}function roe(e){e=e||{};var t=e.satoshis!=null?e.satoshis:1;return new qr.Transaction.Output({script:e5(e),satoshis:t})}function BN(e){e=e||{};var t=e.spend,r=e.lockingScript;if(!t||!r)throw new Error("purchase requires { spend, lockingScript }");var i=e.inputIndex||0,n=e.payoutIndex!=null?e.payoutIndex:1,o=e.satoshis!=null?e.satoshis:1,a=t.outputs||[],s=e.parsed||t5(r),u=e.payoutCount!=null?e.payoutCount:s?s.payOutputs.length:1;if(n+u>a.length)throw new Error("purchase: spend has fewer outputs than the pinned block requires (need "+(n+u)+", have "+a.length+")");if(e.validate!==!1&&s){var c=h.Buffer.concat(a.slice(n,n+u).map(Y6));if(!c.equals(s.payBlob))throw new Error("purchase: outputs ["+n+".."+(n+u-1)+"] do not match the listing payment \u2014 the seller (or a royalty/fee payee) would not be paid")}var l=h.Buffer.concat(a.slice(0,n).map(Y6)),m=h.Buffer.concat(a.slice(n+u).map(Y6)),w=Object.assign({sighashType:X6},e.grind||{}),E=Bl.grind(t,i,r,o,w),P=new Xo;return AN(P,m),AN(P,l),P.add(h.Buffer.from(E.preimage)),P.add(Xt.OP_FALSE),t.inputs[i].setScript(P),P}function ioe(e){e=e||{};var t=e.privateKey,r=e.spend,i=e.lockingScript;if(!t||!r||!i)throw new Error("cancel requires { privateKey, spend, lockingScript }");var n=e.inputIndex||0,o=e.satoshis!=null?e.satoshis:1,a=e.sighashType!=null?e.sighashType:X8.SIGHASH,s=X8.signInput(r,t,n,i,o,a),u=new Xo;return u.add(h.Buffer.from(s)),u.add(t.toPublicKey().toBuffer()),u.add(Xt.OP_TRUE),r.inputs[n].setScript(u),u}function J6(e,t,r,i){e.addInput(new qr.Transaction.Input({prevTxId:t.txid||t.prevTxId,outputIndex:t.outputIndex!=null?t.outputIndex:t.vout,script:Xo.empty()}),Q6(r),i)}function J8(e,t,r){Ml(r.satoshis,"input "+t+" satoshis");var i=Q6(r.script),n=X8.signInput(e,r.privateKey,t,i,r.satoshis,Bl.SIGHASH_ALL_FORKID),o=new Xo;o.add(h.Buffer.from(n)),o.add(r.privateKey.toPublicKey().toBuffer()),e.inputs[t].setScript(o)}function noe(e){e=e||{};var t=e.ordinal;if(!t||!t.script||!t.privateKey)throw new Error("buildListingTx requires ordinal { script, privateKey, txid, outputIndex }");var r=Ml(t.satoshis!=null?t.satoshis:1,"ordinal satoshis"),i=e5(e),n=e.funding||[],o=e.fee!=null?e.fee:500,a=n.reduce(function(c,l){return c+Ml(l.satoshis,"funding satoshis")},0),s=a-o;if(s<0)throw new Error("buildListingTx: insufficient funding \u2014 need "+o+" sat fee, funded "+a);var u=new qr.Transaction;return J6(u,t,t.script,r),n.forEach(function(c){J6(u,c,c.script,c.satoshis)}),u.addOutput(new qr.Transaction.Output({script:i,satoshis:r})),s>0&&u.addOutput(Cl(e.changeAddress||t.privateKey.toAddress(),s)),J8(u,0,{script:t.script,privateKey:t.privateKey,satoshis:r}),n.forEach(function(c,l){J8(u,1+l,c)}),{tx:u,listingScript:i,listingOutpoint:{txid:u.hash,outputIndex:0}}}function ooe(e){e=e||{};var t=e.listing;if(!t||!t.script)throw new Error("buildPurchaseTx requires listing.script");if(!e.ordinalDestination)throw new Error("buildPurchaseTx requires ordinalDestination");if(!e.funding||!e.funding.length)throw new Error("buildPurchaseTx requires funding coins");var r=Q6(t.script),i=t5(r);if(!i)throw new Error("buildPurchaseTx: listing.script is not a parseable OrdLock");var n=Ml(t.satoshis!=null?t.satoshis:1,"listing satoshis"),o=e.payOutputs?e.payOutputs.map($6):i.payOutputs.map(function(m){return new qr.Transaction.Output({script:m.script,satoshis:m.satoshis})}),a=o.reduce(function(m,w){return m+w.satoshis},0),s=e.fee!=null?e.fee:500,u=e.funding.reduce(function(m,w){return m+Ml(w.satoshis,"funding satoshis")},0),c=u-a-s;if(c<0)throw new Error("buildPurchaseTx: insufficient funding \u2014 need "+(a+s)+" sat (payments "+a+" + fee "+s+"), funded "+u);var l=new qr.Transaction;return J6(l,t,r,n),e.funding.forEach(function(m){J6(l,m,m.script,m.satoshis)}),l.addOutput(Cl(e.ordinalDestination,n)),o.forEach(function(m){l.addOutput(m)}),c>0&&l.addOutput(Cl(e.changeAddress||e.ordinalDestination,c)),BN({spend:l,lockingScript:r,parsed:i,satoshis:n,inputIndex:0,payoutIndex:1,payoutCount:o.length,grind:e.grind}),e.funding.forEach(function(m,w){J8(l,1+w,m)}),l}MN.exports={ORDLOCK_SIGHASH:X6,buildOrdLock:e5,parseOrdLock:t5,isOrdLock:toe,listInscriptionOutput:roe,payOutputFor:Cl,purchase:BN,cancel:ioe,buildListingTx:noe,buildPurchaseTx:ooe}});var QN=k((hve,JN)=>{"use strict";v();var NN=W6(),DN="application/bsv-20",Q8=18,r5="18446744073709551615";function LN(e){return typeof e=="string"&&/^\d+$/.test(e)}function qN(e){return e.length>r5.length||e.length===r5.length&&e>r5}function UN(e,t){var r;if(typeof e=="number"){if(!Number.isInteger(e)||e<0)throw new Error(t+" must be a non-negative integer");if(e>Number.MAX_SAFE_INTEGER)throw new Error(t+" exceeds Number.MAX_SAFE_INTEGER and would lose precision \u2014 pass it as a string");r=String(e)}else if(LN(e))r=e.replace(/^0+(?=\d)/,"");else throw new Error(t+" must be a non-negative integer (string or number)");if(qN(r))throw new Error(t+" exceeds the uint64 maximum ("+r5+")");return r}function E1(e,t){var r=UN(e,t);if(!/[1-9]/.test(r))throw new Error(t+" must be greater than zero");return r}function FN(e){if(typeof e!="string"||!e.length)throw new Error("tick is required");if(h.Buffer.byteLength(e,"utf8")>4)throw new Error("tick must be 1\u20134 UTF-8 bytes");return e}function e7(e){var t=typeof e=="string"?Number(e):e;if(!Number.isInteger(t)||t<0||t>Q8)throw new Error("dec must be an integer 0\u2026"+Q8);return String(t)}var t7=/^[0-9a-fA-F]{64}_\d+$/;function r7(e){if(typeof e!="string"||!t7.test(e))throw new Error('id must be "<txid>_<vout>" (64-hex txid, underscore, output index)');return e}function i7(e,t){if(typeof e!="string"){var r=e===null?"null":Array.isArray(e)?"an array":(typeof e=="object"?"an ":"a ")+typeof e;throw new Error(t+" must be a string, got "+r)}if(!e.length)throw new Error(t+" must not be empty");return e}function HN(e){if(i7(e,"icon"),!t7.test(e))throw new Error('icon must be an outpoint reference "<txid>_<vout>" (64-hex txid, underscore, output index)');return e}function If(e,t){return t=t||{},NN.buildInscription({lock:t.lock,address:t.address,contentType:t.contentType||DN,content:JSON.stringify(e)})}function jN(e){e=e||{};var t={p:"bsv-20",op:"deploy",tick:FN(e.tick),max:E1(e.max,"max")};return e.lim!=null&&(t.lim=UN(e.lim,"lim")),e.dec!=null&&(t.dec=e7(e.dec)),If(t,e)}function zN(e,t,r){var i=t.tick!=null,n=t.id!=null;if(i&&n)throw new Error(r+" names a token by `tick` (v1) or `id` (BSV-21), not both");if(!i&&!n)throw new Error(r+" requires `tick` (v1) or `id` (BSV-21)");return n?e.id=r7(t.id):e.tick=FN(t.tick),e}function KN(e,t){if(e.amt!=null)throw new Error(t+" must not carry an amt \u2014 the specification forbids it, and a payload that does is discarded")}function VN(e){e=e||{};var t={p:"bsv-20",op:"mint"};return zN(t,e,"mint"),t.amt=E1(e.amt,"amt"),If(t,e)}function GN(e){e=e||{};var t={p:"bsv-20",op:"transfer",amt:E1(e.amt,"amt")};return zN(t,e,"transfer"),If(t,e)}function ZN(e){if(e=e||{},e.tick!=null)throw new Error("burn is a BSV-21 operation and names its token by `id` (<txid>_<vout>), not `tick`");var t={p:"bsv-20",op:"burn",id:r7(e.id),amt:E1(e.amt,"amt")};return If(t,e)}function WN(e){e=e||{},KN(e,"deploy+auth");var t={p:"bsv-20",op:"deploy+auth"};return e.dec!=null&&(t.dec=e7(e.dec)),e.sym!=null&&(t.sym=i7(e.sym,"sym")),e.icon!=null&&(t.icon=HN(e.icon)),If(t,e)}function YN(e){e=e||{},KN(e,"auth");var t={p:"bsv-20",op:"auth",id:r7(e.id)};return If(t,e)}function $N(e){e=e||{};var t={p:"bsv-20",op:"deploy+mint",amt:E1(e.amt,"amt")};return e.dec!=null&&(t.dec=e7(e.dec)),e.sym!=null&&(t.sym=i7(e.sym,"sym")),e.icon!=null&&(t.icon=HN(e.icon)),If(t,e)}function Of(e,t){var r=ke();return new r.Transaction.Output({script:e,satoshis:t??1})}function aoe(e){return Of(jN(e),e&&e.satoshis)}function soe(e){return Of(VN(e),e&&e.satoshis)}function uoe(e){return Of(GN(e),e&&e.satoshis)}function foe(e){return Of($N(e),e&&e.satoshis)}function coe(e){return Of(ZN(e),e&&e.satoshis)}function loe(e){return Of(WN(e),e&&e.satoshis)}function hoe(e){return Of(YN(e),e&&e.satoshis)}function doe(e){var t=ke();if(e&&typeof e=="object"&&!h.Buffer.isBuffer(e)&&!(e instanceof t.Script)||typeof e=="string"&&e.trim()[0]==="{")return e;var r=NN.parseInscription(e);return r?r.contentText:null}var poe={deploy:{need:["tick","max"]},mint:{need:["amt"],tickOrId:!0},transfer:{need:["amt"],tickOrId:!0},"deploy+mint":{need:["amt"]},"deploy+auth":{need:[],noAmt:!0},auth:{need:["id"],noAmt:!0},burn:{need:["id","amt"]}};function goe(e){var t=typeof e=="number"?Number.isInteger(e)&&e>=0?String(e):null:LN(e)?e:null;return t==null?!1:!qN(t.replace(/^0+(?=\d)/,""))}function voe(e){if(!e||e.p!=="bsv-20"||typeof e.op!="string")return!1;var t=poe[e.op];if(!t)return!1;for(var r=0;r<t.need.length;r++)if(e[t.need[r]]==null)return!1;if(t.tickOrId&&e.tick==null==(e.id==null)||t.noAmt&&e.amt!=null||e.tick!=null&&(typeof e.tick!="string"||!e.tick.length||h.Buffer.byteLength(e.tick,"utf8")>4)||e.id!=null&&(typeof e.id!="string"||!t7.test(e.id)))return!1;for(var i=["amt","max","lim"],n=0;n<i.length;n++)if(e[i[n]]!=null&&!goe(e[i[n]]))return!1;if(e.dec!=null){var o=typeof e.dec=="string"?Number(e.dec):e.dec;if(!Number.isInteger(o)||o<0||o>Q8)return!1}return!0}function XN(e){try{var t=doe(e);if(t==null)return null;var r=typeof t=="object"?t:JSON.parse(t);return voe(r)?r:null}catch{return null}}function moe(e){return XN(e)!==null}JN.exports={CONTENT_TYPE:DN,buildDeploy:jN,buildMint:VN,buildTransfer:GN,buildDeployMint:$N,buildBurn:ZN,buildDeployAuth:WN,buildAuth:YN,createDeployOutput:aoe,createMintOutput:soe,createTransferOutput:uoe,createDeployMintOutput:foe,createBurnOutput:coe,createDeployAuthOutput:loe,createAuthOutput:hoe,parseBsv20:XN,isBsv20:moe}});var tD=k((pve,eD)=>{"use strict";v();var I1=W6(),Jo=CN(),yoe=QN();function boe(e){if(!Array.isArray(e)||!e.length)throw new Error("batchInscriptionOutputs requires a non-empty array of items");return e.map(function(t){return I1.createInscriptionOutput(t)})}eD.exports={buildInscription:I1.buildInscription,parseInscription:I1.parseInscription,isInscription:I1.isInscription,createInscriptionOutput:I1.createInscriptionOutput,batchInscriptionOutputs:boe,ORDLOCK_SIGHASH:Jo.ORDLOCK_SIGHASH,buildOrdLock:Jo.buildOrdLock,parseOrdLock:Jo.parseOrdLock,isOrdLock:Jo.isOrdLock,listInscriptionOutput:Jo.listInscriptionOutput,payOutputFor:Jo.payOutputFor,purchaseOrdLock:Jo.purchase,cancelOrdLock:Jo.cancel,buildListingTx:Jo.buildListingTx,buildPurchaseTx:Jo.buildPurchaseTx,BSV20:yoe}});var i5=k((mve,iD)=>{"use strict";v();var Fs=ke(),n7=Fs.PublicKey,O1=Fs.PrivateKey,rD=Fs.crypto.Hash,En=Fs.util.preconditions,vve=Fs.errors;function Nt(e){return this instanceof Nt?(this.options=e||{},this.network=this.options.network||"mainnet",this.registry=this.options.registry||null,this):new Nt(e)}Nt.fromPublicKey=function(e,t){t=t||{},typeof e=="string"&&(e=n7.fromString(e)),En.checkArgument(e instanceof n7,"Invalid public key");var r=e.toString("hex"),i=t.network||"mainnet",n=t.path||"",o="did:smartledger:"+r;return i!=="mainnet"&&(o+=":"+i),n&&(o+=":"+n),o};Nt.fromPrivateKey=function(e,t){return typeof e=="string"&&(e=O1.fromWIF(e)),En.checkArgument(e instanceof O1,"Invalid private key"),Nt.fromPublicKey(e.toPublicKey(),t)};Nt.parseDID=function(e){if(En.checkArgument(typeof e=="string","DID must be a string"),!e.startsWith("did:smartledger:"))throw new Error("Invalid SmartLedger DID format");var t=e.split(":");if(t.length<3)throw new Error("Invalid DID format");var r={method:"smartledger",identifier:t[2],network:"mainnet",path:""};return t.length>3&&t[3]!==""&&(r.network=t[3]),t.length>4&&(r.path=t.slice(4).join(":")),r};Nt.isValidDID=function(e){try{var t=Nt.parseDID(e);return!(!/^[0-9a-fA-F]{66}$/.test(t.identifier)&&!/^[0-9a-fA-F]{130}$/.test(t.identifier)||!["mainnet","testnet","regtest"].includes(t.network))}catch{return!1}};Nt.getPublicKey=function(e){var t=Nt.parseDID(e);return n7.fromString(t.identifier)};Nt.createDocument=function(e,t){t=t||{},En.checkArgument(Nt.isValidDID(e),"Invalid DID");var r=Nt.getPublicKey(e),i=e+"#keys-1",n={"@context":["https://www.w3.org/ns/did/v1","https://w3id.org/security/suites/secp256k1-2019/v1"],id:e,verificationMethod:[{id:i,type:"EcdsaSecp256k1VerificationKey2019",controller:e,publicKeyHex:r.toString("hex")}],authentication:[i],assertionMethod:[i],keyAgreement:[i],capabilityInvocation:[i],capabilityDelegation:[i]};return t.services&&Array.isArray(t.services)&&(n.service=t.services),t.verificationMethods&&(n.verificationMethod=n.verificationMethod.concat(t.verificationMethods)),t.created&&(n.created=t.created),t.updated&&(n.updated=t.updated),n};Nt.resolve=async function(e,t){t=t||{};try{En.checkArgument(Nt.isValidDID(e),"Invalid DID");var r=Nt.createDocument(e,t);return{"@context":"https://w3id.org/did-resolution/v1",didDocument:r,didResolutionMetadata:{contentType:"application/did+ld+json",retrieved:new Date().toISOString()},didDocumentMetadata:{method:{published:!0,recoveryCommitment:null,updateCommitment:null}}}}catch(i){return{"@context":"https://w3id.org/did-resolution/v1",didDocument:null,didResolutionMetadata:{error:"notFound",errorMessage:i.message},didDocumentMetadata:{}}}};Nt.verifyOwnership=function(e,t,r){try{var i=Nt.getPublicKey(e),n=rD.sha256(h.Buffer.isBuffer(r)?r:h.Buffer.from(r,"utf8")),o=Fs.crypto.Signature.fromString(t),a=new Fs.crypto.ECDSA;return a.hashbuf=n,a.pubkey=i,a.sig=o,a.verify()===!0}catch{return!1}};Nt.signMessage=function(e,t){En.checkArgument(t instanceof O1,"Invalid private key");var r=rD.sha256(h.Buffer.isBuffer(e)?e:h.Buffer.from(e,"utf8")),i=new Fs.crypto.ECDSA;return i.hashbuf=r,i.privkey=t,i.pubkey=t.toPublicKey(),i.sign().toString()};Nt.createProofOfOwnership=function(e,t){En.checkArgument(e instanceof O1,"Invalid private key"),En.checkArgument(typeof t=="string","Challenge must be a string");var r=Nt.fromPrivateKey(e),i=new Date().toISOString(),n=t+":"+i+":"+r,o=Nt.signMessage(n,e);return{type:"EcdsaSecp256k1Signature2019",created:i,verificationMethod:r+"#keys-1",proofPurpose:"authentication",challenge:t,jws:o}};Nt.verifyProofOfOwnership=function(e,t){try{En.checkArgument(e&&typeof e=="object","Invalid proof object"),En.checkArgument(typeof t=="string","DID must be a string");var r=e.challenge+":"+e.created+":"+t;return Nt.verifyOwnership(t,e.jws,r)}catch{return!1}};Nt.createDIDURL=function(e,t){return En.checkArgument(typeof e=="string","DID must be a string"),En.checkArgument(typeof t=="string","Fragment must be a string"),e+"#"+t};Nt.generateTestDID=function(e){e=e||{};var t=new O1,r=Nt.fromPrivateKey(t,e),i=Nt.createDocument(r,e);return{did:r,privateKey:t.toWIF(),publicKey:t.toPublicKey().toString("hex"),document:i}};iD.exports=Nt});var n5=k((wve,aD)=>{"use strict";v();var Nl=ke(),_oe=i5(),nD=Nl.PrivateKey,Hs=Nl.crypto.Hash,oD=Nl.crypto.ECDSA,bve=Nl.crypto.Signature,js=Nl.util.preconditions,_ve=Et();function hr(e,t){return this instanceof hr?(typeof e=="string"&&(e=nD.fromWIF(e)),js.checkArgument(e instanceof nD,"Invalid private key"),this.privateKey=e,this.publicKey=e.toPublicKey(),this.options=t||{},this.did=_oe.fromPrivateKey(e,this.options),this):new hr(e,t)}hr._sortValue=function(e){return Array.isArray(e)?e.map(function(t){return hr._sortValue(t)}):e!==null&&typeof e=="object"?Object.keys(e).sort().reduce(function(t,r){return t[r]=hr._sortValue(e[r]),t},{}):e};hr._canonicalizeJSON=function(e){return JSON.stringify(hr._sortValue(e))};hr._hashCredential=function(e){var t=hr._canonicalizeJSON(e);return Hs.sha256(h.Buffer.from(t,"utf8"))};hr.prototype.createCredential=function(e,t){t=t||{},js.checkArgument(e&&typeof e=="object","Invalid credential subject");var r=new Date().toISOString(),i=t.id||"urn:uuid:"+this._generateUUID(),n={"@context":["https://www.w3.org/2018/credentials/v1"],id:i,type:["VerifiableCredential"],issuer:this.did,issuanceDate:r,credentialSubject:e};return t.type&&(Array.isArray(t.type)?n.type=n.type.concat(t.type):n.type.push(t.type)),t.context&&(Array.isArray(t.context)?n["@context"]=n["@context"].concat(t.context):n["@context"].push(t.context)),t.expirationDate&&(n.expirationDate=t.expirationDate),t.termsOfUse&&(n.termsOfUse=t.termsOfUse),t.evidence&&(n.evidence=t.evidence),t.refreshService&&(n.refreshService=t.refreshService),n};hr.prototype.signCredential=function(e,t){t=t||{},js.checkArgument(e&&typeof e=="object","Invalid credential");var r=JSON.parse(JSON.stringify(e));delete r.proof;var i=hr._hashCredential(r),n=new oD;n.hashbuf=i,n.privkey=this.privateKey,n.pubkey=this.publicKey,n.sign();var o=n.sig,a=this._createJWSSignature(i,o),s={type:"EcdsaSecp256k1Signature2019",created:new Date().toISOString(),verificationMethod:this.did+"#keys-1",proofPurpose:t.proofPurpose||"assertionMethod",jws:a};t.challenge&&(s.challenge=t.challenge),t.domain&&(s.domain=t.domain);var u=JSON.parse(JSON.stringify(r));return u.proof=s,u.rootHash=i.toString("hex"),u};hr.prototype._createJWSSignature=function(e,t){var r={alg:"ES256K",typ:"JWT"},i=h.Buffer.from(JSON.stringify(r)).toString("base64url"),n=e.toString("base64url"),o=t.toDER().toString("base64url");return i+".."+o};hr.prototype.createEmailCredential=function(e,t){t=t||{},js.checkArgument(typeof e=="string"&&e.includes("@"),"Invalid email address");var r={id:t.subjectId||"did:smartledger:"+Hs.sha256(h.Buffer.from(e)).toString("hex"),email:e,verified:!0,verificationMethod:"email_verification",verificationTimestamp:new Date().toISOString()},i={type:"EmailVerifiedCredential",context:"https://smartledger.technology/contexts/email/v1",...t},n=this.createCredential(r,i);return this.signCredential(n,t)};hr.prototype.createAgeCredential=function(e,t,r){r=r||{},js.checkArgument(typeof e=="number"&&e>0,"Invalid age");var i={id:r.subjectId||"urn:uuid:"+this._generateUUID(),ageOver:e,verified:!0,verificationMethod:"age_verification"};t&&(i.birthDateHash=Hs.sha256(h.Buffer.from(t.toISOString())).toString("hex"));var n={type:"AgeVerifiedCredential",context:"https://smartledger.technology/contexts/age/v1",...r},o=this.createCredential(i,n);return this.signCredential(o,r)};hr.prototype.createKYCCredential=function(e,t){t=t||{},js.checkArgument(e&&typeof e=="object","Invalid KYC data");var r={id:t.subjectId||"urn:uuid:"+this._generateUUID(),kycLevel:e.level||"basic",verified:!0,verificationMethod:"kyc_verification",verificationTimestamp:new Date().toISOString(),verifyingAuthority:e.authority||this.did};e.firstName&&(r.firstNameHash=Hs.sha256(h.Buffer.from(e.firstName)).toString("hex")),e.lastName&&(r.lastNameHash=Hs.sha256(h.Buffer.from(e.lastName)).toString("hex")),e.ssn&&(r.ssnHash=Hs.sha256(h.Buffer.from(e.ssn)).toString("hex"));var i={type:"KYCVerifiedCredential",context:"https://smartledger.technology/contexts/kyc/v1",...t},n=this.createCredential(r,i);return this.signCredential(n,t)};hr.prototype.createOrganizationCredential=function(e,t){t=t||{},js.checkArgument(e&&typeof e=="object","Invalid organization data");var r={id:t.subjectId||"did:smartledger:org:"+Hs.sha256(h.Buffer.from(e.name||"")).toString("hex"),name:e.name,type:e.type||"Organization",verified:!0,verificationMethod:"organization_verification",verificationTimestamp:new Date().toISOString()};e.taxId&&(r.taxIdHash=Hs.sha256(h.Buffer.from(e.taxId)).toString("hex")),e.incorporationState&&(r.incorporationState=e.incorporationState),e.industry&&(r.industry=e.industry);var i={type:"OrganizationCredential",context:"https://smartledger.technology/contexts/organization/v1",...t},n=this.createCredential(r,i);return this.signCredential(n,t)};hr.prototype._generateUUID=function(){var e=Nl.crypto.Random.getRandomBuffer(16);e[6]=e[6]&15|64,e[8]=e[8]&63|128;var t=e.toString("hex");return[t.substring(0,8),t.substring(8,12),t.substring(12,16),t.substring(16,20),t.substring(20,32)].join("-")};hr.prototype.createPresentation=function(e,t){t=t||{},js.checkArgument(Array.isArray(e),"Credentials must be an array");var r={"@context":["https://www.w3.org/2018/credentials/v1"],type:["VerifiablePresentation"],id:t.id||"urn:uuid:"+this._generateUUID(),holder:this.did,verifiableCredential:e};t.context&&(Array.isArray(t.context)?r["@context"]=r["@context"].concat(t.context):r["@context"].push(t.context));var i=hr._hashCredential(r),n=new oD;n.hashbuf=i,n.privkey=this.privateKey,n.pubkey=this.publicKey,n.sign();var o=n.sig,a=this._createJWSSignature(i,o),s={type:"EcdsaSecp256k1Signature2019",created:new Date().toISOString(),verificationMethod:this.did+"#keys-1",proofPurpose:"authentication",jws:a};return t.challenge&&(s.challenge=t.challenge),t.domain&&(s.domain=t.domain),r.proof=s,r};hr.prototype.getIssuerInfo=function(){return{did:this.did,publicKey:this.publicKey.toString("hex"),verificationMethod:this.did+"#keys-1"}};aD.exports=hr});var cD=k((Ive,fD)=>{"use strict";v();var A1=ke(),o5=i5(),o7=n5(),xve=A1.PublicKey,Eve=A1.crypto.Hash,sD=A1.crypto.ECDSA,woe=A1.crypto.Signature,uD=A1.util.preconditions;function Mt(e){return this instanceof Mt?(this.options=e||{},this.trustedIssuers=this.options.trustedIssuers||[],this):new Mt(e)}Mt.verifyCredential=async function(e,t){t=t||{};try{uD.checkArgument(e&&typeof e=="object","Invalid credential");var r={valid:!1,errors:[],warnings:[],checks:{structure:!1,signature:!1,issuer:!1,temporal:!1,schema:!1}},i=Mt._validateStructure(e);r.checks.structure=i.valid,i.valid||(r.errors=r.errors.concat(i.errors));var n=await Mt._verifySignature(e);r.checks.signature=n.valid,n.valid?(r.issuerDID=n.issuerDID,r.verificationMethod=n.verificationMethod):r.errors=r.errors.concat(n.errors);var o=await Mt._validateIssuer(e,t);r.checks.issuer=o.valid,o.valid||(r.errors=r.errors.concat(o.errors)),o.warnings&&(r.warnings=r.warnings.concat(o.warnings));var a=Mt._validateTemporal(e);if(r.checks.temporal=a.valid,a.valid||(r.errors=r.errors.concat(a.errors)),a.warnings&&(r.warnings=r.warnings.concat(a.warnings)),t.schema){var s=Mt._validateSchema(e,t.schema);r.checks.schema=s.valid,s.valid||(r.errors=r.errors.concat(s.errors))}else r.checks.schema=!0;return r.valid=Object.values(r.checks).every(u=>u===!0),r}catch(u){return{valid:!1,errors:["Verification failed: "+u.message],warnings:[],checks:{structure:!1,signature:!1,issuer:!1,temporal:!1,schema:!1}}}};Mt.verifyPresentation=async function(e,t){t=t||{};try{uD.checkArgument(e&&typeof e=="object","Invalid presentation");var r={valid:!1,errors:[],warnings:[],credentialResults:[],presentationValid:!1};if(!e.type||!e.type.includes("VerifiablePresentation"))return r.errors.push("Invalid presentation type"),r;if(!e.holder)return r.errors.push("Missing presentation holder"),r;var i=await Mt._verifyPresentationSignature(e);if(r.presentationValid=i.valid,i.valid||(r.errors=r.errors.concat(i.errors)),e.verifiableCredential&&Array.isArray(e.verifiableCredential))for(var n=0;n<e.verifiableCredential.length;n++){var o=e.verifiableCredential[n],a=await Mt.verifyCredential(o,t);r.credentialResults.push({index:n,result:a}),a.valid||r.errors.push("Credential "+n+" is invalid")}var s=r.credentialResults.every(u=>u.result.valid);return r.valid=r.presentationValid&&s,r}catch(u){return{valid:!1,errors:["Presentation verification failed: "+u.message],warnings:[],credentialResults:[],presentationValid:!1}}};Mt._validateStructure=function(e){var t=[];return e["@context"]?Array.isArray(e["@context"])?e["@context"].includes("https://www.w3.org/2018/credentials/v1")||t.push("Missing required W3C credentials context"):t.push("@context must be an array"):t.push("Missing @context"),e.type?Array.isArray(e.type)?e.type.includes("VerifiableCredential")||t.push("Must include VerifiableCredential type"):t.push("type must be an array"):t.push("Missing type"),e.issuer||t.push("Missing issuer"),e.issuanceDate||t.push("Missing issuanceDate"),e.credentialSubject||t.push("Missing credentialSubject"),e.proof||t.push("Missing proof"),{valid:t.length===0,errors:t}};Mt._normalizeDID=function(e){var t=e&&typeof e=="object"?e.id:e;return typeof t!="string"||t.length===0?null:t.split("#")[0]};Mt._verifySignature=async function(e){try{var t=e.proof;if(!t)return{valid:!1,errors:["Missing proof"]};if(t.type!=="EcdsaSecp256k1Signature2019")return{valid:!1,errors:["Unsupported proof type: "+t.type]};if(!t.verificationMethod)return{valid:!1,errors:["Missing verification method"]};if(!t.jws)return{valid:!1,errors:["Missing JWS signature"]};var r=t.verificationMethod,i=r.split("#")[0],n=Mt._normalizeDID(e.issuer);if(!n)return{valid:!1,errors:["Missing or invalid credential issuer"]};if(n!==i)return{valid:!1,errors:["Verification method DID ("+i+") does not match credential issuer ("+n+")"]};var o=o5.getPublicKey(i),a=JSON.parse(JSON.stringify(e));delete a.proof,delete a.rootHash;var s=o7._hashCredential(a),u=Mt._parseJWSSignature(t.jws),c=new sD;c.hashbuf=s,c.pubkey=o,c.sig=u;var l=c.verify();return l?{valid:!0,issuerDID:i,verificationMethod:r}:{valid:!1,errors:["Signature verification failed"]}}catch(m){return{valid:!1,errors:["Signature verification error: "+m.message]}}};Mt._parseJWSSignature=function(e){var t=e.split(".");if(t.length!==3)throw new Error("Invalid JWS format");var r=t[2],i=h.Buffer.from(r,"base64url");return woe.fromDER(i)};Mt._verifyPresentationSignature=async function(e){try{var t=e.proof;if(!t)return{valid:!1,errors:["Missing presentation proof"]};var r=e.holder,i=o5.getPublicKey(r),n=JSON.parse(JSON.stringify(e));delete n.proof;var o=o7._hashCredential(n),a=Mt._parseJWSSignature(t.jws),s=new sD;s.hashbuf=o,s.pubkey=i,s.sig=a;var u=s.verify();return{valid:u,errors:u?[]:["Presentation signature verification failed"]}}catch(c){return{valid:!1,errors:["Presentation signature error: "+c.message]}}};Mt._validateIssuer=async function(e,t){var r=[],i=[];try{var n=e.issuer;if(!o5.isValidDID(n))return r.push("Invalid issuer DID format"),{valid:!1,errors:r};var o=await o5.resolve(n);if(!o.didDocument)return r.push("Unable to resolve issuer DID"),{valid:!1,errors:r};if(t.trustedIssuers&&Array.isArray(t.trustedIssuers)){var a=Mt._normalizeDID(n),s=t.trustedIssuers.map(function(u){return Mt._normalizeDID(u)}).filter(Boolean);if(!a||s.indexOf(a)===-1)return r.push("Issuer not in trusted list"),{valid:!1,errors:r,warnings:i}}return{valid:r.length===0,errors:r,warnings:i}}catch(u){return{valid:!1,errors:["Issuer validation error: "+u.message],warnings:i}}};Mt._validateTemporal=function(e){var t=[],r=[],i=new Date;if(e.issuanceDate){var n=new Date(e.issuanceDate);isNaN(n.getTime())?t.push("Invalid issuanceDate format"):n>i&&t.push("Credential issued in the future")}if(e.expirationDate){var o=new Date(e.expirationDate);isNaN(o.getTime())?t.push("Invalid expirationDate format"):o<=i?t.push("Credential has expired"):o<=new Date(i.getTime()+1440*60*1e3)&&r.push("Credential expires within 24 hours")}return{valid:t.length===0,errors:t,warnings:r}};Mt._validateSchema=function(e,t){var r=[];if(t.requiredFields&&t.requiredFields.forEach(function(n){Mt._getNestedProperty(e,n)||r.push("Missing required field: "+n)}),t.requiredTypes){var i=t.requiredTypes.some(function(n){return e.type&&e.type.includes(n)});i||r.push("Missing required credential type")}return{valid:r.length===0,errors:r}};Mt._getNestedProperty=function(e,t){return t.split(".").reduce(function(r,i){return r&&r[i]},e)};Mt.verifyCredentialHash=function(e){try{if(!e.rootHash)return!1;var t=JSON.parse(JSON.stringify(e));delete t.proof,delete t.rootHash;var r=o7._hashCredential(t),i=h.Buffer.from(e.rootHash,"hex");return h.Buffer.compare(r,i)===0}catch{return!1}};Mt.extractClaims=function(e){try{var t={issuer:e.issuer,subject:e.credentialSubject.id||"unknown",types:e.type||[],issuanceDate:e.issuanceDate,expirationDate:e.expirationDate,claims:{}};return Object.keys(e.credentialSubject).forEach(function(r){r!=="id"&&(t.claims[r]=e.credentialSubject[r])}),t}catch{return null}};Mt.createReport=function(e){var t=[];return t.push("=== Credential Verification Report ==="),t.push("Overall Status: "+(e.valid?"VALID":"INVALID")),t.push(""),t.push("Verification Checks:"),Object.keys(e.checks).forEach(function(r){var i=e.checks[r]?"\u2713":"\u2717";t.push(" "+i+" "+r.charAt(0).toUpperCase()+r.slice(1))}),t.push(""),e.errors.length>0&&(t.push("Errors:"),e.errors.forEach(function(r){t.push(" \u2022 "+r)}),t.push("")),e.warnings.length>0&&(t.push("Warnings:"),e.warnings.forEach(function(r){t.push(" \u2022 "+r)}),t.push("")),e.issuerDID&&t.push("Issuer: "+e.issuerDID),e.verificationMethod&&t.push("Verification Method: "+e.verificationMethod),t.join(`
|
|
99
99
|
`)};fD.exports=Mt});var hD=k((Pve,lD)=>{"use strict";v();var Af=ke(),Soe=n5(),so=Af.crypto.Hash,Ave=Af.crypto.BN,oi=Af.util.preconditions;function rr(e){return this instanceof rr?(this.options=e||{},this):new rr(e)}rr.createMerkleTree=function(e,t){t=t||Af.crypto.Random.getRandomBuffer(32).toString("hex"),oi.checkArgument(e&&typeof e=="object","Invalid credential");var r=rr._extractFields(e),i=r.map(function(o){var a=o.path+":"+JSON.stringify(o.value)+":"+t;return{path:o.path,value:o.value,hash:so.sha256(h.Buffer.from(a,"utf8")).toString("hex"),salt:t}}),n=rr._buildMerkleTree(i.map(o=>o.hash));return{salt:t,leaves:i,tree:n,root:n[n.length-1][0]}};rr.generateSelectiveProof=function(e,t,r){oi.checkArgument(e&&typeof e=="object","Invalid credential"),typeof t=="string"&&(t=[t]),oi.checkArgument(Array.isArray(t),"Disclose paths must be array");var i=rr.createMerkleTree(e,r),n=[],o=[];return t.forEach(function(a){var s=i.leaves.find(l=>l.path===a);if(s){n.push(s);var u=i.leaves.findIndex(l=>l.path===a),c=rr._generateMerkleProof(i.tree,u);o.push({path:a,leafIndex:u,proof:c})}}),{type:"SelectiveDisclosureProof",created:new Date().toISOString(),proofPurpose:"selectiveDisclosure",verificationMethod:e.proof?e.proof.verificationMethod:null,credentialRoot:i.root,credentialHash:e.rootHash||Soe._hashCredential(e).toString("hex"),disclosedFields:n.map(function(a){return{path:a.path,value:a.value,hash:a.hash}}),merkleProofs:o,salt:r}};rr.verifySelectiveProof=function(e,t){try{oi.checkArgument(e&&typeof e=="object","Invalid proof"),oi.checkArgument(typeof t=="string","Expected root must be string");for(var r={valid:!1,errors:[],verifiedFields:[]},i=0;i<e.disclosedFields.length;i++){var n=e.disclosedFields[i],o=e.merkleProofs.find(c=>c.path===n.path);if(!o){r.errors.push("Missing Merkle proof for field: "+n.path);continue}var a=n.path+":"+JSON.stringify(n.value)+":"+e.salt,s=so.sha256(h.Buffer.from(a,"utf8")).toString("hex");if(s!==n.hash){r.errors.push("Field hash mismatch for: "+n.path);continue}var u=rr._verifyMerkleProof(n.hash,o.proof,t);if(!u){r.errors.push("Invalid Merkle proof for: "+n.path);continue}r.verifiedFields.push({path:n.path,value:n.value,verified:!0})}return r.valid=r.errors.length===0&&r.verifiedFields.length>0,r}catch(c){return{valid:!1,errors:["Proof verification failed: "+c.message],verifiedFields:[]}}};rr.generateAgeProof=function(e,t,r){oi.checkArgument(e instanceof Date,"Birth date must be Date object"),oi.checkArgument(typeof t=="number","Minimum age must be number"),r=r||Af.crypto.Random.getRandomBuffer(32).toString("hex");var i=new Date,n=Math.floor((i-e)/(365.25*24*60*60*1e3));if(n<t)throw new Error("Age requirement not met");var o=e.toISOString().split("T")[0],a=so.sha256(h.Buffer.from(o+":"+r,"utf8")).toString("hex"),s={minimumAge:t,ageAttestation:n>=t,timestamp:i.toISOString(),salt:r},u=so.sha256(h.Buffer.from(JSON.stringify(s),"utf8")).toString("hex");return{type:"AgeProof",created:new Date().toISOString(),proofPurpose:"ageVerification",minimumAge:t,meetsRequirement:!0,birthDateCommitment:a,ageProofHash:u,challengeResponse:rr._generateAgeChallenge(e,t,r)}};rr.verifyAgeProof=function(e,t){try{return oi.checkArgument(e&&typeof e=="object","Invalid proof"),oi.checkArgument(typeof t=="number","Required age must be number"),e.type!=="AgeProof"||e.minimumAge!==t||!e.meetsRequirement?!1:e.challengeResponse&&e.challengeResponse.length>0}catch{return!1}};rr.generateRangeProof=function(e,t,r,i){oi.checkArgument(typeof e=="number","Value must be number"),oi.checkArgument(typeof t=="number","Min must be number"),oi.checkArgument(typeof r=="number","Max must be number"),oi.checkArgument(e>=t&&e<=r,"Value not in range"),i=i||Af.crypto.Random.getRandomBuffer(32).toString("hex");var n=so.sha256(h.Buffer.from(e.toString()+":"+i,"utf8")).toString("hex"),o={min:t,max:r,inRange:!0,timestamp:new Date().toISOString(),salt:i},a=so.sha256(h.Buffer.from(JSON.stringify(o),"utf8")).toString("hex");return{type:"RangeProof",created:new Date().toISOString(),proofPurpose:"rangeVerification",range:{min:t,max:r},valueCommitment:n,proofHash:a,inRange:!0}};rr.verifyRangeProof=function(e,t,r){try{return oi.checkArgument(e&&typeof e=="object","Invalid proof"),e.type!=="RangeProof"||e.range.min!==t||e.range.max!==r?!1:e.inRange===!0}catch{return!1}};rr._extractFields=function(e,t){t=t||"";var r=[];return Object.keys(e).forEach(function(i){var n=t?t+"."+i:i,o=e[i];o&&typeof o=="object"&&!Array.isArray(o)&&!(o instanceof Date)?r=r.concat(rr._extractFields(o,n)):r.push({path:n,value:o})}),r};rr._buildMerkleTree=function(e){if(e.length===0)throw new Error("Cannot build tree from empty leaves");for(var t=[e];t[t.length-1].length>1;){for(var r=t[t.length-1],i=[],n=0;n<r.length;n+=2){var o=r[n],a=n+1<r.length?r[n+1]:o,s=o+a,u=so.sha256(h.Buffer.from(s,"hex")).toString("hex");i.push(u)}t.push(i)}return t};rr._generateMerkleProof=function(e,t){for(var r=[],i=t,n=0;n<e.length-1;n++){var o=e[n],a=i%2===0,s=a?i+1:i-1;s<o.length&&r.push({hash:o[s],isLeft:!a}),i=Math.floor(i/2)}return r};rr._verifyMerkleProof=function(e,t,r){for(var i=e,n=0;n<t.length;n++){var o=t[n],a=o.isLeft?o.hash+i:i+o.hash;i=so.sha256(h.Buffer.from(a,"hex")).toString("hex")}return i===r};rr._generateAgeChallenge=function(e,t,r){var i=so.sha256(h.Buffer.from(e.toISOString()+t+r,"utf8"));return i.toString("hex")};rr.generateMembershipProof=function(e,t,r){oi.checkArgument(Array.isArray(e),"Set must be array"),oi.checkArgument(e.includes(t),"Value not in set"),r=r||Af.crypto.Random.getRandomBuffer(32).toString("hex");var i=e.map(function(o){return so.sha256(h.Buffer.from(JSON.stringify(o)+":"+r,"utf8")).toString("hex")}),n=so.sha256(h.Buffer.from(JSON.stringify(t)+":"+r,"utf8")).toString("hex");return{type:"MembershipProof",created:new Date().toISOString(),proofPurpose:"membershipVerification",setCommitments:i,valueCommitment:n,isMember:!0}};rr.verifyMembershipProof=function(e){try{return oi.checkArgument(e&&typeof e=="object","Invalid proof"),e.type!=="MembershipProof"||!Array.isArray(e.setCommitments)?!1:e.setCommitments.includes(e.valueCommitment)&&e.isMember}catch{return!1}};lD.exports=rr});var yD=k((Rve,mD)=>{"use strict";v();var uo=ke(),a7=uo.Transaction,xoe=uo.Script,s7=uo.PrivateKey,kve=uo.Address,P1=uo.crypto.Hash,dD=uo.SPV,zs=uo.util.preconditions;function Tr(e,t){return this instanceof Tr?(typeof e=="string"&&(e=s7.fromWIF(e)),e!==null?(zs.checkArgument(e instanceof s7,"Invalid private key"),this.privateKey=e,this.address=e.toAddress()):(this.privateKey=null,this.address=null),this.options=t||{},this.network=this.options.network||"mainnet",this.PROTOCOL_ID="SMARTLEDGER.ATTEST",this.VERSION=1,this):new Tr(e,t)}Tr.prototype.anchorCredential=async function(e,t,r){t=t||{},typeof e=="string"&&(e=h.Buffer.from(e,"hex")),zs.checkArgument(h.Buffer.isBuffer(e),"Invalid credential hash"),zs.checkArgument(e.length===32,"Hash must be 32 bytes");var i=this._createAnchorPayload("CREDENTIAL",e,t),n=await this._createAnchorTransaction(i,r);return{txid:n.hash,transaction:n,anchorHash:e.toString("hex"),metadata:t,timestamp:new Date().toISOString(),blockchainProof:{protocol:this.PROTOCOL_ID,version:this.VERSION,type:"CREDENTIAL"}}};Tr.prototype.anchorBatch=async function(e,t,r){t=t||{},zs.checkArgument(Array.isArray(e),"Credential hashes must be array"),zs.checkArgument(e.length>0,"Must provide at least one hash");var i=this._createMerkleRoot(e),n=this._createAnchorPayload("BATCH",i,{...t,batchSize:e.length,merkleRoot:i.toString("hex")}),o=await this._createAnchorTransaction(n,r);return{txid:o.hash,transaction:o,merkleRoot:i.toString("hex"),batchSize:e.length,credentialHashes:e.map(a=>h.Buffer.isBuffer(a)?a.toString("hex"):a),metadata:t,timestamp:new Date().toISOString(),blockchainProof:{protocol:this.PROTOCOL_ID,version:this.VERSION,type:"BATCH"}}};Tr.prototype.registerDID=async function(e,t,r){zs.checkArgument(typeof e=="string","DID must be string"),zs.checkArgument(t&&typeof t=="object","Invalid DID document");var i=P1.sha256(h.Buffer.from(JSON.stringify(t),"utf8")),n=this._createAnchorPayload("DID_REG",i,{did:e,operation:"create",documentHash:i.toString("hex")}),o=await this._createAnchorTransaction(n,r);return{txid:o.hash,transaction:o,did:e,documentHash:i.toString("hex"),timestamp:new Date().toISOString(),blockchainProof:{protocol:this.PROTOCOL_ID,version:this.VERSION,type:"DID_REG"}}};Tr.prototype.revokeCredential=async function(e,t,r){zs.checkArgument(typeof e=="string","Credential ID must be string"),t=t||"unspecified";var i={credentialId:e,reason:t,timestamp:new Date().toISOString(),issuer:this.address.toString()},n=P1.sha256(h.Buffer.from(JSON.stringify(i),"utf8")),o=this._createAnchorPayload("REVOKE",n,{credentialId:e,reason:t}),a=await this._createAnchorTransaction(o,r);return{txid:a.hash,transaction:a,credentialId:e,reason:t,revocationHash:n.toString("hex"),timestamp:new Date().toISOString(),blockchainProof:{protocol:this.PROTOCOL_ID,version:this.VERSION,type:"REVOKE"}}};var Eoe=["bn","privateKey","privkey","privKey","wif","privateJwk","xpriv","xprv","mnemonic"],Ioe=["d","seed","secret","key"];function pD(e){if(typeof e!="string"||e.length<50||e.length>53)return!1;try{return uo.PrivateKey.fromWIF(e),!0}catch{return!1}}function gD(e){if(typeof e!="string"||!/^(xprv|tprv)/.test(e))return!1;try{return uo.HDPrivateKey.fromString(e),!0}catch{return!1}}function vD(e){if(typeof e!="string")return!1;var t=e.trim().split(/\s+/);if([12,15,18,21,24].indexOf(t.length)===-1)return!1;try{return uo.Mnemonic.isValid(e.trim())}catch{return!1}}function Ooe(e){if(typeof e!="string"||!/^[0-9a-fA-F]{64}$/.test(e))return!1;try{return uo.PrivateKey.fromHex(e),!0}catch{return!1}}function Aoe(e){return pD(e)||gD(e)||vD(e)}function Poe(e,t){var r=[];if(t&&typeof t.toWIF=="function")try{r=[t.toWIF(),t.toString(),t.bn&&t.bn.toString(16)].filter(function(a){return typeof a=="string"&&a.length}).map(function(a){return a.toLowerCase()})}catch{r=[]}function i(a,s){throw new Error("Refusing to anchor: "+(a||"metadata")+" "+s+", and anchor metadata is published in the OP_RETURN where it is permanent and public.")}function n(a,s){r.length&&r.indexOf(a.toLowerCase())!==-1&&i(s,"is this anchor's own private key"),pD(a)&&i(s,"is a WIF private key"),gD(a)&&i(s,"is an extended private key"),vD(a)&&i(s,"is a BIP39 mnemonic phrase")}function o(a,s,u){if(typeof a=="string"){n(a,s);return}if(!(!a||typeof a!="object"||u>6)){if(typeof a.toWIF=="function"&&a.bn&&i(s,"is a PrivateKey"),Array.isArray(a)){a.forEach(function(c,l){o(c,(s||"metadata")+"["+l+"]",u+1)});return}Object.keys(a).forEach(function(c){var l=a[c],m=s?s+"."+c:c;if(l!=null&&typeof l!="object"){var w=String(l);Eoe.indexOf(c)!==-1&&i(m,"is a field that holds key material"),Ioe.indexOf(c)!==-1&&(Aoe(w)||Ooe(w))&&i(m,"holds something that decodes as a private key")}o(l,m,u+1)})}}o(e,"",0)}Tr.prototype._createAnchorPayload=function(e,t,r){var i=Math.floor(Date.now()/1e3);Poe(r,this.privateKey);var n=h.Buffer.concat([h.Buffer.from(this.PROTOCOL_ID,"utf8"),h.Buffer.from([this.VERSION]),h.Buffer.from(e.padEnd(10,"\0"),"utf8"),h.Buffer.from([i>>24,i>>16,i>>8,i]),t,h.Buffer.from(JSON.stringify(r),"utf8")]);return n};Tr.prototype._createAnchorTransaction=async function(e,t){if(!t||t.length===0)throw new Error("UTXOs required for anchor transaction");var r=200+e.length,i=this.options.feeRate||1,n=r*i,o=t.reduce((c,l)=>c+l.satoshis,0);if(o<n)throw new Error("Insufficient funds for anchor transaction");var a=new a7;t.forEach(c=>{a.from(c)});var s=xoe.buildDataOut(e);a.addOutput(new a7.Output({script:s,satoshis:0}));var u=o-n;return u>546&&a.to(this.address,u),a.sign(this.privateKey),a};Tr.prototype._createMerkleRoot=function(e){if(e.length===0)throw new Error("Cannot create Merkle root from empty array");for(var t=e.map(u=>h.Buffer.isBuffer(u)?u:h.Buffer.from(u,"hex"));t.length>1;){for(var r=[],i=0;i<t.length;i+=2){var n=t[i],o=i+1<t.length?t[i+1]:n,a=h.Buffer.concat([n,o]),s=P1.sha256(a);r.push(s)}t=r}return t[0]};Tr.parseAnchorData=function(e){if(!h.Buffer.isBuffer(e))throw new Error("Data must be Buffer");if(e.length<50)throw new Error("Data too short for SmartLedger anchor");var t=0,r=18,i=e.slice(t,t+r).toString("utf8");if(t+=r,i!=="SMARTLEDGER.ATTEST")throw new Error("Invalid protocol identifier");var n=e[t];t+=1;var o=e.slice(t,t+10).toString("utf8").replace(/\0/g,"");t+=10;var a=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3];t+=4;var s=e.slice(t,t+32);t+=32;var u=e.slice(t),c={};try{c=JSON.parse(u.toString("utf8"))}catch{}return{protocol:i,version:n,type:o,timestamp:new Date(a*1e3),hash:s.toString("hex"),metadata:c}};Tr.verifyAnchor=async function(e,t,r){if(r=r||{},!e||!t)throw new Error("verifyAnchor requires both txid and expectedHash");if(r.spvProof&&(r.header||r.headerChain)&&r.rawTx)return Tr._verifyAnchorSPV(e,t,r);if(typeof r.chainProvider!="function")throw new Error("verifyAnchor needs either a trustless SPV proof \u2014 { spvProof: { index, nodes }, header, rawTx } \u2014 or a trusted options.chainProvider(txid) returning { confirmations, blockHeight, opReturns }. Refusing to fabricate a result.");var i=r.minConfirmations!=null?r.minConfirmations:1,n=await r.chainProvider(e),o=n&&n.confirmations||0,a=n&&n.opReturns||[],s=String(t).toLowerCase(),u=a.some(function(l){return String(l).toLowerCase().indexOf(s)!==-1}),c=o>=i&&u;return{verified:c,txid:e,hash:t,committed:u,confirmations:o,blockHeight:n&&n.blockHeight||null,timestamp:new Date().toISOString(),proof:{type:"blockchain_anchor",protocol:"SMARTLEDGER.ATTEST",network:r.network||"mainnet"}}};Tr._verifyAnchorSPV=function(e,t,r){var i=r.spvProof||{},n=null,o=r.header;r.headerChain&&(n=dD.verifyHeaderChain(r.headerChain,{requirePow:r.requirePow!==!1,trustedHash:r.trustedHash}),o=r.headerChain[0]);var a=dD.verifyTxInclusion({txid:e,index:i.index,nodes:i.nodes,header:o,requirePow:r.requirePow!==!1}),s=h.Buffer.isBuffer(r.rawTx)?r.rawTx:h.Buffer.from(r.rawTx,"hex"),u=h.Buffer.from(P1.sha256sha256(s)).reverse().toString("hex"),c=u.toLowerCase()===String(e).toLowerCase(),l=c&&Tr._rawTxCommitsTo(s,t),m=n?n.count:r.header?1:0,w=r.minConfirmations!=null?r.minConfirmations:1,E=n?n.valid:!0,P=m>=w;return{verified:a.valid&&c&&l&&E&&P,chainVerified:a.valid,committed:l,txidBound:c,powValid:a.powValid,confirmations:m,headerChainValid:n?n.valid:null,headerChainReason:n&&n.reason||null,tipHash:n?n.tipHash:null,txid:e,hash:t,blockHash:a.blockHash,merkleRoot:a.merkleRoot,timestamp:new Date().toISOString(),proof:{type:n?"spv_merkle_inclusion_with_confirmations":"spv_merkle_inclusion",protocol:"SMARTLEDGER.ATTEST",network:r.network||"mainnet"}}};Tr._rawTxCommitsTo=function(e,t){var r=String(t).toLowerCase(),i;try{i=new a7(e)}catch{return!1}return i.outputs.some(function(n){var o=n.script;if(!o||!o.chunks||!o.chunks.length)return!1;var a=o.chunks[0].opcodenum===106||o.chunks[0].opcodenum===0&&o.chunks[1]&&o.chunks[1].opcodenum===106;return a?o.chunks.some(function(s){return s.buf&&s.buf.toString("hex").toLowerCase().indexOf(r)!==-1}):!1})};Tr.getCostEstimate=function(e,t){t=t||{};var r=t.feeRate||1,i=200,n=32,o=e*(i+n)*r,a=(i+e*n)*r;return{individual:{totalCost:o,costPerHash:i*r,transactions:e},batch:{totalCost:a,costPerHash:Math.ceil(a/e),transactions:1},savings:{absolute:o-a,percentage:Math.round((o-a)/o*100)}}};Tr.createUTXO=function(e,t,r,i){return{txid:e,outputIndex:t,satoshis:r,script:i}};Tr.generateTestData=function(){var e=new s7,t=new Tr(e),r=P1.sha256(h.Buffer.from("test credential data")),i={issuer:"did:smartledger:test",type:"EmailVerifiedCredential",environment:"test"};return{privateKey:e.toWIF(),address:e.toAddress().toString(),credentialHash:r.toString("hex"),metadata:i,anchor:t}};mD.exports=Tr});var _D=k((Mve,bD)=>{"use strict";v();var u7=Bt(),T1={EmailVerifiedCredential:{"@context":["https://www.w3.org/2018/credentials/v1","https://smartledger.technology/contexts/email/v1"],type:["VerifiableCredential","EmailVerifiedCredential"],requiredFields:["credentialSubject.email","credentialSubject.verified"],properties:{credentialSubject:{type:"object",required:["email","verified"],properties:{email:{type:"string",format:"email"},verified:{type:"boolean"},verificationMethod:{type:"string"},verificationTimestamp:{type:"string",format:"date-time"}}}}},AgeVerifiedCredential:{"@context":["https://www.w3.org/2018/credentials/v1","https://smartledger.technology/contexts/age/v1"],type:["VerifiableCredential","AgeVerifiedCredential"],requiredFields:["credentialSubject.ageOver","credentialSubject.verified"],properties:{credentialSubject:{type:"object",required:["ageOver","verified"],properties:{ageOver:{type:"number",minimum:0,maximum:150},verified:{type:"boolean"},birthDateHash:{type:"string",pattern:"^[a-fA-F0-9]{64}$"},verificationMethod:{type:"string"}}}}},KYCVerifiedCredential:{"@context":["https://www.w3.org/2018/credentials/v1","https://smartledger.technology/contexts/kyc/v1"],type:["VerifiableCredential","KYCVerifiedCredential"],requiredFields:["credentialSubject.kycLevel","credentialSubject.verified","credentialSubject.verifyingAuthority"],properties:{credentialSubject:{type:"object",required:["kycLevel","verified","verifyingAuthority"],properties:{kycLevel:{type:"string",enum:["basic","enhanced","premium","institutional"]},verified:{type:"boolean"},verifyingAuthority:{type:"string"},verificationTimestamp:{type:"string",format:"date-time"},firstNameHash:{type:"string",pattern:"^[a-fA-F0-9]{64}$"},lastNameHash:{type:"string",pattern:"^[a-fA-F0-9]{64}$"},ssnHash:{type:"string",pattern:"^[a-fA-F0-9]{64}$"}}}}},OrganizationCredential:{"@context":["https://www.w3.org/2018/credentials/v1","https://smartledger.technology/contexts/organization/v1"],type:["VerifiableCredential","OrganizationCredential"],requiredFields:["credentialSubject.name","credentialSubject.type","credentialSubject.verified"],properties:{credentialSubject:{type:"object",required:["name","type","verified"],properties:{name:{type:"string"},type:{type:"string",enum:["Corporation","LLC","Partnership","NGO","Government","Other"]},verified:{type:"boolean"},taxIdHash:{type:"string",pattern:"^[a-fA-F0-9]{64}$"},incorporationState:{type:"string"},industry:{type:"string"},verificationMethod:{type:"string"},verificationTimestamp:{type:"string",format:"date-time"}}}}},SSNVerifiedCredential:{"@context":["https://www.w3.org/2018/credentials/v1","https://smartledger.technology/contexts/ssn/v1"],type:["VerifiableCredential","SSNVerifiedCredential"],requiredFields:["credentialSubject.ssnHash","credentialSubject.verified","credentialSubject.verifyingAuthority"],properties:{credentialSubject:{type:"object",required:["ssnHash","verified","verifyingAuthority"],properties:{ssnHash:{type:"string",pattern:"^[a-fA-F0-9]{64}$"},verified:{type:"boolean"},verifyingAuthority:{type:"string"},verificationTimestamp:{type:"string",format:"date-time"},issuingState:{type:"string"}}}}},EducationalCredential:{"@context":["https://www.w3.org/2018/credentials/v1","https://smartledger.technology/contexts/education/v1"],type:["VerifiableCredential","EducationalCredential"],requiredFields:["credentialSubject.degree","credentialSubject.institution","credentialSubject.graduationDate"],properties:{credentialSubject:{type:"object",required:["degree","institution","graduationDate"],properties:{degree:{type:"string"},institution:{type:"string"},graduationDate:{type:"string",format:"date"},gpa:{type:"number",minimum:0,maximum:4},major:{type:"string"},honors:{type:"array",items:{type:"string"}}}}}},ProfessionalLicenseCredential:{"@context":["https://www.w3.org/2018/credentials/v1","https://smartledger.technology/contexts/license/v1"],type:["VerifiableCredential","ProfessionalLicenseCredential"],requiredFields:["credentialSubject.licenseType","credentialSubject.licenseNumber","credentialSubject.issuingAuthority","credentialSubject.isValid"],properties:{credentialSubject:{type:"object",required:["licenseType","licenseNumber","issuingAuthority","isValid"],properties:{licenseType:{type:"string"},licenseNumber:{type:"string"},issuingAuthority:{type:"string"},issuingState:{type:"string"},isValid:{type:"boolean"},issueDate:{type:"string",format:"date"},expirationDate:{type:"string",format:"date"}}}}}},Toe={getSchema:function(e){return T1[e]||null},getAllSchemas:function(){return T1},validate:function(e,t){try{u7.checkArgument(e&&typeof e=="object","Invalid credential");var r;if(typeof t=="string"){if(r=T1[t],!r)return{valid:!1,errors:["Unknown schema type: "+t]}}else if(typeof t=="object")r=t;else return{valid:!1,errors:["Invalid schema parameter"]};var i=[],n=[];return this._validateCredentialStructure(e,i),this._validateCredentialTypes(e,r,i),this._validateRequiredFields(e,r,i),this._validateFieldProperties(e,r,i,n),{valid:i.length===0,errors:i,warnings:n}}catch(o){return{valid:!1,errors:["Schema validation error: "+o.message]}}},_validateCredentialStructure:function(e,t){e["@context"]||t.push("Missing @context"),e.type||t.push("Missing type"),e.issuer||t.push("Missing issuer"),e.issuanceDate||t.push("Missing issuanceDate"),e.credentialSubject||t.push("Missing credentialSubject")},_validateCredentialTypes:function(e,t,r){if(!Array.isArray(e.type)){r.push("Credential type must be array");return}if(t.type&&Array.isArray(t.type))for(var i=0;i<t.type.length;i++)e.type.includes(t.type[i])||r.push("Missing required type: "+t.type[i])},_validateRequiredFields:function(e,t,r){if(t.requiredFields&&Array.isArray(t.requiredFields))for(var i=0;i<t.requiredFields.length;i++){var n=t.requiredFields[i],o=this._getNestedProperty(e,n);o==null&&r.push("Missing required field: "+n)}},_validateFieldProperties:function(e,t,r,i){t.properties&&t.properties.credentialSubject&&this._validateObjectProperties(e.credentialSubject,t.properties.credentialSubject,"credentialSubject",r,i)},_validateObjectProperties:function(e,t,r,i,n){!e||typeof e!="object"||t.properties&&Object.keys(t.properties).forEach(function(o){var a=e[o],s=t.properties[o],u=r+"."+o;a!=null&&this._validateProperty(a,s,u,i,n)}.bind(this))},_validateProperty:function(e,t,r,i,n){if(t.type){var o=Array.isArray(e)?"array":typeof e;if(o!==t.type){i.push("Invalid type for "+r+": expected "+t.type+", got "+o);return}}if(t.type==="string"&&(t.format==="email"&&!this._isValidEmail(e)&&i.push("Invalid email format for "+r),t.format==="date"&&!this._isValidDate(e)&&i.push("Invalid date format for "+r),t.format==="date-time"&&!this._isValidDateTime(e)&&i.push("Invalid date-time format for "+r),t.pattern&&!new RegExp(t.pattern).test(e)&&i.push("Value does not match pattern for "+r),t.enum&&!t.enum.includes(e)&&i.push("Invalid enum value for "+r+": "+e)),t.type==="number"&&(t.minimum!==void 0&&e<t.minimum&&i.push("Value below minimum for "+r+": "+e+" < "+t.minimum),t.maximum!==void 0&&e>t.maximum&&i.push("Value above maximum for "+r+": "+e+" > "+t.maximum)),t.type==="array"&&t.items)for(var a=0;a<e.length;a++)this._validateProperty(e[a],t.items,r+"["+a+"]",i,n)},_getNestedProperty:function(e,t){return t.split(".").reduce(function(r,i){return r&&r[i]},e)},_isValidEmail:function(e){var t=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;return t.test(e)},_isValidDate:function(e){var t=new Date(e);return!isNaN(t.getTime())&&e.match(/^\d{4}-\d{2}-\d{2}$/)},_isValidDateTime:function(e){var t=new Date(e);return!isNaN(t.getTime())},addSchema:function(e,t){u7.checkArgument(typeof e=="string","Schema name must be string"),u7.checkArgument(t&&typeof t=="object","Invalid schema definition"),T1[e]=t},createTemplate:function(e){var t=T1[e];if(!t)throw new Error("Unknown credential type: "+e);var r={"@context":t["@context"]||["https://www.w3.org/2018/credentials/v1"],type:t.type||["VerifiableCredential"],issuer:"did:smartledger:ISSUER_DID_HERE",issuanceDate:new Date().toISOString(),credentialSubject:this._createSubjectTemplate(t.properties?t.properties.credentialSubject:{})};return r},_createSubjectTemplate:function(e){var t={id:"SUBJECT_ID_HERE"};return e.properties&&Object.keys(e.properties).forEach(function(r){var i=e.properties[r];t[r]=this._getDefaultValue(i)}.bind(this)),t},_getDefaultValue:function(e){switch(e.type){case"string":return e.enum?e.enum[0]:e.format==="email"?"example@example.com":e.format==="date"?"2023-01-01":e.format==="date-time"?new Date().toISOString():"PLACEHOLDER_STRING";case"number":return e.minimum||0;case"boolean":return!0;case"array":return[];case"object":return{};default:return null}}};bD.exports=Toe});var SD=k((Nve,wD)=>{"use strict";v();var koe=i5(),Dl=n5(),Roe=cD(),Boe=hD(),k1=yD(),Moe=_D();function gt(e){if(!(this instanceof gt))return new gt(e);e=e||{},this.didResolver=koe,this.attestationVerifier=Roe,this.zkProver=Boe,this.schemaValidator=Moe,this._attestationSignerOptions=e.attestationSigner||{},this._anchorOptions=e.anchor||{}}gt.prototype.createDID=function(e){return this.didResolver.fromPublicKey(e)};gt.prototype.resolveDID=function(e){return this.didResolver.resolve(e)};gt.prototype.verifyDIDOwnership=function(e,t){return this.didResolver.verifyOwnership(e,t)};gt.prototype.createEmailCredential=function(e,t,r,i){var n=new Dl(i,this._attestationSignerOptions);return n.createEmailCredential(r,{issuerDID:e,subjectId:t})};gt.prototype.createAgeCredential=function(e,t,r,i,n){var o=new Dl(n,this._attestationSignerOptions);return o.createAgeCredential(r,i,{issuerDID:e,subjectId:t})};gt.prototype.createKYCCredential=function(e,t,r,i,n){var o=new Dl(n,this._attestationSignerOptions),a=Object.assign({level:r},i);return o.createKYCCredential(a,{issuerDID:e,subjectId:t})};gt.prototype.createOrganizationCredential=function(e,t,r,i){var n=new Dl(i,this._attestationSignerOptions);return n.createOrganizationCredential(r,{issuerDID:e,subjectId:t})};gt.prototype.createPresentation=function(e,t,r,i){var n=new Dl(r,this._attestationSignerOptions);return n.createPresentation(e,t,r,i)};gt.prototype.signCredential=function(e,t){var r=new Dl(t,this._attestationSignerOptions);return r.signCredential(e,t)};gt.prototype.verifyCredential=function(e,t){return this.attestationVerifier.verifyCredential(e,t)};gt.prototype.verifyPresentation=function(e,t){return this.attestationVerifier.verifyPresentation(e,t)};gt.prototype.extractClaims=function(e){return this.attestationVerifier.extractClaims(e)};gt.prototype.generateSelectiveProof=function(e,t,r){return this.zkProver.generateSelectiveProof(e,t,r)};gt.prototype.verifySelectiveProof=function(e,t){return this.zkProver.verifySelectiveProof(e,t)};gt.prototype.generateAgeProof=function(e,t,r){var i=new Date("1995-06-15");return this.zkProver.generateAgeProof(i,t,r)};gt.prototype.verifyAgeProof=function(e,t,r){return this.zkProver.verifyAgeProof(e,t,r)};gt.prototype.generateRangeProof=function(e,t,r,i){return this.zkProver.generateRangeProof(e,t,r,i)};gt.prototype.verifyRangeProof=function(e,t,r){return this.zkProver.verifyRangeProof(e,t,r)};gt.prototype.generateMembershipProof=function(e,t,r){return this.zkProver.generateMembershipProof(e,t,r)};gt.prototype.verifyMembershipProof=function(e,t){return this.zkProver.verifyMembershipProof(e,t)};function a5(e){return Array.isArray(e)?{metadata:void 0,utxos:e}:(e=e||{},{metadata:e.metadata,utxos:e.utxos})}gt.prototype.anchorCredential=function(e,t,r){var i=new k1(t,this._anchorOptions),n=a5(r);return i.anchorCredential(e,n.metadata,n.utxos)};gt.prototype.anchorBatch=function(e,t,r){var i=new k1(t,this._anchorOptions),n=a5(r);return i.anchorBatch(e,n.metadata,n.utxos)};gt.prototype.registerDID=function(e,t,r,i){var n=new k1(r,this._anchorOptions);return n.registerDID(e,t,a5(i).utxos)};gt.prototype.revokeCredential=function(e,t,r,i){var n=new k1(r,this._anchorOptions);return n.revokeCredential(e,t,a5(i).utxos)};gt.prototype.queryAnchoredData=function(e){var t=new k1(null,this._anchorOptions);return t.queryAnchoredData(e)};gt.prototype.validateCredential=function(e,t){return this.schemaValidator.validate(e,t)};gt.prototype.getSchema=function(e){return this.schemaValidator.getSchema(e)};gt.prototype.getAllSchemas=function(){return this.schemaValidator.getAllSchemas()};gt.prototype.addSchema=function(e,t){return this.schemaValidator.addSchema(e,t)};gt.prototype.createTemplate=function(e){return this.schemaValidator.createTemplate(e)};gt.prototype.generateNonce=function(e){e=e||32;var t=_r();return t.randomBytes(e).toString("hex")};gt.prototype.hashData=function(e,t){var r=_r(),i=r.createHash("sha256");return i.update(e),t&&i.update(t),i.digest("hex")};gt.prototype.getVersion=function(){return"1.0.0"};gt.prototype.getInfo=function(){return{name:"SmartLedger BSV Global Digital Attestation Framework",version:this.getVersion(),description:"W3C-compliant verifiable credentials with DID resolution, zero-knowledge proofs, and blockchain anchoring",components:{didResolver:"DID Resolution and Management",attestationSigner:"Verifiable Credential Creation",attestationVerifier:"Credential and Presentation Verification",zkProver:"Zero-Knowledge Proof Generation and Verification",anchor:"Blockchain Anchoring and Timestamping",schemaValidator:"W3C VC Schema Validation"},standards:["W3C Verifiable Credentials Data Model v1.1","W3C Decentralized Identifiers (DIDs) v1.0","RFC 7515 JSON Web Signature (JWS)","BSV Blockchain Protocol"]}};wD.exports=gt});var ED=k((Lve,xD)=>{"use strict";v();var s5=_r();async function Coe(e){e=e||{};var t=e.alg||"ES256",r=e.kid||"key-"+Date.now();if(t!=="ES256"&&t!=="ES256K")throw new Error("Invalid algorithm. Must be ES256 or ES256K");var i;t==="ES256"?i=s5.generateKeyPairSync("ec",{namedCurve:"P-256",publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}}):i=s5.generateKeyPairSync("ec",{namedCurve:"secp256k1",publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});var n=s5.createPublicKey(i.publicKey).export({format:"jwk"}),o=s5.createPrivateKey(i.privateKey).export({format:"jwk"});return n.kid=r,n.alg=t,n.use="sig",n.kty="EC",o.kid=r,o.alg=t,o.use="sig",o.kty="EC",{privateJwk:o,publicJwk:n,kid:r,alg:t}}function Noe(e){if(!e.domain)throw new Error("domain is required");var t=e.domain,r="did:web:"+t.replace(/:/g,"%3A"),i=[],n=[];if(e.p256){var o={id:r+"#"+e.p256.kid,type:"JsonWebKey2020",controller:r,publicKeyJwk:e.p256.jwk};i.push(o),n.push(e.p256.jwk)}if(e.k1){var a={id:r+"#"+e.k1.kid,type:"JsonWebKey2020",controller:r,publicKeyJwk:e.k1.jwk};i.push(a),n.push(e.k1.jwk)}if(i.length===0)throw new Error("At least one key (p256 or k1) must be provided");var s={"@context":["https://www.w3.org/ns/did/v1","https://w3id.org/security/suites/jws-2020/v1"],id:r,verificationMethod:i,authentication:i.map(function(c){return c.id}),assertionMethod:i.map(function(c){return c.id})};e.controllerName&&(s.controller=e.controllerName);var u={keys:n};return{did:r,didDocument:s,jwks:u}}function Doe(e){if(!e.domain||!e.newKey)throw new Error("domain and newKey are required");var t=e.domain,r="did:web:"+t.replace(/:/g,"%3A"),i=e.keepOldForDays||30,n={id:r+"#"+e.newKey.kid,type:"JsonWebKey2020",controller:r,publicKeyJwk:e.newKey.jwk},o={"@context":["https://www.w3.org/ns/did/v1","https://w3id.org/security/suites/jws-2020/v1"],id:r,verificationMethod:[n],authentication:[n.id],assertionMethod:[n.id],rotationInfo:{rotatedAt:new Date().toISOString(),gracePeriodDays:i}},a={keys:[e.newKey.jwk]};return{didDocument:o,jwks:a}}xD.exports={generateIssuerKeys:Coe,buildDidWebDocuments:Noe,rotateIssuerKey:Doe}});var f7=k((Uve,ID)=>{"use strict";v();var R1=_r(),B1={ES256:"P-256",ES256K:"secp256k1"},Loe=["ES256","ES256K"];function u5(e){return e.toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function f5(e){for(e=e.replace(/-/g,"+").replace(/_/g,"/");e.length%4;)e+="=";return h.Buffer.from(e,"base64")}async function qoe(e){if(!e.issuerDid||!e.subjectId||!e.credentialSubject||!e.privateJwk)throw new Error("issuerDid, subjectId, credentialSubject, and privateJwk are required");var t=e.alg||"ES256";if(!B1[t])throw new Error("Unsupported algorithm: "+t);if(e.privateJwk.crv&&e.privateJwk.crv!==B1[t])throw new Error("Key curve "+e.privateJwk.crv+" does not match alg "+t);var r=e.kid||e.privateJwk.kid,i=e.types||["VerifiableCredential"],n=e.expSeconds||365*24*60*60,o=Math.floor(Date.now()/1e3),a=new Date().toISOString(),s={"@context":["https://www.w3.org/2018/credentials/v1"],type:i,issuer:e.issuerDid,issuanceDate:a,credentialSubject:Object.assign({id:e.subjectId},e.credentialSubject)},u={iss:e.issuerDid,sub:e.subjectId,iat:o,exp:o+n,vc:s},c={alg:t,typ:"JWT",kid:r},l=u5(h.Buffer.from(JSON.stringify(c))),m=u5(h.Buffer.from(JSON.stringify(u))),w=l+"."+m,E=R1.createPrivateKey({key:e.privateJwk,format:"jwk"}),P=R1.sign("sha256",h.Buffer.from(w),{key:E,dsaEncoding:"ieee-p1363"}),M=u5(P),D=w+"."+M;return{jwt:D}}async function Uoe(e,t){t=t||{};try{if(typeof e!="string")return{valid:!1,error:"Invalid JWT format"};var r=e.split(".");if(r.length!==3)return{valid:!1,error:"Invalid JWT format"};var i=r[0],n=r[1],o=r[2],a=JSON.parse(f5(i).toString()),s=JSON.parse(f5(n).toString()),u=f5(o),c=t.allowedAlgs||Loe;if(!a.alg||c.indexOf(a.alg)===-1||!B1[a.alg])return{valid:!1,error:"Algorithm not allowed: "+a.alg,header:a,payload:s};var l=Math.floor(Date.now()/1e3),m=t.clockToleranceSec||60;if(t.requireExpiration&&!s.exp)return{valid:!1,error:"JWT missing required exp claim",header:a,payload:s};if(s.exp&&s.exp<l-m)return{valid:!1,error:"JWT expired",header:a,payload:s};if(s.nbf&&s.nbf>l+m)return{valid:!1,error:"JWT not yet valid",header:a,payload:s};if(t.expectedIssuerDid&&s.iss!==t.expectedIssuerDid)return{valid:!1,error:"Unexpected issuer",header:a,payload:s};var w;if(t.didResolver){var E=await t.didResolver(s.iss);if(!E||!E.jwks||!E.jwks.keys)return{valid:!1,error:"Failed to resolve issuer DID",header:a,payload:s};var P=E.jwks.keys.find(function(U){return U.kid===a.kid});if(!P)return{valid:!1,error:"Key not found in JWKS",header:a,payload:s};w=P}else return{valid:!1,error:"DID resolver required for verification",header:a,payload:s};if(w.crv&&w.crv!==B1[a.alg])return{valid:!1,error:"Key curve does not match algorithm",header:a,payload:s};var M=i+"."+n,D=R1.createPublicKey({key:w,format:"jwk"}),L=R1.verify("sha256",h.Buffer.from(M),{key:D,dsaEncoding:"ieee-p1363"},u);if(!L&&t.allowLegacyDER)try{L=R1.verify("sha256",h.Buffer.from(M),{key:D,dsaEncoding:"der"},u)}catch{L=!1}return L?{valid:!0,header:a,payload:s}:{valid:!1,error:"Invalid signature",header:a,payload:s}}catch(U){return{valid:!1,error:U.message||"Verification failed"}}}ID.exports={issueVcJwt:qoe,verifyVcJwt:Uoe,base64UrlEncode:u5,base64UrlDecode:f5,ALG_TO_CRV:B1}});var AD=k((Hve,OD)=>{"use strict";v();function Foe(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}OD.exports=Foe});var M1=k(Ei=>{"use strict";v();var Hoe=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function joe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}Ei.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(var i in r)joe(r,i)&&(e[i]=r[i])}}return e};Ei.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var zoe={arraySet:function(e,t,r,i,n){if(t.subarray&&e.subarray){e.set(t.subarray(r,r+i),n);return}for(var o=0;o<i;o++)e[n+o]=t[r+o]},flattenChunks:function(e){var t,r,i,n,o,a;for(i=0,t=0,r=e.length;t<r;t++)i+=e[t].length;for(a=new Uint8Array(i),n=0,t=0,r=e.length;t<r;t++)o=e[t],a.set(o,n),n+=o.length;return a}},Koe={arraySet:function(e,t,r,i,n){for(var o=0;o<i;o++)e[n+o]=t[r+o]},flattenChunks:function(e){return[].concat.apply([],e)}};Ei.setTyped=function(e){e?(Ei.Buf8=Uint8Array,Ei.Buf16=Uint16Array,Ei.Buf32=Int32Array,Ei.assign(Ei,zoe)):(Ei.Buf8=Array,Ei.Buf16=Array,Ei.Buf32=Array,Ei.assign(Ei,Koe))};Ei.setTyped(Hoe)});var $D=k(Ul=>{"use strict";v();var Voe=M1(),Goe=4,PD=0,TD=1,Zoe=2;function ql(e){for(var t=e.length;--t>=0;)e[t]=0}var Woe=0,ND=1,Yoe=2,$oe=3,Xoe=258,v7=29,U1=256,N1=U1+1+v7,Ll=30,m7=19,DD=2*N1+1,Pf=15,c7=16,Joe=7,y7=256,LD=16,qD=17,UD=18,p7=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],c5=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Qoe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],FD=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],eae=512,Ja=new Array((N1+2)*2);ql(Ja);var C1=new Array(Ll*2);ql(C1);var D1=new Array(eae);ql(D1);var L1=new Array(Xoe-$oe+1);ql(L1);var b7=new Array(v7);ql(b7);var l5=new Array(Ll);ql(l5);function l7(e,t,r,i,n){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=i,this.max_length=n,this.has_stree=e&&e.length}var HD,jD,zD;function h7(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function KD(e){return e<256?D1[e]:D1[256+(e>>>7)]}function q1(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function Ni(e,t,r){e.bi_valid>c7-r?(e.bi_buf|=t<<e.bi_valid&65535,q1(e,e.bi_buf),e.bi_buf=t>>c7-e.bi_valid,e.bi_valid+=r-c7):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function Qo(e,t,r){Ni(e,r[t*2],r[t*2+1])}function VD(e,t){var r=0;do r|=e&1,e>>>=1,r<<=1;while(--t>0);return r>>>1}function tae(e){e.bi_valid===16?(q1(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function rae(e,t){var r=t.dyn_tree,i=t.max_code,n=t.stat_desc.static_tree,o=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,u=t.stat_desc.max_length,c,l,m,w,E,P,M=0;for(w=0;w<=Pf;w++)e.bl_count[w]=0;for(r[e.heap[e.heap_max]*2+1]=0,c=e.heap_max+1;c<DD;c++)l=e.heap[c],w=r[r[l*2+1]*2+1]+1,w>u&&(w=u,M++),r[l*2+1]=w,!(l>i)&&(e.bl_count[w]++,E=0,l>=s&&(E=a[l-s]),P=r[l*2],e.opt_len+=P*(w+E),o&&(e.static_len+=P*(n[l*2+1]+E)));if(M!==0){do{for(w=u-1;e.bl_count[w]===0;)w--;e.bl_count[w]--,e.bl_count[w+1]+=2,e.bl_count[u]--,M-=2}while(M>0);for(w=u;w!==0;w--)for(l=e.bl_count[w];l!==0;)m=e.heap[--c],!(m>i)&&(r[m*2+1]!==w&&(e.opt_len+=(w-r[m*2+1])*r[m*2],r[m*2+1]=w),l--)}}function GD(e,t,r){var i=new Array(Pf+1),n=0,o,a;for(o=1;o<=Pf;o++)i[o]=n=n+r[o-1]<<1;for(a=0;a<=t;a++){var s=e[a*2+1];s!==0&&(e[a*2]=VD(i[s]++,s))}}function iae(){var e,t,r,i,n,o=new Array(Pf+1);for(r=0,i=0;i<v7-1;i++)for(b7[i]=r,e=0;e<1<<p7[i];e++)L1[r++]=i;for(L1[r-1]=i,n=0,i=0;i<16;i++)for(l5[i]=n,e=0;e<1<<c5[i];e++)D1[n++]=i;for(n>>=7;i<Ll;i++)for(l5[i]=n<<7,e=0;e<1<<c5[i]-7;e++)D1[256+n++]=i;for(t=0;t<=Pf;t++)o[t]=0;for(e=0;e<=143;)Ja[e*2+1]=8,e++,o[8]++;for(;e<=255;)Ja[e*2+1]=9,e++,o[9]++;for(;e<=279;)Ja[e*2+1]=7,e++,o[7]++;for(;e<=287;)Ja[e*2+1]=8,e++,o[8]++;for(GD(Ja,N1+1,o),e=0;e<Ll;e++)C1[e*2+1]=5,C1[e*2]=VD(e,5);HD=new l7(Ja,p7,U1+1,N1,Pf),jD=new l7(C1,c5,0,Ll,Pf),zD=new l7(new Array(0),Qoe,0,m7,Joe)}function ZD(e){var t;for(t=0;t<N1;t++)e.dyn_ltree[t*2]=0;for(t=0;t<Ll;t++)e.dyn_dtree[t*2]=0;for(t=0;t<m7;t++)e.bl_tree[t*2]=0;e.dyn_ltree[y7*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function WD(e){e.bi_valid>8?q1(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function nae(e,t,r,i){WD(e),i&&(q1(e,r),q1(e,~r)),Voe.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}function kD(e,t,r,i){var n=t*2,o=r*2;return e[n]<e[o]||e[n]===e[o]&&i[t]<=i[r]}function d7(e,t,r){for(var i=e.heap[r],n=r<<1;n<=e.heap_len&&(n<e.heap_len&&kD(t,e.heap[n+1],e.heap[n],e.depth)&&n++,!kD(t,i,e.heap[n],e.depth));)e.heap[r]=e.heap[n],r=n,n<<=1;e.heap[r]=i}function RD(e,t,r){var i,n,o=0,a,s;if(e.last_lit!==0)do i=e.pending_buf[e.d_buf+o*2]<<8|e.pending_buf[e.d_buf+o*2+1],n=e.pending_buf[e.l_buf+o],o++,i===0?Qo(e,n,t):(a=L1[n],Qo(e,a+U1+1,t),s=p7[a],s!==0&&(n-=b7[a],Ni(e,n,s)),i--,a=KD(i),Qo(e,a,r),s=c5[a],s!==0&&(i-=l5[a],Ni(e,i,s)));while(o<e.last_lit);Qo(e,y7,t)}function g7(e,t){var r=t.dyn_tree,i=t.stat_desc.static_tree,n=t.stat_desc.has_stree,o=t.stat_desc.elems,a,s,u=-1,c;for(e.heap_len=0,e.heap_max=DD,a=0;a<o;a++)r[a*2]!==0?(e.heap[++e.heap_len]=u=a,e.depth[a]=0):r[a*2+1]=0;for(;e.heap_len<2;)c=e.heap[++e.heap_len]=u<2?++u:0,r[c*2]=1,e.depth[c]=0,e.opt_len--,n&&(e.static_len-=i[c*2+1]);for(t.max_code=u,a=e.heap_len>>1;a>=1;a--)d7(e,r,a);c=o;do a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],d7(e,r,1),s=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=s,r[c*2]=r[a*2]+r[s*2],e.depth[c]=(e.depth[a]>=e.depth[s]?e.depth[a]:e.depth[s])+1,r[a*2+1]=r[s*2+1]=c,e.heap[1]=c++,d7(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],rae(e,t),GD(r,u,e.bl_count)}function BD(e,t,r){var i,n=-1,o,a=t[1],s=0,u=7,c=4;for(a===0&&(u=138,c=3),t[(r+1)*2+1]=65535,i=0;i<=r;i++)o=a,a=t[(i+1)*2+1],!(++s<u&&o===a)&&(s<c?e.bl_tree[o*2]+=s:o!==0?(o!==n&&e.bl_tree[o*2]++,e.bl_tree[LD*2]++):s<=10?e.bl_tree[qD*2]++:e.bl_tree[UD*2]++,s=0,n=o,a===0?(u=138,c=3):o===a?(u=6,c=3):(u=7,c=4))}function MD(e,t,r){var i,n=-1,o,a=t[1],s=0,u=7,c=4;for(a===0&&(u=138,c=3),i=0;i<=r;i++)if(o=a,a=t[(i+1)*2+1],!(++s<u&&o===a)){if(s<c)do Qo(e,o,e.bl_tree);while(--s!==0);else o!==0?(o!==n&&(Qo(e,o,e.bl_tree),s--),Qo(e,LD,e.bl_tree),Ni(e,s-3,2)):s<=10?(Qo(e,qD,e.bl_tree),Ni(e,s-3,3)):(Qo(e,UD,e.bl_tree),Ni(e,s-11,7));s=0,n=o,a===0?(u=138,c=3):o===a?(u=6,c=3):(u=7,c=4)}}function oae(e){var t;for(BD(e,e.dyn_ltree,e.l_desc.max_code),BD(e,e.dyn_dtree,e.d_desc.max_code),g7(e,e.bl_desc),t=m7-1;t>=3&&e.bl_tree[FD[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function aae(e,t,r,i){var n;for(Ni(e,t-257,5),Ni(e,r-1,5),Ni(e,i-4,4),n=0;n<i;n++)Ni(e,e.bl_tree[FD[n]*2+1],3);MD(e,e.dyn_ltree,t-1),MD(e,e.dyn_dtree,r-1)}function sae(e){var t=4093624447,r;for(r=0;r<=31;r++,t>>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return PD;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return TD;for(r=32;r<U1;r++)if(e.dyn_ltree[r*2]!==0)return TD;return PD}var CD=!1;function uae(e){CD||(iae(),CD=!0),e.l_desc=new h7(e.dyn_ltree,HD),e.d_desc=new h7(e.dyn_dtree,jD),e.bl_desc=new h7(e.bl_tree,zD),e.bi_buf=0,e.bi_valid=0,ZD(e)}function YD(e,t,r,i){Ni(e,(Woe<<1)+(i?1:0),3),nae(e,t,r,!0)}function fae(e){Ni(e,ND<<1,3),Qo(e,y7,Ja),tae(e)}function cae(e,t,r,i){var n,o,a=0;e.level>0?(e.strm.data_type===Zoe&&(e.strm.data_type=sae(e)),g7(e,e.l_desc),g7(e,e.d_desc),a=oae(e),n=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=n&&(n=o)):n=o=r+5,r+4<=n&&t!==-1?YD(e,t,r,i):e.strategy===Goe||o===n?(Ni(e,(ND<<1)+(i?1:0),3),RD(e,Ja,C1)):(Ni(e,(Yoe<<1)+(i?1:0),3),aae(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),RD(e,e.dyn_ltree,e.dyn_dtree)),ZD(e),i&&WD(e)}function lae(e,t,r){return e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=r&255,e.last_lit++,t===0?e.dyn_ltree[r*2]++:(e.matches++,t--,e.dyn_ltree[(L1[r]+U1+1)*2]++,e.dyn_dtree[KD(t)*2]++),e.last_lit===e.lit_bufsize-1}Ul._tr_init=uae;Ul._tr_stored_block=YD;Ul._tr_flush_block=cae;Ul._tr_tally=lae;Ul._tr_align=fae});var _7=k((Zve,XD)=>{"use strict";v();function hae(e,t,r,i){for(var n=e&65535|0,o=e>>>16&65535|0,a=0;r!==0;){a=r>2e3?2e3:r,r-=a;do n=n+t[i++]|0,o=o+n|0;while(--a);n%=65521,o%=65521}return n|o<<16|0}XD.exports=hae});var w7=k((Yve,JD)=>{"use strict";v();function dae(){for(var e,t=[],r=0;r<256;r++){e=r;for(var i=0;i<8;i++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e}return t}var pae=dae();function gae(e,t,r,i){var n=pae,o=i+r;e^=-1;for(var a=i;a<o;a++)e=e>>>8^n[(e^t[a])&255];return e^-1}JD.exports=gae});var eL=k((Xve,QD)=>{"use strict";v();QD.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var fL=k(ra=>{"use strict";v();var Ii=M1(),In=$D(),nL=_7(),Ks=w7(),vae=eL(),Bf=0,mae=1,yae=3,Ys=4,tL=5,ta=0,rL=1,On=-2,bae=-3,S7=-5,_ae=-1,wae=1,h5=2,Sae=3,xae=4,Eae=0,Iae=2,v5=8,Oae=9,Aae=15,Pae=8,Tae=29,kae=256,E7=kae+1+Tae,Rae=30,Bae=19,Mae=2*E7+1,Cae=15,_t=3,Zs=258,fo=Zs+_t+1,Nae=32,m5=42,I7=69,d5=73,p5=91,g5=103,Tf=113,H1=666,Ur=1,j1=2,kf=3,jl=4,Dae=3;function Ws(e,t){return e.msg=vae[t],t}function iL(e){return(e<<1)-(e>4?9:0)}function Gs(e){for(var t=e.length;--t>=0;)e[t]=0}function Vs(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),r!==0&&(Ii.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,t.pending===0&&(t.pending_out=0))}function ai(e,t){In._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Vs(e.strm)}function Pt(e,t){e.pending_buf[e.pending++]=t}function F1(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function Lae(e,t,r,i){var n=e.avail_in;return n>i&&(n=i),n===0?0:(e.avail_in-=n,Ii.arraySet(t,e.input,e.next_in,n,r),e.state.wrap===1?e.adler=nL(e.adler,t,n,r):e.state.wrap===2&&(e.adler=Ks(e.adler,t,n,r)),e.next_in+=n,e.total_in+=n,n)}function oL(e,t){var r=e.max_chain_length,i=e.strstart,n,o,a=e.prev_length,s=e.nice_match,u=e.strstart>e.w_size-fo?e.strstart-(e.w_size-fo):0,c=e.window,l=e.w_mask,m=e.prev,w=e.strstart+Zs,E=c[i+a-1],P=c[i+a];e.prev_length>=e.good_match&&(r>>=2),s>e.lookahead&&(s=e.lookahead);do if(n=t,!(c[n+a]!==P||c[n+a-1]!==E||c[n]!==c[i]||c[++n]!==c[i+1])){i+=2,n++;do;while(c[++i]===c[++n]&&c[++i]===c[++n]&&c[++i]===c[++n]&&c[++i]===c[++n]&&c[++i]===c[++n]&&c[++i]===c[++n]&&c[++i]===c[++n]&&c[++i]===c[++n]&&i<w);if(o=Zs-(w-i),i=w-Zs,o>a){if(e.match_start=t,a=o,o>=s)break;E=c[i+a-1],P=c[i+a]}}while((t=m[t&l])>u&&--r!==0);return a<=e.lookahead?a:e.lookahead}function Rf(e){var t=e.w_size,r,i,n,o,a;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-fo)){Ii.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,i=e.hash_size,r=i;do n=e.head[--r],e.head[r]=n>=t?n-t:0;while(--i);i=t,r=i;do n=e.prev[--r],e.prev[r]=n>=t?n-t:0;while(--i);o+=t}if(e.strm.avail_in===0)break;if(i=Lae(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=i,e.lookahead+e.insert>=_t)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+_t-1])&e.hash_mask,e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert<_t)););}while(e.lookahead<fo&&e.strm.avail_in!==0)}function qae(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Rf(e),e.lookahead===0&&t===Bf)return Ur;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var i=e.block_start+r;if((e.strstart===0||e.strstart>=i)&&(e.lookahead=e.strstart-i,e.strstart=i,ai(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-fo&&(ai(e,!1),e.strm.avail_out===0))return Ur}return e.insert=0,t===Ys?(ai(e,!0),e.strm.avail_out===0?kf:jl):(e.strstart>e.block_start&&(ai(e,!1),e.strm.avail_out===0),Ur)}function x7(e,t){for(var r,i;;){if(e.lookahead<fo){if(Rf(e),e.lookahead<fo&&t===Bf)return Ur;if(e.lookahead===0)break}if(r=0,e.lookahead>=_t&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+_t-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),r!==0&&e.strstart-r<=e.w_size-fo&&(e.match_length=oL(e,r)),e.match_length>=_t)if(i=In._tr_tally(e,e.strstart-e.match_start,e.match_length-_t),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=_t){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+_t-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else i=In._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(ai(e,!1),e.strm.avail_out===0))return Ur}return e.insert=e.strstart<_t-1?e.strstart:_t-1,t===Ys?(ai(e,!0),e.strm.avail_out===0?kf:jl):e.last_lit&&(ai(e,!1),e.strm.avail_out===0)?Ur:j1}function Fl(e,t){for(var r,i,n;;){if(e.lookahead<fo){if(Rf(e),e.lookahead<fo&&t===Bf)return Ur;if(e.lookahead===0)break}if(r=0,e.lookahead>=_t&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+_t-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=_t-1,r!==0&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-fo&&(e.match_length=oL(e,r),e.match_length<=5&&(e.strategy===wae||e.match_length===_t&&e.strstart-e.match_start>4096)&&(e.match_length=_t-1)),e.prev_length>=_t&&e.match_length<=e.prev_length){n=e.strstart+e.lookahead-_t,i=In._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-_t),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=n&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+_t-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=_t-1,e.strstart++,i&&(ai(e,!1),e.strm.avail_out===0))return Ur}else if(e.match_available){if(i=In._tr_tally(e,0,e.window[e.strstart-1]),i&&ai(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Ur}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=In._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<_t-1?e.strstart:_t-1,t===Ys?(ai(e,!0),e.strm.avail_out===0?kf:jl):e.last_lit&&(ai(e,!1),e.strm.avail_out===0)?Ur:j1}function Uae(e,t){for(var r,i,n,o,a=e.window;;){if(e.lookahead<=Zs){if(Rf(e),e.lookahead<=Zs&&t===Bf)return Ur;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=_t&&e.strstart>0&&(n=e.strstart-1,i=a[n],i===a[++n]&&i===a[++n]&&i===a[++n])){o=e.strstart+Zs;do;while(i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&n<o);e.match_length=Zs-(o-n),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=_t?(r=In._tr_tally(e,1,e.match_length-_t),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=In._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(ai(e,!1),e.strm.avail_out===0))return Ur}return e.insert=0,t===Ys?(ai(e,!0),e.strm.avail_out===0?kf:jl):e.last_lit&&(ai(e,!1),e.strm.avail_out===0)?Ur:j1}function Fae(e,t){for(var r;;){if(e.lookahead===0&&(Rf(e),e.lookahead===0)){if(t===Bf)return Ur;break}if(e.match_length=0,r=In._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(ai(e,!1),e.strm.avail_out===0))return Ur}return e.insert=0,t===Ys?(ai(e,!0),e.strm.avail_out===0?kf:jl):e.last_lit&&(ai(e,!1),e.strm.avail_out===0)?Ur:j1}function ea(e,t,r,i,n){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=i,this.func=n}var Hl;Hl=[new ea(0,0,0,0,qae),new ea(4,4,8,4,x7),new ea(4,5,16,8,x7),new ea(4,6,32,32,x7),new ea(4,4,16,16,Fl),new ea(8,16,32,32,Fl),new ea(8,16,128,128,Fl),new ea(8,32,128,256,Fl),new ea(32,128,258,1024,Fl),new ea(32,258,258,4096,Fl)];function Hae(e){e.window_size=2*e.w_size,Gs(e.head),e.max_lazy_match=Hl[e.level].max_lazy,e.good_match=Hl[e.level].good_length,e.nice_match=Hl[e.level].nice_length,e.max_chain_length=Hl[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=_t-1,e.match_available=0,e.ins_h=0}function jae(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=v5,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Ii.Buf16(Mae*2),this.dyn_dtree=new Ii.Buf16((2*Rae+1)*2),this.bl_tree=new Ii.Buf16((2*Bae+1)*2),Gs(this.dyn_ltree),Gs(this.dyn_dtree),Gs(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Ii.Buf16(Cae+1),this.heap=new Ii.Buf16(2*E7+1),Gs(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Ii.Buf16(2*E7+1),Gs(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function aL(e){var t;return!e||!e.state?Ws(e,On):(e.total_in=e.total_out=0,e.data_type=Iae,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?m5:Tf,e.adler=t.wrap===2?0:1,t.last_flush=Bf,In._tr_init(t),ta)}function sL(e){var t=aL(e);return t===ta&&Hae(e.state),t}function zae(e,t){return!e||!e.state||e.state.wrap!==2?On:(e.state.gzhead=t,ta)}function uL(e,t,r,i,n,o){if(!e)return On;var a=1;if(t===_ae&&(t=6),i<0?(a=0,i=-i):i>15&&(a=2,i-=16),n<1||n>Oae||r!==v5||i<8||i>15||t<0||t>9||o<0||o>xae)return Ws(e,On);i===8&&(i=9);var s=new jae;return e.state=s,s.strm=e,s.wrap=a,s.gzhead=null,s.w_bits=i,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=n+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+_t-1)/_t),s.window=new Ii.Buf8(s.w_size*2),s.head=new Ii.Buf16(s.hash_size),s.prev=new Ii.Buf16(s.w_size),s.lit_bufsize=1<<n+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new Ii.Buf8(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=t,s.strategy=o,s.method=r,sL(e)}function Kae(e,t){return uL(e,t,v5,Aae,Pae,Eae)}function Vae(e,t){var r,i,n,o;if(!e||!e.state||t>tL||t<0)return e?Ws(e,On):On;if(i=e.state,!e.output||!e.input&&e.avail_in!==0||i.status===H1&&t!==Ys)return Ws(e,e.avail_out===0?S7:On);if(i.strm=e,r=i.last_flush,i.last_flush=t,i.status===m5)if(i.wrap===2)e.adler=0,Pt(i,31),Pt(i,139),Pt(i,8),i.gzhead?(Pt(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),Pt(i,i.gzhead.time&255),Pt(i,i.gzhead.time>>8&255),Pt(i,i.gzhead.time>>16&255),Pt(i,i.gzhead.time>>24&255),Pt(i,i.level===9?2:i.strategy>=h5||i.level<2?4:0),Pt(i,i.gzhead.os&255),i.gzhead.extra&&i.gzhead.extra.length&&(Pt(i,i.gzhead.extra.length&255),Pt(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=Ks(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=I7):(Pt(i,0),Pt(i,0),Pt(i,0),Pt(i,0),Pt(i,0),Pt(i,i.level===9?2:i.strategy>=h5||i.level<2?4:0),Pt(i,Dae),i.status=Tf);else{var a=v5+(i.w_bits-8<<4)<<8,s=-1;i.strategy>=h5||i.level<2?s=0:i.level<6?s=1:i.level===6?s=2:s=3,a|=s<<6,i.strstart!==0&&(a|=Nae),a+=31-a%31,i.status=Tf,F1(i,a),i.strstart!==0&&(F1(i,e.adler>>>16),F1(i,e.adler&65535)),e.adler=1}if(i.status===I7)if(i.gzhead.extra){for(n=i.pending;i.gzindex<(i.gzhead.extra.length&65535)&&!(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=Ks(e.adler,i.pending_buf,i.pending-n,n)),Vs(e),n=i.pending,i.pending===i.pending_buf_size));)Pt(i,i.gzhead.extra[i.gzindex]&255),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(e.adler=Ks(e.adler,i.pending_buf,i.pending-n,n)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=d5)}else i.status=d5;if(i.status===d5)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=Ks(e.adler,i.pending_buf,i.pending-n,n)),Vs(e),n=i.pending,i.pending===i.pending_buf_size)){o=1;break}i.gzindex<i.gzhead.name.length?o=i.gzhead.name.charCodeAt(i.gzindex++)&255:o=0,Pt(i,o)}while(o!==0);i.gzhead.hcrc&&i.pending>n&&(e.adler=Ks(e.adler,i.pending_buf,i.pending-n,n)),o===0&&(i.gzindex=0,i.status=p5)}else i.status=p5;if(i.status===p5)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=Ks(e.adler,i.pending_buf,i.pending-n,n)),Vs(e),n=i.pending,i.pending===i.pending_buf_size)){o=1;break}i.gzindex<i.gzhead.comment.length?o=i.gzhead.comment.charCodeAt(i.gzindex++)&255:o=0,Pt(i,o)}while(o!==0);i.gzhead.hcrc&&i.pending>n&&(e.adler=Ks(e.adler,i.pending_buf,i.pending-n,n)),o===0&&(i.status=g5)}else i.status=g5;if(i.status===g5&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&Vs(e),i.pending+2<=i.pending_buf_size&&(Pt(i,e.adler&255),Pt(i,e.adler>>8&255),e.adler=0,i.status=Tf)):i.status=Tf),i.pending!==0){if(Vs(e),e.avail_out===0)return i.last_flush=-1,ta}else if(e.avail_in===0&&iL(t)<=iL(r)&&t!==Ys)return Ws(e,S7);if(i.status===H1&&e.avail_in!==0)return Ws(e,S7);if(e.avail_in!==0||i.lookahead!==0||t!==Bf&&i.status!==H1){var u=i.strategy===h5?Fae(i,t):i.strategy===Sae?Uae(i,t):Hl[i.level].func(i,t);if((u===kf||u===jl)&&(i.status=H1),u===Ur||u===kf)return e.avail_out===0&&(i.last_flush=-1),ta;if(u===j1&&(t===mae?In._tr_align(i):t!==tL&&(In._tr_stored_block(i,0,0,!1),t===yae&&(Gs(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),Vs(e),e.avail_out===0))return i.last_flush=-1,ta}return t!==Ys?ta:i.wrap<=0?rL:(i.wrap===2?(Pt(i,e.adler&255),Pt(i,e.adler>>8&255),Pt(i,e.adler>>16&255),Pt(i,e.adler>>24&255),Pt(i,e.total_in&255),Pt(i,e.total_in>>8&255),Pt(i,e.total_in>>16&255),Pt(i,e.total_in>>24&255)):(F1(i,e.adler>>>16),F1(i,e.adler&65535)),Vs(e),i.wrap>0&&(i.wrap=-i.wrap),i.pending!==0?ta:rL)}function Gae(e){var t;return!e||!e.state?On:(t=e.state.status,t!==m5&&t!==I7&&t!==d5&&t!==p5&&t!==g5&&t!==Tf&&t!==H1?Ws(e,On):(e.state=null,t===Tf?Ws(e,bae):ta))}function Zae(e,t){var r=t.length,i,n,o,a,s,u,c,l;if(!e||!e.state||(i=e.state,a=i.wrap,a===2||a===1&&i.status!==m5||i.lookahead))return On;for(a===1&&(e.adler=nL(e.adler,t,r,0)),i.wrap=0,r>=i.w_size&&(a===0&&(Gs(i.head),i.strstart=0,i.block_start=0,i.insert=0),l=new Ii.Buf8(i.w_size),Ii.arraySet(l,t,r-i.w_size,i.w_size,0),t=l,r=i.w_size),s=e.avail_in,u=e.next_in,c=e.input,e.avail_in=r,e.next_in=0,e.input=t,Rf(i);i.lookahead>=_t;){n=i.strstart,o=i.lookahead-(_t-1);do i.ins_h=(i.ins_h<<i.hash_shift^i.window[n+_t-1])&i.hash_mask,i.prev[n&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=n,n++;while(--o);i.strstart=n,i.lookahead=_t-1,Rf(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=_t-1,i.match_available=0,e.next_in=u,e.input=c,e.avail_in=s,i.wrap=a,ta}ra.deflateInit=Kae;ra.deflateInit2=uL;ra.deflateReset=sL;ra.deflateResetKeep=aL;ra.deflateSetHeader=zae;ra.deflate=Vae;ra.deflateEnd=Gae;ra.deflateSetDictionary=Zae;ra.deflateInfo="pako deflate (from Nodeca project)"});var lL=k((tme,cL)=>{"use strict";v();var y5=30,Wae=12;cL.exports=function(t,r){var i,n,o,a,s,u,c,l,m,w,E,P,M,D,L,U,K,C,N,F,H,z,V,B,g;i=t.state,n=t.next_in,B=t.input,o=n+(t.avail_in-5),a=t.next_out,g=t.output,s=a-(r-t.avail_out),u=a+(t.avail_out-257),c=i.dmax,l=i.wsize,m=i.whave,w=i.wnext,E=i.window,P=i.hold,M=i.bits,D=i.lencode,L=i.distcode,U=(1<<i.lenbits)-1,K=(1<<i.distbits)-1;e:do{M<15&&(P+=B[n++]<<M,M+=8,P+=B[n++]<<M,M+=8),C=D[P&U];t:for(;;){if(N=C>>>24,P>>>=N,M-=N,N=C>>>16&255,N===0)g[a++]=C&65535;else if(N&16){F=C&65535,N&=15,N&&(M<N&&(P+=B[n++]<<M,M+=8),F+=P&(1<<N)-1,P>>>=N,M-=N),M<15&&(P+=B[n++]<<M,M+=8,P+=B[n++]<<M,M+=8),C=L[P&K];r:for(;;){if(N=C>>>24,P>>>=N,M-=N,N=C>>>16&255,N&16){if(H=C&65535,N&=15,M<N&&(P+=B[n++]<<M,M+=8,M<N&&(P+=B[n++]<<M,M+=8)),H+=P&(1<<N)-1,H>c){t.msg="invalid distance too far back",i.mode=y5;break e}if(P>>>=N,M-=N,N=a-s,H>N){if(N=H-N,N>m&&i.sane){t.msg="invalid distance too far back",i.mode=y5;break e}if(z=0,V=E,w===0){if(z+=l-N,N<F){F-=N;do g[a++]=E[z++];while(--N);z=a-H,V=g}}else if(w<N){if(z+=l+w-N,N-=w,N<F){F-=N;do g[a++]=E[z++];while(--N);if(z=0,w<F){N=w,F-=N;do g[a++]=E[z++];while(--N);z=a-H,V=g}}}else if(z+=w-N,N<F){F-=N;do g[a++]=E[z++];while(--N);z=a-H,V=g}for(;F>2;)g[a++]=V[z++],g[a++]=V[z++],g[a++]=V[z++],F-=3;F&&(g[a++]=V[z++],F>1&&(g[a++]=V[z++]))}else{z=a-H;do g[a++]=g[z++],g[a++]=g[z++],g[a++]=g[z++],F-=3;while(F>2);F&&(g[a++]=g[z++],F>1&&(g[a++]=g[z++]))}}else if((N&64)===0){C=L[(C&65535)+(P&(1<<N)-1)];continue r}else{t.msg="invalid distance code",i.mode=y5;break e}break}}else if((N&64)===0){C=D[(C&65535)+(P&(1<<N)-1)];continue t}else if(N&32){i.mode=Wae;break e}else{t.msg="invalid literal/length code",i.mode=y5;break e}break}}while(n<o&&a<u);F=M>>3,n-=F,M-=F<<3,P&=(1<<M)-1,t.next_in=n,t.next_out=a,t.avail_in=n<o?5+(o-n):5-(n-o),t.avail_out=a<u?257+(u-a):257-(a-u),i.hold=P,i.bits=M}});var yL=k((ime,mL)=>{"use strict";v();var hL=M1(),zl=15,dL=852,pL=592,gL=0,O7=1,vL=2,Yae=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],$ae=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],Xae=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],Jae=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];mL.exports=function(t,r,i,n,o,a,s,u){var c=u.bits,l=0,m=0,w=0,E=0,P=0,M=0,D=0,L=0,U=0,K=0,C,N,F,H,z,V=null,B=0,g,I=new hL.Buf16(zl+1),y=new hL.Buf16(zl+1),f=null,p=0,_,x,b;for(l=0;l<=zl;l++)I[l]=0;for(m=0;m<n;m++)I[r[i+m]]++;for(P=c,E=zl;E>=1&&I[E]===0;E--);if(P>E&&(P=E),E===0)return o[a++]=1<<24|64<<16|0,o[a++]=1<<24|64<<16|0,u.bits=1,0;for(w=1;w<E&&I[w]===0;w++);for(P<w&&(P=w),L=1,l=1;l<=zl;l++)if(L<<=1,L-=I[l],L<0)return-1;if(L>0&&(t===gL||E!==1))return-1;for(y[1]=0,l=1;l<zl;l++)y[l+1]=y[l]+I[l];for(m=0;m<n;m++)r[i+m]!==0&&(s[y[r[i+m]]++]=m);if(t===gL?(V=f=s,g=19):t===O7?(V=Yae,B-=257,f=$ae,p-=257,g=256):(V=Xae,f=Jae,g=-1),K=0,m=0,l=w,z=a,M=P,D=0,F=-1,U=1<<P,H=U-1,t===O7&&U>dL||t===vL&&U>pL)return 1;for(;;){_=l-D,s[m]<g?(x=0,b=s[m]):s[m]>g?(x=f[p+s[m]],b=V[B+s[m]]):(x=96,b=0),C=1<<l-D,N=1<<M,w=N;do N-=C,o[z+(K>>D)+N]=_<<24|x<<16|b|0;while(N!==0);for(C=1<<l-1;K&C;)C>>=1;if(C!==0?(K&=C-1,K+=C):K=0,m++,--I[l]===0){if(l===E)break;l=r[i+s[m]]}if(l>P&&(K&H)!==F){for(D===0&&(D=P),z+=w,M=l-D,L=1<<M;M+D<E&&(L-=I[M+D],!(L<=0));)M++,L<<=1;if(U+=1<<M,t===O7&&U>dL||t===vL&&U>pL)return 1;F=K&H,o[F]=P<<24|M<<16|z-a|0}}return K!==0&&(o[z+K]=l-D<<24|64<<16|0),u.bits=P,0}});var QL=k(co=>{"use strict";v();var Wi=M1(),B7=_7(),ia=w7(),Qae=lL(),z1=yL(),ese=0,KL=1,VL=2,bL=4,tse=5,b5=6,Mf=0,rse=1,ise=2,An=-2,GL=-3,M7=-4,nse=-5,_L=8,ZL=1,wL=2,SL=3,xL=4,EL=5,IL=6,OL=7,AL=8,PL=9,TL=10,S5=11,Qa=12,A7=13,kL=14,P7=15,RL=16,BL=17,ML=18,CL=19,_5=20,w5=21,NL=22,DL=23,LL=24,qL=25,UL=26,T7=27,FL=28,HL=29,ir=30,C7=31,ose=32,ase=852,sse=592,use=15,fse=use;function jL(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function cse(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Wi.Buf16(320),this.work=new Wi.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function WL(e){var t;return!e||!e.state?An:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=ZL,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Wi.Buf32(ase),t.distcode=t.distdyn=new Wi.Buf32(sse),t.sane=1,t.back=-1,Mf)}function YL(e){var t;return!e||!e.state?An:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,WL(e))}function $L(e,t){var r,i;return!e||!e.state||(i=e.state,t<0?(r=0,t=-t):(r=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?An:(i.window!==null&&i.wbits!==t&&(i.window=null),i.wrap=r,i.wbits=t,YL(e))}function XL(e,t){var r,i;return e?(i=new cse,e.state=i,i.window=null,r=$L(e,t),r!==Mf&&(e.state=null),r):An}function lse(e){return XL(e,fse)}var zL=!0,k7,R7;function hse(e){if(zL){var t;for(k7=new Wi.Buf32(512),R7=new Wi.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(z1(KL,e.lens,0,288,k7,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;z1(VL,e.lens,0,32,R7,0,e.work,{bits:5}),zL=!1}e.lencode=k7,e.lenbits=9,e.distcode=R7,e.distbits=5}function JL(e,t,r,i){var n,o=e.state;return o.window===null&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Wi.Buf8(o.wsize)),i>=o.wsize?(Wi.arraySet(o.window,t,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(n=o.wsize-o.wnext,n>i&&(n=i),Wi.arraySet(o.window,t,r-i,n,o.wnext),i-=n,i?(Wi.arraySet(o.window,t,r-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=n,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=n))),0}function dse(e,t){var r,i,n,o,a,s,u,c,l,m,w,E,P,M,D=0,L,U,K,C,N,F,H,z,V=new Wi.Buf8(4),B,g,I=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return An;r=e.state,r.mode===Qa&&(r.mode=A7),a=e.next_out,n=e.output,u=e.avail_out,o=e.next_in,i=e.input,s=e.avail_in,c=r.hold,l=r.bits,m=s,w=u,z=Mf;e:for(;;)switch(r.mode){case ZL:if(r.wrap===0){r.mode=A7;break}for(;l<16;){if(s===0)break e;s--,c+=i[o++]<<l,l+=8}if(r.wrap&2&&c===35615){r.check=0,V[0]=c&255,V[1]=c>>>8&255,r.check=ia(r.check,V,2,0),c=0,l=0,r.mode=wL;break}if(r.flags=0,r.head&&(r.head.done=!1),!(r.wrap&1)||(((c&255)<<8)+(c>>8))%31){e.msg="incorrect header check",r.mode=ir;break}if((c&15)!==_L){e.msg="unknown compression method",r.mode=ir;break}if(c>>>=4,l-=4,H=(c&15)+8,r.wbits===0)r.wbits=H;else if(H>r.wbits){e.msg="invalid window size",r.mode=ir;break}r.dmax=1<<H,e.adler=r.check=1,r.mode=c&512?TL:Qa,c=0,l=0;break;case wL:for(;l<16;){if(s===0)break e;s--,c+=i[o++]<<l,l+=8}if(r.flags=c,(r.flags&255)!==_L){e.msg="unknown compression method",r.mode=ir;break}if(r.flags&57344){e.msg="unknown header flags set",r.mode=ir;break}r.head&&(r.head.text=c>>8&1),r.flags&512&&(V[0]=c&255,V[1]=c>>>8&255,r.check=ia(r.check,V,2,0)),c=0,l=0,r.mode=SL;case SL:for(;l<32;){if(s===0)break e;s--,c+=i[o++]<<l,l+=8}r.head&&(r.head.time=c),r.flags&512&&(V[0]=c&255,V[1]=c>>>8&255,V[2]=c>>>16&255,V[3]=c>>>24&255,r.check=ia(r.check,V,4,0)),c=0,l=0,r.mode=xL;case xL:for(;l<16;){if(s===0)break e;s--,c+=i[o++]<<l,l+=8}r.head&&(r.head.xflags=c&255,r.head.os=c>>8),r.flags&512&&(V[0]=c&255,V[1]=c>>>8&255,r.check=ia(r.check,V,2,0)),c=0,l=0,r.mode=EL;case EL:if(r.flags&1024){for(;l<16;){if(s===0)break e;s--,c+=i[o++]<<l,l+=8}r.length=c,r.head&&(r.head.extra_len=c),r.flags&512&&(V[0]=c&255,V[1]=c>>>8&255,r.check=ia(r.check,V,2,0)),c=0,l=0}else r.head&&(r.head.extra=null);r.mode=IL;case IL:if(r.flags&1024&&(E=r.length,E>s&&(E=s),E&&(r.head&&(H=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),Wi.arraySet(r.head.extra,i,o,E,H)),r.flags&512&&(r.check=ia(r.check,i,E,o)),s-=E,o+=E,r.length-=E),r.length))break e;r.length=0,r.mode=OL;case OL:if(r.flags&2048){if(s===0)break e;E=0;do H=i[o+E++],r.head&&H&&r.length<65536&&(r.head.name+=String.fromCharCode(H));while(H&&E<s);if(r.flags&512&&(r.check=ia(r.check,i,E,o)),s-=E,o+=E,H)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=AL;case AL:if(r.flags&4096){if(s===0)break e;E=0;do H=i[o+E++],r.head&&H&&r.length<65536&&(r.head.comment+=String.fromCharCode(H));while(H&&E<s);if(r.flags&512&&(r.check=ia(r.check,i,E,o)),s-=E,o+=E,H)break e}else r.head&&(r.head.comment=null);r.mode=PL;case PL:if(r.flags&512){for(;l<16;){if(s===0)break e;s--,c+=i[o++]<<l,l+=8}if(c!==(r.check&65535)){e.msg="header crc mismatch",r.mode=ir;break}c=0,l=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=Qa;break;case TL:for(;l<32;){if(s===0)break e;s--,c+=i[o++]<<l,l+=8}e.adler=r.check=jL(c),c=0,l=0,r.mode=S5;case S5:if(r.havedict===0)return e.next_out=a,e.avail_out=u,e.next_in=o,e.avail_in=s,r.hold=c,r.bits=l,ise;e.adler=r.check=1,r.mode=Qa;case Qa:if(t===tse||t===b5)break e;case A7:if(r.last){c>>>=l&7,l-=l&7,r.mode=T7;break}for(;l<3;){if(s===0)break e;s--,c+=i[o++]<<l,l+=8}switch(r.last=c&1,c>>>=1,l-=1,c&3){case 0:r.mode=kL;break;case 1:if(hse(r),r.mode=_5,t===b5){c>>>=2,l-=2;break e}break;case 2:r.mode=BL;break;case 3:e.msg="invalid block type",r.mode=ir}c>>>=2,l-=2;break;case kL:for(c>>>=l&7,l-=l&7;l<32;){if(s===0)break e;s--,c+=i[o++]<<l,l+=8}if((c&65535)!==(c>>>16^65535)){e.msg="invalid stored block lengths",r.mode=ir;break}if(r.length=c&65535,c=0,l=0,r.mode=P7,t===b5)break e;case P7:r.mode=RL;case RL:if(E=r.length,E){if(E>s&&(E=s),E>u&&(E=u),E===0)break e;Wi.arraySet(n,i,o,E,a),s-=E,o+=E,u-=E,a+=E,r.length-=E;break}r.mode=Qa;break;case BL:for(;l<14;){if(s===0)break e;s--,c+=i[o++]<<l,l+=8}if(r.nlen=(c&31)+257,c>>>=5,l-=5,r.ndist=(c&31)+1,c>>>=5,l-=5,r.ncode=(c&15)+4,c>>>=4,l-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=ir;break}r.have=0,r.mode=ML;case ML:for(;r.have<r.ncode;){for(;l<3;){if(s===0)break e;s--,c+=i[o++]<<l,l+=8}r.lens[I[r.have++]]=c&7,c>>>=3,l-=3}for(;r.have<19;)r.lens[I[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,B={bits:r.lenbits},z=z1(ese,r.lens,0,19,r.lencode,0,r.work,B),r.lenbits=B.bits,z){e.msg="invalid code lengths set",r.mode=ir;break}r.have=0,r.mode=CL;case CL:for(;r.have<r.nlen+r.ndist;){for(;D=r.lencode[c&(1<<r.lenbits)-1],L=D>>>24,U=D>>>16&255,K=D&65535,!(L<=l);){if(s===0)break e;s--,c+=i[o++]<<l,l+=8}if(K<16)c>>>=L,l-=L,r.lens[r.have++]=K;else{if(K===16){for(g=L+2;l<g;){if(s===0)break e;s--,c+=i[o++]<<l,l+=8}if(c>>>=L,l-=L,r.have===0){e.msg="invalid bit length repeat",r.mode=ir;break}H=r.lens[r.have-1],E=3+(c&3),c>>>=2,l-=2}else if(K===17){for(g=L+3;l<g;){if(s===0)break e;s--,c+=i[o++]<<l,l+=8}c>>>=L,l-=L,H=0,E=3+(c&7),c>>>=3,l-=3}else{for(g=L+7;l<g;){if(s===0)break e;s--,c+=i[o++]<<l,l+=8}c>>>=L,l-=L,H=0,E=11+(c&127),c>>>=7,l-=7}if(r.have+E>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=ir;break}for(;E--;)r.lens[r.have++]=H}}if(r.mode===ir)break;if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block",r.mode=ir;break}if(r.lenbits=9,B={bits:r.lenbits},z=z1(KL,r.lens,0,r.nlen,r.lencode,0,r.work,B),r.lenbits=B.bits,z){e.msg="invalid literal/lengths set",r.mode=ir;break}if(r.distbits=6,r.distcode=r.distdyn,B={bits:r.distbits},z=z1(VL,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,B),r.distbits=B.bits,z){e.msg="invalid distances set",r.mode=ir;break}if(r.mode=_5,t===b5)break e;case _5:r.mode=w5;case w5:if(s>=6&&u>=258){e.next_out=a,e.avail_out=u,e.next_in=o,e.avail_in=s,r.hold=c,r.bits=l,Qae(e,w),a=e.next_out,n=e.output,u=e.avail_out,o=e.next_in,i=e.input,s=e.avail_in,c=r.hold,l=r.bits,r.mode===Qa&&(r.back=-1);break}for(r.back=0;D=r.lencode[c&(1<<r.lenbits)-1],L=D>>>24,U=D>>>16&255,K=D&65535,!(L<=l);){if(s===0)break e;s--,c+=i[o++]<<l,l+=8}if(U&&(U&240)===0){for(C=L,N=U,F=K;D=r.lencode[F+((c&(1<<C+N)-1)>>C)],L=D>>>24,U=D>>>16&255,K=D&65535,!(C+L<=l);){if(s===0)break e;s--,c+=i[o++]<<l,l+=8}c>>>=C,l-=C,r.back+=C}if(c>>>=L,l-=L,r.back+=L,r.length=K,U===0){r.mode=UL;break}if(U&32){r.back=-1,r.mode=Qa;break}if(U&64){e.msg="invalid literal/length code",r.mode=ir;break}r.extra=U&15,r.mode=NL;case NL:if(r.extra){for(g=r.extra;l<g;){if(s===0)break e;s--,c+=i[o++]<<l,l+=8}r.length+=c&(1<<r.extra)-1,c>>>=r.extra,l-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=DL;case DL:for(;D=r.distcode[c&(1<<r.distbits)-1],L=D>>>24,U=D>>>16&255,K=D&65535,!(L<=l);){if(s===0)break e;s--,c+=i[o++]<<l,l+=8}if((U&240)===0){for(C=L,N=U,F=K;D=r.distcode[F+((c&(1<<C+N)-1)>>C)],L=D>>>24,U=D>>>16&255,K=D&65535,!(C+L<=l);){if(s===0)break e;s--,c+=i[o++]<<l,l+=8}c>>>=C,l-=C,r.back+=C}if(c>>>=L,l-=L,r.back+=L,U&64){e.msg="invalid distance code",r.mode=ir;break}r.offset=K,r.extra=U&15,r.mode=LL;case LL:if(r.extra){for(g=r.extra;l<g;){if(s===0)break e;s--,c+=i[o++]<<l,l+=8}r.offset+=c&(1<<r.extra)-1,c>>>=r.extra,l-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=ir;break}r.mode=qL;case qL:if(u===0)break e;if(E=w-u,r.offset>E){if(E=r.offset-E,E>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=ir;break}E>r.wnext?(E-=r.wnext,P=r.wsize-E):P=r.wnext-E,E>r.length&&(E=r.length),M=r.window}else M=n,P=a-r.offset,E=r.length;E>u&&(E=u),u-=E,r.length-=E;do n[a++]=M[P++];while(--E);r.length===0&&(r.mode=w5);break;case UL:if(u===0)break e;n[a++]=r.length,u--,r.mode=w5;break;case T7:if(r.wrap){for(;l<32;){if(s===0)break e;s--,c|=i[o++]<<l,l+=8}if(w-=u,e.total_out+=w,r.total+=w,w&&(e.adler=r.check=r.flags?ia(r.check,n,w,a-w):B7(r.check,n,w,a-w)),w=u,(r.flags?c:jL(c))!==r.check){e.msg="incorrect data check",r.mode=ir;break}c=0,l=0}r.mode=FL;case FL:if(r.wrap&&r.flags){for(;l<32;){if(s===0)break e;s--,c+=i[o++]<<l,l+=8}if(c!==(r.total&4294967295)){e.msg="incorrect length check",r.mode=ir;break}c=0,l=0}r.mode=HL;case HL:z=rse;break e;case ir:z=GL;break e;case C7:return M7;case ose:default:return An}return e.next_out=a,e.avail_out=u,e.next_in=o,e.avail_in=s,r.hold=c,r.bits=l,(r.wsize||w!==e.avail_out&&r.mode<ir&&(r.mode<T7||t!==bL))&&JL(e,e.output,e.next_out,w-e.avail_out)?(r.mode=C7,M7):(m-=e.avail_in,w-=e.avail_out,e.total_in+=m,e.total_out+=w,r.total+=w,r.wrap&&w&&(e.adler=r.check=r.flags?ia(r.check,n,w,e.next_out-w):B7(r.check,n,w,e.next_out-w)),e.data_type=r.bits+(r.last?64:0)+(r.mode===Qa?128:0)+(r.mode===_5||r.mode===P7?256:0),(m===0&&w===0||t===bL)&&z===Mf&&(z=nse),z)}function pse(e){if(!e||!e.state)return An;var t=e.state;return t.window&&(t.window=null),e.state=null,Mf}function gse(e,t){var r;return!e||!e.state||(r=e.state,(r.wrap&2)===0)?An:(r.head=t,t.done=!1,Mf)}function vse(e,t){var r=t.length,i,n,o;return!e||!e.state||(i=e.state,i.wrap!==0&&i.mode!==S5)?An:i.mode===S5&&(n=1,n=B7(n,t,r,0),n!==i.check)?GL:(o=JL(e,t,r,r),o?(i.mode=C7,M7):(i.havedict=1,Mf))}co.inflateReset=YL;co.inflateReset2=$L;co.inflateResetKeep=WL;co.inflateInit=lse;co.inflateInit2=XL;co.inflate=dse;co.inflateEnd=pse;co.inflateGetHeader=gse;co.inflateSetDictionary=vse;co.inflateInfo="pako inflate (from Nodeca project)"});var tq=k((sme,eq)=>{"use strict";v();eq.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var iq=k(de=>{"use strict";v();var Yi=Is(),mse=AD(),K1=fL(),Cf=QL(),rq=tq();for(N7 in rq)de[N7]=rq[N7];var N7;de.NONE=0;de.DEFLATE=1;de.INFLATE=2;de.GZIP=3;de.GUNZIP=4;de.DEFLATERAW=5;de.INFLATERAW=6;de.UNZIP=7;var yse=31,bse=139;function mi(e){if(typeof e!="number"||e<de.DEFLATE||e>de.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=e,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}mi.prototype.close=function(){if(this.write_in_progress){this.pending_close=!0;return}this.pending_close=!1,Yi(this.init_done,"close before init"),Yi(this.mode<=de.UNZIP),this.mode===de.DEFLATE||this.mode===de.GZIP||this.mode===de.DEFLATERAW?K1.deflateEnd(this.strm):(this.mode===de.INFLATE||this.mode===de.GUNZIP||this.mode===de.INFLATERAW||this.mode===de.UNZIP)&&Cf.inflateEnd(this.strm),this.mode=de.NONE,this.dictionary=null};mi.prototype.write=function(e,t,r,i,n,o,a){return this._write(!0,e,t,r,i,n,o,a)};mi.prototype.writeSync=function(e,t,r,i,n,o,a){return this._write(!1,e,t,r,i,n,o,a)};mi.prototype._write=function(e,t,r,i,n,o,a,s){if(Yi.equal(arguments.length,8),Yi(this.init_done,"write before init"),Yi(this.mode!==de.NONE,"already finalized"),Yi.equal(!1,this.write_in_progress,"write already in progress"),Yi.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,Yi.equal(!1,t===void 0,"must provide flush value"),this.write_in_progress=!0,t!==de.Z_NO_FLUSH&&t!==de.Z_PARTIAL_FLUSH&&t!==de.Z_SYNC_FLUSH&&t!==de.Z_FULL_FLUSH&&t!==de.Z_FINISH&&t!==de.Z_BLOCK)throw new Error("Invalid flush value");if(r==null&&(r=h.Buffer.alloc(0),n=0,i=0),this.strm.avail_in=n,this.strm.input=r,this.strm.next_in=i,this.strm.avail_out=s,this.strm.output=o,this.strm.next_out=a,this.flush=t,!e)return this._process(),this._checkError()?this._afterSync():void 0;var u=this;return A.default.nextTick(function(){u._process(),u._after()}),this};mi.prototype._afterSync=function(){var e=this.strm.avail_out,t=this.strm.avail_in;return this.write_in_progress=!1,[t,e]};mi.prototype._process=function(){var e=null;switch(this.mode){case de.DEFLATE:case de.GZIP:case de.DEFLATERAW:this.err=K1.deflate(this.strm,this.flush);break;case de.UNZIP:switch(this.strm.avail_in>0&&(e=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(e===null)break;if(this.strm.input[e]===yse){if(this.gzip_id_bytes_read=1,e++,this.strm.avail_in===1)break}else{this.mode=de.INFLATE;break}case 1:if(e===null)break;this.strm.input[e]===bse?(this.gzip_id_bytes_read=2,this.mode=de.GUNZIP):this.mode=de.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case de.INFLATE:case de.GUNZIP:case de.INFLATERAW:for(this.err=Cf.inflate(this.strm,this.flush),this.err===de.Z_NEED_DICT&&this.dictionary&&(this.err=Cf.inflateSetDictionary(this.strm,this.dictionary),this.err===de.Z_OK?this.err=Cf.inflate(this.strm,this.flush):this.err===de.Z_DATA_ERROR&&(this.err=de.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===de.GUNZIP&&this.err===de.Z_STREAM_END&&this.strm.next_in[0]!==0;)this.reset(),this.err=Cf.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}};mi.prototype._checkError=function(){switch(this.err){case de.Z_OK:case de.Z_BUF_ERROR:if(this.strm.avail_out!==0&&this.flush===de.Z_FINISH)return this._error("unexpected end of file"),!1;break;case de.Z_STREAM_END:break;case de.Z_NEED_DICT:return this.dictionary==null?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0};mi.prototype._after=function(){if(this._checkError()){var e=this.strm.avail_out,t=this.strm.avail_in;this.write_in_progress=!1,this.callback(t,e),this.pending_close&&this.close()}};mi.prototype._error=function(e){this.strm.msg&&(e=this.strm.msg),this.onerror(e,this.err),this.write_in_progress=!1,this.pending_close&&this.close()};mi.prototype.init=function(e,t,r,i,n){Yi(arguments.length===4||arguments.length===5,"init(windowBits, level, memLevel, strategy, [dictionary])"),Yi(e>=8&&e<=15,"invalid windowBits"),Yi(t>=-1&&t<=9,"invalid compression level"),Yi(r>=1&&r<=9,"invalid memlevel"),Yi(i===de.Z_FILTERED||i===de.Z_HUFFMAN_ONLY||i===de.Z_RLE||i===de.Z_FIXED||i===de.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(t,e,r,i,n),this._setDictionary()};mi.prototype.params=function(){throw new Error("deflateParams Not supported")};mi.prototype.reset=function(){this._reset(),this._setDictionary()};mi.prototype._init=function(e,t,r,i,n){switch(this.level=e,this.windowBits=t,this.memLevel=r,this.strategy=i,this.flush=de.Z_NO_FLUSH,this.err=de.Z_OK,(this.mode===de.GZIP||this.mode===de.GUNZIP)&&(this.windowBits+=16),this.mode===de.UNZIP&&(this.windowBits+=32),(this.mode===de.DEFLATERAW||this.mode===de.INFLATERAW)&&(this.windowBits=-1*this.windowBits),this.strm=new mse,this.mode){case de.DEFLATE:case de.GZIP:case de.DEFLATERAW:this.err=K1.deflateInit2(this.strm,this.level,de.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case de.INFLATE:case de.GUNZIP:case de.INFLATERAW:case de.UNZIP:this.err=Cf.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==de.Z_OK&&this._error("Init error"),this.dictionary=n,this.write_in_progress=!1,this.init_done=!0};mi.prototype._setDictionary=function(){if(this.dictionary!=null){switch(this.err=de.Z_OK,this.mode){case de.DEFLATE:case de.DEFLATERAW:this.err=K1.deflateSetDictionary(this.strm,this.dictionary);break;default:break}this.err!==de.Z_OK&&this._error("Failed to set dictionary")}};mi.prototype._reset=function(){switch(this.err=de.Z_OK,this.mode){case de.DEFLATE:case de.DEFLATERAW:case de.GZIP:this.err=K1.deflateReset(this.strm);break;case de.INFLATE:case de.INFLATERAW:case de.GUNZIP:this.err=Cf.inflateReset(this.strm);break;default:break}this.err!==de.Z_OK&&this._error("Failed to reset stream")};de.Zlib=mi});var q7=k(we=>{"use strict";v();var na=Kt().Buffer,sq=Qd().Transform,Le=iq(),$s=rn(),V1=Is().ok,L7=Kt().kMaxLength,uq="Cannot create final Buffer. It would be larger than 0x"+L7.toString(16)+" bytes";Le.Z_MIN_WINDOWBITS=8;Le.Z_MAX_WINDOWBITS=15;Le.Z_DEFAULT_WINDOWBITS=15;Le.Z_MIN_CHUNK=64;Le.Z_MAX_CHUNK=1/0;Le.Z_DEFAULT_CHUNK=16*1024;Le.Z_MIN_MEMLEVEL=1;Le.Z_MAX_MEMLEVEL=9;Le.Z_DEFAULT_MEMLEVEL=8;Le.Z_MIN_LEVEL=-1;Le.Z_MAX_LEVEL=9;Le.Z_DEFAULT_LEVEL=Le.Z_DEFAULT_COMPRESSION;var nq=Object.keys(Le);for(x5=0;x5<nq.length;x5++)E5=nq[x5],E5.match(/^Z/)&&Object.defineProperty(we,E5,{enumerable:!0,value:Le[E5],writable:!1});var E5,x5,O5={Z_OK:Le.Z_OK,Z_STREAM_END:Le.Z_STREAM_END,Z_NEED_DICT:Le.Z_NEED_DICT,Z_ERRNO:Le.Z_ERRNO,Z_STREAM_ERROR:Le.Z_STREAM_ERROR,Z_DATA_ERROR:Le.Z_DATA_ERROR,Z_MEM_ERROR:Le.Z_MEM_ERROR,Z_BUF_ERROR:Le.Z_BUF_ERROR,Z_VERSION_ERROR:Le.Z_VERSION_ERROR},oq=Object.keys(O5);for(I5=0;I5<oq.length;I5++)D7=oq[I5],O5[O5[D7]]=D7;var D7,I5;Object.defineProperty(we,"codes",{enumerable:!0,value:Object.freeze(O5),writable:!1});we.Deflate=Nf;we.Inflate=Df;we.Gzip=Lf;we.Gunzip=qf;we.DeflateRaw=Uf;we.InflateRaw=Ff;we.Unzip=Hf;we.createDeflate=function(e){return new Nf(e)};we.createInflate=function(e){return new Df(e)};we.createDeflateRaw=function(e){return new Uf(e)};we.createInflateRaw=function(e){return new Ff(e)};we.createGzip=function(e){return new Lf(e)};we.createGunzip=function(e){return new qf(e)};we.createUnzip=function(e){return new Hf(e)};we.deflate=function(e,t,r){return typeof t=="function"&&(r=t,t={}),jf(new Nf(t),e,r)};we.deflateSync=function(e,t){return zf(new Nf(t),e)};we.gzip=function(e,t,r){return typeof t=="function"&&(r=t,t={}),jf(new Lf(t),e,r)};we.gzipSync=function(e,t){return zf(new Lf(t),e)};we.deflateRaw=function(e,t,r){return typeof t=="function"&&(r=t,t={}),jf(new Uf(t),e,r)};we.deflateRawSync=function(e,t){return zf(new Uf(t),e)};we.unzip=function(e,t,r){return typeof t=="function"&&(r=t,t={}),jf(new Hf(t),e,r)};we.unzipSync=function(e,t){return zf(new Hf(t),e)};we.inflate=function(e,t,r){return typeof t=="function"&&(r=t,t={}),jf(new Df(t),e,r)};we.inflateSync=function(e,t){return zf(new Df(t),e)};we.gunzip=function(e,t,r){return typeof t=="function"&&(r=t,t={}),jf(new qf(t),e,r)};we.gunzipSync=function(e,t){return zf(new qf(t),e)};we.inflateRaw=function(e,t,r){return typeof t=="function"&&(r=t,t={}),jf(new Ff(t),e,r)};we.inflateRawSync=function(e,t){return zf(new Ff(t),e)};function jf(e,t,r){var i=[],n=0;e.on("error",a),e.on("end",s),e.end(t),o();function o(){for(var u;(u=e.read())!==null;)i.push(u),n+=u.length;e.once("readable",o)}function a(u){e.removeListener("end",s),e.removeListener("readable",o),r(u)}function s(){var u,c=null;n>=L7?c=new RangeError(uq):u=na.concat(i,n),i=[],e.close(),r(c,u)}}function zf(e,t){if(typeof t=="string"&&(t=na.from(t)),!na.isBuffer(t))throw new TypeError("Not a string or buffer");var r=e._finishFlushFlag;return e._processChunk(t,r)}function Nf(e){if(!(this instanceof Nf))return new Nf(e);dr.call(this,e,Le.DEFLATE)}function Df(e){if(!(this instanceof Df))return new Df(e);dr.call(this,e,Le.INFLATE)}function Lf(e){if(!(this instanceof Lf))return new Lf(e);dr.call(this,e,Le.GZIP)}function qf(e){if(!(this instanceof qf))return new qf(e);dr.call(this,e,Le.GUNZIP)}function Uf(e){if(!(this instanceof Uf))return new Uf(e);dr.call(this,e,Le.DEFLATERAW)}function Ff(e){if(!(this instanceof Ff))return new Ff(e);dr.call(this,e,Le.INFLATERAW)}function Hf(e){if(!(this instanceof Hf))return new Hf(e);dr.call(this,e,Le.UNZIP)}function aq(e){return e===Le.Z_NO_FLUSH||e===Le.Z_PARTIAL_FLUSH||e===Le.Z_SYNC_FLUSH||e===Le.Z_FULL_FLUSH||e===Le.Z_FINISH||e===Le.Z_BLOCK}function dr(e,t){var r=this;if(this._opts=e=e||{},this._chunkSize=e.chunkSize||we.Z_DEFAULT_CHUNK,sq.call(this,e),e.flush&&!aq(e.flush))throw new Error("Invalid flush flag: "+e.flush);if(e.finishFlush&&!aq(e.finishFlush))throw new Error("Invalid flush flag: "+e.finishFlush);if(this._flushFlag=e.flush||Le.Z_NO_FLUSH,this._finishFlushFlag=typeof e.finishFlush<"u"?e.finishFlush:Le.Z_FINISH,e.chunkSize&&(e.chunkSize<we.Z_MIN_CHUNK||e.chunkSize>we.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBits<we.Z_MIN_WINDOWBITS||e.windowBits>we.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.level<we.Z_MIN_LEVEL||e.level>we.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevel<we.Z_MIN_MEMLEVEL||e.memLevel>we.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=we.Z_FILTERED&&e.strategy!=we.Z_HUFFMAN_ONLY&&e.strategy!=we.Z_RLE&&e.strategy!=we.Z_FIXED&&e.strategy!=we.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!na.isBuffer(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new Le.Zlib(t);var i=this;this._hadError=!1,this._handle.onerror=function(a,s){A5(i),i._hadError=!0;var u=new Error(a);u.errno=s,u.code=we.codes[s],i.emit("error",u)};var n=we.Z_DEFAULT_COMPRESSION;typeof e.level=="number"&&(n=e.level);var o=we.Z_DEFAULT_STRATEGY;typeof e.strategy=="number"&&(o=e.strategy),this._handle.init(e.windowBits||we.Z_DEFAULT_WINDOWBITS,n,e.memLevel||we.Z_DEFAULT_MEMLEVEL,o,e.dictionary),this._buffer=na.allocUnsafe(this._chunkSize),this._offset=0,this._level=n,this._strategy=o,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!r._handle},configurable:!0,enumerable:!0})}$s.inherits(dr,sq);dr.prototype.params=function(e,t,r){if(e<we.Z_MIN_LEVEL||e>we.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+e);if(t!=we.Z_FILTERED&&t!=we.Z_HUFFMAN_ONLY&&t!=we.Z_RLE&&t!=we.Z_FIXED&&t!=we.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+t);if(this._level!==e||this._strategy!==t){var i=this;this.flush(Le.Z_SYNC_FLUSH,function(){V1(i._handle,"zlib binding closed"),i._handle.params(e,t),i._hadError||(i._level=e,i._strategy=t,r&&r())})}else A.default.nextTick(r)};dr.prototype.reset=function(){return V1(this._handle,"zlib binding closed"),this._handle.reset()};dr.prototype._flush=function(e){this._transform(na.alloc(0),"",e)};dr.prototype.flush=function(e,t){var r=this,i=this._writableState;(typeof e=="function"||e===void 0&&!t)&&(t=e,e=Le.Z_FULL_FLUSH),i.ended?t&&A.default.nextTick(t):i.ending?t&&this.once("end",t):i.needDrain?t&&this.once("drain",function(){return r.flush(e,t)}):(this._flushFlag=e,this.write(na.alloc(0),"",t))};dr.prototype.close=function(e){A5(this,e),A.default.nextTick(_se,this)};function A5(e,t){t&&A.default.nextTick(t),e._handle&&(e._handle.close(),e._handle=null)}function _se(e){e.emit("close")}dr.prototype._transform=function(e,t,r){var i,n=this._writableState,o=n.ending||n.ended,a=o&&(!e||n.length===e.length);if(e!==null&&!na.isBuffer(e))return r(new Error("invalid input"));if(!this._handle)return r(new Error("zlib binding closed"));a?i=this._finishFlushFlag:(i=this._flushFlag,e.length>=n.length&&(this._flushFlag=this._opts.flush||Le.Z_NO_FLUSH)),this._processChunk(e,i,r)};dr.prototype._processChunk=function(e,t,r){var i=e&&e.length,n=this._chunkSize-this._offset,o=0,a=this,s=typeof r=="function";if(!s){var u=[],c=0,l;this.on("error",function(M){l=M}),V1(this._handle,"zlib binding closed");do var m=this._handle.writeSync(t,e,o,i,this._buffer,this._offset,n);while(!this._hadError&&P(m[0],m[1]));if(this._hadError)throw l;if(c>=L7)throw A5(this),new RangeError(uq);var w=na.concat(u,c);return A5(this),w}V1(this._handle,"zlib binding closed");var E=this._handle.write(t,e,o,i,this._buffer,this._offset,n);E.buffer=e,E.callback=P;function P(M,D){if(this&&(this.buffer=null,this.callback=null),!a._hadError){var L=n-D;if(V1(L>=0,"have should not go down"),L>0){var U=a._buffer.slice(a._offset,a._offset+L);a._offset+=L,s?a.push(U):(u.push(U),c+=U.length)}if((D===0||a._offset>=a._chunkSize)&&(n=a._chunkSize,a._offset=0,a._buffer=na.allocUnsafe(a._chunkSize)),D===0){if(o+=i-M,i=M,!s)return!0;var K=a._handle.write(t,e,o,i,a._buffer,a._offset,a._chunkSize);K.callback=P,K.buffer=e;return}if(!s)return!1;r()}}};$s.inherits(Nf,dr);$s.inherits(Df,dr);$s.inherits(Lf,dr);$s.inherits(qf,dr);$s.inherits(Uf,dr);$s.inherits(Ff,dr);$s.inherits(Hf,dr)});var dq=k((pme,hq)=>{"use strict";v();var U7=f7(),dme=_r(),fq=q7(),wse=8*1024*1024;function cq(e,t){var r=t&&t.maxDecompressedBytes||wse;return fq.gunzipSync(h.Buffer.from(e,"base64"),{maxOutputLength:r})}async function lq(e,t){if(!t.expectedIssuerDid)throw new Error("expectedIssuerDid is required to verify a status list (issuer pinning); refusing to read revocation state from an unpinned/unverified JWT");var r=t.didResolver;if(!r){var i=t.issuerJwks||(t.issuerPublicJwk?{keys:[t.issuerPublicJwk]}:null);if(!i)throw new Error("Provide params.didResolver, params.issuerJwks, or params.issuerPublicJwk to verify the status list signature");r=async function(){return{jwks:i}}}var n=await U7.verifyVcJwt(e,{didResolver:r,expectedIssuerDid:t.expectedIssuerDid,allowedAlgs:t.allowedAlgs,allowLegacyDER:t.allowLegacyDER,clockToleranceSec:t.clockToleranceSec});if(!n.valid)throw new Error("Status list signature verification failed: "+(n.error||"invalid signature"));return n.payload}async function Sse(e){if(!e.issuerDid||!e.privateJwk)throw new Error("issuerDid and privateJwk are required");var t=e.listId||e.issuerDid+"/status/"+Date.now(),r=e.listSize||1e5,i=Math.ceil(r/8),n=h.Buffer.alloc(i,0),o=q7(),a=o.gzipSync(n),s=a.toString("base64"),u={"@context":["https://www.w3.org/2018/credentials/v1","https://w3id.org/vc/status-list/2021/v1"],type:["VerifiableCredential","StatusList2021Credential"],issuer:e.issuerDid,issuanceDate:new Date().toISOString(),credentialSubject:{id:t,type:"StatusList2021",statusPurpose:"revocation",encodedList:s}},c=await U7.issueVcJwt({issuerDid:e.issuerDid,subjectId:t,types:["VerifiableCredential","StatusList2021Credential"],credentialSubject:u.credentialSubject,privateJwk:e.privateJwk,alg:e.privateJwk.alg||"ES256"});return{listVcJwt:c.jwt,listId:t}}async function xse(e){if(!e.listVcJwt||e.index===void 0||!e.status||!e.privateJwk)throw new Error("listVcJwt, index, status, and privateJwk are required");if(e.status==="suspended")throw new Error("status 'suspended' is not supported by this list: its statusPurpose is 'revocation', and suspension would be written to the same bit and read back as 'revoked'. Maintain a separate list for suspension until statusPurpose is configurable.");var t=await lq(e.listVcJwt,e),r=t.vc.credentialSubject.encodedList,i=cq(r,e),n=Math.floor(e.index/8),o=e.index%8;if(n>=i.length)throw new Error("Index out of range");var a=e.status==="revoked"?1:0;a===1?i[n]|=1<<o:i[n]&=~(1<<o);var s=fq.gzipSync(i),u=s.toString("base64"),c={id:t.vc.credentialSubject.id,type:"StatusList2021",statusPurpose:"revocation",encodedList:u},l=await U7.issueVcJwt({issuerDid:t.iss,subjectId:t.vc.credentialSubject.id,types:["VerifiableCredential","StatusList2021Credential"],credentialSubject:c,privateJwk:e.privateJwk,alg:e.privateJwk.alg||"ES256"});return{listVcJwt:l.jwt}}async function Ese(e){if(!e.listVcJwt||e.index===void 0)throw new Error("listVcJwt and index are required");var t=await lq(e.listVcJwt,e),r=t.vc.credentialSubject.encodedList,i=cq(r,e),n=Math.floor(e.index/8),o=e.index%8;if(n>=i.length)throw new Error("Index out of range");var a=i[n]>>o&1;return a===1?"revoked":"valid"}hq.exports={createStatusList:Sse,updateStatusList:xse,getCredentialStatusEntry:Ese}});var vq=k((vme,gq)=>{"use strict";v();var Ise=_r();function pq(e){var t;if(typeof e=="string")t=h.Buffer.from(e,"utf8");else if(h.Buffer.isBuffer(e))t=e;else if(e instanceof Uint8Array)t=h.Buffer.from(e);else throw new Error("Data must be string, Buffer, or Uint8Array");return Ise.createHash("sha256").update(t).digest("hex")}function Ose(e){if(!e.kind||!e.hash||!e.issuerDid)throw new Error("kind, hash, and issuerDid are required");var t=["VC_ANCHOR_SHA256","STATUSLIST_SHA256","PRESENTATION_SHA256"];if(t.indexOf(e.kind)===-1)throw new Error("Invalid kind. Must be one of: "+t.join(", "));if(!/^[a-fA-F0-9]{64}$/.test(e.hash))throw new Error("Invalid hash format. Must be 64 hex characters");var r={protocol:"SmartLedger",version:"1.0",type:e.kind,hash:e.hash,issuer:e.issuerDid,timestamp:e.issuedAt||new Date().toISOString()};return{json:JSON.stringify(r)}}function Ase(e,t){var r=pq(e);return r===t}function Pse(e){try{var t=JSON.parse(e);if(t.protocol!=="SmartLedger")return{valid:!1,error:"Invalid protocol"};var r=["VC_ANCHOR_SHA256","STATUSLIST_SHA256","PRESENTATION_SHA256"];return r.indexOf(t.type)===-1?{valid:!1,error:"Invalid anchor type"}:/^[a-fA-F0-9]{64}$/.test(t.hash)?{valid:!0,protocol:t.protocol,version:t.version,type:t.type,hash:t.hash,issuer:t.issuer,timestamp:t.timestamp}:{valid:!1,error:"Invalid hash format"}}catch(i){return{valid:!1,error:"Failed to parse anchor payload: "+i.message}}}gq.exports={sha256Hex:pq,buildAnchorPayload:Ose,verifyAnchorHash:Ase,parseAnchorPayload:Pse}});var ke=k((yme,mq)=>{"use strict";v();var j=mq.exports;j.deps=j.deps||{};j.deps._=Et();j.deps.Buffer=typeof h.Buffer<"u"?h.Buffer:null;if(typeof window>"u")j.deps.bnjs=Cn(),j.deps.bs58=Z2();else{try{j.deps.bnjs=Cn()}catch{}try{j.deps.bs58=Z2()}catch{}}j.version="v"+Lm();j.versionGuard=function(e){if(e!==void 0){var t=`
|
|
100
100
|
More than one instance of bsv found.
|