{"version":3,"sources":["jsdelivr-header.js","/npm/bigint-buffer@1.1.5/dist/browser.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aAGA,IAAI,UAMJ,SAAS,WAAW,GAChB,CACI,MAAM,EAAW,OAAO,KAAK,GAC7B,EAAS,UACT,MAAM,EAAM,EAAS,SAAS,OAC9B,OAAmB,IAAf,EAAI,OACG,OAAO,GAEX,OAAO,KAAK,IACvB,CAEJ,CAOA,SAAS,WAAW,GAChB,CACI,MAAM,EAAM,EAAI,SAAS,OACzB,OAAmB,IAAf,EAAI,OACG,OAAO,GAEX,OAAO,KAAK,IACvB,CAEJ,CAQA,SAAS,WAAW,EAAK,GACrB,CACI,MAAM,EAAM,EAAI,SAAS,IACnB,EAAS,OAAO,KAAK,EAAI,SAAiB,EAAR,EAAW,KAAK,MAAM,EAAW,EAAR,GAAY,OAE7E,OADA,EAAO,UACA,CACX,CAGJ,CAQA,SAAS,WAAW,EAAK,GACrB,CACI,MAAM,EAAM,EAAI,SAAS,IACzB,OAAO,OAAO,KAAK,EAAI,SAAiB,EAAR,EAAW,KAAK,MAAM,EAAW,EAAR,GAAY,MACzE,CAEJ,CAjEA,OAAO,eAAe,QAAS,aAAc,CAAE,OAAO,IAmBtD,QAAQ,WAAa,WAgBrB,QAAQ,WAAa,WAiBrB,QAAQ,WAAa,WAcrB,QAAQ,WAAa","file":"/npm/bigint-buffer@1.1.5/dist/browser.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/bigint-buffer@1.1.5/dist/browser.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nlet converter;\n/**\n * Convert a little-endian buffer into a BigInt.\n * @param buf The little-endian buffer to convert\n * @returns A BigInt with the little-endian representation of buf.\n */\nfunction toBigIntLE(buf) {\n    {\n        const reversed = Buffer.from(buf);\n        reversed.reverse();\n        const hex = reversed.toString('hex');\n        if (hex.length === 0) {\n            return BigInt(0);\n        }\n        return BigInt(`0x${hex}`);\n    }\n    return converter.toBigInt(buf, false);\n}\nexports.toBigIntLE = toBigIntLE;\n/**\n * Convert a big-endian buffer into a BigInt\n * @param buf The big-endian buffer to convert.\n * @returns A BigInt with the big-endian representation of buf.\n */\nfunction toBigIntBE(buf) {\n    {\n        const hex = buf.toString('hex');\n        if (hex.length === 0) {\n            return BigInt(0);\n        }\n        return BigInt(`0x${hex}`);\n    }\n    return converter.toBigInt(buf, true);\n}\nexports.toBigIntBE = toBigIntBE;\n/**\n * Convert a BigInt to a little-endian buffer.\n * @param num   The BigInt to convert.\n * @param width The number of bytes that the resulting buffer should be.\n * @returns A little-endian buffer representation of num.\n */\nfunction toBufferLE(num, width) {\n    {\n        const hex = num.toString(16);\n        const buffer = Buffer.from(hex.padStart(width * 2, '0').slice(0, width * 2), 'hex');\n        buffer.reverse();\n        return buffer;\n    }\n    // Allocation is done here, since it is slower using napi in C\n    return converter.fromBigInt(num, Buffer.allocUnsafe(width), false);\n}\nexports.toBufferLE = toBufferLE;\n/**\n * Convert a BigInt to a big-endian buffer.\n * @param num   The BigInt to convert.\n * @param width The number of bytes that the resulting buffer should be.\n * @returns A big-endian buffer representation of num.\n */\nfunction toBufferBE(num, width) {\n    {\n        const hex = num.toString(16);\n        return Buffer.from(hex.padStart(width * 2, '0').slice(0, width * 2), 'hex');\n    }\n    return converter.fromBigInt(num, Buffer.allocUnsafe(width), true);\n}\nexports.toBufferBE = toBufferBE;\n"]}