1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,858631,598095,378253,e=>{"use strict";let t,r;var i,n=e.i(191468);function o(e,t,r){return e&t^~e&r}function f(e,t,r){return e&t^e&r^t&r}class a extends n.Hash{constructor(e,t,r,i){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=i,this.buffer=new Uint8Array(e),this.view=(0,n.createView)(this.buffer)}update(e){(0,n.aexists)(this),e=(0,n.toBytes)(e),(0,n.abytes)(e);let{view:t,buffer:r,blockLen:i}=this,o=e.length;for(let f=0;f<o;){let a=Math.min(i-this.pos,o-f);if(a===i){let t=(0,n.createView)(e);for(;i<=o-f;f+=i)this.process(t,f);continue}r.set(e.subarray(f,f+a),this.pos),this.pos+=a,f+=a,this.pos===i&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,n.aexists)(this),(0,n.aoutput)(e,this),this.finished=!0;let{buffer:t,view:r,blockLen:i,isLE:o}=this,{pos:f}=this;t[f++]=128,(0,n.clean)(this.buffer.subarray(f)),this.padOffset>i-f&&(this.process(r,0),f=0);for(let e=f;e<i;e++)t[e]=0;!function(e,t,r,i){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,i);let n=BigInt(32),o=BigInt(0xffffffff),f=Number(r>>n&o),a=Number(r&o),s=4*!!i,l=4*!i;e.setUint32(t+s,f,i),e.setUint32(t+l,a,i)}(r,i-8,BigInt(8*this.length),o),this.process(r,0);let a=(0,n.createView)(e),s=this.outputLen;if(s%4)throw Error("_sha2: outputLen should be aligned to 32bit");let l=s/4,d=this.get();if(l>d.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e<l;e++)a.setUint32(4*e,d[e],o)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:t,buffer:r,length:i,finished:n,destroyed:o,pos:f}=this;return e.destroyed=o,e.finished=n,e.length=i,e.pos=f,i%t&&e.buffer.set(r),e}clone(){return this._cloneInto()}}let s=Uint32Array.from([0x6a09e667,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19]),l=Uint32Array.from([0xc1059ed8,0x367cd507,0x3070dd17,0xf70e5939,0xffc00b31,0x68581511,0x64f98fa7,0xbefa4fa4]),d=Uint32Array.from([0xcbbb9d5d,0xc1059ed8,0x629a292a,0x367cd507,0x9159015a,0x3070dd17,0x152fecd8,0xf70e5939,0x67332667,0xffc00b31,0x8eb44a87,0x68581511,0xdb0c2e0d,0x64f98fa7,0x47b5481d,0xbefa4fa4]),c=Uint32Array.from([0x6a09e667,0xf3bcc908,0xbb67ae85,0x84caa73b,0x3c6ef372,0xfe94f82b,0xa54ff53a,0x5f1d36f1,0x510e527f,0xade682d1,0x9b05688c,0x2b3e6c1f,0x1f83d9ab,0xfb41bd6b,0x5be0cd19,0x137e2179]);e.s(["Chi",0,o,"HashMD",0,a,"Maj",0,f,"SHA224_IV",0,l,"SHA256_IV",0,s,"SHA384_IV",0,d,"SHA512_IV",0,c],598095);var u=e.i(955711);let h=Uint32Array.from([0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2]),b=new Uint32Array(64);class x extends a{constructor(e=32){super(64,e,8,!1),this.A=0|s[0],this.B=0|s[1],this.C=0|s[2],this.D=0|s[3],this.E=0|s[4],this.F=0|s[5],this.G=0|s[6],this.H=0|s[7]}get(){let{A:e,B:t,C:r,D:i,E:n,F:o,G:f,H:a}=this;return[e,t,r,i,n,o,f,a]}set(e,t,r,i,n,o,f,a){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|i,this.E=0|n,this.F=0|o,this.G=0|f,this.H=0|a}process(e,t){for(let r=0;r<16;r++,t+=4)b[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=b[e-15],r=b[e-2],i=(0,n.rotr)(t,7)^(0,n.rotr)(t,18)^t>>>3,o=(0,n.rotr)(r,17)^(0,n.rotr)(r,19)^r>>>10;b[e]=o+b[e-7]+i+b[e-16]|0}let{A:r,B:i,C:a,D:s,E:l,F:d,G:c,H:u}=this;for(let e=0;e<64;e++){let t=u+((0,n.rotr)(l,6)^(0,n.rotr)(l,11)^(0,n.rotr)(l,25))+o(l,d,c)+h[e]+b[e]|0,x=((0,n.rotr)(r,2)^(0,n.rotr)(r,13)^(0,n.rotr)(r,22))+f(r,i,a)|0;u=c,c=d,d=l,l=s+t|0,s=a,a=i,i=r,r=t+x|0}r=r+this.A|0,i=i+this.B|0,a=a+this.C|0,s=s+this.D|0,l=l+this.E|0,d=d+this.F|0,c=c+this.G|0,u=u+this.H|0,this.set(r,i,a,s,l,d,c,u)}roundClean(){(0,n.clean)(b)}destroy(){this.set(0,0,0,0,0,0,0,0),(0,n.clean)(this.buffer)}}class g extends x{constructor(){super(28),this.A=0|l[0],this.B=0|l[1],this.C=0|l[2],this.D=0|l[3],this.E=0|l[4],this.F=0|l[5],this.G=0|l[6],this.H=0|l[7]}}let p=u.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b89
16f","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))),m=p[0],y=p[1],w=new Uint32Array(80),E=new Uint32Array(80),v=(0,n.createHasher)(()=>new x),B=(0,n.createHasher)(()=>new g);e.s(["SHA224",0,g,"SHA256",0,x,"sha224",0,B,"sha256",0,v],378253);var A=n;class S extends A.Hash{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,A.ahash)(e);const r=(0,A.toBytes)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,n=new Uint8Array(i);n.set(r.length>i?e.create().update(r).digest():r);for(let e=0;e<n.length;e++)n[e]^=54;this.iHash.update(n),this.oHash=e.create();for(let e=0;e<n.length;e++)n[e]^=106;this.oHash.update(n),(0,A.clean)(n)}update(e){return(0,A.aexists)(this),this.iHash.update(e),this}digestInto(e){(0,A.aexists)(this),(0,A.abytes)(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));let{oHash:t,iHash:r,finished:i,destroyed:n,blockLen:o,outputLen:f}=this;return e.finished=i,e.destroyed=n,e.blockLen=o,e.outputLen=f,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}let I=(e,t,r)=>new S(e,t).update(r).digest();I.create=(e,t)=>new S(e,t);let O=BigInt(0),R=BigInt(1);function q(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function H(e){if(!q(e))throw Error("Uint8Array expected")}function N(e,t){if("boolean"!=typeof t)throw Error(e+" boolean expected, got "+t)}function U(e){let t=e.toString(16);return 1&t.length?"0"+t:t}function P(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);return""===e?O:BigInt("0x"+e)}let Z="function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex,C=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function z(e){if(H(e),Z)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=C[e[r]];return t}function F(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}function L(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);if(Z)return Uint8Array.fromHex(e);let t=e.length,r=t/2;if(t%2)throw Error("hex string expected, got unpadded hex of length "+t);let i=new Uint8Array(r);for(let t=0,n=0;t<r;t++,n+=2){let r=F(e.charCodeAt(n)),o=F(e.charCodeAt(n+1));if(void 0===r||void 0===o)throw Error('hex string expected, got non-hex character "'+(e[n]+e[n+1])+'" at index '+n);i[t]=16*r+o}return i}function V(e){return P(z(e))}function T(e){return H(e),P(z(Uint8Array.from(e).reverse()))}function D(e,t){return L(e.toString(16).padStart(2*t,"0"))}function _(e,t){return D(e,t).reverse()}function j(e,t,r){let i;if("string"==typeof t)try{i=L(t)}catch(t){throw Error(e+" must be hex string or Uint8Array, cause: "+t)}else if(q(t))i=Uint8Array.from(t);else throw Error(e+" must be hex string or Uint8Array");let n=i.length;if("number"==typeof r&&n!==r)throw Error(e+" of length "+r+" expected, got "+n);return i}function k(...e){let t=0;for(let r=0;r<e.length;r++){let i=e[r];H(i),t+=i.length}let r=new Uint8Array(t);for(let t=0,i=0;t<e.length;t++){let n=e[t];r.set(n,i),i+=n.length}return r}let K=e=>"bigint"==typeof e&&O<=e;function M(e,t,r){return K(e)&&K(t)&&K(r)&&t<=e&&e<r}
vendor: 10,693 bytes, line 1
1function Y(e,t,r,i){if(!M(t,r,i))throw Error("expected valid "+e+": "+r+" <= n < "+i+", got "+t)}let W=e=>(R<<BigInt(e))-R,G=e=>new Uint8Array(e),J={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||q(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};function Q(e,t,r={}){let i=(t,r,i)=>{let n=J[r];if("function"!=typeof n)throw Error("invalid validator function");let o=e[t];if((!i||void 0!==o)&&!n(o,e))throw Error("param "+String(t)+" is invalid. Expected "+r+", got "+o)};for(let[e,r]of Object.entries(t))i(e,r,!1);for(let[e,t]of Object.entries(r))i(e,t,!0);return e}function X(e){let t=new WeakMap;return(r,...i)=>{let n=t.get(r);if(void 0!==n)return n;let o=e(r,...i);return t.set(r,o),o}}let $=BigInt(0),ee=BigInt(1),et=BigInt(2),er=BigInt(3),ei=BigInt(4),en=BigInt(5),eo=BigInt(8);function ef(e,t){let r=e%t;return r>=$?r:t+r}function ea(e,t,r){let i=e;for(;t-- >$;)i*=i,i%=r;return i}function es(e,t){if(e===$)throw Error("invert: expected non-zero number");if(t<=$)throw Error("invert: expected positive modulus, got "+t);let r=ef(e,t),i=t,n=$,o=ee,f=ee,a=$;for(;r!==$;){let e=i/r,t=i%r,s=n-f*e,l=o-a*e;i=r,r=t,n=f,o=a,f=s,a=l}if(i!==ee)throw Error("invert: does not exist");return ef(n,t)}function el(e,t){let r=(e.ORDER+ee)/ei,i=e.pow(t,r);if(!e.eql(e.sqr(i),t))throw Error("Cannot find square root");return i}function ed(e,t){let r=(e.ORDER-en)/eo,i=e.mul(t,et),n=e.pow(i,r),o=e.mul(t,n),f=e.mul(e.mul(o,et),n),a=e.mul(o,e.sub(f,e.ONE));if(!e.eql(e.sqr(a),t))throw Error("Cannot find square root");return a}let ec=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function eu(e){return Q(e,ec.reduce((e,t)=>(e[t]="function",e),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"}))}function eh(e,t,r=!1){let i=Array(t.length).fill(r?e.ZERO:void 0),n=t.reduce((t,r,n)=>e.is0(r)?t:(i[n]=t,e.mul(t,r)),e.ONE),o=e.inv(n);return t.reduceRight((t,r,n)=>e.is0(r)?t:(i[n]=e.mul(t,i[n]),e.mul(t,r)),o),i}function eb(e,t){let r=(e.ORDER-ee)/et,i=e.pow(t,r),n=e.eql(i,e.ONE),o=e.eql(i,e.ZERO),f=e.eql(i,e.neg(e.ONE));if(!n&&!o&&!f)throw Error("invalid Legendre symbol result");return n?1:o?0:-1}function ex(e,t){void 0!==t&&(0,n.anumber)(t);let r=void 0!==t?t:e.toString(2).length,i=Math.ceil(r/8);return{nBitLength:r,nByteLength:i}}function eg(e,t,r=!1,i={}){let n;if(e<=$)throw Error("invalid field: expected ORDER > 0, got "+e);let{nBitLength:o,nByteLength:f}=ex(e,t);if(f>2048)throw Error("invalid field: expected ORDER of <= 2048 bytes");let a=Object.freeze({ORDER:e,isLE:r,BITS:o,BYTES:f,MASK:W(o),ZERO:$,ONE:ee,create:t=>ef(t,e),isValid:t=>{if("bigint"!=typeof t)throw Error("invalid field element: expected bigint, got "+typeof t);return $<=t&&t<e},is0:e=>e===$,isOdd:e=>(e&ee)===ee,neg:t=>ef(-t,e),eql:(e,t)=>e===t,sqr:t=>ef(t*t,e),add:(t,r)=>ef(t+r,e),sub:(t,r)=>ef(t-r,e),mul:(t,r)=>ef(t*r,e),pow:(e,t)=>(function(e,t,r){if(r<$)throw Error("invalid exponent, negatives unsupported");if(r===$)return e.ONE;if(r===ee)return t;let i=e.ONE,n=t;for(;r>$;)r&ee&&(i=e.mul(i,n)),n=e.sqr(n),r>>=ee;return i})(a,e,t),div:(t,r)=>ef(t*es(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>es(t,e),sqrt:i.sqrt||(t=>(n||(n=e%ei===er?el:e%eo===en?ed:function(e){if(e<BigInt(3))throw Error("sqrt is not defined for small field");let t=e-ee,r=0;for(;t%et===$;)t/=et,r++;let i=et,n=eg(e);for(;1===eb(n,i);)if(i++>1e3)throw Error("Cannot find square root: probably non-prime P");if(1===r)return el;let o=n.pow(i,t),f=(t+ee)/et;return function(e,i){if(e.is0(i))return i;if(1!==eb(e,i))throw Error("Cannot find square root");let n=r,a=e.mul(e.ONE,o),s=e.pow(i,t),l=e.pow(i,f);for(;!e.eql(s,e.ONE);){if(e.is0(s))return e.ZERO;let t=1,r=e.sqr(s);for(;!e.eql(r,e.ONE);)if(t++,r=e.sqr(r),t===n)throw Error("Cannot find square root");let i=ee<<BigInt(n-t-1),o=e.pow(a,i);n=t,a=e.sqr(o),s=e.mul(s,a),l=e.mul(l,o)}return l}}(e)),n(a,t))),toBytes:e=>r?_(e,f):D(e,f),fromBytes:e=>{if(e.length!==f)throw Error("Field.fromBytes: expected "+f+" bytes, got "+e.length);return r?T(e):V(e)},invertBatch:e=>eh(a,e),cmov:(e,t,r)=>r?t:e});return Object.freeze(a)}function ep(e){if("bigint"!=typeof e)throw Error("field order must be bigint");return Math.ceil(e.toString(2).length/8)}function em(e){let t=ep(e);return t+Math.ceil(t/2)}let ey=BigInt(0),ew=BigInt(1);function eE(e,t){let r=t.negate();return e?r:t}function ev(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw Error("invalid window size, expected [1.."+t+"], got W="+e)}function eB(e,t){ev(e,t);let r=Math.ceil(t/e)+1,i=2**(e-1),n=2**e;return{windows:r,windowSize:i,mask:W(e),maxNumber:n,shiftBy:BigInt(e)}}function eA(e,t,r){let{windowSize:i,mask:n,maxNumber:o,shiftBy:f}=r,a=Number(e&n),s=e>>f;a>i&&(a-=o,s+=ew);let l=t*i,d=l+Math.abs(a)-1,c=0===a;return{nextN:s,offset:d,isZero:c,isNeg:a<0,isNegF:t%2!=0,offsetF:l}}let eS=new WeakMap,eI=new WeakMap;function eO(e){return eI.get(e)||1}function eR(e){return eu(e.Fp),Q(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...ex(e.n,e.nBitLength),...e,...{p:e.Fp.ORDER}})}function eq(e){void 0!==e.lowS&&N("lowS",e.lowS),void 0!==e.prehash&&N("prehash",e.prehash)}let eH={Err:class extends Error{constructor(e=""){super(e)}},_tlv:{encode:(e,t)=>{let{Err:r}=eH;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(1&t.length)throw new r("tlv.encode: unpadded data");let i=t.length/2,n=U(i);if(n.length/2&128)throw new r("tlv.encode: long form length too big");let o=i>127?U(n.length/2|128):"";return U(e)+o+n+t},decode(e,t){let{Err:r}=eH,i=0;if(e<0||e>256)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=0;if(128&n){let e=127&n;if(!e)throw new r("tlv.decode(long): indefinite length not supported");if(e>4)throw new r("tlv.decode(long): byte length is too big");let f=t.subarray(i,i+e);if(f.length!==e)throw new r("tlv.decode: length bytes not complete");if(0===f[0])throw new r("tlv.decode(long): zero leftmost byte");for(let e of f)o=o<<8|e;if(i+=e,o<128)throw new r("tlv.decode(long): not minimal encoding")}else o=n;let f=t.subarray(i,i+o);if(f.length!==o)throw new r("tlv.decode: wrong value length");return{v:f,l:t.subarray(i+o)}}},_int:{encode(e){let{Err:t}=eH;if(e<eN)throw new t("integer: negative integers are not allowed");let r=U(e);if(8&Number.parseInt(r[0],16)&&(r="00"+r),1&r.length)throw new t("unexpected DER parsing assertion: unpadded hex");return r},decode(e){let{Err:t}=eH;if(128&e[0])throw new t("invalid signature integer: negative");if(0===e[0]&&!(128&e[1]))throw new t("invalid signature integer: unnecessary leading zero");return V(e)}},toSig(e){let{Err:t,_int:r,_tlv:i}=eH,n=j("signature",e),{v:o,l:f}=i.decode(48,n);if(f.length)throw new t("invalid signature: left bytes after parsing");let{v:a,l:s}=i.decode(2,o),{v:l,l:d}=i.decode(2,s);if(d.length)throw new t("invalid signature: left bytes after parsing");return{r:r.decode(a),s:r.decode(l)}},hexFromSig(e){let{_tlv:t,_int:r}=eH,i=t.encode(2,r.encode(e.r)),n=t.encode(2,r.encode(e.s));return t.encode(48,i+n)}},eN=BigInt(0),eU=BigInt(1),eP=BigInt(2),eZ=BigInt(3),eC=BigInt(4),ez=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),eF=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),eL=BigInt(0),eV=BigInt(1),eT=BigInt(2),eD=(e,t)=>(e+t/eT)/t,e_=eg(ez,void 0,void 0,{sqrt:function(e){let t=BigInt(3),r=BigInt(6),i=BigInt(11),n=BigInt(22),o=BigInt(23),f=BigInt(44),a=BigInt(88),s=e*e*e%ez,l=s*s*e%ez,d=ea(l,t,ez)*l%ez,c=ea(d,t,ez)*l%ez,u=ea(c,eT,ez)*s%ez,h=ea(u,i,ez)*u%ez,b=ea(h,n,ez)*h%ez,x=ea(b,f,ez)*b%ez,g=ea(x,a,ez)*x%ez,p=ea(g,f,ez)*b%ez,m=ea(p,t,ez)*l%ez,y=ea(m,o,ez)*h%ez,w=ea(y,r,ez)*s%ez,E=ea(w,eT,ez);if(!e_.eql(e_.sqr(E),e))throw Error("Cannot find square root");return E}}),ej=(i={a:eL,b:BigInt(7),Fp:e_,n:eF,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{let t=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-eV*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),n=BigInt("0x100000000000000000000000000000000"),o=eD(t*e,eF),f=eD(-r*e,eF),a=ef(e-o*t-f*i,eF),s=ef(-o*r-f*t,eF),l=a>n,d=s>n;if(l&&(a=eF-a),d&&(s=eF-s),a>n||s>n)throw Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:l,k1:a,k2neg:d,k2:s}}}},{...(t=e=>(function(e){let t,r=(Q(t=eR(e),{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})),{Fp:i,n:n,nByteLength:o,nBitLength:f}=r,a=i.BYTES+1,s=2*i.BYTES+1;function l(e){return ef(e,n)}let{ProjectivePoint:d,normPrivateKeyToScalar:c,weierstrassEquation:u,isWithinCurveOrder:h}=function(e){var t;let r=function(e){let t=eR(e);Q(t,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});let{endo:r,Fp:i,a:n}=t;if(r){if(!i.eql(n,i.ZERO))throw Error("invalid endo: CURVE.a must be 0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...t})}(e),{Fp:i}=r,n=eg(r.n,r.nBitLength),o=r.toBytes||((e,t,r)=>{let n=t.toAffine();return k(Uint8Array.from([4]),i.toBytes(n.x),i.toBytes(n.y))}),f=r.fromBytes||(e=>{let t=e.subarray(1);return{x:i.fromBytes(t.subarray(0,i.BYTES)),y:i.fromBytes(t.subarray(i.BYTES,2*i.BYTES))}});function a(e){let{a:t,b:n}=r,o=i.sqr(e),f=i.mul(o,e);return i.add(i.add(f,i.mul(e,t)),n)}function s(e,t){let r=i.sqr(t),n=a(e);return i.eql(r,n)}if(!s(r.Gx,r.Gy))throw Error("bad curve params: generator point");let l=i.mul(i.pow(r.a,eZ),eC),d=i.mul(i.sqr(r.b),BigInt(27));if(i.is0(i.add(l,d)))throw Error("bad curve params: a or b");function c(e){let t,{allowedPrivateKeyLengths:i,nByteLength:n,wrapPrivateKey:o,n:f}=r;if(i&&"bigint"!=typeof e){if(q(e)&&(e=z(e)),"string"!=typeof e||!i.includes(e.length))throw Error("invalid private key");e=e.padStart(2*n,"0")}try{t="bigint"==typeof e?e:V(j("private key",e,n))}catch(t){throw Error("invalid private key, expected hex or "+n+" b
1ytes, got "+typeof e)}return o&&(t=ef(t,f)),Y("private key",t,eU,f),t}function u(e){if(!(e instanceof x))throw Error("ProjectivePoint expected")}let h=X((e,t)=>{let{px:r,py:n,pz:o}=e;if(i.eql(o,i.ONE))return{x:r,y:n};let f=e.is0();null==t&&(t=f?i.ONE:i.inv(o));let a=i.mul(r,t),s=i.mul(n,t),l=i.mul(o,t);if(f)return{x:i.ZERO,y:i.ZERO};if(!i.eql(l,i.ONE))throw Error("invZ was invalid");return{x:a,y:s}}),b=X(e=>{if(e.is0()){if(r.allowInfinityPoint&&!i.is0(e.py))return;throw Error("bad point: ZERO")}let{x:t,y:n}=e.toAffine();if(!i.isValid(t)||!i.isValid(n))throw Error("bad point: x or y not FE");if(!s(t,n))throw Error("bad point: equation left != right");if(!e.isTorsionFree())throw Error("bad point: not in prime-order subgroup");return!0});class x{constructor(e,t,r){if(null==e||!i.isValid(e))throw Error("x required");if(null==t||!i.isValid(t)||i.is0(t))throw Error("y required");if(null==r||!i.isValid(r))throw Error("z required");this.px=e,this.py=t,this.pz=r,Object.freeze(this)}static fromAffine(e){let{x:t,y:r}=e||{};if(!e||!i.isValid(t)||!i.isValid(r))throw Error("invalid affine point");if(e instanceof x)throw Error("projective point not allowed");let n=e=>i.eql(e,i.ZERO);return n(t)&&n(r)?x.ZERO:new x(t,r,i.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){let t=eh(i,e.map(e=>e.pz));return e.map((e,r)=>e.toAffine(t[r])).map(x.fromAffine)}static fromHex(e){let t=x.fromAffine(f(j("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return x.BASE.multiply(c(e))}static msm(e,t){return function(e,t,r,i){if(!Array.isArray(r))throw Error("array expected");r.forEach((t,r)=>{if(!(t instanceof e))throw Error("invalid point at index "+r)});if(!Array.isArray(i))throw Error("array of scalars expected");i.forEach((e,r)=>{if(!t.isValid(e))throw Error("invalid scalar at index "+r)});let n=r.length,o=i.length;if(n!==o)throw Error("arrays of points and scalars must have equal length");let f=e.ZERO,a=function(e){let t;for(t=0;e>O;e>>=R,t+=1);return t}(BigInt(n)),s=1;a>12?s=a-3:a>4?s=a-2:a>0&&(s=2);let l=W(s),d=Array(Number(l)+1).fill(f),c=Math.floor((t.BITS-1)/s)*s,u=f;for(let e=c;e>=0;e-=s){d.fill(f);for(let t=0;t<o;t++){let n=Number(i[t]>>BigInt(e)&l);d[n]=d[n].add(r[t])}let t=f;for(let e=d.length-1,r=f;e>0;e--)r=r.add(d[e]),t=t.add(r);if(u=u.add(t),0!==e)for(let e=0;e<s;e++)u=u.double()}return u}(x,n,e,t)}_setWindowSize(e){m.setWindowSize(this,e)}assertValidity(){b(this)}hasEvenY(){let{y:e}=this.toAffine();if(i.isOdd)return!i.isOdd(e);throw Error("Field doesn't support isOdd")}equals(e){u(e);let{px:t,py:r,pz:n}=this,{px:o,py:f,pz:a}=e,s=i.eql(i.mul(t,a),i.mul(o,n)),l=i.eql(i.mul(r,a),i.mul(f,n));return s&&l}negate(){return new x(this.px,i.neg(this.py),this.pz)}double(){let{a:e,b:t}=r,n=i.mul(t,eZ),{px:o,py:f,pz:a}=this,s=i.ZERO,l=i.ZERO,d=i.ZERO,c=i.mul(o,o),u=i.mul(f,f),h=i.mul(a,a),b=i.mul(o,f);return b=i.add(b,b),d=i.mul(o,a),d=i.add(d,d),s=i.mul(e,d),l=i.mul(n,h),l=i.add(s,l),s=i.sub(u,l),l=i.add(u,l),l=i.mul(s,l),s=i.mul(b,s),d=i.mul(n,d),h=i.mul(e,h),b=i.sub(c,h),b=i.mul(e,b),b=i.add(b,d),d=i.add(c,c),c=i.add(d,c),c=i.add(c,h),c=i.mul(c,b),l=i.add(l,c),h=i.mul(f,a),h=i.add(h,h),c=i.mul(h,b),s=i.sub(s,c),d=i.mul(h,u),d=i.add(d,d),new x(s,l,d=i.add(d,d))}add(e){u(e);let{px:t,py:n,pz:o}=this,{px:f,py:a,pz:s}=e,l=i.ZERO,d=i.ZERO,c=i.ZERO,h=r.a,b=i.mul(r.b,eZ),g=i.mul(t,f),p=i.mul(n,a),m=i.mul(o,s),y=i.add(t,n),w=i.add(f,a);y=i.mul(y,w),w=i.add(g,p),y=i.sub(y,w),w=i.add(t,o);let E=i.add(f,s);return w=i.mul(w,E),E=i.add(g,m),w=i.sub(w,E),E=i.add(n,o),l=i.add(a,s),E=i.mul(E,l),l=i.add(p,m),E=i.sub(E,l),c=i.mul(h,w),l=i.mul(b,m),c=i.add(l,c),l=i.sub(p,c),c=i.add(p,c),d=i.mul(l,c),p=i.add(g,g),p=i.add(p,g),m=i.mul(h,m),w=i.mul(b,w),p=i.add(p,m),m=i.sub(g,m),m=i.mul(h,m),w=i.add(w,m),g=i.mul(p,w),d=i.add(d,g),g=i.mul(E,w),l=i.mul(y,l),l=i.sub(l,g),g=i.mul(y,p),c=i.mul(E,c),new x(l,d,c=i.add(c,g))}subtract(e){return this.add(e.negate())}is0(){return this.equals(x.ZERO)}wNAF(e){return m.wNAFCached(this,e,x.normalizeZ)}multiplyUnsafe(e){let{endo:t,n:n}=r;Y("scalar",e,eN,n);let o=x.ZERO;if(e===eN)return o;if(this.is0()||e===eU)return this;if(!t||m.hasPrecomputes(this))return m.wNAFCachedUnsafe(this,e,x.normalizeZ);
vendor: 7,940 bytes, line 1
1let{k1neg:f,k1:a,k2neg:s,k2:l}=t.splitScalar(e),d=o,c=o,u=this;for(;a>eN||l>eN;)a&eU&&(d=d.add(u)),l&eU&&(c=c.add(u)),u=u.double(),a>>=eU,l>>=eU;return f&&(d=d.negate()),s&&(c=c.negate()),c=new x(i.mul(c.px,t.beta),c.py,c.pz),d.add(c)}multiply(e){let t,n,{endo:o,n:f}=r;if(Y("scalar",e,eU,f),o){let{k1neg:r,k1:f,k2neg:a,k2:s}=o.splitScalar(e),{p:l,f:d}=this.wNAF(f),{p:c,f:u}=this.wNAF(s);l=m.constTimeNegate(r,l),c=m.constTimeNegate(a,c),c=new x(i.mul(c.px,o.beta),c.py,c.pz),t=l.add(c),n=d.add(u)}else{let{p:r,f:i}=this.wNAF(e);t=r,n=i}return x.normalizeZ([t,n])[0]}multiplyAndAddUnsafe(e,t,r){let i=x.BASE,n=(e,t)=>t!==eN&&t!==eU&&e.equals(i)?e.multiply(t):e.multiplyUnsafe(t),o=n(this,t).add(n(e,r));return o.is0()?void 0:o}toAffine(e){return h(this,e)}isTorsionFree(){let{h:e,isTorsionFree:t}=r;if(e===eU)return!0;if(t)return t(x,this);throw Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:e,clearCofactor:t}=r;return e===eU?this:t?t(x,this):this.multiplyUnsafe(r.h)}toRawBytes(e=!0){return N("isCompressed",e),this.assertValidity(),o(x,this,e)}toHex(e=!0){return N("isCompressed",e),z(this.toRawBytes(e))}}x.BASE=new x(r.Gx,r.Gy,i.ONE),x.ZERO=new x(i.ZERO,i.ONE,i.ZERO);let{endo:g,nBitLength:p}=r,m=(t=g?Math.ceil(p/2):p,{constTimeNegate:eE,hasPrecomputes:e=>1!==eO(e),unsafeLadder(e,t,r=x.ZERO){let i=e;for(;t>ey;)t&ew&&(r=r.add(i)),i=i.double(),t>>=ew;return r},precomputeWindow(e,r){let{windows:i,windowSize:n}=eB(r,t),o=[],f=e,a=f;for(let e=0;e<i;e++){a=f,o.push(a);for(let e=1;e<n;e++)a=a.add(f),o.push(a);f=a.double()}return o},wNAF(e,r,i){let n=x.ZERO,o=x.BASE,f=eB(e,t);for(let e=0;e<f.windows;e++){let{nextN:t,offset:a,isZero:s,isNeg:l,isNegF:d,offsetF:c}=eA(i,e,f);i=t,s?o=o.add(eE(d,r[c])):n=n.add(eE(l,r[a]))}return{p:n,f:o}},wNAFUnsafe(e,r,i,n=x.ZERO){let o=eB(e,t);for(let e=0;e<o.windows&&i!==ey;e++){let{nextN:t,offset:f,isZero:a,isNeg:s}=eA(i,e,o);if(i=t,!a){let e=r[f];n=n.add(s?e.negate():e)}}return n},getPrecomputes(e,t,r){let i=eS.get(t);return i||(i=this.precomputeWindow(t,e),1!==e&&eS.set(t,r(i))),i},wNAFCached(e,t,r){let i=eO(e);return this.wNAF(i,this.getPrecomputes(i,e,r),t)},wNAFCachedUnsafe(e,t,r,i){let n=eO(e);return 1===n?this.unsafeLadder(e,t,i):this.wNAFUnsafe(n,this.getPrecomputes(n,e,r),t,i)},setWindowSize(e,r){ev(r,t),eI.set(e,r),eS.delete(e)}});return{CURVE:r,ProjectivePoint:x,normPrivateKeyToScalar:c,weierstrassEquation:a,isWithinCurveOrder:function(e){return M(e,eU,r.n)}}}({...r,toBytes(e,t,r){let n=t.toAffine(),o=i.toBytes(n.x);return(N("isCompressed",r),r)?k(Uint8Array.from([t.hasEvenY()?2:3]),o):k(Uint8Array.from([4]),o,i.toBytes(n.y))},fromBytes(e){let t=e.length,r=e[0],n=e.subarray(1);if(t===a&&(2===r||3===r)){let e,t=V(n);if(!M(t,eU,i.ORDER))throw Error("Point is not on curve");let o=u(t);try{e=i.sqrt(o)}catch(e){throw Error("Point is not on curve"+(e instanceof Error?": "+e.message:""))}return(1&r)==1!=((e&eU)===eU)&&(e=i.neg(e)),{x:t,y:e}}if(t===s&&4===r)return{x:i.fromBytes(n.subarray(0,i.BYTES)),y:i.fromBytes(n.subarray(i.BYTES,2*i.BYTES))};throw Error("invalid Point, expected length of "+a+", or uncompressed "+s+", got "+t)}}),b=(e,t,r)=>V(e.slice(t,r));class x{constructor(e,t,r){Y("r",e,eU,n),Y("s",t,eU,n),this.r=e,this.s=t,null!=r&&(this.recovery=r),Object.freeze(this)}static fromCompact(e){return new x(b(e=j("compactSignature",e,2*o),0,o),b(e,o,2*o))}static fromDER(e){let{r:t,s:r}=eH.toSig(j("DER",e));return new x(t,r)}assertValidity(){}addRecoveryBit(e){return new x(this.r,this.s,e)}recoverPublicKey(e){let{r:t,s:o,recovery:f}=this,a=m(j("msgHash",e));if(null==f||![0,1,2,3].includes(f))throw Error("recovery id invalid");let s=2===f||3===f?t+r.n:t;if(s>=i.ORDER)throw Error("recovery id 2 or 3 invalid");let c=(1&f)==0?"02":"03",u=d.fromHex(c+z(D(s,i.BYTES))),h=es(s,n),b=l(-a*h),x=l(o*h),g=d.BASE.multiplyAndAddUnsafe(u,b,x);if(!g)throw Error("point at infinify");return g.assertValidity(),g}hasHighS(){return this.s>n>>eU}normalizeS(){return this.hasHighS()?new x(this.r,l(-this.s),this.recovery):this}toDERRawBytes(){return L(this.toDERHex())}toDERHex(){return eH.hexFromSig(this)}toCompactRawBytes(){return L(this.toCompactHex())}toCompactHex(){return z(D(this.r,o))+z(D(this.s,o))}}function g(e){if("bigint"==typeof e)return!1;if(e instanceof d)return!0;let t=j("key",e).length,n=i.BYTES,f=n+1;if(!r.allowedPrivateKeyLengths&&o!==f)return t===f||t===2*n+1}let p=r.bits2int||function(e){if(e.length>8192)throw Error("input is too large");let t=V(e),r=8*e.length-f;return r>0?t>>BigInt(r):t},m=r.bits2int_modN||function(e){return l(p(e))},y=W(f);function w(e){return Y("num < 2^"+f,e,eN,y),D(e,o)}let E={lowS:r.lowS,prehash:!1},v={lowS:r.lowS,prehash:!1};return d.BASE._setWindowSize(8),{CURVE:r,getPublicKey:function(e,t=!0){return d.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,r=!0){if(!0===g(e))throw Error("first arg must be private key");if(!1===g(t))throw Error("second arg must be public key");return d.fromHex(t).multiply(c(e)).toRawBytes(r)},sign:function(e,t,o=E){let{seed:f,k2sig:a}=function(e,t,o=E){if(["recovered","canonical"].some(e=>e in o))throw Error("sign() legacy options not supported");let{hash:f,randomBytes:a}=r,{lowS:s,prehash:u,extraEntropy:b}=o;null==s&&(s=!0),e=j("msgHash",e),eq(o),u&&(e=j("prehashed msgHash",f(e)));let g=m(e),y=c(t),v=[w(y),w(g)];if(null!=b&&!1!==b){let e=!0===b?a(i.BYTES):b;v.push(j("extraEntropy",e))}return{seed:k(...v),k2sig:function(e){var t;let r=p(e);if(!h(r))return;let i=es(r,n),o=d.BASE.multiply(r).toAffine(),f=l(o.x);if(f===eN)return;let a=l(i*l(g+f*y));if(a===eN)return;let c=2*(o.x!==f)|Number(o.y&eU),u=a;return s&&a>n>>eU&&(u=(t=a)>n>>eU?l(-t):t,c^=1),new x(f,u,c)}}}(e,t,o);return(function(e,t,r){if("number"!=typeof e||e<2)throw Error("hashLen must be a number");if("number"!=typeof t||t<2)throw Error("qByteLen must be a number");if("function"!=typeof r)throw Error("hmacFn must be a function");let i=G(e),n=G(e),o=0,f=()=>{i.fill(1),n.fill(0),o=0},a=(...e)=>r(n,i,...e),s=(e=G(0))=>{let t;if(n=a((t=[0],Uint8Array.from(t)),e),i=a(),0!==e.length){let t;n=a((t=[1],Uint8Array.from(t)),e),i=a()}},l=()=>{if(o++>=1e3)throw Error("drbg: tried 1000 values");let e=0,r=[];for(;e<t;){let t=(i=a()).slice();r.push(t),e+=i.length}return k(...r)};return(e,t)=>{let r;for(f(),s(e);!(r=t(l()));)s();return f(),r}})(r.hash.outputLen,r.nByteLength,r.hmac)(f,a)},verify:function(e,t,i,o=v){let f,a;t=j("msgHash",t),i=j("publicKey",i);let{lowS:s,prehash:c,format:u}=o;if(eq(o),"strict"in o)throw Error("options.strict was renamed to lowS");if(void 0!==u&&"compact"!==u&&"der"!==u)throw Error("format must be compact or der");let h="string"==typeof e||q(e),b=!h&&!u&&"object"==typeof e&&null!==e&&"bigint"==typeof e.r&&"bigint"==typeof e.s;if(!h&&!b)throw Error("invalid signature, expected Uint8Array, hex string or Signature instance");try{if(b&&(a=new x(e.r,e.s)),h){try{"compact"!==u&&(a=x.fromDER(e))}catch(e){if(!(e instanceof eH.Err))throw e}a||"der"===u||(a=x.fromCompact(e))}f=d.fromHex(i)}catch(e){return!1}if(!a||s&&a.hasHighS())return!1;c&&(t=r.hash(t));let{r:g,s:p}=a,y=m(t),w=es(p,n),E=l(y*w),B=l(g*w),A=d.BASE.multiplyAndAddUnsafe(f,E,B)?.toAffine();return!!A&&l(A.x)===g},ProjectivePoint:d,Signature:x,utils:{isValidPrivateKey(e){try{return c(e),!0}catch(e){return!1}},normPrivateKeyToScalar:c,randomPrivateKey:()=>{let e=em(r.n);return function(e,t,r=!1){let i=e.length,n=ep(t),o=em(t);if(i<16||i<o||i>1024)throw Error("expected "+o+"-1024 bytes of input, got "+i);let f=ef(r?T(e):V(e),t-ee)+ee;return r?_(f,n):D(f,n)}(r.randomBytes(e),r.n)},precompute:(e=8,t=d.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)}}})({...i,...{hash:e,hmac:(t,...r)=>I(e,t,(0,n.concatBytes)(...r)),randomBytes:n.randomBytes}}))(v),create:t});ej.ProjectivePoint;let ek=(r=[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a4
113deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(e=>e.map(e=>BigInt(e))).map(e=>Array.from(e).reverse()),(e,t)=>{let[i,n,o,f]=r.map(t=>t.reduce((t,r)=>e_.add(e_.mul(t,e),r))),[a,s]=eh(e_,[n,f],!0);return e=e_.mul(i,a),t=e_.mul(t,e_.mul(o,s)),{x:e,y:t}}),eK=function(e,t){if(eu(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw Error("mapToCurveSimpleSWU: invalid opts");let r=function(e,t){let r=e.ORDER,i=eN;for(let e=r-eU;e%eP===eN;e/=eP)i+=eU;let n=i,o=eP<<n-eU-eU,f=o*eP,a=(r-eU)/f,s=(a-eU)/eP,l=f-eU,d=e.pow(t,a),c=e.pow(t,(a+eU)/eP),u=(t,r)=>{let i=d,f=e.pow(r,l),a=e.sqr(f);a=e.mul(a,r);let u=e.mul(t,a);u=e.pow(u,s),u=e.mul(u,f),f=e.mul(u,r),a=e.mul(u,t);let h=e.mul(a,f);u=e.pow(h,o);let b=e.eql(u,e.ONE);f=e.mul(a,c),u=e.mul(h,i),a=e.cmov(f,a,b),h=e.cmov(u,h,b);for(let t=n;t>eU;t--){let r=t-eP;r=eP<<r-eU;let n=e.pow(h,r),o=e.eql(n,e.ONE);f=e.mul(a,i),i=e.mul(i,i),n=e.mul(h,i),a=e.cmov(f,a,o),h=e.cmov(n,h,o)}return{isValid:b,value:a}};if(e.ORDER%eC===eZ){let r=(e.ORDER-eZ)/eC,i=e.sqrt(e.neg(t));u=(t,n)=>{let o=e.sqr(n),f=e.mul(t,n);o=e.mul(o,f);let a=e.pow(o,r);a=e.mul(a,f);let s=e.mul(a,i),l=e.mul(e.sqr(a),n),d=e.eql(l,t),c=e.cmov(s,a,d);return{isValid:d,value:c}}}return u}(e,t.Z);if(!e.isOdd)throw Error("Fp.isOdd is not implemented!");return i=>{let n,o,f,a,s,l,d,c;n=e.sqr(i),n=e.mul(n,t.Z),o=e.sqr(n),o=e.add(o,n),f=e.add(o,e.ONE),f=e.mul(f,t.B),a=e.cmov(t.Z,e.neg(o),!e.eql(o,e.ZERO)),a=e.mul(a,t.A),o=e.sqr(f),l=e.sqr(a),s=e.mul(l,t.A),o=e.add(o,s),o=e.mul(o,f),l=e.mul(l,a),s=e.mul(l,t.B),o=e.add(o,s),d=e.mul(n,f);let{isValid:u,value:h}=r(o,l);c=e.mul(n,i),c=e.mul(c,h),d=e.cmov(d,f,u),c=e.cmov(c,h,u);let b=e.isOdd(i)===e.isOdd(c);c=e.cmov(e.neg(c),c,b);let x=eh(e,[a],!0)[0];return{x:d=e.mul(d,x),y:c}}}(e_,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:e_.create(BigInt("-11"))});(function(e,t,r){if("function"!=typeof t)throw Error("mapToCurve() must be defined")})(ej.ProjectivePoint,e=>{let{x:t,y:r}=eK(e_.create(e[0]));return ek(t,r)},e_.ORDER),e.s(["secp256k1",0,ej],858631)}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.