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AAS,EAAM,MAAQ,EAAF,EAAM,EAAF,EAAI,GAAI,GAC/C,CACJ,IAEO,CACX,EAEA,OAAO,KAAK,OAAO,WAAW,SAAQ,SAAU,GAC/B,YAAT,GAA+B,aAAT,IAE1B,OAAO,GAAQ,SAAU,GACrB,IAAI,EAAO,GAAG,MAAM,KAAK,UAAW,GAEpC,GAAI,aAAe,OACf,OAAO,EAAI,GAAM,MAAM,EAAK,GAG5B,IAAI,EAAO,OAAO,GAClB,OAAO,EAAK,GAAM,MAAM,EAAM,EAEtC,EACJ","file":"/npm/bigint@0.4.2/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/bigint@0.4.2/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","try {\n    // node.js versions < 0.5.5\n    var cc = new require('./build/default/bigint');\n} catch(e) {\n    // node.js versions >= 0.5.5\n    var cc = new require('./build/Release/bigint');\n}\nvar BigInt = cc.BigInt;\n\nmodule.exports = BigInt;\n\nBigInt.conditionArgs = function(num, base) {\n    if (typeof num !== 'string') num = num.toString(base || 10);\n    \n    if (num.match(/e\\+/)) { // positive exponent\n        if (!Number(num).toString().match(/e\\+/)) {\n        return {\n            num: Math.floor(Number(num)).toString(),\n            base: 10\n        };\n    }\n    else {\n        var pow = Math.ceil(Math.log(num) / Math.log(2));\n        var n = (num / Math.pow(2, pow)).toString(2)\n            .replace(/^0/,'');\n        var i = n.length - n.indexOf('.');\n        n = n.replace(/\\./,'');\n        \n        for (; i <= pow; i++) n += '0';\n           return {\n               num : n,\n               base : 2,\n           };\n        }\n    }\n    else if (num.match(/e\\-/)) { // negative exponent\n        return {\n            num : Math.floor(Number(num)).toString(),\n            base : base || 10\n        };\n    }\n    else {\n        return {\n            num : num,\n            base : base || 10,\n        };\n    }\n};\n\ncc.setJSConditioner(BigInt.conditionArgs);\n\nBigInt.prototype.inspect = function () {\n    return '<BigInt ' + this.toString(10) + '>';\n};\n\nBigInt.prototype.toNumber = function () {\n    return parseInt(this.toString(), 10);\n};\n\n[ 'add', 'sub', 'mul', 'div', 'mod' ].forEach(function (op) {\n    BigInt.prototype[op] = function (num) {\n        if (num instanceof BigInt) {\n            return this['b'+op](num);\n        }\n        else if (typeof num === 'number') {\n            if (num >= 0) {\n                return this['u'+op](num);\n            }\n            else if (op === 'add') {\n                return this.usub(-num);\n            }\n            else if (op === 'sub') {\n                return this.uadd(-num);\n            }\n            else {\n                var x = BigInt(num);\n                return this['b'+op](x);\n            }\n        }\n        else if (typeof num === 'string') {\n            var x = BigInt(num);\n            return this['b'+op](x);\n        }\n        else {\n            throw new TypeError('Unspecified operation for type '\n                + (typeof num) + ' for ' + op);\n        }\n    };\n});\n\nBigInt.prototype.abs = function () {\n    return this.babs();\n};\n\nBigInt.prototype.neg = function () {\n    return this.bneg();\n};\n\nBigInt.prototype.powm = function (num, mod) {\n    var m, res;\n\n    if ((typeof mod) === 'number' || (typeof mod) === 'string') {\n        m = BigInt(mod);\n    }\n    else if (mod instanceof BigInt) {\n        m = mod;\n    }\n    \n    if ((typeof num) === 'number') {\n        return this.upowm(num, m);\n    }\n    else if ((typeof num) === 'string') {\n        var n = BigInt(num);\n        return this.bpowm(n, m);\n    }\n    else if (num instanceof BigInt) {\n        return this.bpowm(num, m);\n    }\n};\n\nBigInt.prototype.mod = function (num, mod) {\n    var m, res;\n    \n    if ((typeof mod) === 'number' || (typeof mod) === 'string') {\n        m = BigInt(mod);\n    }\n    else if (mod instanceof BigInt) {\n        m = mod;\n    }\n    \n    if ((typeof num) === 'number') {\n        return this.umod(num, m);\n    }\n    else if ((typeof num) === 'string') {\n        var n = BigInt(num);\n        return this.bmod(n, m);\n    }\n    else if (num instanceof BigInt) {\n        return this.bmod(num, m);\n    }\n};\n\n\nBigInt.prototype.pow = function (num) {\n    if (typeof num === 'number') {\n        if (num >= 0) {\n            return this.upow(num);\n        }\n        else {\n            return BigInt.prototype.powm.call(this, num, this);\n        }\n    }\n    else {\n        var x = parseInt(num.toString(), 10);\n        return BigInt.prototype.pow.call(this, x);\n    }\n};\n\nBigInt.prototype.shiftLeft = function (num) {\n    if (typeof num === 'number') {\n        if (num >= 0) {\n            return this.umul2exp(num);\n        }\n        else {\n            return this.shiftRight(-num);\n        }\n    }\n    else {\n        var x = parseInt(num.toString(), 10);\n        return BigInt.prototype.shiftLeft.call(this, x);\n    }\n};\n\nBigInt.prototype.shiftRight = function (num) {\n    if (typeof num === 'number') {\n        if (num >= 0) {\n            return this.udiv2exp(num);\n        }\n        else {\n            return this.shiftLeft(-num);\n        }\n    }\n    else {\n        var x = parseInt(num.toString(), 10);\n        return BigInt.prototype.shiftRight.call(this, x);\n    }\n};\n\nBigInt.prototype.cmp = function (num) {\n    if (num instanceof BigInt) {\n        return this.bcompare(num);\n    }\n    else if (typeof num === 'number') {\n        if (num < 0) {\n            return this.scompare(num);\n        }\n        else {\n            return this.ucompare(num);\n        }\n    }\n    else {\n        var x = BigInt(num);\n        return this.bcompare(x);\n    }\n};\n\nBigInt.prototype.gt = function (num) {\n    return this.cmp(num) > 0;\n};\n\nBigInt.prototype.ge = function (num) {\n    return this.cmp(num) >= 0;\n};\n\nBigInt.prototype.eq = function (num) {\n    return this.cmp(num) === 0;\n};\n\nBigInt.prototype.ne = function (num) {\n    return this.cmp(num) !== 0;\n};\n\nBigInt.prototype.lt = function (num) {\n    return this.cmp(num) < 0;\n};\n\nBigInt.prototype.le = function (num) {\n    return this.cmp(num) <= 0;\n};\n\n'and or xor'.split(' ').forEach(function (name) {\n    BigInt.prototype[name] = function (num) {\n        if (num instanceof BigInt) {\n            return this['b' + name](num);\n        }\n        else {\n            var x = BigInt(num);\n            return this['b' + name](x);\n        }\n    };\n});\n\nBigInt.prototype.sqrt = function() {\n    return this.bsqrt();\n};\n\nBigInt.prototype.root = function(num) {\n    if (num instanceof BigInt) {\n        return this.broot(num);\n    }\n    else {\n        var x = BigInt(num);\n        return this.broot(num);\n    }\n};\n\nBigInt.prototype.rand = function (to) {\n    if (to === undefined) {\n        if (this.toString() === '1') {\n            return BigInt(0);\n        }\n        else {\n            return this.brand0();\n        }\n    }\n    else {\n        var x = to instanceof BigInt\n            ? to.sub(this)\n            : BigInt(to).sub(this);\n        return x.brand0().add(this);\n    }\n};\n\nBigInt.prototype.invertm = function (mod) {\n    if (mod instanceof BigInt) {\n        return this.binvertm(mod);\n    }\n    else {\n        var x = BigInt(mod);\n        return this.binvertm(x);\n    }\n};\n\nBigInt.prototype.probPrime = function (reps) {\n    var n = this.probprime(reps || 10);\n    return { 2 : true, 1 : 'maybe', 0 : false }[n];\n};\n\nBigInt.prototype.nextPrime = function () {\n    return this.nextprime();\n};\n\nBigInt.prototype.gcd = function (num) {\n  return this.bgcd(num);\n};\n\nBigInt.fromBuffer = function (buf, opts) {\n    if (!opts) opts = {};\n    \n    var endian = { 1 : 'big', '-1' : 'little' }[opts.endian]\n        || opts.endian || 'big'\n    ;\n    \n    var size = opts.size || 1;\n    \n    if (buf.length % size !== 0) {\n        throw new RangeError('Buffer length (' + buf.length + ')'\n            + ' must be a multiple of size (' + size + ')'\n        );\n    }\n    \n    var hex = [];\n    for (var i = 0; i < buf.length; i += size) {\n        var chunk = [];\n        for (var j = 0; j < size; j++) {\n            chunk.push(buf[\n                i + (endian === 'big' ? j : (size - j - 1))\n            ]);\n        }\n        \n        hex.push(chunk\n            .map(function (c) {\n                return (c < 16 ? '0' : '') + c.toString(16);\n            })\n            .join('')\n        );\n    }\n    \n    return BigInt(hex.join(''), 16);\n};\n\nBigInt.prototype.toBuffer = function (opts) {\n    if (typeof opts === 'string') {\n        if (opts !== 'mpint') return 'Unsupported Buffer representation';\n        \n        var abs = this.abs();\n        var buf = abs.toBuffer({ size : 1, endian : 'big' });\n        var len = buf.length === 1 && buf[0] === 0 ? 0 : buf.length;\n        if (buf[0] & 0x80) len ++;\n        \n        var ret = new Buffer(4 + len);\n        if (len > 0) buf.copy(ret, 4 + (buf[0] & 0x80 ? 1 : 0));\n        if (buf[0] & 0x80) ret[4] = 0;\n        \n        ret[0] = len & (0xff << 24);\n        ret[1] = len & (0xff << 16);\n        ret[2] = len & (0xff << 8);\n        ret[3] = len & (0xff << 0);\n        \n        // two's compliment for negative integers:\n        var isNeg = this.lt(0);\n        if (isNeg) {\n            for (var i = 4; i < ret.length; i++) {\n                ret[i] = 0xff - ret[i];\n            }\n        }\n        ret[4] = (ret[4] & 0x7f) | (isNeg ? 0x80 : 0);\n        if (isNeg) ret[ret.length - 1] ++;\n        \n        return ret;\n    }\n    \n    if (!opts) opts = {};\n    \n    var endian = { 1 : 'big', '-1' : 'little' }[opts.endian]\n        || opts.endian || 'big'\n    ;\n    var size = opts.size || 1;\n    \n    var hex = this.toString(16);\n    if (hex.charAt(0) === '-') throw new Error(\n        'converting negative numbers to Buffers not supported yet'\n    );\n    \n    var len = Math.ceil(hex.length / (2 * size)) * size;\n    var buf = new Buffer(len);\n    \n    // zero-pad the hex string so the chunks are all `size` long\n    while (hex.length < 2 * len) hex = '0' + hex;\n    \n    var hx = hex\n        .split(new RegExp('(.{' + (2 * size) + '})'))\n        .filter(function (s) { return s.length > 0 })\n    ;\n    \n    hx.forEach(function (chunk, i) {\n        for (var j = 0; j < size; j++) {\n            var ix = i * size + (endian === 'big' ? j : size - j - 1);\n            buf[ix] = parseInt(chunk.slice(j*2,j*2+2), 16);\n        }\n    });\n    \n    return buf;\n};\n\nObject.keys(BigInt.prototype).forEach(function (name) {\n    if (name === 'inspect' || name === 'toString') return;\n    \n    BigInt[name] = function (num) {\n        var args = [].slice.call(arguments, 1);\n        \n        if (num instanceof BigInt) {\n            return num[name].apply(num, args);\n        }\n        else {\n            var bigi = BigInt(num);\n            return bigi[name].apply(bigi, args);\n        }\n    };\n});\n"]}