vendor: 4,262 bytes, line 1
1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3126],{21936:(t,e,r)=>{r.d(e,{w:()=>o});var n=r(66135);class i extends n.Vw{constructor(t,e){super(),this.finished=!1,this.destroyed=!1,(0,n.sd)(t);let r=(0,n.ZJ)(e);if(this.iHash=t.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;let i=this.blockLen,o=new Uint8Array(i);o.set(r.length>i?t.create().update(r).digest():r);for(let t=0;t<o.length;t++)o[t]^=54;this.iHash.update(o),this.oHash=t.create();for(let t=0;t<o.length;t++)o[t]^=106;this.oHash.update(o),(0,n.uH)(o)}update(t){return(0,n.CC)(this),this.iHash.update(t),this}digestInto(t){(0,n.CC)(this),(0,n.DO)(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),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:e,iHash:r,finished:n,destroyed:i,blockLen:o,outputLen:l}=this;return t.finished=n,t.destroyed=i,t.blockLen=o,t.outputLen=l,t.oHash=e._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}let o=(t,e,r)=>new i(t,e).update(r).digest();o.create=(t,e)=>new i(t,e)},23126:(t,e,r)=>{r.d(e,{secp256k1:()=>tx});var n=r(4410),i=r(21936),o=r(66135);let l=BigInt(0),f=BigInt(1);function s(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&"Uint8Array"===t.constructor.name}function a(t){if(!s(t))throw Error("Uint8Array expected")}function u(t,e){if("boolean"!=typeof e)throw Error(t+" boolean expected, got "+e)}function d(t){let e=t.toString(16);return 1&e.length?"0"+e:e}function h(t){if("string"!=typeof t)throw Error("hex string expected, got "+typeof t);return""===t?l:BigInt("0x"+t)}let c="function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex,g=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function p(t){if(a(t),c)return t.toHex();let e="";for(let r=0;r<t.length;r++)e+=g[t[r]];return e}let y={_0:48,_9:57,A:65,F:70,a:97,f:102};function m(t){return t>=y._0&&t<=y._9?t-y._0:t>=y.A&&t<=y.F?t-(y.A-10):t>=y.a&&t<=y.f?t-(y.a-10):void 0}function w(t){if("string"!=typeof t)throw Error("hex string expected, got "+typeof t);if(c)return Uint8Array.fromHex(t);let e=t.length,r=e/2;if(e%2)throw Error("hex string expected, got unpadded hex of length "+e);let n=new Uint8Array(r);for(let e=0,i=0;e<r;e++,i+=2){let r=m(t.charCodeAt(i)),o=m(t.charCodeAt(i+1));if(void 0===r||void 0===o)throw Error('hex string expected, got non-hex character "'+(t[i]+t[i+1])+'" at index '+i);n[e]=16*r+o}return n}function E(t){return h(p(t))}function b(t){return a(t),h(p(Uint8Array.from(t).reverse()))}function v(t,e){return w(t.toString(16).padStart(2*e,"0"))}function B(t,e){return v(t,e).reverse()}function x(t,e,r){let n;if("string"==typeof e)try{n=w(e)}catch(e){throw Error(t+" must be hex string or Uint8Array, cause: "+e)}else if(s(e))n=Uint8Array.from(e);else throw Error(t+" must be hex string or Uint8Array");let i=n.length;if("number"==typeof r&&i!==r)throw Error(t+" of length "+r+" expected, got "+i);return n}function A(...t){let e=0;for(let r=0;r<t.length;r++){let n=t[r];a(n),e+=n.length}let r=new Uint8Array(e);for(let e=0,n=0;e<t.length;e++){let i=t[e];r.set(i,n),n+=i.length}return r}let S=t=>"bigint"==typeof t&&l<=t;function I(t,e,r){return S(t)&&S(e)&&S(r)&&e<=t&&t<r}function O(t,e,r,n){if(!I(e,r,n))throw Error("expected valid "+t+": "+r+" <= n < "+n+", got "+e)}let R=t=>(f<<BigInt(t))-f,q=t=>new Uint8Array(t),N=t=>Uint8Array.from(t),H={bigint:t=>"bigint"==typeof t,function:t=>"function"==typeof t,boolean:t=>"boolean"==typeof t,string:t=>"string"==typeof t,stringOrUint8Array:t=>"string"==typeof t||s(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>"function"==typeof t&&Number.isSafeInteger(t.outputLen)};function z(t,e,r={}){let n=(e,r,n)=>{let i=H[r];if("function"!=typeof i)throw Error("invalid validator function");let o=t[e];if((!n||void 0!==o)&&!i(o,t))throw Error("param "+String(e)+" is invali
1d. Expected "+r+", got "+o)};for(let[t,r]of Object.entries(e))n(t,r,!1);for(let[t,e]of Object.entries(r))n(t,e,!0);return t}function U(t){let e=new WeakMap;return(r,...n)=>{let i=e.get(r);if(void 0!==i)return i;let o=t(r,...n);return e.set(r,o),o}}let F=BigInt(0),P=BigInt(1),Z=BigInt(2),C=BigInt(3),L=BigInt(4),_=BigInt(5),k=BigInt(8);function T(t,e){let r=t%e;return r>=F?r:e+r}function V(t,e,r){let n=t;for(;e-- >F;)n*=n,n%=r;return n}function j(t,e){if(t===F)throw Error("invert: expected non-zero number");if(e<=F)throw Error("invert: expected positive modulus, got "+e);let r=T(t,e),n=e,i=F,o=P,l=P,f=F;for(;r!==F;){let t=n/r,e=n%r,s=i-l*t,a=o-f*t;n=r,r=e,i=l,o=f,l=s,f=a}if(n!==P)throw Error("invert: does not exist");return T(i,e)}function D(t,e){let r=(t.ORDER+P)/L,n=t.pow(e,r);if(!t.eql(t.sqr(n),e))throw Error("Cannot find square root");return n}function K(t,e){let r=(t.ORDER-_)/k,n=t.mul(e,Z),i=t.pow(n,r),o=t.mul(e,i),l=t.mul(t.mul(o,Z),i),f=t.mul(o,t.sub(l,t.ONE));if(!t.eql(t.sqr(f),e))throw Error("Cannot find square root");return f}let Y=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function M(t,e,r=!1){let n=Array(e.length).fill(r?t.ZERO:void 0),i=e.reduce((e,r,i)=>t.is0(r)?e:(n[i]=e,t.mul(e,r)),t.ONE),o=t.inv(i);return e.reduceRight((e,r,i)=>t.is0(r)?e:(n[i]=t.mul(e,n[i]),t.mul(e,r)),o),n}function W(t,e){let r=(t.ORDER-P)/Z,n=t.pow(e,r),i=t.eql(n,t.ONE),o=t.eql(n,t.ZERO),l=t.eql(n,t.neg(t.ONE));if(!i&&!o&&!l)throw Error("invalid Legendre symbol result");return i?1:o?0:-1}function G(t,e){void 0!==e&&(0,o.Fe)(e);let r=void 0!==e?e:t.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function J(t,e,r=!1,n={}){let i;if(t<=F)throw Error("invalid field: expected ORDER > 0, got "+t);let{nBitLength:o,nByteLength:l}=G(t,e);if(l>2048)throw Error("invalid field: expected ORDER of <= 2048 bytes");let f=Object.freeze({ORDER:t,isLE:r,BITS:o,BYTES:l,MASK:R(o),ZERO:F,ONE:P,create:e=>T(e,t),isValid:e=>{if("bigint"!=typeof e)throw Error("invalid field element: expected bigint, got "+typeof e);return F<=e&&e<t},is0:t=>t===F,isOdd:t=>(t&P)===P,neg:e=>T(-e,t),eql:(t,e)=>t===e,sqr:e=>T(e*e,t),add:(e,r)=>T(e+r,t),sub:(e,r)=>T(e-r,t),mul:(e,r)=>T(e*r,t),pow:(t,e)=>(function(t,e,r){if(r<F)throw Error("invalid exponent, negatives unsupported");if(r===F)return t.ONE;if(r===P)return e;let n=t.ONE,i=e;for(;r>F;)r&P&&(n=t.mul(n,i)),i=t.sqr(i),r>>=P;return n})(f,t,e),div:(e,r)=>T(e*j(r,t),t),sqrN:t=>t*t,addN:(t,e)=>t+e,subN:(t,e)=>t-e,mulN:(t,e)=>t*e,inv:e=>j(e,t),sqrt:n.sqrt||(e=>(i||(i=t%L===C?D:t%k===_?K:function(t){if(t<BigInt(3))throw Error("sqrt is not defined for small field");let e=t-P,r=0;for(;e%Z===F;)e/=Z,r++;let n=Z,i=J(t);for(;1===W(i,n);)if(n++>1e3)throw Error("Cannot find square root: probably non-prime P");if(1===r)return D;let o=i.pow(n,e),l=(e+P)/Z;return function(t,n){if(t.is0(n))return n;if(1!==W(t,n))throw Error("Cannot find square root");let i=r,f=t.mul(t.ONE,o),s=t.pow(n,e),a=t.pow(n,l);for(;!t.eql(s,t.ONE);){if(t.is0(s))return t.ZERO;let e=1,r=t.sqr(s);for(;!t.eql(r,t.ONE);)if(e++,r=t.sqr(r),e===i)throw Error("Cannot find square root");let n=P<<BigInt(i-e-1),o=t.pow(f,n);i=e,f=t.sqr(o),s=t.mul(s,f),a=t.mul(a,o)}return a}}(t)),i(f,e))),toBytes:t=>r?B(t,l):v(t,l),fromBytes:t=>{if(t.length!==l)throw Error("Field.fromBytes: expected "+l+" bytes, got "+t.length);return r?b(t):E(t)},invertBatch:t=>M(f,t),cmov:(t,e,r)=>r?e:t});return Object.freeze(f)}function Q(t){if("bigint"!=typeof t)throw Error("field order must be bigint");return Math.ceil(t.toString(2).length/8)}function X(t){let e=Q(t);return e+Math.ceil(e/2)}let $=BigInt(0),tt=BigInt(1);function te(t,e){let r=e.negate();return t?r:e}function tr(t,e){if(!Number.isSafeInteger(t)||t<=0||t>e)throw Error("invalid window size, expected [1.."+e+"], got W="+t)}function tn(t,e){tr(t,e);let r=Math.ceil(e/t)+1,n=2**(t-1),i=2**t;return{windows:r,windowSize:n,mask:R(t),maxNumber:i,shiftBy:BigInt(t)}}function ti(t,e,r){let{windowSize:n,mask:i,maxNumber:o,shiftBy:l}=r,f=Number(t&i),s=t>>l;f>n&&(f-=o,s+=tt);let a=e*n,u=a+Math.abs(f)-1,d=0===f;return{nextN:s,offset:u,isZero:d,isNeg:f<0,isNegF:e%2!=0,offsetF:a}}let to=new WeakMap,tl=new WeakMap;function tf(t){return tl.get(t)||1}function ts(t){return z(t.Fp,Y.reduce((t,e)=>(t[e]="function",t),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"})),z(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...G(t.n,t.nBitLength),...t,...{p:t.Fp.ORDER}})}function ta(t){void 0!==t.lowS&&u("lowS",t.lowS),void 0!==t.prehash&&u("prehash",t.prehash)}
vendor: 17,267 bytes, line 1
1class tu extends Error{constructor(t=""){super(t)}}let td={Err:tu,_tlv:{encode:(t,e)=>{let{Err:r}=td;if(t<0||t>256)throw new r("tlv.encode: wrong tag");if(1&e.length)throw new r("tlv.encode: unpadded data");let n=e.length/2,i=d(n);if(i.length/2&128)throw new r("tlv.encode: long form length too big");let o=n>127?d(i.length/2|128):"";return d(t)+o+i+e},decode(t,e){let{Err:r}=td,n=0;if(t<0||t>256)throw new r("tlv.encode: wrong tag");if(e.length<2||e[n++]!==t)throw new r("tlv.decode: wrong tlv");let i=e[n++],o=0;if(128&i){let t=127&i;if(!t)throw new r("tlv.decode(long): indefinite length not supported");if(t>4)throw new r("tlv.decode(long): byte length is too big");let l=e.subarray(n,n+t);if(l.length!==t)throw new r("tlv.decode: length bytes not complete");if(0===l[0])throw new r("tlv.decode(long): zero leftmost byte");for(let t of l)o=o<<8|t;if(n+=t,o<128)throw new r("tlv.decode(long): not minimal encoding")}else o=i;let l=e.subarray(n,n+o);if(l.length!==o)throw new r("tlv.decode: wrong value length");return{v:l,l:e.subarray(n+o)}}},_int:{encode(t){let{Err:e}=td;if(t<th)throw new e("integer: negative integers are not allowed");let r=d(t);if(8&Number.parseInt(r[0],16)&&(r="00"+r),1&r.length)throw new e("unexpected DER parsing assertion: unpadded hex");return r},decode(t){let{Err:e}=td;if(128&t[0])throw new e("invalid signature integer: negative");if(0===t[0]&&!(128&t[1]))throw new e("invalid signature integer: unnecessary leading zero");return E(t)}},toSig(t){let{Err:e,_int:r,_tlv:n}=td,i=x("signature",t),{v:o,l:l}=n.decode(48,i);if(l.length)throw new e("invalid signature: left bytes after parsing");let{v:f,l:s}=n.decode(2,o),{v:a,l:u}=n.decode(2,s);if(u.length)throw new e("invalid signature: left bytes after parsing");return{r:r.decode(f),s:r.decode(a)}},hexFromSig(t){let{_tlv:e,_int:r}=td,n=e.encode(2,r.encode(t.r)),i=e.encode(2,r.encode(t.s));return e.encode(48,n+i)}},th=BigInt(0),tc=BigInt(1),tg=(BigInt(2),BigInt(3)),tp=BigInt(4),ty=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),tm=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),tw=BigInt(0),tE=BigInt(1),tb=BigInt(2),tv=(t,e)=>(t+e/tb)/e,tB=J(ty,void 0,void 0,{sqrt:function(t){let e=BigInt(3),r=BigInt(6),n=BigInt(11),i=BigInt(22),o=BigInt(23),l=BigInt(44),f=BigInt(88),s=t*t*t%ty,a=s*s*t%ty,u=V(a,e,ty)*a%ty,d=V(u,e,ty)*a%ty,h=V(d,tb,ty)*s%ty,c=V(h,n,ty)*h%ty,g=V(c,i,ty)*c%ty,p=V(g,l,ty)*g%ty,y=V(p,f,ty)*p%ty,m=V(y,l,ty)*g%ty,w=V(m,e,ty)*a%ty,E=V(w,o,ty)*c%ty,b=V(E,r,ty)*s%ty,v=V(b,tb,ty);if(!tB.eql(tB.sqr(v),t))throw Error("Cannot find square root");return v}}),tx=function(t,e){let r=e=>(function(t){let e=function(t){let e=ts(t);return z(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}(t),{Fp:r,n:n,nByteLength:i,nBitLength:o}=e,a=r.BYTES+1,d=2*r.BYTES+1;function h(t){return T(t,n)}let{ProjectivePoint:c,normPrivateKeyToScalar:g,weierstrassEquation:y,isWithinCurveOrder:m}=function(t){var e;let r=function(t){let e=ts(t);z(e,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});let{endo:r,Fp:n,a:i}=e;if(r){if(!n.eql(i,n.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({...e})}(t),{Fp:n}=r,i=J(r.n,r.nBitLength),o=r.toBytes||((t,e,r)=>{let i=e.toAffine();return A(Uint8Array.from([4]),n.toBytes(i.x),n.toBytes(i.y))}),a=r.fromBytes||(t=>{let e=t.subarray(1);return{x:n.fromBytes(e.subarray(0,n.BYTES)),y:n.fromBytes(e.subarray(n.BYTES,2*n.BYTES))}});function d(t){let{a:e,b:i}=r,o=n.sqr(t),l=n.mul(o,t);return n.add(n.add(l,n.mul(t,e)),i)}function h(t,e){let r=n.sqr(e),i=d(t);return n.eql(r,i)}if(!h(r.Gx,r.Gy))throw Error("bad curve params: generator point");let c=n.mul(n.pow(r.a,tg),tp),g=n.mul(n.sqr(r.b),BigInt(27));if(n.is0(n.add(c,g)))throw Error("bad curve params: a or b");function y(t){let e,{allowedPrivateKeyLengths:n,nByteLength:i,wrapPrivateKey:o,n:l}=r;if(n&&"bigint"!=typeof t){if(s(t)&&(t=p(t)),"string"!=typeof t||!n.includes(t.length))throw Error("invalid private key");t=t.padStart(2*i,"0")}try{e="bigint"==typeof t?t:E(x("private key",t,i))}catch(e){throw Error("invalid private key, expected hex or "+i+" bytes, got "+typeof t)}return o&&(e=T(e,l)),O("private key",e,tc,l),e}function m(t){if(!(t instanceof v))throw Error("ProjectivePoint expected")}let w=U((t,e)=>{let{px:r,py:i,pz:o}=t;if(n.eql(o,n.ONE))return{x:r,y:i};let l=t.is0();null==e&&(e=l?n.ONE:n.inv(o));let f=n.mul(r,e),s=n.mul(i,e),a=n.mul(o,e);if(l)return{x:n.ZERO,y:n.ZERO};if(!n.eql(a,n.ONE))throw Error("invZ was invalid");return{x:f,y:s}}),b=U(t=>{if(t.is0()){if(r.allowInfinityPoint&&!n.is0(t.py))return;throw Error("bad point: ZERO")}let{x:e,y:i}=t.toAffine();if(!n.isValid(e)||!n.isValid(i))throw Error("bad point: x or y not FE");if(!h(e,i))throw Error("bad point: equation left != right");if(!t.isTorsionFree())throw Error("bad point: not in prime-order subgroup");return!0});class v{constructor(t,e,r){if(null==t||!n.isValid(t))throw Error("x required");if(null==e||!n.isValid(e)||n.is0(e))throw Error("y required");if(null==r||!n.isValid(r))throw Error("z required");this.px=t,this.py=e,this.pz=r,Object.freeze(this)}static fromAffine(t){let{x:e,y:r}=t||{};if(!t||!n.isValid(e)||!n.isValid(r))throw Error("invalid affine point");if(t instanceof v)throw Error("projective point not allowed");let i=t=>n.eql(t,n.ZERO);return i(e)&&i(r)?v.ZERO:new v(e,r,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(t){let e=M(n,t.map(t=>t.pz));return t.map((t,r)=>t.toAffine(e[r])).map(v.fromAffine)}static fromHex(t){let e=v.fromAffine(a(x("pointHex",t)));return e.assertValidity(),e}static fromPrivateKey(t){return v.BASE.multiply(y(t))}static msm(t,e){return function(t,e,r,n){(function(t,e){if(!Array.isArray(t))throw Error("array expected");t.forEach((t,r)=>{if(!(t instanceof e))throw Error("invalid point at index "+r)})})(r,t),function(t,e){if(!Array.isArray(t))throw Error("array of scalars expected");t.forEach((t,r)=>{if(!e.isValid(t))throw Error("invalid scalar at index "+r)})}(n,e);let i=r.length,o=n.length;if(i!==o)throw Error("arrays of points and scalars must have equal length");let s=t.ZERO,a=function(t){let e;for(e=0;t>l;t>>=f,e+=1);return e}(BigInt(i)),u=1;a>12?u=a-3:a>4?u=a-2:a>0&&(u=2);let d=R(u),h=Array(Number(d)+1).fill(s),c=Math.floor((e.BITS-1)/u)*u,g=s;for(let t=c;t>=0;t-=u){h.fill(s);for(let e=0;e<o;e++){let i=Number(n[e]>>BigInt(t)&d);h[i]=h[i].add(r[e])}let e=s;for(let t=h.length-1,r=s;t>0;t--)r=r.add(h[t]),e=e.add(r);if(g=g.add(e),0!==t)for(let t=0;t<u;t++)g=g.double()}return g}(v,i,t,e)}_setWindowSize(t){q.setWindowSize(this,t)}assertValidity(){b(this)}hasEvenY(){let{y:t}=this.toAffine();if(n.isOdd)return!n.isOdd(t);throw Error("Field doesn't support isOdd")}equals(t){m(t);let{px:e,py:r,pz:i}=this,{px:o,py:l,pz:f}=t,s=n.eql(n.mul(e,f),n.mul(o,i)),a=n.eql(n.mul(r,f),n.mul(l,i));return s&&a}negate(){return new v(this.px,n.neg(this.py),this.pz)}double(){let{a:t,b:e}=r,i=n.mul(e,tg),{px:o,py:l,pz:f}=this,s=n.ZERO,a=n.ZERO,u=n.ZERO,d=n.mul(o,o),h=n.mul(l,l),c=n.mul(f,f),g=n.mul(o,l);return g=n.add(g,g),u=n.mul(o,f),u=n.add(u,u),s=n.mul(t,u),a=n.mul(i,c),a=n.add(s,a),s=n.sub(h,a),a=n.add(h,a),a=n.mul(s,a),s=n.mul(g,s),u=n.mul(i,u),c=n.mul(t,c),g=n.sub(d,c),g=n.mul(t,g),g=n.add(g,u),u=n.add(d,d),d=n.add(u,d),d=n.add(d,c),d=n.mul(d,g),a=n.add(a,d),c=n.mul(l,f),c=n.add(c,c),d=n.mul(c,g),s=n.sub(s,d),u=n.mul(c,h),u=n.add(u,u),new v(s,a,u=n.add(u,u))}add(t){m(t);let{px:e,py:i,pz:o}=this,{px:l,py:f,pz:s}=t,a=n.ZERO,u=n.ZERO,d=n.ZERO,h=r.a,c=n.mul(r.b,tg),g=n.mul(e,l),p=n.mul(i,f),y=n.mul(o,s),w=n.add(e,i),E=n.add(l,f);w=n.mul(w,E),E=n.add(g,p),w=n.sub(w,E),E=n.add(e,o);let b=n.add(l,s);return E=n.mul(E,b),b=n.add(g,y),E=n.sub(E,b),b=n.add(i,o),a=n.add(f,s),b=n.mul(b,a),a=n.add(p,y),b=n.sub(b,a),d=n.mul(h,E),a=n.mul(c,y),d=n.add(a,d),a=n.sub(p,d),d=n.add(p,d),u=n.mul(a,d),p=n.add(g,g),p=n.add(p,g),y=n.mul(h,y),E=n.mul(c,E),p=n.add(p,y),y=n.sub(g,y),y=n.mul(h,y),E=n.add(E,y),g=n.mul(p,E),u=n.add(u,g),g=n.mul(b,E),a=n.mul(w,a),a=n.sub(a,g),g=n.mul(w,p),d=n.mul(b,d),new v(a,u,d=n.add(d,g))}subtract(t){return this.add(t.negate())}is0(){return this.equals(v.ZERO)}wNAF(t){return q.wNAFCached(this,t,v.normalizeZ)}multiplyUnsafe(t){let{endo:e,n:i}=r;O("scalar",t,th,i);let o=v.ZERO;if(t===th)return o;if(this.is0()||t===tc)return this;if(!e||q.hasPrecomputes(this))return q.wNAFCachedUnsafe(this,t,v.normalizeZ);let{k1neg:l,k1:f,k2neg:s,k2:a}=e.splitScalar(t),u=o,d=o,h=this;for(;f>th||a>th;)f&tc&&(u=u.add(h)),a&tc&&(d=d.add(h)),h=h.double(),f>>=tc,a>>=tc;return l&&(u=u.negate()),s&&(d=d.negate()),d=new v(n.mul(d.px,e.beta),d.py,d.pz),u.add(d)}multiply(t){let e,i,{endo:o,n:l}=r;if(O("scalar",t,tc,l),o){let{k1neg:r,k1:l,k2neg:f,k2:s}=o.splitScalar(t),{p:a,f:u}=this.wNAF(l),{p:d,f:h}=this.wNAF(s);a=q.constTimeNegate(r,a),d=q.constTimeNegate(f,d),d=new v(n.mul(d.px,o.beta),d.py,d.pz),e=a.add(d),i=u.add(h)}else{let{p:r,f:n}=this.wNAF(t);e=r,i=n}return v.normalizeZ([e,i])[0]}multiplyAndAddUnsafe(t,e,r){let n=v.BASE,i=(t,e)=>e!==th&&e!==tc&&t.equals(n)?t.multiply(e):t.multiplyUnsafe(e),o=i(this,e).add(i(t,r));return o.is0()?void 0:o}toAffine(t){return w(this,t)}isTorsionFree(){let{h:t,isTorsionFree:e}=r;if(t===tc)return!0;if(e)return e(v,this);throw Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:t,clearCofactor:e}=r;return t===tc?this:e?e(v,this):this.multiplyUnsafe(r.h)}toRawBytes(t=!0){return u("isCompressed",t),this.assertValidity(),o(v,this,t)}toHex(t=!0){return u("isCompressed",t),p(this.toRawBytes(t))}}v.BASE=new v(r.Gx,r.Gy,n.ONE),v.ZERO=new v(n.ZERO,n.ONE,n.ZERO);let{endo:B,nBitLength:S}=r,q=(e=B?Math.ceil(S/2):S,{constTimeNegate:te,hasPrecomputes:t=>1!==tf(t),unsafeLadder(t,e,r=v.ZERO){let n=t;for(;e>$;)e&tt&&(r=r.add(n)),n=n.double(),e>>=tt;return r},precomputeWindow(t,r){let{windows:n,windowSize:i}=tn(r,e),o=[],l=t,f=l;for(let t=0;t<n;t++){f=l,o.push(f);for(let t=1;t<i;t++)f=f.add(l),o.push(f);l=f.double()}return o},wNAF(t,r,n){let i=v.ZERO,o=v.BASE,l=tn(t,e);for(let t=0;t<l.windows;t++){let{nextN:e,offset:f,isZero:s,isNeg:a,isNegF:u,offsetF:d}=ti(n,t,l);n=e,s?o=o.add(te(u,r[d])):i=i.add(te(a,r[f]))}return{p:i,f:o}},wNAFUnsafe(t,r,n,i=v.ZERO){let o=tn(t,e);for(let t=0;t<o.windows&&n!==$;t++){let{nextN:e,offset:l,isZero:f,isNeg:s}=ti(n,t,o);if(n=e,!f){let t=r[l];i=i.add(s?t.negate():t)}}return i},getPrecomputes(t,e,r){let n=to.get(e);return n||(n=this.precomputeWindow(e,t),1!==t&&to.set(e,r(n))),n},wNAFCached(t,e,r){let n=tf(t);return this.wNAF(n,this.getPrecomputes(n,t,r),e)},wNAFCachedUnsafe(t,e,r,n){let i=tf(t);return 1===i?this.unsafeLadder(t,e,n):this.wNAFUnsafe(i,this.getPrecomputes(i,t,r),e,n)},setWindowSize(t,r){tr(r,e),tl.set(t,r),to.delete(t)}});return{CURVE:r,ProjectivePoint:v,normPrivateKeyToScalar:y,weierstrassEquation:d,isWithinCurveOrder:function(t){return I(t,tc,r.n)}}}({...e,toBytes(t,e,n){let i=e.toAffine(),o=r.toBytes(i.x);return(u("isCompressed",n),n)?A(Uint8Array.from([e.hasEvenY()?2:3]),o):A(Uint8Array.from([4]),o,r.toBytes(i.y))},fromBytes(t){let e=t.length,n=t[0],i=t.subarray(1);if(e===a&&(2===n||3===n)){let t,e=E(i);if(!I(e,tc,r.ORDER))throw Error("Point is not on curve");let o=y(e);try{t=r.sqrt(o)}catch(t){throw Error("Point is not on curve"+(t instanceof Error?": "+t.message:""))}return(1&n)==1!=((t&tc)===tc)&&(t=r.neg(t)),{x:e,y:t}}if(e===d&&4===n)return{x:r.fromBytes(i.subarray(0,r.BYTES)),y:r.fromBytes(i.subarray(r.BYTES,2*r.BYTES))};throw Error("invalid Point, expected length of "+a+", or uncompressed "+d+", got "+e)}}),S=(t,e,r)=>E(t.slice(e,r));class H{constructor(t,e,r){O("r",t,tc,n),O("s",e,tc,n),this.r=t,this.s=e,null!=r&&(this.recovery=r),Object.freeze(this)}static fromCompact(t){return new H(S(t=x("compactSignature",t,2*i),0,i),S(t,i,2*i))}static fromDER(t){let{r:e,s:r}=td.toSig(x("DER",t));return new H(e,r)}assertValidity(){}addRecoveryBit(t){return new H(this.r,this.s,t)}recoverPublicKey(t){let{r:i,s:o,recovery:l}=this,f=C(x("msgHash",t));if(null==l||![0,1,2,3].includes(l))throw Error("recovery id invalid");let s=2===l||3===l?i+e.n:i;if(s>=r.ORDER)throw Error("recovery id 2 or 3 invalid");let a=(1&l)==0?"02":"03",u=c.fromHex(a+p(v(s,r.BYTES))),d=j(s,n),g=h(-f*d),y=h(o*d),m=c.BASE.multiplyAndAddUnsafe(u,g,y);if(!m)throw Error("point at infinify");return m.assertValidity(),m}hasHighS(){return this.s>n>>tc}normalizeS(){return this.hasHighS()?new H(this.r,h(-this.s),this.recovery):this}toDERRawBytes(){return w(this.toDERHex())}toDERHex(){return td.hexFromSig(this)}toCompactRawBytes(){return w(this.toCompactHex())}toCompactHex(){return p(v(this.r,i))+p(v(this.s,i))}}function F(t){if("bigint"==typeof t)return!1;if(t instanceof c)return!0;let n=x("key",t).length,o=r.BYTES,l=o+1;if(!e.allowedPrivateKeyLengths&&i!==l)return n===l||n===2*o+1}let Z=e.bits2int||function(t){if(t.length>8192)throw Error("input is too large");let e=E(t),r=8*t.length-o;return r>0?e>>BigInt(r):e},C=e.bits2int_modN||function(t){return h(Z(t))},L=R(o);function _(t){return O("num < 2^"+o,t,th,L),v(t,i)}let k={lowS:e.lowS,prehash:!1},V={lowS:e.lowS,prehash:!1};return c.BASE._setWindowSize(8),{CURVE:e,getPublicKey:function(t,e=!0){return c.fromPrivateKey(t).toRawBytes(e)},getSharedSecret:function(t,e,r=!0){if(!0===F(t))throw Error("first arg must be private key");if(!1===F(e))throw Error("second arg must be public key");return c.fromHex(e).multiply(g(t)).toRawBytes(r)},sign:function(t,i,o=k){let{seed:l,k2sig:f}=function(t,i,o=k){if(["recovered","canonical"].some(t=>t in o))throw Error("sign() legacy options not supported");let{hash:l,randomBytes:f}=e,{lowS:s,prehash:a,extraEntropy:u}=o;null==s&&(s=!0),t=x("msgHash",t),ta(o),a&&(t=x("prehashed msgHash",l(t)));let d=C(t),p=g(i),y=[_(p),_(d)];if(null!=u&&!1!==u){let t=!0===u?f(r.BYTES):u;y.push(x("extraEntropy",t))}return{seed:A(...y),k2sig:function(t){var e;let r=Z(t);if(!m(r))return;let i=j(r,n),o=c.BASE.multiply(r).toAffine(),l=h(o.x);if(l===th)return;let f=h(i*h(d+l*p));if(f===th)return;let a=2*(o.x!==l)|Number(o.y&tc),u=f;return s&&f>n>>tc&&(u=(e=f)>n>>tc?h(-e):e,a^=1),new H(l,u,a)}}}(t,i,o);return(function(t,e,r){if("number"!=typeof t||t<2)throw Error("hashLen must be a number");if("number"!=typeof e||e<2)throw Error("qByteLen must be a number");if("function"!=typeof r)throw Error("hmacFn must be a function");let n=q(t),i=q(t),o=0,l=()=>{n.fill(1),i.fill(0),o=0},f=(...t)=>r(i,n,...t),s=(t=q(0))=>{i=f(N([0]),t),n=f(),0!==t.length&&(i=f(N([1]),t),n=f())},a=()=>{if(o++>=1e3)throw Error("drbg: tried 1000 values");let t=0,r=[];for(;t<e;){let e=(n=f()).slice();r.push(e),t+=n.length}return A(...r)};return(t,e)=>{let r;for(l(),s(t);!(r=e(a()));)s();return l(),r}})(e.hash.outputLen,e.nByteLength,e.hmac)(l,f)},verify:function(t,r,i,o=V){let l,f;r=x("msgHash",r),i=x("publicKey",i);let{lowS:a,prehash:u,format:d}=o;if(ta(o),"strict"in o)throw Error("options.strict was renamed to lowS");if(void 0!==d&&"compact"!==d&&"der"!==d)throw Error("format must be compact or der");let g="string"==typeof t||s(t),p=!g&&!d&&"object"==typeof t&&null!==t&&"bigint"==typeof t.r&&"bigint"==typeof t.s;if(!g&&!p)throw Error("invalid signature, expected Uint8Array, hex string or Signature instance");try{if(p&&(f=new H(t.r,t.s)),g){try{"compact"!==d&&(f=H.fromDER(t))}catch(t){if(!(t instanceof td.Err))throw t}f||"der"===d||(f=H.fromCompact(t))}l=c.fromHex(i)}catch(t){return!1}if(!f||a&&f.hasHighS())return!1;u&&(r=e.hash(r));let{r:y,s:m}=f,w=C(r),E=j(m,n),b=h(w*E),v=h(y*E),B=c.BASE.multiplyAndAddUnsafe(l,b,v)?.toAffine();return!!B&&h(B.x)===y},ProjectivePoint:c,Signature:H,utils:{isValidPrivateKey(t){try{return g(t),!0}catch(t){return!1}},normPrivateKeyToScalar:g,randomPrivateKey:()=>{let t=X(e.n);return function(t,e,r=!1){let n=t.length,i=Q(e),o=X(e);if(n<16||n<o||n>1024)throw Error("expected "+o+"-1024 bytes of input, got "+n);let l=T(r?b(t):E(t),e-P)+P;return r?B(l,i):v(l,i)}(e.randomBytes(t),e.n)},precompute:(t=8,e=c.BASE)=>(e._setWindowSize(t),e.multiply(BigInt(3)),e)}}})({...t,...{hash:e,hmac:(t,...r)=>(0,i.w)(e,t,(0,o.Id)(...r)),randomBytes:o.po}});return{...r(e),create:r}}({a:tw,b:BigInt(7),Fp:tB,n:tm,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{let e=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-tE*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),n=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=BigInt("0x100000000000000000000000000000000"),o=tv(e*t,tm),l=tv(-r*t,tm),f=T(t-o*e-l*n,tm),s=T(-o*r-l*e,tm),a=f>i,u=s>i;if(a&&(f=tm-f),u&&(s=tm-s),f>i||s>i)throw Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:a,k1:f,k2neg:u,k2:s}}}},n.sc),tA={},tS=t=>t.toRawBytes(!0).slice(1),tI=t=>mod(t,tm)}}]);
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.