{"version":3,"file":"randomUUID.cjs","sources":["../../src/uuid/randomUUID.js"],"sourcesContent":["/* eslint-disable unicorn/filename-case */\n/* eslint-disable @stylistic/space-infix-ops */\n/* eslint-disable @stylistic/arrow-parens */\n\nconst randomUUID = function () {\n    let uuid;\n    if (typeof crypto.randomUUID === 'function') {\n        uuid = crypto.randomUUID();\n    } else {\n        // https://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid/2117523#2117523\n        uuid = (\n            ([1e7]+-1e3+-4e3+-8e3+-1e11)\n                .replace( // eslint-disable-line unicorn/prefer-string-replace-all\n                    /[018]/g,\n                    // eslint-disable-next-line no-bitwise, @stylistic/no-mixed-operators\n                    c => (c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16)\n                )\n        );\n    }\n    return uuid;\n};\n\nexport { randomUUID };\n"],"names":["uuid","crypto","randomUUID","replace","c","getRandomValues","Uint8Array","toString"],"mappings":";mBAImB,WACf,IAAIA;AAEAA,KAD6B,mBAAtBC,OAAOC,WACPD,OAAOC,cAIT,CAAC,MAAK,KAAK,KAAK,KAAK,MACjBC,QACG,SAEAC,IAAMA,EAAIH,OAAOI,gBAAgB,IAAIC,WAAW,IAAI,GAAK,IAAMF,EAAI,GAAGG,SAAS;AAI/F,OAAOP,IACX"}