Module 618830

3,053 characters · in no known chunk
Dependencies
Required by (1)
Lazily required by (0)none
Requires (0)none
Lazily requires (0)none
Source Raw
function(e,t,n){"use strict";n.r(t),n.d(t,{XXH64:()=>u,hash:()=>c});let i=2n**64n-1n,r=new TextEncoder;function s(e,t,n,i){return BigInt(e)|BigInt(t)<<16n|BigInt(n)<<32n|BigInt(i)<<48n}function a(e,t){return BigInt(e[t])|BigInt(e[t+1])<<8n|BigInt(e[t+2])<<16n|BigInt(e[t+3])<<24n|BigInt(e[t+4])<<32n|BigInt(e[t+5])<<40n|BigInt(e[t+6])<<48n|BigInt(e[t+7])<<56n}function o(e,t){return e<<t&i|e>>64n-t}function l(e){return BigInt.asUintN(64,e)}class u{#t;#n;#i;#r;#s;#a;#o;#l;constructor(e=0){this.reset(e)}reset(e=this.#t){return this.#t=BigInt.asUintN(32,BigInt(e)),this.#n=l(this.#t+0x9e3779b185ebca87n+0xc2b2ae3d27d4eb4fn),this.#i=l(this.#t+0xc2b2ae3d27d4eb4fn),this.#r=this.#t,this.#s=l(this.#t-0x9e3779b185ebca87n),this.#a=null,this.#o=0,this.#l=0,this}update(e){"string"==typeof e&&(e=r.encode(e));let t=0,n=e.length,i=t+n;if(0===n)return this;if(this.#o+=n,0===this.#l&&(this.#a=new Uint8Array(32)),this.#l+n<32)return this.#a.set(e.subarray(0,n),this.#l),this.#l+=n,this;if(this.#l>0){let n;this.#a.set(e.subarray(0,32-this.#l),this.#l);let i=0;n=a(this.#a,i),this.#n=l(0x9e3779b185ebca87n*o(l(this.#n+0xc2b2ae3d27d4eb4fn*n),31n)),i+=8,n=a(this.memory,i),this.#i=l(0x9e3779b185ebca87n*o(l(this.#i+0xc2b2ae3d27d4eb4fn*n),31n)),i+=8,n=a(this.memory,i),this.#r=l(0x9e3779b185ebca87n*o(l(this.#r+0xc2b2ae3d27d4eb4fn*n),31n)),i+=8,n=a(this.memory,i),this.#s=l(0x9e3779b185ebca87n*o(l(this.#s+0xc2b2ae3d27d4eb4fn*n),31n)),t+=32-this.#l,this.#l=0}if(t<=i-32){let n=i-32;do{let n;n=a(e,t),this.#n=l(0x9e3779b185ebca87n*o(l(this.#n+0xc2b2ae3d27d4eb4fn*n),31n)),t+=8,n=a(e,t),this.#i=l(0x9e3779b185ebca87n*o(l(this.#i+0xc2b2ae3d27d4eb4fn*n),31n)),t+=8,n=a(e,t),this.#r=l(0x9e3779b185ebca87n*o(l(this.#r+0xc2b2ae3d27d4eb4fn*n),31n)),t+=8,n=a(e,t),this.#s=l(0x9e3779b185ebca87n*o(l(this.#s+0xc2b2ae3d27d4eb4fn*n),31n)),t+=8}while(t<=n)}return t<i&&(this.#a.set(e.subarray(t,i),this.#l),this.#l=i-t),this}digest(){let e=this.#a,t=this.#l,n=0,i=0n,r=0n,u=0n;for(this.#o>=32?(i=l((i=o(this.#n,1n)+o(this.#i,7n)+o(this.#r,12n)+o(this.#s,18n))^0x9e3779b185ebca87n*o(l(0xc2b2ae3d27d4eb4fn*this.#n),31n)),i=l(0x9e3779b185ebca87n*i+0x85ebca77c2b2ae63n),i=l(i^0x9e3779b185ebca87n*o(l(0xc2b2ae3d27d4eb4fn*this.#i),31n)),i=l(0x9e3779b185ebca87n*i+0x85ebca77c2b2ae63n),i=l(i^0x9e3779b185ebca87n*o(l(0xc2b2ae3d27d4eb4fn*this.#r),31n)),i=l(0x9e3779b185ebca87n*i+0x85ebca77c2b2ae63n),i=l(i^0x9e3779b185ebca87n*o(l(0xc2b2ae3d27d4eb4fn*this.#s),31n)),i=l(0x9e3779b185ebca87n*i+0x85ebca77c2b2ae63n)):i=l(this.#t+0x27d4eb2f165667c5n),i+=BigInt(this.#o);n<=t-8;)u=l(0x9e3779b185ebca87n*o(l(0xc2b2ae3d27d4eb4fn*(u=a(e,n))),31n)),i=l(0x9e3779b185ebca87n*o(i^u,27n)+0x85ebca77c2b2ae63n),n+=8;for(n+4<=t&&(i=l(0xc2b2ae3d27d4eb4fn*o(i^l(0x9e3779b185ebca87n*(u=s(e[n+1]<<8|e[n],e[n+3]<<8|e[n+2],0,0))),23n)+0x165667b19e3779f9n),n+=4);n<t;)i=l(0x9e3779b185ebca87n*o(i^l(0x27d4eb2f165667c5n*(u=s(e[n++],0,0,0))),11n));return r=l(i>>33n),i=l((i^r)*0xc2b2ae3d27d4eb4fn),r=l(i>>29n),i=l((i^r)*0x165667b19e3779f9n),r=l(i>>32n),i=l(i^r)}}function c(e,t=0){return new u(t).update(e).digest()}}