hash.cjs.prod.js 886 B

123456789101112131415161718192021
  1. "use strict";
  2. function murmur2(str) {
  3. for (var k, h = 0, i = 0, len = str.length; len >= 4; ++i, len -= 4) k = 1540483477 * (65535 & (k = 255 & str.charCodeAt(i) | (255 & str.charCodeAt(++i)) << 8 | (255 & str.charCodeAt(++i)) << 16 | (255 & str.charCodeAt(++i)) << 24)) + (59797 * (k >>> 16) << 16),
  4. h = 1540483477 * (65535 & (k ^= k >>> 24)) + (59797 * (k >>> 16) << 16) ^ 1540483477 * (65535 & h) + (59797 * (h >>> 16) << 16);
  5. switch (len) {
  6. case 3:
  7. h ^= (255 & str.charCodeAt(i + 2)) << 16;
  8. case 2:
  9. h ^= (255 & str.charCodeAt(i + 1)) << 8;
  10. case 1:
  11. h = 1540483477 * (65535 & (h ^= 255 & str.charCodeAt(i))) + (59797 * (h >>> 16) << 16);
  12. }
  13. return (((h = 1540483477 * (65535 & (h ^= h >>> 13)) + (59797 * (h >>> 16) << 16)) ^ h >>> 15) >>> 0).toString(36);
  14. }
  15. Object.defineProperty(exports, "__esModule", {
  16. value: !0
  17. }), exports.default = murmur2;