/*!
 * Copyright (c) what3words http://what3words.com
 */
var byteToHex=[];for(var i=0;i<256;++i){byteToHex.push((i+256).toString(16).slice(1))}function unsafeStringify(e,t){if(t===void 0){t=0}return(byteToHex[e[t+0]]+byteToHex[e[t+1]]+byteToHex[e[t+2]]+byteToHex[e[t+3]]+"-"+byteToHex[e[t+4]]+byteToHex[e[t+5]]+"-"+byteToHex[e[t+6]]+byteToHex[e[t+7]]+"-"+byteToHex[e[t+8]]+byteToHex[e[t+9]]+"-"+byteToHex[e[t+10]]+byteToHex[e[t+11]]+byteToHex[e[t+12]]+byteToHex[e[t+13]]+byteToHex[e[t+14]]+byteToHex[e[t+15]]).toLowerCase()}var getRandomValues;var rnds8=new Uint8Array(16);function rng(){if(!getRandomValues){getRandomValues=typeof crypto!=="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto);if(!getRandomValues){throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")}}return getRandomValues(rnds8)}var randomUUID=typeof crypto!=="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var native={randomUUID:randomUUID};function v4(e,t,o){if(native.randomUUID&&!t&&!e){return native.randomUUID()}e=e||{};var r=e.random||(e.rng||rng)();r[6]=r[6]&15|64;r[8]=r[8]&63|128;if(t){o=o||0;for(var n=0;n<16;++n){t[o+n]=r[n]}return t}return unsafeStringify(r)}export{v4};