PageSourceSearch

https://supraos.ai/_next/static/chunks/4308-8e88f4f0f877414f.js

js supraos.ai collected 2026-10-05 12:43:33 UTC 10,830 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4308],{4308:(t,e,r)=>{r.d(e,{ev:()=>S});var i,f=r(62888),n=r(90693),s=r(50013),o=r(47386);let a=BigInt(0),l=BigInt(1),u=BigInt(2),c=BigInt(8);class d{static fromBytes(t){(0,s.SJ)()}static fromHex(t){(0,s.SJ)()}get x(){return this.toAffine().x}get y(){return this.toAffine().y}clearCofactor(){return this}assertValidity(){this.ep.assertValidity()}toAffine(t){return this.ep.toAffine(t)}toHex(){return(0,n.My)(this.toBytes())}toString(){return this.toHex()}isTorsionFree(){return!0}isSmallOrder(){return!1}add(t){return this.assertSame(t),this.init(this.ep.add(t.ep))}subtract(t){return this.assertSame(t),this.init(this.ep.subtract(t.ep))}multiply(t){return this.init(this.ep.multiply(t))}multiplyUnsafe(t){return this.init(this.ep.multiplyUnsafe(t))}double(){return this.init(this.ep.double())}negate(){return this.init(this.ep.negate())}precompute(t,e){return this.init(this.ep.precompute(t,e))}constructor(t){this.ep=t}}r(22833);var h=r(36323);let y=BigInt(0),p=BigInt(1),g=BigInt(2),B=BigInt(5),m=BigInt(8),v=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),E={p:v,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:m,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")},x=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");function w(t,e){let r=(0,h.zi)(e*e*e,v),i=function(t){let e=BigInt(10),r=BigInt(20),i=BigInt(40),f=BigInt(80),n=t*t%v*t%v,s=(0,h.zH)(n,g,v)*n%v,o=(0,h.zH)(s,p,v)*t%v,a=(0,h.zH)(o,B,v)*o%v,l=(0,h.zH)(a,e,v)*a%v,u=(0,h.zH)(l,r,v)*l%v,c=(0,h.zH)(u,i,v)*u%v,d=(0,h.zH)(c,f,v)*c%v,y=(0,h.zH)(d,f,v)*c%v,m=(0,h.zH)(y,e,v)*a%v;return{pow_p_5_8:(0,h.zH)(m,g,v)*t%v,b2:n}}(t*(0,h.zi)(r*r*e,v)).pow_p_5_8,f=(0,h.zi)(t*r*i,v),n=(0,h.zi)(e*f*f,v),s=f,o=(0,h.zi)(f*x,v),a=n===t,l=n===(0,h.zi)(-t,v),u=n===(0,h.zi)(-t*x,v);return a&&(f=s),(l||u)&&(f=o),(0,h.dQ)(f,v)&&(f=(0,h.zi)(-f,v)),{isValid:a||l,value:f}}let b=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(0,o.Pl)("edwards",t,e,e.FpFnLE),{Fp:i,Fn:f}=r,d=r.CURVE,{h:h}=d;(0,s.Q5)(e,{},{uvRatio:"function"});let y=u<<BigInt(8*f.BYTES)-l,p=t=>i.create(t),g=e.uvRatio||((t,e)=>{try{return{isValid:!0,value:i.sqrt(i.div(t,e))}}catch(t){return{isValid:!1,value:a}}});if(!function(t,e,r,i){let f=t.sqr(r),n=t.sqr(i),s=t.add(t.mul(e.a,f),n),o=t.add(t.ONE,t.mul(e.d,t.mul(f,n)));return t.eql(s,o)}(i,d,d.Gx,d.Gy))throw Error("bad curve params: generator point");function B(t,e){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=r?l:a;return(0,s.aK)("coordinate "+t,e,i,y),e}function m(t){if(!(t instanceof x))throw Error("EdwardsPoint expected")}let v=(0,s.x)((t,e)=>{let{X:r,Y:f,Z:n}=t,s=t.is0();null==e&&(e=s?c:i.inv(n));let o=p(r*e),u=p(f*e),d=i.mul(n,e);if(s)return{x:a,y:l};if(d!==l)throw Error("invZ was invalid");return{x:o,y:u}}),E=(0,s.x)(t=>{let{a:e,d:r}=d;if(t.is0())throw Error("bad point: ZERO");let{X:i,Y:f,Z:n,T:s}=t,o=p(i*i),a=p(f*f),l=p(n*n),u=p(l*l),c=p(o*e);if(p(l*p(c+a))!==p(u+p(r*p(o*a))))throw Error("bad point: equation left != right (1)");if(p(i*f)!==p(n*s))throw Error("bad point: equation left != right (2)");return!0});class x{static CURVE(){return d}static fromAffine(t){if(t instanceof x)throw Error("extended point not allowed");let{x:e,y:r}=t||{};return B("x",e),B("y",r),new x(e,r,l,p(e*r))}static fromBytes(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=i.BYTES,{a:f,d:o}=d;t=(0,s.nC)((0,n.DO)(t,r,"point")),(0,s.e8)(e,"zip215");let u=(0,s.nC)(t),c=t[r-1];u[r-1]=-129&c;let h=(0,s.lX)(u),B=e?y:i.ORDER;(0,s.aK)("point.y",h,a,B);let m=p(h*h),{isValid:v,value:E}=g(p(m-l),p(o*m-f));if(!v)throw Error("bad point: invalid y coordinate");let w=(E&l)===l,b=(128&c)!=0;if(!e&&E===a&&b)throw Error("bad point: x=0 and x_0=1");return b!==w&&(E=p(-E)),x.fromAffine({x:E,y:h})}static fromHex(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return x.fromBytes((0,n.aT)(t),e)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,e=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return w.createCache(this,t),e||this.multiply(u),this}assertValidity(){E(this)}equals(t){m(t);let{X:e,Y:r,Z:i}=this,{X:f,Y:n,Z:s}=t,o=p(e*s),a=p(f*i),l=p(r*s),u=p(n*i);return o===a&&l===u}is0(){return this.equals(x.ZERO)}negate(){return new x(p(-this.X),this.Y,this.Z,p(-this.T))}double(){let{a:t}=d,{X:e,Y:r,Z:i}=this,f=p(e*e),n=p(r*r),s=p(u*p(i*i)),o=p(t*f),a=e+r,l=p(p(a*a)-f-n),c=o+n,h=c-s,y=o-n,g=p(l*h),B=p(c*y),m=p(l*y);return new x(g,B,p(h*c),m)}add(t){m(t);let{a:e,d:r}=d,{X:i,Y:f,Z:n,T:s}=this,{X:o,Y:a,Z:l,T:u}=t,c=p(i*o),h=p(f*a),y=p(s*r*u),g=p(n*l),B=p((i+f)*(o+a)-c-h),v=g-y,E=g+y,w=p(h-e*c),b=p(B
1*v),I=p(E*w),O=p(B*w);return new x(b,I,p(v*E),O)}subtract(t){return this.add(t.negate())}multiply(t){if(!f.isValidNot0(t))throw Error("invalid scalar: expected 1 <= sc < curve.n");let{p:e,f:r}=w.cached(this,t,t=>(0,o.Ak)(x,t));return(0,o.Ak)(x,[e,r])[0]}multiplyUnsafe(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:x.ZERO;if(!f.isValid(t))throw Error("invalid scalar: expected 0 <= sc < curve.n");return t===a?x.ZERO:this.is0()||t===l?this:w.unsafe(this,t,t=>(0,o.Ak)(x,t),e)}isSmallOrder(){return this.multiplyUnsafe(h).is0()}isTorsionFree(){return w.unsafe(this,d.n).is0()}toAffine(t){return v(this,t)}clearCofactor(){return h===l?this:this.multiplyUnsafe(h)}toBytes(){let{x:t,y:e}=this.toAffine(),r=i.toBytes(e);return r[r.length-1]|=t&l?128:0,r}toHex(){return(0,n.My)(this.toBytes())}toString(){return"<Point ".concat(this.is0()?"ZERO":this.toHex(),">")}constructor(t,e,r,i){this.X=B("x",t),this.Y=B("y",e),this.Z=B("z",r,!0),this.T=B("t",i),Object.freeze(this)}}x.BASE=new x(d.Gx,d.Gy,l,p(d.Gx*d.Gy)),x.ZERO=new x(a,l,l,a),x.Fp=i,x.Fn=f;let w=new o.hT(x,f.BITS);return x.BASE.precompute(8),x}(E,{uvRatio:w}),I=b.Fp,O=b.Fn,S=(i={},function(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("function"!=typeof e)throw Error('"hash" function param is required');(0,s.Q5)(r,{},{adjustScalarBytes:"function",randomBytes:"function",domain:"function",prehash:"function",mapToCurve:"function"});let{prehash:i}=r,{BASE:f,Fp:a,Fn:u}=t,c=r.randomBytes||n.po,d=r.adjustScalarBytes||(t=>t),h=r.domain||((t,e,r)=>{if((0,s.e8)(r,"phflag"),e.length||r)throw Error("Contexts/pre-hash are not supported");return t});function y(t){return u.create((0,s.lX)(t))}function p(t){let{head:r,prefix:i,scalar:s}=function(t){let r=E.secretKey;(0,n.DO)(t,E.secretKey,"secretKey");let i=(0,n.DO)(e(t),2*r,"hashedSecretKey"),f=d(i.slice(0,r)),s=i.slice(r,2*r),o=y(f);return{head:f,prefix:s,scalar:o}}(t),o=f.multiply(s),a=o.toBytes();return{head:r,prefix:i,scalar:s,point:o,pointBytes:a}}function g(t){return p(t).pointBytes}function B(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Uint8Array.of();for(var r=arguments.length,f=Array(r>1?r-1:0),s=1;s<r;s++)f[s-1]=arguments[s];return y(e(h((0,n.Id)(...f),(0,n.DO)(t,void 0,"context"),!!i)))}let m={zip215:!0},v=a.BYTES,E={secretKey:v,publicKey:v,signature:2*v,seed:v};function x(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c(E.seed);return(0,n.DO)(t,E.seed,"seed")}return Object.freeze({keygen:(0,o.GV)(x,g),getPublicKey:g,sign:function(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t=(0,n.DO)(t,void 0,"message"),i&&(t=i(t));let{prefix:s,scalar:o,pointBytes:a}=p(e),l=B(r.context,s,t),c=f.multiply(l).toBytes(),d=B(r.context,c,a,t),h=u.create(l+d*o);if(!u.isValid(h))throw Error("sign failed: invalid s");let y=(0,n.Id)(c,u.toBytes(h));return(0,n.DO)(y,E.signature,"result")},verify:function(e,r,o){let a,l,u,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:m,{context:d,zip215:h}=c,y=E.signature;e=(0,n.DO)(e,y,"signature"),r=(0,n.DO)(r,void 0,"message"),o=(0,n.DO)(o,E.publicKey,"publicKey"),void 0!==h&&(0,s.e8)(h,"zip215"),i&&(r=i(r));let p=y/2,g=e.subarray(0,p),v=(0,s.lX)(e.subarray(p,y));try{a=t.fromBytes(o,h),l=t.fromBytes(g,h),u=f.multiplyUnsafe(v)}catch(t){return!1}if(!h&&a.isSmallOrder())return!1;let x=B(d,l.toBytes(),a.toBytes(),r);return l.add(a.multiplyUnsafe(x)).subtract(u).clearCofactor().is0()},utils:{getExtendedPublicKey:p,randomSecretKey:x,isValidSecretKey:function(t){return(0,n.aY)(t)&&t.length===u.BYTES},isValidPublicKey:function(e,r){try{return!!t.fromBytes(e,r)}catch(t){return!1}},toMontgomery(e){let{y:r}=t.fromBytes(e),i=E.publicKey,f=32===i;if(!f&&57!==i)throw Error("only defined for 25519 and 448");let n=f?a.div(l+r,l-r):a.div(r-l,r+l);return a.toBytes(n)},toMontgomerySecret(t){let r=E.secretKey;return(0,n.DO)(t,r),d(e(t.subarray(0,r))).subarray(0,r)}},Point:t,lengths:E})}(b,f.Zf,Object.assign({adjustScalarBytes:function(t){return t[0]&=248,t[31]&=127,t[31]|=64,t}},i)));f.Zf;let z=BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235"),A=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),Z=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),H=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952"),R=t=>w(p,t),T=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");class K extends d{static fromAffine(t){return new K(b.fromAffine(t))}assertSame(t){if(!(t instanceof K))throw Error("RistrettoPoint expected")}init(t){return new K(t)}static fromBytes(t){let e;(0,n.DO)(t,32);let{a:r,d:i}=E,f=t=>I.create(t),o=(e=t,I.create((0,s.lX)(e)&T));if(!(0,s.ex)(I.toBytes(o),t)||(0,h.dQ)(o,v))throw Error("invalid ristretto255 encoding 1");let a=f(o*o),l=f(p+r*a),u=f(p-r*a),c=f(l*l),d=f(u*u),g=f(r*i*c-d),{isValid:B,value:m}=R(f(g*d)),x=f(m*u),w=f(m*x*g),O=f((o+o)*x);(0,h.dQ)(O,v)&&(O=f(-O));let S=f(l*w),z=f(O*S);if(!B||(0,h.dQ)(z,v)||S===y)throw Error("invalid ristretto255 encoding 2");return new K(new b(O,S,p,z))}static fromHex(t){return K.fromBytes((0,n.aT)(t))}toBytes(){let t,{X:e,Y:r,Z:i,T:f}=this.ep,n=t=>I.create(t),s=n(n(i+r)*n(i-r)),o=n(e*r),a=n(o*o),{value:l}=R(n(s*a)),u=n(l*s),c=n(l*o),d=n(u*c*f);if((0,h.dQ)(f*d,v)){let i=n(r*x),f=n(e*x);e=i,r=f,t=n(u*A)}else t=c;(0,h.dQ)(e*d,v)&&(r=n(-r));let y=n((i-r)*t);return(0,h.dQ)(y,v)&&(y=n(-y)),I.toBytes(y)}
1equals(t){this.assertSame(t);let{X:e,Y:r}=this.ep,{X:i,Y:f}=t.ep,n=t=>I.create(t),s=n(e*f)===n(r*i),o=n(r*f)===n(e*i);return s||o}is0(){return this.equals(K.ZERO)}constructor(t){super(t)}}K.BASE=new K(b.BASE),K.ZERO=new K(b.ZERO),K.Fp=I,K.Fn=O}}]);

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.