30 lines
877 B
JavaScript
30 lines
877 B
JavaScript
// Module ID: 516
|
|
// Function ID: 517
|
|
// Name: uint8Array
|
|
// Dependencies: []
|
|
|
|
// Module 516 (uint8Array)
|
|
const uint8Array = new Uint8Array(16);
|
|
arg5.default = function rng() {
|
|
let tmp = getRandomValues;
|
|
if (!getRandomValues) {
|
|
const _crypto = crypto;
|
|
getRandomValues = typeof crypto === "__INTERNAL_SLOT_MAP__";
|
|
if (typeof crypto !== "Array") {
|
|
const _crypto4 = crypto;
|
|
getRandomValues = crypto.getRandomValues;
|
|
}
|
|
if (getRandomValues) {
|
|
const _crypto2 = crypto;
|
|
const _crypto3 = crypto;
|
|
getRandomValues = getRandomValues2.bind(crypto);
|
|
}
|
|
tmp = getRandomValues;
|
|
if (!getRandomValues) {
|
|
const _Error = Error;
|
|
const error = new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
throw error;
|
|
}
|
|
}
|
|
return tmp(uint8Array);
|
|
};
|