"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const _data = new Uint8Array(16);
const _hex = [];
for (let i = 0; i < 256; i++) {
  _hex.push(i.toString(16).padStart(2, "0"));
}
let _fillRandomValues;
if (typeof crypto === "object" && typeof crypto.getRandomValues === "function") {
  _fillRandomValues = crypto.getRandomValues.bind(crypto);
} else {
  _fillRandomValues = function(bucket) {
    for (let i = 0; i < bucket.length; i++) {
      bucket[i] = Math.floor(Math.random() * 256);
    }
    return bucket;
  };
}
function generateUuid() {
  _fillRandomValues(_data);
  _data[6] = _data[6] & 15 | 64;
  _data[8] = _data[8] & 63 | 128;
  let i = 0;
  let result = "";
  result += _hex[_data[i++]];
  result += _hex[_data[i++]];
  result += _hex[_data[i++]];
  result += _hex[_data[i++]];
  result += "-";
  result += _hex[_data[i++]];
  result += _hex[_data[i++]];
  result += "-";
  result += _hex[_data[i++]];
  result += _hex[_data[i++]];
  result += "-";
  result += _hex[_data[i++]];
  result += _hex[_data[i++]];
  result += "-";
  result += _hex[_data[i++]];
  result += _hex[_data[i++]];
  result += _hex[_data[i++]];
  result += _hex[_data[i++]];
  result += _hex[_data[i++]];
  result += _hex[_data[i++]];
  return result;
}
exports.generateUuid = generateUuid;
