"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.generateId = void 0;
const generateId = function () {
  let input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Math.random();
  const source = JSON.stringify(input);
  let value = 0;
  for (let i = 0; i < source.length; i++) {
    value += source.charCodeAt(i);
    value += value << 10;
    value ^= value >> 6;
  }
  value += value << 3;
  value ^= value >> 11;
  value += value << 15;
  return value >>> 0;
};
exports.generateId = generateId;
//# sourceMappingURL=generateId.js.map