UNPKG

avo-inspector

Version:

[![npm version](https://badge.fury.io/js/avo-inspector.svg)](https://badge.fury.io/js/avo-inspector)

2 lines 115 kB
/*! For license information please see index.js.LICENSE.txt */ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,()=>(()=>{"use strict";var e={54:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.p521_hasher=t.secp521r1=t.secp384r1=t.secp256r1=t.p521=t.p384_hasher=t.p384=t.p256_hasher=t.p256=void 0;const r=n(76),o=n(562),s=n(761),i=n(967),a=n(705),c={p:BigInt("0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff"),n:BigInt("0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551"),h:BigInt(1),a:BigInt("0xffffffff00000001000000000000000000000000fffffffffffffffffffffffc"),b:BigInt("0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b"),Gx:BigInt("0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296"),Gy:BigInt("0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5")},f={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff"),n:BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973"),h:BigInt(1),a:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000fffffffc"),b:BigInt("0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef"),Gx:BigInt("0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7"),Gy:BigInt("0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f")},u={p:BigInt("0x1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),n:BigInt("0x01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386409"),h:BigInt(1),a:BigInt("0x1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc"),b:BigInt("0x0051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00"),Gx:BigInt("0x00c6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66"),Gy:BigInt("0x011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650")},l=(0,i.Field)(c.p),h=(0,i.Field)(f.p),d=(0,i.Field)(u.p);function p(e,t){const n=(0,a.mapToCurveSimpleSWU)(e.Fp,t);return e=>n(e[0])}t.p256=(0,o.createCurve)({...c,Fp:l,lowS:!1},r.sha256),t.p256_hasher=(0,s.createHasher)(t.p256.Point,p(t.p256.Point,{A:c.a,B:c.b,Z:t.p256.Point.Fp.create(BigInt("-10"))}),{DST:"P256_XMD:SHA-256_SSWU_RO_",encodeDST:"P256_XMD:SHA-256_SSWU_NU_",p:c.p,m:1,k:128,expand:"xmd",hash:r.sha256}),t.p384=(0,o.createCurve)({...f,Fp:h,lowS:!1},r.sha384),t.p384_hasher=(0,s.createHasher)(t.p384.Point,p(t.p384.Point,{A:f.a,B:f.b,Z:t.p384.Point.Fp.create(BigInt("-12"))}),{DST:"P384_XMD:SHA-384_SSWU_RO_",encodeDST:"P384_XMD:SHA-384_SSWU_NU_",p:f.p,m:1,k:192,expand:"xmd",hash:r.sha384}),t.p521=(0,o.createCurve)({...u,Fp:d,lowS:!1,allowedPrivateKeyLengths:[130,131,132]},r.sha512),t.secp256r1=t.p256,t.secp384r1=t.p384,t.secp521r1=t.p521,t.p521_hasher=(0,s.createHasher)(t.p521.Point,p(t.p521.Point,{A:u.a,B:u.b,Z:t.p521.Point.Fp.create(BigInt("-4"))}),{DST:"P521_XMD:SHA-512_SSWU_RO_",encodeDST:"P521_XMD:SHA-512_SSWU_NU_",p:u.p,m:1,k:256,expand:"xmd",hash:r.sha512})},76:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.sha512_224=t.sha512_256=t.sha384=t.sha512=t.sha224=t.sha256=t.SHA512_256=t.SHA512_224=t.SHA384=t.SHA512=t.SHA224=t.SHA256=void 0;const r=n(202),o=n(318),s=n(175),i=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]),a=new Uint32Array(64);class c extends r.HashMD{constructor(e=32){super(64,e,8,!1),this.A=0|r.SHA256_IV[0],this.B=0|r.SHA256_IV[1],this.C=0|r.SHA256_IV[2],this.D=0|r.SHA256_IV[3],this.E=0|r.SHA256_IV[4],this.F=0|r.SHA256_IV[5],this.G=0|r.SHA256_IV[6],this.H=0|r.SHA256_IV[7]}get(){const{A:e,B:t,C:n,D:r,E:o,F:s,G:i,H:a}=this;return[e,t,n,r,o,s,i,a]}set(e,t,n,r,o,s,i,a){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|o,this.F=0|s,this.G=0|i,this.H=0|a}process(e,t){for(let n=0;n<16;n++,t+=4)a[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=a[e-15],n=a[e-2],r=(0,s.rotr)(t,7)^(0,s.rotr)(t,18)^t>>>3,o=(0,s.rotr)(n,17)^(0,s.rotr)(n,19)^n>>>10;a[e]=o+a[e-7]+r+a[e-16]|0}let{A:n,B:o,C:c,D:f,E:u,F:l,G:h,H:d}=this;for(let e=0;e<64;e++){const t=d+((0,s.rotr)(u,6)^(0,s.rotr)(u,11)^(0,s.rotr)(u,25))+(0,r.Chi)(u,l,h)+i[e]+a[e]|0,p=((0,s.rotr)(n,2)^(0,s.rotr)(n,13)^(0,s.rotr)(n,22))+(0,r.Maj)(n,o,c)|0;d=h,h=l,l=u,u=f+t|0,f=c,c=o,o=n,n=t+p|0}n=n+this.A|0,o=o+this.B|0,c=c+this.C|0,f=f+this.D|0,u=u+this.E|0,l=l+this.F|0,h=h+this.G|0,d=d+this.H|0,this.set(n,o,c,f,u,l,h,d)}roundClean(){(0,s.clean)(a)}destroy(){this.set(0,0,0,0,0,0,0,0),(0,s.clean)(this.buffer)}}t.SHA256=c;class f extends c{constructor(){super(28),this.A=0|r.SHA224_IV[0],this.B=0|r.SHA224_IV[1],this.C=0|r.SHA224_IV[2],this.D=0|r.SHA224_IV[3],this.E=0|r.SHA224_IV[4],this.F=0|r.SHA224_IV[5],this.G=0|r.SHA224_IV[6],this.H=0|r.SHA224_IV[7]}}t.SHA224=f;const u=(()=>o.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))))(),l=(()=>u[0])(),h=(()=>u[1])(),d=new Uint32Array(80),p=new Uint32Array(80);class v extends r.HashMD{constructor(e=64){super(128,e,16,!1),this.Ah=0|r.SHA512_IV[0],this.Al=0|r.SHA512_IV[1],this.Bh=0|r.SHA512_IV[2],this.Bl=0|r.SHA512_IV[3],this.Ch=0|r.SHA512_IV[4],this.Cl=0|r.SHA512_IV[5],this.Dh=0|r.SHA512_IV[6],this.Dl=0|r.SHA512_IV[7],this.Eh=0|r.SHA512_IV[8],this.El=0|r.SHA512_IV[9],this.Fh=0|r.SHA512_IV[10],this.Fl=0|r.SHA512_IV[11],this.Gh=0|r.SHA512_IV[12],this.Gl=0|r.SHA512_IV[13],this.Hh=0|r.SHA512_IV[14],this.Hl=0|r.SHA512_IV[15]}get(){const{Ah:e,Al:t,Bh:n,Bl:r,Ch:o,Cl:s,Dh:i,Dl:a,Eh:c,El:f,Fh:u,Fl:l,Gh:h,Gl:d,Hh:p,Hl:v}=this;return[e,t,n,r,o,s,i,a,c,f,u,l,h,d,p,v]}set(e,t,n,r,o,s,i,a,c,f,u,l,h,d,p,v){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|r,this.Ch=0|o,this.Cl=0|s,this.Dh=0|i,this.Dl=0|a,this.Eh=0|c,this.El=0|f,this.Fh=0|u,this.Fl=0|l,this.Gh=0|h,this.Gl=0|d,this.Hh=0|p,this.Hl=0|v}process(e,t){for(let n=0;n<16;n++,t+=4)d[n]=e.getUint32(t),p[n]=e.getUint32(t+=4);for(let e=16;e<80;e++){const t=0|d[e-15],n=0|p[e-15],r=o.rotrSH(t,n,1)^o.rotrSH(t,n,8)^o.shrSH(t,n,7),s=o.rotrSL(t,n,1)^o.rotrSL(t,n,8)^o.shrSL(t,n,7),i=0|d[e-2],a=0|p[e-2],c=o.rotrSH(i,a,19)^o.rotrBH(i,a,61)^o.shrSH(i,a,6),f=o.rotrSL(i,a,19)^o.rotrBL(i,a,61)^o.shrSL(i,a,6),u=o.add4L(s,f,p[e-7],p[e-16]),l=o.add4H(u,r,c,d[e-7],d[e-16]);d[e]=0|l,p[e]=0|u}let{Ah:n,Al:r,Bh:s,Bl:i,Ch:a,Cl:c,Dh:f,Dl:u,Eh:v,El:y,Fh:g,Fl:b,Gh:m,Gl:w,Hh:E,Hl:S}=this;for(let e=0;e<80;e++){const t=o.rotrSH(v,y,14)^o.rotrSH(v,y,18)^o.rotrBH(v,y,41),I=o.rotrSL(v,y,14)^o.rotrSL(v,y,18)^o.rotrBL(v,y,41),A=v&g^~v&m,x=y&b^~y&w,B=o.add5L(S,I,x,h[e],p[e]),_=o.add5H(B,E,t,A,l[e],d[e]),O=0|B,H=o.rotrSH(n,r,28)^o.rotrBH(n,r,34)^o.rotrBH(n,r,39),P=o.rotrSL(n,r,28)^o.rotrBL(n,r,34)^o.rotrBL(n,r,39),T=n&s^n&a^s&a,V=r&i^r&c^i&c;E=0|m,S=0|w,m=0|g,w=0|b,g=0|v,b=0|y,({h:v,l:y}=o.add(0|f,0|u,0|_,0|O)),f=0|a,u=0|c,a=0|s,c=0|i,s=0|n,i=0|r;const L=o.add3L(O,P,V);n=o.add3H(L,_,H,T),r=0|L}({h:n,l:r}=o.add(0|this.Ah,0|this.Al,0|n,0|r)),({h:s,l:i}=o.add(0|this.Bh,0|this.Bl,0|s,0|i)),({h:a,l:c}=o.add(0|this.Ch,0|this.Cl,0|a,0|c)),({h:f,l:u}=o.add(0|this.Dh,0|this.Dl,0|f,0|u)),({h:v,l:y}=o.add(0|this.Eh,0|this.El,0|v,0|y)),({h:g,l:b}=o.add(0|this.Fh,0|this.Fl,0|g,0|b)),({h:m,l:w}=o.add(0|this.Gh,0|this.Gl,0|m,0|w)),({h:E,l:S}=o.add(0|this.Hh,0|this.Hl,0|E,0|S)),this.set(n,r,s,i,a,c,f,u,v,y,g,b,m,w,E,S)}roundClean(){(0,s.clean)(d,p)}destroy(){(0,s.clean)(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}t.SHA512=v;class y extends v{constructor(){super(48),this.Ah=0|r.SHA384_IV[0],this.Al=0|r.SHA384_IV[1],this.Bh=0|r.SHA384_IV[2],this.Bl=0|r.SHA384_IV[3],this.Ch=0|r.SHA384_IV[4],this.Cl=0|r.SHA384_IV[5],this.Dh=0|r.SHA384_IV[6],this.Dl=0|r.SHA384_IV[7],this.Eh=0|r.SHA384_IV[8],this.El=0|r.SHA384_IV[9],this.Fh=0|r.SHA384_IV[10],this.Fl=0|r.SHA384_IV[11],this.Gh=0|r.SHA384_IV[12],this.Gl=0|r.SHA384_IV[13],this.Hh=0|r.SHA384_IV[14],this.Hl=0|r.SHA384_IV[15]}}t.SHA384=y;const g=Uint32Array.from([2352822216,424955298,1944164710,2312950998,502970286,855612546,1738396948,1479516111,258812777,2077511080,2011393907,79989058,1067287976,1780299464,286451373,2446758561]),b=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);class m extends v{constructor(){super(28),this.Ah=0|g[0],this.Al=0|g[1],this.Bh=0|g[2],this.Bl=0|g[3],this.Ch=0|g[4],this.Cl=0|g[5],this.Dh=0|g[6],this.Dl=0|g[7],this.Eh=0|g[8],this.El=0|g[9],this.Fh=0|g[10],this.Fl=0|g[11],this.Gh=0|g[12],this.Gl=0|g[13],this.Hh=0|g[14],this.Hl=0|g[15]}}t.SHA512_224=m;class w extends v{constructor(){super(32),this.Ah=0|b[0],this.Al=0|b[1],this.Bh=0|b[2],this.Bl=0|b[3],this.Ch=0|b[4],this.Cl=0|b[5],this.Dh=0|b[6],this.Dl=0|b[7],this.Eh=0|b[8],this.El=0|b[9],this.Fh=0|b[10],this.Fl=0|b[11],this.Gh=0|b[12],this.Gl=0|b[13],this.Hh=0|b[14],this.Hl=0|b[15]}}t.SHA512_256=w,t.sha256=(0,s.createHasher)(()=>new c),t.sha224=(0,s.createHasher)(()=>new f),t.sha512=(0,s.createHasher)(()=>new v),t.sha384=(0,s.createHasher)(()=>new y),t.sha512_256=(0,s.createHasher)(()=>new w),t.sha512_224=(0,s.createHasher)(()=>new m)},145:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},175:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.wrapXOFConstructorWithOpts=t.wrapConstructorWithOpts=t.wrapConstructor=t.Hash=t.nextTick=t.swap32IfBE=t.byteSwapIfBE=t.swap8IfBE=t.isLE=void 0,t.isBytes=o,t.anumber=s,t.abytes=i,t.ahash=function(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.createHasher");s(e.outputLen),s(e.blockLen)},t.aexists=function(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")},t.aoutput=function(e,t){i(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)},t.u8=function(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)},t.u32=function(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))},t.clean=function(...e){for(let t=0;t<e.length;t++)e[t].fill(0)},t.createView=function(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)},t.rotr=function(e,t){return e<<32-t|e>>>t},t.rotl=function(e,t){return e<<t|e>>>32-t>>>0},t.byteSwap=a,t.byteSwap32=c,t.bytesToHex=function(e){if(i(e),f)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=u[e[n]];return t},t.hexToBytes=function(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);if(f)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let t=0,o=0;t<n;t++,o+=2){const n=h(e.charCodeAt(o)),s=h(e.charCodeAt(o+1));if(void 0===n||void 0===s){const t=e[o]+e[o+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+o)}r[t]=16*n+s}return r},t.asyncLoop=async function(e,n,r){let o=Date.now();for(let s=0;s<e;s++){r(s);const e=Date.now()-o;e>=0&&e<n||(await(0,t.nextTick)(),o+=e)}},t.utf8ToBytes=d,t.bytesToUtf8=function(e){return(new TextDecoder).decode(e)},t.toBytes=p,t.kdfInputToBytes=function(e){return"string"==typeof e&&(e=d(e)),i(e),e},t.concatBytes=function(...e){let t=0;for(let n=0;n<e.length;n++){const r=e[n];i(r),t+=r.length}const n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){const o=e[t];n.set(o,r),r+=o.length}return n},t.checkOpts=function(e,t){if(void 0!==t&&"[object Object]"!=={}.toString.call(t))throw new Error("options should be object or undefined");return Object.assign(e,t)},t.createHasher=v,t.createOptHasher=y,t.createXOFer=g,t.randomBytes=function(e=32){if(r.crypto&&"function"==typeof r.crypto.getRandomValues)return r.crypto.getRandomValues(new Uint8Array(e));if(r.crypto&&"function"==typeof r.crypto.randomBytes)return Uint8Array.from(r.crypto.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")};const r=n(145);function o(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function s(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function i(e,...t){if(!o(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function a(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function c(e){for(let t=0;t<e.length;t++)e[t]=a(e[t]);return e}t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],t.swap8IfBE=t.isLE?e=>e:e=>a(e),t.byteSwapIfBE=t.swap8IfBE,t.swap32IfBE=t.isLE?e=>e:c;const f=(()=>"function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex)(),u=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0")),l={_0:48,_9:57,A:65,F:70,a:97,f:102};function h(e){return e>=l._0&&e<=l._9?e-l._0:e>=l.A&&e<=l.F?e-(l.A-10):e>=l.a&&e<=l.f?e-(l.a-10):void 0}function d(e){if("string"!=typeof e)throw new Error("string expected");return new Uint8Array((new TextEncoder).encode(e))}function p(e){return"string"==typeof e&&(e=d(e)),i(e),e}function v(e){const t=t=>e().update(p(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function y(e){const t=(t,n)=>e(n).update(p(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t}function g(e){const t=(t,n)=>e(n).update(p(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t}t.nextTick=async()=>{},t.Hash=class{},t.wrapConstructor=v,t.wrapConstructorWithOpts=y,t.wrapXOFConstructorWithOpts=g},185:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isValueEmpty=void 0,t.deepEquals=function e(t,n){if(t===n)return!0;if(!(t instanceof Object&&n instanceof Object))return!1;if(t.constructor!==n.constructor)return!1;for(var r in t)if(t.hasOwnProperty(r)){if(!n.hasOwnProperty(r))return!1;if(t[r]!==n[r]){if("object"!=typeof t[r])return!1;if(!e(t[r],n[r]))return!1}}for(r in n)if(n.hasOwnProperty(r)&&!t.hasOwnProperty(r))return!1;return!0},t.isValueEmpty=function(e){return null==e||0==e.trim().length}},190:function(e,t){var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,s){function i(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(i,a)}c((r=r.apply(e,t||[])).next())})},r=this&&this.__generator||function(e,t){var n,r,o,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=a(0),i.throw=a(1),i.return=a(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){s.label=a[1];break}if(6===a[0]&&s.label<o[1]){s.label=o[1],o=a;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(a);break}o[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.AvoEventSpecFetcher=void 0;var o=function(){function e(e,t,n,r){void 0===e&&(e=2e3),void 0===t&&(t=!1),void 0===r&&(r="https://api.avo.app"),this.baseUrl=r,this.timeout=e,this.shouldLog=t,this.env=n,this.inFlightRequests=new Map}return e.prototype.generateRequestKey=function(e){return"".concat(e.streamId,":").concat(e.eventName)},e.prototype.fetch=function(e){return n(this,void 0,void 0,function(){var t,n,o;return r(this,function(r){switch(r.label){case 0:if(t=this.generateRequestKey(e),n=this.inFlightRequests.get(t))return[2,n];o=this.fetchInternal(e),this.inFlightRequests.set(t,o),r.label=1;case 1:return r.trys.push([1,,3,4]),[4,o];case 2:return[2,r.sent()];case 3:return this.inFlightRequests.delete(t),[7];case 4:return[2]}})})},e.prototype.fetchInternal=function(t){return n(this,void 0,void 0,function(){var n,o,s;return r(this,function(r){switch(r.label){case 0:if("dev"!==this.env&&"staging"!==this.env)return[2,null];n=this.buildUrl(t),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.makeRequest(n)];case 2:return(o=r.sent())?this.hasExpectedShape(o)?[2,e.parseEventSpecResponse(o)]:(this.shouldLog&&console.warn("[Avo Inspector] Invalid event spec response for: ".concat(t.eventName)),[2,null]):(this.shouldLog&&console.warn("[Avo Inspector] Failed to fetch event spec for: ".concat(t.eventName)),[2,null]);case 3:return s=r.sent(),this.shouldLog&&console.error("[Avo Inspector] Error fetching event spec for: ".concat(t.eventName),s),[2,null];case 4:return[2]}})})},e.prototype.buildUrl=function(e){var t=new URLSearchParams({apiKey:e.apiKey,streamId:e.streamId,eventName:e.eventName});return"".concat(this.baseUrl,"/trackingPlan/eventSpec?").concat(t.toString())},e.prototype.makeRequest=function(e){var t=this;return new Promise(function(n){var r=new XMLHttpRequest;r.open("GET",e,!0),r.timeout=t.timeout,r.onload=function(){if(200===r.status)try{var e=JSON.parse(r.responseText);n(e)}catch(e){t.shouldLog&&console.error("[Avo Inspector] Failed to parse response:",e),n(null)}else t.shouldLog&&console.warn("[Avo Inspector] Request failed with status: ".concat(r.status)),n(null)},r.onerror=function(){t.shouldLog&&console.error("[Avo Inspector] Network error occurred"),n(null)},r.ontimeout=function(){t.shouldLog&&console.error("[Avo Inspector] Request timed out after ".concat(t.timeout,"ms")),n(null)},r.send()})},e.prototype.hasExpectedShape=function(e){return e&&"object"==typeof e&&Array.isArray(e.events)&&e.metadata&&"object"==typeof e.metadata&&"string"==typeof e.metadata.schemaId&&"string"==typeof e.metadata.branchId&&"string"==typeof e.metadata.latestActionId},e.parseEventSpecResponse=function(t){return{events:t.events.map(e.parseEventSpecEntry),metadata:t.metadata}},e.parseEventSpecEntry=function(t){for(var n={},r=0,o=Object.entries(t.p);r<o.length;r++){var s=o[r],i=Reflect.get(s,"0"),a=Reflect.get(s,"1");Reflect.set(n,i,e.parsePropertyConstraints(a))}return{branchId:t.b,baseEventId:t.id,variantIds:t.vids,props:n}},e.parsePropertyConstraints=function(t){var n={type:t.t,required:t.r};if(t.l&&(n.isList=t.l),t.p&&(n.pinnedValues=t.p),t.v&&(n.allowedValues=t.v),t.rx&&(n.regexPatterns=t.rx),t.minmax&&(n.minMaxRanges=t.minmax),t.children){n.children={};for(var r=0,o=Object.entries(t.children);r<o.length;r++){var s=o[r],i=s[0],a=s[1];n.children[i]=e.parsePropertyConstraints(a)}}return n},e}();t.AvoEventSpecFetcher=o},202:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SHA512_IV=t.SHA384_IV=t.SHA224_IV=t.SHA256_IV=t.HashMD=void 0,t.setBigUint64=o,t.Chi=function(e,t,n){return e&t^~e&n},t.Maj=function(e,t,n){return e&t^e&n^t&n};const r=n(175);function o(e,t,n,r){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,n,r);const o=BigInt(32),s=BigInt(4294967295),i=Number(n>>o&s),a=Number(n&s),c=r?4:0,f=r?0:4;e.setUint32(t+c,i,r),e.setUint32(t+f,a,r)}class s extends r.Hash{constructor(e,t,n,o){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=o,this.buffer=new Uint8Array(e),this.view=(0,r.createView)(this.buffer)}update(e){(0,r.aexists)(this),e=(0,r.toBytes)(e),(0,r.abytes)(e);const{view:t,buffer:n,blockLen:o}=this,s=e.length;for(let i=0;i<s;){const a=Math.min(o-this.pos,s-i);if(a===o){const t=(0,r.createView)(e);for(;o<=s-i;i+=o)this.process(t,i);continue}n.set(e.subarray(i,i+a),this.pos),this.pos+=a,i+=a,this.pos===o&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,r.aexists)(this),(0,r.aoutput)(e,this),this.finished=!0;const{buffer:t,view:n,blockLen:s,isLE:i}=this;let{pos:a}=this;t[a++]=128,(0,r.clean)(this.buffer.subarray(a)),this.padOffset>s-a&&(this.process(n,0),a=0);for(let e=a;e<s;e++)t[e]=0;o(n,s-8,BigInt(8*this.length),i),this.process(n,0);const c=(0,r.createView)(e),f=this.outputLen;if(f%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=f/4,l=this.get();if(u>l.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<u;e++)c.setUint32(4*e,l[e],i)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:n,length:r,finished:o,destroyed:s,pos:i}=this;return e.destroyed=s,e.finished=o,e.length=r,e.pos=i,r%t&&e.buffer.set(n),e}clone(){return this._cloneInto()}}t.HashMD=s,t.SHA256_IV=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),t.SHA224_IV=Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),t.SHA384_IV=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),t.SHA512_IV=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209])},243:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AvoNetworkCallsHandler=void 0;var r=n(249),o=n(611),s=n(829),i=function(){function e(e,t,n,r,o,s){this.samplingRate=1,this.sending=!1,this.apiKey=e,this.envName=t,this.appName=n,this.appVersion=r,this.libVersion=o,this.publicEncryptionKey=s}return e.prototype.callInspectorWithBatchBody=function(e,t){var n=this;if(this.sending)t(new Error("Batch sending cancelled because another batch sending is in progress. Your events will be sent with next batch."));else{var r=e.filter(function(e){return null!=e});this.fixStreamIds(r),0!==r.length&&(this.shouldDropBySampling()?o.AvoInspector.shouldLog&&console.log("Avo Inspector: last event schema dropped due to sampling rate."):(o.AvoInspector.shouldLog&&(console.log("Avo Inspector: events",r),r.forEach(function(e){"sessionStarted"===e.type?console.log("Avo Inspector: sending session started event."):"event"===e.type&&console.log("Avo Inspector: sending event "+e.eventName+" with schema "+JSON.stringify(e.eventProperties))})),this.sending=!0,this.callInspectorApi(r,function(e){n.sending=!1,t(e)})))}},e.prototype.fixStreamIds=function(e){var t=null;e.forEach(function(e){null!==e.streamId&&void 0!==e.streamId&&"unknown"!==e.streamId&&(t=e.streamId)}),e.forEach(function(e){"unknown"===e.streamId&&(e.streamId=null!=t?t:s.AvoStreamId.streamId)})},e.prototype.bodyForSessionStartedCall=function(){var e=this.createBaseCallBody();return e.type="sessionStarted",e},e.prototype.bodyForEventSchemaCall=function(e,t,n,r,o,s){var i=this.createBaseCallBody();return i.type="event",i.eventName=e,i.eventProperties=t,null!=n?(i.avoFunction=!0,i.eventId=n,i.eventHash=r):(i.avoFunction=!1,i.eventId=null,i.eventHash=null),o&&(i.eventSpecMetadata=o),s&&(i.validatedBranchId=s),i},e.prototype.createBaseCallBody=function(){var e={apiKey:this.apiKey,appName:this.appName,appVersion:this.appVersion,libVersion:this.libVersion,env:this.envName,libPlatform:"web",messageId:r.default.newGuid(),trackingId:"",createdAt:(new Date).toISOString(),sessionId:"",streamId:s.AvoStreamId.streamId,samplingRate:this.samplingRate};return this.publicEncryptionKey&&(e.publicEncryptionKey=this.publicEncryptionKey),e},e.prototype.callInspectorImmediately=function(e,t){"unknown"===e.streamId&&(e.streamId=s.AvoStreamId.streamId),o.AvoInspector.shouldLog&&(console.log("Avo Inspector: calling inspector immediately (with validation)",e.eventName),console.log("Avo Inspector: event body",e)),this.callInspectorApi([e],t)},e.prototype.shouldDropBySampling=function(){return Math.random()>this.samplingRate},e.prototype.callInspectorApi=function(t,n){var r=this,s=new XMLHttpRequest;s.open("POST",e.trackingEndpoint,!0),s.setRequestHeader("Content-Type","text/plain"),s.timeout=o.AvoInspector.networkTimeout,s.send(JSON.stringify(t)),s.onload=function(){if(200!==s.status)n(new Error("Error ".concat(s.status,": ").concat(s.statusText)));else{var e=void 0;try{e=JSON.parse(s.response)}catch(e){return void n(new Error("Failed to parse response: ".concat(e instanceof Error?e.message:String(e))))}null==e||"number"!=typeof e.samplingRate||isNaN(e.samplingRate)||(r.samplingRate=e.samplingRate),n(null)}},s.onerror=function(){n(new Error("Request failed"))},s.ontimeout=function(){n(new Error("Request timed out"))}},e.trackingEndpoint="https://api.avo.app/inspector/v1/track",e}();t.AvoNetworkCallsHandler=i},249:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},e}();t.default=n},318:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toBig=t.shrSL=t.shrSH=t.rotrSL=t.rotrSH=t.rotrBL=t.rotrBH=t.rotr32L=t.rotr32H=t.rotlSL=t.rotlSH=t.rotlBL=t.rotlBH=t.add5L=t.add5H=t.add4L=t.add4H=t.add3L=t.add3H=void 0,t.add=m,t.fromBig=o,t.split=s;const n=BigInt(2**32-1),r=BigInt(32);function o(e,t=!1){return t?{h:Number(e&n),l:Number(e>>r&n)}:{h:0|Number(e>>r&n),l:0|Number(e&n)}}function s(e,t=!1){const n=e.length;let r=new Uint32Array(n),s=new Uint32Array(n);for(let i=0;i<n;i++){const{h:n,l:a}=o(e[i],t);[r[i],s[i]]=[n,a]}return[r,s]}const i=(e,t)=>BigInt(e>>>0)<<r|BigInt(t>>>0);t.toBig=i;const a=(e,t,n)=>e>>>n;t.shrSH=a;const c=(e,t,n)=>e<<32-n|t>>>n;t.shrSL=c;const f=(e,t,n)=>e>>>n|t<<32-n;t.rotrSH=f;const u=(e,t,n)=>e<<32-n|t>>>n;t.rotrSL=u;const l=(e,t,n)=>e<<64-n|t>>>n-32;t.rotrBH=l;const h=(e,t,n)=>e>>>n-32|t<<64-n;t.rotrBL=h;const d=(e,t)=>t;t.rotr32H=d;const p=(e,t)=>e;t.rotr32L=p;const v=(e,t,n)=>e<<n|t>>>32-n;t.rotlSH=v;const y=(e,t,n)=>t<<n|e>>>32-n;t.rotlSL=y;const g=(e,t,n)=>t<<n-32|e>>>64-n;t.rotlBH=g;const b=(e,t,n)=>e<<n-32|t>>>64-n;function m(e,t,n,r){const o=(t>>>0)+(r>>>0);return{h:e+n+(o/2**32|0)|0,l:0|o}}t.rotlBL=b;const w=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0);t.add3L=w;const E=(e,t,n,r)=>t+n+r+(e/2**32|0)|0;t.add3H=E;const S=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0);t.add4L=S;const I=(e,t,n,r,o)=>t+n+r+o+(e/2**32|0)|0;t.add4H=I;const A=(e,t,n,r,o)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(o>>>0);t.add5L=A;const x=(e,t,n,r,o,s)=>t+n+r+o+s+(e/2**32|0)|0;t.add5H=x;const B={fromBig:o,split:s,toBig:i,shrSH:a,shrSL:c,rotrSH:f,rotrSL:u,rotrBH:l,rotrBL:h,rotr32H:d,rotr32L:p,rotlSH:v,rotlSL:y,rotlBH:g,rotlBL:b,add:m,add3L:w,add3H:E,add4L:S,add4H:I,add5H:x,add5L:A};t.default=B},330:e=>{e.exports={rE:"3.0.1"}},422:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.wNAF=void 0,t.negateCt=a,t.normalizeZ=function(e,t){const n=(0,o.FpInvertBatch)(e.Fp,t.map(e=>e.Z));return t.map((t,r)=>e.fromAffine(t.toAffine(n[r])))},t.mulEndoUnsafe=function(e,t,n,r){let o=t,a=e.ZERO,c=e.ZERO;for(;n>s||r>s;)n&i&&(a=a.add(o)),r&i&&(c=c.add(o)),o=o.double(),n>>=i,r>>=i;return{p1:a,p2:c}},t.pippenger=function(e,t,n,o){l(n,e),h(o,t);const s=n.length,i=o.length;if(s!==i)throw new Error("arrays of points and scalars must have equal length");const a=e.ZERO,c=(0,r.bitLen)(BigInt(s));let f=1;c>12?f=c-3:c>4?f=c-2:c>0&&(f=2);const u=(0,r.bitMask)(f),d=new Array(Number(u)+1).fill(a);let p=a;for(let e=Math.floor((t.BITS-1)/f)*f;e>=0;e-=f){d.fill(a);for(let t=0;t<i;t++){const r=o[t],s=Number(r>>BigInt(e)&u);d[s]=d[s].add(n[t])}let t=a;for(let e=d.length-1,n=a;e>0;e--)n=n.add(d[e]),t=t.add(n);if(p=p.add(t),0!==e)for(let e=0;e<f;e++)p=p.double()}return p},t.precomputeMSMUnsafe=function(e,t,n,o){c(o,t.BITS),l(n,e);const s=e.ZERO,i=2**o-1,a=Math.ceil(t.BITS/o),f=(0,r.bitMask)(o),u=n.map(e=>{const t=[];for(let n=0,r=e;n<i;n++)t.push(r),r=r.add(e);return t});return e=>{if(h(e,t),e.length>n.length)throw new Error("array of scalars must be smaller than array of points");let r=s;for(let t=0;t<a;t++){if(r!==s)for(let e=0;e<o;e++)r=r.double();const n=BigInt(a*o-(t+1)*o);for(let t=0;t<e.length;t++){const o=e[t],s=Number(o>>n&f);s&&(r=r.add(u[t][s-1]))}}return r}},t.validateBasic=function(e){return(0,o.validateField)(e.Fp),(0,r.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,o.nLength)(e.n,e.nBitLength),...e,p:e.Fp.ORDER})},t._createCurveFields=function(e,t,n={},r){if(void 0===r&&(r="edwards"===e),!t||"object"!=typeof t)throw new Error(`expected valid ${e} CURVE object`);for(const e of["p","n","h"]){const n=t[e];if(!("bigint"==typeof n&&n>s))throw new Error(`CURVE.${e} must be positive bigint`)}const o=g(t.p,n.Fp,r),i=g(t.n,n.Fn,r),a=["Gx","Gy","a","weierstrass"===e?"b":"d"];for(const e of a)if(!o.isValid(t[e]))throw new Error(`CURVE.${e} must be valid field element of CURVE.Fp`);return{CURVE:t=Object.freeze(Object.assign({},t)),Fp:o,Fn:i}};const r=n(627),o=n(967),s=BigInt(0),i=BigInt(1);function a(e,t){const n=t.negate();return e?n:t}function c(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function f(e,t){c(e,t);const n=2**e;return{windows:Math.ceil(t/e)+1,windowSize:2**(e-1),mask:(0,r.bitMask)(e),maxNumber:n,shiftBy:BigInt(e)}}function u(e,t,n){const{windowSize:r,mask:o,maxNumber:s,shiftBy:a}=n;let c=Number(e&o),f=e>>a;c>r&&(c-=s,f+=i);const u=t*r;return{nextN:f,offset:u+Math.abs(c)-1,isZero:0===c,isNeg:c<0,isNegF:t%2!=0,offsetF:u}}function l(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((e,n)=>{if(!(e instanceof t))throw new Error("invalid point at index "+n)})}function h(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((e,n)=>{if(!t.isValid(e))throw new Error("invalid scalar at index "+n)})}const d=new WeakMap,p=new WeakMap;function v(e){return p.get(e)||1}function y(e){if(e!==s)throw new Error("invalid wNAF")}function g(e,t,n){if(t){if(t.ORDER!==e)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return(0,o.validateField)(t),t}return(0,o.Field)(e,{isLE:n})}t.wNAF=class{constructor(e,t){this.BASE=e.BASE,this.ZERO=e.ZERO,this.Fn=e.Fn,this.bits=t}_unsafeLadder(e,t,n=this.ZERO){let r=e;for(;t>s;)t&i&&(n=n.add(r)),r=r.double(),t>>=i;return n}precomputeWindow(e,t){const{windows:n,windowSize:r}=f(t,this.bits),o=[];let s=e,i=s;for(let e=0;e<n;e++){i=s,o.push(i);for(let e=1;e<r;e++)i=i.add(s),o.push(i);s=i.double()}return o}wNAF(e,t,n){if(!this.Fn.isValid(n))throw new Error("invalid scalar");let r=this.ZERO,o=this.BASE;const s=f(e,this.bits);for(let e=0;e<s.windows;e++){const{nextN:i,offset:c,isZero:f,isNeg:l,isNegF:h,offsetF:d}=u(n,e,s);n=i,f?o=o.add(a(h,t[d])):r=r.add(a(l,t[c]))}return y(n),{p:r,f:o}}wNAFUnsafe(e,t,n,r=this.ZERO){const o=f(e,this.bits);for(let e=0;e<o.windows&&n!==s;e++){const{nextN:s,offset:i,isZero:a,isNeg:c}=u(n,e,o);if(n=s,!a){const e=t[i];r=r.add(c?e.negate():e)}}return y(n),r}getPrecomputes(e,t,n){let r=d.get(t);return r||(r=this.precomputeWindow(t,e),1!==e&&("function"==typeof n&&(r=n(r)),d.set(t,r))),r}cached(e,t,n){const r=v(e);return this.wNAF(r,this.getPrecomputes(r,e,n),t)}unsafe(e,t,n,r){const o=v(e);return 1===o?this._unsafeLadder(e,t,r):this.wNAFUnsafe(o,this.getPrecomputes(o,e,n),t,r)}createCache(e,t){c(t,this.bits),p.set(e,t),d.delete(e)}hasCache(e){return 1!==v(e)}}},491:function(e,t){var n,r=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,s){function i(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(i,a)}c((r=r.apply(e,t||[])).next())})},s=this&&this.__generator||function(e,t){var n,r,o,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=a(0),i.throw=a(1),i.return=a(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){s.label=a[1];break}if(6===a[0]&&s.label<o[1]){s.label=o[1],o=a;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(a);break}o[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.AvoStorage=void 0;var i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.useFallbackStorage=!1,t.fallbackStorage={},t.storageInitialized=!1,t.onStorageInitFuncs=[],t.shouldLog=!1,t.suffix="",t}return r(t,e),t.prototype.init=function(e,t){this.shouldLog=e,this.suffix=t,this.initializeStorageWeb(this.isLocalStorageAvailable())},t.prototype.initializeStorageWeb=function(e){this.storageInitialized=!0,e||(this.useFallbackStorage=!0),this.onStorageInitFuncs.forEach(function(e){e()})},t.prototype.isLocalStorageAvailable=function(){var e=(new Date).toISOString();try{return window.localStorage.setItem(e,e),window.localStorage.getItem(e)===e&&(window.localStorage.removeItem(e),!0)}catch(e){return!1}},t.prototype.isInitialized=function(){return this.storageInitialized},t.prototype.getItemAsync=function(e){return o(this,void 0,void 0,function(){var t=this;return s(this,function(n){switch(n.label){case 0:return[4,new Promise(function(n,r){t.runAfterInit(function(){if(t.useFallbackStorage){var r=t.fallbackStorage[e+t.suffix];n(t.parseJson(r))}else if("undefined"!=typeof window){r=void 0;try{r=window.localStorage.getItem(e+t.suffix)}catch(e){t.shouldLog&&console.error("Avo Inspector Storage getItemAsync error:",e),n(null)}n(t.parseJson(r))}else n(null)})})];case 1:return[2,n.sent()]}})})},t.prototype.getItem=function(e){var t;if(this.storageInitialized){if(this.useFallbackStorage)t=this.fallbackStorage[e+this.suffix];else if("undefined"!=typeof window)try{t=window.localStorage.getItem(e+this.suffix)}catch(e){this.shouldLog&&console.error("Avo Inspector Storage getItem error:",e)}}else t=null;return this.parseJson(t)},t.prototype.setItem=function(e,t){var n=this;this.runAfterInit(function(){if(n.useFallbackStorage)n.fallbackStorage[e+n.suffix]=JSON.stringify(t);else if("undefined"!=typeof window)try{window.localStorage.setItem(e+n.suffix,JSON.stringify(t))}catch(e){n.shouldLog&&console.error("Avo Inspector Storage setItem error:",e)}})},t.prototype.removeItem=function(e){var t=this;this.runAfterInit(function(){if(t.useFallbackStorage)t.fallbackStorage[e+t.suffix]=null;else if("undefined"!=typeof window)try{window.localStorage.removeItem(e+t.suffix)}catch(e){t.shouldLog&&console.error("Avo Inspector Storage removeItem error:",e)}})},t.prototype.runAfterInit=function(e){this.storageInitialized?e():this.onStorageInitFuncs.push(e)},t}(function(){function e(){}return e.prototype.parseJson=function(e){return null!=e?JSON.parse(e):null},e}()),a=function(){function e(e,t){void 0===t&&(t=""),this.Platform=null,this.Platform="browser",this.storageImpl=new i,this.storageImpl.init(e,t)}return e.prototype.isInitialized=function(){return this.storageImpl.isInitialized()},e.prototype.getItemAsync=function(e){return o(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,this.storageImpl.getItemAsync(e)];case 1:return[2,t.sent()]}})})},e.prototype.getItem=function(e){return this.storageImpl.getItem(e)},e.prototype.setItem=function(e,t){this.storageImpl.setItem(e,t)},e.prototype.removeItem=function(e){this.storageImpl.removeItem(e)},e.prototype.runAfterInit=function(e){this.storageImpl.runAfterInit(e)},e}();t.AvoStorage=a},492:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,s){function i(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(i,a)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=a(0),i.throw=a(1),i.return=a(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){s.label=a[1];break}if(6===a[0]&&s.label<o[1]){s.label=o[1],o=a;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(a);break}o[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.AvoDeduplicator=void 0;var s=n(924),i=n(185),a=function(){function e(){this.avoFunctionsEvents={},this.manualEvents={},this.avoFunctionsEventsParams={},this.manualEventsParams={}}return e.prototype.shouldRegisterEvent=function(e,t,n){this.clearOldEvents(),n?(this.avoFunctionsEvents[Date.now()]=e,this.avoFunctionsEventsParams[e]=t):(this.manualEvents[Date.now()]=e,this.manualEventsParams[e]=t);var r=!n;return!this.hasSameEventAs(e,t,r)},e.prototype.hasSameEventAs=function(e,t,n){var r=!1;return n?this.lookForEventIn(e,t,this.avoFunctionsEventsParams)&&(r=!0):this.lookForEventIn(e,t,this.manualEventsParams)&&(r=!0),r&&(delete this.avoFunctionsEventsParams[e],delete this.manualEventsParams[e]),r},e.prototype.lookForEventIn=function(e,t,n){for(var r in n)if(n.hasOwnProperty(r)&&r===e){var o=n[e];if(o&&(0,i.deepEquals)(t,o))return!0}return!1},e.prototype.hasSeenEventParams=function(e,t){var n=!1;return t?this.lookForEventParamsIn(e,this.avoFunctionsEventsParams)&&(n=!0):this.lookForEventParamsIn(e,this.manualEventsParams)&&(n=!0),n},e.prototype.lookForEventParamsIn=function(e,t){for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];if(r&&(0,i.deepEquals)(e,r))return!0}return!1},e.prototype.shouldRegisterSchemaFromManually=function(e,t){return r(this,void 0,void 0,function(){return o(this,function(n){switch(n.label){case 0:return this.clearOldEvents(),[4,this.hasSameShapeInAvoFunctionsAs(e,t)];case 1:return[2,!n.sent()]}})})},e.prototype.hasSameShapeInAvoFunctionsAs=function(e,t){return r(this,void 0,void 0,function(){var n;return o(this,function(r){switch(r.label){case 0:return n=!1,[4,this.lookForEventSchemaIn(e,t,this.avoFunctionsEventsParams)];case 1:return r.sent()&&(n=!0),n&&delete this.avoFunctionsEventsParams[e],[2,n]}})})},e.prototype.lookForEventSchemaIn=function(e,t,n){return r(this,void 0,void 0,function(){var r,a,c,f,u,l;return o(this,function(o){switch(o.label){case 0:for(c in a=[],r=n)a.push(c);f=0,o.label=1;case 1:return f<a.length?(c=a[f])in r?(u=c,n.hasOwnProperty(u)?u!==e?[3,3]:[4,s.AvoSchemaParser.extractSchema(n[e])]:[3,3]):[3,3]:[3,4];case 2:if((l=o.sent())&&(0,i.deepEquals)(t,l))return[2,!0];o.label=3;case 3:return f++,[3,1];case 4:return[2,!1]}})})},e.prototype.clearOldEvents=function(){var e=Date.now();for(var t in this.avoFunctionsEvents)if(this.avoFunctionsEvents.hasOwnProperty(t)&&e-(Number(t)||0)>300){var n=this.avoFunctionsEvents[t];delete this.avoFunctionsEvents[t],delete this.avoFunctionsEventsParams[n]}for(var t in this.manualEvents)this.manualEvents.hasOwnProperty(t)&&e-(Number(t)||0)>300&&(n=this.manualEvents[t],delete this.manualEvents[t],delete this.manualEventsParams[n])},e.prototype._clearEvents=function(){this.avoFunctionsEvents={},this.manualEvents={},this.avoFunctionsEventsParams={},this.manualEventsParams={}},e}();t.AvoDeduplicator=a},499:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EventSpecCache=void 0;var n=function(){function e(e){void 0===e&&(e=!1),this.TTL_MS=6e4,this.MAX_EVENT_COUNT=50,this.globalEventCount=0,this.cache=new Map,this.shouldLog=e}return e.prototype.generateKey=function(e,t,n){return"".concat(e,":").concat(t,":").concat(n)},e.prototype.get=function(e,t,n){var r=this.generateKey(e,t,n),o=this.cache.get(r);return o?this.shouldEvict(o)?(this.cache.delete(r),null):(this.shouldLog&&console.log("[Avo Inspector] Cache hit for key: ".concat(r)),o.lastAccessed=Date.now(),o.eventCount++,this.globalEventCount++,this.globalEventCount>=this.MAX_EVENT_COUNT&&(this.evictOldest(),this.globalEventCount=0),o.spec):null},e.prototype.set=function(e,t,n,r){var o=this.generateKey(e,t,n),s=Date.now(),i={spec:r,timestamp:s,lastAccessed:s,eventCount:0};this.cache.set(o,i)},e.prototype.shouldEvict=function(e){var t=Date.now()-e.timestamp>this.TTL_MS,n=e.eventCount>=this.MAX_EVENT_COUNT;return t||n},e.prototype.evictOldest=function(){if(0!==this.cache.size){var e=null,t=1/0;this.cache.forEach(function(n,r){n.lastAccessed<t&&(t=n.lastAccessed,e=r)}),null!==e&&this.cache.delete(e)}},e.prototype.clear=function(){this.cache.clear(),this.globalEventCount=0,this.shouldLog&&console.log("[Avo Inspector] Cache cleared")},e.prototype.size=function(){return this.cache.size},e.prototype.getStats=function(){var e=[],t=Date.now();return this.cache.forEach(function(n,r){e.push({key:r,age:t-n.timestamp,lastAccessedAgo:t-n.lastAccessed,eventCount:n.eventCount})}),{size:this.cache.size,globalEventCount:this.globalEventCount,entries:e}},e}();t.EventSpecCache=n},562:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getHash=function(e){return{hash:e}},t.createCurve=function(e,t){const n=t=>(0,r.weierstrass)({...e,hash:t});return{...n(t),create:n}};const r=n(705)},611:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,s){function i(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(i,a)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=a(0),i.throw=a(1),i.return=a(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){s.label=a[1];break}if(6===a[0]&&s.label<o[1]){s.label=o[1],o=a;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(a);break}o[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.AvoInspector=void 0;var s=n(844),i=n(924),a=n(669),c=n(243),f=n(491),u=n(492),l=n(499),h=n(190),d=n(829),p=n(916),v=n(185),y=n(330).rE,g=function(){function e(t){if(this.currentBranchId=null,(0,v.isValueEmpty)(t.env)?(this.environment=s.AvoInspectorEnv.Dev,console.warn("[Avo Inspector] No environment provided. Defaulting to dev.")):Object.values(s.AvoInspectorEnv).includes(t.env)?this.environment=t.env:(this.environment=s.AvoInspectorEnv.Dev,console.warn("[Avo Inspector] Unsupported environment provided. Defaulting to dev. Supported environments - Dev, Staging, Prod.")),(0,v.isValueEmpty)(t.apiKey))throw new Error("[Avo Inspector] No API key provided. Inspector can't operate without API key.");if(this.apiKey=t.apiKey,(0,v.isValueEmpty)(t.version))throw new Error("[Avo Inspector] No version provided. Many features of Inspector rely on versioning. Please provide comparable string version, i.e. integer or semantic.");this.version=t.version,this.environment===s.AvoInspectorEnv.Dev?(e._batchSize=1,e._shouldLog=!0):(e._batchSize=30,e._batchFlushSeconds=30,e._shouldLog=!1),e.avoStorage=new f.AvoStorage(e._shouldLog,null!=t.suffix?t.suffix:""),this.publicEncryptionKey=t.publicEncryptionKey,this.avoNetworkCallsHandler=new c.AvoNetworkCallsHandler(this.apiKey,this.environment.toString(),t.appName||"",this.version,y,this.publicEncryptionKey),this.avoBatcher=new a.AvoBatcher(this.avoNetworkCallsHandler),this.avoDeduplicator=new u.AvoDeduplicator,this.streamId=d.AvoStreamId.streamId,this.streamId&&(this.eventSpecCache=new l.EventSpecCache(e._shouldLog),this.eventSpecFetcher=new h.AvoEventSpecFetcher(e._networkTimeout,e._shouldLog,this.environment),e._shouldLog&&(console.log("[Avo Inspector] Event spec fetching and validation enabled"),this.publicEncryptionKey&&console.log("[Avo Inspector] Property value encryption enabled")))}return Object.defineProperty(e,"batchSize",{get:function(){return this._batchSize},set:function(e){this._batchSize=e<1?1:e},enumerable:!1,configurable:!0}),Object.defineProperty(e,"batchFlushSeconds",{get:function(){return this._batchFlushSeconds},enumerable:!1,configurable:!0}),Object.d