- Add GETTING_STARTED.md with quick start guide and development modes - Add INSTALL.sh automated installation script - Add INSTALLATION_CHECKLIST.md, INSTALLATION_SUCCESS.md, and INSTALLATION_SUMMARY.md - Add QUICK_REFERENCE.md for common commands - Add SETUP_GUIDE.md with detailed setup instructions - Update README.md with improved project overview - Add did-wallet app dependencies and node_modules
5 lines
5.9 KiB
JavaScript
5 lines
5.9 KiB
JavaScript
(function (root, factory) {(typeof module === 'object' && module.exports) ? module.exports = factory() : root.MultiformatsMurmur3 = factory()}(typeof self !== 'undefined' ? self : this, function () {
|
|
"use strict";var MultiformatsMurmur3=(()=>{var v=Object.defineProperty;var C=Object.getOwnPropertyDescriptor;var G=Object.getOwnPropertyNames;var V=Object.prototype.hasOwnProperty;var j=(t,r)=>{for(var e in r)v(t,e,{get:r[e],enumerable:!0})},J=(t,r,e,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let c of G(r))!V.call(t,c)&&c!==e&&v(t,c,{get:()=>r[c],enumerable:!(n=C(r,c))||n.enumerable});return t};var K=t=>J(v({},"__esModule",{value:!0}),t);var vt={};j(vt,{murmur3128:()=>yt,murmur332:()=>bt,murmur364:()=>Lt});var At=new Uint8Array(0);var P=H,S=128,Q=127,W=~Q,X=Math.pow(2,31);function H(t,r,e){r=r||[],e=e||0;for(var n=e;t>=X;)r[e++]=t&255|S,t/=128;for(;t&W;)r[e++]=t&255|S,t>>>=7;return r[e]=t|0,H.bytes=e-n+1,r}var Y=M,Z=128,z=127;function M(t,n){var e=0,n=n||0,c=0,h=n,u,l=t.length;do{if(h>=l)throw M.bytes=0,new RangeError("Could not decode varint");u=t[h++],e+=c<28?(u&z)<<c:(u&z)*Math.pow(2,c),c+=7}while(u>=Z);return M.bytes=h-n,e}var k=Math.pow(2,7),tt=Math.pow(2,14),et=Math.pow(2,21),rt=Math.pow(2,28),nt=Math.pow(2,35),ot=Math.pow(2,42),ct=Math.pow(2,49),it=Math.pow(2,56),st=Math.pow(2,63),ft=function(t){return t<k?1:t<tt?2:t<et?3:t<rt?4:t<nt?5:t<ot?6:t<ct?7:t<it?8:t<st?9:10},at={encode:P,decode:Y,encodingLength:ft},ht=at,A=ht;function _(t,r,e=0){return A.encode(t,r,e),r}function U(t){return A.encodingLength(t)}function I(t,r){let e=r.byteLength,n=U(t),c=n+U(e),h=new Uint8Array(c+e);return _(t,h,0),_(e,h,n),h.set(r,c),new D(t,e,r,h)}var D=class{code;size;digest;bytes;constructor(r,e,n,c){this.code=r,this.size=e,this.digest=n,this.bytes=c}};var xt=20;function L({name:t,code:r,encode:e,minDigestLength:n,maxDigestLength:c}){return new B(t,r,e,n,c)}var B=class{name;code;encode;minDigestLength;maxDigestLength;constructor(r,e,n,c,h){this.name=r,this.code=e,this.encode=n,this.minDigestLength=c??xt,this.maxDigestLength=h}digest(r,e){if(e?.truncate!=null){if(e.truncate<this.minDigestLength)throw new Error(`Invalid truncate option, must be greater than or equal to ${this.minDigestLength}`);if(this.maxDigestLength!=null&&e.truncate>this.maxDigestLength)throw new Error(`Invalid truncate option, must be less than or equal to ${this.maxDigestLength}`)}if(r instanceof Uint8Array){let n=this.encode(r);return n instanceof Uint8Array?q(n,this.code,e?.truncate):n.then(c=>q(c,this.code,e?.truncate))}else throw Error("Unknown type, must be binary type")}};function q(t,r,e){if(e!=null&&e!==t.byteLength){if(e>t.byteLength)throw new Error(`Invalid truncate option, must be less than or equal to ${t.byteLength}`);t=t.subarray(0,e)}return I(r,t)}function g(t,r){let e=t.lo+r.lo>>>0,n=t.hi+r.hi+(e<t.lo?1:0)>>>0;return{lo:e,hi:n}}function dt(t,r){return t+r>>>0}function x(t,r){let e=t.lo&65535,n=t.lo>>>16,c=r.lo&65535,h=r.lo>>>16,u=e*c,l=e*h,o=n*c,s=n*h,f=(u>>>16)+(l&65535)+(o&65535)>>>0,y=(f<<16|u&65535)>>>0,w=s+(l>>>16)+(o>>>16)+(f>>>16),d=Math.imul(t.lo,r.hi),m=Math.imul(t.hi,r.lo),R=w+d+m>>>0;return{lo:y,hi:R}}function p(t,r){return Math.imul(t,r)>>>0}function b(t,r){if(r===0)return t;if(r===32)return{lo:t.hi,hi:t.lo};if(r<32){let c=(t.lo<<r|t.hi>>>32-r)>>>0,h=(t.hi<<r|t.lo>>>32-r)>>>0;return{lo:c,hi:h}}r-=32;let e=(t.hi<<r|t.lo>>>32-r)>>>0,n=(t.lo<<r|t.hi>>>32-r)>>>0;return{lo:e,hi:n}}function a(t,r){return{lo:(t.lo^r.lo)>>>0,hi:(t.hi^r.hi)>>>0}}function E(t,r){if(r===0)return t;if(r<32){let e=(t.lo>>>r|t.hi<<32-r)>>>0,n=t.hi>>>r;return{lo:e,hi:n}}return{lo:t.hi>>>r-32,hi:0}}function i(t,r){return{lo:t>>>0,hi:r>>>0}}function N(t,r){return(t<<r|t>>>32-r)>>>0}function F(t,r){let e=r*8,n=t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24,c=t[e+4]|t[e+5]<<8|t[e+6]<<16|t[e+7]<<24;return{lo:n>>>0,hi:c>>>0}}function mt(t,r){let e=r*4;return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}function O(t){return t=a(t,E(t,33)),t=x(t,i(3981806797,4283543511)),t=a(t,E(t,33)),t=x(t,i(444984403,3301882366)),t=a(t,E(t,33)),t}function gt(t){return t^=t>>>16,t=p(t,2246822507),t^=t>>>13,t=p(t,3266489909),t^=t>>>16,t}function T(t,r=0){let e=i(r,0),n=i(r,0),c=t.length,h=Math.floor(c/16),u=i(289559509,2277735313),l=i(658871167,1291169091);for(let w=0;w<h;w++){let d=F(t,w*2),m=F(t,w*2+1);d=x(d,u),d=b(d,31),d=x(d,l),e=a(e,d),e=b(e,27),e=g(e,n),e=g(x(e,i(5,0)),i(1390208809,0)),m=x(m,l),m=b(m,33),m=x(m,u),n=a(n,m),n=b(n,31),n=g(n,e),n=g(x(n,i(5,0)),i(944331445,0))}let o=i(0,0),s=i(0,0),f=t.slice(h*16);switch(f.length){case 15:s=a(s,i(0,f[14]<<16));case 14:s=a(s,i(0,f[13]<<8));case 13:s=a(s,i(0,f[12]));case 12:s=a(s,i(f[11]<<24,0));case 11:s=a(s,i(f[10]<<16,0));case 10:s=a(s,i(f[9]<<8,0));case 9:s=a(s,i(f[8],0)),s=x(s,l),s=b(s,33),s=x(s,u),n=a(n,s);case 8:o=a(o,i(0,f[7]<<24));case 7:o=a(o,i(0,f[6]<<16));case 6:o=a(o,i(0,f[5]<<8));case 5:o=a(o,i(0,f[4]));case 4:o=a(o,i(f[3]<<24,0));case 3:o=a(o,i(f[2]<<16,0));case 2:o=a(o,i(f[1]<<8,0));case 1:o=a(o,i(f[0],0)),o=x(o,u),o=b(o,31),o=x(o,l),e=a(e,o)}let y=i(c,0);return e=a(e,y),n=a(n,y),e=g(e,n),n=g(n,e),e=O(e),n=O(n),e=g(e,n),n=g(n,e),new Uint8Array([e.hi>>>24&255,e.hi>>>16&255,e.hi>>>8&255,e.hi&255,e.lo>>>24&255,e.lo>>>16&255,e.lo>>>8&255,e.lo&255,n.hi>>>24&255,n.hi>>>16&255,n.hi>>>8&255,n.hi&255,n.lo>>>24&255,n.lo>>>16&255,n.lo>>>8&255,n.lo&255])}function $(t,r=0){let e=r>>>0,n=t.length,c=Math.floor(n/4),h=3432918353,u=461845907;for(let s=0;s<c;s++){let f=mt(t,s);f=p(f,h),f=N(f,15),f=p(f,u),e^=f,e=N(e,13),e=dt(p(e,5),3864292196)}let l=t.slice(c*4),o=0;switch(l.length){case 3:o^=l[2]<<16;case 2:o^=l[1]<<8;case 1:o^=l[0],o=p(o,h),o=N(o,15),o=p(o,u),e^=o}return e^=n,e=gt(e),e}function wt(t){let r=new Array(4);for(let e=0;e<4;e++)r[e]=t&255,t=t>>8;return new Uint8Array(r)}var bt=L({name:"murmur3-32",code:35,encode:t=>wt($(t))}),yt=L({name:"murmur3-128",code:34,encode:t=>T(t)}),Lt=L({name:"murmur3-x64-64",code:34,encode:t=>T(t).subarray(0,8)});return K(vt);})();
|
|
return MultiformatsMurmur3}));
|
|
//# sourceMappingURL=index.min.js.map
|